/** © Read the LICENSE file located at the theme folder. */!function(){"use strict";class e{static load(t){const n=new e;n.ready=n.ready.bind(n),n.callback=t,n.listen()}listen(){"loading"!==document.readyState?this.ready():(document.addEventListener("DOMContentLoaded",this.ready),window.addEventListener("load",this.ready))}ready(){document.removeEventListener("DOMContentLoaded",this.ready),window.removeEventListener("load",this.ready),this.callback()}}class t{constructor(){this.onClick=this.onClick.bind(this)}init(){this.asALinks=document.querySelectorAll(".js-as-a"),this.removeEventListeners(),this.addEventListeners()}removeEventListeners(){this.asALinks.forEach((e=>{e.removeEventListener("click",this.onClick)}))}addEventListeners(){this.asALinks.forEach((e=>{e.addEventListener("click",this.onClick)}))}onClick(e){const{currentTarget:t,target:n}=e;if(n!==t){if("a"===n.tagName.toLowerCase()&&n.href&&"#"!==n.href)return;const e=n.closest("a");if(e&&"#"!==e.href)return;const i=n.closest(".js-as-a");if(i&&i!==t)return}this.goToLink(t)}goToLink(e){var t;const n=null!==(t=e.dataset.mode)&&void 0!==t?t:"encoded",i=e.dataset.target;let s=e.dataset.info;"encoded"===n&&(s=decodeURIComponent(window.atob(s).split("").map((e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join(""))),"_blank"===i?window.open(s,"_blank"):window.location.href=s}}e.load((()=>{window.wasabi_obfuscated_links=new t,window.wasabi_obfuscated_links.init()}))}();