2018-09-18 19:37:44 +02:00

1 line
93 KiB
JavaScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag",u="object"==typeof module,l=t.regeneratorRuntime;if(l)u&&(module.exports=l);else{(l=t.regeneratorRuntime=u?module.exports:{}).wrap=k;var c="suspendedStart",h="suspendedYield",f="executing",d="completed",v={},p={};p[o]=function(){return this};var y=Object.getPrototypeOf,g=y&&y(y(S([])));g&&g!==n&&r.call(g,o)&&(p=g);var m=O.prototype=_.prototype=Object.create(p);b.prototype=m.constructor=O,O.constructor=b,O[a]=b.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(m),t},l.awrap=function(t){return{__await:t}},L(P.prototype),P.prototype[s]=function(){return this},l.AsyncIterator=P,l.async=function(t,e,n,r){var i=new P(k(t,e,n,r));return l.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},L(m),m[a]="Generator",m[o]=function(){return this},m.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=S,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return a.type="throw",a.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=r.call(s,"catchLoc"),l=r.call(s,"finallyLoc");if(u&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:S(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}}}function k(t,e,n,r){var i=e&&e.prototype instanceof _?e:_,o=Object.create(i.prototype),s=new C(r||[]);return o._invoke=function(t,e,n){var r=c;return function(i,o){if(r===f)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return T()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=x(s,n);if(a){if(a===v)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===c)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var u=w(t,e,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,s),o}function w(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function b(){}function O(){}function L(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function P(t){var e;this._invoke=function(n,i){function o(){return new Promise(function(e,o){!function e(n,i,o,s){var a=w(t[n],t,i);if("throw"!==a.type){var u=a.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,o,s)},function(t){e("throw",t,o,s)}):Promise.resolve(l).then(function(t){u.value=t,o(u)},function(t){return e("throw",t,o,s)})}s(a.arg)}(n,i,e,o)})}return e=e?e.then(o,o):o()}}function x(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=w(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function S(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return s.next=s}}return{next:T}}function T(){return{value:e,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")());var t="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},e=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function r(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,o){try{var s=e[i](o),a=s.value}catch(t){return void n(t)}if(!s.done)return Promise.resolve(a).then(function(t){r("next",t)},function(t){r("throw",t)});t(a)}("next")})}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(){s(this,t)}return n(t,null,[{key:"t",value:function(e){t.s=e}},{key:"i",value:function(){return t.s}}]),t}();a.t("/");var u=function(){function t(e,n,r,i){s(this,t),this.title=v.o(e,null),this.l=n,this.u=v.o(r,t.h),this.order=v.o(i,1e3),this.m=null,this.g=!0,this.p=!0,this.id=t.S++,this.M=null,this.H=!0,this.v=[]}return n(t,[{key:"T",value:function(t){this.title=t}},{key:"P",value:function(t){this.H=t}},{key:"L",value:function(){return this.u}},{key:"A",value:function(){return this.title}},{key:"C",value:function(){return this.H}},{key:"remove",value:function(t){if(t=v.o(t,!1),v.F(this.m)&&(console.log(this.m),this.m.D(this),this.m=null),t)for(var e=0;e<this.v.length;e++)this.v[e].remove()}},{key:"R",value:function(){return this.m}},{key:"B",value:function(t){this.m=t}},{key:"k",value:function(){return this.p}},{key:"I",value:function(t){t!==this.p&&(this.p=t,this.U())}},{key:"O",value:function(){return this.g}},{key:"W",value:function(){return this.M}},{key:"N",value:function(t){this.M=t}},{key:"_",value:function(){return this.id}},{key:"U",value:function(){v.F(this.m)&&this.m.j(this)}},{key:"V",value:function(e){var n=v.o(e,new t);return n.title=this.title,n.l=this.l,n.u=this.u,n.order=this.order,n.g=this.g,n.p=this.p,n.M=this.M,n.H=this.H,n.m=null,n.id=t.S++,this.v.push(n),n}},{key:"J",value:function(){v.F(this.m)&&this.m.U()}}]),t}();u.S=0,u.q="always",u.h="medium",u.K="large",u.X="never";var l=function(){function t(e,n,r,o){var a;return s(this,t),(a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,function(t){t.$().toggle(),t.U()},r,o))).G=n,n.Y(a),a}return o(t,u),n(t,[{key:"$",value:function(){return this.G}},{key:"V",value:function(n){return e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"V",this).call(this,v.o(n,new t(null,this.G.V())))}}]),t}(),c=function(){function t(e){s(this,t),this.Z=[],this.tt=[],"string"==typeof e?this.et=document.querySelectorAll(e):Array.isArray(e)?this.et=e:this.et=[e]}return n(t,[{key:"V",value:function(e){(e=v.o(e,new t([]))).Z=[];for(var n=0,r=this.Z.length;n<r;n++)e.Z.push(this.Z[n].V());e.tt=[];for(var i=0,o=this.tt.length;i<o;i++)e.tt.push(this.tt[i].V());return e}},{key:"nt",value:function(t){v.st(this.Z,t)&&(this.Z.push(t),this.U(),t.B(this),t instanceof l&&this.tt.push(t.$()))}},{key:"rt",value:function(){if(v.F(this.et)){this.it();for(var t=[],e=0;e<this.Z.length;e++){var n=this.ot(this.Z[e]);this.Z[e].at=n,t.push(n)}for(var r=0,i=this.et.length;r<i;r++){this.et[r].removeAllChildren();for(var o=0,s=t.length;o<s;o++)this.et[r].appendChild(v.cloneNode(t[o]));this.et[r].onclick=this.lt()}}}},{key:"lt",value:function(){var t=this;return function(e){var n=e.target;if(n.matches(".action")||n.matches(".action *")){n=n.closest(".action");for(var r=parseInt(n.dataset.id),i=0,o=t.Z.length;i<o;i++)if(t.Z[i].id===r)return"function"==typeof t.Z[i].l&&t.Z[i].O()&&t.Z[i].l(t.Z[i],e),t.Z[i];for(var s=0,a=t.tt.length;s<a;s++)if(t.tt[s].click(r,e))return t.tt[s]}return null}}},{key:"ot",value:function(t){var e=document.createElement("a");if("string"==typeof t.l&&(e.href=t.l),v.F(t.W())){var n=document.createElement("img");n.src=t.W(),n.classList.add("action-image"),t.C()&&(n.dataset.translationTitle=t.title),e.appendChild(n)}var r=t.A();return r=t.C()?d.ut(r):document.createTextNode(r),e.appendChild(r),this.ht(e,t)}},{key:"ht",value:function(t,e){var n=document.createElement("li");return n.classList.add("action"),n.appendChild(t),n.dataset.id=e.id,v.F(e.W())&&n.classList.add("img"),e.k()||n.classList.add("hidden"),e instanceof l&&(e.$().rt(),n.appendChild(e.$().ct()),n.classList.add("is-dropdown-submenu-parent"),n.classList.add("opens-right")),n}},{key:"it",value:function(){this.Z=this.Z.sort(function(t,e){return t.order-e.order})}},{key:"dt",value:function(t){for(var e=[],n=0;n<this.et.length;n++){var r=this.et[n].querySelector('[data-id="'+t._()+'"]');v.gt(r)||e.push(r)}return e}},{key:"j",value:function(t){console.log("update action here!");var e=this.dt(t);if(0!==e.length){var n=this.ot(t);t.at=n;for(var r=0;r<e.length;r++)e[r].replaceWith(v.cloneNode(n))}}},{key:"D",value:function(t){var e=this.Z.indexOf(t);if(e>0){this.Z.splice(e,1);for(var n=this.dt(t),r=0,i=n.length;r<i;r++)n[r].remove();if(t instanceof l){var o=this.tt.indexOf(t.$());this.tt.splice(o,1)}}}},{key:"U",value:function(){this.rt()}}]),t}();c.q="always",c.h="medium",c.pt="smedium",c.K="large",c.X="never";var h=function(){function t(){var e;s(this,t);var n=document.createElement("ul");return n.classList.add("menu"),n.classList.add("vertical"),n.classList.add("submenu"),n.classList.add("is-dropdown-submenu"),n.classList.add("first-sub"),(e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n))).ft=null,e.isOpen=!1,e}return o(t,c),n(t,[{key:"V",value:function(n){(n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"V",this).call(this,v.o(n,new t))).et=[];for(var r=0,i=this.et.length;r<i;r++)n.et.push(v.cloneNode(this.et[r]));return n.ft=this.ft,n.isOpen=this.isOpen,n}},{key:"Y",value:function(t){this.ft=t}},{key:"rt",value:function(){var n=this;e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"rt",this).call(this),v.F(this.et)&&function(){for(var t=n,e=0;e<n.et.length;e++){var r=document.createElement("div");r.classList.add("close-listener"),r.onclick=function(e){console.log(e),t.close()},n.et[e].insertBefore(r,n.et[e].firstElementChild)}}()}},{key:"ct",value:function(){return this.et[0]}},{key:"lt",value:function(){return function(){}}},{key:"click",value:function(t,e){for(var n=0,r=this.Z.length;n<r;n++)if(this.Z[n].id===t)return"function"==typeof this.Z[n].l&&this.Z[n].O()&&this.Z[n].l(this.Z[n],e),this.close(),!0;return!1}},{key:"toggle",value:function(){this.isOpen?this.close():this.open()}},{key:"open",value:function(){this.isOpen=!0;for(var t=0,e=this.et.length;t<e;t++)this.et[t].classList.add("js-dropdown-active");v.F(this.ft)&&this.ft.U()}},{key:"close",value:function(){this.isOpen=!1;for(var t=0,e=this.et.length;t<e;t++)this.et[t].classList.remove("js-dropdown-active");v.F(this.ft)&&this.ft.U()}}]),t}(),f=function(){function t(){s(this,t),this.wt=indexedDB||mozIndexedDB||webkitIndexedDB||msIndexedDB,this.St=3;var e=this;this.Mt=new Promise(function(t,n){var r=e.wt.open("Translator",e.St);r.onupgradeneeded=function(t){var n=t.target.result;e.Ht(n)},r.onsuccess=function(e){var n=e.target.result;t(n)},r.onerror=function(t){n(t)}}).catch(function(t){console.error(t)})}return n(t,[{key:"Ht",value:function(t){try{t.deleteObjectStore("currentLang"),t.deleteObjectStore("translations")}catch(t){console.warn(t)}t.createObjectStore("currentLang",{keyPath:"id"}),t.createObjectStore("translations",{keyPath:["lang","key"]}).createIndex("lang","lang",{unique:!1})}},{key:"setLanguage",value:function(e){this.Mt.then(function(n){t.vt(["currentLang"],"readwrite",n).objectStore("currentLang").put({id:1,lang:e})}).catch(function(t){console.error(t)})}},{key:"yt",value:function(e,n){return this.Mt.then(function(r){return new Promise(function(i){var o=t.vt(["translations"],"readwrite",r),s=o.objectStore("translations");for(var a in n)s.put({lang:e,key:a,translation:n[a]});o.oncomplete=function(){i()}})}).catch(function(){})}},{key:"Tt",value:function(e){return this.Mt.then(function(n){return new Promise(function(r){var i=t.vt(["translations"],"readonly",n),o={};i.objectStore("translations").index("lang").openCursor(IDBKeyRange.only(e)).onsuccess=function(t){var e=t.target.result;if(e){var n=e.value;o[n.key]=n.translation,e.continue()}},i.oncomplete=function(){r(o)}})}).catch(function(t){return console.error(t),{}})}},{key:"Pt",value:function(){return this.Mt.then(function(e){return new Promise(function(n){var r=t.vt(["currentLang"],"readonly",e).objectStore("currentLang").get(1);r.onsuccess=function(t){var e=t.currentTarget.result;n(e?e.lang:null)},r.onerror=function(){n(null)}})}).catch(function(){})}}],[{key:"vt",value:function(t,e,n){var r=null;try{r=n.transaction(t,e)}catch(e){console.warn(e),r=n.transaction(t)}return r}}]),t}(),d=function(){function e(){s(this,e),this.bt=[],this.Lt=new f,this.At=null,this.Ct=e.Ft,this.xt=e.Dt,this.Rt=e.Bt,this.kt=e.It,this.Ut=e.Et;var t=this;this.Ot=this.Wt().then(function(){return t.Nt()})}return n(e,[{key:"_t",value:function(t){var e=this;return fetch(v.jt(this.Rt+t+".json")).then(function(t){return t.json()}).then(function(n){e.bt[t]=Object.assign(n,e.bt[t]),e.Lt.yt(t,e.bt[t])}).catch(function(e){console.error("could not load lang "+t+" because of error: ",e)})}},{key:"Wt",value:function(){var t=this;return this._t(this.xt).then(function(){t.At=t.xt,"undefined"!=typeof document&&document.getElementsByTagName("html")[0].setAttribute("lang",t.xt)})}},{key:"setLanguage",value:function(t){if(this.At===t)return this.Jt(),Promise.resolve();if(-1===this.Ct.indexOf(t))return Promise.resolve();this.At=t,"undefined"!=typeof localStorage&&localStorage.setItem("language",t),this.Lt.setLanguage(t);var e=this;return this._t(t).then(function(){"undefined"!=typeof document&&document.getElementsByTagName("html")[0].setAttribute("lang",t),e.Jt()})}},{key:"translate",value:function(n,r){"object"==(void 0===n?"undefined":t(n))&&v.F(n)&&(n=this.zt(n));var i=null;return v.F(this.bt[this.At])&&v.F(this.bt[this.At][n])&&(i=this.bt[this.At][n]),v.gt(i)&&(e.qt&&console.warn("missing translation for language "+this.At+" and key "+n),v.F(this.bt[this.xt])&&(i=this.bt[this.xt][n]),v.gt(i)&&(e.qt&&console.error("missing base translation for key "+n+". FIX IT"),i=n),this.kt&&(i="&gt;&gt;"+i+"&lt;&lt;")),this.Ut&&(i="$"+i+"$"),void 0!==r&&(i=i.format(r)),i}},{key:"zt",value:function(t){var e=t.key;for(var n in delete t.key,t)t.hasOwnProperty(n)&&(v.gt(this.bt[n])&&(this.bt[n]={}),this.bt[n][e]=t[n]);return e}},{key:"Jt",value:function(){if("undefined"!=typeof document)for(var t=document.querySelectorAll("[data-translation]"),e=0,n=t.length;e<n;e++){if(""!=t[e].dataset.translation)try{t[e].innerHTML=this.translate(t[e].dataset.translation,void 0!==t[e].dataset.translationArgs?JSON.parse(t[e].dataset.translationArgs):void 0)}catch(t){console.error("wrong configured translation: "+t)}for(var r in t[e].dataset)if(r.startsWith("translation")&&!r.endsWith("Args"))try{t[e][r.substr(11).toLowerCase()]=this.translate(t[e].dataset[r],void 0!==t[e].dataset[r+"Args"]?JSON.parse(t[e].dataset[r+"Args"]):void 0)}catch(t){console.error("wrong configured translation: "+t)}}}},{key:"Nt",value:function(){var t=localStorage.getItem("language");if(v.gt(t)||-1===this.Ct.indexOf(t)){var e=[];if(v.F(navigator.languages)&&(e=navigator.languages.slice(0)),void 0!==navigator.language&&e.push(navigator.language),e.push(this.xt),void 0!==e)for(var n=0,r=e.length;n<r;n++)if(-1!==this.Ct.indexOf(e[n])){t=e[n];break}}return this.setLanguage(t.toLowerCase())}}],[{key:"setLanguage",value:function(t){var n=e.Vt();if(n)return n.setLanguage(t)}},{key:"translate",value:function(t,n){var r=e.Vt();return r?r.translate(t,n):""}},{key:"zt",value:function(t){var n=e.Vt();if(n)return n.zt(t)}},{key:"ut",value:function(n,r,i){if(i=v.o(i,"span"),"object"==(void 0===n?"undefined":t(n))&&(n=e.zt(n)),"undefined"!=typeof document){var o=document.createElement(i);return o.dataset.translation=n,void 0!==r&&(o.dataset.translationArgs=JSON.stringify(r)),o.innerHTML=e.translate(n,r),o}}},{key:"Kt",value:function(){var t=new h;return t.nt(new u("en",function(){e.Vt().setLanguage("en")})),t.nt(new u("de",function(){e.Vt().setLanguage("de")})),new l("current-lang",t,c.q)}},{key:"init",value:function(){e.Xt=new e}},{key:"Vt",value:function(){return e.Xt}}]),e}();d.qt=!1,d.Xt=null,d.Dt="en",d.Ft=["de","en"],d.It=!0,d.Et=!1,d.Bt="js/lang/",d.$t=null,d.Gt={};var v=function(){function e(){s(this,e)}return n(e,null,[{key:"init",value:function(){e.Qt=null,e.Yt=null}},{key:"st",value:function(t,e,n){return-1===t.indexOf(e,n)}},{key:"includes",value:function(t,n,r){return!e.st(t,n,r)}},{key:"Zt",value:function(){if(arguments.length>0){var t=arguments[0],n=Array.prototype.slice.call(arguments,1);return e.F(t)&&(0===n.length||e.Zt.apply(null,[t[n[0]]].concat(n.slice(1))))}return!1}},{key:"gt",value:function(t){return null===t||void 0===t}},{key:"F",value:function(t){return!e.gt(t)}},{key:"o",value:function(t,n){return e.F(t)?t:n}},{key:"te",value:function(t){return!e.empty(t)}},{key:"ee",value:function(t){var e=[];for(var n in t)e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return"?"+e.join("&")}},{key:"empty",value:function(t){return e.gt(t)||"string"==typeof t&&""===t.trim()}},{key:"ne",value:function(t){var e=document.createElement("template");return e.innerHTML=t,e.content.childNodes}},{key:"se",value:function(){var t="http://www.w3.org/2000/svg",e=document.createElement("div");e.className="loader";var n=document.createElementNS(t,"svg");n.setAttribute("viewBox","0 0 32 32"),n.setAttribute("widh","32"),n.setAttribute("height","32");var r=document.createElementNS(t,"circle");return r.setAttribute("id","spinner"),r.setAttribute("cx","16"),r.setAttribute("cy","16"),r.setAttribute("r","14"),r.setAttribute("fill","none"),n.appendChild(r),e.appendChild(n),e}},{key:"jt",value:function(t){return a.i()+t}},{key:"re",value:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)}},{key:"ie",value:function(){return null!==navigator.userAgent.match(/Android|BlackBerry|Opera Mini|IEMobile/i)||e.re()||void 0!==window.orientation||!1===window.orientation||null===window.orientation}},{key:"select",value:function(t){var e=document.createRange();e.selectNodeContents(t);var n=window.getSelection();n.removeAllRanges(),n.addRange(e)}},{key:"format",value:function(t,e){for(t=""+t;t.length<e;)t="0"+t;return t}},{key:"cloneNode",value:function(t){var e=t.cloneNode(!0);return e.onclick=t.onclick,e}},{key:"oe",value:function(t,e){for(var n="",r=Math.floor(Math.log(265)/Math.log(e)),i=0;i<t.length;i++){var o=t.charCodeAt(i).toString(e),s=o.length%r;s>0&&(o=new Array(r+1-s).join("0")+o),n+=o}return n}},{key:"ae",value:function(t,e){for(var n=Math.floor(Math.log(265)/Math.log(e)),r=t.match(new RegExp(".{1,"+n+"}","g"))||[],i="",o=0,s=r.length;o<s;o++)i+=String.fromCharCode(parseInt(r[o],e));return i}},{key:"le",value:function(t){return"none"===t.style.display?(t.style.display="",!0):(t.style.display="none",!1)}},{key:"print",value:function(t){var e=document.getElementById("print-content");t instanceof Element?(e.removeAllChildren(),e.appendChild(t)):e.innerHTML=t,window.print()}},{key:"ue",value:function(t,n,r){n instanceof Date||(n=new Date(n));var i=(r=e.o(r,!1))?n.getUTCDay():n.getDay(),o=r?n.getUTCDate():n.getDate(),s=r?n.getUTCMonth():n.getMonth(),a=r?n.getUTCFullYear():n.getFullYear(),u=r?n.getUTCHours():n.getHours(),l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"],h=[0,31,59,90,120,151,181,212,243,273,304,334],f=function(){var t=new Date(n);return t.setDate(o-(i+6)%7+3),t},v=function(t,e){return(""+(Math.pow(10,e)+t)).slice(1)};return t.replace(/%[a-z]/gi,function(t){return{"%a":d.ut(l[i].slice(0,3)).outerHTML,"%A":d.ut(l[i]).outerHTML,"%b":d.ut(c[s].slice(0,3)).outerHTML,"%B":d.ut(c[s]).outerHTML,"%c":n.toUTCString(),"%C":Math.floor(a/100),"%d":v(o,2),"%e":o,"%f":v(n.getTime()%1e3,4),"%F":n.toISOString().slice(0,10),"%G":f().getFullYear(),"%g":(""+f().getFullYear()).slice(2),"%H":v(u,2),"%I":v((u+11)%12+1,2),"%j":v(h[s]+o+(s>1&&0==(3&a)&&(a%100!=0||a%400==0)?1:0),3),"%k":""+u,"%l":(u+11)%12+1,"%m":v(s+1,2),"%M":v(n.getMinutes(),2),"%p":u<12?"AM":"PM","%P":u<12?"am":"pm","%s":Math.round(n.getTime()/1e3),"%S":v(n.getSeconds(),2),"%u":i||7,"%V":function(){var t=f(),e=t.valueOf();t.setMonth(0,1);var n=t.getDay();return 4!==n&&t.setMonth(0,1+(4-n+7)%7),v(1+Math.ceil((e-t)/6048e5),2)}(),"%w":""+i,"%x":n.toLocaleDateString(),"%X":n.toLocaleTimeString(),"%y":(""+a).slice(2),"%Y":a,"%z":n.toTimeString().replace(/.+GMT([+-]\d+).+/,"$1"),"%Z":n.toTimeString().replace(/.+\((.+?)\)$/,"$1")}[t]||t})}},{key:"he",value:function(n){var r=void 0;if(e.gt(n)||"object"!=(void 0===n?"undefined":t(n)))return n;if(n instanceof Array){var i=[];for(r=0;r<n.length;++r)i[r]=e.he(n[r]);return i}if(n instanceof Date)return new Date(n.getTime());var o={};for(r in n)o[r]=e.he(n[r]);return o}},{key:"ce",value:function(t){var n={"&amp;":"&","&#038;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#039;":"'","&#8217;":"","&#8216;":"","&#8211;":"","&#8212;":"—","&#8230;":"…","&#8221;":"”"};return e.F(t)&&"function"==typeof t.replace?t.replace(/\&[\w\d\#]{2,5}\;/g,function(t){return n[t]}):t}},{key:"de",value:function(t){var e=new FormData;for(var n in t)e.set(n,t[n]);return e}},{key:"me",value:function(t,n){var r=window.getComputedStyle(t),i=window.getComputedStyle(n);if(i.height>r.height||i.width>r.width)return e.ge(t,n)}},{key:"ge",value:function(t,n){e.pe(t);for(var r=window.getComputedStyle(t),i=window.getComputedStyle(n),o=0,s=parseFloat(i.getPropertyValue("font-size")),a=i.width,u=i.height;i.height>r.height||i.width>r.width;)if(s*=.95,u>r.height&&(u*=.95),a>i.width&&(a*=.95),n.style["font-size"]=s+"px",n.style["max-height"]=u+"px",n.style["max-width"]=a+"px",++o>2e3){console.log("breaked");break}e.fe(n),i=window.getComputedStyle(n),n.style["font-size"]=parseFloat(i.getPropertyValue("font-size"))/parseFloat(document.documentElement.clientHeight)*100+"vh"}},{key:"pe",value:function(t){for(var n=t.childNodes,r=0,i=n.length;r<i;r++)n[r]instanceof Element&&(e.fe(n[r]),e.pe(n[r]))}},{key:"fe",value:function(t){var e=t.classList.contains("no-transtition");t.classList.add("no-transition");var n=t.parentNode;console.log(t);var r=window.getComputedStyle(t),i=window.getComputedStyle(n),o=parseFloat(r.getPropertyValue("font-size"))/parseFloat(i.getPropertyValue("font-size")),s=r.height,a=r.width,u=i.height,l=i.width,c=t.style;c["max-height"]=Math.floor(s/u*100)+"%",c["margin-left"]=Math.floor(parseFloat(r.getPropertyValue("margin-left"))/l*100)+"%",c["margin-right"]=Math.floor(parseFloat(r.getPropertyValue("margin-right"))/l*100)+"%",c["margin-top"]=Math.floor(parseFloat(r.getPropertyValue("margin-top"))/u*100)+"%",c["margin-bottom"]=Math.floor(parseFloat(r.getPropertyValue("margin-bottom"))/u*100)+"%",c["max-width"]=Math.floor(a/l*100)+"%",c["font-size"]=o+"em",e||t.classList.remove("no-transition")}},{key:"we",value:function(){var t=window.chrome,e=window.navigator,n=e.vendor,r=e.userAgent.indexOf("OPR")>-1,i=e.userAgent.indexOf("Edge")>-1;return!!e.userAgent.match("CriOS")||null!==t&&void 0!==t&&"Google Inc."===n&&!1===r&&!1===i}},{key:"Se",value:function(t,e){for(var n={},r=0,i=t.length;r<i;r++)n[t[r][e]]=t[r];return n}},{key:"Me",value:function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}},{key:"toArray",value:function(t){var e=[];for(var n in t)e.push(t[n]);return e}}]),e}();v.init();var p=function(){function t(){s(this,t)}return n(t,null,[{key:"init",value:function(){t.He()}},{key:"ve",value:function(e){var n=null;if("string"==typeof e){var r=t.ye.filter(function(t){return t.Te===e});r.length>0&&(n=r[0])}else-1!==t.ye.indexOf(e)&&(n=e);if(v.F(n)){localStorage.setItem("currentTheme",n.Te);var i=new Promise(function(t){document.querySelector("nav.top-bar").addEventListener("transitionend",function(){t()})});document.body.className=n.Pe,t.be=n;for(var o=0,s=t.Le.length;o<s;o++)t.Le[o](t.be,i)}}},{key:"Ae",value:function(e){t.ye.push(e)}},{key:"He",value:function(){if(t.ve(localStorage.getItem("currentTheme")),v.gt(t.be)){var e=document.body.className,n=t.ye.filter(function(t){return t.Pe===e});n.length>0?t.ve(n[0]):t.ye.length>0&&t.ve(t.ye[0])}}},{key:"Ce",value:function(){return new u(t.be.Te,function(e){var n=(t.ye.indexOf(t.be)+1)%t.ye.length;t.ve(t.ye[n]),e.title=t.be.Te,e.m.U()},c.q)}},{key:"addChangeListener",value:function(e){t.Le.push(e)}}]),t}();p.ye=[],p.Le=[];var y=function(){function t(e){s(this,t),this.Fe=e,this.xe=!0,this.De=3650,this.Re="complianceCookie",this.Be="true"}return n(t,[{key:"ke",value:function(){t.Ie(this.Re)!==this.Be&&this.show()}},{key:"Ue",value:function(){this.Ee(this.Re,this.Be,this.De)}},{key:"Ee",value:function(t,e,n){var r=void 0;if(v.F(n)){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),r="; expires="+i.toGMTString()}else r="";this.xe&&(document.cookie=t+"="+e+r+"; path=/")}},{key:"Oe",value:function(t){this.Ee(t,"",-1)}},{key:"show",value:function(){var t=this,e=document.getElementById(this.Fe);e.style.display="block",e.querySelector("#close-cookie-msg").onclick=function(){t.Ue(),e.remove()}}}],[{key:"Ie",value:function(t){for(var e=t+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return i.substring(e.length,i.length)}return null}}]),t}(),g=function(){function r(){return s(this,r),i(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return o(r,c),n(r,[{key:"ht",value:function(t,n){var i=e(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"ht",this).call(this,t,n);return i.classList.add(n.L()),i}},{key:"Ne",value:function(){var t=r.je(),e=this.et[0];("medium"===t||"smedium"===t||"small"===t)&&r.Ve(e.getElementsByClassName(c.K)).length>0||("smedium"===t||"small"===t)&&r.Ve(e.getElementsByClassName(c.h)).length>0||"small"===t&&r.Ve(e.getElementsByClassName(c.pt)).length>0||r.Ve(e.getElementsByClassName(c.X)).length>0?document.getElementById("responsive-menu-toggle").style.display="block":(document.getElementById("responsive-menu-toggle").style.display="none",v.F(r.We)&&r.We.close())}},{key:"lt",value:function(){var t=e(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"lt",this).call(this);return function(e){t(e)instanceof l||!v.F(r.We)||r.We.close()}}},{key:"rt",value:function(t){var n=e(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rt",this).call(this,t);return this.Ne(),r.We=this,n}},{key:"close",value:function(){document.getElementById("responsive-menu").style.display="none";for(var t=0,e=this.tt.length;t<e;t++)this.tt[t].close()}},{key:"D",value:function(t){var n=e(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"D",this).call(this,t);return this.Ne(),n}}],[{key:"init",value:function(){var t=document.getElementsByClassName("foundation-mq");if(0!==t.length){var e=[];for(var n in t=function(t){var e={};return"string"!=typeof t?e:(t=t.trim().slice(1,-1))?e=t.split("&").reduce(function(t,e){var n=e.replace(/\+/g," ").split("="),r=n[0],i=n[1];return r=decodeURIComponent(r),i=void 0===i?null:decodeURIComponent(i),t.hasOwnProperty(r)?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i,t},{}):e}(window.getComputedStyle(t[0]).getPropertyValue("font-family")))t.hasOwnProperty(n)&&e.push({Te:n,value:"only screen and (min-width: "+t[n]+")"});window.addEventListener("resize",function(){v.F(r.We)&&r.We.Ne()});var i=document.getElementById("responsive-menu");document.getElementById("responsive-menu-toggle").onclick=function(){"none"===window.getComputedStyle(i).getPropertyValue("display")?i.style.display="block":v.F(r.We)&&r.We.close()},i.firstElementChild.addEventListener("click",function(t){t.target===i.firstElementChild&&v.F(r.We)&&r.We.close()}),r._e=e}}},{key:"je",value:function(){for(var e=void 0,n=0;n<r._e.length;n++){var i=r._e[n];matchMedia(i.value).matches&&(e=i)}return"object"==(void 0===e?"undefined":t(e))?e.Te:e}},{key:"Ve",value:function(t){for(var e=[],n=0,r=t.length;n<r;n++)t[n].classList.contains("hidden")||e.push(t[n]);return e}}]),r}();g._e=[],g.We=null,g.init();var m=function(){function t(){s(this,t)}return n(t,null,[{key:"Je",value:function(e,n){n=v.o(n,[]).slice(0);var r=Promise.resolve();if(e instanceof Element)r=Promise.resolve(e);else{if(-1!==n.indexOf(e))return Promise.reject("views are in a circuit! cannot resolve view for url "+n[0]+"! url "+e+" is in stack before!");n.push(e),r=fetch(v.jt(e),{credentials:"same-origin"}).then(function(t){return t.text()}).then(function(t){var e=(new DOMParser).parseFromString(t,"text/html");return v.gt(e)&&((e=document.implementation.createHTMLDocument("")).body.innerHTML=t),e.body.firstChild})}return r.then(function(e){for(var r=[],i=e.querySelectorAll("[data-view]"),o=function(e,o){r.push(t.Je(i[o].dataset.view,n).then(function(t){i[o].replaceWith(t)}))},s=0,a=i.length;s<a;s++)o(0,s);return Promise.all(r).then(function(){return e})})}}]),t}(),k=function(){function t(e){s(this,t);var n=this;this.ze=null,this.qe=!0,this.Ke=new Promise(function(t){n.Xe=t}),this.$e={},v.F(e)&&this.Ge(e)}return n(t,[{key:"Qe",value:function(){var t=[];for(var e in this.$e)t.push(this.$e[e].Qe.apply(this.$e[e],arguments)),t.push(this.$e[e].Ke);return Promise.all(t)}},{key:"Ye",value:function(){var t=this,e=arguments;this.qe&&(this.Ze(),this.qe=!1);var n=function(n){var r=t.$e[n];r.Ye.apply(t.$e[n],e),t.$e[n].Ke.then(function(t){r.tn()?t.classList.remove("hidden"):t.classList.add("hidden")})};for(var r in this.$e)n(r)}},{key:"Ze",value:function(){}},{key:"en",value:function(){for(var t in this.$e)this.$e[t].en.apply(this.$e[t],arguments)}},{key:"nn",value:function(){for(var t in this.$e)this.$e[t].nn.apply(this.$e[t],arguments)}},{key:"sn",value:function(t,e){this.$e[t]=e,this.Ke=this.Ke.then(function(n){return e.Ke.then(function(e){return n.querySelector(t).appendChild(e),n})})}},{key:"Ge",value:function(t){var e=this;return this.Xe(m.Je(t).then(function(t){return e.ze=t,t})),this.Ke}},{key:"rn",value:function(t,e,n){e=v.o(e,!1);var r=function(n){var r=null;return e?(r=n.querySelectorAll(t),n.matches(t)&&r.push(n)):r=n.matches(t)?n:n.querySelector(t),r};return(n=v.o(n,!1))?this.Ke.then(function(t){return r(t)}):r(this.ze)}}]),t}(),w=function(){function t(e,n,r){var o;return s(this,t),(o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n))).in=!1,o.on=e,o.an=!1,o.ln=null,o.url="",o.un=r,o.hn={},o.title=e.cn(),o}return o(t,k),n(t,[{key:"T",value:function(t,e){"string"==typeof t&&(e=t,t=document.createTextNode(t)),this.title={dn:t},this.title.title=v.o(e,this.title.title),this.in&&this.on.mn()}},{key:"gn",value:function(){return this.pn(this.on.fn())}},{key:"Ge",value:function(n){var r=this;return e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ge",this).call(this,n).then(function(t){for(var e=[],n=0,i=r.$e.length;n<i;n++)e.push(r.$e[n].Ke);return Promise.all(e).then(function(){return t})})}},{key:"Qe",value:function(n){return this.hn=n,v.F(this.un)&&this.wn(n),e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Qe",this).call(this,n)}},{key:"Ye",value:function(n){this.in=!0;var r=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ye",this).call(this,n);return this.ln.U(),r}},{key:"en",value:function(n){e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"en",this).call(this,n),this.in=!1}},{key:"finish",value:function(t){this.an||(this.an=!0,this.on.Sn(this,t))}},{key:"pn",value:function(t,e){return this.on.pn(t,e)}},{key:"Mn",value:function(){this.on.Mn(this)}},{key:"Hn",value:function(t,e,n){this.pn(t,e),this.finish(n)}},{key:"vn",value:function(t){for(var e=this.on.yn(),n=0,r=e.length;n<r;n++)t.nt(e[n].V());return t}},{key:"Tn",value:function(t){this.url=t,this.on.Pn(this)}},{key:"wn",value:function(t){this.Tn(this.un+v.ee(t))}},{key:"bn",value:function(t){this.hn=Object.assign(this.hn,t),this.wn(this.hn)}},{key:"Ln",value:function(){return this.url}},{key:"An",value:function(){return v.jt(this.url)}},{key:"Cn",value:function(){}},{key:"addListener",value:function(t,e,n){this.on.addListener(this,t,e,n)}},{key:"Fn",value:function(t,e){this.on.Fn(this,t,e)}},{key:"xn",value:function(t,e,n,r){this.on.xn(this,t,e,n,r)}}]),t}(),_=function(){function t(e,n){s(this,t),this.Dn=e,this.ze=null,this.Rn={},this.Bn={},this.kn=n}return n(t,[{key:"In",value:function(){return this.Dn}},{key:"Un",value:function(t){t instanceof w&&(this.Dn=t)}},{key:"En",value:function(){return this.ze}},{key:"On",value:function(t){this.ze=t}},{key:"Wn",value:function(){return this.Rn}},{key:"Nn",value:function(t){this.Rn=t}},{key:"_n",value:function(){return this.Bn}},{key:"jn",value:function(t){this.Bn=t}},{key:"Vn",value:function(){return this.kn}},{key:"Jn",value:function(t){this.kn=t}}]),t}(),b=function(){function t(e,n){s(this,t),this.zn=document.getElementById(e),this.qn=[],this.Kn=null,this.Xn=v.o(n,".action-bar"),this.$n=Promise.resolve(),this.Gn=[],this.Qn=null,this.Yn=document.querySelector(".top-bar-title");for(var r=document.createElement("span");this.Yn.childNodes.length>0;){var i=this.Yn.firstChild;i.remove(),r.appendChild(i)}this.Zn={dn:r,title:document.title},console.log(this.Zn);var o=this;window.onpopstate=function(){if(o.qn.length>=1){var t=o.qn[o.qn.length-1].In();!1!==t.Cn()&&o.Sn(t)}}}return n(t,[{key:"cn",value:function(){return this.Zn}},{key:"ts",value:function(t){this.Qn=t}},{key:"fn",value:function(){return this.Qn}},{key:"es",value:function(t){this.Gn.push(t)}},{key:"yn",value:function(){return this.Gn}},{key:"pn",value:function(t,e){if(!(t.prototype instanceof w))throw{error:"wrong class given! Expected AbstractSite, given "+t.name};var n=new t(this),r={},i=new Promise(function(t,e){r.resolve=t,r.reject=e}),o=new _(n,r);this.zn.removeAllChildren().appendChild(v.se());var s=this;return this.$n=new Promise(function(t){Promise.resolve(e).then(function(t){return o.jn(t),Promise.all([n.Qe(t),n.Ke])}).then(function(){n.ln=n.vn(s.ns())}).then(function(){t(s.show(o))})}),i}},{key:"Sn",value:function(t,e){var n=this;this.$n.then(function(){var r=n.ss(t),i=n.qn.splice(r,1),o=null;if((i=i[0])===n.Kn){n.Kn.In().en(),n.Kn=null;var s=n.qn.length-1;if(s<0)return n.rs(),void n.pn(n.Qn);n.zn.removeAllChildren().appendChild(v.se()),o=n.qn[s]}i.In().nn(),Promise.resolve(e).then(function(t){i.Vn().resolve(t),v.F(o)&&n.show(o)})})}},{key:"addListener",value:function(t,e,n,r){this.zn.addEventListener(e,function(e){var i=e.target;t.in&&i.matches(n)&&r(i,e)})}},{key:"xn",value:function(t,e,n,r,i){this.addListener(t,n,r,i),this.Fn(t,e,i)}},{key:"Fn",value:function(t,e,n){window.addEventListener("keydown",function(r){t.in&&r.which===e&&n(this,r)})}},{key:"Mn",value:function(t){var e=this.ss(t),n=this.qn.splice(e,1);n=n[0],this.show(n)}},{key:"refreshCurrentSite",value:function(){return this.show(this.Kn)}},{key:"show",value:function(t){v.F(this.Kn)&&(this.Kn.Nn(this.Kn.In().en()),this.Kn.On(this.zn.innerHTML)),this.zn.removeAllChildren().appendChild(v.se());var e=this;return this.Kn=t,-1===this.qn.indexOf(t)&&this.qn.push(t),t.In().Ke.then(function(n){return t.In().ln.U(),e.zn.removeAllChildren().appendChild(n),e.mn(),d.Vt().Jt(),n}).then(function(n){t.In().Ye(t.Wn()),history.pushState({siteName:t.In().constructor.name,siteData:n.outerHTML,stackPosition:e.qn.length-1},t.In().constructor.name,t.In().An())})}},{key:"Pn",value:function(t){if(v.F(this.Kn)&&this.Kn.In()===t){history.replaceState({siteName:t.constructor.name,siteData:t.ze.outerHTML,stackPosition:this.qn.length-1},t.constructor.name,t.An())}}},{key:"os",value:function(){if(null!=this.Kn)return this.Kn.In()}},{key:"as",value:function(){null!=this.Kn&&this.Kn.In().ln.U()}},{key:"mn",value:function(){var t=this.os().title;this.Yn.removeAllChildren().appendChild(t.dn),document.title=v.o(t.title,this.Zn.title)}},{key:"ss",value:function(t){for(var e=0,n=this.qn.length;e<n;e++)if(this.qn[e].In()===t)return e;return-1}},{key:"ls",value:function(t){var e=this.ss(t);return-1===e?null:this.qn[e]}},{key:"rs",value:function(){this.zn.removeAllChildren().appendChild(d.ut("The app has ended! Please close the window."))}},{key:"ns",value:function(){return new g(this.Xn)}}]),t}(),O=function(){function t(){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,w),n(t,[{key:"Qe",value:function(t){var e=null;v.Zt(t,"url")?e=t.url:(e=document.createElement("div")).innerHTML="Paused...",this.Ge(e)}}]),t}(),L=function(){function t(){s(this,t),this.us=null,this.hs=".action-bar",this.s=a.i(),this.cs="site-content",this.ds=new Map,this.ms=[],this.gs=!1,this.ps=!0,this.fs=null}return n(t,[{key:"ws",value:function(){return this.us}},{key:"es",value:function(t){this.ms.push(t)}},{key:"Ss",value:function(t){this.gs=t}},{key:"Ms",value:function(){return this.cs}},{key:"Hs",value:function(t){this.cs=t}},{key:"vs",value:function(){return this.hs}},{key:"ys",value:function(t){this.hs=t}},{key:"i",value:function(){return this.s}},{key:"t",value:function(t){this.s=t}},{key:"Ts",value:function(t,e){this.ds.set(t.toLowerCase(),e)}},{key:"Ps",value:function(t){this.ps=t}},{key:"refreshCurrentSite",value:function(){this.us.refreshCurrentSite()}},{key:"pause",value:function(t){this.pn(O,{url:t})}},{key:"resume",value:function(){var t=this.us.os();t instanceof O&&t.finish()}},{key:"bs",value:function(t){return t=t.toLowerCase(),this.ds.has(t)?this.ds.get(t):null}},{key:"Ls",value:function(){var t="";return 0===window.location.pathname.search(this.s)&&(t=window.location.pathname.substr(this.s.length).trim()),"/"===t.charAt(0)&&(t=t.substr(1).trim()),"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-2).trim()),0===t.length&&window.location.hash&&(t=window.location.hash.substr(1).trim()),this.bs(t)}},{key:"As",value:function(){for(var e=this,n=document.getElementsByClassName("deep-link"),r=0,i=n.length;r<i;r++)n[r].addEventListener("click",function(n){return n.preventDefault(),e.us.pn(v.o(e.bs(this.dataset.siteName),e.fs),t.Cs(this.dataset.siteArgs)),!0})}},{key:"Fs",value:function(t){var e=this.ms.indexOf(t);e>=0&&(this.ms[e].remove(!0),this.ms.splice(e,1))}},{key:"pn",value:function(t,e){return this.us.pn(t,e)}},{key:"start",value:function(e){a.t(this.s);var n=v.o(this.Ls(),e),r=t.xs();this.fs=e,d.init(),p.init(),this.gs&&this.es(p.Ce()),this.us=new b(this.cs,this.hs),this.us.Gn=this.ms,this.us.ts(e),this.us.pn(n,r),this.As(),this.ps&&new y("cookie-compliance").ke()}}],[{key:"Cs",value:function(t){if(v.gt(t))return null;for(var e={},n=[],r=t.split("&"),i=0;i<r.length;i++)(n=r[i].split("="))[0].trim().length>0&&(e[n[0]]=decodeURIComponent(n[1]));return e}},{key:"xs",value:function(){return t.Cs(window.location.search.substr(1))}}]),t}(),P=function(){function t(e,n){s(this,t),this.Ds=null,this.content=null,this.Rs=null,this.cancelable=!0,this.title=v.o(n,""),this.Bs=!0,this.ks="",this.buttons=[],this.result=null,v.F(e)&&this.Is(e)}return n(t,[{key:"T",value:function(t){return this.title=t,this}},{key:"Us",value:function(t){this.Bs=t}},{key:"Es",value:function(t){this.ks=t}},{key:"A",value:function(){return this.title}},{key:"Os",value:function(t){return this.cancelable=!0===t,this}},{key:"Is",value:function(){var t=r(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.Ws=Promise.resolve(e),t.next=3,this.Ws;case 3:return this.content=t.sent,t.abrupt("return",this);case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"Ns",value:function(t,e,n){n=v.o(n,!0);var r=null;"string"==typeof t?((r=document.createElement("button")).classList.add("button"),r.classList.add("right"),r.appendChild(d.ut(t))):r=t;var i=this;if("function"!=typeof e){var o=e;e=function(){i.result=o}}var s;s=n?function(t){v.F(e)&&e(t),i.close()}:e,v.F(s)&&r.addEventListener("click",s),this.buttons.push(r)}},{key:"show",value:function(){var t=r(regeneratorRuntime.mark(function t(){var e,n,r,i,o,s,a,u,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for((e=document.createElement("span")).classList.add("title"),this.Bs&&""!==this.title?e.appendChild(d.ut(this.title)):e.innerHTML=this.title,(n=document.createElement("div")).appendChild(e),(r=document.createElement("div")).classList.add("content-container"),(i=document.createElement("div")).className=this.ks,i.classList.add("modal"),i.appendChild(n),i.appendChild(r),(o=document.createElement("div")).classList.add("modal-button-container"),s=0,a=this.buttons.length;s<a;s++)o.appendChild(this.buttons[s]);return t.next=13,this.Ws;case 13:return this.content instanceof Node||(this.content=this.Bs?d.ut(this.content):document.createTextNode(this.content)),r.appendChild(this.content),this.Rs=document.createElement("div"),this.Rs.classList.add("background"),this.Rs.appendChild(i),this.Rs.querySelector(".modal").appendChild(o),this.Rs.style.display="block",u=this,this.cancelable&&((l=document.createElement("span")).classList.add("close"),l.innerHTML="&times;",n.appendChild(l),l.addEventListener("click",function(){u.close()}),window.addEventListener("click",function(t){t.target===u.Rs&&u.close()})),t.abrupt("return",(document.body.appendChild(this.Rs),d.Vt().Jt(),new Promise(function(t){u.Ds=t})));case 23:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"close",value:function(){v.F(this.Rs)&&(this.Rs.style.display="none",this.Rs.remove(),this.Rs=null),v.F(this.Ds)&&this.Ds(this.result)}},{key:"_s",value:function(){this.Ns("confirm-button")}}]),t}(),x=function(){function e(){s(this,e)}return n(e,null,[{key:"js",value:function(t,e){e=v.o(e,0),setTimeout(function(){var e=document.getElementById("flashMessage"+t);e.fadeOut(.2).then(function(){e.remove()})},e)}},{key:"Vs",value:function(n,r,i,o){var s=null;(v.gt(r)||"object"==(void 0===r?"undefined":t(r)))&&(s=r,r=n,n=e.Js,o=!0),o=v.o(o,!1);var a=e.zs,u=document.createElement("div"),l=document.createElement("div");l.className="flashMessage "+n,l.id="flashMessage"+a,l.style.opacity="0",l.addEventListener("click",function(){e.js(a)}),l.appendChild(o?d.ut(r,s,"span"):document.createTextNode(r)),u.appendChild(l),document.getElementById("flashMessageContainer").appendChild(u),l.fadeIn(),(i=v.o(i,e.qs))>0&&e.js(e.zs,i),e.zs++}}]),e}();x.zs=0,x.qs=3500,x.Ks=1e3,x.Js="success",x.Xs="error",x.$s="default",x.Gs="info",x.Qs="warning";var j=function(){function t(){s(this,t)}return n(t,null,[{key:"Ys",value:function(e){if("function"==typeof e){var n=e;e=t.Zs.then(function(t){return n(t)})}t.tr.push(e)}},{key:"resolve",value:function(e){return t.er(e),t.Zs.then(function(){return Promise.all(t.tr)})}}]),t}();j.tr=[],j.Zs=new Promise(function(t){j.er=t});var E=function(){function t(e,n){s(this,t);var r=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB||window.nr;this.sr=r.open(e,n);var i=this;this.sr.onupgradeneeded=function(t){i.rr(i.sr.result,t.oldVersion,t.newVersion,t)},this.ir=new Promise(function(t){i.sr.onsuccess=function(e){i.Lt=i.sr.result,t(e)}})}return n(t,[{key:"or",value:function(t,e,n){var r=this;"function"==typeof e&&v.gt(n)&&(n=e,e="read"),this.ir.then(function(){var i=null;try{i=r.sr.result.transaction(t,e)}catch(e){console.warn(e),i=r.sr.result.transaction(t)}n(i)})}},{key:"ar",value:function(t,e,n){"function"==typeof e&&v.gt(n)&&(n=e,e="readonly"),this.or(t,e,function(e){n(e.objectStore(t))})}},{key:"lr",value:function(t,e){var n=this;return new Promise(function(r){n.ar(e,"readwrite",function(e){var n=e.put(t);n.onsuccess=r,n.onerror=function(t){throw{type:"indexed-db-error",event:t}}})})}},{key:"ur",value:function(t,e){var n=this;return new Promise(function(r){n.ar(e,"readwrite",function(e){for(var n=[],i=function(r,i){n.push(new Promise(function(n){var r=e.put(t[i]);r.onsuccess=n,r.onerror=function(t){throw{type:"indexed-db-error",event:t}}}))},o=0,s=t.length;o<s;o++)i(0,o);r(Promise.all(n))})})}},{key:"load",value:function(t,e){var n=this;return new Promise(function(r){n.ar(e,function(e){var n=e.get(t);n.onsuccess=function(t){r(t.currentTarget.result)},n.onerror=function(t){throw console.warn(t),{type:"indexed-db-load-error",event:t}}})})}},{key:"hr",value:function(t,e,n){var r=this;return new Promise(function(i){r.ar(t,function(t){var r=t.getAll(e,n);r.onsuccess=function(t){i(t.currentTarget.result)},r.onerror=function(t){throw console.warn(t),{type:"indexed-db-load-error",event:t}}})})}},{key:"cr",value:function(t,e,n,r,i){var o=this;return new Promise(function(s){o.ar(n,function(n){var o=n.index(t);o.onerror=function(t){throw{type:"indexed-db-index-error",event:t}};var a=o.openCursor(e,i);a.onerror=function(t){throw{type:"indexed-db-index-error",event:t}};var u=[],l=0;a.onsuccess=function(t){var e=t.target.result;e&&(u.push(e.value),l++,v.gt(r)||l<r)?e.continue():s(u)}})})}},{key:"remove",value:function(t,e){var n=this;return new Promise(function(r){n.ar(e,"readwrite",function(e){var n=e.delete(t);n.onerror=function(t){throw{type:"indexed-db-delete-error",event:t}},n.onsuccess=function(){r()}})})}},{key:"dr",value:function(t,e){var n=this;return new Promise(function(r){n.ar(e,"readwrite",function(e){for(var n=[],i=function(r,i){(r=e.delete(t[i])).onerror=function(t){throw{type:"indexed-db-delete-error",event:t}},n.push(new Promise(function(t){r.onsuccess=function(){t()}}))},o=0,s=t.length;o<s;o++)i(s,o);r(Promise.all(n))})})}},{key:"mr",value:function(t,e,n){var r=this;return new Promise(function(i){r.ar(n,"readwrite",function(n){var r=n.index(t);r.onerror=function(t){throw{type:"indexed-db-index-error",event:t}};var o=r.openCursor(e);o.onerror=function(t){throw{type:"indexed-db-index-error",event:t}},o.onsuccess=function(t){var e=t.target.result;e?(e.delete(),e.continue()):i()}})})}},{key:"rr",value:function(){}}]),t}(),C=function(){function t(){s(this,t)}return n(t,null,[{key:"gr",value:function(e){if(v.F(t.pr[e]))return t.pr[e];var n=new Promise(function(t){var n=document.createElement("script");n.src=v.jt(e),n.onload=t,document.body.appendChild(n)});return t.pr[e]=n,n}},{key:"wr",value:function(e,n){if(v.F(t.Sr[e]))return t.Sr[e];n=v.o(n,"all");var r=new Promise(function(t){var r=document.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=v.jt(e),r.media=n,r.onload=t,document.head.appendChild(r)});return t.Sr[e]=r,r}}]),t}();C.pr={},C.Sr={};var S=function(){function t(e,n,r){s(this,t),this.Mr=e,this.M=n,this.Hr=r}return n(t,[{key:"vr",value:function(t){return t===(t&this.Mr)}},{key:"W",value:function(){return this.M}},{key:"yr",value:function(){return this.Hr}}]),t}();S.Tr=1,S.Pr=2,S.br=4,S.Lr=S.Pr+S.br,S.Ar=S.Tr+S.Lr;var T=function(){function t(){s(this,t)}return n(t,null,[{key:"init",value:function(){t.Cr=[]}},{key:"Fr",value:function(e){t.Cr.push(e)}},{key:"xr",value:function(e){return t.Dr(e,t.Rr())}},{key:"Br",value:function(e,n){return t.kr(e,n,t.Rr())}},{key:"Dr",value:function(e,n){return t.kr(e,t.Cr,n)}},{key:"kr",value:function(e,n,r){for(var i=document.createElement("div"),o=t.Ir(),s=function(t){if(n[t].vr(o)){var s=r(n[t],e);s.onclick=function(r){n[t].yr()(e,this,r)},i.appendChild(s)}},a=0,u=n.length;a<u;a++)s(a);return i}},{key:"Ir",value:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)?S.Pr:null!==navigator.userAgent.match(/Android|BlackBerry|Opera Mini|IEMobile/i)||void 0!==window.orientation?S.br:S.Tr}},{key:"Rr",value:function(){return function(t){var e=document.createElement("a"),n=document.createElement("img");return e.appendChild(n),n.src=v.jt(t.W()),n.classList.add("share-icon"),e}}}]),t}();T.init();var B=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,S.Lr,e,function(t){var e;e=T.Ir()===S.Pr?"sms:&body="+encodeURIComponent(t):"sms:?body="+encodeURIComponent(t),window.open(e,"_blank")}))}return o(t,S),t}(),A=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,S.Ar,e,function(t){var e="https://t.me/share/url?url="+encodeURIComponent(t);window.open(e,"_blank")}))}return o(t,S),t}(),F=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,S.Ar,e,function(t){var e;e=T.Ir()===S.Tr?"https://web.whatsapp.com/send?text="+encodeURIComponent(t):"whatsapp://send?text="+encodeURIComponent(t),window.open(e,"_blank")}))}return o(t,S),t}(),M=function(){function t(e,n){var r;return s(this,t),(r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n))).Ur=e,r.active=!0,r}return o(t,k),n(t,[{key:"In",value:function(){return this.Ur}},{key:"tn",value:function(){return this.active}}]),t}(),R=function t(e,n,r){s(this,t),this.Te=e,this.Pe=n,this.M=r};var I=function t(){s(this,t)};I.Or={Wr:"version/2/ckeditor/ckeditor.js",Nr:"version/1/listjs/list.min.js"};var V=function(){function t(){s(this,t)}return n(t,null,[{key:"load",value:function(e,n,r){n=v.o(n,!1),r=v.o(r,!1);var i=n?v.jt(t._r+e):v.jt(t.jr+e);return fetch(i,{credentials:"same-origin"}).then(function(t){return r?t.text():t.json()}).catch(function(t){if(console.error("error",t),!r)return{success:!1,errors:["not-online"]}})}},{key:"send",value:function(e,n){var r=v.jt(t.jr+e);if(!(n instanceof FormData)){var i=new FormData;for(var o in n)i.append(o,n[o]);n=i}return fetch(r,{credentials:"same-origin",method:"POST",body:n}).then(function(t){return t.json()}).catch(function(t){return console.error("error",t),{success:!1,errors:["not-online"]}})}},{key:"ee",value:function(t){return v.ee(t)}}]),t}();V.jr="data/",V._r="cached/";var N=function(){function t(e,n,i,o){s(this,t),this.Vr=e,this.method=v.o(i,v.o(e.method,"POST")),this.Jr=!0===v.o(o,"get"===this.method.toLowerCase()),this.zr=!1,this.qr="string"==typeof n?function(t){return"get"===l.method.toLowerCase()?V.load(n+V.ee(t),l.Jr):V.send(n,t)}:n;var a,u,l=this;this.Kr=null,this.Xr=(u=r(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.$r(e);case 2:case"end":return t.stop()}},t,this)})),function(){return u.apply(this,arguments)}),e.addEventListener("submit",(a=r(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("submitting!",e),e.preventDefault(),t.next=4,l.Gr(e);case 4:case"end":return t.stop()}},t,this)})),function(){return a.apply(this,arguments)}));for(var c=0,h=e.elements.length;c<h;c++){var f=e.elements[c];f.addEventListener("change",function(){""!==this.value.trim()?this.classList.add("notEmpty"):this.classList.remove("notEmpty"),this.setCustomValidity("")}),f.addEventListener("keydown",function(){this.setCustomValidity("")})}}return n(t,[{key:"Qr",value:function(t,e){var n;n=(e=v.o(e,!0))?function(e){if(Array.isArray(e)&&e.indexOf("optimistic-locking-exception")>=0){var n=new P("optimistic-locking-dialog","optimistic-locking-dialog-title");n._s(),n.show()}else t(e)}:t,this.Xr=n}},{key:"Gr",value:function(){if(!this.zr){var t=this;return this.submit().then(function(e){if(e.success){if(null!==t.Kr)return t.Kr(e.result)}else if(v.F(t.Xr))return t.Xr(e.errors)})}}},{key:"load",value:function(t,e){return this.Yr(V.load(t,e).then(function(t){return t.success?t.result:{}})),this}},{key:"Yr",value:function(t){this.Zr(!0);var e=this;return Promise.resolve(t).then(function(t){for(var n in e.Zr(!1),t)if(v.F(e.Vr.elements[n])){if(v.F(e.Vr.elements[n].options)&&v.F(t[n+"Options"])){var r=e.Vr.elements[n].options;for(var i in t[n+"Options"]){var o=document.createElement("option");o.value=i,o.innerText=t[n+"Options"][i],r.add(o)}}e.Vr.elements[n].value=v.ce(t[n]),v.F(t[n])&&""!==(""+t[n]).trim()?e.Vr.elements[n].classList.add("notEmpty"):e.Vr.elements[n].classList.remove("notEmpty")}return e})}},{key:"$r",value:function(){var t=r(regeneratorRuntime.mark(function t(e){var n,r,i,o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(i in n=!1,r=null,e)v.F(this.Vr.elements[i])&&"hidden"!==this.Vr.elements[i].type&&v.gt(this.Vr.elements[i].ti)&&(v.gt(this.Vr.elements[i].disabled)||!this.Vr.elements[i].disabled)&&(this.Vr.elements[i].setCustomValidity(d.translate(v.o(e[i],"form-default-error"))),n=!0),v.gt(r)&&(r=v.o(e[i],"form-default-error"));if(n||!v.F(r)){t.next=11;break}t.t0=regeneratorRuntime.keys(this.Vr.elements);case 4:if((t.t1=t.t0()).done){t.next=11;break}if(o=t.t1.value,"hidden"===this.Vr.elements[o].type){t.next=9;break}return this.Vr.elements[o].setCustomValidity(d.translate(r)),n=!0,t.abrupt("break",11);case 9:t.next=4;break;case 11:n&&this.Vr.querySelector("input[type=submit]").click();case 12:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"Zr",value:function(t){this.zr=t,this.zr?this.Vr.classList.add("sending"):this.Vr.classList.remove("sending")}},{key:"submit",value:function(){var t=this;return new Promise(function(e){t.Zr(!0);var n=new FormData(t.Vr);e(t.qr(n))}).then(function(e){return t.Zr(!1),e})}},{key:"ei",value:function(t){this.Kr=t}}]),t}(),K=function(){function t(){s(this,t),this.si=null,this.ri="settings"}return n(t,null,[{key:"Vt",value:function(){return null===t.ni&&(t.ni=new t),t.ni}}]),n(t,[{key:"ii",value:function(){return v.gt(this.si)&&this.oi(),this.si}},{key:"ai",value:function(t,e){var n=this.ii();return v.F(n[t])?n[t].value:e}},{key:"li",value:function(t){this.ii(),delete this.si[t],this.ui()}},{key:"hi",value:function(t,e){this.ii(),this.si[t]={ci:(new Date).getTime(),value:e},this.ui()}},{key:"di",value:function(t){for(var e in this.ii(),t)this.si[e]=t[e];this.ui()}},{key:"mi",value:function(t){return v.o(this.si[t])}},{key:"oi",value:function(){this.si=localStorage.getItem(this.ri),null===this.si?this.si={}:this.si=JSON.parse(this.si)}},{key:"ui",value:function(){null!==this.si&&localStorage.setItem(this.ri,JSON.stringify(this.si))}}]),t}();K.ni=null;var q=function(){function t(e,n,r){s(this,t),this.Te=e,this.gi=n,this.pi=v.o(r,!0),this.fi=!0,this.wi=-1,this.Si=null}return n(t,[{key:"Mi",value:function(t){return this.Si=t,this}},{key:"Hi",value:function(t){this.wi=t}},{key:"vi",value:function(){return this.Te}},{key:"yi",value:function(){return this.gi}},{key:"Ti",value:function(){var t=document.createElement("th");return t.appendChild(this.pi?d.ut(this.gi):document.createTextNode(this.gi)),this.fi&&(t.classList.add("sort"),t.dataset.sort=this.Te),t.dataset.column=this.wi,this.Pi=t,this.Pi}},{key:"bi",value:function(){return this.Te}},{key:"Li",value:function(t){return t}},{key:"Ai",value:function(){var t=document.createElement("td");return t.classList.add(this.Te),t.dataset.column=this.wi,v.F(this.Si)&&t.classList.add("clickable"),t}},{key:"click",value:function(t,e,n){v.F(this.Si)&&this.Si(t,e,n)}}]),t}(),D=function(){function t(e,n,r,o){var a;return s(this,t),(a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r))).fi=!1,a.Ci=v.o(o,!1),a}return o(t,q),n(t,[{key:"bi",value:function(){return null}},{key:"Ai",value:function(){var n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ai",this).call(this);return n.classList.remove(this.Te),n.appendChild(this.Ci?d.ut(this.Te):document.createTextNode(this.Te)),n}}]),t}(),Z=function(){function t(e,n,r){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r=v.o(r,!1)))}return o(t,q),n(t,[{key:"Ti",value:function(){return document.createTextNode("")}},{key:"bi",value:function(){return{data:[this.Te]}}},{key:"Ai",value:function(){return document.createTextNode("")}}]),t}(),z=function(){function t(e,n,r){var o;return s(this,t),(o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r))).Ci=!1,o}return o(t,D),n(t,[{key:"Ai",value:function(){var n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ai",this).call(this),r=document.createElement("img");return r.src=this.Te,n.removeAllChildren().appendChild(r),n}}]),t}(),H=function(){function t(e,n,r){s(this,t),this.Fi=e,this.xi=v.o(n,{}),this.Di=r,"string"==typeof this.Fi&&(this.Fi=document.getElementById(this.Fi)),this.Ri=[],Array.isArray(n)?this.Ri=n:v.F(n.columns)&&(this.Ri=n.columns)}return n(t,[{key:"Li",value:function(t){if(console.log("prepareData",t),v.F(t))for(var e=0,n=t.length;e<n;e++)t[e]=this.Bi(t[e]);return t}},{key:"Bi",value:function(t){console.log("prepareDataset",t);for(var e=0,n=this.Ri.length;e<n;e++)v.F(t[this.Ri[e].vi()])&&(t[this.Ri[e].vi()]=this.Ri[e].Li(t[this.Ri[e].vi()],t));return t}},{key:"ki",value:function(){v.F(this.Ri)&&this.Ii();var t=this.Fi,e=this.xi,n=this.Di;e.item=v.o(e.item,t.id+"-template-item"),e.page=v.o(e.page,5),e.pagination=v.o(e.pagination,{outerWindow:1,innerWindow:1});var r=document.getElementById(e.item);r&&(e.item=r.outerHTML,r.remove()),n=this.Li(n);var i=new List(t,e,n),o=this;return t.querySelector("."+v.o(e.listClass,"list")).addEventListener("click",function(t){var e=t.target.closest("td[data-column]"),n=parseInt(e.dataset.column);o.Ri.length>n&&o.Ri[n].click(e,i,t)}),this.list=i,i}},{key:"Ii",value:function(){for(var t=document.createElement("tr"),e=document.createElement("tr"),n=[],r=0,i=this.Ri.length;r<i;r++){this.Ri[r].Hi(r),t.appendChild(this.Ri[r].Ti()),e.appendChild(this.Ri[r].Ai());var o=this.Ri[r].bi();v.F(o)&&n.push(o)}var s=this.Fi.querySelector("thead"),a=this.Fi.querySelector("tfoot");v.F(s)&&s.removeAllChildren().appendChild(t),v.F(a)&&a.removeAllChildren().appendChild(v.cloneNode(t)),this.xi.item=e.outerHTML,this.xi.valueNames=n}},{key:"Ui",value:function(){return this.list}},{key:"Ei",value:function(t,e,n){var r=this.list.get(t,e);v.F(r)&&r.length>=1&&(n=this.Bi(n),r[0].values(n))}},{key:"Oi",value:function(t){t?this.Fi.classList.add("sending"):this.Fi.classList.remove("sending")}}]),t}(),Y=function(){function t(e){s(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"core/html/settings.html","settings"));for(var r in t.Wi)n.Ni(r,new t.Wi[r](n));return n.active=null,n}return o(t,w),n(t,[{key:"Ni",value:function(t,e){this.sn("#settings-fragments",e),delete this.$e["#settings-fragments"],this.$e[t]=e}},{key:"Ye",value:function(){var n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ye",this).call(this);return v.F(this.active)&&!this.$e[this.active].tn()&&this.setActive(null),this._i(),n}},{key:"setActive",value:function(t){v.F(this.active)&&(this.$e[this.active].Ke.then(function(t){t.classList.remove("active")}),this.rn("#show-fragment-"+this.active).classList.remove("active")),this.active=t,v.F(this.active)&&(this.$e[this.active].Ke.then(function(t){t.classList.add("active")}),this.rn("#show-fragment-"+this.active).classList.add("active"))}},{key:"_i",value:function(){var t=this,e=this.rn("#settings-fragment-list");e.removeAllChildren();var n=this,r=function(r){if(t.$e[r].tn()){var i=document.createElement("li");i.id="show-fragment-"+r,i.appendChild(d.ut(r,null,"a")),i.addEventListener("click",function(){n.setActive(r)}),e.appendChild(i),v.gt(t.active)&&t.setActive(r)}};for(var i in this.$e)r(i)}}],[{key:"Ni",value:function(e,n){t.Wi[e]=n}},{key:"ji",value:function(e){t.Vi=e}}]),t}();Y.Wi={},Y.Vi=!0,j.Ys(function(t){if(Y.Vi){t.Ts("settings",Y);var e=new u("settings",function(){t.pn(Y)},u.K,1e4);e.N("img/settings.png"),t.es(e)}});var W=function(){function t(){s(this,t)}return n(t,[{key:"Ji",value:function(t,e,n,r,i,o,s){console.log("test"),o=v.o(o,10),r=v.o(r,!1),i=v.o(i,!1),s=v.o(s,e.innerHTML.length);var a=n.classList.contains("no-transition");n.classList.add("no-transition");var u=1,l=0,c=0,h=0,f=0,d=0;do{u+=l/(s+1),e.style.fontSize=u+"px";var p=window.getComputedStyle(n);f=p.getPropertyValue("width").replace("px",""),d=p.getPropertyValue("height").replace("px",""),c=f-e.offsetWidth,h=d-e.offsetHeight;var y=i?h:r?c:Math.min(c,h);if(y===l)break;l=y}while((c>(1-t)*f||i)&&(h>(1-t)*d||r));e.style.fontSize=u-o+"px",a||n.classList.remove("no-transition");var g=this;window.addEventListener("resize",function(){setTimeout(function(){g.Ji(t,e,n,r,i,o,s)},255)})}},{key:"zi",value:function(t,e,n,r,i,o){return this.Ji(1,t,e,n,r,i,o)}}]),t}(),$=function(){function t(e){s(this,t),"string"==typeof e&&(e={code:e}),this.qi=e,this.Ki=!1}return n(t,[{key:"Xi",value:function(t){this.Ki=t}},{key:"$i",value:function(){return this.Ki}},{key:"Gi",value:function(){return V.send("c/code",this.qi)}}]),t}(),U=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"core/html/load.html","code"))}return o(t,w),n(t,[{key:"Qe",value:function(n){e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Qe",this).call(this,n),console.log(n);Promise.resolve();if(v.F(n.code)){var r=n.code,i=v.o(n.cachable,!1),o=new $(r);o.Xi(i);var s=this;o.Gi().then(function(t){t.success?x.Vs(x.Js,d.translate(v.o(t.result.successMessage,"code-activated"))):x.Vs(x.Js,d.translate(t.errors[0])),s.finish()})}}}]),t}();j.Ys(function(t){t.Ts("code",U)});var J=function(){function t(){s(this,t)}return n(t,null,[{key:"init",value:function(e){t.Qi=null,t.Yi={Zi:!1,id:null,accesses:["default"]},t.app=e,t.to=new Promise(function(e){t.eo=e})}},{key:"setData",value:function(e){t.Yi=Object.assign(t.Yi,e);var n=t.app.ws();n&&n.as()}},{key:"no",value:function(e){return t.Qi=v.o(e,t.Qi),V.load(t.Qi).then(function(e){e.success&&t.setData(e.result),t.eo()})}},{key:"so",value:function(){return V.load("u/logout").then(function(e){if(e.success){t.setData(e.result);var n=t.app.ws();n&&n.refreshCurrentSite(),x.Vs(x.Js,d.translate("logged-out-successfully"))}})}},{key:"ro",value:function(e){return t.Yi.accesses.indexOf(e)>=0}},{key:"io",value:function(e,n){t.oo(function(r){n(r&&t.ao(e))})}},{key:"oo",value:function(e){this.to.then(function(){e(t.lo())})}},{key:"ao",value:function(e){return t.Yi.id===e}},{key:"lo",value:function(){return v.F(t.Yi)&&v.F(t.Yi.id)}}]),t}();j.Ys(function(t){return J.init(t),J.no("u/me").then(function(){J.oo(function(t){if(t){var e=K.Vt(),n=v.he(e.ii());for(var r in n)n[r].value=JSON.stringify(n[r].value);V.send("u/syncSettings",n).then(function(t){if(t.success){for(var n in t.result)t.result[n].value=JSON.parse(t.result[n].value);e.di(t.result)}})}})})});var X=function(){function t(e,n,r,o,a){var u;return s(this,t),(u=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,o))).uo=v.o(a,"default"),u}return o(t,u),n(t,[{key:"k",value:function(){return e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"k",this).call(this)&&J.ro(this.uo)}},{key:"ho",value:function(){return this.uo}},{key:"V",value:function(n){var r=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"V",this).call(this,v.o(n,new t));return r.uo=this.uo,r}}]),t}(),G=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"userManagement/html/403.html"))}return o(t,w),t}(),Q=function(){function t(e,n,r,o){var a;return s(this,t),(a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r))).uo=o,a}return o(t,w),n(t,[{key:"Qe",value:function(n){return J.ro(this.uo)?e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Qe",this).call(this,n):(this.pn(G),void this.finish({error:403}))}},{key:"Ye",value:function(n){return J.ro(this.uo)?e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ye",this).call(this,n):(this.pn(G),void this.finish({error:403}))}}]),t}(),tt=function(){function t(e,n,r,o){s(this,t);var a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,o)),u=e.querySelector("#email"),l=e.querySelector("#password"),c=function(){u.setCustomValidity(""),l.setCustomValidity("")};return u.addEventListener("keydown",c),l.addEventListener("keydown",c),a}return o(t,N),t}(),et=function(){function t(e,n,r,o){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r,o))}return o(t,N),n(t,[{key:"co",value:function(){}}]),t}(),nt=function(){function t(e,n,r){var o;return s(this,t),(o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))).uo=r,o}return o(t,M),n(t,[{key:"tn",value:function(){return e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"tn",this).call(this)&&J.ro(this.uo)}}]),t}(),rt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"userManagement/html/fragments/passwordSettings.html","online"))}return o(t,nt),n(t,[{key:"Ze",value:function(){var n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ze",this).call(this),r=new N(document.getElementById("change-password-form"),"u/passwordSettings/set","post");return r.ei(function(t){for(var e=0,n=t.length;e<n;e++)x.Vs(t[e]);r.Yr({oldPassword:"",newPassword1:"",newPassword2:""})}),n}}]),t}();j.Ys(function(){Y.Ni("password-settings",rt)});var it=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"userManagement/html/fragments/userSettings.html","online"))}return o(t,nt),n(t,[{key:"Ze",value:function(){var n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ze",this).call(this);return new N(document.getElementById("user-settings-form"),"u/userSettings/set","post").load("u/userSettings").ei(function(t){for(var e=0,n=t.length;e<n;e++)x.Vs(t[e])}),n}}]),t}();j.Ys(function(){Y.Ni("user-settings",it)});var ot=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"userManagement/html/editUserRoles.html","userRoles","admin"))}return o(t,Q),n(t,[{key:"Qe",value:function(n){var r=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Qe",this).call(this,n);this.userId=n.id;var i=this;return Promise.all([C.gr(I.Or.Nr),V.load("u/userRoles"+V.ee({id:i.userId})).then(function(t){t.success?(i.do(t.result.userRoles),i.mo(t.result.availableRoles),i.po(t.result.username)):(x.Vs(t.errors[0]),i.finish())})]).then(function(){return r})}},{key:"Ze",value:function(){this.rn("#username").innerHTML=this.username;var t=this.rn("#userRoles"),e=this.rn("#availableRoles"),n=new z("img/minus.png","",!1),r=new z("img/plus.png","",!1),i=[new Z("id"),new q("name","name"),new q("description","description"),n],o=[new Z("id"),new q("name","name"),new q("description","description"),r],s=new H(t,i,this.userRoles),a=new H(e,o,this.availableRoles),u=s.ki(),l=a.ki(),c=this,h=function(t,e){return s.Oi(!0),a.Oi(!0),V.send("u/changeUserRole",{id:t,userId:c.userId,add:e}).then(function(e){if(s.Oi(!1),a.Oi(!1),!e.success)return x.Vs(e.errors[0]),e;var n=null,r=null;e.result.hasRole?(n=l,r=u):(r=l,n=u);var i=n.get("id",t);return 1===i.length&&(r.add(i[0].values()),n.remove("id",t)),e})};n.Mi(function(t){var e=t.closest("tr").dataset.id;h(e,!1)}),r.Mi(function(t){var e=t.closest("tr").dataset.id;h(e,!0)})}},{key:"do",value:function(t){this.userRoles=t}},{key:"mo",value:function(t){this.availableRoles=t}},{key:"po",value:function(t){this.username=t}}]),t}();j.Ys(function(t){t.Ts("userRoles",ot),t.es(new X("userRoles",function(){t.pn(ot)},null,1100,"admin"))});var st=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"userManagement/html/forgotPassword.html","forgotPassword","offline"))}return o(t,Q),n(t,[{key:"Ze",value:function(){var t=this;new N(document.getElementById("forgot-password-form"),"u/newPassword","post").ei(function(){x.Vs(x.Js,d.translate("new-password-code-send")),t.finish()})}}]),t}();j.Ys(function(t){t.Ts("forgotPassword",st)});var at=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"userManagement/html/login.html","login","offline"))}return o(t,Q),n(t,[{key:"Ze",value:function(){var t=this;new tt(document.getElementById("login-form"),"u/login","post").ei(function(e){J.setData(e),t.gn(),x.Vs(x.Js,d.translate("login-success")),t.finish()}),this.rn("#forgot-password-link").addEventListener("click",function(){t.pn(st),t.finish()})}}]),t}();j.Ys(function(t){t.Ts("login",at),t.es(new X("login",function(){t.pn(at)},c.X,1100,"offline")),t.es(new X("logout",function(){J.so()},c.X,1100,"online"))});var ut=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"userManagement/html/registration.html","registration","offline"))}return o(t,Q),n(t,[{key:"Ze",value:function(){new et(document.getElementById("registration-form"),"u/registration","post").ei(function(){x.Vs(x.Js,d.translate("registration-success"))})}}]),t}();j.Ys(function(t){t.Ts("registration",ut),t.es(new X("registration",function(){t.pn(ut)},null,1100,"offline"))});var lt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"userManagement/html/setNewPassword.html","newPassword","offline"))}return o(t,Q),n(t,[{key:"Qe",value:function(n){return this.code=n.code,e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Qe",this).call(this,n)}},{key:"Ze",value:function(){var t=document.getElementById("new-password-form");document.getElementById("code").value=this.code;var e=this;new N(t,"c/code","post").ei(function(){x.Vs(x.Js,d.translate("password-updated")),e.pn(at),e.finish()})}}]),t}();j.Ys(function(t){t.Ts("newPassword",lt)});var ct="/pwa/wordRotator/public/";window.location.pathname.endsWith("publicTest/")&&(ct="/pwa/wordRotator/publicTest/"),a.t(ct),d.Ft=["de","en"],d.Et=!1;var ht=function(){function t(e){s(this,t),this.rotation=0,this.dn=e,this.parent=null}return n(t,[{key:"fo",value:function(t){return t}},{key:"wo",value:function(){return!1}},{key:"So",value:function(t){this.parent=t}},{key:"Mo",value:function(){if(null!==this.parent)return this.parent.Mo()}},{key:"Ho",value:function(){return 0===this.rotation}},{key:"rotate",value:function(){var t=r(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.resolve());case 1:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"vo",value:function(){}},{key:"yo",value:function(t){return t}},{key:"To",value:function(){return this.dn}}]),t}(),ft=function(){function t(e){var n;s(this,t),(n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))).children=[],n.Lo="rotate-0";var r=n;return n.Ao=function(e){0===e.targetTouches.length&&1===e.changedTouches.length&&r.dn.contains(t.bo)&&r.dn.contains(document.elementFromPoint(e.changedTouches[0].pageX,e.changedTouches[0].pageY))&&(console.log(e),r.rotate(),e.stopPropagation())},n.Co=function(e){console.log("mouseup",e),null!==t.bo&&r.dn.contains(t.bo)&&r.dn.contains(e.target)&&(r.rotate(),e.stopPropagation())},n}return o(t,ht),n(t,null,[{key:"Po",value:function(){window.addEventListener("mousedown",function(e){t.bo=e.target}),window.addEventListener("mouseup",function(){t.bo=null}),window.addEventListener("touchstart",function(e){console.log("start",e),1===e.targetTouches.length&&(t.bo=e.targetTouches[0].target)}),window.addEventListener("touchend",function(e){console.log("end",e),t.bo=null})}}]),n(t,[{key:"rotate",value:function(){var t=r(regeneratorRuntime.mark(function t(){var e,n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.Mo().Fo()){t.next=6;break}return this.rotation+=90,this.rotation%=360,e=this.rotation,this.xo(),this.dn.classList.add("rotating"),n=this,r=new Promise(function(t){setTimeout(t,250)}).then(function(){n.rotation===e&&n.dn.classList.remove("rotating")}),t.abrupt("return",(this.Mo().Do(r),r));case 6:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"wo",value:function(e){if(!(e instanceof t)||e.children.length!==this.children.length)return!1;for(var n=0;n<this.children.length;n++)if(!this.children[n].wo(e.children[n]))return!1;return!0}},{key:"yo",value:function(t){this.rotation=t[0],t.splice(0,1);for(var e=0,n=this.children.length;e<n;e++)t=this.children[e].yo(t);return t}},{key:"fo",value:function(t){t.push(this.rotation);for(var e=0,n=this.children.length;e<n;e++)t=this.children[e].fo(t);return t}},{key:"Ho",value:function(){for(var t=0,e=this.children.length;t<e;t++)if(!this.children[t].Ho())return!1;return 0===this.rotation||this.children[0].wo(this.children[2])&&this.children[1].wo(this.children[3])&&(2===this.rotation||this.children[0].wo(this.children[1]))}},{key:"Ro",value:function(t){this.children=[];for(var e=0,n=t.length;e<n;e++)this.Bo(t[e])}},{key:"Bo",value:function(t){this.children.push(t),t.So(this),this.vo()}},{key:"xo",value:function(){this.dn.classList.remove(this.Lo),this.Lo="rotate-"+this.rotation,"rotate-0"===this.Lo&&(this.Lo="rotate-360"),this.dn.classList.add(this.Lo)}},{key:"vo",value:function(){var t=this.ko();t>=2&&this.dn.classList.add("layer-"+t);var e=this.dn.querySelector(".child-container");e.removeAllChildren(),this.xo(),this.dn.removeEventListener("mouseup",this.Co),this.dn.removeEventListener("touchend",this.Ao),this.dn.addEventListener("mouseup",this.Co),this.dn.addEventListener("touchend",this.Ao);for(var n=0,r=this.children.length;n<r;n++)this.children[n].vo(),e.appendChild(this.children[n].To()),n%2==1&&this.children.length-1!==n&&e.appendChild(document.createElement("br"))}},{key:"ko",value:function(){return this.children.length>=1&&this.children[0]&&this.children[0]instanceof t?this.children[0].ko()+1:1}}]),t}();ft.Po();var dt=function(){function t(e,n){var r;return s(this,t),(r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))).Io="A",v.F(n)&&r.Uo(n),r}return o(t,ht),n(t,[{key:"wo",value:function(e){return e instanceof t&&e.Io===this.Io}},{key:"Uo",value:function(t){this.Io=t}},{key:"vo",value:function(){this.dn.querySelector(".leaf-element").removeAllChildren().appendChild(document.createTextNode(this.Io))}}]),t}(),vt=function(){function t(e,n,r,i){s(this,t),this.Eo=e,this.Oo=n,this.Wo=r,this.No=i}return n(t,[{key:"_o",value:function(){return v.cloneNode(this.Eo)}},{key:"jo",value:function(){return v.cloneNode(this.Oo)}},{key:"Vo",value:function(){return v.cloneNode(this.Wo)}},{key:"Jo",value:function(){return v.cloneNode(this.No)}}]),t}(),pt=function(){function t(e){s(this,t),this.zo=null,this.words=[],this.qo=[],this.Ko=e,this.Xo=!1,this.id=null,this.$o=null,this.Go=null;var n=this;this.Qo=new Promise(function(t,e){n.$o=t,n.Go=e})}return n(t,[{key:"Yo",value:function(){var t=this.fo();localStorage.setItem("currentLevel",JSON.stringify({id:this.id,rotations:t}))}},{key:"fo",value:function(){return null!==this.zo?this.zo.fo([]):[]}},{key:"Zo",value:function(t){this.id=t}},{key:"_",value:function(){return this.id}},{key:"Mo",value:function(){return this}},{key:"ta",value:function(t){this.zo=t,this.zo.So(this),this.qo&&this.yo()}},{key:"ea",value:function(t){this.words=[];for(var e=0,n=t.length;e<n;e++)this.words.push(t[e].toUpperCase())}},{key:"na",value:function(t){this.qo=t}},{key:"yo",value:function(t){this.zo&&(t=v.o(t,this.qo),this.zo.yo(t))}},{key:"Fo",value:function(){return this.Xo}},{key:"Do",value:function(t){if(this.zo.Ho()){this.Xo=!0;var e=this;return t.then(function(){e.$o(!0)}),!0}return this.Yo(),!1}},{key:"sa",value:function(){return this.Qo}},{key:"ra",value:function(){return this.zo}},{key:"ia",value:function(){}}],[{key:"oa",value:function(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(new dt(v.cloneNode(e),t.charAt(r)));return n}}]),t}(),yt=function(){function t(){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,ft),n(t,[{key:"rotate",value:function(){}},{key:"yo",value:function(t){for(var e=0,n=this.children.length;e<n;e++)t=this.children[e].yo(t);return t}},{key:"fo",value:function(t){for(var e=0,n=this.children.length;e<n;e++)t=this.children[e].fo(t);return t}},{key:"vo",value:function(){var t=this.dn.querySelector(".child-container");t.removeAllChildren(),this.xo();var e=this;this.dn.onclick=function(t){e.rotate(),t.stopPropagation()};for(var n=0,r=this.children.length;n<r;n++)this.children[n].vo(),t.appendChild(this.children[n].To())}}]),t}(),gt=function(){function t(e,n){var r;return s(this,t),(r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))).aa=n,r}return o(t,pt),n(t,[{key:"ia",value:function(){if(this.words.length>=2&&this.words[0].length>=this.aa&&this.words[1].length>=this.aa){for(var t=pt.oa(this.words[0],this.Ko._o()),e=pt.oa(this.words[1],this.Ko._o()),n=new yt(this.Ko.Vo()),r=0,i=this.aa/2;r<i;r++){var o=new ft(this.Ko.jo());o.Bo(t[2*r]),o.Bo(t[2*r+1]),o.Bo(e[2*r]),o.Bo(e[2*r+1]),n.Bo(o)}this.ta(n)}}}]),t}(),mt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,6))}return o(t,gt),t}(),kt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,8))}return o(t,gt),t}(),wt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,10))}return o(t,gt),t}(),_t=function(){function t(){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,yt),t}(),bt=function(){function t(e,n){var r;return s(this,t),(r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))).aa=n,r}return o(t,pt),n(t,[{key:"ia",value:function(){if(this.words.length>=6&&this.words[0].length>=this.aa&&this.words[1].length>=this.aa&&this.words[2].length>=this.aa&&this.words[3].length>=this.aa&&this.words[4].length>=this.aa&&this.words[5].length>=this.aa){var t=[];t[0]=pt.oa(this.words[0],this.Ko._o()),t[1]=pt.oa(this.words[1],this.Ko._o()),t[2]=pt.oa(this.words[2],this.Ko._o()),t[3]=pt.oa(this.words[3],this.Ko._o()),t[4]=pt.oa(this.words[4],this.Ko._o()),t[5]=pt.oa(this.words[5],this.Ko._o());for(var e=new yt(this.Ko.Vo()),n=0;n<this.aa/4;n++){var r=[];r[0]=new ft(this.Ko.jo()),r[1]=new ft(this.Ko.jo()),r[2]=new ft(this.Ko.jo()),r[3]=new ft(this.Ko.jo()),r[4]=new ft(this.Ko.jo()),r[5]=new ft(this.Ko.jo()),r[0].Bo(t[0][4*n]),r[0].Bo(t[0][4*n+1]),r[0].Bo(t[1][4*n]),r[0].Bo(t[1][4*n+1]),r[1].Bo(t[0][4*n+2]),r[1].Bo(t[0][4*n+3]),r[1].Bo(t[1][4*n+2]),r[1].Bo(t[1][4*n+3]),r[2].Bo(t[2][4*n]),r[2].Bo(t[2][4*n+1]),r[2].Bo(t[3][4*n]),r[2].Bo(t[3][4*n+1]),r[3].Bo(t[2][4*n+2]),r[3].Bo(t[2][4*n+3]),r[3].Bo(t[3][4*n+2]),r[3].Bo(t[3][4*n+3]),r[4].Bo(t[4][4*n]),r[4].Bo(t[4][4*n+1]),r[4].Bo(t[5][4*n]),r[4].Bo(t[5][4*n+1]),r[5].Bo(t[4][4*n+2]),r[5].Bo(t[4][4*n+3]),r[5].Bo(t[5][4*n+2]),r[5].Bo(t[5][4*n+3]);var i=new ft(this.Ko.jo()),o=new _t(this.Ko.Jo());if(n%2==0){i.Bo(r[0]),i.Bo(r[1]),i.Bo(r[2]),i.Bo(r[3]);var s=new yt(this.Ko.Vo());s.Bo(r[4]),s.Bo(r[5]),o.Bo(i),o.Bo(s),o.To().classList.add("type-1")}else{var a=new yt(this.Ko.Vo());a.Bo(r[0]),a.Bo(r[1]),o.Bo(a),o.Bo(i),i.Bo(r[2]),i.Bo(r[3]),i.Bo(r[4]),i.Bo(r[5]),o.To().classList.add("type-2")}e.Bo(o)}this.ta(e)}}}]),t}(),Ot=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,8))}return o(t,bt),t}(),Lt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,12))}return o(t,bt),t}(),Pt=function(){function t(e,n){var r;return s(this,t),(r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))).aa=n,r}return o(t,pt),n(t,[{key:"ia",value:function(){if(this.words.length>=4&&this.words[0].length>=this.aa&&this.words[1].length>=this.aa&&this.words[2].length>=this.aa&&this.words[3].length>=this.aa){var t=[];t[0]=pt.oa(this.words[0],this.Ko._o()),t[1]=pt.oa(this.words[1],this.Ko._o()),t[2]=pt.oa(this.words[2],this.Ko._o()),t[3]=pt.oa(this.words[3],this.Ko._o());for(var e=new yt(this.Ko.Vo()),n=0;n<this.aa/4;n++){var r=[];r[0]=new ft(this.Ko.jo()),r[1]=new ft(this.Ko.jo()),r[2]=new ft(this.Ko.jo()),r[3]=new ft(this.Ko.jo()),r[0].Bo(t[0][4*n]),r[0].Bo(t[0][4*n+1]),r[0].Bo(t[1][4*n]),r[0].Bo(t[1][4*n+1]),r[1].Bo(t[0][4*n+2]),r[1].Bo(t[0][4*n+3]),r[1].Bo(t[1][4*n+2]),r[1].Bo(t[1][4*n+3]),r[2].Bo(t[2][4*n]),r[2].Bo(t[2][4*n+1]),r[2].Bo(t[3][4*n]),r[2].Bo(t[3][4*n+1]),r[3].Bo(t[2][4*n+2]),r[3].Bo(t[2][4*n+3]),r[3].Bo(t[3][4*n+2]),r[3].Bo(t[3][4*n+3]);var i=new ft(this.Ko.jo());i.Bo(r[0]),i.Bo(r[1]),i.Bo(r[2]),i.Bo(r[3]),e.Bo(i)}this.ta(e)}}}]),t}(),xt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,8))}return o(t,Pt),t}(),jt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,12))}return o(t,Pt),t}(),Et=function(){function t(){s(this,t)}return n(t,null,[{key:"la",value:function(e,n){t.types[e]=n}},{key:"ua",value:function(e){return t.types[e]}},{key:"ha",value:function(e,n){var r=new t.types[e.rendererType](n);r.ea(e.words),r.Zo(e.id);for(var i=0,o=e.rotations.length;i<o;i++)e.rotations[i]<=4&&(e.rotations[i]=90*e.rotations[i]);return r.na(e.rotations),r}}]),t}();Et.types={20:mt,40:kt,60:wt,100:Ot,120:xt,140:Lt,160:jt};var Ct=function(){function t(){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"wordRotator",3))}return o(t,E),n(t,null,[{key:"Vt",value:function(){return v.gt(t.Xt)&&(t.Xt=new t),t.Xt}}]),n(t,[{key:"rr",value:function(e,n,r,i){(v.gt(n)||n<1&&r>=1)&&e.createObjectStore(t.da.ca,{keyPath:"id"}),(v.gt(n)||n<2&&r>=2)&&i.target.transaction.objectStore(t.da.ca).createIndex("played",["deleted","played","difficulty","id"],{unique:!1}),(v.gt(n)||n<3&&r>=3)&&i.target.transaction.objectStore(t.da.ca).createIndex("difficulty","difficulty",{unique:!1})}},{key:"ma",value:function(){var e=r(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.ur(n,t.da.ca));case 1:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"ga",value:function(){var e=r(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.load(n,t.da.ca));case 1:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"pa",value:function(){var e=r(regeneratorRuntime.mark(function e(n){var r,i,o,s,a,u;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cr("difficulty",IDBKeyRange.lowerBound(0),t.da.ca);case 2:for(r=e.sent,i=[],o=[],s=-1,a=0,u=r.length;a<u;a++)!(s<0||s===r[a].difficulty)||r[a].deleted||r[a].played||-1===n.indexOf(r[a].rendererType)?0===r[a].difficulty||r[a].deleted||r[a].played||i.push(r[a]):(o.push(r[a]),s=r[a].difficulty);return e.abrupt("return",0===o.length?null:o[Math.round(Math.random()*o.length)%o.length]);case 6:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"fa",value:function(){var e=r(regeneratorRuntime.mark(function e(n){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ga(n);case 2:return(r=e.sent).played=!0,e.next=6,this.lr(r,t.da.ca);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}]),t}();Ct.da={ca:"level"},Ct.Xt=null;var St=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"html/application/end.html"))}return o(t,w),t}(),Tt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"html/application/level.html"))}return o(t,w),n(t,[{key:"vn",value:function(n){return n=e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"vn",this).call(this,n),this.wa=new u("",function(){},c.q,0),this.wa.P(!1),n.nt(this.wa),n}},{key:"Qe",value:function(n){return this.Sa=v.o(localStorage.getItem("levelCounter"),1),e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Qe",this).call(this,n)}},{key:"Ze",value:function(){e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ze",this).call(this);var n=this.rn("#segment-leaf-template"),r=this.rn("#segment-parent-template"),i=this.rn("#segment-row-template"),o=this.rn("#segment-triangle-template");n.id=null,r.id=null,i.id=null,o.id=null,n.remove(),r.remove(),i.remove(),o.remove();var s=this,a=this.rn("#continue-button");a.addEventListener("click",function(){s.Ma()});var u=this.rn("#won-text"),l=new W;l.zi(a,a.parentElement,!1,!0),l.zi(u,u.parentElement),this.wa.T(this.Sa),this.Ko=new vt(n,r,i,o),this.Ha()}},{key:"Ha",value:function(){var t=r(regeneratorRuntime.mark(function t(){var e,n,r,i,o,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,null===(e=localStorage.getItem("currentLevel"))){t.next=16;break}return e=JSON.parse(e),console.log("LevelID: ",e.id),n=Ct.Vt(),t.next=7,n.ga(e.id);case 7:if(null!==(r=t.sent)){t.next=10;break}return t.abrupt("return",this.Ma());case 10:return(i=Et.ha(r,this.Ko)).na(e.rotations),o=this,i.sa().then(function(){o.va(i)}),i.ia(),i.ra().vo(),i.Yo(),s=this.rn("#level"),t.abrupt("return",(s.removeAllChildren().appendChild(i.ra().To()),(new W).zi(s,s.parentElement,!1,!1,2,2*i.words[0].length),void(this.level=i)));case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),console.error(t.t0);case 21:return t.abrupt("return",this.Ma());case 22:case"end":return t.stop()}},t,this,[[0,18]])}));return function(){return t.apply(this,arguments)}}()},{key:"Ma",value:function(){var t=r(regeneratorRuntime.mark(function t(){var e,n,r,i,o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.ze.classList.remove("won"),e=Ct.Vt(),t.next=5,e.pa([20,40,60,100,120,140,160]);case 5:if(null!==(n=t.sent)){t.next=8;break}return t.abrupt("return",void this.pn(St));case 8:r=Et.ha(n,this.Ko),i=this,r.sa().then(function(){i.va(r)}),r.ia(),r.ra().vo(),r.Yo(),(o=this.rn("#level")).removeAllChildren().appendChild(r.ra().To()),(new W).zi(o,o.parentElement,!1,!1,2,2*r.words[0].length),this.level=r,t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.error(t.t0);case 17:case"end":return t.stop()}},t,this,[[0,14]])}));return function(){return t.apply(this,arguments)}}()},{key:"va",value:function(){var t=r(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=Ct.Vt().fa(e._()),this.Sa++,localStorage.setItem("levelCounter",this.Sa),this.wa.T(this.Sa),this.wa.U(),this.ze.classList.add("won"),localStorage.removeItem("currentLevel"),t.next=10,n;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),console.error(t.t0);case 15:case"end":return t.stop()}},t,this,[[0,12]])}));return function(){return t.apply(this,arguments)}}()}]),t}(),Bt=function(){function t(e){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,"html/application/sync.html"))}return o(t,w),n(t,[{key:"Qe",value:function(){var n=r(regeneratorRuntime.mark(function n(r){var i;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Qe",this).call(this,r);case 2:return i=n.sent,n.next=5,this.ya();case 5:return n.abrupt("return",i);case 6:case"end":return n.stop()}},n,this)}));return function(){return n.apply(this,arguments)}}()},{key:"Ze",value:function(){e(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"Ze",this).call(this),this.pn(Tt)}},{key:"ya",value:function(){var t=r(regeneratorRuntime.mark(function t(){var e,n,r,i,o,s,a,u,l,c,h,f;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=v.o(localStorage.getItem("date-last-sync"),0),n=Ct.Vt(),r=null,i=1,o=[],s=0;case 3:if(!(s<i)){t.next=16;break}return t.next=6,V.load("wordRotator/levels"+V.ee({currentRun:s,dateLastSync:e}));case 6:if((a=t.sent).success){t.next=9;break}return t.abrupt("break",16);case 9:for(a=a.result,r=v.o(r,a.currentSyncDate),i=a.maxRuns,u=a.levels,l=function(t){var e=u[t];o.push(n.ga(u[t].id).then(function(t){return e.played=v.o(v.o(t,{}).played,!1),e}))},c=0,h=u.length;c<h;c++)l(c,h);case 13:s++,t.next=3;break;case 16:return t.next=18,Promise.all(o);case 18:return f=t.sent,t.next=21,n.ma(f);case 21:null!=r&&"null"!==r&&localStorage.setItem("date-last-sync",r);case 22:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}();String.prototype.format||(String.prototype.format=function(t){return this.replace(/{(\d+)}/g,function(e,n){return void 0!==t[n]?t[n]:e})}),Object.assign=v.o(Object.assign,function(e,n){if(e=v.o(e,{}),null===n||"object"!=(void 0===n?"undefined":t(n))||"isActiveClone"in n)return e;for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(n.isActiveClone=null,e[r]=n[r],delete n.isActiveClone);return e}),"undefined"!=typeof window&&(v.F(window.Node)&&!window.Node.prototype.removeAllChildren&&(Node.prototype.removeAllChildren=function(){for(;this.firstChild;)this.removeChild(this.firstChild);return this}),HTMLElement&&(HTMLElement.prototype.fadeOut=v.o(HTMLElement.prototype.fadeOut,function(t,e,n){t=v.o(t,.5),e=v.o(e,"ease-in-out"),n=v.o(n,0),this.style.transition="opacity "+t+"s "+e+" "+n+"s";var r=this,i=new Promise(function(t){var e=function e(i){r.removeEventListener("transitionend",e),r.removeEventListener("transitioncancel",n),r.style.opacity=null,r.style.transition=null,t(!0,i)},n=function n(i){r.removeEventListener("transitionend",e),r.removeEventListener("transitioncancel",n),r.style.opacity=null,r.style.transition=null,t(!1,i)};r.addEventListener("transitionend",e),r.addEventListener("transitioncancel",n)});return requestAnimationFrame(function(){requestAnimationFrame(function(){r.style.opacity=0})}),i}),HTMLElement.prototype.fadeIn=v.o(HTMLElement.prototype.fadeIn,function(t,e,n){t=v.o(t,.5),e=v.o(e,"ease-in-out"),n=v.o(n,0),this.style.transition="opacity "+t+"s "+e+" "+n+"s";var r=this,i=new Promise(function(t){var e=function e(i){r.removeEventListener("transitionend",e),r.removeEventListener("transitioncancel",n),r.style.opacity=null,r.style.transition=null,t(!0,i)},n=function n(i){r.removeEventListener("transitionend",e),r.removeEventListener("transitioncancel",n),r.style.opacity=null,r.style.transition=null,t(!1,i)};r.addEventListener("transitionend",e),r.addEventListener("transitioncancel",n)});return requestAnimationFrame(function(){requestAnimationFrame(function(){r.style.opacity=1})}),i})),Node&&(Node.prototype.replaceWith=v.o(Node.prototype.replaceWith,function(t){this.parentElement.replaceChild(t,this)}),Node.prototype.remove=v.o(Node.prototype.remove,function(){this.parentElement.removeChild(this)})),Element&&(Element.prototype.matches=v.o(Element.prototype.matches,v.o(Element.prototype.matchesSelector,Element.prototype.webkitMatchesSelector)),window.Element.prototype.closest=v.o(window.Element.prototype.getAll,function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement}while(null!==e);return null})),window.IDBObjectStore.prototype.getAll=v.o(window.IDBObjectStore.prototype.getAll,function(){var t={},e=[];return this.openCursor().onsuccess=function(n){var r=n.target.result;v.F(r)?(e.push(r.value),r.continue()):v.F(t.onsuccess)&&t.onsuccess({currentTarget:{result:e}})},t})),String.prototype.startsWith=v.o(String.prototype.startsWith,function(t,e){return e=e||0,this.indexOf(t,e)===e}),String.prototype.endsWith=v.o(String.prototype.endsWith,function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),window.fetch=v.o(window.fetch,function(t){console.log("customFetch",t);var e=null;if(window.XMLHttpRequest)e=new XMLHttpRequest;else if(window.Er)try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}var n=new Promise(function(t){e.onload=function(){var e=this.responseText;t({json:function(){return Promise.resolve(JSON.parse(e))},text:function(){return Promise.resolve(e)}})},e.onerror=function(e){t(Promise.reject(e))}});return e.open("get",t,!0),e.send(),n}),p.Ae(new R("red","")),p.Ae(new R("blue","blue")),p.Ae(new R("black","black")),p.Ae(new R("green","green")),p.Ae(new R("pink","pink")),T.Fr(new F("img/whatsapp.svg")),T.Fr(new B("img/sms.svg")),T.Fr(new A("img/telegram.svg"));var At=new L;At.Ss(!0),At.es(d.Kt()),window.ThemeManager=p,window.ThemeManager.addChangeListener=p.addChangeListener,window.app=At,window.app.refreshCurrentSite=At.refreshCurrentSite,window.Translator=d,window.Translator.setLanguage=d.setLanguage,j.resolve(At).then(function(){At.start(Bt),d.setLanguage("de")});