text: !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwupScriptsPlugin=t():e.SwupScriptsPlugin=t()}(window,function(){return n=[function(e,t,n){"use strict";var n=n(1),n=(n=n)&&n.__esModule?n:{default:n};e.exports=n.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var n=n(2),n=(n=n)&&n.__esModule?n:{default:n};function c(e){return Array.prototype.slice.call(e)}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));t.name="ScriptsPlugin",t.runScripts=function(){var e=t.options.head&&t.options.body?document:t.options.head?document.head:document.body,e=c(e.querySelectorAll("script:not([data-swup-ignore-script])"));e.forEach(function(e){return t.runScript(e)}),t.swup.log("Executed "+e.length+" scripts.")},t.runScript=function(e){var t=document.createElement("script"),n=!0,r=!1,o=void 0;try{for(var i,a=c(e.attributes)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=u.name,l=u.value;t.setAttribute(s,l)}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return t.textContent=e.textContent,t.setAttribute("async","false"),e.replaceWith(t),t};return t.options=r({},{head:!0,body:!0},e),t}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),o(n,[{key:"mount",value:function(){this.swup.on("contentReplaced",this.runScripts)}},{key:"unmount",value:function(){this.swup.off("contentReplaced",this.runScripts)}}]),n}(n.default);t.default=n},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.isSwupPlugin=!0}Object.defineProperty(t,"__esModule",{value:!0});var i=o,a=[{key:"mount",value:function(){}},{key:"unmount",value:function(){}},{key:"_beforeMount",value:function(){}},{key:"_afterUnmount",value:function(){}}],u=void 0;a&&r(i.prototype,a),u&&r(i,u),t.default=o}],r={},o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0);function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,r}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwupHeadPlugin=t():e.SwupHeadPlugin=t()}(window,function(){return n=[function(e,t,n){"use strict";var n=n(1),n=(n=n)&&n.__esModule?n:{default:n};e.exports=n.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e};function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var n=n(2);function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}n=function(e){var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function i(){var u,e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=u=a(this,(e=i.__proto__||Object.getPrototypeOf(i)).call.apply(e,[this].concat(r)))).name="HeadPlugin",u.getHeadAndReplace=function(){var e=u.getHeadChildren(),t=u.getNextHeadChildren();u.replaceTags(e,t)},u.getHeadChildren=function(){return document.head.children},u.getNextHeadChildren=function(){var e=u.swup.cache.getCurrentPage().originalContent.replace("<head",'<div id="swupHead"').replace("</head>","</div>"),t=document.createElement("div"),e=(t.innerHTML=e,t.querySelector("#swupHead").children);return t.innerHTML="",t=null,e},u.replaceTags=function(e,t){var n=document.head,r=Boolean(document.querySelector("[data-swup-theme]")),o=u.getTagsToAdd(e,t,r),e=u.getTagsToRemove(e,t,r);e.reverse().forEach(function(e){n.removeChild(e.tag)}),o.forEach(function(e){n.insertBefore(e.tag,n.children[e.index])}),u.swup.log("Removed "+e.length+" / added "+o.length+" tags in head")},u.compareTags=function(e,t){return e.outerHTML===t.outerHTML},u.getTagsToRemove=function(e,t){for(var n=[],r=0;r<e.length;r++){for(var o=null,i=0;i<t.length;i++)if(u.compareTags(e[r],t[i])){o=i;break}null==o&&null===e[r].getAttribute("data-swup-theme")&&n.push({tag:e[r]})}return n},u.getTagsToAdd=function(e,t,n){for(var r=[],o=0;o<t.length;o++){for(var i=null,a=0;a<e.length;a++)if(u.compareTags(e[a],t[o])){i=a;break}null==i&&r.push({index:n?o+1:o,tag:t[o]})}return r},a(u,t)}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(i,[{key:"mount",value:function(){this.swup.on("contentReplaced",this.getHeadAndReplace)}},{key:"unmount",value:function(){this.swup.off("contentReplaced",this.getHeadAndReplace)}}]),i}(((n=n)&&n.__esModule?n:{default:n}).default);t.default=n},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.isSwupPlugin=!0}Object.defineProperty(t,"__esModule",{value:!0});var i=o,a=[{key:"mount",value:function(){}},{key:"unmount",value:function(){}},{key:"_beforeMount",value:function(){}},{key:"_afterUnmount",value:function(){}}],u=void 0;a&&r(i.prototype,a),u&&r(i,u),t.default=o}],r={},o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0);function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,r}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Swup=t():e.Swup=t()}(window,function(){return n=[function(c,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Link=e.markSwupElements=e.getCurrentUrl=e.transitionEnd=e.fetch=e.getDataFromHtml=e.createHistoryRecord=e.classify=void 0;var n=l(t(8)),r=l(t(9)),o=l(t(10)),i=l(t(11)),a=l(t(12)),u=l(t(13)),s=l(t(14)),t=l(t(15));function l(e){return e&&e.__esModule?e:{default:e}}e.classify=n.default,e.createHistoryRecord=r.default,e.getDataFromHtml=o.default,e.fetch=i.default,e.transitionEnd=a.default,e.getCurrentUrl=u.default,e.markSwupElements=s.default,e.Link=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.query=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document;return"string"!=typeof e?e:t.querySelector(e)},t.queryAll=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document;return"string"!=typeof e?e:Array.prototype.slice.call(t.querySelectorAll(e))}},function(e,t,n){"use strict";var n=n(3),n=(n=n)&&n.__esModule?n:{default:n};e.exports=n.default},function(c,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e};function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=s(t(4)),d=s(t(6)),f=s(t(7)),p=s(t(16)),h=s(t(17)),g=s(t(18)),m=s(t(19)),y=s(t(20)),v=s(t(21)),b=s(t(22)),a=t(23),w=t(1),u=t(0);function s(e){return e&&e.__esModule?e:{default:e}}r(l,[{key:"enable",value:function(){var e,t=this;"undefined"!=typeof Promise?(this.delegatedListeners.click=(0,i.default)(document,this.options.linkSelector,"click",this.linkClickHandler.bind(this)),window.addEventListener("popstate",this.popStateHandler.bind(this)),(e=(0,u.getDataFromHtml)(document.documentElement.outerHTML,this.options.containers)).url=e.responseURL=(0,u.getCurrentUrl)(),this.options.cache&&this.cache.cacheUrl(e),(0,u.markSwupElements)(document.documentElement,this.options.containers),this.options.plugins.forEach(function(e){t.use(e)}),window.history.replaceState(Object.assign({},window.history.state,{url:window.location.href,random:Math.random(),source:"swup"}),document.title,window.location.href),this.triggerEvent("enabled"),document.documentElement.classList.add("swup-enabled"),this.triggerEvent("pageView")):console.warn("Promise is not supported")}},{key:"destroy",value:function(){var t=this;this.delegatedListeners.click.destroy(),this.delegatedListeners.mouseover.destroy(),window.removeEventListener("popstate",this.popStateHandler.bind(this)),this.cache.empty(),this.options.plugins.forEach(function(e){t.unuse(e)}),(0,w.queryAll)("[data-swup]").forEach(function(e){e.removeAttribute("data-swup")}),this.off(),this.triggerEvent("disabled"),document.documentElement.classList.remove("swup-enabled")}},{key:"linkClickHandler",value:function(e){var t;e.metaKey||e.ctrlKey||e.shiftKey||e.altKey?this.triggerEvent("openPageInNewTab",e):0===e.button&&(this.triggerEvent("clickLink",e),e.preventDefault(),(t=new u.Link(e.delegateTarget)).getAddress()==(0,u.getCurrentUrl)()||""==t.getAddress()?""!=t.getHash()?(this.triggerEvent("samePageWithHash",e),null!=document.querySelector(t.getHash())?history.replaceState({url:t.getAddress()+t.getHash(),random:Math.random(),source:"swup"},document.title,t.getAddress()+t.getHash()):console.warn("Element for offset not found ("+t.getHash()+")")):this.triggerEvent("samePage",e):(""!=t.getHash()&&(this.scrollToElement=t.getHash()),e=e.delegateTarget.getAttribute("data-swup-transition"),this.loadPage({url:t.getAddress(),customTransition:e},!1)))}},{key:"popStateHandler",value:function(e){var t;this.options.skipPopStateHandling(e)||(""!==(t=new u.Link(e.state?e.state.url:window.location.pathname)).getHash()?this.scrollToElement=t.getHash():e.preventDefault(),this.triggerEvent("popState",e),this.loadPage({url:t.getAddress()},e))}}]);t=l;function l(e){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");var t={animateHistoryBrowsing:!1,animationSelector:'[class*="transition-"]',linkSelector:'a[href^="'+window.location.origin+'"]:not([data-no-swup]), a[href^="/"]:not([data-no-swup]), a[href^="#"]:not([data-no-swup])',cache:!0,containers:["#swup"],requestHeaders:{"X-Requested-With":"swup",Accept:"text/html, application/xhtml+xml"},plugins:[],skipPopStateHandling:function(e){return!(e.state&&"swup"===e.state.source)}},t=n({},t,e);this._handlers={animationInDone:[],animationInStart:[],animationOutDone:[],animationOutStart:[],animationSkipped:[],clickLink:[],contentReplaced:[],disabled:[],enabled:[],openPageInNewTab:[],pageLoaded:[],pageRetrievedFromCache:[],pageView:[],popState:[],samePage:[],samePageWithHash:[],serverError:[],transitionStart:[],transitionEnd:[],willReplaceContent:[]},this.scrollToElement=null,this.preloadPromise=null,this.options=t,this.plugins=[],this.transition={},this.delegatedListeners={},this.cache=new d.default,(this.cache.swup=this).loadPage=f.default,this.renderPage=p.default,this.triggerEvent=h.default,this.on=g.default,this.off=m.default,this.updateTransition=y.default,this.getAnimationPromises=v.default,this.getPageData=b.default,this.log=function(){},this.use=a.use,this.unuse=a.unuse,this.findPlugin=a.findPlugin,this.enable()}e.default=t},function(e,t,n){var a=n(5);e.exports=function(e,t,n,r,o){var i=function(t,n,e,r){return function(e){e.delegateTarget=a(e.target,n),e.delegateTarget&&r.call(t,e)}}.apply(this,arguments);return e.addEventListener(n,i,o),{destroy:function(){e.removeEventListener(n,i,o)}}}},function(e,t){var n;"undefined"==typeof Element||Element.prototype.matches||((n=Element.prototype).matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector),e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e};function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}r=t.Cache=(r(i,[{key:"cacheUrl",value:function(e){e.url in this.pages==!1&&(this.pages[e.url]=e),this.last=this.pages[e.url],this.swup.log("Cache ("+Object.keys(this.pages).length+")",this.pages)}},{key:"getPage",value:function(e){return this.pages[e]}},{key:"getCurrentPage",value:function(){return this.getPage(window.location.pathname+window.location.search)}},{key:"exists",value:function(e){return e in this.pages}},{key:"empty",value:function(){this.pages={},this.last=null,this.swup.log("Cache cleared")}},{key:"remove",value:function(e){delete this.pages[e]}}]),i);function i(){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.pages={},this.last=null}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=n(0);t.default=function(r,e){var t,o=this,n=[],i=void 0;this.triggerEvent("transitionStart",e),null!=r.customTransition?(this.updateTransition(window.location.pathname,r.url,r.customTransition),document.documentElement.classList.add("to-"+(0,u.classify)(r.customTransition))):this.updateTransition(window.location.pathname,r.url),!e||this.options.animateHistoryBrowsing?(o.triggerEvent("animationOutStart"),document.documentElement.classList.add("is-changing"),document.documentElement.classList.add("is-leaving"),document.documentElement.classList.add("is-animating"),e&&document.documentElement.classList.add("is-popstate"),document.documentElement.classList.add("to-"+(0,u.classify)(r.url)),n=o.getAnimationPromises("out"),Promise.all(n).then(function(){o.triggerEvent("animationOutDone")}),e||(t=void 0,t=null!=o.scrollToElement?r.url+o.scrollToElement:r.url,(0,u.createHistoryRecord)(t))):this.triggerEvent("animationSkipped"),this.cache.exists(r.url)?(i=new Promise(function(e){e()}),this.triggerEvent("pageRetrievedFromCache")):i=this.preloadPromise&&this.preloadPromise.route==r.url?this.preloadPromise:new Promise(function(t,n){(0,u.fetch)(a({},r,{headers:o.options.requestHeaders}),function(e){if(500===e.status)return o.triggerEvent("serverError"),void n(r.url);e=o.getPageData(e);null!=e?(e.url=r.url,o.cache.cacheUrl(e),o.triggerEvent("pageLoaded"),t()):n(r.url)})}),Promise.all(n.concat([i])).then(function(){o.renderPage(o.cache.getPage(r.url),e),o.preloadPromise=null}).catch(function(e){o.options.skipPopStateHandling=function(){return window.location=e,!0},window.history.go(-1)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){e=e.toString().toLowerCase().replace(/\s+/g,"-").replace(/\//g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"");return e=""===(e="/"===e[0]?e.splice(1):e)?"homepage":e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){window.history.pushState({url:e||window.location.href.split(window.location.hostname)[1],random:Math.random(),source:"swup"},document.getElementsByTagName("title")[0].innerText,e||window.location.href.split(window.location.hostname)[1])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=n(1);t.default=function(e,r){for(var t=e.replace("<body",'<div id="swupBody"').replace("</body>","</div>"),o=document.createElement("div"),i=(o.innerHTML=t,[]),n=0;n<r.length;n++){var a=function(n){if(null==o.querySelector(r[n]))return{v:null};(0,s.queryAll)(r[n]).forEach(function(e,t){(0,s.queryAll)(r[n],o)[t].setAttribute("data-swup",i.length),i.push((0,s.queryAll)(r[n],o)[t].outerHTML)})}(n);if("object"===(void 0===a?"undefined":u(a)))return a.v}t={title:o.querySelector("title").innerText,pageClass:o.querySelector("#swupBody").className,originalContent:e,blocks:i};return o.innerHTML="",o=null,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n={url:window.location.pathname+window.location.search,method:"GET",data:null,headers:{}},r=i({},n,e),o=new XMLHttpRequest;return o.onreadystatechange=function(){4===o.readyState&&(o.status,t(o))},o.open(r.method,r.url,!0),Object.keys(r.headers).forEach(function(e){o.setRequestHeader(e,r.headers[e])}),o.send(r.data),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){var e,t=document.createElement("div"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(e in n)if(void 0!==t.style[e])return n[e];return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){return window.location.pathname+window.location.search}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(1);t.default=function(r,o){for(var i=0,e=0;e<o.length;e++)!function(n){null==r.querySelector(o[n])?console.warn("Element "+o[n]+" is not in current page."):(0,a.queryAll)(o[n]).forEach(function(e,t){(0,a.queryAll)(o[n],r)[t].setAttribute("data-swup",i),i++})}(e)}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");e instanceof Element||e instanceof SVGElement?this.link=e:(this.link=document.createElement("a"),this.link.href=e)}Object.defineProperty(t,"__esModule",{value:!0});var i=o,a=[{key:"getPath",value:function(){var e=this.link.pathname;return e="/"!==e[0]?"/"+e:e}},{key:"getAddress",value:function(){var e=this.link.pathname+this.link.search;return e="/"!==(e=this.link.getAttribute("xlink:href")?this.link.getAttribute("xlink:href"):e)[0]?"/"+e:e}},{key:"getHash",value:function(){return this.link.hash}}],u=void 0;a&&r(i.prototype,a),u&&r(i,u),t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=(n(1),n(0));t.default=function(e,t){var n=this,r=(document.documentElement.classList.remove("is-leaving"),new a.Link(e.responseURL));window.location.pathname!==r.getPath()&&(window.history.replaceState({url:r.getPath(),random:Math.random(),source:"swup"},document.title,r.getPath()),this.cache.cacheUrl(i({},e,{url:r.getPath()}))),t&&!this.options.animateHistoryBrowsing||document.documentElement.classList.add("is-rendering"),this.triggerEvent("willReplaceContent",t);for(var o=0;o<e.blocks.length;o++)document.body.querySelector('[data-swup="'+o+'"]').outerHTML=e.blocks[o];document.title=e.title,this.triggerEvent("contentReplaced",t),this.triggerEvent("pageView",t),this.options.cache||this.cache.empty(),setTimeout(function(){t&&!n.options.animateHistoryBrowsing||(n.triggerEvent("animationInStart"),document.documentElement.classList.remove("is-animating"))},10);r=this.getAnimationPromises("in");!t||this.options.animateHistoryBrowsing?Promise.all(r).then(function(){n.triggerEvent("animationInDone"),n.triggerEvent("transitionEnd",t),document.documentElement.className.split(" ").forEach(function(e){!new RegExp("^to-").test(e)&&"is-changing"!==e&&"is-rendering"!==e&&"is-popstate"!==e||document.documentElement.classList.remove(e)})}):this.triggerEvent("transitionEnd",t),this.scrollToElement=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){this._handlers[e].forEach(function(e){try{e(t)}catch(e){console.error(e)}});e=new CustomEvent("swup:"+e,{detail:e});document.dispatchEvent(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){this._handlers[e]?this._handlers[e].push(t):console.warn("Unsupported event "+e+".")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var n,r=this;null!=e?null!=t?this._handlers[e]&&this._handlers[e].filter(function(e){return e===t}).length?(n=this._handlers[e].filter(function(e){return e===t})[0],-1<(n=this._handlers[e].indexOf(n))&&this._handlers[e].splice(n,1)):console.warn("Handler for event '"+e+"' no found."):this._handlers[e]=[]:Object.keys(this._handlers).forEach(function(e){r._handlers[e]=[]})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,n){this.transition={from:e,to:t,custom:n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(0);t.default=function(){var t=[];return(0,r.queryAll)(this.options.animationSelector).forEach(function(n){var e=new Promise(function(t){n.addEventListener((0,o.transitionEnd)(),function(e){n==e.target&&t()})});t.push(e)}),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){var t=e.responseText,t=(0,r.getDataFromHtml)(t,this.options.containers);return t?(t.responseURL=e.responseURL||window.location.href,t):(console.warn("Received page is invalid."),null)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.use=function(e){if(e.isSwupPlugin)return this.plugins.push(e),e.swup=this,"function"==typeof e._beforeMount&&e._beforeMount(),e.mount(),this.plugins;console.warn("Not swup plugin instance "+e+".")},t.unuse=function(t){var e=void 0;{if(e="string"==typeof t?this.plugins.find(function(e){return t===e.name}):t)return e.unmount(),"function"==typeof e._afterUnmount&&e._afterUnmount(),e=this.plugins.indexOf(e),this.plugins.splice(e,1),this.plugins;console.warn("No such plugin.")}},t.findPlugin=function(t){return this.plugins.find(function(e){return t===e.name})}}],r={},o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2);function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,r});
  //# sourceMappingURL=swup.js.map