!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(e){return t[e]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s="/ODT")}({"/ODT":function(t,e,n){"use strict";function r(t,e){for(var n in e)t[n]=e[n];return t}function o(t){var e=t.parentNode;e&&e.removeChild(t)}function u(t,e,n){var r,o,u,l={};for(u in e)"key"==u?r=e[u]:"ref"==u?o=e[u]:l[u]=e[u];if(arguments.length>2&&(l.children=arguments.length>3?x.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(u in t.defaultProps)void 0===l[u]&&(l[u]=t.defaultProps[u]);return i(t,l,r,o,null)}function i(t,e,n,r,o){var u={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++P:o};return null==o&&null!=C.vnode&&C.vnode(u),u}function l(t){return t.children}function c(t,e){this.props=t,this.context=e}function a(t,e){if(null==e)return t.__?a(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?i(b.type,b.props,b.key,null,b.__v):b)){if(b.__=n,b.__b=n.__b+1,null===(v=S[p])||v&&b.key==v.key&&b.type===v.type)S[p]=void 0;else for(y=0;y=n.__.length&&n.__.push({}),n.__[t]}function o(t){return v=1,u(f,t)}function u(t,e,n){var o=r(p++,2);return o.t=t,o.__c||(o.__=[n?n(e):f(void 0,e),function(t){var e=o.t(o.__[0],t);o.__[0]!==e&&(o.__=[e,o.__[1]],o.__c.setState({}))}],o.__c=h),o.__}function i(t,e){var n=r(p++,3);!y.options.__s&&s(n.__H,e)&&(n.__=t,n.__H=e,h.__H.__h.push(n))}function l(t){var e=h.context[t.__c],n=r(p++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(h)),e.props.value):t.__}function c(){for(var t;t=b.shift();)if(t.__P)try{t.__H.__h.forEach(a),t.__H.__h.forEach(_),t.__H.__h=[]}catch(e){t.__H.__h=[],y.options.__e(e,t.__v)}}function a(t){var e=h,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),h=e}function _(t){var e=h;t.__c=t.__(),h=e}function s(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function f(t,e){return"function"==typeof e?e(t):e}n.d(e,"d",(function(){return o})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return l}));var p,h,d,y=n("hosL"),v=0,b=[],m=y.options.__b,g=y.options.__r,O=y.options.diffed,j=y.options.__c,k=y.options.unmount;y.options.__b=function(t){h=null,m&&m(t)},y.options.__r=function(t){g&&g(t),p=0;var e=(h=t.__c).__H;e&&(e.__h.forEach(a),e.__h.forEach(_),e.__h=[])},y.options.diffed=function(t){O&&O(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==b.push(e)&&d===y.options.requestAnimationFrame||((d=y.options.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),w&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);w&&(e=requestAnimationFrame(n))})(c)),h=null},y.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(a),t.__h=t.__h.filter((function(t){return!t.__||_(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],y.options.__e(n,t.__v)}})),j&&j(t,e)},y.options.unmount=function(t){k&&k(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{a(t)}catch(t){e=t}})),e&&y.options.__e(e,n.__v))};var w="function"==typeof requestAnimationFrame},QfWi:function(t,e,n){"use strict";function r(t,e){for(var n in e)t[n]=e[n];return t}function o(t,e,n){var r,o=/(?:\?([^#]*))?(#.*)?$/,u=t.match(o),i={};if(u&&u[1])for(var c=u[1].split("&"),a=0;ae.rank?-1:t.index-e.index}function i(t,e){return t.index=e,t.rank=function(t){return t.props.default?0:(e=t.props.path,l(e).map(c).join(""));var e}(t),t.props}function l(t){return t.replace(/(^\/+|\/+$)/g,"").split("/")}function c(t){return":"==t.charAt(0)?1+"*+?".indexOf(t.charAt(t.length-1))||4:5}function a(){var t;return""+((t=E&&E.location?E.location:E&&E.getCurrentLocation?E.getCurrentLocation():"undefined"!=typeof location?location:T).pathname||"")+(t.search||"")}function _(t,e){return void 0===e&&(e=!1),"string"!=typeof t&&t.url&&(e=t.replace,t=t.url),function(t){for(var e=U.length;e--;)if(U[e].canRoute(t))return!0;return!1}(t)&&function(t,e){void 0===e&&(e="push"),E&&E[e]?E[e](t):"undefined"!=typeof history&&history[e+"State"]&&history[e+"State"](null,null,t)}(t,e?"replace":"push"),s(t)}function s(t){for(var e=!1,n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0},e.prototype.routeTo=function(t){this.setState({url:t});var e=this.canRoute(t);return this.updating||this.forceUpdate(),e},e.prototype.componentWillMount=function(){U.push(this),this.updating=!0},e.prototype.componentDidMount=function(){var t=this;E&&(this.unlisten=E.listen((function(e){t.routeTo(""+(e.pathname||"")+(e.search||""))}))),this.updating=!1},e.prototype.componentWillUnmount=function(){"function"==typeof this.unlisten&&this.unlisten(),U.splice(U.indexOf(this),1)},e.prototype.componentWillUpdate=function(){this.updating=!0},e.prototype.componentDidUpdate=function(){this.updating=!1},e.prototype.getMatchingChildren=function(t,e,n){return t.filter(i).sort(u).map((function(t){var u=o(e,t.props.path,t.props);if(u){if(!1!==n){var i={url:e,matches:u};return r(i,u),delete i.ref,delete i.key,Object(C.cloneElement)(t,i)}return t}})).filter(Boolean)},e.prototype.render=function(t,e){var n=t.children,r=t.onChange,o=e.url,u=this.getMatchingChildren(Object(C.toChildArray)(n),o,!0),i=u[0]||null,l=this.previousUrl;return o!==l&&(this.previousUrl=o,"function"==typeof r&&r({router:this,url:o,previous:l,active:u,current:i})),i},e}(C.Component),R=function(t){return Object(C.createElement)("a",r({onClick:p},t))};I.subscribers=D,I.getCurrentUrl=a,I.route=_,I.Router=I,I.Route=function(t){return Object(C.createElement)(t.component,t)},I.Link=R,I.exec=o;var N=function(t,e){switch(e){case"show":return!0;case"hide":return!1;case"toggle":return!t;default:throw new Error("menustate unknown to reducer")}},M=function(t,e){switch(e.type){case"start":return{active:!0,token:e.token,username:e.username};case"end":return{active:!1,token:null,username:null,exiry:null};default:throw new Error("action type unknown to session reducer")}},H=n("QRet"),W=function(){return Object(C.h)("div",{class:"container"},Object(C.h)("h1",null,"Home"),Object(C.h)("p",null,"This is the Home component."))},F=n("L7jf"),B=function(t){var e=t.user,n=y(Object(H.d)(Date.now()),2),r=n[0],o=n[1],u=y(Object(H.d)(10),2),i=u[0],l=u[1];return Object(H.b)((function(){var t=setInterval((function(){return o(Date.now())}),1e3);return function(){return clearInterval(t)}}),[]),Object(C.h)("div",{className:"container"},Object(C.h)("div",null,Object(C.h)("h1",null,"Profile: ",e),Object(C.h)("p",null,"This is the user profile for a user named ",e,"."),Object(C.h)("div",null,"Current time: ",new Date(r).toLocaleString()),Object(C.h)("p",null,Object(C.h)("button",{onClick:function(){return l((function(t){return t+1}))}},"Click Me")," ","Clicked ",i," times.")))},$=n("YRIq"),q=function(t){if(t.items)return Object(C.h)("div",{class:"breadcrumb"},Object(C.h)("ul",null,t.items.map((function(t,e){return Object(C.h)("li",{key:e},Object(C.h)("a",{href:"#"},t)," ")}))))},z=function(){var t=O(Object(H.a)($.b).session,2),e=t[0],n=t[1],r=O(Object(H.d)({username:"",password:"",error:null}),2),o=r[0],u=r[1];return e.active&&_("/",!0),Object(C.h)("div",{class:"container"},Object(C.h)(q,{items:["Login"]}),Object(C.h)("form",{id:"login_form",onSubmit:function(t){if(t.preventDefault(),"admin"===o.username){n({type:"start",username:"affe",token:"dsf4w3qr"})}else u(m(m({},o),{},{error:"user"}));u({username:"",password:""})}},Object(C.h)("p",null,"Bitte melden Sie sich mit ihren Nutzerdaten an."),null!==o.error&&Object(C.h)("span",{style:"color: red"},"Fehler: Ungültige Anmeldedaten."),Object(C.h)("div",{class:"input-box"},Object(C.h)("input",{id:"name",type:"text",placeholder:"Username",onInput:function(t){return u(m(m({},o),{},{username:t.target.value}))},value:o.username}),Object(C.h)("label",{for:"name"},"Benutzername")),Object(C.h)("div",{class:"input-box"},Object(C.h)("input",{id:"pass",type:"password",placeholder:"Passwort",onInput:function(t){return u(m(m({},o),{},{password:t.target.value}))},value:o.password}),Object(C.h)("label",{for:"pass"},"Password")),Object(C.h)("input",{type:"submit",value:"Submit"})))},K=function(){var t=k(Object(H.a)($.b).session,2),e=t[0],n=t[1];return this.shouldComponentUpdate=function(){console.log("functional component vs closures")},e.active&&n({type:"end"}),Object(C.h)("div",{class:"container"},Object(C.h)(q,{items:["Logout"]}),Object(C.h)("p",null,"Erfolgreich abgemeldet.",Object(C.h)(R,{href:"/login"},"Erneut Anmelden")))},Q=function(){var t=Object(H.c)(N,!1),e=Object(H.c)(M,{active:!0});return Object(H.b)((function(){console.log("Use Session")})),this.menu_items=[{text:"Übersicht",path:"/"},{text:"Benutzer",path:"/users"},{text:"System",path:"/system"},{text:"Profil",path:"/profile"},{text:"Abmelden",path:"/logout"}],this.handleRoute=function(){var t,n=(t=function*(){e[0].active||_("/login",!0)},function(){var e=this,n=arguments;return new Promise((function(r,o){function u(t){S(l,r,o,u,i,"next",t)}function i(t){S(l,r,o,u,i,"throw",t)}var l=t.apply(e,n);u(void 0)}))});return function(t){return n.apply(this,arguments)}}(),Object(C.h)($.a,{value:{menu:t,session:e}},Object(C.h)("div",{id:"wrapper"},Object(C.h)(V.a,null),Object(C.h)("div",{class:"page"},Object(C.h)(G,{items:this.menu_items}),!t[0]&&Object(C.h)(I,{onChange:this.handleRoute},Object(C.h)(W,{path:"/",user:"me"}),Object(C.h)(z,{path:"login"}),Object(C.h)(B,{path:"/profile"}),Object(C.h)(K,{path:"/logout"}),Object(C.h)(F.a,{path:"/users"}),Object(C.h)("div",{class:"container",default:!0},"Error 404"))),Object(C.h)("footer",null,Object(C.h)("div",{className:"container",style:"text-align: center; align-items: center"},Object(C.h)("span",null,"© Jean Jacques Avril 2022 ")))))},V=(n("ab6c"),n("z8Av")),G=(n("hNgA"),function(t){var e=t.items,n=A(Object(H.a)($.b).menu,2),r=n[1],o=[{text:"Übersicht",path:"/"},{text:"Benutzer",path:"/users"},{text:"System",path:"/system"},{text:"Backup",path:"/backup"},{text:"Abmelden",path:"/logout"}],u=function(t){t.preventDefault(),r("hide")};if(e&&(o=e),n[0])return Object(C.h)("div",{class:"container"},Object(C.h)("nav",{className:"menu"},Object(C.h)("ul",null,o.map((function(t,e){return Object(C.h)("li",{key:e},Object(C.h)(R,{href:t.path,onClick:u},t.text))})))))}),J=Q;Object(C.render)(Object(C.h)(J,null),document.body)},YRIq:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n("hosL"),o=Object(r.createContext)({}),u=o.Provider;e.b=o},ab6c:function(t,e,n){"use strict";function r(){return r=Object.assign||function(t){for(var e=1;e"))),Object(o.h)("div",{class:"page-nav-bar"},Object(o.h)("ul",null,e))}},hNgA:function(t,e,n){"use strict";(function(t,r){function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function u(t,e){for(var n=0;n2&&(l.children=arguments.length>3?D.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(u in t.defaultProps)void 0===l[u]&&(l[u]=t.defaultProps[u]);return i(t,l,r,o,null)}function i(t,e,n,r,o){var u={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++L:o};return null==o&&null!=T.vnode&&T.vnode(u),u}function l(){return{current:null}}function c(t){return t.children}function a(t,e){this.props=t,this.context=e}function _(t,e){if(null==e)return t.__?_(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?i(b.type,b.props,b.key,null,b.__v):b)){if(b.__=n,b.__b=n.__b+1,null===(y=k[p])||y&&b.key==y.key&&b.type===y.type)k[p]=void 0;else for(h=0;h2&&(c.children=arguments.length>3?D.call(arguments,2):n),i(t.type,c,o||t.key,u||t.ref,null)}function U(t,e){var n={__c:e="__cC"+H++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(f)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}n.r(e),n.d(e,"render",(function(){return C})),n.d(e,"hydrate",(function(){return P})),n.d(e,"createElement",(function(){return u})),n.d(e,"h",(function(){return u})),n.d(e,"Fragment",(function(){return c})),n.d(e,"createRef",(function(){return l})),n.d(e,"isValidElement",(function(){return I})),n.d(e,"Component",(function(){return a})),n.d(e,"cloneElement",(function(){return E})),n.d(e,"createContext",(function(){return U})),n.d(e,"toChildArray",(function(){return y})),n.d(e,"options",(function(){return T}));var D,T,L,I,R,N,M,H,W={},F=[],B=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;D=F.slice,T={__e:function(t,e){for(var n,r,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(t)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(t),o=n.__d),o)return n.__E=n}catch(e){t=e}throw t}},L=0,I=function(t){return null!=t&&void 0===t.constructor},a.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=r({},this.state),"function"==typeof t&&(t=t(r({},n),this.props)),t&&r(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),f(this))},a.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),f(this))},a.prototype.render=c,R=[],N="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,p.__r=0,H=0},z8Av:function(t,e,n){"use strict";(function(t){function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,u=[],i=!0,l=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(u.push(r.value),!e||u.length!==e);i=!0);}catch(t){l=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return u}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n