/*
* Copyright (C) 2016-2021 Jones Magloire @Joxit
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* @license AGPL
*/
!function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var i=this;return r[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!=typeof e[e.length-1]&&e.push(o(e,i)),t.apply(this,e)}))}return r[Symbol.replace].call(this,e,t)},E.apply(this,arguments)}var A,w,C,N;
/* Riot v5.3.1, @license MIT */function I(e){return e.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))}function R(e,t){e.firstChild&&(t.appendChild(e.firstChild),R(e,t))}function k(e){Array.from(e).forEach(U)}var U=function(e){return e&&e.parentNode&&e.parentNode.removeChild(e)},O=function(e,t){return t&&t.parentNode&&t.parentNode.insertBefore(e,t)},S=new Map,B=Symbol("riot-component"),L=new Set,D="is",j="mount",_="update",M="unmount",P="shouldUpdate",G="onBeforeMount",V="onMounted",z="onBeforeUpdate",$="onUpdated",H="onBeforeUnmount",F="onUnmounted",q="props",K="state",W="slots",X="root",Y=Symbol("pure"),Q=Symbol("is_updating"),J=Symbol("parent"),Z=Symbol("attributes"),ee=Symbol("template"),te=Object.freeze({__proto__:null,COMPONENTS_IMPLEMENTATION_MAP:S,DOM_COMPONENT_INSTANCE_PROPERTY:B,PLUGINS_SET:L,IS_DIRECTIVE:D,VALUE_ATTRIBUTE:"value",MOUNT_METHOD_KEY:j,UPDATE_METHOD_KEY:_,UNMOUNT_METHOD_KEY:M,SHOULD_UPDATE_KEY:P,ON_BEFORE_MOUNT_KEY:G,ON_MOUNTED_KEY:V,ON_BEFORE_UPDATE_KEY:z,ON_UPDATED_KEY:$,ON_BEFORE_UNMOUNT_KEY:H,ON_UNMOUNTED_KEY:F,PROPS_KEY:q,STATE_KEY:K,SLOTS_KEY:W,ROOT_KEY:X,IS_PURE_SYMBOL:Y,IS_COMPONENT_UPDATING:Q,PARENT_KEY_SYMBOL:J,ATTRIBUTES_KEY_SYMBOL:Z,TEMPLATE_KEY_SYMBOL:ee}),ne={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4},re={ATTRIBUTE:0,EVENT:1,TEXT:2,VALUE:3},ae=Symbol("head"),ie=Symbol("tail");function oe(e){var t=e.dom.cloneNode(!0),n=function(){var e=document.createComment("fragment head"),t=document.createComment("fragment tail");return e[ae]=!0,t[ie]=!0,{head:e,tail:t}}(),r=n.head,a=n.tail;return{avoidDOMInjection:!0,fragment:t,head:r,tail:a,children:[r].concat(g(Array.from(t.childNodes)),[a])}}function se(e){var t=e.head,n=e.tail,r=ue([t],t.nextSibling,(function(e){return e===n}),!1);return r.push(n),r}function ue(e,t,n,r){var a=t.nextSibling;return r||t[ae]||t[ie]||e.push(t),!a||n(t)?e:ue(e,a,n,r&&!t[ie]||a[ae])}function le(t,n){return e(t)===n}function ce(e){var t=e.ownerSVGElement;return!!t||null===t}function pe(e){return!me(e.content)}function de(e){return le(e,"function")}function fe(e){return!me(e)&&e.constructor===Object}function me(e){return null==e}var he=Symbol("unmount"),ge={nodes:[],mount:function(e,t){return this.update(e,t)},update:function(e,t){var n=this.placeholder,r=this.nodes,a=this.childrenMap,i=e===he?null:this.evaluate(e),o=function(e,t,n,r){var a=r.condition,i=r.template,o=r.childrenMap,s=r.itemName,u=r.getKey,l=r.indexName,c=r.root,p=r.isTemplateTag,d=new Map,f=[],m=[];return e.forEach((function(e,r){var h=function(e,t){var n=t.itemName,r=t.indexName,a=t.index,i=t.item;e[n]=i,r&&(e[r]=a);return e}(Object.create(t),{itemName:s,indexName:l,index:r,item:e}),v=u?u(h):r,y=o.get(v),x=[];if(!function(e,t){return!!e&&!1===Boolean(e(t))}(a,h)){var b=!y,T=y?y.template:i.clone(),E=T.el||c.cloneNode(),A=p&&b?oe(T):T.meta;b?f.push((function(){return T.mount(E,h,n,A)})):f.push((function(){return T.update(h,n)})),p?x.push.apply(x,g(b?A.children:se(A))):x.push(E),o.delete(v),m.push.apply(m,x),d.set(v,{nodes:x,template:T,context:h,index:r})}})),{newChildrenMap:d,batches:f,futureNodes:m}}(i?Array.from(i):[],e,t,this),s=o.newChildrenMap,u=o.batches,l=o.futureNodes;return function(e,t,n,r){for(var a,i,o=t.length,s=e.length,u=o,l=0,c=0,p=null;lh-c)for(var y=n(e[l],0);c'.concat(e,""),"application/xml").documentElement,!0)}(t,e):function(e,t){var n=pe(t)?t:document.createElement("template");return n.innerHTML=e,n.content}(t,e)}function $e(e,t){switch(!0){case ce(e):R(t,e);break;case pe(e):e.parentNode.replaceChild(t,e);break;default:e.appendChild(t)}}var He=Object.freeze({createDOM:function(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?ze(e,t):t)}(e,this.html),this},mount:function(e,t,n,r){var a=this;if(void 0===r&&(r={}),!e)throw new Error("Please provide DOM node to mount properly your template");this.el&&this.unmount(t);var i=r,o=i.fragment,s=i.children,u=i.avoidDOMInjection,l=(s?s[0]:e).parentNode,c=pe(e),p=c?Math.max(Array.from(l.childNodes).indexOf(e),0):null;return this.isTemplateTag=c,this.createDOM(e),this.dom&&(this.fragment=o||this.dom.cloneNode(!0)),this.el=this.isTemplateTag?l:e,this.children=this.isTemplateTag?s||Array.from(this.fragment.childNodes):null,!u&&this.fragment&&$e(e,this.fragment),this.bindings=this.bindingsData.map((function(e){return Ve(a.el,e,p)})),this.bindings.forEach((function(e){return e.mount(t,n)})),this.meta=r,this},update:function(e,t){return this.bindings.forEach((function(n){return n.update(e,t)})),this},unmount:function(e,t,n){if(this.el){switch(this.bindings.forEach((function(r){return r.unmount(e,t,n)})),!0){case this.el[Y]:break;case this.children&&null!==n:k(this.children);break;case!0===n:U(this.el);break;case null!==n:k(this.el.childNodes)}this.el=null}return this},clone:function(){return Object.assign({},this,{meta:{},el:null})}});function Fe(e,t){return void 0===t&&(t=[]),Object.assign({},He,{html:e,bindingsData:t})}var qe=Object.freeze({__proto__:null,template:Fe,createBinding:Ve,createExpression:Le,bindingTypes:ne,expressionTypes:re});function Ke(){return this}function We(e){return de(e)?e.prototype&&e.prototype.constructor?new e:e():e}function Xe(e,t,n,r){return void 0===r&&(r={}),Object.defineProperty(e,t,Object.assign({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function Ye(e,t,n){return Object.entries(t).forEach((function(t){var r=m(t,2),a=r[0],i=r[1];Xe(e,a,i,n)})),e}function Qe(e,t){return Object.entries(t).forEach((function(t){var n=m(t,2),r=n[0],a=n[1];e[r]||(e[r]=a)})),e}function Je(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}function Ze(e,t){return Je("string"==typeof e?(t||document).querySelectorAll(e):e)}var et=function(e){return 1===e.length?e[0]:e};function tt(t,n,r){var i="object"===e(n)?n:a({},n,r),o=Object.keys(i);return Je(t).forEach((function(e){o.forEach((function(t){return e.setAttribute(t,i[t])}))})),t}function nt(e,t){return function(e,t,n){var r="string"==typeof t?[t]:t;return et(Je(e).map((function(e){return et(r.map((function(t){return e[n](t)})))})))}(e,t,"getAttribute")}var rt,at=new Map,it=function(){return rt||(tt(rt=Ze("style[riot]")[0]||document.createElement("style"),"type","text/css"),rt.parentNode||document.head.appendChild(rt),rt)},ot={CSS_BY_NAME:at,add:function(e,t){return at.has(e)||(at.set(e,t),this.inject()),this},inject:function(){return it().innerHTML=g(at.values()).join("\n"),this},remove:function(e){return at.has(e)&&(at.delete(e),this.inject()),this}};function st(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{this.props.link&&(window.location.href=this.props.link),"function"==typeof e&&e(t)}},onWaveStart(e){"function"==typeof this.props.onWaveStart&&this.props.onWaveStart(e)},onWaveEnd(e){"function"==typeof this.props.onWaveEnd&&this.props.onWaveEnd(e)}},template:function(e,t,n,r){return e('
',[{type:n.IF,evaluate:function(e){return e.state.opening||e.state.opened},redundantAttribute:"expr517",selector:"[expr517]",template:e('',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return["dropdown-content ",e.state.opening?"opening":""].join("")}}]},{type:n.EACH,getKey:null,condition:null,template:e('',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return e.props.selected==e.key?"selected":""}}]},{type:n.IF,evaluate:function(e){return!e.item.link},redundantAttribute:"expr519",selector:"[expr519]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.item.title}},{type:t.EVENT,name:"onclick",evaluate:function(e){return e.select.bind(null,{item:e.item,key:e.key})}}]}])},{type:n.IF,evaluate:function(e){return e.item.link},redundantAttribute:"expr520",selector:"[expr520]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.item.title}},{type:t.ATTRIBUTE,name:"href",evaluate:function(e){return e.item.link}},{type:t.EVENT,name:"onclick",evaluate:function(e){return e.select(e.item)}},{type:t.ATTRIBUTE,name:"title",evaluate:function(e){return e.item.title}}]}])}]),redundantAttribute:"expr518",selector:"[expr518]",itemName:"item",indexName:"key",evaluate:function(e){return e.props.items}}])}])},name:"material-dropdown-list"},kt={css:null,exports:{onMounted(e,t){this.updateClasses()},onUpdated(e,t){this.updateClasses()},updateClasses(){const e=this.$(".mini-footer");for(let e=0;e0&&e.classList.add(`material-footer-${e.slot}`)}},template:function(e,t,n,r){return e('',[{type:n.SLOT,attributes:[],name:"sections",redundantAttribute:"expr511",selector:"[expr511]"},{type:n.SLOT,attributes:[],name:"logo",redundantAttribute:"expr512",selector:"[expr512]"},{type:n.SLOT,attributes:[],name:"link-list",redundantAttribute:"expr513",selector:"[expr513]"},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr514",selector:"[expr514]"}])},name:"material-footer"},Ut=function(){function e(n){if(t(this,e),n||console.debug("Sorry, but for using validate mixin you should add an opts argument"),this.type=n.type,n.valid){if(this.validationType="function"==typeof this[n.valid]?"Function":"Regexp","Regexp"===this.validationType)try{this.validationRegexp=new RegExp(n.valid)}catch(e){throw new Error("Something wrong with your regular expression!. Checkout --- ".concat(e))}"Function"===this.validationType&&(this.validationFunction=this[n.valid]||!1)}else n&&-1!=Object.keys(this.base).indexOf(this.type)&&(this.validationType="Type")}return r(e,[{key:"base",get:function(){return{email:/^(([\w\.\-_]+)@[\w\-\_]+(\.\w+){1,}|)$/i,number:/^(\d+|)$/i,tel:/^((\+|\d)?([\d\-\(\)\#])|)+$/i,url:/([--:\w?@%&+~#=]*\.[a-z]{2,4}\/{0,2})((?:[?&](?:\w+)=(?:\w+))+|[--:\w?@%&+~#=]+)?/i}}},{key:"validate",value:function(e){return!this.validationType||this["validateBy"+this.validationType](e)}},{key:"validateByFunction",value:function(e){if(this.validationFunction)return this.validationFunction(e)}},{key:"validateByRegexp",value:function(e){if(this.validationRegexp)return this.validationRegexp.test(e)}},{key:"validateByType",value:function(e){return this.base[this.type].test(e)}}]),e}(),Ot={css:null,exports:{state:{focused:!1,showIcon:!1,value:"",disabled:!1,required:!1,error:!1},onMounted(){if(this.required="",this.notSupportedTypes=["date","color","datetime","month","range","time"],-1!=this.notSupportedTypes.indexOf(this.props.type))throw new Error(`Sorry but we do not support ${this.props.type} type yet!`);this.validator=new Ut(this.props),this.update({showIcon:!1,value:this.props.value||"",disabled:""===this.props.disabled||this.props.disabled||!1,required:""===this.props.required||this.props.required||!1}),this.$("input").addEventListener("focus",this.changeFocus),this.$("input").addEventListener("blur",this.changeFocus)},onBeforeUpdate(e,t){this.state.error=0!==t.value.length&&!this.validator.validate(t.value)},changeFocus(e){if(this.disabled)return!1;this.update({focused:this.$("input")==document.activeElement}),this.props.focuschanged&&"function"==typeof this.props.focuschanged&&this.props.focuschanged(this.focused,e)},changeValue(e){this.update({value:this.$("input").value}),this.props.valuechanged&&"function"==typeof this.props.valuechanged&&this.props.valuechanged(this.$("input").value,e)},iconClickHandler(e){this.props.iconclicked&&"function"==typeof this.props.iconclicked&&this.props.iconclicked.call(this,e)}},template:function(e,t,n,r){return e('