Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(this))return null;do{if(t.matches(e))return t;t=t.parentElement}while(null!==t);return null}),function(e){var t=function(e,t,o){"use strict";var i,n;if(function(){var t,o={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in n=e.lazySizesConfig||e.lazysizesConfig||{},o)t in n||(n[t]=o[t])}(),!t||!t.getElementsByClassName)return{init:function(){},cfg:n,noSupport:!0};var s=t.documentElement,r=e.HTMLPictureElement,a="addEventListener",l="getAttribute",c=e[a].bind(e),d=e.setTimeout,u=e.requestAnimationFrame||d,m=e.requestIdleCallback,p=/^picture$/i,f=["load","error","lazyincluded","_lazyloaded"],h={},v=Array.prototype.forEach,g=function(e,t){return h[t]||(h[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),h[t].test(e[l]("class")||"")&&h[t]},y=function(e,t){g(e,t)||e.setAttribute("class",(e[l]("class")||"").trim()+" "+t)},b=function(e,t){var o;(o=g(e,t))&&e.setAttribute("class",(e[l]("class")||"").replace(o," "))},L=function(e,t,o){var i=o?a:"removeEventListener";o&&L(e,t),f.forEach(function(o){e[i](o,t)})},S=function(e,o,n,s,r){var a=t.createEvent("Event");return n||(n={}),n.instance=i,a.initEvent(o,!s,!r),a.detail=n,e.dispatchEvent(a),a},w=function(t,o){var i;!r&&(i=e.picturefill||n.pf)?(o&&o.src&&!t[l]("srcset")&&t.setAttribute("srcset",o.src),i({reevaluate:!0,elements:[t]})):o&&o.src&&(t.src=o.src)},x=function(e,t){return(getComputedStyle(e,null)||{})[t]},q=function(e,t,o){for(o=o||e.offsetWidth;o<n.minSize&&t&&!e._lazysizesWidth;)o=t.offsetWidth,t=t.parentNode;return o},E=function(){var e,o,i=[],n=[],s=i,r=function(){var t=s;for(s=i.length?n:i,e=!0,o=!1;t.length;)t.shift()();e=!1},a=function(i,n){e&&!n?i.apply(this,arguments):(s.push(i),o||(o=!0,(t.hidden?d:u)(r)))};return a._lsFlush=r,a}(),C=function(e,t){return t?function(){E(e)}:function(){var t=this,o=arguments;E(function(){e.apply(t,o)})}},A=function(e){var t,i=0,s=n.throttleDelay,r=n.ricTimeout,a=function(){t=!1,i=o.now(),e()},l=m&&r>49?function(){m(a,{timeout:r}),r!==n.ricTimeout&&(r=n.ricTimeout)}:C(function(){d(a)},!0);return function(e){var n;(e=!0===e)&&(r=33),t||(t=!0,(n=s-(o.now()-i))<0&&(n=0),e||n<9?l():d(l,n))}},T=function(e){var t,i,n=function(){t=null,e()},s=function(){var e=o.now()-i;e<99?d(s,99-e):(m||n)(n)};return function(){i=o.now(),t||(t=d(s,99))}},z=function(){var r,m,f,h,q,z,M,k,I,H,B,O,_=/^img$/i,R=/^iframe$/i,N="onscroll"in e&&!/(gle|ing)bot/.test(navigator.userAgent),$=0,Y=0,D=-1,W=function(e){Y--,(!e||Y<0||!e.target)&&(Y=0)},F=function(e){return null==O&&(O="hidden"==x(t.body,"visibility")),O||!("hidden"==x(e.parentNode,"visibility")&&"hidden"==x(e,"visibility"))},P=function(e,o){var i,n=e,r=F(e);for(k-=o,B+=o,I-=o,H+=o;r&&(n=n.offsetParent)&&n!=t.body&&n!=s;)(r=(x(n,"opacity")||1)>0)&&"visible"!=x(n,"overflow")&&(i=n.getBoundingClientRect(),r=H>i.left&&I<i.right&&B>i.top-1&&k<i.bottom+1);return r},X=function(){var e,o,a,c,d,u,p,f,v,g,y,b,L=i.elements;if((h=n.loadMode)&&Y<8&&(e=L.length)){for(o=0,D++;o<e;o++)if(L[o]&&!L[o]._lazyRace)if(!N||i.prematureUnveil&&i.prematureUnveil(L[o]))K(L[o]);else if((f=L[o][l]("data-expand"))&&(u=1*f)||(u=$),g||(g=!n.expand||n.expand<1?s.clientHeight>500&&s.clientWidth>500?500:370:n.expand,i._defEx=g,y=g*n.expFactor,b=n.hFac,O=null,$<y&&Y<1&&D>2&&h>2&&!t.hidden?($=y,D=0):$=h>1&&D>1&&Y<6?g:0),v!==u&&(z=innerWidth+u*b,M=innerHeight+u,p=-1*u,v=u),a=L[o].getBoundingClientRect(),(B=a.bottom)>=p&&(k=a.top)<=M&&(H=a.right)>=p*b&&(I=a.left)<=z&&(B||H||I||k)&&(n.loadHidden||F(L[o]))&&(m&&Y<3&&!f&&(h<3||D<4)||P(L[o],u))){if(K(L[o]),d=!0,Y>9)break}else!d&&m&&!c&&Y<4&&D<4&&h>2&&(r[0]||n.preloadAfterLoad)&&(r[0]||!f&&(B||H||I||k||"auto"!=L[o][l](n.sizesAttr)))&&(c=r[0]||L[o]);c&&!d&&K(c)}},U=A(X),V=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(W(e),y(t,n.loadedClass),b(t,n.loadingClass),L(t,J),S(t,"lazyloaded"))},G=C(V),J=function(e){G({target:e.target})},Z=function(e){var t,o=e[l](n.srcsetAttr);(t=n.customMedia[e[l]("data-media")||e[l]("media")])&&e.setAttribute("media",t),o&&e.setAttribute("srcset",o)},Q=C(function(e,t,o,i,s){var r,a,c,u,m,h;(m=S(e,"lazybeforeunveil",t)).defaultPrevented||(i&&(o?y(e,n.autosizesClass):e.setAttribute("sizes",i)),a=e[l](n.srcsetAttr),r=e[l](n.srcAttr),s&&(u=(c=e.parentNode)&&p.test(c.nodeName||"")),h=t.firesLoad||"src"in e&&(a||r||u),m={target:e},y(e,n.loadingClass),h&&(clearTimeout(f),f=d(W,2500),L(e,J,!0)),u&&v.call(c.getElementsByTagName("source"),Z),a?e.setAttribute("srcset",a):r&&!u&&(R.test(e.nodeName)?function(e,t){var o=e.getAttribute("data-load-mode")||n.iframeLoadMode;0==o?e.contentWindow.location.replace(t):1==o&&(e.src=t)}(e,r):e.src=r),s&&(a||u)&&w(e,{src:r})),e._lazyRace&&delete e._lazyRace,b(e,n.lazyClass),E(function(){var t=e.complete&&e.naturalWidth>1;h&&!t||(t&&y(e,n.fastLoadedClass),V(m),e._lazyCache=!0,d(function(){"_lazyCache"in e&&delete e._lazyCache},9)),"lazy"==e.loading&&Y--},!0)}),K=function(e){if(!e._lazyRace){var t,o=_.test(e.nodeName),i=o&&(e[l](n.sizesAttr)||e[l]("sizes")),s="auto"==i;(!s&&m||!o||!e[l]("src")&&!e.srcset||e.complete||g(e,n.errorClass)||!g(e,n.lazyClass))&&(t=S(e,"lazyunveilread").detail,s&&j.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,Y++,Q(e,t,s,i,o))}},ee=T(function(){n.loadMode=3,U()}),te=function(){3==n.loadMode&&(n.loadMode=2),ee()},oe=function(){m||(o.now()-q<999?d(oe,999):(m=!0,n.loadMode=3,U(),c("scroll",te,!0)))};return{_:function(){q=o.now(),i.elements=t.getElementsByClassName(n.lazyClass),r=t.getElementsByClassName(n.lazyClass+" "+n.preloadClass),c("scroll",U,!0),c("resize",U,!0),c("pageshow",function(e){if(e.persisted){var o=t.querySelectorAll("."+n.loadingClass);o.length&&o.forEach&&u(function(){o.forEach(function(e){e.complete&&K(e)})})}}),e.MutationObserver?new MutationObserver(U).observe(s,{childList:!0,subtree:!0,attributes:!0}):(s[a]("DOMNodeInserted",U,!0),s[a]("DOMAttrModified",U,!0),setInterval(U,999)),c("hashchange",U,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){t[a](e,U,!0)}),/d$|^c/.test(t.readyState)?oe():(c("load",oe),t[a]("DOMContentLoaded",U),d(oe,2e4)),i.elements.length?(X(),E._lsFlush()):U()},checkElems:U,unveil:K,_aLSL:te}}(),j=function(){var e,o=C(function(e,t,o,i){var n,s,r;if(e._lazysizesWidth=i,i+="px",e.setAttribute("sizes",i),p.test(t.nodeName||""))for(s=0,r=(n=t.getElementsByTagName("source")).length;s<r;s++)n[s].setAttribute("sizes",i);o.detail.dataAttr||w(e,o.detail)}),i=function(e,t,i){var n,s=e.parentNode;s&&(i=q(e,s,i),(n=S(e,"lazybeforesizes",{width:i,dataAttr:!!t})).defaultPrevented||(i=n.detail.width)&&i!==e._lazysizesWidth&&o(e,s,n,i))},s=T(function(){var t,o=e.length;if(o)for(t=0;t<o;t++)i(e[t])});return{_:function(){e=t.getElementsByClassName(n.autosizesClass),c("resize",s)},checkElems:s,updateElem:i}}(),M=function(){!M.i&&t.getElementsByClassName&&(M.i=!0,j._(),z._())};return d(function(){n.init&&M()}),i={cfg:n,autoSizer:j,loader:z,init:M,uP:w,aC:y,rC:b,hC:g,fire:S,gW:q,rAF:E}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{}),function(){"use strict";function e(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var o,i=e.HTMLElement||e.Element,n=468,s={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:i.prototype.scroll||l,scrollIntoView:i.prototype.scrollIntoView},r=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(o=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(o)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):s.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?s.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var o=function(e){for(;e!==t.body&&!1===(i=d(o=e,"Y")&&u(o,"Y"),n=d(o,"X")&&u(o,"X"),i||n);)e=e.parentNode||e.host;var o,i,n;return e}(this),i=o.getBoundingClientRect(),n=this.getBoundingClientRect();o!==t.body?(p.call(this,o,o.scrollLeft+n.left-i.left,o.scrollTop+n.top-i.top),"fixed"!==e.getComputedStyle(o).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})}else s.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,o){var i=e.getComputedStyle(t,null)["overflow"+o];return"auto"===i||"scroll"===i}function m(t){var o,i,s,a,l=(r()-t.startTime)/n;a=l=l>1?1:l,o=.5*(1-Math.cos(Math.PI*a)),i=t.startX+(t.x-t.startX)*o,s=t.startY+(t.y-t.startY)*o,t.method.call(t.scrollable,i,s),i===t.x&&s===t.y||e.requestAnimationFrame(m.bind(e,t))}function p(o,i,n){var a,c,d,u,p=r();o===t.body?(a=e,c=e.scrollX||e.pageXOffset,d=e.scrollY||e.pageYOffset,u=s.scroll):(a=o,c=o.scrollLeft,d=o.scrollTop,u=l),m({scrollable:a,method:u,startTime:p,startX:c,startY:d,x:i,y:n})}}"object"==typeof exports&&"undefined"!=typeof module?module.exports={polyfill:e}:e()}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Headroom=t()}(this,function(){"use strict";function e(){return"undefined"!=typeof window}function t(e,t,o){var i,n=function(){var e=!1;try{var t={get passive(){e=!0}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){e=!1}return e}(),s=!1,r=function(e){return function(e){return e&&e.document&&function(e){return 9===e.nodeType}(e.document)}(e)?function(e){var t=e.document,o=t.body,i=t.documentElement;return{scrollHeight:function(){return Math.max(o.scrollHeight,i.scrollHeight,o.offsetHeight,i.offsetHeight,o.clientHeight,i.clientHeight)},height:function(){return e.innerHeight||i.clientHeight||o.clientHeight},scrollY:function(){return void 0!==e.pageYOffset?e.pageYOffset:(i||o.parentNode||o).scrollTop}}}(e):function(e){return{scrollHeight:function(){return Math.max(e.scrollHeight,e.offsetHeight,e.clientHeight)},height:function(){return Math.max(e.offsetHeight,e.clientHeight)},scrollY:function(){return e.scrollTop}}}(e)}(e),a=r.scrollY(),l={};function c(){var e=Math.round(r.scrollY()),i=r.height(),n=r.scrollHeight();l.scrollY=e,l.lastScrollY=a,l.direction=a<e?"down":"up",l.distance=Math.abs(e-a),l.isOutOfBounds=e<0||n<e+i,l.top=e<=t.offset[l.direction],l.bottom=n<=e+i,l.toleranceExceeded=l.distance>t.tolerance[l.direction],o(l),a=e,s=!1}function d(){s||(s=!0,i=requestAnimationFrame(c))}var u=!!n&&{passive:!0,capture:!1};return e.addEventListener("scroll",d,u),c(),{destroy:function(){cancelAnimationFrame(i),e.removeEventListener("scroll",d,u)}}}function o(e){return e===Object(e)?e:{down:e,up:e}}function i(e,t){t=t||{},Object.assign(this,i.options,t),this.classes=Object.assign({},i.options.classes,t.classes),this.elem=e,this.tolerance=o(this.tolerance),this.offset=o(this.offset),this.initialised=!1,this.frozen=!1}return i.prototype={constructor:i,init:function(){return i.cutsTheMustard&&!this.initialised&&(this.addClass("initial"),this.initialised=!0,setTimeout(function(e){e.scrollTracker=t(e.scroller,{offset:e.offset,tolerance:e.tolerance},e.update.bind(e))},100,this)),this},destroy:function(){this.initialised=!1,Object.keys(this.classes).forEach(this.removeClass,this),this.scrollTracker.destroy()},unpin:function(){!this.hasClass("pinned")&&this.hasClass("unpinned")||(this.addClass("unpinned"),this.removeClass("pinned"),this.onUnpin&&this.onUnpin.call(this))},pin:function(){this.hasClass("unpinned")&&(this.addClass("pinned"),this.removeClass("unpinned"),this.onPin&&this.onPin.call(this))},freeze:function(){this.frozen=!0,this.addClass("frozen")},unfreeze:function(){this.frozen=!1,this.removeClass("frozen")},top:function(){this.hasClass("top")||(this.addClass("top"),this.removeClass("notTop"),this.onTop&&this.onTop.call(this))},notTop:function(){this.hasClass("notTop")||(this.addClass("notTop"),this.removeClass("top"),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){this.hasClass("bottom")||(this.addClass("bottom"),this.removeClass("notBottom"),this.onBottom&&this.onBottom.call(this))},notBottom:function(){this.hasClass("notBottom")||(this.addClass("notBottom"),this.removeClass("bottom"),this.onNotBottom&&this.onNotBottom.call(this))},shouldUnpin:function(e){return"down"===e.direction&&!e.top&&e.toleranceExceeded},shouldPin:function(e){return"up"===e.direction&&e.toleranceExceeded||e.top},addClass:function(e){this.elem.classList.add.apply(this.elem.classList,this.classes[e].split(" "))},removeClass:function(e){this.elem.classList.remove.apply(this.elem.classList,this.classes[e].split(" "))},hasClass:function(e){return this.classes[e].split(" ").every(function(e){return this.classList.contains(e)},this.elem)},update:function(e){e.isOutOfBounds||!0!==this.frozen&&(e.top?this.top():this.notTop(),e.bottom?this.bottom():this.notBottom(),this.shouldUnpin(e)?this.unpin():this.shouldPin(e)&&this.pin())}},i.options={tolerance:{up:0,down:0},offset:0,scroller:e()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},i.cutsTheMustard=!!(e()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame),i}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof module&&module.exports?module.exports=t():e.Colcade=t()}(window,function(){function e(e,t){if((e=a(e))&&e.colcadeGUID){var o=i[e.colcadeGUID];return o.option(t),o}this.element=e,this.options={},this.option(t),this.create()}var t=e.prototype;t.option=function(e){this.options=function(e,t){for(var o in t)e[o]=t[o];return e}(this.options,e)};var o=0,i={};function n(t){var o=t.getAttribute("data-colcade").split(","),i={};o.forEach(function(e){var t=e.split(":"),o=t[0].trim(),n=t[1].trim();i[o]=n}),new e(t,i)}function s(e){var t=[];if(Array.isArray(e))t=e;else if(e&&"number"==typeof e.length)for(var o=0;o<e.length;o++)t.push(e[o]);else t.push(e);return t}function r(e,t){return s((t=t||document).querySelectorAll(e))}function a(e){return"string"==typeof e&&(e=document.querySelector(e)),e}return t.create=function(){this.errorCheck();var e=this.guid=++o;this.element.colcadeGUID=e,i[e]=this,this.reload(),this._windowResizeHandler=this.onWindowResize.bind(this),this._loadHandler=this.onLoad.bind(this),window.addEventListener("resize",this._windowResizeHandler),this.element.addEventListener("load",this._loadHandler,!0)},t.errorCheck=function(){var e=[];if(this.element||e.push("Bad element: "+this.element),this.options.columns||e.push("columns option required: "+this.options.columns),this.options.items||e.push("items option required: "+this.options.items),e.length)throw new Error("[Colcade error] "+e.join(". "))},t.reload=function(){this.updateColumns(),this.updateItems(),this.layout()},t.updateColumns=function(){this.columns=r(this.options.columns,this.element)},t.updateItems=function(){this.items=r(this.options.items,this.element)},t.getActiveColumns=function(){return this.columns.filter(function(e){return"none"!=getComputedStyle(e).display})},t.layout=function(){this.activeColumns=this.getActiveColumns(),this._layout()},t._layout=function(){this.columnHeights=this.activeColumns.map(function(){return 0}),this.layoutItems(this.items)},t.layoutItems=function(e){e.forEach(this.layoutItem,this)},t.layoutItem=function(e){var t=Math.min.apply(Math,this.columnHeights),o=this.columnHeights.indexOf(t);this.activeColumns[o].appendChild(e),this.columnHeights[o]+=e.offsetHeight||1},t.append=function(e){var t=this.getQueryItems(e);this.items=this.items.concat(t),this.layoutItems(t)},t.prepend=function(e){var t=this.getQueryItems(e);this.items=t.concat(this.items),this._layout()},t.getQueryItems=function(e){e=s(e);var t=document.createDocumentFragment();return e.forEach(function(e){t.appendChild(e)}),r(this.options.items,t)},t.measureColumnHeight=function(e){var t=this.element.getBoundingClientRect();this.activeColumns.forEach(function(o,i){if(!e||o.contains(e)){var n=o.lastElementChild.getBoundingClientRect();this.columnHeights[i]=n.bottom-t.top}},this)},t.onWindowResize=function(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){this.onDebouncedResize()}.bind(this),100)},t.onDebouncedResize=function(){var e=this.getActiveColumns(),t=e.length==this.activeColumns.length,o=!0;this.activeColumns.forEach(function(t,i){o=o&&t==e[i]}),t&&o||(this.activeColumns=e,this._layout())},t.onLoad=function(e){this.measureColumnHeight(e.target)},t.destroy=function(){this.items.forEach(function(e){this.element.appendChild(e)},this),window.removeEventListener("resize",this._windowResizeHandler),this.element.removeEventListener("load",this._loadHandler,!0),delete this.element.colcadeGUID,delete i[this.guid]},function(e){if("complete"==document.readyState)return void e();document.addEventListener("DOMContentLoaded",e)}(function(){r("[data-colcade]").forEach(n)}),e.data=function(e){var t=(e=a(e))&&e.colcadeGUID;return t&&i[t]},e.makeJQueryPlugin=function(t){(t=t||window.jQuery)&&(t.fn.colcade=function(o){var i;return"string"==typeof o?function(e,o,i){var n;return e.each(function(e,s){var r=t.data(s,"colcade");if(r){var a=r[o].apply(r,i);n=void 0===n?a:n}}),void 0!==n?n:e}(this,o,Array.prototype.slice.call(arguments,1)):(i=o,this.each(function(o,n){var s=t.data(n,"colcade");s?(s.option(i),s.layout()):(s=new e(n,i),t.data(n,"colcade",s))}),this)})},e.makeJQueryPlugin(),e});var ajaxifyOptions={baseTitle:"DRMA",titlePrefix:" | DRMA"};if("fetch"in window){const e={state:{savedScroll:!1,push:!1,tab:!1},path:window.location.href};currentSceneState=e;var isMobile=window.matchMedia("only screen and (max-width: 900px)").matches;document.addEventListener("click",function(e){if(e.target instanceof HTMLAnchorElement){var t=new URL(e.target.href),o=new URL(window.location);if(!(t.host!==o.host||e.metaKey||e.ctrlKey||"_blank"===e.target.target||"#"===e.target.getAttribute("href")||e.target.getAttribute("href").includes("mailto:")||e.target.getAttribute("href").includes("tel:")||e.target.classList.contains("download")||e.target.classList.contains("ajax-cancel"))){e.preventDefault();let t={state:{savedScroll:!1,push:!0,tab:!1},path:e.target.href};if(fetchScene(t),e.target.classList.contains("goto-project")&&(document.querySelector("main").classList.add("slide-out"),document.querySelector("header").classList.add("transparent"),!isMobile)){t.specialTransition=!0,document.querySelector(".transition-box").classList.remove("hide"),document.querySelector(".transition-box").focus(),document.querySelector(".transition-box").classList.add("slide-in");var i=e.target.closest(".teaser").querySelector(".image").getAttribute("data-thumb-large"),n=e.target.closest(".teaser").querySelector(".teaser-overlay").getAttribute("data-color");document.querySelector(".transition-box img").src=i,document.querySelector(".transition-box").setAttribute("data-color",n)}}}}),window.addEventListener("popstate",function(e){console.log("popstate"),e.state&&(e.state.state.push=!1,fetchScene(e.state))}),history.scrollRestoration="manual",setInterval(function(){currentSceneState.state.savedScroll=window.scrollY,history.replaceState(currentSceneState,null,currentSceneState.path)},1e3)}function fetchScene(e){let t=e.path;fetch(t,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(function(e){return e.text()}).then(function(t){e.specialTransition?setTimeout(function(){renderScene(e,t)},1e3):renderScene(e,t)});var o=document.querySelector("main");o.classList.remove("anim-out"),o.classList.remove("anim-in"),o.focus(),o.classList.add("anim-out");var i=document.querySelector("footer");i.classList.remove("anim-out"),i.classList.remove("anim-in"),i.focus(),i.classList.add("anim-out"),document.querySelector("header .logo").classList.remove("animated"),document.querySelector("header .logo").classList.add("anim-out"),document.getElementById("cursor").setAttribute("data-state","default")}function renderScene(e,t){currentSceneState=e,document.querySelector("main").outerHTML=t;var o=document.querySelector("main");o.classList.remove("anim-in"),o.focus(),o.classList.add("anim-in"),e.state.push&&history.pushState(e,null,e.path),0==e.state.savedScroll?window.scroll(0,0):window.scroll(0,e.state.savedScroll);let i=o.getAttribute("data-scene"),n=(o.getAttribute("data-type"),o.getAttribute("data-title"));switch(document.title="home"==i?ajaxifyOptions.baseTitle:n+ajaxifyOptions.titlePrefix,i){case"home":case"project":document.querySelector("header").classList.add("transparent");break;default:document.querySelector("header").classList.remove("transparent")}switch(document.querySelectorAll(".nav-main li").forEach(e=>{e.classList.remove("active")}),i){case"places":case"project":document.querySelector('.nav-main li[data-scene="places"]').classList.add("active");break;case"exploration":case"explorations":document.querySelector('.nav-main li[data-scene="explorations"]').classList.add("active");break;case"studio":document.querySelector('.nav-main li[data-scene="studio"]').classList.add("active")}switch(i){case"home":case"studio":document.querySelector("footer").classList.remove("compact"),document.querySelector("footer").classList.add("extended");break;default:document.querySelector("footer").classList.remove("extended"),document.querySelector("footer").classList.add("compact")}var s=document.querySelector("footer");s.classList.remove("anim-in"),s.focus(),s.classList.add("anim-in"),setTimeout(function(){s.classList.remove("anim-out")},1e3),document.querySelector("header .logo").classList.remove("animated"),document.querySelector("header .logo").classList.remove("anim-out"),document.querySelector("header .logo").classList.add("anim-in"),setTimeout(function(){document.querySelector("header .logo").classList.add("animated")},1500),pageInit(),document.querySelector("main").classList.remove("landing-intro"),e.specialTransition&&setTimeout(function(){document.querySelector(".transition-box").classList.add("hide"),document.querySelector(".transition-box").classList.remove("slide-in")},800)}function reloadHeader(e){}var sliderInterval,sliderTimer,$cursor=document.getElementById("cursor");if(document.onmousemove=function(e){document.body.style.setProperty("--cursor-x",e.clientX+"px"),document.body.style.setProperty("--cursor-y",e.clientY+"px")},document.addEventListener("mouseover",function(e){e.target.closest(".teaser")&&$cursor.setAttribute("data-state","hover")}),document.addEventListener("mouseover",function(e){(e.target.closest("a")||e.target.closest(".projects-index-table tr"))&&(e.target.closest(".projects-index-table tr.no-link")||$cursor.setAttribute("data-state","hover"))}),document.addEventListener("mouseout",function(e){(e.target.closest("a")||e.target.closest(".projects-index-table tr"))&&$cursor.setAttribute("data-state","default")}),"home"==document.querySelector("main").getAttribute("data-scene")&&document.querySelector("main").classList.contains("landing-intro")){var firstVideo=document.querySelector(".hero-slider .slide.active video");firstVideo&&(firstVideo.play(),setTimeout(function(){prepNextSlide()},100),console.log("video loaded"));var slides=document.querySelectorAll(".hero-slider .slide");slides[0].classList.add("active"),setTimeout(function(){document.querySelector(".intro-logo").classList.add("anim-in"),setTimeout(function(){document.querySelector(".intro-logo").classList.add("anim-out"),setTimeout(function(){document.querySelector("header").classList.add("anim-in"),setTimeout(function(){$header.querySelector(".logo").classList.add("anim-in"),setTimeout(function(){$header.querySelector(".logo").classList.remove("anim-in"),$header.querySelector(".logo").classList.add("animated")},1500)},800),setTimeout(function(){document.querySelector("main").classList.remove("landing-intro"),slides[0].querySelector(".slide-text").classList.add("show-words")},1700)},300)},3e3)},1e3)}else document.querySelector("header .logo").classList.add("anim-in"),setTimeout(function(){document.querySelector("header .logo").classList.remove("anim-in"),document.querySelector("header .logo").classList.add("animated")},1500);var sliderIndex=0;function initLandingSlider(){if(clearTimeout(sliderTimer),"home"==document.querySelector("main").getAttribute("data-scene")&&!document.querySelector("main").classList.contains("landing-intro")){sliderIndex=0;var e=document.querySelectorAll(".hero-slider .slide");e.forEach(e=>{e.classList.remove("active"),e.querySelector(".slide-text").classList.remove("show-words")}),e[0].classList.add("active"),console.log(e[0]);var t=e[0].querySelector(".slide-text");t.focus(),t.classList.add("show-words"),prepNextSlide()}}function prepNextSlide(){clearTimeout(sliderTimer);var e=document.querySelectorAll(".hero-slider .slide"),t=document.querySelector(".hero-slider .slide.active").querySelector("video");if(t){var o=1e3*t.duration;t.currentTime=0,t.play(),t.addEventListener("ended",function t(){this.removeEventListener("ended",t),sliderIndex<e.length-1?sliderIndex++:sliderIndex=0,e.forEach(e=>{e.classList.remove("active"),e.querySelector(".slide-text").classList.remove("show-words")}),e[sliderIndex].classList.add("active");var o=e[sliderIndex].querySelector(".slide-text");o.focus(),setTimeout(function(){o.classList.add("show-words")},1e3),prepNextSlide()})}else{o=9e3;console.log("next in",o),sliderTimer=setTimeout(function(){sliderIndex<e.length-1?sliderIndex++:sliderIndex=0,e.forEach(e=>{e.classList.remove("active"),e.querySelector(".slide-text").classList.remove("show-words")}),e[sliderIndex].classList.add("active");var t=e[sliderIndex].querySelector(".slide-text");t.focus(),setTimeout(function(){t.classList.add("show-words")},1e3),prepNextSlide()},o)}}function initStudioCoords(){let e=document.querySelector(".studio-coordinates .coordinates");if(e){var t=e.getAttribute("data-latitude"),o=e.getAttribute("data-longtitude"),i=t.replace(".",""),n=o.replace(".","");if(t<10)i=0+i;if(o<10)n=0+n;let l=i.split("").slice(0,6),c=n.split("").slice(0,6);var s=e.querySelectorAll(".latitude > div > span");let d=e.querySelectorAll(".longtitude > div > span");for(var r=0;r<l.length;r++){if(0==(a=l[r]))var a=10;s[r].querySelector("span").style.top="-"+a+"em"}for(r=0;r<c.length;r++){if(0==(a=c[r]))a=10;d[r].querySelector("span").style.top="-"+a+"em"}}}function initFooterCoords(){let e=document.querySelector("footer .coordinates");if(e){var t=e.getAttribute("data-latitude"),o=e.getAttribute("data-longtitude"),i=t.replace(".",""),n=o.replace(".","");if(t<10)i=0+i;if(o<10)n=0+n;let l=i.split("").slice(0,6),c=n.split("").slice(0,6);var s=e.querySelectorAll(".latitude > div > span");let d=e.querySelectorAll(".longtitude > div > span");for(var r=0;r<l.length;r++){if(0==(a=l[r]))var a=10;s[r].querySelector("span").style.top="-"+a+"em"}for(r=0;r<c.length;r++){if(0==(a=c[r]))a=10;d[r].querySelector("span").style.top="-"+a+"em"}}}document.addEventListener("scroll",function(e){if("home"===document.querySelector("main").getAttribute("data-scene")){var t=.5*window.scrollY;document.querySelector(".hero-slider .slider-container").style.transform="translateY("+t+"px)"}}),document.addEventListener("mouseover",function(e){if(e.target.closest(".teaser")){if(e.target.closest(".teaser").classList.contains("hovering"))return;e.target.closest(".teaser").classList.add("hovering");let n=e.target.closest(".teaser").querySelector(".coordinates");if(n){let e=n.getAttribute("data-latitude").replace(".",""),s=n.getAttribute("data-longtitude").replace(".",""),r=e.split("").slice(0,6),a=s.split("").slice(0,6);var t=n.querySelectorAll(".latitude > div > span");let l=n.querySelectorAll(".longtitude > div > span");for(var o=0;o<r.length;o++){if(0==(i=r[o]))var i=10;t[o].querySelector("span").style.top="-"+i+"em"}for(o=0;o<a.length;o++){if(0==(i=a[o]))i=10;l[o].querySelector("span").style.top="-"+i+"em"}}}}),document.addEventListener("mouseout",function(e){e.target.closest(".teaser")&&e.target.closest(".teaser").classList.contains("hovering")&&(e.target.closest(".teaser").classList.remove("hovering"),e.target.closest(".teaser").querySelectorAll(".integers > span span, .decimals > span span").forEach(e=>{e.style.top="0em"}),$cursor.setAttribute("data-state","default"))});const $header=document.querySelector("header"),$footer=document.querySelector("footer");function pageInit(){console.log("page init event"),initMap(),initLandingSlider(),initStudioCoords(),observeVideos()}window.lazySizesConfig=window.lazySizesConfig||{},document.addEventListener("lazyloaded",function(e){e.target.parentElement.classList.add("loaded")}),pageInit(),$header.addEventListener("click",function(e){let t=e.target;t.closest("a")&&($header.querySelectorAll("li").forEach(e=>{e.classList.remove("active")}),t.closest("li")&&t.closest("li").classList.add("active"),$header.classList.remove("active"),$header.querySelector(".nav-main").setAttribute("style","height: 0px"))}),$header.addEventListener("click",function(e){e.target.closest(".hamburger")&&window.innerWidth<1025&&($header.classList.contains("active")?($header.classList.remove("active"),$header.querySelector(".nav-main").setAttribute("style","height: 0px")):($header.classList.add("active"),$header.querySelector(".nav-main").setAttribute("style","height: 0px"),$header.querySelector(".nav-main").setAttribute("style","height: "+$header.querySelector(".nav-main").scrollHeight+"px")))}),window.onscroll=function(){var e=window.pageYOffset;Math.ceil(window.innerHeight+e)>=document.body.offsetHeight&&initFooterCoords()};const header=document.querySelector("header"),headroom=new Headroom(header,{tolerance:{up:5,down:0}});function initMasonry(){var e=document.querySelector(".team-list");if(e)new Colcade(e,{columns:".grid-col",items:".person"})}var projectsMap;headroom.init(),$footer.addEventListener("click",function(e){e.target.closest("a.scroll-top")&&(e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"}))}),document.addEventListener("click",function(e){if(e.target.closest(".team-read-more")){e.preventDefault();let o=e.target.closest(".bio");var t=o.querySelector(".bio-text");t.setAttribute("style","height: 0px"),o.classList.contains("expanded")?(o.classList.remove("expanded"),t.setAttribute("style","height: 0px")):(o.classList.add("expanded"),t.setAttribute("style","height: "+t.scrollHeight+"px"))}}),document.addEventListener("click",function(e){if(e.target.closest(".studio-navigation")){e.preventDefault();var t=e.target.closest("li").getAttribute("data-scroll"),o=document.querySelector("."+t);if("contact"==t)var i=document.body.scrollHeight-window.innerHeight;else i=o.getBoundingClientRect().y;window.scroll({top:i,left:0,behavior:"smooth"})}}),document.addEventListener("mouseover",function(e){if(e.target.closest(".projects-index-table tr.project-row")){document.querySelectorAll(".index-thumb").forEach(function(e){e.classList.remove("active")});var t=e.target.closest(".projects-index-table tr.project-row"),o=t.getBoundingClientRect(),i=document.querySelector(".index-thumbs").getBoundingClientRect(),n=t.getAttribute("data-id"),s=document.querySelector('.index-thumb[data-id="'+n+'"]'),r=window.innerHeight-o.bottom,a=s.getBoundingClientRect().height;s.style.top=r>=a+20?o.top-i.top+"px":window.innerHeight-i.top-a-20+"px",s.classList.add("active")}}),document.addEventListener("mouseout",function(e){if(e.target.closest(".projects-index-table tr.project-row")){var t=e.target.closest(".projects-index-table tr.project-row").getAttribute("data-id");document.querySelector('.index-thumb[data-id="'+t+'"]').classList.remove("active")}}),document.addEventListener("click",function(e){e.target.closest(".projects-index-table tr:not(:first-child):not(.no-link)")&&e.target.closest(".projects-index-table tr").querySelector("a").click()}),document.addEventListener("click",function(e){if(e.target.closest("th")){var t=e.target.closest("th"),o=Array.from(t.parentElement.children).indexOf(t),i=t.closest("table").querySelector("tbody"),n=Array.from(i.querySelectorAll("tr:not(:first-child)")),s="default";t.classList.contains("sorted-asc")?s="asc":t.classList.contains("sorted-desc")&&(s="desc"),"asc"===s?(n.sort((e,t)=>{var i=e.children[o].innerText;return t.children[o].innerText.localeCompare(i)}),t.classList.remove("sorted-asc"),t.classList.add("sorted-desc")):"desc"===s?(n.sort((e,t)=>{return parseInt(e.getAttribute("data-i"))-parseInt(t.getAttribute("data-i"))}),t.classList.remove("sorted-desc"),t.classList.add("default")):(n.sort((e,t)=>{var i=e.children[o].innerText,n=t.children[o].innerText;return i.localeCompare(n)}),t.classList.remove("default"),t.classList.add("sorted-asc"));var r=i.querySelector("tr:first-child").innerHTML;i.innerHTML=r,n.forEach(e=>i.appendChild(e))}});var highlightingId,highlighting=!1;function initMap(){var e=window.matchMedia("only screen and (max-width: 900px)").matches;if(console.log(e),document.querySelector("#projects-map")){var t=document.querySelector(".map-coordinates");mapboxgl.accessToken="pk.eyJ1IjoidGFvayIsImEiOiJja2RnMTcyZTAybHZjMnpzOGo5ZGgzM2kyIn0.WmLekV_FCqNMpcvfZOcMfw",(projectsMap=new mapboxgl.Map({container:"projects-map",style:"mapbox://styles/taok/ckki90fbv0nc917nwessy5u12",center:[11.812305,63.276694],zoom:4,attributionControl:!1}).addControl(new mapboxgl.AttributionControl({compact:!0}))).on("load",function(){projectsMap.addSource("places",{type:"geojson",data:"/projectsGeojson",cluster:!0,clusterMaxZoom:20,clusterRadius:10}),projectsMap.addLayer({id:"earthquake_circle",type:"circle",source:"places",filter:["!=","cluster",!0],paint:{"circle-opacity":0}}),projectsMap.addLayer({id:"powerplant_individual",type:"circle",source:"places",filter:["==","cluster",!0],paint:{"circle-opacity":0}});var e={},t={},o={},i={};projectsMap.on("render",function(){projectsMap.isSourceLoaded("places")&&function(){for(var n={},s={},r=projectsMap.querySourceFeatures("places"),a=0;a<r.length;a++){var l=r[a].geometry.coordinates,c=r[a].properties;if(c.cluster){var d=c.cluster_id,u=c.point_count;(m=e[d])||((p=document.createElement("div")).className="map-marker-cluster",p.setAttribute("data-coords",JSON.stringify(l)),p.setAttribute("data-clusterId",d),p.innerHTML='<a class="ajax-cancel" href="/">'+u+"</a>",window.innerWidth<600&&p.querySelector("a").classList.add("ajax-cancel"),m=e[d]=new mapboxgl.Marker({element:p}).setLngLat(l)),n[d]=m,o[d]||m.addTo(projectsMap)}else{var m,p;d=c.id,(m=t[d])||((p=document.createElement("div")).className="map-marker",p.setAttribute("data-id",c.id),p.setAttribute("data-coords",JSON.stringify(l)),p.innerHTML='<a class="ajax-cancel" href="/'+c.uri+'"></a>',window.innerWidth<600&&p.querySelector("a").classList.add("ajax-cancel"),c.indexOnly&&p.classList.add("index-only"),m=t[d]=new mapboxgl.Marker({element:p}).setLngLat(l)),s[d]=m,i[d]||m.addTo(projectsMap)}}for(d in o)n[d]||o[d].remove();for(d in o=n,i)s[d]||i[d].remove();i=s}()});var n=document.querySelector(".map-thumb.highlighted");if(n){document.querySelector(".places-container").scrollIntoView({behavior:"smooth"});var s=n.getAttribute("data-id");highlightingId=s,console.log("highlight plz",s),setTimeout(function(){var e=i[s];if(e)highlighting=!0,projectsMap.flyTo({center:e._lngLat,offset:[0,-150],speed:.2,curve:.6,zoom:4.05});else{highlighting=!0;var t=n.getAttribute("data-lng"),o=n.getAttribute("data-lat");projectsMap.flyTo({center:[t,o],offset:[0,-150],speed:.9,curve:1,zoom:8})}},300)}}),projectsMap.on("moveend",({originalEvent:e})=>{e?projectsMap.fire("usermoveend"):projectsMap.fire("flyend")}),projectsMap.on("movestart",({originalEvent:e})=>{document.querySelectorAll(".map-thumb").forEach(e=>{e.classList.remove("active")}),document.querySelectorAll(".map-marker").forEach(e=>{e.classList.remove("active")})}),projectsMap.on("flyend",({originalEvent:e})=>{if(highlighting){$marker=document.querySelector(`.map-marker[data-id="${highlightingId}"]`);var t=$marker.getBoundingClientRect();console.log(t.top),$marker.querySelector("a").classList.remove("ajax-cancel");var o=document.querySelector(".map-thumbs").getBoundingClientRect(),i=$marker.getAttribute("data-id"),n=document.querySelector('.map-thumb[data-id="'+i+'"]');n.style.top=t.top-o.top+"px",n.style.left=t.left-o.left+"px",n.classList.add("active"),highlighting=!1}}),projectsMap.on("mousemove",function(e){t.querySelector(".lat").innerText=e.lngLat.lat.toFixed(4),t.querySelector(".lng").innerText=e.lngLat.lng.toFixed(4)}),projectsMap.on("touchstart",function(e){window.innerWidth<1024&&(document.querySelectorAll(".map-thumb").forEach(e=>{e.classList.remove("active")}),document.querySelectorAll(".map-marker").forEach(e=>{e.classList.remove("active")}))})}}function initProjectMap(){if(document.querySelector("#project-map")){var e=document.querySelector("#project-map"),t=e.getAttribute("data-zoom"),o=e.getAttribute("data-place"),i=e.getAttribute("data-marker"),n=JSON.parse(i);mapboxgl.accessToken="pk.eyJ1IjoidGFvayIsImEiOiJja2RnMTcyZTAybHZjMnpzOGo5ZGgzM2kyIn0.WmLekV_FCqNMpcvfZOcMfw";var s=new mapboxgl.Map({container:"project-map",style:"mapbox://styles/taok/ckki90fbv0nc917nwessy5u12",center:n,zoom:t,attributionControl:!1}).addControl(new mapboxgl.AttributionControl({compact:!0})),r=document.createElement("div");r.className="map-marker",r.innerHTML='<div class="marker-place">'+o+"</div>",new mapboxgl.Marker(r).setLngLat(n).addTo(s),s.on("wheel",e=>{if(e.originalEvent.ctrlKey)document.getElementById("project-map").classList.remove("zoom-tip");else if(e.originalEvent.metaKey)document.getElementById("project-map").classList.remove("zoom-tip");else if(e.originalEvent.altKey)document.getElementById("project-map").classList.remove("zoom-tip");else if(e.preventDefault(),!document.getElementById("project-map").classList.contains("zoom-tip")){document.getElementById("project-map").classList.add("zoom-tip"),clearTimeout(t);var t=setTimeout(function(){document.getElementById("project-map").classList.remove("zoom-tip")},2e3)}}),s.on("zoom",function(){s.getZoom()>12?(s.setStyle("mapbox://styles/mapbox/satellite-v9"),r.classList.add("sat")):(s.setStyle("mapbox://styles/taok/ckki90fbv0nc917nwessy5u12"),r.classList.remove("sat"))});var a=e.querySelector(".map-coordinates");s.on("mousemove",function(e){a.querySelector(".lat").innerText=e.lngLat.lat.toFixed(4),a.querySelector(".lng").innerText=e.lngLat.lng.toFixed(4)})}}function observeVideos(){const e=new IntersectionObserver(e=>{e[0].isIntersecting?e[0].target.play():e[0].target.pause()});document.querySelectorAll(".module.video video").forEach(t=>{e.observe(t)})}document.addEventListener("mouseover",function(e){if(e.target.closest("#projects-map .map-marker")&&window.innerWidth>1024){var t=e.target.closest(".map-marker"),o=t.getBoundingClientRect();t.querySelector("a").classList.remove("ajax-cancel");var i=document.querySelector(".map-thumbs").getBoundingClientRect(),n=t.getAttribute("data-id"),s=document.querySelector('.map-thumb[data-id="'+n+'"]');s.style.top=o.top-i.top+"px",s.style.left=o.left-i.left+"px",s.classList.add("active")}}),document.addEventListener("mouseout",function(e){if(e.target.closest("#projects-map .map-marker")&&window.innerWidth>1024){var t=e.target.closest(".map-marker").getAttribute("data-id");document.querySelector('.map-thumb[data-id="'+t+'"]').classList.remove("active")}}),document.addEventListener("click",function(e){if(e.target.closest("#projects-map .map-marker-cluster")){e.preventDefault(),console.log("zoom zoom");var t=e.target.closest("#projects-map .map-marker-cluster"),o=parseInt(t.getAttribute("data-clusterId")),i=JSON.parse(t.getAttribute("data-coords"));console.log(o),projectsMap.getSource("places").getClusterExpansionZoom(o,function(e,t){console.log(e),e||(projectsMap.easeTo({center:i,zoom:1*t,duration:1e3}),setTimeout(function(){projectsMap.easeTo({center:i,zoom:1.3*t,duration:1e3})},1e3))})}}),document.addEventListener("click",function(e){if(e.target.closest("#projects-map .map-marker")&&window.innerWidth<1024){e.preventDefault(),console.log("mobile click");var t=e.target.closest(".map-marker"),o=JSON.parse(t.getAttribute("data-coords"));projectsMap.flyTo({center:o,offset:[0,-150],speed:.8,curve:.6}),setTimeout(function(){var e=t.getBoundingClientRect();t.classList.add("active");var o=document.querySelector(".map-thumbs").getBoundingClientRect(),i=t.getAttribute("data-id"),n=document.querySelector('.map-thumb[data-id="'+i+'"]');t.classList.contains("index-only")&&n.classList.add("index-only-thumb"),n.style.top=e.top-o.top+"px",n.style.left=e.left-o.left+"px",n.classList.add("active")},500)}}),document.addEventListener("click",function(e){if(e.target.closest(".show-project-description")){e.preventDefault();var t=e.target.closest(".show-project-description"),o=document.querySelector(".fold-out");o.setAttribute("style","height: 0px"),o.classList.contains("expanded")?(t.classList.remove("expanded"),o.classList.remove("expanded"),o.setAttribute("style","height: 0px")):(t.classList.add("expanded"),o.classList.add("expanded"),o.setAttribute("style","height: "+o.scrollHeight+"px"),initProjectMap())}});