芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/azuleverything.com/calendar/assets/bravo.min.2.2.1.146.js
/*! bravo - v2.2.1 - build 146 - 2023-08-14 * Copyright (c) 2023 Deux Huit Huit (https://deuxhuithuit.com); * PRIVATE */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";function e(e){var t=!0,n=!1,o=null,d={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function u(e){t=!1}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=!0)},!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(n&&(t=!0),a())},!0),a(),e.addEventListener("focus",function(e){var n,o,u;i(e.target)&&(t||(n=e.target,o=n.type,"INPUT"===(u=n.tagName)&&d[o]&&!n.readOnly||"TEXTAREA"===u&&!n.readOnly||n.isContentEditable))&&s(e.target)},!0),e.addEventListener("blur",function(e){var t;i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(o),o=window.setTimeout(function(){n=!1},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))},!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)});function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&Symbol.iterator in Object(iter))return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i
sp){var sLen=_stack.length;for(var x=sp;x
1&&arguments[1]!==undefined?arguments[1]:{};if(!url){url=window.location.origin+"/"}options=Object.assign({},defaultFetchOptions(),options);return window.fetch(url,options)};global.App=Object.assign({},global.App,{loader:{load:load,isLoading:function isLoading(){return _isLoading}}})})(window);(function(global,undefined){'use strict';var argsToObject=function argsToObject(arg){if(!!arg.args&&!Array.isArray(arg.args)){arg.args=[arg.args]}var a={args:arg.args||arguments,fx:arg.fx||"warn",me:arg.me||"App"},t1=_typeof(a.args[0]);if(t1==="string"||t1==="number"||t1==="boolean"){a.args[0]="["+a.me+"] "+a.args[0]}return a};var _logs=[];var log=function log(arg){if(!arg){return this}var a=argsToObject(arg);if(App.debug()){if(typeof console[a.fx]!=="function"){a.fx="log"}if(!!window.console[a.fx].apply){window.console[a.fx].apply(window.console,a.args)}else{a.args.forEach(function logArgs(arg){window.console[a.fx](arg)})}}_logs.push(a);return this};global.App=Object.assign({},global.App,{log:log,logs:function logs(){return _logs}})})(window);(function(global,undefined){'use strict';var getCurrentUrl=function getCurrentUrl(){return document.location.pathname};var mediatorIsLoadingPage=false;var currentRouteUrl=getCurrentUrl();var currentPage=null;var previousPage=null;var previousUrl="";var validateMediatorState=function validateMediatorState(){if(!!mediatorIsLoadingPage){App.log({args:"Mediator is busy waiting for a page load.",fx:"error"})}return!mediatorIsLoadingPage};var canEnterNextPage=function canEnterNextPage(nextPage){var result=true;if(!nextPage.canEnter()){App.log({fx:"error",args:["Cannot enter page %s.",nextPage.key()]});result=false}return result};var canLeaveCurrentPage=function canLeaveCurrentPage(){var result=false;if(!currentPage){App.log({args:"No current page set.",fx:"error"})}else if(!currentPage.canLeave()){App.log({args:["Cannot leave page %s.",currentPage.key()],fx:"error"})}else{result=true}return result};var resolvePageAction=function resolvePageAction(key,data){if(!!currentPage){return App.actions.resolve(currentPage.actions,key,data)}else{App.log({args:"Can not notify page: No current page set.",fx:"error"})}};var notifyAll=function notifyAll(key,data,cb){var actions=[];var pa=resolvePageAction(key,data);if(!!pa){actions.push(pa)}actions=actions.concat(App.modules.resolve(key,data));App.actions.execute(actions,key,data,cb);return this};var notifyPage=function notifyPage(key,data,cb){var pa=resolvePageAction(key,data);if(!!pa){App.actions.execute([pa],key,data,cb)}return this};var gotoPage=function gotoPage(obj,previousPoppedUrl){var pageData=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var changeUrl=arguments.length>3&&arguments[3]!==undefined?arguments[3]:true;var nextPage;var route="";var safeParseData=function safeParseData(data){try{var parser=new window.DOMParser;var doc=parser.parseFromString(data,"text/html");return doc}catch(ex){App.log({args:[ex.message],fx:"error"});App.modules.notify("pages.failedtoparse",{data:data,route:route,nextPage:nextPage,currentPage:currentPage})}return null};var enterLeave=function enterLeave(){var leavingPage=currentPage;pageData.firstTime=false;if(!nextPage.isInited()){nextPage.init();nextPage.setInited();pageData.firstTime=true}App.modules.notify("page.leaving",{page:leavingPage});leavingPage.leave(function(){currentPage=null;previousPage=leavingPage;previousUrl=!!previousPoppedUrl?previousPoppedUrl:getCurrentUrl();leavingPage=null;App.modules.notify("page.leave",{page:previousPage})});App.modules.notify("page.entering",{page:nextPage,route:route});nextPage.enter(function(){currentPage=nextPage;App.modules.notify("page.enter",{page:nextPage,route:route});mediatorIsLoadingPage=false},pageData)};var loadSuccess=function loadSuccess(response){if(!!response.redirected){window.history.replaceState({data:{mediator:true,type:"pushState",redirected:true}},"",response.url);nextPage=App.pages.getPageForHref(response.url);route=response.url;var node=document.querySelector(nextPage.selector());if(!!node){node.style.opacity=0;node.style.display="none";return enterLeave()}}return response.text().then(function(data){var htmldata=safeParseData(data);var node=htmldata.querySelector(nextPage.selector());var elem=document.querySelector(App.root());if(!node){App.log({args:["Could not find \"%s\" in xhr data.",nextPage.selector()],fx:"error"});mediatorIsLoadingPage=false;App.modules.notify("pages.notfound",{data:data,url:obj,response:response,status:response.status})}else{node.style.opacity=0;node.style.display="none";elem.appendChild(node);App.modules.notify("pages.loaded",{elem:elem,data:data,html:htmldata,url:obj,page:nextPage,node:node,response:response,status:response.status});enterLeave()}})};if(validateMediatorState()&&canLeaveCurrentPage()){if(typeof obj==="string"){nextPage=App.pages.getPageForHref(obj);route=obj}else{App.log({fx:"error",args:"Url parameter must be of type string got "+_typeof(obj)});return}if(!nextPage){App.modules.notify("pages.routeNotFound",{page:currentPage,url:obj});App.log({args:["Route \"%s\" was not found.",obj],fx:"error"})}else{if(canEnterNextPage(nextPage)){if(nextPage.key()===currentPage.key()){App.modules.notify("pages.navigateToCurrent",{page:nextPage,route:route});App.log("Next page is the current one")}else{if(!!changeUrl){window.history.pushState({data:{mediator:true}},"",obj);pageData.type="pushState"}App.modules.notify("pages.loading",{page:nextPage});App.modules.notify("pages.requestBeginPageTransition",{currentPage:currentPage,nextPage:nextPage,route:route});if(!App.pages.loaded(obj)){mediatorIsLoadingPage=true;App.loader.load(obj).then(loadSuccess).catch(function(event){App.modules.notify("pages.loaderror",{event:event,url:obj})})}else{enterLeave();App.modules.notify("pages.loaded",{elem:document.querySelector(App.root()),url:obj,page:nextPage})}}}else{App.log({args:["Route \"%s\" is invalid.",obj],fx:"error"})}}}return this};var initPage=function initPage(page){if(!!currentPage){App.log({args:["Previous current page will be changed",{currentPage:currentPage,previousPage:previousPage,newCurrentPage:page}],fx:"warning"})}currentPage=page;previousPage=previousPage||page;App.modules.notify("page.entering",{page:currentPage,route:currentRouteUrl});currentPage.enter(function currentPageEnterCallback(){App.modules.notify("page.enter",{page:currentPage,route:currentRouteUrl})},true)};global.App=Object.assign({},global.App,{mediator:{getCurrentUrl:getCurrentUrl,getCurrentPage:function getCurrentPage(){return currentPage},setCurrentPage:function setCurrentPage(page){currentPage=page},getPreviousUrl:function getPreviousUrl(){return previousUrl},getPreviousPage:function getPreviousPage(){return previousPage},notify:notifyAll,notifyCurrentPage:notifyPage,goto:gotoPage,init:initPage}})})(window);(function(global,undefined){'use strict';var modules={};var createAbstractModule=function createAbstractModule(){return{actions:function actions(){},init:function init(){}}};var createModule=function createModule(module){return Object.freeze(Object.assign({},createAbstractModule(),module))};var exportModule=function exportModule(key,module,override){if(typeof key!=="string"){App.log({args:["`key` must be a string",key],fx:"error"})}else if(!!modules[key]&&!override){App.log({args:["Overwriting module key %s is not allowed",key],fx:"error"})}else{modules[key]=createModule(module)}return modules[key]};var resolveActions=function resolveActions(key,data){return Object.keys(modules).map(function resolveAction(k){return App.actions.resolve(modules[k].actions,key,data)}).filter(function(a){return!!a})};var notifyModules=function notifyModules(key,data,cb){var actions=resolveActions(key,data);App.actions.execute(actions,key,data,cb);return this};global.App=Object.assign({},global.App,{modules:{models:function models(){return modules},exports:exportModule,notify:notifyModules,resolve:resolveActions}})})(window);(function(global,undefined){'use strict';var pageModels={};var pageInstances={};var activeRoutes={};var createPageModel=function createPageModel(key,model,override){var factory=function factory(pageData){var modelRef;var _isInited=false;if(_typeof(model)==="object"){modelRef=model}else if(typeof model==="function"){modelRef=model.call(this,key,pageData,override);if(_typeof(modelRef)!=="object"){App.log({args:["The exported page model function must return an object, "+"`%s` given (%s)",_typeof(modelRef),modelRef],fx:"error"});return null}}else{App.log({args:["The exported page model must be an object or a function, "+"`%s` given (%s)",_typeof(model),model],fx:"error"});return null}var getSelector=function getSelector(){return"[data-page-url=\""+pageData.key+"\"]"};var base={actions:function actions(){},init:function init(){},canEnter:function canEnter(){return true},canLeave:function canLeave(){return true},model:function model(){return key},enter:function enter(next,data){var p=document.querySelector(getSelector());p.style.opacity=1;p.style.display="block";if(!!data.firstTime||data.type==="pushState"){window.scrollTo({top:0,left:0,behavior:"auto"})}App.callback(next)},leave:function leave(next){var p=document.querySelector(getSelector());p.style.opacity=0;p.style.display="none";App.callback(next)}};var overwrites=Object.freeze({key:function key(){return pageData.key},selector:function selector(){return getSelector()},data:function data(){return pageData},isInited:function isInited(){return _isInited},setInited:function setInited(){_isInited=true}});return Object.freeze(Object.assign({},base,modelRef,overwrites))};activeRoutes[key]=[];return factory};var createPage=function createPage(pageData,keyModel,override){var pageModel=pageModels[keyModel];var pageInst;if(!pageModel){App.log({args:["Model `%s` not found",keyModel],fx:"error"})}else{if(!!pageInstances[pageData.key]&&!override){App.log({args:["Overwriting page key `%s` is not allowed",pageData.key],fx:"error"})}else{pageInst=pageModel(pageData);if(!!pageInst){pageInstances[pageData.key]=pageInst}return pageInst}}return false};var registerPageModel=function registerPageModel(key,pageModel,override){var keyType=_typeof(key);if(keyType!=="string"){App.log({args:["`key` must be a string, `%s` given (%s).",keyType,key],fx:"error"})}else if(!!pageModels[key]&&!override){App.log({args:["Overwriting page model key `%s` is not allowed",key],fx:"error"})}else{pageModels[key]=Object.freeze(pageModel);return pageModel}return false};var exportPage=function exportPage(key,model,override){var pageModel=createPageModel(key,model,override);return registerPageModel(key,pageModel,override)};var routeMatchStrategies={regexp:function regexp(testRoute,route,cb){if(testRoute.test(route)){return cb()}return true},string:function string(testRoute,route,cb){var regex;route=decodeURIComponent(route);route=route.split("#")[0];if(testRoute===route){return cb()}if(testRoute.indexOf("^")!==0){testRoute="^"+testRoute}if(testRoute.indexOf("^")!==testRoute.length-1){testRoute=testRoute+"$"}if(testRoute.indexOf("*")){testRoute=testRoute.replace(new RegExp("\\*","gi"),".*")}try{regex=new RegExp(testRoute)}catch(ex){App.log({args:["Error while creating RegExp %s.\n%s",testRoute,ex],fx:"error"})}if(!!regex&®ex.test(route)){return cb()}return true}};var matchRoute=function matchRoute(route,routes){var index=-1;var found=function found(i){index=i;return false};if(typeof route!=="string"){App.log({args:"`route` must be a string",fx:"error"});return index}if(!!~route.indexOf("?")){route=route.split("?")[0]}if(!!route&&!!routes){if(!Array.isArray(routes)){routes=Object.values(routes)}routes.every(function matchOneRoute(testRoute,i){var routeType=_typeof(testRoute);var routeStrategy=routeMatchStrategies[routeType];var cb=function cb(){return found(i)};if(typeof routeStrategy==="function"){return routeStrategy(testRoute,route,cb)}else if(testRoute===route){return cb()}return true})}return index};var addRoutes=function addRoutes(keyModel,routes){if(!pageModels[keyModel]){App.log({fx:"error",args:"Model \""+keyModel+"\" not found."});return false}if(!activeRoutes[keyModel]){activeRoutes[keyModel]=[]}if(keyModel==="default"){App.log({fx:"error",args:"You can't add routes to the default model"});return false}activeRoutes[keyModel]=_toConsumableArray(new Set(activeRoutes[keyModel].concat(routes)));return activeRoutes[keyModel]};var removeRoutes=function removeRoutes(keyModel,routes){if(!pageModels[keyModel]){App.log({fx:"error",args:"Model \""+keyModel+"\" not found."});return false}return false};var getPageForHref=function getPageForHref(href){if(!!pageInstances[href]){return pageInstances[href]}var model=null;for(var m in activeRoutes){if(activeRoutes.hasOwnProperty(m)){var modelRoutes=activeRoutes[m];var match=!!~matchRoute(href,modelRoutes);if(!!match){model=m;break}}}if(!model){model="default"}return createPage({key:href},model,true)};var loaded=function loaded(url){return!!document.querySelector(App.root()).querySelector("[data-page-url=\""+url+"\"]")};registerPageModel("default",createPageModel("default",{},true),{});global.App=Object.assign({},global.App,{pages:{instances:function instances(key){if(!!key){return pageInstances[key]}return pageInstances},models:function models(){return pageModels},getPageForHref:getPageForHref,page:function page(keyOrRoute){var result=pageInstances[keyOrRoute];if(!!!result){result=getPageForHref(keyOrRoute)}return result},create:createPage,exports:exportPage,loaded:loaded,routes:{active:function active(){return activeRoutes},match:matchRoute,add:addRoutes,remove:removeRoutes}}})})(window);(function(global,undefined){'use strict';var storage=function storage(_storage){return{get:function get(key){if(!key){return}key+="";return _storage[key]},set:function set(key,value){var result=false;if(!!key){key+="";try{_storage[key]=!value?"":value+"";result=true}catch(e){App.log({args:e.message,me:"Storage",fx:"error"});result=false}}return result},remove:function remove(key){var result=false;if(!!key){key+="";try{_storage.removeItem(key);result=true}catch(e){App.log({args:e.message,me:"Storage",fx:"error"});result=false}}return result},clear:function clear(regexp){var result=false;try{if(!regexp){_storage.clear()}else{var remove=[];for(var i=0;i<_storage.length;i++){var key=_storage.key(i);if(regexp.test(key)){remove.push(key)}}for(var _i=0;_i
{'use strict';var _window,_window$App;if(!!((_window=window)!==null&&_window!==void 0&&(_window$App=_window.App)!==null&&_window$App!==void 0&&_window$App.device)){const deviceTests=["iphone","ipad","ios","android","mobile","phone","tablet","touch","chrome","firefox","safari","internetexplorer","edge"];deviceTests.forEach(test=>{if(!!window.App.device[test]){document.querySelector("html").classList.add(test)}})}window.pd=(e,stopPropagation)=>{if(!!e){if(typeof e.preventDefault==="function"){e.preventDefault()}if(stopPropagation!==false&&typeof e.stopPropagation==="function"){e.stopPropagation()}}return false};const sorry=type=>{const orig=window.history[type];return function(){const rv=orig.apply(this,arguments);const e=new window.Event(type);e.arguments=arguments;e.state=arguments[0]||undefined;window.dispatchEvent(e);return rv}};window.history.pushState=sorry("pushState");window.history.replaceState=sorry("replaceState")})();(()=>{'use strict';const html=document.querySelector("html");const lang=html.getAttribute("lang");const defaults={event:"event",page:{requestURI:window.location.toString(),language:lang,referer:document.referrer,title:document.title}};const log=options=>{options=JSON.stringify(options,null,2);App.log({me:"Tracking",args:["%cpush("+options+");","color:cornflowerblue"]})};const push=options=>{if(!window.dataLayer||!window.dataLayer.push){return}window.dataLayer.push({...defaults,...options})};App.fx.exports("tracking.push",(key,options)=>{if(!window.dataLayer||!window.dataLayer.hasOwnProperty("push")){log(options)}push(options)})})();(function(){'use strict';const scripts={};const LOADED_RETRY_LIMIT=5;const STATES={idle:"idle",loading:"loading",loaded:"loaded",error:"error"};const loadScript=src=>{return new Promise((resolve,reject)=>{const script=document.createElement("script");document.body.appendChild(script);script.onload=resolve;script.onerror=reject;script.src=src})};const loadJs=(_,data)=>{const scriptKey=data.key;const script=scripts[scriptKey];if(!script){App.log({me:"load-js",fx:"error",args:["Failed to find script",scriptKey]});return}const options={loaded:()=>true,ready:()=>{},...data};if([STATES.loaded,STATES.loading].includes(script.status)){App.loaded(options.loaded,options.ready,0,LOADED_RETRY_LIMIT);return}script.status=STATES.loading;App.log({me:"load-js",args:["Loading",script.href]});loadScript(script.href).then(()=>{script.status=STATES.loaded;App.log({me:"load-js",args:["Loaded",data.key,script.href]});App.loaded(options.loaded,options.ready)}).catch(()=>{script.status=STATES.error;App.log({me:"load-js",fx:"error",args:["Failed to load script",data.key,script.href]})})};document.querySelectorAll("link[data-on-demand]").forEach(link=>{const key=link.dataset.onDemand;const href=link.href;if(!key||!href){return}scripts[key]={href,status:STATES.idle}});App.fx.exports("load-js",loadJs)})();(function(){'use strict';const STORAGE_KEY="bravo-cookies-dismissed";const STORAGE_VALUE="true";const sels={popup:".js-cookie-popup",closeBtn:".js-cookie-popup-close"};let popup;const onDismiss=()=>{popup.remove();window.localStorage.setItem(STORAGE_KEY,STORAGE_VALUE)};const init=()=>{popup=document.querySelector(sels.popup);if(!popup){return}const dismissed=window.localStorage.getItem(STORAGE_KEY)===STORAGE_VALUE;if(dismissed){popup.remove();return}const closeBtn=popup.querySelector(sels.closeBtn);if(!closeBtn){return}closeBtn.addEventListener("click",onDismiss)};App.modules.exports("cookie-popup",{init})})();(function(){'use strict';const sels={intro:".js-site-intro",introLogo:".js-intro-logo",homeLogo:".js-home-logo",homeText:".js-home-text"};const animDuration=2000;const animLoadingTimeTreshold=3000;let t=performance.now();let intro;let homeLogo;let homeText;const playAnim=()=>{window.scrollTo(0,0);const introLogo=intro.querySelector(sels.introLogo);const homeLogoY=homeLogo.getBoundingClientRect().top;const introLogoY=introLogo.getBoundingClientRect().top;const dy=homeLogoY-introLogoY;intro.style.setProperty("--dy",`${dy}px`);intro.style.setProperty("--anim-duration",`${animDuration}ms`);if(homeText){homeText.dataset.state="hidden"}intro.dataset.state="playing";window.setTimeout(()=>{intro.dataset.state="hidden";if(homeText){homeText.dataset.state="visible"}},animDuration)};const init=()=>{intro=document.querySelector(sels.intro);homeLogo=document.querySelector(sels.homeLogo);homeText=document.querySelector(sels.homeText);if(!intro||!homeLogo){return}t=performance.now();if(animLoadingTimeTreshold-t<=0){return}playAnim()};App.modules.exports("site-intro",{init})})();(()=>{'use strict';const sels={click:"[data-gtm-event=\"click\"]"};const gtmOptions={cat:"navigation",action:"click",label:window.location.pathname};const track=(el,event,value)=>{App.fx.notify("tracking.push",{event,eventCategory:el.getAttribute("data-gtm-event-cat")||gtmOptions.cat,eventAction:el.getAttribute("data-gtm-event-action")||gtmOptions.action,eventLabel:el.getAttribute("data-gtm-event-label")||gtmOptions.label,eventValue:value})};const onClick=e=>{track(e.currentTarget,"click")};const init=()=>{document.querySelectorAll(sels.click).forEach(el=>{el.addEventListener("click",onClick)})};App.modules.exports("event-tracking",{init})})();(()=>{'use strict';const scope=document.head;const metas={};const sels={tags:` title, meta[property][content], meta[name][content], meta[theme-color], link[rel="canonical"], link[rel="icon"], link[rel="alternate"], script[type="application/ld+json"] `};sels.tags=sels.tags.replace(/\s/g,"");const clone=nodelist=>[...nodelist].map(node=>node.cloneNode(true));const onPageLoaded=(key,data)=>{const{html}=data;if(!html){return}metas[data.url]=clone(html.querySelector("head").querySelectorAll(sels.tags))};const onPageEnter=(key,data)=>{if(!!metas[data.page.key()]){scope.querySelectorAll(sels.tags).forEach(el=>el.remove());metas[data.page.key()].forEach(el=>scope.append(el));App.mediator.notify("metas.updated",{metas:metas[data.page.key()]})}};const init=()=>{metas[window.location.href]=clone(scope.querySelectorAll(sels.tags))};const actions=()=>{return{pages:{loaded:onPageLoaded},page:{enter:onPageEnter}}};App.modules.exports("metas",{init:init,actions:actions})})();(()=>{'use strict';const scope=document.querySelector("#site");const sels={item:".js-language-link",metas:"link[rel=\"alternate\"]"};const updated=()=>{const altLanguages=Array.from(document.querySelectorAll(sels.metas));scope.querySelectorAll(sels.item).forEach(element=>{const linkLanguage=altLanguages.filter(alt=>alt.getAttribute("hreflang")===element.dataset.lang)[0];if(!!linkLanguage){element.setAttribute("href",linkLanguage.getAttribute("href"))}})};const actions=()=>{return{metas:{updated}}};App.modules.exports("language-links",{actions:actions})})();(undefined=>{'use strict';const updatePage=event=>{let preventGoto=false;if(!!event.state&&!!event.state.mediator){return window.pd(event,true)}const urlChangedRets=[];App.mediator.notify("url.changed",{event:event},(key,ret)=>{urlChangedRets.push(ret)});preventGoto=urlChangedRets.filter(Boolean).length>0;if(!preventGoto){App.mediator.goto(document.location.href,undefined,{type:event.type},false)}return window.pd(event,true)};const init=()=>{window.onpopstate=updatePage;window.addEventListener("pushState",updatePage)};App.modules.exports("ajax",{init:init})})();(()=>{'use strict';const scope=document.querySelector("#site");const sels={links:"a[href]"};const init=function(){scope.addEventListener(App.device.events.click,event=>{let target=event.target.matches(sels.links)?event.target:null;target=target||event.target.closest(sels.links);if(!!target&&!(event.ctrlKey||event.metaKey)){if(target.origin!==window.location.origin){return}if(target.pathname.startsWith("/assets")){return}if(target.getAttribute("download")!==null){return}if(target.getAttribute("target")!==null&&target.getAttribute("target")!=="self"){return}if(target.getAttribute("data-ajax")==="false"){return}if(target.getAttribute("data-action")==="full"){return}const urlChangeRequestedRets=[];App.mediator.notify("url.changeRequested",{event:event},(key,ret)=>{urlChangeRequestedRets.push(ret)});const preventUrlChange=urlChangeRequestedRets.filter(Boolean).length>0;if(preventUrlChange){return window.pd(event)}if(!!window.location.pathname.endsWith("/")&&!target.pathname.endsWith("/")){target.pathname+="/"}window.history.pushState({},target.textContent,target.href);return window.pd(event)}})};App.modules.exports("url-changer",{init:init})})();(function(){'use strict';const MINIMUM_FOR_PARTIAL=2;const isMultilingual=(document.documentElement.dataset.allLangs||"").split(",").length>1||true;const scope=document.body;var update=function(){var currentPath=window.location.pathname;var links=scope.querySelectorAll("a[href]");links.forEach(link=>{delete link.dataset.currentLinkPartial;delete link.dataset.currentLink;let{pathname}=link;let matches=[];if(pathname.charAt(0)!=="/"){pathname="/"+pathname}pathname.split("/").forEach((fragment,index)=>{if(fragment&&fragment===currentPath.split("/")[index]){matches.push(fragment)}});if(!!isMultilingual&&matches.length
{update()};var init=()=>{update()};var actions=()=>{return{page:{enter:onPageEnter}}};App.modules.exports("link-selector",{init,actions:actions})})();(()=>{'use strict';const themes={};const onPageLoaded=(_,data)=>{const{html}=data;if(!html){return}themes[data.url]=html.body.classList.contains("dark")?"dark":"light"};const onPageEnter=(_,data)=>{const theme=themes[data.page.key()];if(!theme){return}document.body.classList.toggle("dark",theme==="dark")};const init=()=>{themes[window.location.href]=document.body.classList.contains("dark")?"dark":"light"};const actions=()=>{return{pages:{loaded:onPageLoaded},page:{enter:onPageEnter}}};App.modules.exports("header-theme",{init,actions})})();(function(){'use strict';const site=document.querySelector("#site");const sels={ctn:".js-watermark-ctn"};const init=()=>{site.querySelectorAll(sels.ctn).forEach(el=>{if(el.dataset.href&&!el.innerHTML){window.fetch(el.dataset.href).then(res=>res.text()).then(html=>{const fragment=document.createRange().createContextualFragment(html);const watermark=fragment.querySelector("watermark");if(watermark){el.innerHTML=watermark.innerHTML}}).catch(()=>{})}})};App.modules.exports("watermark",{init})})();(function(){'use strict';const events=["resize","scroll","keydown","click","popstate"];const init=function(){events.forEach(eventType=>{window.addEventListener(eventType,event=>{App.modules.notify(`site.${eventType}`,event)})})};App.modules.exports("site-notifier",{init})})();(function(){'use strict';const STATES={locked:"locked",unlocked:"unlocked"};let scrollState=STATES.unlocked;let scrollTop=0;let html=document.documentElement;const removeScroll=()=>{if(scrollState!==STATES.unlocked){return}scrollState=STATES.locked;scrollTop=window.scrollY;html.style.setProperty("--scroll-top",scrollTop);html.style.setProperty("--scroll-padding",window.innerWidth-html.clientWidth);html.dataset.scroll=scrollState};const addScroll=()=>{if(scrollState!==STATES.locked){return}scrollState=STATES.unlocked;html.dataset.scroll=scrollState;if(scrollTop>0){window.scrollTo({top:scrollTop})}};const actions=()=>{return{site:{removeScroll:removeScroll,addScroll:addScroll}}};App.modules.exports("siteScroll",{actions})})();(function(){'use strict';const sels={modal:".js-modal",content:".js-modal-content",focusable:`a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]`,video:"video"};const KEY_TAB=9;const KEY_ESC=27;const matchMedia=minWidth=>{return window.matchMedia(`(min-width: ${minWidth}px)`).matches};const createModal=modalEl=>{if(!modalEl){return}const modalId=modalEl.id;const modalHandle=modalEl.dataset.handle;if(!modalId&&!modalHandle){App.log("This modal needs an id or data-handle attributes",{modal:modalEl});return}const triggers=Array.from(document.querySelectorAll(`[aria-controls="${modalId}"]`));const focusableEls=Array.from(modalEl.querySelectorAll(sels.focusable));const firstFocusableEl=focusableEls[0];const lastFocusableEl=focusableEls[focusableEls.length-1];let lastFocusedEl;const options={closeOnScroll:modalEl.dataset.closeOnScroll==="true",lockSiteScroll:modalEl.dataset.lockSiteScroll==="true",lockSiteScrollBreakpoint:parseInt(modalEl.dataset.lockSiteScrollBreakpoint||0,10),trapFocus:modalEl.dataset.trapFocus==="true",playVideoOnOpen:modalEl.dataset.playVideoOnOpen==="true"};let isOpen=false;const lockScroll=()=>{App.modules.notify("site.removeScroll")};const unlockScroll=()=>{App.modules.notify("site.addScroll")};const isModalHashPresent=()=>{return modalHandle&&window.location.hash.replace("#","")===modalHandle};const updateTriggers=expanded=>{triggers.forEach(el=>{el.setAttribute("aria-expanded",expanded)})};const openModal=()=>{isOpen=true;modalEl.scrollTop=0;modalEl.dataset.state="visible";updateTriggers(isOpen);if(options.trapFocus&&firstFocusableEl){lastFocusedEl=document.activeElement;firstFocusableEl.focus()}if(options.lockSiteScroll&&matchMedia(options.lockSiteScrollBreakpoint)){lockScroll()}const video=modalEl.querySelector("video");if(video&&options.playVideoOnOpen){video.play()}};const closeModal=()=>{isOpen=false;modalEl.dataset.state="hidden";updateTriggers(isOpen);if(lastFocusedEl){lastFocusedEl.focus()}if(options.lockSiteScroll&&matchMedia(options.lockSiteScrollBreakpoint)){unlockScroll()}if(isModalHashPresent()){window.history.pushState({},window.document.title,window.location.pathname+window.location.search)}modalEl.querySelectorAll("video").forEach(video=>video.pause())};const onToggle=e=>{const{target,currentTarget}=e;if(!currentTarget.matches(`[aria-controls="${modalId}"]`)&&target.closest(sels.content)){return}if(isOpen){closeModal()}else{openModal()}};const onModalScroll=()=>{const scrollTop=modalEl.scrollTop;const height=modalEl.offsetHeight;const scrollHeight=modalEl.scrollHeight;if(scrollTop+height>=scrollHeight){closeModal()}};const handleTab=e=>{if(focusableEls.length===1){e.preventDefault();return}if(document.activeElement===firstFocusableEl&&e.shiftKey){e.preventDefault();lastFocusableEl.focus()}if(document.activeElement===lastFocusableEl&&!e.shiftKey){e.preventDefault();firstFocusableEl.focus()}};const resolveHash=()=>{if(isModalHashPresent()){openModal()}else if(isOpen){closeModal()}};const onKeydown=e=>{if(!isOpen){return}if(e.keyCode===KEY_ESC){closeModal()}if(options.trapFocus&&e.keyCode===KEY_TAB){handleTab(e)}};const onWindowClick=e=>{if(!isOpen){return}const target=e.target;const isInModal=modalEl.contains(target);const isInTrigger=!!triggers.find(el=>el.contains(target));if(isInModal||isInTrigger){return}closeModal()};const onPopState=()=>{resolveHash()};triggers.forEach(el=>{el.addEventListener("click",onToggle)});modalEl.addEventListener("click",onToggle);if(options.closeOnScroll){modalEl.addEventListener("scroll",onModalScroll)}resolveHash();return{onKeydown,onWindowClick,onPopState,id:modalId,close:closeModal,open:openModal}};const modals=[];const onKeydown=(_,e)=>{modals.forEach(modal=>modal.onKeydown(e))};const onWindowClick=(_,e)=>{modals.forEach(modal=>modal.onWindowClick(e))};const onPopState=(_,e)=>{modals.forEach(modal=>modal.onPopState(e))};const onPageLeave=()=>{modals.forEach(modal=>modal.close())};const onModalClose=(_,id)=>{modals.find(modal=>{if(modal.id===id){modal.close();return true}})};const onModalOpen=(_,id)=>{modals.find(modal=>{if(modal.id===id){modal.open();return true}})};const actions=()=>{return{site:{keydown:onKeydown,click:onWindowClick,popstate:onPopState},page:{leave:onPageLeave},modal:{close:onModalClose,open:onModalOpen}}};const init=()=>{document.querySelectorAll(sels.modal).forEach(mod=>{const modal=createModal(mod);if(modal){modals.push(modal)}})};App.modules.exports("modal",{init,actions})})();(function(){'use strict';const sels={drawerBtn:".js-drawer-trigger"};const createDrawer=btnEl=>{const slideIds=btnEl.getAttribute("aria-controls");if(!slideIds){App.log("contentIds attribute is required.",{element:btnEl});return}const slides=slideIds.split(", ").map(id=>{return{el:document.getElementById(id),rafId:null}}).filter(slide=>{return!!slide.el});const setSlideHeight=slide=>{const{rafId,el}=slide;if(rafId){window.cancelAnimationFrame(rafId);slide.rafId=null;return}let slideHeight=0;Array.from(el.children).forEach(child=>{const style=window.getComputedStyle(child);const childHeight=child.scrollHeight+parseInt(style.marginTop||0,10)+parseInt(style.marginBottom||0,10)+parseInt(style.borderWidth||0,10);slideHeight+=childHeight});el.style.setProperty("--height",slideHeight+"px");slide.rafId=window.requestAnimationFrame(()=>{setSlideHeight(slide)})};const toggleDrawers=()=>{btnEl.setAttribute("aria-expanded",btnEl.getAttribute("aria-expanded")==="true"?false:true);slides.forEach(slide=>{setSlideHeight(slide);const{el}=slide;const currentState=el.dataset.state;el.dataset.state=currentState==="visible"?"hidden":"visible"})};const setSlides=()=>{slides.forEach(slide=>{setSlideHeight(slide)})};const destroy=()=>{btnEl.removeEventListener("click",toggleDrawers)};btnEl.addEventListener("click",toggleDrawers);setSlides();return{onResize:setSlides,destroy}};let drawers=[];const onResize=()=>{drawers.forEach(drawer=>drawer.onResize())};const onPageEnter=(_,data)=>{const scope=document.querySelector(data.page.selector());if(!scope){return}const drawerBtns=scope.querySelectorAll(sels.drawerBtn);drawerBtns.forEach(btn=>{const drawer=createDrawer(btn);drawers.push(drawer)})};const onPageLeave=()=>{drawers.forEach(drawer=>drawer.destroy());drawers=[]};const actions=()=>{return{site:{resize:onResize},page:{enter:onPageEnter,leave:onPageLeave}}};App.modules.exports("drawer",{actions})})();(function(){'use strict';const sels={ctn:".swiper-container"};let scope=document.querySelector(".page");let swipers=[];let clickStartTime=0;let clickEndTime=0;const clickDelayTreshold=200;const clickTime=()=>clickEndTime-clickStartTime;const onPointerDown=()=>{clickStartTime=window.performance.now()};const onPointerUp=()=>{clickEndTime=window.performance.now()};const initSwipers=()=>{scope.querySelectorAll(sels.ctn).forEach(el=>{const swiper=new window.Swiper(el,{slidesPerView:"auto",freeMode:true,watchOverflow:true,mousewheel:{forceToAxis:true,invert:true}});if(swiper){swipers.push(swiper)}el.addEventListener("pointerdown",onPointerDown);el.addEventListener("pointerup",onPointerUp)})};const destroySwipers=()=>{swipers.forEach(s=>{s.destroy()});swipers=[];scope.querySelectorAll(sels.ctn).forEach(el=>{el.removeEventListener("pointerdown",onPointerDown);el.removeEventListener("pointerup",onPointerUp)})};const onPageEnter=(_,data)=>{scope=document.querySelector(data.page.selector());App.fx.notify("load-js",{key:"swiper",loaded:()=>window.Swiper,ready:()=>{initSwipers()}})};const onPageLeave=()=>{destroySwipers()};const onUrlChangeRequested=(_,{event})=>!!event.target&&!!event.target.closest(sels.ctn)&&clickTime()>clickDelayTreshold;const actions=()=>{return{page:{enter:onPageEnter,leave:onPageLeave},url:{changeRequested:onUrlChangeRequested}}};App.modules.exports("slider",{actions})})();(function(){'use strict';const sels={ctn:".js-custom-cursor-ctn",cursor:".js-custom-cursor"};let scope=document.querySelector(".page");let cursors=[];const createCursor=ctnEl=>{if(!ctnEl){return}const cursorEl=ctnEl.querySelector(sels.cursor);if(!cursorEl){App.log("Missing custom cursor element for container element: ",ctnEl);return}const setCursorPos=(pointerX,pointerY)=>{const xOffset=cursorEl.clientWidth/2;const yOffset=cursorEl.clientHeight/3;const x=pointerX-xOffset;const y=pointerY-yOffset;cursorEl.style.setProperty("--x",`${x}px`);cursorEl.style.setProperty("--y",`${y}px`)};const onMove=e=>{setCursorPos(e.clientX,e.clientY)};const destroy=()=>{ctnEl.removeEventListener("pointermove",onMove)};ctnEl.dataset.state="ready";ctnEl.addEventListener("pointermove",onMove);return{destroy}};const initCursors=()=>{scope.querySelectorAll(sels.ctn).forEach(el=>{const cursor=createCursor(el);if(cursor){cursors.push(cursor)}})};const onPageEnter=(_,data)=>{scope=document.querySelector(data.page.selector());initCursors()};const onPageLeave=()=>{cursors.forEach(cursor=>{cursor.destroy()});cursors=[]};const actions=()=>{return{page:{enter:onPageEnter,leave:onPageLeave}}};App.modules.exports("custom-cursor",{actions})})();(function(){'use strict';let xstate;const sels={ctn:".js-pagination-ctn",content:".js-pagination-content",paginationLink:".js-pagination-link",filterLink:".js-filter-link",filterInput:".js-filter-input"};const toQueryString=obj=>{const queryParams=new window.URLSearchParams(window.location.search);Object.entries(obj).forEach(([key,val])=>{if(val){queryParams.set(key,val)}else if(queryParams.has(key)){queryParams.delete(key)}});const result=queryParams.toString();return result?`?${result}`:""};const emptyEl=el=>{while(el.firstChild){el.lastChild.remove()}};let pagination;let ctnEl;const createPagination=rootEl=>{const{assign,createMachine}=xstate;const contentEl=rootEl.querySelector(sels.content);return createMachine({id:"pagination",context:{endpoint:"/pagination-endpoint",contentEl,query:{},queryString:"",resetScroll:false,controller:null,currentUrl:null,currentLocale:null,template:null,initialPageNumber:null,pageTrigger:null,...rootEl.dataset},initial:"idle",states:{idle:{},loading:{initial:"gettingPageData",states:{gettingPageData:{entry:["abortRequestAndResetController"],invoke:{src:"getPageData",onDone:{target:"handlingImageLoading"},onError:{target:"#pagination.idle"}}},handlingImageLoading:{invoke:{src:"handleImageLoading"},on:{APPEND_CONTENT:{actions:["appendContent","notifyRefresh"]},IMAGES_LOADED:{target:"#pagination.idle"}}}}}},on:{PAGINATE:{target:"loading",actions:["scrollToTop","updateLinks","updateUrl"]},FILTER:{target:"loading",actions:["updateQuery","generateQueryString","scrollToTop","updateLinks","updateUrl"]},POPSTATE:{target:"loading"}}},{services:{getPageData:async(context,event)=>{const data=event.data||{};const historyState=window.history.state||{};const pageNumber=data.pageNumber||historyState.pageNumber||context.initialPageNumber;const{pageTrigger}=context;const paginationParam=event.type==="PAGINATE"?`/${pageTrigger}${pageNumber}`:"";const qs=`/${toQueryString({template:context.template,currentUrl:context.currentUrl})}&${context.queryString}`;const url=`${window.location.origin}${context.currentLocale||""} ${context.endpoint}${paginationParam}${qs}`;const{controller}=context;const signal=controller.signal;try{const res=await window.fetch(url,{signal});const htmlString=await res.text();const fragment=document.createRange().createContextualFragment(htmlString);return{fragment}}catch(err){if(signal&&signal.aborted){return}console.warn(err)}},handleImageLoading:(_,event)=>callback=>{const{fragment}=event.data;const images=fragment.querySelectorAll("img");const totalImages=images.length;if(totalImages===0){callback({type:"APPEND_CONTENT",data:{fragment}});callback({type:"IMAGES_LOADED"});return}let minImagesLoadedQty=Math.min(totalImages,10);let imagesLoaded=0;const onImageLoaded=e=>{imagesLoaded+=1;const image=e.currentTarget;image.removeEventListener("load",onImageLoaded);if(imagesLoaded===minImagesLoadedQty){callback({type:"IMAGES_LOADED"})}};images.forEach((img,i)=>{if(i+1<=minImagesLoadedQty){img.addEventListener("load",onImageLoaded)}});callback({type:"APPEND_CONTENT",data:{fragment}})}},actions:{updateQuery:assign({query:(_,event)=>event.data.query}),generateQueryString:assign({queryString:(_,event)=>{const data=event.data;if(!data){return""}const query=data.query;if(!query){return""}return`/${toQueryString({...query})}`}}),updateLinks:(_,event)=>{const data=event.data;if(!data){return}let linkSelector;if(event.type==="FILTER"){linkSelector=sels.filterLink}else if(event.type==="PAGINATE"){linkSelector=sels.paginationLink}if(!linkSelector){return}Object.keys(data.query).forEach(key=>{rootEl.querySelectorAll(`${linkSelector}[data-filter-key="${key}"]`).forEach(link=>link.setAttribute("aria-current",link===data.link))})},updateUrl:(context,event)=>{const data=event.data;const pageNumber=data.pageNumber||context.initialPageNumber;const{pageTrigger,currentUrl}=context;const paginationParam=event.type==="PAGINATE"?`/${pageTrigger}${pageNumber}`:"";const newUrl=`${currentUrl}${paginationParam} ${context.queryString}`;window.history.pushState({pageNumber,pagination:currentUrl},document.title,newUrl)},scrollToTop:context=>{if(!context.resetScroll){return}window.scrollTo({behavior:"smooth",top:rootEl.offsetTop})},abortRequestAndResetController:assign({controller:context=>{const{controller}=context;if(controller){controller.abort()}return new window.AbortController}}),notifyRefresh:context=>{App.modules.notify("pagination.refresh",context.query)},appendContent:(context,event)=>{const{contentEl}=context;const{fragment}=event.data;emptyEl(contentEl);contentEl.append(fragment)}}})};const onCtnClick=e=>{const paginationLink=e.target.closest(`${sels.paginationLink}[data-number]`);if(paginationLink){e.preventDefault();pagination.send({type:"PAGINATE",data:{link:paginationLink,pageNumber:paginationLink.dataset.number}});return}const filterLink=e.target.closest(sels.filterLink);if(filterLink){e.preventDefault();pagination.send({type:"FILTER",data:{link:filterLink,query:{[filterLink.dataset.filterKey]:filterLink.dataset.filterValue}}})}};const onCtnInput=e=>{const input=e.target;pagination.send({type:"FILTER",data:{query:{[input.dataset.filterKey]:input.value}}})};const onPopstate=(_,e)=>{if(!pagination){return}if(e.state&&e.state.pageNumber){pagination.send({type:"POPSTATE",data:{pageNumber:e.state.pageNumber}})}else{pagination.send({type:"POPSTATE"})}};const onPageEnter=(_,data)=>{const scope=document.querySelector(data.page.selector());if(!scope){return}ctnEl=scope.querySelector(sels.ctn);if(!ctnEl){return}App.fx.notify("load-js",{key:"xstate",loaded:()=>window.XState,ready:()=>{xstate=window.XState;ctnEl.addEventListener("click",onCtnClick);ctnEl.addEventListener("change",onCtnInput);pagination=xstate.interpret(createPagination(ctnEl)).onTransition(state=>{const statesArray=state.toStrings();ctnEl.dataset.state=statesArray[statesArray.length-1]}).start()}})};const onPageLeave=()=>{if(pagination){pagination.stop();pagination=undefined}if(ctnEl){ctnEl.removeEventListener("click",onCtnClick);ctnEl.removeEventListener("input",onCtnInput);ctnEl=undefined}};const onUrlChanged=(_,data)=>{var _data$event$state;if(!ctnEl){return false}const currentUrl=ctnEl.dataset.currentUrl;if(!currentUrl){return false}const pagination=(_data$event$state=data.event.state)===null||_data$event$state===void 0?void 0:_data$event$state.pagination;return pagination&&pagination===currentUrl};const actions=()=>{return{site:{popstate:onPopstate},page:{enter:onPageEnter,leave:onPageLeave},url:{changed:onUrlChanged}}};App.modules.exports("pagination",{actions})})();(function(){'use strict';const sels={ctn:".js-copy-on-click",btn:".js-copy-on-click-btn",message:".js-copy-on-click-message"};const messageDelay=2000;const createCopyOnClick=(ctn,legacy)=>{const btn=ctn.querySelector(sels.btn);const message=ctn.querySelector(sels.message);if(!btn||!message){return}const valueToCopy=window.location.href;const onCopyClick=async()=>{if(legacy){const input=document.createElement("input");input.value=valueToCopy;document.body.appendChild(input);input.select();document.execCommand("copy");input.remove()}else{await window.navigator.clipboard.writeText(valueToCopy)}message.dataset.state="visible";window.setTimeout(()=>{delete message.dataset.state},messageDelay)};btn.addEventListener("click",onCopyClick)};const onPageEnter=async()=>{let legacy=true;if("navigator"in window&&"permissions"in window.navigator){legacy=await window.navigator.permissions.query({name:"clipboard-write"}).then(({state})=>state!=="granted").catch(()=>true)}document.querySelectorAll(sels.ctn).forEach(ctn=>{createCopyOnClick(ctn,legacy)})};const actions=()=>{return{page:{enter:onPageEnter}}};App.modules.exports("copy-on-click",{actions})})();(function(){'use strict';const sels={btn:".js-native-share-btn"};let scope;const onShare=()=>{if(!window.navigator||!window.navigator.share){return}window.navigator.share({url:window.location.href,title:document.title})};const onPageEnter=(_,data)=>{scope=document.querySelector(data.page.selector());if(!scope){return}scope.querySelectorAll(sels.btn).forEach(btn=>{btn.addEventListener("click",onShare)})};const onPageLeave=()=>{scope.querySelectorAll(sels.btn).forEach(btn=>{btn.removeEventListener("click",onShare)})};const actions=()=>{return{page:{enter:onPageEnter,leave:onPageLeave}}};App.modules.exports("native-share",{actions})})();(()=>{'use strict';const{body}=document;const onPageLoaded=()=>{body.dataset.pageState="idle"};const onPageLoading=()=>{body.dataset.pageState="loading"};const actions=()=>{return{pages:{loading:onPageLoading,loaded:onPageLoaded,loaderror:onPageLoaded}}};App.modules.exports("page-transition",{actions:actions})})();(()=>{'use strict';class LiteYTEmbed extends HTMLElement{connectedCallback(){this.videoId=this.getAttribute("videoid");let playBtnEl=this.querySelector(".lty-playbtn");this.playLabel=playBtnEl&&playBtnEl.textContent.trim()||this.getAttribute("playlabel")||"Play";if(!this.style.backgroundImage){this.posterUrl=`https://i.ytimg.com/vi/${this.videoId}/maxresdefault.jpg`;LiteYTEmbed.addPrefetch("preload",this.posterUrl,"image");this.style.backgroundImage=`url("${this.posterUrl}")`}if(!playBtnEl){playBtnEl=document.createElement("button");playBtnEl.type="button";playBtnEl.classList.add("lty-playbtn");this.append(playBtnEl)}if(!playBtnEl.textContent){const playBtnLabelEl=document.createElement("span");playBtnLabelEl.className="lyt-visually-hidden";playBtnLabelEl.textContent=this.playLabel;playBtnEl.append(playBtnLabelEl)}this.addEventListener("pointerover",LiteYTEmbed.warmConnections,{once:true});this.addEventListener("click",()=>this.addIframe());this.addEventListener("pageleave",()=>this.stopVideo())}static addPrefetch(kind,url,as){const linkEl=document.createElement("link");linkEl.rel=kind;linkEl.href=url;if(as){linkEl.as=as}document.head.append(linkEl)}static warmConnections(){if(LiteYTEmbed.preconnected){return}LiteYTEmbed.addPrefetch("preconnect","https://www.youtube-nocookie.com");LiteYTEmbed.addPrefetch("preconnect","https://www.google.com");LiteYTEmbed.addPrefetch("preconnect","https://googleads.g.doubleclick.net");LiteYTEmbed.addPrefetch("preconnect","https://static.doubleclick.net");LiteYTEmbed.preconnected=true}addIframe(){const params=new window.URLSearchParams(this.getAttribute("params")||[]);params.append("autoplay","1");const iframeEl=document.createElement("iframe");iframeEl.width=560;iframeEl.height=315;iframeEl.title=this.playLabel;iframeEl.allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture";iframeEl.allowFullscreen=true;iframeEl.src=`https://www.youtube-nocookie.com/embed/${encodeURIComponent(this.videoId)}?${params.toString()}`;this.append(iframeEl);this.classList.add("lyt-activated");this.querySelector("iframe").focus()}stopVideo(){const iframe=this.querySelector("iframe");if(!iframe){return}this.classList.remove("lyt-activated");iframe.remove()}}const onPageLeave=()=>{document.querySelectorAll("lite-youtube").forEach(el=>{el.stopVideo()})};const init=()=>{window.customElements.define("lite-youtube",LiteYTEmbed)};const actions=()=>{return{page:{leave:onPageLeave}}};App.modules.exports("lite-yt-embed",{init,actions})})();(function(){'use strict';const sels={ctn:".js-play-video-on-hover"};const isMotionReduced=()=>window.matchMedia("screen and (prefers-reduced-motion: reduce), (update: slow)").matches;const isTouchDevice=()=>window.matchMedia("(hover: none)").matches;const preventVideo=()=>isMotionReduced()||isTouchDevice();const onHover=e=>{if(preventVideo()){return}const ctn=e.currentTarget;const video=ctn.querySelector("video");if(!video){return}video.play()};const onLeave=e=>{const ctn=e.currentTarget;const video=ctn.querySelector("video");if(!video){return}video.pause()};const onPageEnter=(_,data)=>{if(preventVideo()){return}const scope=document.querySelector(data.page.selector());if(!scope){return}scope.querySelectorAll(sels.ctn).forEach(el=>{el.addEventListener("pointerenter",onHover);el.addEventListener("pointerleave",onLeave)})};const actions=()=>{return{page:{enter:onPageEnter}}};App.modules.exports("play-video-on-hover",{actions})})();(function(){'use strict';let so;const onPageEnter=async(_,data)=>{const scope=document.querySelector(data.page.selector());if(!scope.querySelector("[data-scroll]")){return}App.fx.notify("load-js",{key:"scrollout",loaded:()=>window.ScrollOut,ready:()=>{if(!so){so=new window.ScrollOut({cssProps:{viewportY:true}})}so.index();so.update()}});if(so){so.index();so.update()}};const actions=()=>{if(!window.matchMedia("(hover: none)").matches){return{}}return{page:{enter:onPageEnter}}};App.modules.exports("scrollout",{actions})})();(function(){'use strict';const onPageEnter=()=>{document.querySelectorAll("img").forEach(img=>{img.outerHTML=img.outerHTML})};const actions=()=>{const{ios,ipad,iphone}=App.device;if(ios||ipad||iphone){return{page:{enter:onPageEnter}}}return{}};App.modules.exports("ios-ajax-img-fix",{actions})})();(()=>{'use strict';const init=()=>{setTimeout(()=>{fetch("/public/admin/").then(response=>response.text()).then(body=>{window.document.getElementById("admin-menu").innerHTML=body})},1000)};App.modules.exports("admin",{init:init})})();