/*
* 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);nm-p)for(var y=n(e[l],0);p'.concat(e,""),"application/xml").documentElement,!0)}(t,e):function(e,t){var n=oe(t)?t:document.createElement("template");return n.innerHTML=e,n.content}(t,e)}function De(e,t){switch(!0){case ie(e):A(t,e);break;case oe(e):e.parentNode.replaceChild(t,e);break;default:e.appendChild(t)}}var Pe=Object.freeze({createDOM:function(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?je(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,p=oe(e),c=p?Math.max(Array.from(l.childNodes).indexOf(e),0):null;return this.isTemplateTag=p,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&&De(e,this.fragment),this.bindings=this.bindingsData.map((function(e){return Me(a.el,e,c)})),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[$]:break;case this.children&&null!==n:w(this.children);break;case!0===n:C(this.el);break;case null!==n:w(this.el.childNodes)}this.el=null}return this},clone:function(){return Object.assign({},this,{meta:{},el:null})}});function Ge(e,t){return void 0===t&&(t=[]),Object.assign({},Pe,{html:e,bindingsData:t})}var Ve=Object.freeze({__proto__:null,template:Ge,createBinding:Me,createExpression:ke,bindingTypes:Q,expressionTypes:J});function Fe(){return this}function He(e){return se(e)?e.prototype&&e.prototype.constructor?new e:e():e}function ze(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 $e(e,t,n){return Object.entries(t).forEach((function(t){var r=p(t,2),a=r[0],i=r[1];ze(e,a,i,n)})),e}function qe(e,t){return Object.entries(t).forEach((function(t){var n=p(t,2),r=n[0],a=n[1];e[r]||(e[r]=a)})),e}function Ke(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 We(e,t){return Ke("string"==typeof e?(t||document).querySelectorAll(e):e)}var Xe=function(e){return 1===e.length?e[0]:e};function Ye(t,n,r){var i="object"===e(n)?n:a({},n,r),o=Object.keys(i);return Ke(t).forEach((function(e){o.forEach((function(t){return e.setAttribute(t,i[t])}))})),t}function Qe(e,t){return function(e,t,n){var r="string"==typeof t?[t]:t;return Xe(Ke(e).map((function(e){return Xe(r.map((function(t){return e[n](t)})))})))}(e,t,"getAttribute")}var Je,Ze=new Map,et=function(){return Je||(Ye(Je=We("style[riot]")[0]||document.createElement("style"),"type","text/css"),Je.parentNode||document.head.appendChild(Je),Je)},tt={CSS_BY_NAME:Ze,add:function(e,t){return Ze.has(e)||(Ze.set(e,t),this.inject()),this},inject:function(){return et().innerHTML=d(Ze.values()).join("\n"),this},remove:function(e){return Ze.has(e)&&(Ze.delete(e),this.inject()),this}};function nt(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:"expr46",selector:"[expr46]",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:"expr48",selector:"[expr48]",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:"expr49",selector:"[expr49]",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:"expr47",selector:"[expr47]",itemName:"item",indexName:"key",evaluate:function(e){return e.props.items}}])}])},name:"material-dropdown-list"},wt={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:"expr59",selector:"[expr59]"},{type:n.SLOT,attributes:[],name:"logo",redundantAttribute:"expr60",selector:"[expr60]"},{type:n.SLOT,attributes:[],name:"link-list",redundantAttribute:"expr61",selector:"[expr61]"},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr62",selector:"[expr62]"}])},name:"material-footer"},Ct=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}(),Nt={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 Ct(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('
',bindings:[{redundantAttribute:"expr86",selector:"[expr86]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.props.cut?e.cut(e.tab.title):e.tab.title}},{type:t.ATTRIBUTE,name:"title",evaluate:function(e){return e.tab.title}}]}]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:function(e){return t=>e.onTabChanged(t,e.k)}},{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return e.state.selected==e.k?"selected":""}},{type:t.ATTRIBUTE,name:"waves-opacity",evaluate:function(e){return e.props.wavesOpacity}},{type:t.ATTRIBUTE,name:"waves-duration",evaluate:function(e){return e.props.wavesDuration}},{type:t.ATTRIBUTE,name:"waves-center",evaluate:function(e){return e.props.wavesCenter}},{type:t.ATTRIBUTE,name:"waves-color",evaluate:function(e){return e.props.wavesColor}}]}]),redundantAttribute:"expr85",selector:"[expr85]",itemName:"tab",indexName:"k",evaluate:function(e){return e.props.tabs}},{type:n.IF,evaluate:function(e){return e.props.useLine},redundantAttribute:"expr87",selector:"[expr87]",template:e('',[])},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr88",selector:"[expr88]"}])},name:"material-tabs"},Ut=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(p,e);var n,a,u=(n=p,a=s(),function(){var e,t=i(n);if(a){var r=i(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return l(this,e)});function p(e,n,r){var a;return t(this,p),a=u.call(this),e||console.error("You should set container to the wave!"),a.container=e,a.maxOpacity=n.opacity||.6,a.duration=n.duration||750,a.color=n.color||"#fff",a.center=n.center||!1,a.event=r,a.containerBound=a.receiveBound(),a.maxScale=a.containerBound.size/100*10,a.created=Date.now(),a.start={},a.createNode(),a.waveIn(),a}return r(p,[{key:"createNode",value:function(){this.wave=document.createElement("div"),this.wave.classList.add("wave"),this.container.appendChild(this.wave)}},{key:"waveIn",value:function(){var e=this;this.center&&!this.event&&console.error("Setup at least mouse event... Or just set center attribute"),this.start.x=this.center?this.containerBound.height/2:this.event.pageY-this.containerBound.offsetTop,this.start.y=this.center?this.containerBound.width/2:this.event.pageX-this.containerBound.offsetLeft;var t=-1!==window.navigator.userAgent.indexOf("Trident");setTimeout((function(){return e.setStyles(e.maxOpacity)}),t?50:0)}},{key:"waveOut",value:function(e){var t=this,n=Date.now()-this.created,r=Math.round(this.duration/2)-n;setTimeout((function(){t.setStyles(0),setTimeout((function(){t.wave.parentNode===t.container&&(t.container.removeChild(t.wave),e())}),t.duration)}),r>0?r:0)}},{key:"setStyles",value:function(e){this.wave.setAttribute("style",this.convertStyle({top:"".concat(this.start.x,"px"),left:"".concat(this.start.y,"px"),transform:"scale(".concat(this.maxScale,")"),"transition-duration":"".concat(this.duration,"ms"),"transition-timing-function":"cubic-bezier(0.250, 0.460, 0.450, 0.940)",background:this.color,opacity:e}))}},{key:"convertStyle",value:function(e){var t="";return Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t+=n+":"+e[n]+";")})),t}}]),p}(function(){function n(){t(this,n)}return r(n,[{key:"receiveBound",value:function(){var t;this.container||console.error("Yor class must contain a container. It is DOM Element. Define please this.container property.");var n=this.container&&this.container.ownerDocument,r=n.documentElement;"undefined"!==e(this.container.getBoundingClientRect)&&(t=this.container.getBoundingClientRect());var a=this.getWindow(n);return this.mix(t,{size:Math.max(t.width,t.height),offsetTop:t.top+a.pageYOffset-r.clientTop,offsetLeft:t.left+a.pageXOffset-r.clientLeft})}},{key:"isWindow",value:function(e){return null!==e&&e===e.window}},{key:"getWindow",value:function(e){return this.isWindow(e)?e:9===e.nodeType&&e.defaultView}},{key:"mix",value:function(e,t){for(var n in e)n in t||(t[n]=e[n]);return t}}]),n}()),Ot={css:null,exports:{onMounted(){this._waves=[],this._events=[]},launch(e){var t=new Ut(this.$("#waves"),this.props,e);this._waves.push(t),this.props.onWaveStart&&this.props.onWaveStart(t),this._events.length||(this._events.push(e.target.addEventListener("mouseup",(()=>this.hold()))),this._events.push(e.target.addEventListener("mouseleave",(()=>this.hold()))))},hold(){this._waves[this._waves.length-1]&&this._waves[this._waves.length-1].waveOut(this.waveOut),this._waves[this._waves.length-1]&&this._waves.slice(this._waves.length-1,1)},waveOut(){this.props.onWaveEnd&&this.props.onWaveEnd()}},template:function(e,t,n,r){return e('',[{redundantAttribute:"expr84",selector:"[expr84]",expressions:[{type:t.EVENT,name:"onmousedown",evaluate:function(e){return e.launch}}]}])},name:"material-waves"};function St(e){var t={exports:{}};return e(t,t.exports),t.exports}function Bt(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;o+=e[s++]}if(!o)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:o}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,a=void 0===r?"./":r,i="[^"+Lt(t.delimiter||"/#?")+"]+?",o=[],s=0,u=0,l="",p=function(e){if(u-1:void 0===b;a||(f+="(?:"+d+"(?="+c+"))?"),T||(f+="(?="+d+"|"+c+")")}return new RegExp(f,_t(n))}(Bt(e,n),t,n)}function jt(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:U(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),g}},t}(t.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}}));var Dt=Symbol();function Pt(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),a=1;a',[{type:n.IF,evaluate:function(e){return e.state.route},redundantAttribute:"expr0",selector:"[expr0]",template:e('',[{type:n.SLOT,attributes:[{type:t.ATTRIBUTE,name:"route",evaluate:function(e){return e.state.route}}],name:"default",redundantAttribute:"expr1",selector:"[expr1]"}])}])},name:"route-hoc"},pn="popstate",cn="click",dn="/",fn=/^.+?\/\/+[^/]+/,hn=function(){return"undefined"==typeof window?null:window},mn=function(){return"undefined"==typeof document?null:document},gn=function(){var e=hn();return e?e.location:{}},vn=function(e){return e[e.length-1]===dn?e.substr(0,e.length-1):e},yn=function(e){var t,n=hn().location,r=n?"".concat(n.protocol,"//").concat(n.host):"",a=(n||{}).pathname;switch(!0){case!1===Boolean(e):return vn("".concat(r).concat(a||""));case/(www|http(s)?:)/.test(e):return e;case"#"===e[0]:return"".concat(r).concat(a&&a!==dn?a:"").concat(e);case e===dn:return vn(r);default:return vn("".concat(r).concat((t=e)[0]===dn?t:"".concat(dn).concat(t)))}};function xn(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 bn(e,t,n,r,a){var i;e=xn(e),(i=t,i.split(/\s/)).forEach((function(t){e.forEach((function(e){return e[r](t,n,a||!1)}))}))}function Tn(e,t,n,r){return bn(e,t,n,"addEventListener",r),e}function En(e,t,n,r){return bn(e,t,n,"removeEventListener",r),e}var An=function(e){return 1===e.length?e[0]:e};function wn(e,t){return function(e,t,n){var r="string"==typeof t?[t]:t;return An(xn(e).map((function(e){return An(r.map((function(t){return e[n](t)})))})))}(e,t,"hasAttribute")}var Cn=function(){return Yt.push(Un(String(gn().href)))},Nn=function(e){var t=e.includes(Qt.base)?e:Qt.base+e,n=gn(),r="undefined"==typeof history?null:history,a=mn();r&&t!==n.href&&r.pushState(null,a.title,t)},In=function e(t){return t&&!Rn(t)?e(t.parentNode):t},Rn=function(e){return"A"===e.nodeName},kn=function(e){return!e||!Rn(e)||wn(e,"download")||!wn(e,"href")||function(e){return e.target&&"_self"!==e.target}(e)||-1===e.href.indexOf(gn().href.match(fn)[0])},Un=function(e){return e.replace(Qt.base,"")},On=function(e){if(!function(e){return e.which&&1!==e.which||e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented}(e)){var t=In(e.target);if(!kn(t)&&!function(e){return e.split("#").length>1}(t.href)&&function(e){return!Qt.base||e.includes(Qt.base)}(t.href)){var n=Un(t.href);Yt.push(n),e.preventDefault()}}};var Sn,Bn=xt.DOMBindings,Ln=Bn.template,_n=Bn.bindingTypes,Mn=window.requestAnimationFrame||window.setTimeout,jn=window.cancelAnimationFrame||window.clearTimeout,Dn=!1,Pn={css:null,exports:(Sn=function(e){var t=e.slots,n=e.attributes,r=e.props;Dn&&function(e){throw new Error(e)}("Multiple components are not supported");var a=function(e){return n&&n.find((function(t){return t.name.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))===e}))};return{slot:null,el:null,teardown:null,mount:function(e,t){var n,r,i,o=this,s=a("initialRoute"),u=s?s.evaluate(t):null,l=on();Dn=!0,this.el=e,this.teardown=(n=this.root,r=hn(),i=n||mn(),r&&(Tn(r,pn,Cn),Tn(i,cn,On)),Yt.on.value(Nn),function(){r&&(En(r,pn,Cn),En(i,cn,On)),Yt.off.value(Nn)}),this.setBase(t),l&&!u?this.createSlot(t):(Yt.on.value((function e(){o.createSlot(t),Yt.off.value(e)})),Yt.push(u||window.location.href))},createSlot:function(e){if(t&&t.length){var n=a("onStarted");this.slot=Ln(null,[{type:_n.SLOT,name:"default"}]),this.slot.mount(this.el,{slots:t},e),n&&n.evaluate(e)(on())}},update:function(e){var t=this;this.setBase(e),this.slot&&(jn(this.deferred),this.deferred=Mn((function(){t.slot.update({},e)})))},unmount:function(){var e;this.teardown(),Dn=!1,this.slot&&(e=this.slot).unmount.apply(e,arguments)},getBase:function(e){var t=a("base");return t?t.evaluate(e):"/"},setBase:function(e){var t;t=r?r.base:this.getBase(e),Qt.base=yn(t)}}},se(Sn)||fe('riot.pure accepts only arguments of type "function"'),Sn[$]=!0,Sn),template:null,name:"router-hoc"};function Gn(e){if(null==e||isNaN(e))return"?";if(0==e)return"0 Byte";var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)));return Math.ceil(e/Math.pow(1024,t))+" "+["Bytes","KB","MB","GB","TB"][t]}function Vn(e,t,n){return n||(n=100),e?e.slice((t-1)*n,n*t):[]}function Fn(e,t){return t||(t=100),e?Math.trunc(e.length/t)+1:0}function Hn(e){return e?e.replace(/^https?:\/\//,""):""}function zn(e){return e>="0"&&e<="9"}var $n={message:"Access on registry response was blocked. Try adding the header `Access-Control-Expose-Headers: Docker-Content-Digest` to your proxy or registry: https://docs.docker.com/registry/configuration/#http",isError:!0};function qn(e){try{var t=JSON.parse(localStorage.getItem("registryServer"));if(t instanceof Array)return isNaN(e)?t.map((function(e){return e.trim().replace(/\/*$/,"")})):t[e]}catch(e){}return isNaN(e)?[]:""}function Kn(e){if(e)return e.indexOf("&")<0?window.encodeURIComponent(e):btoa(e)}function Wn(){var e={};return window.location.search.slice(1).split("&").forEach((function(t){var n=t.indexOf("=");e[t.slice(0,n)]=n<0?"":t.slice(n+1)})),e}function Xn(e){var t=Wn();for(var n in e)null===e[n]?delete t[n]:t[n]=e[n];return t}function Yn(e){var t=[];for(var n in e)n&&void 0!==e[n]&&t.push("".concat(n,"=").concat(e[n]));return 0===t.length?"":"?".concat(t.join("&"))}function Qn(e){var t=window.location,n=Xn(e);return t.origin+t.pathname+Yn(n)}var Jn={home:function(){Yt.push(Qn({page:null}))},taglist:function(e){Yt.push("".concat(Qn({page:null}),"#!/taglist/").concat(e))},getTagListImage:function(){return on().replace(/^.*(#!)?\/?taglist\//,"")},history:function(e,t){Yt.push("".concat(Qn({page:null}),"#!/taghistory/image/").concat(e,"/tag/").concat(t))},getTagHistoryImage:function(){return on().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/,"$2")},getTagHistoryTag:function(){return on().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/,"$3")},updateQueryString:function(e){var t=Yn(Xn(e));history.pushState(null,"",t+window.location.hash)},updateUrlQueryParam:function(e){this.updateQueryString({url:Kn(e)})},getUrlQueryParam:function(){var e=Wn().url;if(e)try{return function(e){if(e)return e.startsWith("http")?window.decodeURIComponent(e):atob(e)}(e)}catch(t){console.error("Can't decode query parameter URL: ".concat(e),t)}},updatePageQueryParam:function(e){this.updateQueryString({page:e})},getPageQueryParam:function(){return Wn().page}};function Zn(e,t){return!e||t&&t.toLowerCase().indexOf(e)>=0}var er={css:'search-bar material-input,[is="search-bar"] material-input{ position: absolute; top: 0em; right: 64px; max-width: 20%; } @media screen and (max-width: 400px) { search-bar material-input,[is="search-bar"] material-input{ display: none; } } search-bar material-input input,[is="search-bar"] material-input input{ color: #fff; }',exports:{onMounted(e,t){const n=this.$("input");let r="";const a=()=>{r!==n.value&&e.onSearch(n.value.toLowerCase()),r=n.value};n.addEventListener("keyup",a),Yt.on.value((()=>{n.value="",a()}))}},template:function(e,t,n,r){return e('',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-input"},slots:[],attributes:[],redundantAttribute:"expr13",selector:"[expr13]"}])},name:"search-bar"},tr={css:null,exports:{onBeforeMount(e,t){e.item.images&&1===e.item.images.length?t.image=e.item.images[0]:"string"==typeof e.item?t.image=e.item:e.item.images&&e.item.repo&&(t.images=e.item.images,t.repo=e.item.repo,t.nImages=e.item.images.length)},onBeforeUpdate(e,t){e.filterResults&&t.images?t.nImages=t.images.filter((t=>Zn(e.filterResults,t))).length:t.nImages=t.images&&t.images.length},onClick(){const e=this.state;e.repo?(this.update({expanded:!this.state.expanded,expanding:!0}),setTimeout((()=>{this.update({expanding:!1})}),50)):Jn.taglist(e.image)},setLaunchListener(e){this.triggerLaunch=e},matchSearch:Zn},template:function(e,t,n,r){return e('',[{type:n.IF,evaluate:function(e){return!e.props.filterResults||e.state.nImages>0||e.matchSearch(e.props.filterResults,e.state.image)},redundantAttribute:"expr109",selector:"[expr109]",template:e('',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-card"},slots:[{id:"default",html:'send',bindings:[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-waves"},slots:[],attributes:[{type:t.EVENT,name:"onmousedown",evaluate:function(e){return e.triggerLaunch}},{type:t.ATTRIBUTE,name:"setLaunchListener",evaluate:function(e){return e.setLaunchListener}}],redundantAttribute:"expr111",selector:"[expr111]"},{redundantAttribute:"expr112",selector:"[expr112]",expressions:[{type:t.TEXT,childNodeIndex:1,evaluate:function(e){return[e.state.image||e.state.repo].join("")}}]},{type:n.IF,evaluate:function(e){return e.state.images},redundantAttribute:"expr113",selector:"[expr113]",template:e(' expand_more',[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return[e.state.nImages," images"].join("")}}]},{redundantAttribute:"expr114",selector:"[expr114]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return["material-icons animated ",e.state.expanded?"expanded":""].join("")}}]}])}]}],attributes:[{type:t.ATTRIBUTE,name:"expanded",evaluate:function(e){return e.state.expanded}},{type:t.EVENT,name:"onclick",evaluate:function(e){return e.onClick}}],redundantAttribute:"expr110",selector:"[expr110]"},{type:n.EACH,getKey:null,condition:function(e){return e.state.images},template:e(null,[{type:n.TAG,getComponent:r,evaluate:function(e){return"catalog-element"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"filter-results",evaluate:function(e){return e.props.filterResults}},{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return["animated ",e.state.expanded||e.props.filterResults?"":"hide"," ",e.state.expanding?"expanding":""].join("")}},{type:t.ATTRIBUTE,name:"item",evaluate:function(e){return e.item}}]}]),redundantAttribute:"expr115",selector:"[expr115]",itemName:"item",indexName:null,evaluate:function(e){return e.state.images}}])}])},name:"catalog-element"},nr=function(){function e(){t(this,e),this.oReq=new XMLHttpRequest,this.oReq.hasHeader=rr,this.oReq.getErrorMessage=ar,this._events={},this._headers={}}return r(e,[{key:"getContentDigest",value:function(e){this.oReq.hasHeader("Docker-Content-Digest")?e(this.oReq.getResponseHeader("Docker-Content-Digest")):window.crypto&&window.TextEncoder&&crypto.subtle.digest("SHA-256",(new TextEncoder).encode(this.oReq.responseText)).then((function(t){e("sha256:"+Array.from(new Uint8Array(t)).map((function(e){return e.toString(16).padStart(2,"0")})).join(""))}))}},{key:"addEventListener",value:function(t,n){this._events[t]=n;var r=this;switch(t){case"loadend":r.oReq.addEventListener("loadend",(function(){if(401==this.status){var t=new XMLHttpRequest;for(key in t._url=r._url,t.open(r._method,r._url),r._events)t.addEventListener(key,r._events[key]);for(key in r._headers)t.setRequestHeader(key,r._headers[key]);t.withCredentials=!0,t.hasHeader=e.hasHeader,t.getErrorMessage=e.getErrorMessage,r.oReq=t,t.send()}else n.bind(this)()}));break;case"load":r.oReq.addEventListener("load",(function(){401!==this.status&&n.bind(this)()}));break;default:r.oReq.addEventListener(t,(function(){n.bind(this)()}))}}},{key:"setRequestHeader",value:function(e,t){this.oReq.setRequestHeader(e,t),this._headers[e]=t}},{key:"open",value:function(e,t){this._method=e,this._url=t,this.oReq._url=t,this.oReq.open(e,t)}},{key:"send",value:function(){this.oReq.send()}}]),e}(),rr=function(e){return this.getAllResponseHeaders().split("\n").some((function(t){return new RegExp("^"+e+":","i").test(t)}))},ar=function(){return this._url.match("^http://")&&"https:"===window.location.protocol?"Mixed Content: The page at `"+window.location.origin+"` was loaded over HTTPS, but requested an insecure server endpoint `"+new URL(this._url).origin+"`. This request has been blocked; the content must be served over HTTPS.":this._url&&this._url.match("^http")?this.withCredentials&&!this.hasHeader("Access-Control-Allow-Credentials")?"The `Access-Control-Allow-Credentials` header in the response is missing and must be set to `true` when the request's credentials mode is on. Origin `"+new URL(this._url).origin+"` is therefore not allowed access.":"An error occured: Check your connection and your registry must have `Access-Control-Allow-Origin` header set to `"+window.location.origin+"`":"Incorrect server endpoint."},ir={css:null,exports:{components:{CatalogElement:tr},state:{registryName:"",length:0,loadend:!1,repositories:[]},onBeforeMount(e){this.state.registryName=e.registryName,this.state.catalogElementsLimit=e.catalogElementsLimit},onMounted(e){this.display(e,this.state)},display(e,t){let n=[];const r=this,a=new nr;a.addEventListener("load",(function(){200==this.status?(n=JSON.parse(this.responseText).repositories||[],n.sort(),n=n.reduce((function(e,t){const n=t.indexOf("/");if(n>0){const r=t.substring(0,n)+"/";return 0!=e.length&&e[e.length-1].repo==r||e.push({repo:r,images:[]}),e[e.length-1].images.push(t),e}return e.push(t),e}),[])):404==this.status?r.props.onNotify("Server not found",!0):r.props.onNotify(this.responseText)})),a.addEventListener("error",(function(){r.props.onNotify(this.getErrorMessage(),!0)})),a.addEventListener("loadend",(function(){r.update({repositories:n,length:n.length,loadend:!0})})),a.open("GET",`${e.registryUrl}/v2/_catalog?n=${t.catalogElementsLimit}`),a.send()}},template:function(e,t,n,r){return e('',[{type:n.TAG,getComponent:r,evaluate:function(e){return"material-card"},slots:[{id:"default",html:'