text: $(document).ready(function(){var t=$("#back-to-top"),n=$("footer.footer"),e=$(".column-main"),i=$(".column-left"),a=$(".column-right"),s=0,o=20,r=20,c=null,l={base:{classname:"card has-text-centered",left:"",width:64,bottom:r,"border-radius":4}};function u(n){if(null===c||!function(t,n){for(var e in t)if(!n.hasOwnProperty(e)||n[e]!==t[e])return!1;for(var e in n)if(!t.hasOwnProperty(e)||t[e]!=t[e])return!1;return!0}(c,n)){t.attr("class",n.classname);for(let e in n)"classname"!==e&&t.css(e,n[e]);c=n}}function d(){return window.innerWidth>=1078}function f(){return a.length>0}function h(){return $(window).scrollTop()+$(window).height()}function p(){return t.outerHeight(!0)}function m(){if(d()||window.innerWidth>=768&&!d()&&!(i.length>0)&&f()){var c,m=(e.outerWidth()-e.width())/2,g=$(window).width()-t.outerWidth(!0)-o,v=n.offset().top+p()/2+r;c=0==$(window).scrollTop()||h()<(f()?Math.max.apply(null,a.find(".widget").map(function(){return $(this).offset().top+$(this).outerHeight(!0)})):0)+m+p()?l["desktop-hidden"]:h()<v?l["desktop-visible"]:Object.assign({},l["desktop-dock"],{bottom:h()-v+r});var b=e.offset().left+e.outerWidth()+m;u(c=Object.assign({},c,{left:Math.min(b,g)}))}else $(window).scrollTop()<s&&$(window).scrollTop()>0?u(l["mobile-visible"]):u(l["mobile-hidden"]),s=$(window).scrollTop()}l["desktop-hidden"]=Object.assign({},l.base,{classname:l.base.classname+" rise-up"}),l["desktop-visible"]=Object.assign({},l["desktop-hidden"],{classname:l["desktop-hidden"].classname+" fade-in"}),l["desktop-dock"]=Object.assign({},l["desktop-visible"],{classname:l["desktop-visible"].classname+" fade-in",width:40,"border-radius":"50%"}),l["mobile-hidden"]=Object.assign({},l.base,{classname:l.base.classname+" fade-in",right:o}),l["mobile-visible"]=Object.assign({},l["mobile-hidden"],{classname:l["mobile-hidden"].classname+" rise-up"}),m(),$(window).resize(m),$(window).scroll(m),$("#back-to-top").on("click",function(){$("body, html").animate({scrollTop:0},400)})}),document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof ClipboardJS&&($("figure.highlight").each(function(){var t="code-"+Date.now()+(1e3*Math.random()|0);$(this).attr("id",t),$(this).prepend($(`<button class="button is-borderless is-radiusless is-small copy" data-clipboard-target="#${t} .code" title="Copy"><i class="fas fa-copy"></i></button>`))}),new ClipboardJS(".highlight .copy"))}),document.addEventListener("DOMContentLoaded",function(){"function"==typeof $.fn.lightGallery&&$(".article").lightGallery({selector:".gallery-item"}),"function"==typeof $.fn.justifiedGallery&&$(".justified-gallery").justifiedGallery()}),function(t,n){var e=t(".ins-search"),i=e.find(".ins-search-input"),a=e.find(".ins-section-wrapper"),s=e.find(".ins-section-container");function o(e,i,a,s,o){return t("<div>").addClass("ins-selectable").addClass("ins-search-item").append(t("<header>").append(t("<i>").addClass("fa").addClass("fa-"+e)).append(t("<span>").addClass("ins-title").text(null!=i&&""!==i?i:n.TRANSLATION.UNTITLED)).append(a?t("<span>").addClass("ins-slug").text(a):null)).append(s?t("<p>").addClass("ins-search-preview").text(s):null).attr("data-url",o)}function r(e,i){var a,s,r;if(0===i.length)return null;switch(a=n.TRANSLATION[e],e){case"POSTS":case"PAGES":s=i.map(function(t){return o("file",t.title,null,t.text.slice(0,150),t.link)});break;case"CATEGORIES":case"TAGS":s=i.map(function(t){return o("CATEGORIES"===e?"folder":"tag",t.name,t.slug,null,t.link)});break;default:return null}return(r=a,t("<section>").addClass("ins-section").append(t("<header>").addClass("ins-section-header").text(r))).append(s)}function c(t){return t.split(" ").filter(function(t){return!!t}).map(function(t){return t.toUpperCase()})}function l(t,n,e){var i=c(t);return i.filter(function(t){return e.filter(function(e){return!!n.hasOwnProperty(e)&&(n[e].toUpperCase().indexOf(t)>-1||void 0)}).length>0}).length===i.length}function u(t,n,e,i){var a=0;return c(t).forEach(function(t){var s=new RegExp(t,"img");e.forEach(function(t,e){if(n.hasOwnProperty(t)){var o=n[t].match(s);a+=o?o.length*i[e]:0}})}),a}function d(t,n){var e=function(t){return{POST:function(n){return u(t,n,["title","text"],[3,1])},PAGE:function(n){return u(t,n,["title","text"],[3,1])},CATEGORY:function(n){return u(t,n,["name","slug"],[1,1])},TAG:function(n){return u(t,n,["name","slug"],[1,1])}}}(n),i=function(t){return{POST:function(n){return l(t,n,["title","text"])},PAGE:function(n){return l(t,n,["title","text"])},CATEGORY:function(n){return l(t,n,["name","slug"])},TAG:function(n){return l(t,n,["name","slug"])}}}(n),a=t.posts,s=t.pages,o=t.tags,r=t.categories;return{posts:a.filter(i.POST).sort(function(t,n){return e.POST(n)-e.POST(t)}).slice(0,5),pages:s.filter(i.PAGE).sort(function(t,n){return e.PAGE(n)-e.PAGE(t)}).slice(0,5),categories:r.filter(i.CATEGORY).sort(function(t,n){return e.CATEGORY(n)-e.CATEGORY(t)}).slice(0,5),tags:o.filter(i.TAG).sort(function(t,n){return e.TAG(n)-e.TAG(t)}).slice(0,5)}}function f(n){var e=t.makeArray(s.find(".ins-selectable")),i=-1;e.forEach(function(n,e){t(n).hasClass("active")&&(i=e)});var o=(e.length+i+n)%e.length;t(e[i]).removeClass("active"),t(e[o]).addClass("active"),function(t){if(0!==t.length){var n=a[0].clientHeight,e=t.position().top-a.scrollTop(),i=t[0].clientHeight+t.position().top;i>n+a.scrollTop()&&a.scrollTop(i-a[0].clientHeight),e<0&&a.scrollTop(t.position().top)}}(t(e[o]))}function h(t){t&&t.length&&(location.href=t.attr("data-url"))}e.parent().remove(".ins-search"),t("body").append(e),t.getJSON(n.CONTENT_URL,function(n){"#ins-search"===location.hash.trim()&&e.addClass("show"),i.on("input",function(){var e=t(this).val();!function(t){for(var n in s.empty(),t)s.append(r(n.toUpperCase(),t[n]))}(d(n,e))}),i.trigger("input")});var p=!1;t(document).on("click focus",".navbar-main .search",function(){e.addClass("show"),e.find(".ins-search-input").focus()}).on("click touchend",".ins-search-item",function(n){("click"===n.type||p)&&(h(t(this)),p=!1)}).on("click touchend",".ins-close",function(n){("click"===n.type||p)&&(t(".navbar-main").css("pointer-events","none"),setTimeout(function(){t(".navbar-main").css("pointer-events","auto")},400),e.removeClass("show"),p=!1)}).on("keydown",function(t){if(e.hasClass("show"))switch(t.keyCode){case 27:e.removeClass("show");break;case 38:f(-1);break;case 40:f(1);break;case 13:h(s.find(".ins-selectable.active").eq(0))}}).on("touchstart",function(t){p=!0}).on("touchmove",function(t){p=!1})}(jQuery,window.INSIGHT_CONFIG),function(t){function n(){const n=t(".navbar-main .navbar-start").outerWidth()+t(".navbar-main .navbar-end").outerWidth();t(document).outerWidth()<n?t(".navbar-main .navbar-menu").addClass("is-flex-start"):t(".navbar-main .navbar-menu").removeClass("is-flex-start")}t('.article img:not(".not-gallery-item")').each(function(){0===t(this).parent("a").length&&(t(this).wrap('<a class="gallery-item" href="'+t(this).attr("src")+'"></a>'),this.alt&&t(this).after('<div class="has-text-centered is-size-6 has-text-grey caption">'+this.alt+"</div>"))}),"function"==typeof moment&&t(".article-meta time").each(function(){t(this).text(moment(t(this).attr("datetime")).fromNow())}),n(),t(window).resize(n);var e=t("#toc");if(e.length>0){var i=t("<div>");function a(){e.toggleClass("is-active"),i.toggleClass("is-active")}i.attr("id","toc-mask"),t("body").append(i),e.on("click",a),i.on("click",a),t(".navbar-main .catalogue").on("click",a)}}(jQuery);