/*! Hugo Blox Builder v5.9.6 | https://hugoblox.com/ */
/*! Copyright 2016-present George Cushen (https://georgecushen.com/) */
/*! License: https://github.com/HugoBlox/hugo-blox-builder/blob/main/LICENSE.md */

;
(()=>{(()=>{var t,i,c,l,d,m,p,y,_,O,E,e=Object.assign||function(e){for(var t,s,n=1;n<arguments.length;n++){t=arguments[n];for(s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},s=function(t){return t.tagName==="IMG"},A=function(t){return NodeList.prototype.isPrototypeOf(t)},o=function(t){return t&&t.nodeType===1},v=function(t){var n=t.currentSrc||t.src;return n.substr(-4).toLowerCase()===".svg"},C=function(t){try{return Array.isArray(t)?t.filter(s):A(t)?[].slice.call(t).filter(s):o(t)?[t].filter(s):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(s):[]}catch{throw new TypeError(`The provided selector is invalid.
Expects a CSS selector, a Node element, a NodeList or an array.
See: https://github.com/francoischalifour/medium-zoom`)}},R=function(t){var n=document.createElement("div");return n.classList.add("medium-zoom-overlay"),n.style.background=t,n},T=function(t){var s=t.getBoundingClientRect(),o=s.top,i=s.left,a=s.width,r=s.height,n=t.cloneNode(),c=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,l=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return n.removeAttribute("id"),n.style.position="absolute",n.style.top=o+c+"px",n.style.left=i+l+"px",n.style.width=a+"px",n.style.height=r+"px",n.style.transform="",n},n=function(n,s){var i,o=e({bubbles:!1,cancelable:!1,detail:void 0},s);return typeof window.CustomEvent=="function"?new CustomEvent(n,o):(i=document.createEvent("CustomEvent"),i.initCustomEvent(n,o.bubbles,o.cancelable,o.detail),i)},L=function t(s){var r,u,_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=window.Promise||function(t){function n(){}t(n,n)},M=function(t){var n=t.target;if(n===u){l();return}if(c.indexOf(n)===-1)return;b({target:n})},S=function(){if(d||!i.original)return;var t=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(m-t)>a.scrollOffset&&setTimeout(l,150)},A=function(t){var n=t.key||t.keyCode;(n==="Escape"||n==="Esc"||n===27)&&l()},E=function(){var l,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=s;return s.background&&(u.style.background=s.background),s.container&&s.container instanceof Object&&(i.container=e({},a.container,s.container)),s.template&&(l=o(s.template)?s.template:document.querySelector(s.template),i.template=l),a=e({},a,i),c.forEach(function(e){e.dispatchEvent(n("medium-zoom:update",{detail:{zoom:r}}))}),r},j=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t(e({},a,s))},f=function(){for(var n,s=arguments.length,o=Array(s),t=0;t<s;t++)o[t]=arguments[t];return n=o.reduce(function(e,t){return[].concat(e,C(t))},[]),n.filter(function(e){return c.indexOf(e)===-1}).forEach(function(e){c.push(e),e.classList.add("medium-zoom-image")}),h.forEach(function(e){var t=e.type,s=e.listener,o=e.options;n.forEach(function(e){e.addEventListener(t,s,o)})}),r},k=function(){for(var o,a=arguments.length,s=Array(a),t=0;t<a;t++)s[t]=arguments[t];return i.zoomed&&l(),o=s.length>0?s.reduce(function(e,t){return[].concat(e,C(t))},[]):c,o.forEach(function(e){e.classList.remove("medium-zoom-image"),e.dispatchEvent(n("medium-zoom:detach",{detail:{zoom:r}}))}),c=c.filter(function(e){return o.indexOf(e)===-1}),r},O=function(t,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return c.forEach(function(e){e.addEventListener("medium-zoom:"+t,n,s)}),h.push({type:"medium-zoom:"+t,listener:n,options:s}),r},w=function(t,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return c.forEach(function(e){e.removeEventListener("medium-zoom:"+t,n,s)}),h=h.filter(function(e){return e.type!=="medium-zoom:"+t||e.listener.toString()!==n.toString()}),r},g=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=f.target,h=function(){if(n={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},s=void 0,r=void 0,a.container)if(a.container instanceof Object)n=e({},n,a.container),s=n.width-n.left-n.right-a.margin*2,r=n.height-n.top-n.bottom-a.margin*2;else{var n,A=o(a.container)?a.container:document.querySelector(a.container),d=A.getBoundingClientRect(),p=d.width,C=d.height,w=d.left,_=d.top;n=e({},n,{width:p,height:C,left:w,top:_})}var s=s||n.width-a.margin*2,r=r||n.height-a.margin*2,c=i.zoomedHd||i.original,b=v(c)?s:c.naturalWidth||s,g=v(c)?r:c.naturalHeight||r,l=c.getBoundingClientRect(),j=l.top,y=l.left,m=l.width,h=l.height,O=Math.min(Math.max(m,b),s)/m,x=Math.min(Math.max(h,g),r)/h,u=Math.min(O,x),E=(-y+(s-m)/2+a.margin+n.left)/u,k=(-j+(r-h)/2+a.margin+n.top)/u,f="scale("+u+") translate3d("+E+"px, "+k+"px, 0)";i.zoomed.style.transform=f,i.zoomedHd&&(i.zoomedHd.style.transform=f)};return new p(function(e){if(s&&c.indexOf(s)===-1){e(r);return}var t,f,p,g,v=function t(){d=!1,i.zoomed.removeEventListener("transitionend",t),i.original.dispatchEvent(n("medium-zoom:opened",{detail:{zoom:r}})),e(r)};if(i.zoomed){e(r);return}if(s)i.original=s;else if(c.length>0)f=c,i.original=f[0];else{e(r);return}i.original.dispatchEvent(n("medium-zoom:open",{detail:{zoom:r}})),m=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,d=!0,i.zoomed=T(i.original),document.body.appendChild(u),a.template&&(p=o(a.template)?a.template:document.querySelector(a.template),i.template=document.createElement("div"),i.template.appendChild(p.content.cloneNode(!0)),document.body.appendChild(i.template)),i.original.parentElement&&i.original.parentElement.tagName==="PICTURE"&&i.original.currentSrc&&(i.zoomed.src=i.original.currentSrc),document.body.appendChild(i.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),i.original.classList.add("medium-zoom-image--hidden"),i.zoomed.classList.add("medium-zoom-image--opened"),i.zoomed.addEventListener("click",l),i.zoomed.addEventListener("transitionend",v),i.original.getAttribute("data-zoom-src")?(i.zoomedHd=i.zoomed.cloneNode(),i.zoomedHd.removeAttribute("srcset"),i.zoomedHd.removeAttribute("sizes"),i.zoomedHd.removeAttribute("loading"),i.zoomedHd.src=i.zoomed.getAttribute("data-zoom-src"),i.zoomedHd.onerror=function(){clearInterval(t),console.warn("Unable to reach the zoom image target "+i.zoomedHd.src),i.zoomedHd=null,h()},t=setInterval(function(){i.zoomedHd.complete&&(clearInterval(t),i.zoomedHd.classList.add("medium-zoom-image--opened"),i.zoomedHd.addEventListener("click",l),document.body.appendChild(i.zoomedHd),h())},10)):i.original.hasAttribute("srcset")?(i.zoomedHd=i.zoomed.cloneNode(),i.zoomedHd.removeAttribute("sizes"),i.zoomedHd.removeAttribute("loading"),g=i.zoomedHd.addEventListener("load",function(){i.zoomedHd.removeEventListener("load",g),i.zoomedHd.classList.add("medium-zoom-image--opened"),i.zoomedHd.addEventListener("click",l),document.body.appendChild(i.zoomedHd),h()})):h()})},l=function(){return new p(function(e){if(d||!i.original){e(r);return}var t=function t(){i.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(i.zoomed),i.zoomedHd&&document.body.removeChild(i.zoomedHd),document.body.removeChild(u),i.zoomed.classList.remove("medium-zoom-image--opened"),i.template&&document.body.removeChild(i.template),d=!1,i.zoomed.removeEventListener("transitionend",t),i.original.dispatchEvent(n("medium-zoom:closed",{detail:{zoom:r}})),i.original=null,i.zoomed=null,i.zoomedHd=null,i.template=null,e(r)};d=!0,document.body.classList.remove("medium-zoom--opened"),i.zoomed.style.transform="",i.zoomedHd&&(i.zoomedHd.style.transform=""),i.template&&(i.template.style.transition="opacity 150ms",i.template.style.opacity=0),i.original.dispatchEvent(n("medium-zoom:close",{detail:{zoom:r}})),i.zoomed.addEventListener("transitionend",t)})},b=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.target;return i.original?l():g({target:n})},y=function(){return a},x=function(){return c},F=function(){return i.original},c=[],h=[],d=!1,m=0,a=_,i={original:null,zoomed:null,zoomedHd:null,template:null};return Object.prototype.toString.call(s)==="[object Object]"?a=s:(s||typeof s=="string")&&f(s),a=e({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},a),u=R(a.background),document.addEventListener("click",M),document.addEventListener("keyup",A),document.addEventListener("scroll",S),window.addEventListener("resize",l),r={open:g,close:l,toggle:b,update:E,clone:j,attach:f,detach:k,on:O,off:w,getOptions:y,getImages:x,getZoomedImage:F},r};function N(e,t){t===void 0&&(t={});var n,s,o=t.insertAt;if(!e||typeof document=="undefined")return;s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style"),n.type="text/css",o==="top"?s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}O=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}",N(O),E=L,m="production",i={copied:"Copied",copy:"Copy"},p=!0;function b(e,t){const n=e.getBoundingClientRect(),o={height:e.clientHeight,width:e.clientWidth},s=t.getBoundingClientRect(),i=s.top>=n.top&&s.bottom<=n.top+o.height;i||(e.scrollTop=s.top+e.scrollTop-n.top)}function r(){let e=document.getElementById("navbar-main"),t=e?e.getBoundingClientRect().height:0;return console.debug("Navbar height: "+t),t}function g(e,t=0){if(e=typeof e=="undefined"||typeof e=="object"?decodeURIComponent(window.location.hash):e,$(e).length){e="#"+$.escapeSelector(e.substring(1));let n=Math.ceil($(e).offset().top-r());document.querySelector("body").classList.add("scrolling"),$("html, body").animate({scrollTop:n},t,function(){document.querySelector("body").classList.remove("scrolling")})}else console.debug("Cannot scroll to target `#"+e+"`. ID not found!")}function j(){let e=$("body"),t=e.data("bs.scrollspy");t&&(t._config.offset=r(),e.data("bs.scrollspy",t),e.scrollspy("refresh"))}$("#navbar-main li.nav-item a.nav-link, .js-scroll").on("click",function(e){let t=this.hash;if(this.pathname===window.location.pathname&&t&&$(t).length&&$(".js-widget-page").length>0){e.preventDefault();let n=Math.ceil($(t).offset().top-r());$("html, body").animate({scrollTop:n},800)}}),$(document).on("click",".navbar-collapse.show",function(e){let t=$(e.target).is("a")?$(e.target):$(e.target).parent();t.is("a")&&t.attr("class")!="dropdown-toggle"&&$(this).collapse("hide")}),$("body").on("mouseenter mouseleave",".dropdown",function(e){var t=$(e.target).closest(".dropdown"),n=$(".dropdown-menu",t);t.addClass("show"),n.addClass("show"),setTimeout(function(){t[t.is(":hover")?"addClass":"removeClass"]("show"),n[t.is(":hover")?"addClass":"removeClass"]("show")},300)}),$(window).resize(function(){clearTimeout(y),y=setTimeout(j,200)}),window.addEventListener("hashchange",g);function P(e,t){m==="production"&&$.getJSON("https://api.github.com/repos/"+t+"/tags").done(function(t){let n=t[0];$(e).append(" "+n.name)}).fail(function(e,t,n){let s=t+", "+n;console.log("Request Failed: "+s)})}function w(e,t=600){e.style.display="",e.style.opacity="0";let s=+new Date,n=function(){e.style.opacity=(+e.style.opacity+(new Date-s)/t).toString(),s=+new Date,+e.style.opacity<1&&(window.requestAnimationFrame&&requestAnimationFrame(n)||setTimeout(n,16))};n()}t=document.body;function x(){return parseInt(localStorage.getItem("wcTheme")||2)}function f(){return Boolean(window.wc.darkLightEnabled)}function S(){if(!f())return console.debug("User theming disabled."),{isDarkTheme:window.wc.isSiteThemeDark,themeMode:window.wc.isSiteThemeDark?1:0};console.debug("User theming enabled.");let e,n=x();switch(console.debug(`User's theme variation: ${n}`),n){case 0:e=!1;break;case 1:e=!0;break;default:window.matchMedia("(prefers-color-scheme: dark)").matches?e=!0:window.matchMedia("(prefers-color-scheme: light)").matches?e=!1:e=window.wc.isSiteThemeDark;break}return e&&!t.classList.contains("dark")?(console.debug("Applying Hugo Blox Builder dark theme"),document.body.classList.add("dark")):!e&&t.classList.contains("dark")&&(console.debug("Applying Hugo Blox Builder light theme"),document.body.classList.remove("dark")),{isDarkTheme:e,themeMode:n}}function a(e){if(!f()){console.debug("Cannot change theme - user theming disabled.");return}let t;switch(e){case 0:localStorage.setItem("wcTheme","0"),t=!1,console.debug("User changed theme variation to Light.");break;case 1:localStorage.setItem("wcTheme","1"),t=!0,console.debug("User changed theme variation to Dark.");break;default:localStorage.setItem("wcTheme","2"),window.matchMedia("(prefers-color-scheme: dark)").matches?t=!0:window.matchMedia("(prefers-color-scheme: light)").matches?t=!1:t=window.wc.isSiteThemeDark,console.debug("User changed theme variation to Auto.");break}h(t,e)}function k(e){let t=document.querySelector(".js-set-theme-light"),n=document.querySelector(".js-set-theme-dark"),s=document.querySelector(".js-set-theme-auto");if(t===null)return;switch(e){case 0:t.classList.add("dropdown-item-active"),n.classList.remove("dropdown-item-active"),s.classList.remove("dropdown-item-active");break;case 1:t.classList.remove("dropdown-item-active"),n.classList.add("dropdown-item-active"),s.classList.remove("dropdown-item-active");break;default:t.classList.remove("dropdown-item-active"),n.classList.remove("dropdown-item-active"),s.classList.add("dropdown-item-active");break}}function h(e,n=2,s=!1){const o=document.querySelector("link[title=hl-light]"),i=document.querySelector("link[title=hl-dark]"),a=o!==null||i!==null,r=document.querySelector("script[title=mermaid]")!==null;k(n);const c=new CustomEvent("wcThemeChange",{detail:{isDarkTheme:()=>e}});if(document.dispatchEvent(c),!s&&(e===!1&&!t.classList.contains("dark")||e===!0&&t.classList.contains("dark")))return;e===!1?(s||(Object.assign(document.body.style,{opacity:0,visibility:"visible"}),w(document.body,600)),t.classList.remove("dark"),a&&(console.debug("Setting HLJS theme to light"),o&&(o.disabled=!1),i&&(i.disabled=!0)),r&&(console.debug("Initializing Mermaid with light theme"),s?window.mermaid.initialize({startOnLoad:!0,theme:"default",securityLevel:"loose"}):location.reload())):e===!0&&(s||(Object.assign(document.body.style,{opacity:0,visibility:"visible"}),w(document.body,600)),t.classList.add("dark"),a&&(console.debug("Setting HLJS theme to dark"),o&&(o.disabled=!0),i&&(i.disabled=!1)),r&&(console.debug("Initializing Mermaid with dark theme"),s?window.mermaid.initialize({startOnLoad:!0,theme:"dark",securityLevel:"loose"}):location.reload()))}function M(e){if(!f())return;const s=e.matches;console.debug(`OS dark mode preference changed to ${s?"🌒 on":"☀️ off"}.`);let n=x(),t;n===2&&(window.matchMedia("(prefers-color-scheme: dark)").matches?t=!0:window.matchMedia("(prefers-color-scheme: light)").matches?t=!1:t=window.wc.isSiteThemeDark,h(t,n))}console.debug(`Environment: ${m}`);function F(){if(window.history.replaceState){let e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.hash;window.history.replaceState({path:e},"",e)}}function u(){const e=document.querySelector("body");if(e.classList.contains("searching"))document.getElementById("search-query").blur(),e.classList.remove("searching","compensate-for-scrollbar"),F(),$("#fancybox-style-noscroll").remove();else{!$("#fancybox-style-noscroll").length&&document.body.scrollHeight>window.innerHeight&&($("head").append('<style id="fancybox-style-noscroll">.compensate-for-scrollbar{margin-right:'+(window.innerWidth-document.documentElement.clientWidth)+"px;}</style>"),e.classList.add("compensate-for-scrollbar")),e.classList.add("searching"),$(".search-results").css({opacity:0,visibility:"visible"}).animate({opacity:1},200);let t=document.querySelector(".ais-SearchBox-input");t?t.focus():document.getElementById("search-query").focus()}}function z(){document.querySelector("#TableOfContents")&&document.querySelector("#TableOfContents").classList.add("nav","flex-column"),document.querySelectorAll("#TableOfContents li").forEach(e=>{e.classList.add("nav-item")}),document.querySelectorAll("#TableOfContents li a").forEach(e=>{e.classList.add("nav-link")}),document.querySelectorAll("input[type='checkbox'][disabled]").forEach(e=>{e.closest("ul").classList.add("task-list")}),document.querySelectorAll("table").forEach(e=>{e.classList.add("table")})}function D(e){return Array.prototype.filter.call(e.parentNode.children,function(t){return t!==e})}document.addEventListener("DOMContentLoaded",function(){z();let{isDarkTheme:s,themeMode:o}=S();h(s,o,!0);let t=document.querySelector(".docs-links .active"),n=document.querySelector(".docs-links");t&&n&&b(n,t);let e=".js-github-release";$(e).length>0&&P(e,$(e).data("repo"))}),window.addEventListener("load",function(){j();let t=document.querySelectorAll(".projects-container"),n=t.length;window.location.hash&&n===0&&g(decodeURIComponent(window.location.hash),0);let s=document.querySelector(".docs-toc .nav-link.active"),o=document.querySelector(".docs-toc");s&&o&&b(o,s);let e={};document.body.classList.contains("dark")?e.background="rgba(0,0,0,0.9)":e.background="rgba(255,255,255,0.9)",E("[data-zoomable]",e);let i=0;t.forEach(function(e,t){console.debug(`Loading Isotope instance ${t}`);let i,n=e.closest("section"),s="";n.querySelector(".isotope").classList.contains("js-layout-row")?s="fitRows":s="masonry";let r=n.querySelector(".default-project-filter"),o="*";r!==null&&(o=r.textContent),console.debug(`Default Isotope filter: ${o}`),imagesLoaded(e,function(){i=new Isotope(e,{itemSelector:".isotope-item",layoutMode:s,masonry:{gutter:20},filter:o});let t=n.querySelectorAll(".project-filters a");t.forEach(e=>e.addEventListener("click",t=>{t.preventDefault();let n=e.getAttribute("data-filter");console.debug(`Updating Isotope filter to ${n}`),i.arrange({filter:n}),e.classList.remove("active"),e.classList.add("active");let s=D(e);s.forEach(e=>{e.classList.remove("active"),e.classList.remove("all")})})),a()})});function a(){i++,i===n&&(console.debug(`All Portfolio Isotope instances loaded.`),window.location.hash&&g(decodeURIComponent(window.location.hash),0))}document.addEventListener("keyup",e=>{if(e.code==="Escape"){const e=document.body;e.classList.contains("searching")&&u()}if(e.key==="/"){let t=document.hasFocus()&&document.activeElement!==document.body&&document.activeElement!==document.documentElement&&document.activeElement||null,n=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;p&&!n&&(e.preventDefault(),u())}}),p&&document.querySelectorAll(".js-search").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),u()})}),$('[data-toggle="tooltip"]').tooltip()}),d=document.querySelector(".js-set-theme-light"),l=document.querySelector(".js-set-theme-dark"),c=document.querySelector(".js-set-theme-auto"),d&&l&&c&&(d.addEventListener("click",e=>{e.preventDefault(),a(0)}),l.addEventListener("click",e=>{e.preventDefault(),a(1)}),c.addEventListener("click",e=>{e.preventDefault(),a(2)})),_=window.matchMedia("(prefers-color-scheme: dark)"),_.addEventListener("change",e=>{M(e)}),document.querySelectorAll("pre > code").forEach(e=>{const n=e.parentNode.parentNode,t=document.createElement("button");let o=["btn","btn-primary","btn-copy-code"];t.classList.add(...o),t.innerHTML=i.copy;function s(){t.innerHTML=i.copied,setTimeout(()=>{t.innerHTML=i.copy},2e3)}t.addEventListener("click",()=>{if(console.debug("Code block copy click. Is secure context for Clipboard API? "+window.isSecureContext),"clipboard"in navigator){navigator.clipboard.writeText(e.textContent),s();return}console.debug("Falling back to legacy clipboard copy");const t=document.createRange();t.selectNodeContents(e);const n=window.getSelection();n.removeAllRanges(),n.addRange(t);try{document.execCommand("copy"),s()}catch(e){console.error(e)}n.removeRange(t)}),n.classList.contains("highlight")?n.appendChild(t):e.parentNode.parentNode.parentNode.parentNode.parentNode.nodeName=="TABLE"?e.parentNode.parentNode.parentNode.parentNode.parentNode.appendChild(t):e.parentNode.appendChild(t)})})(),(()=>{var o={authors:"Authors",event:"Events",post:"Posts",project:"Projects",publication:"Publications",slides:"Slides"},i={no_results:"No results found",placeholder:"Search...",results:"results found"},t={indexURI:"/index.json",minLength:1,threshold:.3},n={shouldSort:!0,includeMatches:!0,tokenize:!0,threshold:t.threshold,location:0,distance:100,maxPatternLength:32,minMatchCharLength:t.minLength,keys:[{name:"title",weight:.99},{name:"summary",weight:.6},{name:"authors",weight:.5},{name:"content",weight:.2},{name:"tags",weight:.5},{name:"categories",weight:.5}]},e=60;function a(e){return decodeURIComponent((location.search.split(e+"=")[1]||"").split("&")[0]).replace(/\+/g," ")}function r(e){history.replaceState&&window.history.replaceState({path:e},"",e)}function s(e,t){let s=$("#search-query").val();if(s.length<1&&($("#search-hits").empty(),$("#search-common-queries").show()),!e&&s.length<n.minMatchCharLength)return;$("#search-hits").empty(),$("#search-common-queries").hide(),c(s,t);let o=window.location.protocol+"//"+window.location.host+window.location.pathname+"?q="+encodeURIComponent(s)+window.location.hash;r(o)}function c(e,t){let n=t.search(e);n.length>0?($("#search-hits").append('<h3 class="mt-0">'+n.length+" "+i.results+"</h3>"),l(e,n)):$("#search-hits").append('<div class="search-no-results">'+i.no_results+"</div>")}function l(t,s){$.each(s,function(s,i){let a=i.item.section,r="",c="",l=[];["publication","event"].includes(a)?r=i.item.summary:r=i.item.content,n.tokenize?l.push(t):$.each(i.matches,function(t,n){if(n.key=="content"){let t=n.indices[0][0]-e>0?n.indices[0][0]-e:0,s=n.indices[0][1]+e<r.length?n.indices[0][1]+e:r.length;c+=r.substring(t,s),l.push(n.value.substring(n.indices[0][0],n.indices[0][1]-n.indices[0][0]+1))}}),c.length<1&&(c+=i.item.summary);let u=$("#search-hit-fuse-template").html();a in o&&(a=o[a]);let h={key:s,title:i.item.title,type:a,relpermalink:i.item.relpermalink,snippet:c},m=d(u,h);$("#search-hits").append(m),$.each(l,function(e,t){$("#summary-"+s).mark(t)})})}function d(e,t){let n,s,o;for(n in t)s="\\{\\{\\s*"+n+"\\s*\\}\\}",o=new RegExp(s,"g"),e=e.replace(o,t[n]);return e}typeof Fuse=="function"&&$.getJSON(t.indexURI,function(e){let t=new Fuse(e,n),o=a("q");o&&(document.querySelector("body").classList.add("searching"),$(".search-results").css({opacity:0,visibility:"visible"}).animate({opacity:1},200),$("#search-query").val(o),$("#search-query").focus(),s(!0,t)),$("#search-query").keyup(function(e){clearTimeout($.data(this,"searchTimer")),e.keyCode==13?s(!0,t):$(this).data("searchTimer",setTimeout(function(){s(!1,t)},250))})})})();var e,n,o,i,a,c,l,d,u,h,m,r=$(".page-footer>.container");r.addClass("container-fluid"),r.removeClass("container"),r.css("padding-left","0"),r.css("padding-right","0"),e={READER_API:"readerApi",CARD_API:"cardApi",CALYPSO_API:"calypsoApi",CALYPSO_SYMMETRIC_API:"calypsoSymmetricApi",CALYPSO_LEGACY_SAM_API:"calypsoLegacySamApi",CALYPSO_ASYMMETRIC_API:"calypsoAsymmetricApi",COMMON_API:"commonApi",DISTRIBUTED_LOCAL_API:"distributedLocalApi",DISTRIBUTED_REMOTE_API:"distributedRemoteApi",PLUGIN_API:"pluginApi",UTIL_LIB:"utilLib",SERVICE_LIB:"serviceLib",SERVICE_RESOURCE_LIB:"serviceResourceLib",DISTRIBUTED_LOCAL_LIB:"distributedLocalLib",DISTRIBUTED_NETWORK_LIB:"distributedNetworkLib",DISTRIBUTED_REMOTE_LIB:"distributedRemoteLib",CALYPSO_CARD_LIB:"calypsoCardLib",CALYPSO_LEGACY_SAM_LIB:"calypsoLegacySamLib",CALYPSO_PKI_LIB:"calypsoPkiLib",GENERIC_LIB:"genericLib",PLUGIN_ANDROID_NFC_LIB:"pluginAndroidNfcLib",PLUGIN_ANDROID_OMAPI_LIB:"pluginAndroidOmapiLib",PLUGIN_CARD_RESOURCE_LIB:"pluginCardResourceLib",PLUGIN_PCSC_LIB:"pluginPcscLib",PLUGIN_STUB_LIB:"pluginStubLib"},l=[e.READER_API,e.CARD_API,e.CALYPSO_API,e.CALYPSO_SYMMETRIC_API,e.CALYPSO_LEGACY_SAM_API,e.CALYPSO_ASYMMETRIC_API,e.COMMON_API,e.DISTRIBUTED_LOCAL_API,e.DISTRIBUTED_REMOTE_API,e.PLUGIN_API,e.UTIL_LIB,e.SERVICE_LIB,e.SERVICE_RESOURCE_LIB,e.DISTRIBUTED_LOCAL_LIB,e.DISTRIBUTED_NETWORK_LIB,e.DISTRIBUTED_REMOTE_LIB,e.CALYPSO_CARD_LIB,e.CALYPSO_LEGACY_SAM_LIB,e.CALYPSO_PKI_LIB,e.GENERIC_LIB,e.PLUGIN_ANDROID_NFC_LIB,e.PLUGIN_ANDROID_OMAPI_LIB,e.PLUGIN_CARD_RESOURCE_LIB,e.PLUGIN_PCSC_LIB,e.PLUGIN_STUB_LIB];function t(e,t){this.componentName=e,this.componentVersions=[t]}function s(...e){this.releases=e}n=[],n.push(new s(new t(e.CALYPSO_CARD_LIB,"3.1.5"))),n.push(new s(new t(e.PLUGIN_PCSC_LIB,"2.4.0"))),n.push(new s(new t(e.SERVICE_LIB,"3.3.3"))),n.push(new s(new t(e.PLUGIN_PCSC_LIB,"2.3.1"))),n.push(new s(new t(e.SERVICE_LIB,"3.3.2"))),n.push(new s(new t(e.GENERIC_LIB,"3.1.2"))),n.push(new s(new t(e.CALYPSO_CARD_LIB,"3.1.4"))),n.push(new s(new t(e.PLUGIN_PCSC_LIB,"2.3.0"))),n.push(new s(new t(e.DISTRIBUTED_NETWORK_LIB,"2.5.1"),new t(e.DISTRIBUTED_LOCAL_LIB,"2.5.1"),new t(e.DISTRIBUTED_REMOTE_LIB,"2.5.1"))),n.push(new s(new t(e.SERVICE_LIB,"3.3.1"))),n.push(new s(new t(e.GENERIC_LIB,"3.1.1"))),n.push(new s(new t(e.CALYPSO_CARD_LIB,"3.1.3"))),n.push(new s(new t(e.PLUGIN_PCSC_LIB,"2.2.3"))),n.push(new s(new t(e.PLUGIN_PCSC_LIB,"2.2.2"))),n.push(new s(new t(e.SERVICE_RESOURCE_LIB,"3.1.0"),new t(e.CALYPSO_LEGACY_SAM_LIB,"0.8.0"),new t(e.GENERIC_LIB,"3.1.0"))),n.push(new s(new t(e.DISTRIBUTED_LOCAL_API,"2.2.+"),new t(e.DISTRIBUTED_REMOTE_API,"3.1.+"),new t(e.DISTRIBUTED_NETWORK_LIB,"2.5.0"),new t(e.DISTRIBUTED_LOCAL_LIB,"2.5.0"),new t(e.DISTRIBUTED_REMOTE_LIB,"2.5.0"),new t(e.SERVICE_LIB,"3.3.0"))),n.push(new s(new t(e.CALYPSO_LEGACY_SAM_LIB,"0.7.1"))),n.push(new s(new t(e.SERVICE_RESOURCE_LIB,"3.0.2"))),n.push(new s(new t(e.CALYPSO_CARD_LIB,"3.1.2"))),n.push(new s(new t(e.SERVICE_LIB,"3.2.3"))),n.push(new s(new t(e.SERVICE_LIB,"3.2.2"))),n.push(new s(new t(e.DISTRIBUTED_NETWORK_LIB,"2.4.0"),new t(e.DISTRIBUTED_REMOTE_LIB,"2.4.0"))),n.push(new s(new t(e.CALYPSO_PKI_LIB,"0.2.0"))),n.push(new s(new t(e.CALYPSO_LEGACY_SAM_API,"0.6.+"),new t(e.CALYPSO_LEGACY_SAM_LIB,"0.7.0"))),n.push(new s(new t(e.CARD_API,"2.0.1+"),new t(e.CALYPSO_API,"2.1.+"),new t(e.CALYPSO_LEGACY_SAM_API,"0.5.+"),new t(e.CALYPSO_ASYMMETRIC_API,"0.2.+"),new t(e.PLUGIN_API,"2.3.+"),new t(e.UTIL_LIB,"2.4.0"),new t(e.SERVICE_LIB,"3.2.1"),new t(e.SERVICE_RESOURCE_LIB,"3.0.1"),new t(e.DISTRIBUTED_LOCAL_LIB,"2.3.1"),new t(e.DISTRIBUTED_NETWORK_LIB,"2.3.1"),new t(e.DISTRIBUTED_REMOTE_LIB,"2.3.1"),new t(e.CALYPSO_CARD_LIB,"3.1.1"),new t(e.CALYPSO_LEGACY_SAM_LIB,"0.6.0"),new t(e.CALYPSO_PKI_LIB,"0.1.0"),new t(e.GENERIC_LIB,"3.0.1"),new t(e.PLUGIN_ANDROID_NFC_LIB,"2.2.0"),new t(e.PLUGIN_ANDROID_OMAPI_LIB,"2.1.0"),new t(e.PLUGIN_CARD_RESOURCE_LIB,"2.0.1"),new t(e.PLUGIN_PCSC_LIB,"2.2.1"),new t(e.PLUGIN_STUB_LIB,"2.2.1"))),n.push(new s(new t(e.PLUGIN_API,"2.3.+"),new t(e.SERVICE_LIB,"3.2.0"),new t(e.PLUGIN_PCSC_LIB,"2.2.0"))),n.push(new s(new t(e.CALYPSO_LEGACY_SAM_API,"0.4.+"),new t(e.CALYPSO_LEGACY_SAM_LIB,"0.5.0"))),n.push(new s(new t(e.SERVICE_LIB,"3.1.0"))),n.push(new s(new t(e.SERVICE_LIB,"3.0.1"))),n.push(new s(new t(e.CALYPSO_CARD_LIB,"3.0.1"))),n.push(new s(new t(e.UTIL_LIB,"2.3.1"))),n.push(new s(new t(e.PLUGIN_ANDROID_NFC_LIB,"2.1.0"))),n.push(new s(new t(e.PLUGIN_ANDROID_OMAPI_LIB,"2.0.1"))),n.push(new s(new t(e.PLUGIN_PCSC_LIB,"2.1.2"))),n.push(new s(new t(e.PLUGIN_STUB_LIB,"2.2.0"))),n.push(new s(new t(e.READER_API,"2.0.+"),new t(e.CARD_API,"2.0.0"),new t(e.CALYPSO_API,"2.0.+"),new t(e.CALYPSO_SYMMETRIC_API,"0.1.+"),new t(e.CALYPSO_LEGACY_SAM_API,"0.3.+"),new t(e.CALYPSO_ASYMMETRIC_API,"0.1.+"),new t(e.COMMON_API,"2.0.+"),new t(e.DISTRIBUTED_LOCAL_API,"2.1.+"),new t(e.DISTRIBUTED_REMOTE_API,"3.0.+"),new t(e.PLUGIN_API,"2.2.+"),new t(e.UTIL_LIB,"2.3.0"),new t(e.SERVICE_LIB,"3.0.0"),new t(e.SERVICE_RESOURCE_LIB,"3.0.0"),new t(e.DISTRIBUTED_LOCAL_LIB,"2.3.0"),new t(e.DISTRIBUTED_NETWORK_LIB,"2.3.0"),new t(e.DISTRIBUTED_REMOTE_LIB,"2.3.0"),new t(e.CALYPSO_CARD_LIB,"3.0.0"),new t(e.CALYPSO_LEGACY_SAM_LIB,"0.4.0"),new t(e.GENERIC_LIB,"3.0.0"),new t(e.PLUGIN_ANDROID_NFC_LIB,"2.0.0"),new t(e.PLUGIN_ANDROID_OMAPI_LIB,"2.0.0"),new t(e.PLUGIN_CARD_RESOURCE_LIB,"2.0.0"),new t(e.PLUGIN_PCSC_LIB,"2.0.0"),new t(e.PLUGIN_STUB_LIB,"2.0.0"))),mergeNonImpactingReleaseTrains=function(){let e=new Map,t=[];for(let o=0;o<n.length;o++){let s=n[o];if(s.releases.length===1){let n=s.releases[0].componentName,i=s.releases[0].componentVersions[0];if(e.has(n)){let t=e.get(n);t.unshift(i)}else e.set(n,[i]);t.push(o)}else for(let t=0;t<s.releases.length;t++){let n=s.releases[t].componentName,o=s.releases[t].componentVersions;if(e.has(n)){let t=e.get(n);o.push(...t),e.delete(n)}}}for(let e=t.length-1;e>=0;e--)n.splice(t[e],1)},insertRowsIntoDependencyCheckHtmlTable=function(){let e=new Map,t=[];for(let o=n.length-1;o>=0;o--){let i=n[o].releases;for(let t=0;t<i.length;t++)e.set(i[t].componentName,i[t].componentVersions);let s="<tr>";for(let t=0;t<l.length;t++){s+="<td>";let n=l[t];if(e.has(n)){let t=e.get(n);s+=t[0],t.length>1&&(s+="...",s+=t[t.length-1])}else s+="-";s+="</td>"}s+="</tr>",t.unshift(s)}$("#datatable-dependency-check tbody").html(t.join())},initDatatableDependencyCheck=function(){mergeNonImpactingReleaseTrains(),insertRowsIntoDependencyCheckHtmlTable(),$("#datatable-dependency-check").DataTable({fixedHeader:{header:!0,footer:!0},scrollCollapse:!0,scrollX:!0,scrollY:200,ordering:!1,paging:!1,initComplete:function(){$("#datatable-dependency-check_wrapper div.row:nth-child(3)").remove(),$("#datatable-dependency-check_wrapper div.row:nth-child(1)").remove(),this.api().columns().every(function(){let e=this,t=$('<br><select><option value=""></option></select>').appendTo($(e.header())).on("change",function(){let t=$.fn.dataTable.util.escapeRegex($(this).val());e.search(t?"^"+t+"$":"",!0,!1).draw()});e.data().unique().sort().reverse().each(function(e){t.append('<option value="'+e+'">'+e+"</option>")})}),this.api().draw()}})},initDatatableDependencyCheckOld=function(){$("#datatable-dependency-check-old").DataTable({fixedHeader:{header:!0,footer:!0},scrollCollapse:!0,scrollX:!0,scrollY:200,ordering:!1,paging:!1,initComplete:function(){$("#datatable-dependency-check-old_wrapper div.row:nth-child(3)").remove(),$("#datatable-dependency-check-old_wrapper div.row:nth-child(1)").remove(),this.api().columns().every(function(){let e=this,t=$('<br><select><option value=""></option></select>').appendTo($(e.header())).on("change",function(){let t=$.fn.dataTable.util.escapeRegex($(this).val());e.search(t?"^"+t+"$":"",!0,!1).draw()});e.data().unique().sort().reverse().each(function(e){t.append('<option value="'+e+'">'+e+"</option>")})}),this.api().draw()}})},updateClipboard=function(e,t){navigator.permissions.query({name:"clipboard-write"}).then(n=>{n.state==="granted"||n.state==="prompt"?navigator.clipboard.writeText(e).then(function(){t.innerHTML="Copied",setTimeout(function(){t.innerHTML="Copy"},2e3)},function(){alert("Error during the copy to clipboard process!")}):alert('Unable to copy to clipboard because your browser does not have the permissions to use the "clipboard-write" API!')})},copyTabContentToClipboard=function(e,t){let n=$("#"+e+" a.active")[0].getAttribute("aria-controls"),s=$("#"+n+" code")[0].innerText;updateClipboard(s,t)},copyCodeContentToClipboard=function(e,t){let n=$("#code-"+e)[0].innerText;updateClipboard(n,t)},o=new Set,computeAppContent=function(e){let t="code#all-"+e+"-dependencies span#",n=$(t+"keypop-reader-java-api").html();return o.has("cardCalypso")&&(n+=`
`+$(t+"keypop-calypso-card-java-api").html()),o.has("cardCalypsoLegacySam")&&(n+=`
`+$(t+"keypop-calypso-crypto-legacysam-java-api").html()),n+=`
`+$(t+"keyple-common-java-api").html()+`
`+$(t+"keyple-util-java-lib").html()+`
`+$(t+"keyple-service-java-lib").html(),(o.has("serviceResource")||o.has("pluginCardResource"))&&(n+=`
`+$(t+"keyple-service-resource-java-lib").html()),(o.has("distributedLocal")||o.has("distributedRemote"))&&(n+=`
`+$(t+"keyple-distributed-network-java-lib").html()),o.has("distributedLocal")&&(n+=`
`+$(t+"keyple-distributed-local-java-lib").html()),o.has("distributedRemote")&&(n+=`
`+$(t+"keyple-distributed-remote-java-lib").html()),o.has("cardGeneric")&&(n+=`
`+$(t+"keyple-card-generic-java-lib").html()),o.has("cardCalypso")&&(n+=`
`+$(t+"keyple-card-calypso-java-lib").html()),o.has("cardCalypsoLegacySam")&&(n+=`
`+$(t+"keyple-card-calypso-crypto-legacysam-java-lib").html()),o.has("cardCalypsoPki")&&(n+=`
`+$(t+"keyple-card-calypso-crypto-pki-java-lib").html()),o.has("pluginAndroidNfc")&&(n+=`
`+$(t+"keyple-plugin-android-nfc-java-lib").html()),o.has("pluginAndroidOmapi")&&(n+=`
`+$(t+"keyple-plugin-android-omapi-java-lib").html()),o.has("pluginCardResource")&&(n+=`
`+$(t+"keyple-plugin-cardresource-java-lib").html()),o.has("pluginPcsc")&&(n+=`
`+$(t+"keyple-plugin-pcsc-java-lib").html()),o.has("pluginStub")&&(n+=`
`+$(t+"keyple-plugin-stub-java-lib").html()),n},d="Begin Keyple configuration (generated by 'https://keyple.org/components/overview/configuration-wizard/')",u="End Keyple configuration",i='<span class="line"><span class="cl"><span class="c1">// '+d+`</span></span></span>
`,a=`<span class="line"><span class="cl"><span class="c1">
// `+u+"</span></span></span>",h='<span class="line"><span class="cl"><span class="c1">&lt!-- '+d+` --&gt</span></span></span>
`,m=`<span class="line"><span class="cl"><span class="c1">
&lt!-- `+u+" --&gt</span></span></span>",updateAppDependencies=function(e,t){t!=null&&(t.checked===!0?o.add(t.id):o.delete(t.id));let n="#tabs-"+e+"-content";$(n+" .language-gradle")[0].innerHTML=i+computeAppContent("groovy")+a,$(n+" .language-kotlin")[0].innerHTML=i+computeAppContent("kotlin")+a,$(n+" .language-xml")[0].innerHTML=h+computeAppContent("maven")+m},c=new Set,computeCardContent=function(e){let t="code#all-"+e+"-dependencies span#",n=$(t+"keypop-reader-java-api").html()+`
`+$(t+"keypop-card-java-api").html()+`
`+$(t+"keyple-common-java-api").html()+`
`+$(t+"keyple-util-java-lib").html();return c.has("cardServiceResource")&&(n+=`
`+$(t+"keyple-service-resource-java-lib").html()),n},updateCardDependencies=function(e,t){t!=null&&(t.checked===!0?c.add(t.id):c.delete(t.id));let n="#tabs-"+e+"-content";$(n+" .language-gradle")[0].innerHTML=i+computeCardContent("groovy")+a,$(n+" .language-kotlin")[0].innerHTML=i+computeCardContent("kotlin")+a,$(n+" .language-xml")[0].innerHTML=h+computeCardContent("maven")+m},loadProjectDashboard=async function(){let t=window.location.href+"../";t.includes("localhost")&&(t="https://keyple.org/");async function o(e){let n=await fetch(t+"dashboard/"+e+".json?date="+Date.now());return await n.json()}async function e(e,n){let s=await fetch(t+"dashboard/"+e+n+".json?date="+Date.now());return await s.json()}async function j(t,s,o){let f=b.insertRow();f.id=t;const u=await e(o[0],"_"),a=document.getElementById(t);let i=a.insertCell(-1),h=document.createElement("a"),p=document.createTextNode(u.name);if(h.appendChild(p),h.title=u.name,h.href=u.html_url,h.target="_blank",i.appendChild(h),i=a.insertCell(-1),o[1]===!0){i.setAttribute("class","text-center");let e=document.createTextNode("  ");i.appendChild(e),h=document.createElement("a"),i.appendChild(e),h.innerHTML='<i class="fas fa-book"></i>',h.title="API documentation for "+u.name,h.href="https://eclipse-keyple.github.io/"+u.name,h.target="_blank",i.appendChild(h)}i=a.insertCell(-1),i.setAttribute("id","repos-status-"+t),i.setAttribute("class","text-center"),i=a.insertCell(-1),i.setAttribute("id","latest-release-"+t),i.setAttribute("class","text-center"),i.appendChild(document.createTextNode("")),i=a.insertCell(-1),i.setAttribute("id","release-date-"+t),i.setAttribute("class","text-center"),i.appendChild(document.createTextNode("")),i=a.insertCell(-1),i.setAttribute("id","latest-tag-"+t),i.setAttribute("class","text-center"),i.appendChild(document.createTextNode("")),i=a.insertCell(-1),i.setAttribute("id","issue-"+t),i.setAttribute("class","text-center"),i.appendChild(document.createTextNode(u.open_issues_count.toString())),u.open_issues_count>0&&(i.style.backgroundColor="orange"),i=a.insertCell(-1),i.setAttribute("id","branch-"+t),i.setAttribute("class","text-center"),i.appendChild(document.createTextNode("")),i=a.insertCell(-1),i.setAttribute("id","pull-"+t),i.setAttribute("class","text-center"),i.appendChild(document.createTextNode("")),i=a.insertCell(-1),i.setAttribute("class","text-center"),i.appendChild(document.createTextNode(u.forks.toString())),i=a.insertCell(-1),i.setAttribute("class","text-center"),i.appendChild(document.createTextNode(u.stargazers_count.toString())),i=a.insertCell(-1),i.setAttribute("class","text-center"),i.innerHTML=n(u.pushed_at),i=a.insertCell(-1),i.setAttribute("class","text-center"),i.innerHTML=n(u.created_at),await v(t,s,o[0]),await r(t,s,o[0]),await m(t,s,o[0]),await d(t,s,o[0]),await c(t,s,o[0]),o[2]===!0&&await l(t,s,o[0]),console.log(u.data)}async function v(t,n,s){const o=await e(s,"_branches");let i=document.getElementById("branch-"+t);i.innerHTML=""+o.length,o.length>2&&(i.style.backgroundColor="#FFE0F0")}async function r(t,n,s){const o=await e(s,"_pulls");let i=document.getElementById("pull-"+t);o.length>0&&(i.style.backgroundColor="orange"),i.innerHTML=o.length}async function m(t,n,s){let o=document.getElementById("latest-release-"+t);try{const t=await e(s,"_releases_latest");t.tag_name!==void 0&&(o.innerHTML=t.tag_name)}catch{}}async function d(t,s,o){let i=document.getElementById("release-date-"+t);try{const t=await e(o,"_releases_latest");t.tag_name!==void 0&&(i.innerHTML=n(t.published_at))}catch{}}async function c(t,n,s){let o=document.getElementById("latest-tag-"+t);try{const t=await e(s,"_tags");o.innerHTML=t[0].name}catch{}}async function l(t,n,s){let r=document.getElementById("repos-status-"+t),i,a;try{i=await e(s,"_commits_status"),a="main"}catch{}const o=document.createElement("a"),c=document.createTextNode("⬤");switch(o.appendChild(c),o.title="CI status page",o.href="https://ci.eclipse.org/keyple/job/Keyple/job/"+s+"/job/"+a+"/",o.target="_blank",i.state){case"error":case"failure":o.style.color="red",o.title+=": failure";break;case"pending":o.style.color="orange",o.title+=": pending";break;case"success":o.style.color="green",o.title+=": success";break}r.appendChild(o)}function n(e){let t=new Date(e),n=""+(t.getMonth()+1),s=""+t.getDate(),c=t.getFullYear(),o=""+t.getHours(),i=""+t.getMinutes(),a=""+t.getSeconds();n.length<2&&(n="0"+n),s.length<2&&(s="0"+s);const r=[c,n,s].join("-");o.length<2&&(o="0"+o),i.length<2&&(i="0"+i),a.length<2&&(a="0"+a);const l=[o,i,a].join(":");return'<span data-toggle="tooltip" title="'+r+" "+l+'">'+r+"</span>"}let u="eclipse-keyple";const h=await o("datetime"),s=new Date(h.datetime),f=s.getTimezoneOffset(),p=new Date(s.getTime()-f*60*1e3),g={hour:"2-digit",minute:"2-digit",hour12:!1,timeZoneName:"short"};$("#project-dashboard-datetime")[0].innerHTML=p.toISOString().split("T")[0]+", "+s.toLocaleTimeString("en-EN",g);let a=await o("repository_list");const b=document.getElementById("project-dashboard-content");let i=[];for(let e=0;e<a.length;e++){let t=j((e+1).toString(),u,a[e]);i.push(t)}await(async()=>{await Promise.all(i).finally(function(){$("#project-dashboard-table").DataTable({lengthMenu:[25,50,75,100],pageLength:50,order:[[11,"desc"]],oLanguage:{sSearch:"Filter:"}}),$(".dataTables_length").addClass("bs-select");let e=$("#project-dashboard-table")[0];if(e.scrollWidth<window.innerWidth)$(".universal-wrapper").width(e.scrollWidth);else{$(".universal-wrapper").width(window.innerWidth-50);for(let t=0;t<e.rows[0].cells.length;t++)e.rows[0].cells[t].style.whiteSpace="normal";if(e.scrollWidth>window.innerWidth-50)for(let t=0;t<e.rows.length;t++)e.rows[t].cells[0].style.whiteSpace="normal"}})})()},initExternalResourceTable=function(e){$("#"+e).DataTable({paging:!1,filter:!1,language:{info:""}})},loadStatistics=async function(){const e="-hotfixes-";async function t(){const e=await fetch("stats_files"),t=await e.text(),n=t.split(`
`).map(e=>e.trim()).filter(e=>e);return n.map(e=>{const t=e.split(" ");return t[0].split("/")[1]})}function n(e){return d3.csv(e,d3.autoType)}async function s(){function O(t,n){t.on("mouseover",function(t,s){u.style("display","block").html(`<strong>${n.split(e)[0]}</strong><br/>
                               <u>Version</u>: ${s.version_tag}<br/>
                               <u>Date</u>: ${d3.timeFormat("%Y-%m-%d")(s.date)}<br/>
                               <u>Total lines</u>: ${s.total_lines}<br/>
                               <u>Lines added</u>: ${s.lines_added}<br/>
                               <u>Lines deleted</u>: ${s.lines_deleted}<br/>
                               <u>Delta</u>: ${s.lines_added-s.lines_deleted}`)}).on("mousemove",function(e){u.style("left",e.pageX+10+"px").style("top",e.pageY-20+"px")}).on("mouseout",function(){u.style("display","none")})}function x(e){const t=e.selection;if(!t)return;const[n,i]=t[0],[c,l]=t[1],d=[s.invert(n),s.invert(c)],u=[o.invert(l),o.invert(i)];s.domain(d),o.domain(u),g.transition().duration(1e3).call(d3.axisBottom(s)),v.transition().duration(1e3).call(d3.axisLeft(o)),r.selectAll("path").transition().duration(1e3).attr("d",e=>h.x(e=>s(e.date)).y(e=>o(e.total_lines))(e));const m=r.selectAll("circle").transition().duration(1e3).attr("cx",e=>s(e.date)).attr("cy",e=>o(e.total_lines));a.select(".brush").call(p.move,null)}const j=await t(),_=j.map(e=>n(`${e}.csv`).then(t=>({repo:e,data:t}))),c=(await Promise.all(_)).filter(e=>e.data.length>0),i={top:20,right:30,bottom:30,left:40},f=$(".article-style")[0].clientWidth-i.left-i.right,d=500-i.top-i.bottom,a=d3.select("#chart").append("svg").attr("width",f+i.left+i.right).attr("height",d+i.top+i.bottom).append("g").attr("transform",`translate(${i.left},${i.top})`),s=d3.scaleTime().domain([d3.min(c,e=>d3.min(e.data,e=>e.date)),d3.max(c,e=>d3.max(e.data,e=>e.date))]).range([0,f]),o=d3.scaleLinear().domain([0,d3.max(c,e=>d3.max(e.data,e=>e.total_lines))]).nice().range([d,0]),y=s.domain(),b=o.domain(),g=a.append("g").attr("transform",`translate(0,${d})`).call(d3.axisBottom(s)),v=a.append("g").call(d3.axisLeft(o)),h=d3.line().x(e=>s(e.date)).y(e=>o(e.total_lines)),p=d3.brush().extent([[0,0],[f,d]]).on("end",x);a.append("g").attr("class","brush").call(p);const r=a.append("g"),u=d3.select("#chartTooltip"),w=d3.scaleOrdinal(d3.schemeCategory10),l=new Map,m=new Map;c.forEach(t=>{let i;const n=t.repo.split(e)[0];let a=[];l.has(n)?(i=l.get(n),a=m.get(n)):(i=w(n),l.set(n,i),m.set(n,a)),a.push(t.repo);const d=r.append("path").datum(t.data).attr("class",`line line-${t.repo}`).attr("fill","none").attr("stroke",i).attr("stroke-width",1.5).attr("d",h),c=r.selectAll(`.dot-${t.repo}`).data(t.data).enter().append("circle").attr("class",`dot dot-${t.repo}`).attr("cx",e=>s(e.date)).attr("cy",e=>o(e.total_lines)).attr("r",4).attr("fill",i);O(c,t.repo)}),d3.select("#resetZoom").on("click",()=>{s.domain(y),o.domain(b),g.transition().duration(1e3).call(d3.axisBottom(s)),v.transition().duration(1e3).call(d3.axisLeft(o)),r.selectAll("path").transition().duration(1e3).attr("d",e=>h.x(e=>s(e.date)).y(e=>o(e.total_lines))(e));const e=r.selectAll("circle").transition().duration(1e3).attr("cx",e=>s(e.date)).attr("cy",e=>o(e.total_lines))}),d3.select("#checkbox-select-all").property("checked",!0).on("change",function(){const e=d3.select(this).property("checked");d3.selectAll(".checkbox-component").property("checked",e).each(function(){d3.select(this).dispatch("change")})});const C=d3.select("#datatable-statistics-content");c.forEach(t=>{if(t.repo.indexOf(e)===-1){const o=t.repo.split(e)[0],n=C.append("tr");let i=n.append("td");i.append("input").attr("type","checkbox").attr("class","checkbox-component").attr("checked",!0).on("change",function(){const e=d3.select(this).property("checked");m.get(o).forEach(t=>{a.selectAll(`.line-${t}`).style("display",e?null:"none"),a.selectAll(`.dot-${t}`).style("display",e?null:"none")})}),n.append("td").text(t.repo),n.append("td").style("background-color",l.get(t.repo));const s=t.data[t.data.length-1];n.append("td").text(s.version_tag),n.append("td").text(d3.timeFormat("%Y-%m-%d")(s.date)),n.append("td").text(s.total_lines),n.append("td").text(s.majors),n.append("td").text(s.minors),n.append("td").text(s.patches)}}),$("#datatable-statistics").DataTable({paging:!1,filter:!1,order:[[1,"asc"]],language:{info:""}})}s().catch(e=>console.error("Error creating chart:",e))}})();/*! medium-zoom 1.0.8 | MIT License | https://github.com/francoischalifour/medium-zoom */