simple-side-menu
Version:
1 lines • 35.9 kB
JavaScript
module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=12)}([function(e,n,t){e.exports=t(5)()},function(e,n){e.exports=require("react")},function(e,n,t){"use strict";e.exports=function(){}},function(e,n,t){"use strict";e.exports=function(e,n,t,r,o,i,a,s){if(!e){var u;if(void 0===n)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[t,r,o,i,a,s],l=0;(u=new Error(n.replace(/%s/g,function(){return c[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},,function(e,n,t){"use strict";var r=t(6);function o(){}e.exports=function(){function e(e,n,t,o,i,a){if(a!==r){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 n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n};return t.checkPropTypes=o,t.PropTypes=t,t}},function(e,n,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,n,t){var r=t(8);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};t(10)(r,o);r.locals&&(e.exports=r.locals)},function(e,n,t){(n=e.exports=t(9)(!1)).push([e.i,"@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);",""]),n.push([e.i,"@import url(https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css);",""]),n.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto+Mono);",""]),n.push([e.i,"@import url(https://fonts.googleapis.com/icon?family=Material+Icons);",""]),n.push([e.i,'@-webkit-keyframes fadeIn {\n 0% {\n opacity: 0; }\n 25% {\n opacity: 0.25; }\n 50% {\n opacity: 0.5; }\n 75% {\n opacity: 0.75; }\n 100% {\n opacity: 1; } }\n\n@keyframes fadeIn {\n 0% {\n opacity: 0; }\n 25% {\n opacity: 0.25; }\n 50% {\n opacity: 0.5; }\n 75% {\n opacity: 0.75; }\n 100% {\n opacity: 1; } }\n\n@-webkit-keyframes fadeInMenu {\n 0% {\n width: 0rem; }\n 25% {\n width: 6.125rem; }\n 50% {\n width: 12.25rem; }\n 75% {\n width: 18.375rem; }\n 100% {\n width: 24.5rem; } }\n\n@keyframes fadeInMenu {\n 0% {\n width: 0rem; }\n 25% {\n width: 6.125rem; }\n 50% {\n width: 12.25rem; }\n 75% {\n width: 18.375rem; }\n 100% {\n width: 24.5rem; } }\n\n@-webkit-keyframes fadeOutMenu {\n 0% {\n width: 24.5rem; }\n 25% {\n width: 18.375rem; }\n 50% {\n width: 12.25rem; }\n 75% {\n width: 6.125rem; }\n 100% {\n width: 0; } }\n\n@keyframes fadeOutMenu {\n 0% {\n width: 24.5rem; }\n 25% {\n width: 18.375rem; }\n 50% {\n width: 12.25rem; }\n 75% {\n width: 6.125rem; }\n 100% {\n width: 0; } }\n\n@-webkit-keyframes fadeInExpandedMenu {\n 0% {\n width: 0rem; }\n 25% {\n width: 1.5rem; }\n 50% {\n width: 3rem; }\n 75% {\n width: 4.5rem; }\n 100% {\n width: 6rem; } }\n\n@keyframes fadeInExpandedMenu {\n 0% {\n width: 0rem; }\n 25% {\n width: 1.5rem; }\n 50% {\n width: 3rem; }\n 75% {\n width: 4.5rem; }\n 100% {\n width: 6rem; } }\n\n* {\n margin: 0;\n padding: 0; }\n\n*,\n*::before,\n*::before {\n box-sizing: inherit; }\n\nhtml {\n box-sizing: border-box;\n font-size: 62.5%; }\n\nul {\n list-style: none; }\n\na {\n color: #fff;\n text-decoration: none; }\n\nbody {\n overflow-x: hidden; }\n\n.container {\n min-height: 100vh;\n width: 100vw;\n display: flex; }\n\n.nav-container__header, .nav-container--expanded .sub-menu__item, .nav-container--expanded .nav-container__footer {\n display: flex;\n justify-content: center;\n align-items: center; }\n\n.nav-container {\n position: fixed;\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow: hidden;\n background-color: #262f3d;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-animation: fadeInMenu 0.2s ease-in-out;\n animation: fadeInMenu 0.2s ease-in-out;\n color: #fff; }\n .nav-container__separator {\n display: flex;\n width: 24.5rem;\n -webkit-transition: width 0.2s ease-in-out;\n -moz-transition: width 0.2s ease-in-out;\n -o-transition: width 0.2s ease-in-out;\n -ms-transition: width 0.2s ease-in-out;\n transition: width 0.2s ease-in-out; }\n .nav-container__separator--hidden {\n width: 0;\n display: none; }\n .nav-container__separator--expanded {\n width: 6rem;\n display: flex; }\n .nav-container i {\n font-size: 2rem;\n margin-right: 2rem; }\n .nav-container--closed {\n -webkit-animation: fadeOutMenu 0.2s ease-in-out;\n animation: fadeOutMenu 0.2s ease-in-out;\n width: 0;\n overflow: hidden; }\n .nav-container__header {\n height: 5rem;\n max-width: 24.5rem; }\n .nav-container__title {\n flex: 1;\n font-family: "Google Sans", sans-serif;\n font-size: 26px;\n line-height: 32px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap; }\n .nav-container__logo {\n height: 3rem;\n width: 3rem;\n margin-right: 2rem; }\n .nav-container__footer {\n min-height: 5rem;\n cursor: pointer;\n display: flex;\n justify-content: flex-end;\n align-items: center; }\n .nav-container__expand-icon {\n -webkit-transition: transform 0.3s ease-in-out;\n -moz-transition: transform 0.3s ease-in-out;\n -o-transition: transform 0.3s ease-in-out;\n -ms-transition: transform 0.3s ease-in-out;\n transition: transform 0.3s ease-in-out; }\n .nav-container--expanded {\n width: 6rem;\n -webkit-animation: fadeInExpandedMenu 0.3s ease-in-out;\n animation: fadeInExpandedMenu 0.3s ease-in-out; }\n .nav-container--expanded i,\n .nav-container--expanded .nav-container__logo {\n margin-right: 0; }\n .nav-container--expanded .menu-item__title,\n .nav-container--expanded .nav-container__title,\n .nav-container--expanded .sub-menu__title,\n .nav-container--expanded .menu-item__expand-icon {\n display: none; }\n .nav-container--expanded .nav-container__footer {\n justify-content: center; }\n .nav-container--expanded .menu-item > *:first-child {\n width: 6rem;\n justify-content: center; }\n .nav-container--expanded .sub-menu__item {\n width: 6rem;\n padding: 1rem 0; }\n\n.side-menu {\n height: 100%;\n width: 24.5rem;\n font-family: Roboto, "Helvetica Neue", sans-serif;\n overflow-x: hidden;\n overflow-y: auto;\n overflow-x: hidden;\n overflow-y: visible; }\n .side-menu::-webkit-scrollbar {\n background-color: #262f3d;\n width: 0.8rem; }\n .side-menu::-webkit-scrollbar-thumb {\n background-color: #fff;\n -webkit-border-radius: 8px;\n border-radius: 0.8rem;\n border: 2px solid #262f3d; }\n\n.menu-item {\n color: #fff; }\n .menu-item > *:first-child {\n display: flex;\n align-items: center;\n padding: 1rem 0.5rem; }\n .menu-item > *:first-child:hover, .menu-item > *:first-child:visited {\n background-color: #303b4d;\n -webkit-transition: background-color 0.2s ease-in-out;\n -moz-transition: background-color 0.2s ease-in-out;\n -o-transition: background-color 0.2s ease-in-out;\n -ms-transition: background-color 0.2s ease-in-out;\n transition: background-color 0.2s ease-in-out; }\n .menu-item__title {\n flex: 1;\n font-size: 1.6rem;\n font-weight: 500; }\n .menu-item__expand-icon {\n -webkit-transition: transform 0.3s ease-in-out;\n -moz-transition: transform 0.3s ease-in-out;\n -o-transition: transform 0.3s ease-in-out;\n -ms-transition: transform 0.3s ease-in-out;\n transition: transform 0.3s ease-in-out;\n margin-right: 0; }\n .menu-item--collapsible {\n justify-content: space-between; }\n .menu-item--collapsible:hover {\n cursor: pointer;\n display: flex; }\n .menu-item--opened {\n background-color: #19212b; }\n\n.sub-menu {\n background-color: #19212b;\n display: block;\n -webkit-animation: fadeIn 0.5s;\n animation: fadeIn 0.5s; }\n .sub-menu__item {\n padding: 0.5rem 2rem;\n cursor: pointer; }\n .sub-menu__item:hover, .sub-menu__item:visited {\n background-color: #303b4d;\n -webkit-transition: background-color 0.2s 0.3s ease-in-out;\n -moz-transition: background-color 0.2s 0.3s ease-in-out;\n -o-transition: background-color 0.2s 0.3s ease-in-out;\n -ms-transition: background-color 0.2s 0.3s ease-in-out;\n transition: background-color 0.2s 0.3s ease-in-out; }\n .sub-menu__link {\n display: flex;\n align-items: center; }\n .sub-menu__title {\n font-size: 1.5rem;\n font-weight: 400; }\n\n.display-none {\n display: none; }\n\n.menu-item--active, .sub-menu__item--active {\n background-color: #303b4d;\n cursor: auto; }\n\n.nav-container__header, .nav-container__footer, .side-menu, .menu-item {\n box-shadow: 0 1px 0 #404854;\n -webkit-box-shadow: 0 1px 0 #404854;\n -moz-box-shadow: 0 1px 0 #404854; }\n\n.rotate-down {\n -ms-transform: rotate(-180deg);\n -moz-transform: rotate(-180deg);\n -webkit-transform: rotate(-180deg);\n transform: rotate(-180deg); }\n',""])},function(e,n){e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t=function(e,n){var t=e[1]||"",r=e[3];if(!r)return t;if(n&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[t].concat(i).concat([o]).join("\n")}var a;return[t].join("\n")}(n,e);return n[2]?"@media "+n[2]+"{"+t+"}":t}).join("")},n.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(t&&!a[2]?a[2]=t:t&&(a[2]="("+a[2]+") and ("+t+")"),n.push(a))}},n}},function(e,n,t){var r,o,i={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),s=function(e){var n={};return function(e,t){if("function"==typeof e)return e();if(void 0===n[e]){var r=function(e,n){return n?n.querySelector(e):document.querySelector(e)}.call(this,e,t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}n[e]=r}return n[e]}}(),u=null,c=0,l=[],f=t(11);function p(e,n){for(var t=0;t<e.length;t++){var r=e[t],o=i[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(v(r.parts[a],n))}else{var s=[];for(a=0;a<r.parts.length;a++)s.push(v(r.parts[a],n));i[r.id]={id:r.id,refs:1,parts:s}}}}function d(e,n){for(var t=[],r={},o=0;o<e.length;o++){var i=e[o],a=n.base?i[0]+n.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):t.push(r[a]={id:a,parts:[s]})}return t}function m(e,n){var t=s(e.insertInto);if(!t)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===e.insertAt)r?r.nextSibling?t.insertBefore(n,r.nextSibling):t.appendChild(n):t.insertBefore(n,t.firstChild),l.push(n);else if("bottom"===e.insertAt)t.appendChild(n);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=s(e.insertAt.before,t);t.insertBefore(n,o)}}function h(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var n=l.indexOf(e);n>=0&&l.splice(n,1)}function b(e){var n=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return t.nc}();r&&(e.attrs.nonce=r)}return y(n,e.attrs),m(e,n),n}function y(e,n){Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])})}function v(e,n){var t,r,o,i;if(n.transform&&e.css){if(!(i="function"==typeof n.transform?n.transform(e.css):n.transform.default(e.css)))return function(){};e.css=i}if(n.singleton){var a=c++;t=u||(u=b(n)),r=_.bind(null,t,a,!1),o=_.bind(null,t,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=function(e){var n=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(n,e.attrs),m(e,n),n}(n),r=function(e,n,t){var r=t.css,o=t.sourceMap,i=void 0===n.convertToAbsoluteUrls&&o;(n.convertToAbsoluteUrls||i)&&(r=f(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,t,n),o=function(){h(t),t.href&&URL.revokeObjectURL(t.href)}):(t=b(n),r=function(e,n){var t=n.css,r=n.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}.bind(null,t),o=function(){h(t)});return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else o()}}e.exports=function(e,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(n=n||{}).attrs="object"==typeof n.attrs?n.attrs:{},n.singleton||"boolean"==typeof n.singleton||(n.singleton=a()),n.insertInto||(n.insertInto="head"),n.insertAt||(n.insertAt="bottom");var t=d(e,n);return p(t,n),function(e){for(var r=[],o=0;o<t.length;o++){var a=t[o];(s=i[a.id]).refs--,r.push(s)}e&&p(d(e,n),n);for(o=0;o<r.length;o++){var s;if(0===(s=r[o]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete i[s.id]}}}};var g,w=(g=[],function(e,n){return g[e]=n,g.filter(Boolean).join("\n")});function _(e,n,t,r){var o=t?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(n,o);else{var i=document.createTextNode(o),a=e.childNodes;a[n]&&e.removeChild(a[n]),a.length?e.insertBefore(i,a[n]):e.appendChild(i)}}},function(e,n){e.exports=function(e){var n="undefined"!=typeof window&&window.location;if(!n)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var t=n.protocol+"//"+n.host,r=t+n.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,n){var o,i=n.trim().replace(/^"(.*)"$/,function(e,n){return n}).replace(/^'(.*)'$/,function(e,n){return n});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?t+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,n,t){"use strict";t.r(n);var r=t(0),o=t.n(r),i=t(1),a=t.n(i),s=t(3),u=t.n(s);t(2);function c(e){return"/"===e.charAt(0)}function l(e,n){for(var t=n,r=t+1,o=e.length;r<o;t+=1,r+=1)e[t]=e[r];e.pop()}var f=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=e&&e.split("/")||[],r=n&&n.split("/")||[],o=e&&c(e),i=n&&c(n),a=o||i;if(e&&c(e)?r=t:t.length&&(r.pop(),r=r.concat(t)),!r.length)return"/";var s=void 0;if(r.length){var u=r[r.length-1];s="."===u||".."===u||""===u}else s=!1;for(var f=0,p=r.length;p>=0;p--){var d=r[p];"."===d?l(r,p):".."===d?(l(r,p),f++):f&&(l(r,p),f--)}if(!a)for(;f--;f)r.unshift("..");!a||""===r[0]||r[0]&&c(r[0])||r.unshift("");var m=r.join("/");return s&&"/"!==m.substr(-1)&&(m+="/"),m};"function"==typeof Symbol&&Symbol.iterator;var p=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},d=function(e,n,t,r){var o=void 0;"string"==typeof e?(o=function(e){var n=e||"/",t="",r="",o=n.indexOf("#");-1!==o&&(r=n.substr(o),n=n.substr(0,o));var i=n.indexOf("?");return-1!==i&&(t=n.substr(i),n=n.substr(0,i)),{pathname:n,search:"?"===t?"":t,hash:"#"===r?"":r}}(e)).state=n:(void 0===(o=p({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==n&&void 0===o.state&&(o.state=n));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return t&&(o.key=t),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=f(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o},m=("undefined"==typeof window||!window.document||window.document.createElement,"function"==typeof Symbol&&Symbol.iterator,Object.assign,Object.assign,"function"==typeof Symbol&&Symbol.iterator,Object.assign,Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e});function h(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}var b=function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)},y=function(e){function n(){var t,r;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return t=r=h(this,e.call.apply(e,[this].concat(i))),r.handleClick=function(e){if(r.props.onClick&&r.props.onClick(e),!e.defaultPrevented&&0===e.button&&!r.props.target&&!b(e)){e.preventDefault();var n=r.context.router.history,t=r.props,o=t.replace,i=t.to;o?n.replace(i):n.push(i)}},h(r,t)}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,e),n.prototype.render=function(){var e=this.props,n=(e.replace,e.to),t=e.innerRef,r=function(e,n){var t={};for(var r in e)n.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}(e,["replace","to","innerRef"]);u()(this.context.router,"You should not use <Link> outside a <Router>"),u()(void 0!==n,'You must specify the "to" property');var o=this.context.router.history,i="string"==typeof n?d(n,null,null,o.location):n,s=o.createHref(i);return a.a.createElement("a",m({},r,{onClick:this.handleClick,href:s,ref:t}))},n}(a.a.Component);y.propTypes={onClick:o.a.func,target:o.a.string,replace:o.a.bool,to:o.a.oneOfType([o.a.string,o.a.object]).isRequired,innerRef:o.a.oneOfType([o.a.string,o.a.func])},y.defaultProps={replace:!1},y.contextTypes={router:o.a.shape({history:o.a.shape({push:o.a.func.isRequired,replace:o.a.func.isRequired,createHref:o.a.func.isRequired}).isRequired}).isRequired};var v=y;function g(e){return(g="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})(e)}function w(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,n){return!n||"object"!==g(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,n){return(O=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function k(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var j=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),_(this,x(n).apply(this,arguments))}var t,r,o;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&O(e,n)}(n,i["PureComponent"]),t=n,(r=[{key:"render",value:function(){var e=this.props,n=e.to,t=e.logo,r=e.title,o=e.headerClassName,i=e.logoClassName,s=e.titleClassName;return a.a.createElement(v,{className:o,to:n},t&&a.a.createElement("img",{className:i,src:t}),r&&a.a.createElement("h2",{className:s},r))}}])&&w(t.prototype,r),o&&w(t,o),n}();k(j,"propTypes",{to:o.a.string,logo:o.a.string,title:o.a.string,headerClassName:o.a.string,logoClassName:o.a.string,titleClassName:o.a.string}),k(j,"defaultProps",{to:"/",logo:null,title:null,headerClassName:"nav-container__header",logoClassName:"nav-container__logo",titleClassName:"nav-container__title"});var C=j;function E(e){return(E="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})(e)}function S(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,n){return(R=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var T=function(e){function n(){var e,t,r,o;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);for(var i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return r=this,o=(e=P(n)).call.apply(e,[this].concat(s)),t=!o||"object"!==E(o)&&"function"!=typeof o?N(r):o,I(N(N(t)),"getClassName",function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.props.path;return"sub-menu__item ".concat(n===e?"sub-menu__item--active":"").trim()}),I(N(N(t)),"setCurrentRoute",function(e){t.props.setPathname(null,e)}),I(N(N(t)),"_renderItem",function(e){var n=e.item,r=n.icon,o=n.title,i=n.to,s=n.iconClassName,u=e.index;return a.a.createElement("li",{key:u.toString(),className:t.getClassName(i),onClickCapture:function(){return t.setCurrentRoute(i)}},a.a.createElement(v,{className:"sub-menu__link",to:i},r&&"string"==typeof r?a.a.createElement("i",{key:"icon",className:"".concat(s||t.props.defaultIconClassName," sub-menu__icon")},r):r,a.a.createElement("span",{key:"title",className:"sub-menu__title"},o)))}),I(N(N(t)),"_renderClassName",function(e){return"sub-menu ".concat(e?"":"display-none").trim()}),t}var t,r,o;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&R(e,n)}(n,i["PureComponent"]),t=n,(r=[{key:"render",value:function(){var e=this,n=this.props,t=n.opened,r=n.items;return a.a.createElement("ul",{className:this._renderClassName(t)},r.map(function(n,t){return e._renderItem({item:n,index:t})}))}}])&&S(t.prototype,r),o&&S(t,o),n}();I(T,"propTypes",{items:o.a.array.isRequired,setPathname:o.a.func,opened:o.a.bool,path:o.a.string,defaultIconClassName:o.a.string}),I(T,"defaultProps",{opened:!0,path:null});var M=T;function U(e){return(U="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})(e)}function A(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,n){return(q=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var D=function(e){function n(){var e,t,r,o;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);for(var i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return r=this,o=(e=L(n)).call.apply(e,[this].concat(s)),t=!o||"object"!==U(o)&&"function"!=typeof o?z(r):o,B(z(z(t)),"state",{isVisible:!1}),B(z(z(t)),"expand",null),B(z(z(t)),"expandIcon",function(e){t.expand=e}),B(z(z(t)),"getClassName",function(e,n){return"menu-item ".concat(n===e?"menu-item--active":"").trim()}),B(z(z(t)),"_renderItem",function(){var e=t.props.item,n=e.icon,r=e.title,o=e.iconClassName;return[o||"string"==typeof n?a.a.createElement("i",{key:"icon",className:"".concat(o||t.props.defaultIconClassName," menu-item__icon")},n):n,a.a.createElement("span",{key:"title",className:"menu-item__title"},r)]}),B(z(z(t)),"toggleSubMenus",function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!t.state.isVisible;t.setState({isVisible:n})}),B(z(z(t)),"setCurrentRoute",function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.props.item.to;t.props.onChangePathname(t.props.item.index,n)}),t}var t,r,o;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&q(e,n)}(n,i["Component"]),t=n,(r=[{key:"componentDidUpdate",value:function(e){var n=e.currentRoute.path;!n&&this.props.subItems.length>0&&this.props.currentRoute.path&&n!==this.props.currentRoute.path&&this.toggleSubMenus(null,this.props.currentRoute.index===this.props.item.index)}},{key:"render",value:function(){var e=this.props,n=e.item.to,t=e.isCollapsible,r=e.subItems,o=e.currentRoute.path,i=e.defaultIconClassName,s=this.state.isVisible;return a.a.createElement("li",{className:this.getClassName(n,o),onClickCapture:n?this.setCurrentRoute:null},n?a.a.createElement(v,{className:"menu-item__link",to:n},this._renderItem()):a.a.createElement("div",{className:"menu-item__container ".concat(t?"menu-item--collapsible":"").trim(),onClick:t?this.toggleSubMenus:null},this._renderItem(),t&&a.a.createElement("i",{ref:this.expandIcon,className:"material-icons menu-item__expand-icon ".concat(s?"rotate-down":"").trim()},"expand_more")),r.length>0&&a.a.createElement(M,{items:r,opened:!t||s,path:o,setPathname:this.setCurrentRoute,defaultIconClassName:i}))}}])&&A(t.prototype,r),o&&A(t,o),n}();function H(e){return(H="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})(e)}function V(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function K(e,n){return(K=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function $(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}B(D,"propTypes",{item:o.a.object.isRequired,subItems:o.a.array,isCollapsible:o.a.bool,onChangePathname:o.a.func.isRequired,defaultIconClassName:o.a.string.isRequired,currentRoute:o.a.object}),B(D,"defaultProps",{subItems:[],isCollapsible:!1});var J=function(e){function n(){var e,t,r,o;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=this,o=(e=F(n)).call.apply(e,[this].concat(a)),t=!o||"object"!==H(o)&&"function"!=typeof o?$(r):o,G($($(t)),"getClassName",function(){return"material-icons nav-container__expand-icon ".concat(t.props.expanded?"rotate-down":"").trim()}),G($($(t)),"handleClick",function(){t.props.onExpand()}),t}var t,r,o;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&K(e,n)}(n,i["Component"]),t=n,(r=[{key:"render",value:function(){return a.a.createElement("div",{className:"nav-container__footer",onClick:this.handleClick},a.a.createElement("i",{className:this.getClassName()},"chevron_left"))}}])&&V(t.prototype,r),o&&V(t,o),n}();G(J,"propTypes",{expanded:o.a.bool.isRequired,onExpand:o.a.func.isRequired});var Y=J;function W(e){return(W="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})(e)}function Q(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function X(e){return(X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Z(e,n){return(Z=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ne(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var te=function(e){function n(){var e,t,r,o;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=this,o=(e=X(n)).call.apply(e,[this].concat(a)),t=!o||"object"!==W(o)&&"function"!=typeof o?ee(r):o,ne(ee(ee(t)),"state",{expanded:!1,currentRoute:{index:0,path:null}}),ne(ee(ee(t)),"menuRef",null),ne(ee(ee(t)),"setMenuRef",function(e){t.menuRef=e}),ne(ee(ee(t)),"getClassName",function(e,n){var r="nav-container";return n?r+=t.state.expanded?" nav-container--expanded":e?"":" nav-container--closed":(e||(r+=" nav-container--closed"),r)}),ne(ee(ee(t)),"onExpand",function(){t.setState(function(e){return{expanded:!e.expanded}})}),ne(ee(ee(t)),"onChangePathname",function(e,n){t.setState({currentRoute:{index:e,path:n}})}),t}var t,r,o;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Z(e,n)}(n,i["PureComponent"]),t=n,o=[{key:"getDerivedStateFromProps",value:function(e,n){var t=e.isExpandable,r=n.expanded;return!t&&r?{expanded:!1}:null}}],(r=[{key:"componentDidMount",value:function(){var e={index:0,path:"/"},n=window.location.pathname;this.props.items.forEach(function(t,r){t.to&&-1!==n.indexOf(t.to)?e={index:r,path:t.to}:t.subItems&&t.subItems.forEach(function(t){-1===n.indexOf(t.to)||(e={index:r,path:t.to})})}),this.setState({currentRoute:e})}},{key:"render",value:function(){var e=this,n=this.props,t=n.items,r=n.isOpen,o=n.isExpandable,i=n.header,s=n.defaultIconClassName,u=this.state.expanded;return[a.a.createElement("nav",{key:"nav-container",className:this.getClassName(r,o)},i,a.a.createElement("ul",{className:"side-menu",ref:this.setMenuRef},t.map(function(n,t){var r=n.icon,o=n.title,i=n.subItems,u=n.isCollapsible,c=n.to,l=n.iconClassName;return a.a.createElement(D,{key:t.toString(),item:{icon:r,title:o,to:c,index:t,iconClassName:l},subItems:i,isCollapsible:u,onChangePathname:e.onChangePathname,currentRoute:e.state.currentRoute,defaultIconClassName:s})})),o&&a.a.createElement(Y,{onExpand:this.onExpand,expanded:u})),a.a.createElement("div",{key:"nav-container__separator",className:"nav-container__separator ".concat(u?"nav-container__separator--expanded":r?"":"nav-container__separator--hidden").trim()})]}}])&&Q(t.prototype,r),o&&Q(t,o),n}();ne(te,"propTypes",{isOpen:o.a.bool,items:o.a.array.isRequired,header:o.a.element,isExpandable:o.a.bool,defaultIconClassName:o.a.string}),ne(te,"defaultProps",{isOpen:!0,header:null,isExpandable:!1,defaultIconClassName:"material-icons"});var re=te;function oe(e){return(oe="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})(e)}function ie(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ae(e,n){return!n||"object"!==oe(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ue(e,n){return(ue=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function ce(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var le=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),ae(this,se(n).apply(this,arguments))}var t,r,o;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&ue(e,n)}(n,i["PureComponent"]),t=n,(r=[{key:"render",value:function(){var e=this.props,n=e.className,t=e.children;return a.a.createElement("div",{className:"container ".concat(n).trim()},t)}}])&&ie(t.prototype,r),o&&ie(t,o),n}();ce(le,"propTypes",{className:o.a.string,children:o.a.any}),ce(le,"defaultProps",{className:"",children:null});var fe=le;t(7);t.d(n,"Container",function(){return fe}),t.d(n,"Header",function(){return C}),t.d(n,"SideMenu",function(){return re})}]);