PageSourceSearch

https://homesforbc.ca/__ext.js?c=8&r=js+blocks.js,js+responsive-co…+blocks+maps.js,+js+blocks+brand-footer.js,

js homesforbc.ca collected 2026-10-10 00:05:35 UTC 183,021 bytes, 2,267 lines download raw bytes

1
2
3/* ==== INCLUDE: /js/blocks.js ==== */
4
5LazyLoad=function(a){function h(b,c){var e,d=a.createElement(b);for(e in c)c.hasOwnProperty(e)&&d.setAttribute(e,c[e]);return d}function i(a){var c,g,b=d[a];b&&(c=b.callback,g=b.urls,g.shift(),e=0,g.length||(c&&c.call(b.context,b.obj),d[a]=null,f[a].length&&k(a)))}function j(){var c=navigator.userAgent;b={async:a.createElement("script").async===!0},(b.webkit=/AppleWebKit\//.test(c))||(b.ie=/MSIE|Trident/.test(c))||(b.opera=/Opera/.test(c))||(b.gecko=/Gecko\//.test(c))||(b.unknown=!0)}function k(e,g,k,n,o){var s,t,u,v,w,x,p=function(){i(e)},q="css"===e,r=[];if(b||j(),g)if(g="string"==typeof g?[g]:g.concat(),q||b.async||b.gecko||b.opera)f[e].push({urls:g,callback:k,obj:n,context:o});else for(s=0,t=g.length;s<t;++s)f[e].push({urls:[g[s]],callback:s===t-1?k:null,obj:n,context:o});if(!d[e]&&(v=d[e]=f[e].shift())){for(c||(c=a.head||a.getElementsByTagName("head")[0]),w=v.urls.concat(),s=0,t=w.length;s<t;++s)x=w[s],q?u=b.gecko?h("style"):h("link",{href:x,rel:"stylesheet"}):(u=h("script",{src:x}),u.async=!1),u.className="lazyload",u.setAttribute("charset","utf-8"),b.ie&&!q&&"onreadystatechange"in u&&!("draggable"in u)?u.onreadystatechange=function(){/loaded|complete/.test(u.readyState)&&(u.onreadystatechange=null,p())}:q&&(b.gecko||b.webkit)?b.webkit?(v.urls[s]=u.href,m()):(u.innerHTML='@import "'+x+'";',l(u)):u.onload=u.onerror=p,r.push(u);for(s=0,t=r.length;s<t;++s)c.appendChild(r[s])}}function l(a){var b;try{b=!!a.sheet.cssRules}catch(c){return e+=1,void(e<200?setTimeout(function(){l(a)},50):b&&i("css"))}i("css")}function m(){var b,a=d.css;if(a){for(b=g.length;--b>=0;)if(g[b].href===a.urls[0]){i("css");break}e+=1,a&&(e<200?setTimeout(m,50):i("css"))}}var b,c,d={},e=0,f={css:[],js:[]},g=a.styleSheets;return{css:function(a,b,c,d){k("css",a,b,c,d)},js:function(a,b,c,d){k("js",a,b,c,d)}}}(this.document);
6
7window.nanoid=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let n=63&r[t];e+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return e};
8
9!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).TypeIt=t()}(this,(function(){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}var t={strings:[],speed:100,cursor:!0,cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,lifeLike:!0,breakLines:!0,startDelay:250,startDelete:!1,nextStringDelay:750,loop:!1,loopDelay:750,html:!0,waitUntilVisible:!1,beforeString:function(){},afterString:function(){},beforeStep:function(){},afterStep:function(){},afterComplete:function(){}},e=function(n){return n.map((function(n){return void 0===n[1]&&n.push(null),void 0===n[2]&&n.push({}),n}))},r=function(n,t){return Object.assign({},n,t)},i=function(n){return Array.isArray(n)},o=function(n,t){return n[2]=r(n[2],t)||t,n},u=function(n,t){return i(n[0])?n.map((function(n){return o(n,t)})):o(n,t)},c=function(n,t,e,r){r=r||!1,e=e||{};var o=!i(n),c=n.length;return(n=o?new Array(n).fill(0):n).map((function(n,i){if(o)return t;var a=[t,n,e];return r&&(0===i&&(a=u(a,{isFirst:!0})),i+1===c&&(a=u(a,{isLast:!0}))),a}))};function a(n){this.insert=function(n,e){t.splice(n,0,e)},this.add=function(n,u,a){return n=i(n)?n:[n,null],a=a||!1,u=u||1,i(n[0])||(n=c(u,n)),n=e(n).map((function(n){return n[2]=r(n[2],{id:o}),o++,n})),t=a?n.concat(t):t.concat(n),this},this.set=function(n,e){t[n]=e},this.reset=function(){t=t.map((function(n){return n[2].executed=!1,n}))},this.getItems=function(){return(t=e(t)).filter((function(n){return!n[2].executed}))},this.setMeta=function(n,e){var i=t.findIndex((function(t){return t[2].id===n}));t[i][2]=r(t[i][2],e)};var t=[],o=0;this.add(n)}var f=function(n){return Array.from(n)},s=function(n){var t=[];return t.concat.apply(t,n)},l=function(n){var t=document.implementation.createHTMLDocument("");return t.body.innerHTML=n,t.body},d=function n(t,e,r){e=e||null,r=void 0!==r&&r;var i=f(t.childNodes).map((function(t){return 3===(e=t).nodeType||"BR"===e.tagName?t:n(t);var e}));return i=s(i),e&&(i=i.filter((function(n){return!e.contains(n)}))),r?i.reverse():i},p=function(n){return"BODY"===n.tagName},h=function(n,t){t=t||null;var e=n instanceof HTMLElement;return{node:t,isTopLevelText:(!t||p(t.parentNode))&&!e,isHTMLElement:e,content:n}};function v(n){var t,e=l(n);return t=d(e).map((function(n){return n.nodeValue?f(n.nodeValue).map((function(t){return h(t,n)})):h(n)})),s(t)}function y(n,t){return(t=void 0===t||t)?v(n):f(n).map((function(n){return h(n)}))}var m=function(n){return document.createElement(n)},g=function(n,t){var e=m("style");e.id=t||"",e.appendChild(document.createTextNode(n)),document.head.appendChild(e)},b=function(n){return i(n)||(n=[n/2,n/2]),{before:n[0],after:n[1],total:n[0]+n[1]}},S=function(n,t){return Math.abs(Math.random()*(n+t-(n-t))+(n-t))};var N=function(n){return["textarea","input"].indexOf(n.tagName.toLowerCase())>-1},T=function(n,t){var e=t.querySelectorAll("*");return[t].concat(f(e).reverse()).find((function(t){return t.cloneNode().outerHTML===n.outerHTML}))},L=function(n,t,e,r){e=e||null;var i=t.isHTMLElement,o=i?t.content:document.createTextNode(t.content);if(N(n))n.value="".concat(n.value).concat(t.content);else{if(!t.isTopLevelText&&!i){var u=t.node.parentNode,c=T(u.cloneNode(),n);if(function(n,t){if(!n)return!1;var e=n.nextSibling;return!e||e.isEqualNode(t)}(c,e))n=c;else if((o=u.cloneNode()).innerText=t.content,!p(u.parentNode)){for(var a=u.parentNode,f=a.cloneNode(),s=T(f,n);!s&&!p(a);)f.innerHTML=o.outerHTML,o=f,f=a.parentNode.cloneNode(),a=a.parentNode,s=T(f,n);n=s||n}}var l=d(n,e,!0)[r-1],h=l?l.parentNode:n;h.insertBefore(o,h.contains(e)?e:null)}},M=function(n){var t;return null==n||null===(t=n.parentNode)||void 0===t?void 0:t.removeChild(n)};var x=function(n,t,e){var r,i="string"==typeof n,o=!1,u=-1*n;return i&&(u=(r="END"===n.toUpperCase())?-1:1,o=r?t+u>0:t+u<e.length),{isString:i,numberOfSteps:u,canKeepMoving:o}},w=function(n){var t,e=["font","lineHeight","color"],r=m("SPAN"),i=(t=n,window.getComputedStyle(t,null));for(var o in i)e.indexOf(o)>-1&&i[o]&&(r.style[o]=i[o]);return r.style.cssText};
9function D(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}function H(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(n){return Promise.reject(n)}}}function E(){}function C(n,t){if(!t)return n&&n.then?n.then(E):Promise.resolve()}function A(n,t){var e=n();return e&&e.then?e.then(t):t(e)}function k(n,t,e){if(!n.s){if(e instanceof O){if(!e.s)return void(e.o=k.bind(null,n,t));1&t&&(t=e.s),e=e.v}if(e&&e.then)return void e.then(k.bind(null,n,t),k.bind(null,n,2));n.s=t,n.v=e;var r=n.o;r&&r(n)}}var O=function(){function n(){}return n.prototype.then=function(t,e){var r=new n,i=this.s;if(i){var o=1&i?t:e;if(o){try{k(r,1,o(this.v))}catch(n){k(r,2,n)}return r}return this}return this.o=function(n){try{var i=n.v;1&n.s?k(r,1,t?t(i):i):e?k(r,1,e(i)):k(r,2,i)}catch(n){k(r,2,n)}},r},n}();function P(n,t){return n&&n.then?n.then(t):t(n)}return function(e,o){var u=this,s=this;o=o||{};var p=function(n,t,e){return n=i(n[0])?n:[n],an.add(n,t),function(n){var t=(n=n||{}).delay;t&&an.add([U,t])}(e),s},T=function(t){return t="object"===n(t)?t:{},[[Q,t,{force:!0}],[Q,en,{force:!0}]]},z=function(){return X?f(W.value):d(W,fn,!0)},B=function(n,t){t=t||1;var e=en.nextStringDelay;an.insert(n,[U,e.before]),an.insert(n+t+1,[U,e.after])},I=H((function(){if(fn){var n="[data-typeit-id='".concat(cn,"'] .ti-cursor");g("@keyframes blink-".concat(cn," { 0% {opacity: 0} 49% {opacity: 0} 50% {opacity: 1} } ").concat(n," { animation: blink-").concat(cn," ").concat(en.cursorSpeed/1e3,"s infinite; } ").concat(n,".with-delay { animation-delay: 500ms; } ").concat(n,".disabled { animation: none; }"),cn),W.appendChild(fn);var t="loaded"===document.fonts.status;return D(t||document.fonts.ready,(function(n){var t=fn.getBoundingClientRect().width/2;fn.style.margin="0 -".concat(t+2,"px 0 -").concat(t-2,"px")}),t)}})),R=function(n){fn&&(fn.classList.toggle("disabled",n),fn.classList.toggle("with-delay",!n))},q=H((function(n,t){return $.push(setTimeout(n,t)),D()})),j=H((function(n){var t=_;return D(t&&F(_),(function(t){return an.reset(),an.set(0,[U,n.before]),C(G(!0))}),!t)})),V=H((function(){tn.started=!0;var n,t=an.getItems();return P(function(n,t){try{var e=n()}catch(n){return t(n)}return e&&e.then?e.then(void 0,t):e}((function(){return P(function(n,t,e){var r,i,o=-1;return function u(c){try{for(;++o<n.length&&(!e||!e());)if((c=t(o))&&c.then){if(!((a=c)instanceof O&&1&a.s))return void c.then(u,i||(i=k.bind(null,r=new O,2)));c=c.v}r?k(r,1,c):r=c}catch(n){k(r||(r=new O),2,n)}var a}(),r}(t,(function(e){if(tn.frozen||tn.destroyed)throw"";var r,i,o,c,a=t[e],f=a[2];return n=[a,u],f.freezeCursor&&R(!0),r=en.speed,i=en.deleteSpeed,o=en.lifeLike,c=(i=null!==i?i:r/3)/2,Z=o?[S(r,r/2),S(i,c)]:[r,i],A((function(){var t;if(null==f?void 0:f.isFirst)return C((t=en).beforeString.apply(t,n))}),(function(){var t;return D((t=en).beforeStep.apply(t,n),(function(){return D(a[0].call(u,a[1],f),(function(){return A((function(){var t,e;if(null===(t=a[2])||void 0===t?void 0:t.isLast)return C((e=en).afterString.apply(e,n))}),(function(){var t;return D((t=en).afterStep.apply(t,n),(function(){an.setMeta(f.id,{executed:!0}),R(!1)}))}))}))}))}))}),(function(){return!1})),(function(t){var e;return tn.completed=!0,D((e=en).afterComplete.apply(e,n),(function(){if(!en.loop)throw"";var n=en.loopDelay;q((function(){return D(j(n),(function(){V()}))}),n.after)}))}))}),E),(function(n){return u}))})),U=function(n){return new Promise((function(t){q((function(){return t()}),n||0)}))},F=function n(t){var e=z(),r=x(t,_,e);return _+=r.numberOfSteps,new Promise((function(t){q(H((function(){return function(n,t,e,r){if(e){var i=r,o=t[(i=i>t.length?t.length:i)-1];(n=o?o.parentNode:n).insertBefore(e,o||null)}}(W,z(),fn,_),A((function(){if(r.isString&&r.canKeepMoving)return C(n(r.numberOfSteps>0?"START":"END"))}),(function(){return t()}))})),Z[0])}))},K=function(n){return new Promise((function(t){q((function(){return L(W,n,fn,_),t()}),Z[0])}))},Q=H((function(n){en=r(en,n)})),Y=H((function(){X?W.value="":z().forEach((function(n){M(n)}))})),G=function n(t){return t=!0===t,new Promise((function(e){q(H((function(){var r=!1,i=z();return i.length&&(X?W.value=W.value.slice(0,-1):M(i[_])),f(W.querySelectorAll("*")).forEac
9h((function(n){if(!n.innerHTML&&"BR"!==n.tagName){for(var t=n;1===t.parentNode.childNodes.length&&t.parentNode.childNodes[0].isEqualNode(t);)t=t.parentNode;M(t)}})),A((function(){if(t&&i.length-1>0)return D(n(!0),(function(){return r=!0,e()}))}),(function(n){return r?n:e()}))})),Z[1])}))};this.break=function(n){return p([K,h(m("BR"))],1,n)},this.delete=function(n,t){var e=T(t);return p([e[0]].concat([].concat(Array(Math.abs(n)||1)).fill().map((function(){return[G,!n,nn]})),[e[1]]),1,t)},this.empty=function(){return p(Y,1,arguments)},this.exec=function(n,t){var e=T(t);return p([e[0],[n,null],e[1]],1,t)},this.move=function(n,t){var e=x(n,_,z()),r=T(t),i=e.isString?n:Math.sign(n);return p([r[0]].concat([].concat(Array(Math.abs(n)||1)).fill().map((function(){return[F,i,nn]})),[r[1]]),1,t)},this.options=function(n){return p([Q,n],1,n)},this.pause=function(n,t){return p([U,n],1,t)},this.type=function(n,t){var e=T(t),r=y(n,en.html),i=[e[0]].concat(c(r,K,nn,!0),[e[1]]);return p(i,1,t)},this.is=function(n){return tn[n]},this.destroy=function(n){n=void 0===n||n,$.forEach((function(n){clearTimeout(n)})),$=[],n&&M(fn),tn.destroyed=!0},this.freeze=function(){tn.frozen=!0},this.unfreeze=function(){tn.frozen=!1,V()},this.reset=function(){for(var n in!this.is("destroyed")&&this.destroy(),an.reset(),_=0,tn)tn[n]=!1;return X?W.value="":W.innerHTML="",this},this.go=function(){return tn.started?this:(I(),en.waitUntilVisible?(function(n,t){new IntersectionObserver((function(e,r){e.forEach((function(e){e.isIntersecting&&(t(),r.unobserve(n))}))}),{threshold:1}).observe(n)}(W,V.bind(this)),this):(V(),this))},this.getQueue=function(){return an},this.getOptions=function(){return en},this.getElement=function(){return W};var J,W="string"==typeof(J=e)?document.querySelector(J):J,X=N(W),Z=[],$=[],_=0,nn={freezeCursor:!0},tn={started:!1,completed:!1,frozen:!1,destroyed:!1},en=r(t,o);en=r(en,{html:!X&&en.html,nextStringDelay:b(en.nextStringDelay),loopDelay:b(en.loopDelay)});var rn,on,un,cn=Math.random().toString().substring(2,9),an=new a([U,en.startDelay]);W.setAttribute("data-typeit-id",cn),g("[data-typeit-id]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}[data-typeit-id]"),en.strings=(un=en.strings,rn=i(un)?un:[un],(on=function(n){return n.innerHTML.replace(/<\!--.*?-->/g,"").trim()}(W))?(W.innerHTML="",en.startDelete?(v(on).forEach((function(n){L(W,n,fn,_)})),an.add([G,!0]),B(1),rn):[on.trim()].concat(rn)):rn);var fn=function(){if(X||!en.cursor)return null;var n=m("span");return n.innerHTML=l(en.cursorChar).innerHTML,n.className="ti-cursor",n.style.cssText="display:inline;".concat(w(W)),n}();en.strings.length&&function(){var n=en.strings.filter((function(n){return!!n}));n.forEach((function(t,e){var r=y(t,en.html);an.add(c(r,K,nn,!0));var i=an.getItems().length;if(e+1!==n.length){if(en.breakLines){var o=h(m("BR"));return an.add([K,o,nn]),void B(i)}an.add(c(r,G,nn)),B(i,t.length)}}))}()}}));
10
11!function(){"use strict";function o(){var o=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==o.__forceSmoothScrollPolyfill__)){var l,e=o.HTMLElement||o.Element,r=468,i={scroll:o.scroll||o.scrollTo,scrollBy:o.scrollBy,elementScroll:e.prototype.scroll||n,scrollIntoView:e.prototype.scrollIntoView},s=o.performance&&o.performance.now?o.performance.now.bind(o.performance):Date.now,c=(l=o.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(l)?1:0);o.scroll=o.scrollTo=function(){void 0!==arguments[0]&&(!0!==f(arguments[0])?h.call(o,t.body,void 0!==arguments[0].left?~~arguments[0].left:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:o.scrollY||o.pageYOffset):i.scroll.call(o,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:o.scrollX||o.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:o.scrollY||o.pageYOffset))},o.scrollBy=function(){void 0!==arguments[0]&&(f(arguments[0])?i.scrollBy.call(o,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):h.call(o,t.body,~~arguments[0].left+(o.scrollX||o.pageXOffset),~~arguments[0].top+(o.scrollY||o.pageYOffset)))},e.prototype.scroll=e.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==f(arguments[0])){var o=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===o?this.scrollLeft:~~o,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.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)}},e.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==f(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.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))},e.prototype.scrollIntoView=function(){if(!0!==f(arguments[0])){var l=function(o){for(;o!==t.body&&!1===(e=p(l=o,"Y")&&a(l,"Y"),r=p(l,"X")&&a(l,"X"),e||r);)o=o.parentNode||o.host;var l,e,r;return o}(this),e=l.getBoundingClientRect(),r=this.getBoundingClientRect();l!==t.body?(h.call(this,l,l.scrollLeft+r.left-e.left,l.scrollTop+r.top-e.top),"fixed"!==o.getComputedStyle(l).position&&o.scrollBy({left:e.left,top:e.top,behavior:"smooth"})):o.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function n(o,t){this.scrollLeft=o,this.scrollTop=t}function f(o){if(null===o||"object"!=typeof o||void 0===o.behavior||"auto"===o.behavior||"instant"===o.behavior)return!0;
11if("object"==typeof o&&"smooth"===o.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+o.behavior+" is not a valid value for enumeration ScrollBehavior.")}function p(o,t){return"Y"===t?o.clientHeight+c<o.scrollHeight:"X"===t?o.clientWidth+c<o.scrollWidth:void 0}function a(t,l){var e=o.getComputedStyle(t,null)["overflow"+l];return"auto"===e||"scroll"===e}function d(t){var l,e,i,c,n=(s()-t.startTime)/r;c=n=n>1?1:n,l=.5*(1-Math.cos(Math.PI*c)),e=t.startX+(t.x-t.startX)*l,i=t.startY+(t.y-t.startY)*l,t.method.call(t.scrollable,e,i),e===t.x&&i===t.y||o.requestAnimationFrame(d.bind(o,t))}function h(l,e,r){var c,f,p,a,h=s();l===t.body?(c=o,f=o.scrollX||o.pageXOffset,p=o.scrollY||o.pageYOffset,a=i.scroll):(c=l,f=l.scrollLeft,p=l.scrollTop,a=n),d({scrollable:c,method:a,startTime:h,startX:f,startY:p,x:e,y:r})}}"object"==typeof exports&&"undefined"!=typeof module?module.exports={polyfill:o}:o()}();
12/**
13 * @popperjs/core v2.4.4 - MIT License
14 */
15
16"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)?e.defaultView:window:e}function r(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return(o(e)?e.ownerDocument:e.document).documentElement}function f(e){return t(s(e)).left+r(e).scrollLeft}function c(e){return n(e).getComputedStyle(e)}function p(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function l(e,o,c){void 0===c&&(c=!1);var l=s(o);e=t(e);var u=i(o),d={scrollLeft:0,scrollTop:0},m={x:0,y:0};return(u||!u&&!c)&&(("body"!==a(o)||p(l))&&(d=o!==n(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:r(o)),i(o)?((m=t(o)).x+=o.clientLeft,m.y+=o.clientTop):l&&(m.x=f(l))),{x:e.left+d.scrollLeft-m.x,y:e.top+d.scrollTop-m.y,width:e.width,height:e.height}}function u(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function d(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||e.host||s(e)}function m(e,t){void 0===t&&(t=[]);var r=function e(t){return 0<=["html","body","#document"].indexOf(a(t))?t.ownerDocument.body:i(t)&&p(t)?t:e(d(t))}(e);e="body"===a(r);var o=n(r);return r=e?[o].concat(o.visualViewport||[],p(r)?r:[]):r,t=t.concat(r),e?t:t.concat(m(d(r)))}function h(e){if(!i(e)||"fixed"===c(e).position)return null;if(e=e.offsetParent){var t=s(e);if("body"===a(e)&&"static"===c(e).position&&"static"!==c(t).position)return t}return e}function g(e){for(var t=n(e),r=h(e);r&&0<=["table","td","th"].indexOf(a(r))&&"static"===c(r).position;)r=h(r);if(r&&"body"===a(r)&&"static"===c(r).position)return t;if(!r)e:{for(e=d(e);i(e)&&0>["html","body"].indexOf(a(e));){if("none"!==(r=c(e)).transform||"none"!==r.perspective||r.willChange&&"auto"!==r.willChange){r=e;break e}e=e.parentNode}r=null}return r||t}function b(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(o){n.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(r){n.has(r)||(r=t.get(r))&&e(r)})),r.push(o)}(e)})),r}function v(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function y(e){return e.split("-")[0]}function O(e,t){var n=!(!t.getRootNode||!t.getRootNode().host);if(e.contains(t))return!0;if(n)do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function x(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function w(e,o){if("viewport"===o){o=n(e);var a=s(e);
16o=o.visualViewport;var p=a.clientWidth;a=a.clientHeight;var l=0,u=0;o&&(p=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=o.offsetLeft,u=o.offsetTop)),e=x(e={width:p,height:a,x:l+f(e),y:u})}else i(o)?((e=t(o)).top+=o.clientTop,e.left+=o.clientLeft,e.bottom=e.top+o.clientHeight,e.right=e.left+o.clientWidth,e.width=o.clientWidth,e.height=o.clientHeight,e.x=e.left,e.y=e.top):(u=s(e),e=s(u),l=r(u),o=u.ownerDocument.body,p=Math.max(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Math.max(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-l.scrollLeft+f(u),l=-l.scrollTop,"rtl"===c(o||e).direction&&(u+=Math.max(e.clientWidth,o?o.clientWidth:0)-p),e=x({width:p,height:a,x:u,y:l}));return e}function j(e,t,n){return t="clippingParents"===t?function(e){var t=m(d(e)),n=0<=["absolute","fixed"].indexOf(c(e).position)&&i(e)?g(e):e;return o(n)?t.filter((function(e){return o(e)&&O(e,n)&&"body"!==a(e)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){return n=w(e,n),t.top=Math.max(n.top,t.top),t.right=Math.min(n.right,t.right),t.bottom=Math.min(n.bottom,t.bottom),t.left=Math.max(n.left,t.left),t}),w(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function M(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function E(e){var t=e.reference,n=e.element,r=(e=e.placement)?y(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(r){case"top":o={x:o,y:t.y-n.height};break;case"bottom":o={x:o,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:i};break;case"left":o={x:t.x-n.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(r=r?M(r):null))switch(i="y"===r?"height":"width",e){case"start":o[r]=Math.floor(o[r])-Math.floor(t[i]/2-n[i]/2);break;case"end":o[r]=Math.floor(o[r])+Math.ceil(t[i]/2-n[i]/2)}return o}function D(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function P(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function k(e,n){void 0===n&&(n={});var r=n;n=void 0===(n=r.placement)?e.placement:n;var i=r.boundary,a=void 0===i?"clippingParents":i,f=void 0===(i=r.rootBoundary)?"viewport":i;i=void 0===(i=r.elementContext)?"popper":i;var c=r.altBoundary,p=void 0!==c&&c;r=D("number"!=typeof(r=void 0===(r=r.padding)?0:r)?r:P(r,q));var l=e.elements.reference;c=e.rects.popper,a=j(o(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||s(e.elements.popper),a,f),p=E({reference:f=t(l),element:c,strategy:"absolute",placement:n}),c=x(Object.assign(Object.assign({},c),p)),f="popper"===i?c:f;
16var u={top:a.top-f.top+r.top,bottom:f.bottom-a.bottom+r.bottom,left:a.left-f.left+r.left,right:f.right-a.right+r.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u}function L(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function B(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?V:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},V),r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,p={state:s,setOptions:function(i){return a(),s.options=Object.assign(Object.assign(Object.assign({},r),s.options),i),s.scrollParents={reference:o(e)?m(e):e.contextElement?m(e.contextElement):[],popper:m(t)},i=function(e){var t=b(e);return N.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign(Object.assign(Object.assign({},n),t),{},{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:p,options:n}),f.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference;if(L(t,e=e.popper))for(s.rects={reference:l(t,g(e),"fixed"===s.options.strategy),popper:u(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var n=s.orderedModifiers[t];e=n.fn;var r=n.options;r=void 0===r?{}:r,n=n.name,"function"==typeof e&&(s=e({state:s,options:r,name:n,instance:p})||s)}}},update:v((function(){return new Promise((function(e){p.forceUpdate(),e(s)}))})),destroy:function(){a(),c=!0}};return L(e,t)?(p.setOptions(i).then((function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p):p}}function W(e){var t,r=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,f=e.position,c=e.gpuAcceleration,p=e.adaptive,l=window.devicePixelRatio||1;e=Math.round(a.x*l)/l||0,l=Math.round(a.y*l)/l||0;var u=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var d,m="left",h="top",b=window;if(p){var v=g(r);v===n(r)&&(v=s(r)),"top"===i&&(h="bottom",l-=v.clientHeight-o.height,l*=c?1:-1),"left"===i&&(m="right",e-=v.clientWidth-o.width,e*=c?1:-1)}return r=Object.assign({position:f},p&&_),c?Object.assign(Object.assign({},r),{},((d={})[h]=a?"0":"",d[m]=u?"0":"",d.transform=2>(b.devicePixelRatio||1)?"translate("+e+"px, "+l+"px)":"translate3d("+e+"px, "+l+"px, 0)",d)):Object.assign(Object.assign({},r),{},((t={})[h]=a?l+"px":"",t[m]=u?e+"px":"",t.transform="",t))}function A(e){return e.replace(/left|right|bottom|top/g,(function(e){return U[e]}))}function H(e){return e.replace(/start|end/g,(function(e){return z[e]}))}function T(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function R(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var q=["top","bottom","right","left"],C=q.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),S=[].concat(q,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),N="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),V={placement:"bottom",modifiers:[],strategy:"absolute"},I={passive:!0},_={top:"auto",right:"auto",bottom:"auto",left:"auto"}
16,U={left:"right",right:"left",bottom:"top",top:"bottom"},z={start:"end",end:"start"},F=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,o=(e=e.options).scroll,i=void 0===o||o,a=void 0===(e=e.resize)||e,s=n(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",r.update,I)})),a&&s.addEventListener("resize",r.update,I),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",r.update,I)})),a&&s.removeEventListener("resize",r.update,I)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=E({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e,n=void 0===(n=n.adaptive)||n,e={placement:y(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),W(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),W(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];i(o)&&a(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(r)&&a(r)&&(Object.assign(r.style,e),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,r=void 0===(e=e.options.offset)?[0,0]:e,o=(e=S.reduce((function(e,n){var o=t.rects,i=y(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof r?r(Object.assign(Object.assign({},o),{},{placement:n})):r;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:o}:{x:o,y:s},e[n]=i,e}),{}))[t.placement],i=o.x;o=o.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=o),t.modifiersData[n]=e}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var r=n.mainAxis;r=void 0===r||r;var o=n.altAxis;o=void 0===o||o;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,c=n.altBoundary,p=n.flipVariations,l=void 0===p||p,u=n.allowedAutoPlacements;p=y(n=t.options.placement),i=i||(p!==n&&l?function(e){if("auto"===y(e))return[];var t=A(e);return[H(e),t,H(t)]}(n):[A(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===y(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,r=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?S:a,f=t.placement.split("-")[1];0===(i=(t=f?i?C:C.filter((function(e){return e.split("-")[1]===f})):q).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var c=i.reduce((function(t,i){return t[i]=k(e,{placement:i,boundary:n,rootBoundary:r,padding:o})[y(i)],t}),{});return Object.keys(c).sort((function(e,t){return c[e]-c[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var m=new Map;p=!0;for(var h=d[0],g=0;g<d.length;g++){var b=d[g],v=y(b),O="start"===b.split("-")[1],x=0<=["top","bottom"].indexOf(v),w=x?"width":"height",j=k(t,{placement:b,boundary:s,rootBoundary:f,altBoundary:c,padding:a});if(O=x?O?"right":"left":O?"bottom":"top",n[w]>i[w]&&(O=A(O)),w=A(O),x=[],r&&x.push(0>=j[v]),o&&x.push(0>=j[O],0>=j[w]),x.every((function(e){return e}))){h=b,p=!1;break}m.set(b,x)}if(p)for(r=function(e){var t=d.find((function(t){if(t=m.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return h=t,"break"},o=l?3:1;0<o&&"break"!==r(o);o--);t.placement!==h&&(t.modifiersData[e]._skip=!0,t.placement=h,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var r=n.mainAxis,o=void 0===r||r;r=void 0!==(r=n.altAxis)&&r;var i=n.tether;i=void 0===i||i;var a=n.tetherOffset,s=void 0===a?0:a;n=k(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),a=y(t.placement);var f=t.placement.split("-")[1],c=!f,p=M(a);a="x"===p?"y":"x";var l=t.modifiersData.popperOffsets,d=t.rects.reference,m=t.rects.popper,h="function"==typeof s?s(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):s;if(s={x:0,y:0}
16,l){if(o){var b="y"===p?"top":"left",v="y"===p?"bottom":"right",O="y"===p?"height":"width";o=l[p];var x=l[p]+n[b],w=l[p]-n[v],j=i?-m[O]/2:0,E="start"===f?d[O]:m[O];f="start"===f?-m[O]:-d[O],m=t.elements.arrow,m=i&&m?u(m):{width:0,height:0};var D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};b=D[b],v=D[v],m=Math.max(0,Math.min(d[O],m[O])),E=c?d[O]/2-j-m-b-h:E-m-b-h,c=c?-d[O]/2+j+m+v+h:f+m+v+h,h=t.elements.arrow&&g(t.elements.arrow),d=t.modifiersData.offset?t.modifiersData.offset[t.placement][p]:0,h=l[p]+E-d-(h?"y"===p?h.clientTop||0:h.clientLeft||0:0),c=l[p]+c-d,i=Math.max(i?Math.min(x,h):x,Math.min(o,i?Math.max(w,c):w)),l[p]=i,s[p]=i-o}r&&(r=l[a],i=Math.max(r+n["x"===p?"top":"left"],Math.min(r,r-n["x"===p?"bottom":"right"])),l[a]=i,s[a]=i-r),t.modifiersData[e]=s}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state;e=e.name;var r=n.elements.arrow,o=n.modifiersData.popperOffsets,i=y(n.placement),a=M(i);if(i=0<=["left","right"].indexOf(i)?"height":"width",r&&o){var s=n.modifiersData[e+"#persistent"].padding,f
16=u(r),c="y"===a?"top":"left",p="y"===a?"bottom":"right",l=n.rects.reference[i]+n.rects.reference[a]-o[a]-n.rects.popper[i];o=o[a]-n.rects.reference[a],l=(r=(r=g(r))?"y"===a?r.clientHeight||0:r.clientWidth||0:0)/2-f[i]/2+(l/2-o/2),i=Math.max(s[c],Math.min(l,r-f[i]-s[p])),n.modifiersData[e]=((t={})[a]=i,t.centerOffset=i-l,t)}},effect:function(e){var t=e.state,n=e.options;e=e.name;var r=n.element;if(r=void 0===r?"[data-popper-arrow]":r,n=void 0===(n=n.padding)?0:n,null!=r){if("string"==typeof r&&!(r=t.elements.popper.querySelector(r)))return;O(t.elements.popper,r)&&(t.elements.arrow=r,t.modifiersData[e+"#persistent"]={padding:D("number"!=typeof n?n:P(n,q))})}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,i=k(t,{elementContext:"reference"}),a=k(t,{altBoundary:!0});n=T(i,n),r=T(a,r,o),o=R(n),a=R(r),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:r,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":o,"data-popper-escaped":a})}}],X=B({defaultModifiers:F});e.createPopper=X,e.defaultModifiers=F,e.detectOverflow=k,e.popperGenerator=B,Object.defineProperty(e,"__esModule",{value:!0})}));
17;
18
19window.mrp_open_new_window = function( url, width, height, name ) {
20
21	function optimalWindowHeight( desired )
22	{
23		if( desired && desired < screen.availHeight ) {
24			return desired;
25		}
26
27		var h = 500;
28		if( screen.availHeight > 600 ) {
29			h = 700;
30		}
31		if( screen.availHeight > 800 ) {
32			h = 800;
33		}
34		return h;
35	}
36
37	if( !height ) {
38		height = optimalWindowHeight();
39	}
40
41    var left = parseInt((screen.availWidth/2) - (width/2));
42    var top = parseInt((screen.availHeight/2) - (height/2));
43
44	if( !name ) {
45		name = "" + parseInt( ( Math.random() * 100000 ) );
46	}
47	var w = window.open( url, name, "width=" + width + ",height=" + height +
48		",scrollbars=1,location=1,left=" + left + ",top=" + top + ",screenX=" + left + ",screenY=" + top );
49
50	if( w == null ) {
51		alert( "Please enable popups in your browser" );
52	}
53	else {
54		w.focus();
55	}
56
57	return w;
58};
59
60// DOMParser patch for IOS Safari
61(function(DOMParser) {
62	"use strict";
63
64	var proto = DOMParser.prototype,
65	nativeParse = proto.parseFromString;
66
67	// Firefox/Opera/IE throw errors on unsupported types
68	try {
69		// WebKit returns null on unsupported types
70		if ((new DOMParser()).parseFromString("", "text/html")) {
71			// text/html parsing is natively supported
72			return;
73		}
74	} catch (ex) {}
75
76	proto.parseFromString = function(markup, type) {
77		if (/^\s*text\/html\s*(?:;|$)/i.test(type)) {
78			var doc = document.implementation.createHTMLDocument("");
79				if (markup.toLowerCase().indexOf('<!doctype') > -1) {
80					doc.documentElement.innerHTML = markup;
81				} else {
82					doc.body.innerHTML = markup;
83				}
84			return doc;
85		} else {
86			return nativeParse.apply(this, arguments);
87		}
88	};
89}(DOMParser));
90
91function get_if_exist(obj){
92    if( !obj ) {
93        return undefined;
94    }
95    return arguments.length==1 || (obj[arguments[1]] && get_if_exist.apply(this,[obj[arguments[1]]].concat([].slice.call(arguments,2))));
96}
97
98const _G = {
99    reinitHandlers: [],
100    isMobile: () => /iPhone|iPad|iPod|Android/i.test(navigator.userAgent),
101}
102
103;(function() {
104    _G.visibilityService = (function() {
105
106        const options = {
107            threshold: [0,0.1,0.2,0.4,0.6,0.8]
108        }
109
110        const observer = new IntersectionObserver( entries => {
111            (entries || []).forEach( entry => {
112                if( typeof entry.target.__visibility === 'function' ) {
113
114                    const isLikelyMobile = window.innerWidth < window.innerHeight
115                    const defaultVisibilityRatio = isLikelyMobile ? 0.01 : 0.2;
116
117                    const ratio = getComputedStyle(entry.target)
118                            .getPropertyValue('--visibility-ratio') || defaultVisibilityRatio;
119
120                    if( entry.intersectionRatio >= ratio /* && !document.querySelector('html').classList.contains('editing') */ ) {
121                        entry.target.__visibility(entry)
122                    }
123                }
124            })
125        }, options )
126
127        const observe = ( el, callback ) => {
128            el.__visibility = callback
129            observer.observe(el)
130        }
131
132        const unobserve = ( el ) => {
133            observer.unobserve(el)
134        }
135
136        return {
137            observe,
138            unobserve,
139        }
140    })()
141})()
142
143
144function _initBlocks() {
145    for (let m of (window.block_code_modules || [])) {
146        try {
147            m && m.init && m.init(m.id, m)
148        } catch (err) {
149            console.log('Error initing module', m.id, err)
150        }
151    }
152}
153
154function _destroyBlocks() {
155    for (let m of (window.block_code_modules || [])) {
156        try {
157            m && m.destroy && m.destroy()
158        } catch (err) {
159            console.log('Error destroying module', m.id, err)
160        }
161    }
162}
163
164_G.parallaxService = (function () {
165
166    const BASE_SPEED = 0.7
167
168    let stopped = false
169    const elements = []
170    const observer = new IntersectionObserver((entries) => {
171        entries.forEach(entry => {
172            entry.target._parallaxVisible = entry.isIntersecting
173            recalc(entry.target)
174        })
175    }, {
176        // blank options
177    })
178
179    window.addEventListener('scroll', (ev) => {
180        requestAnimationFrame(() => {
181            recalcAll()
182        })
183
184    }, { passive: true })
185
186    const calcShift = (elem) => {
187        /*
188        * calculates a number -1..0..1 where 0 is dead center of the element in viewport
189        * -1 is when the element touches with its top the top edge of the viewport
190        * 1 is when the element touches with its bottom the bottom edge of the viewport
191        *
192        * */
193        const rect = elem.parentElement.getBoundingClientRect()
194        const bgRect = elem.getBoundingClientRect()
195        const elemFreeHeight = window.innerHeight - rect.height
196        const bgFreeHeight = window.innerHeight - bgRect.height
197        const shapeCenterY = rect.top + (rect.height / 2)
198        const viewportCenterY = window.innerHeight / 2
199        const delta = viewportCenterY - shapeCenterY
200
201        // adjusting speed is necessary for containers that are shorter than
202        // viewport height and have bg element with some spare space top and
203        // bottom to allow for differential scroll speeds. If these conditions
204        // are not met, we fall back to the base speed. Otherwise, we calculate the
205        // ideal speed based on the amount of spare image space and size of
206        // container. The idea is that the top of bg image reach the top
207        // of the viewport at exactly the same time as the container to avoid exposing
208        // any areas uncovered by the image.
209        const shouldAdjustSpeed = bgRect.height < window.innerHeight
210            && rect.height < window.innerHeight
211            && bgRect.height >= rect.height
212
213        const baseSpeed = shouldAdjustSpeed
214            ? bgFreeHeight / elemFreeHeight
215            : BASE_SPEED
216
217        const translateValue = ( 1 - baseSpeed ) * delta
218
219        // console.log( delta, acceleration, adjustedRatio,  translateValue )
220
221        return translateValue.toFixed(4)
222    }
223
224    const recalcAll = () => {
225        if( stopped ) {
226            return
227        }
228        elements.forEach(elem => {
229            recalc(elem)
230        })
231    }
232
233    const recalc = (elem) => {
234        if( stopped ) {
235            return
236        }
237        if (elem._parallaxVisible) {
238            elem.style.transform = 'translate(0,' + calcShift(elem) + 'px)' +
239                (elem.classList.contains('blur') ? ' scale(1.1)' : '' )
240        }
241    }
242
243    const add = (elem) => {
244        if (!elem) {
245            return
246        }
247        elem._parallaxVisible = false
248        elements.push(elem)
249        observer.observe(elem)
250        recalc(elem)
251    }
252
253    const remove = (elem) => {
254        const index = elements.indexOf(elem)
255        if (index !== -1) {
256            elements.splice(index, 1)
257        }
258        observer.unobserve(elem)
259    }
260
261    const setStopped = (flag) => {
262        stopped = flag
263    }
264
265    const refresh = () => {
266        recalcAll()
267    }
268
269    const cleanup = () => {
270        // cleanup potentially stale elements, i.e. detached from DOM
271        // may happen after a block was re-inserted in the editor
272        elements.slice().filter(elem => {
273            if (!document.body.contains(elem)) {
274                remove(elem)
275            }
276        })
277    }
278
279    return {
280        setStopped,
281        refresh,
282        add,
283        remove,
284        cleanup,
285    }
286})()
287
288_G.fxService = (function() {
289
290    let queue = []
291    let revealLaunched = null
292
293    function cleanupFastScrolled() {
294        // const snapshot = queue.map( el => {
295        //     let rect = el.getBoundingClientRect()
296        //     let top = rect.top
297        //     let bottom = rect.bottom
298        //     return {
299        //         el,
300        //         top,
301        //         bottom,
302        //         scrolledOutOfView: bottom < 0,
303        //     }
304        // })
305        // console.log( 'REVEAL', snapshot )
306        while(queue.length > 0) {
307            let el = queue.at(0)
308            if( !el ) {
309                break;
310            }
311            let rect = el.getBoundingClientRect()
312            if( rect.bottom < 0 ) {
313                queue.shift().classList.remove('fx')
314            }
315            else {
316                break;
317            }
318        }
319    }
320
321    function revealStaggered() {
322        if( revealLaunched !== null ) {
323            return
324        }
325        if( queue.length === 0 ) {
326            return
327        }
328        revealLaunched = setInterval( () => {
329            if( queue.length === 0 ) {
330                clearInterval( revealLaunched )
331                revealLaunched = null
332                return
333            }
334            cleanupFastScrolled()
335            queue.shift().classList.remove( 'fx' )
336        }, 100 )
337    }
338
339    function initElem( el ) {
340        if( !el || el.__fx_inited ) {
341            return
342        }
343
344        if( el.closest('.managed-fx')) {
345            return
346        }
347
348        el.__fx_inited = true
349        _G.visibilityService.observe( el, result => {
350
351            if( !el.classList.contains('fx')) {
352                return // probably already revealed
353            }
354            queue.push(el)
355            revealStaggered()
356            _G.visibilityService.unobserve(el)
357        })
358    }
359
360    function init() {
361        document.querySelectorAll('.fx' ).forEach( initElem )
362    }
363
364    return {
365        init,
366        initElem
367    }
368})()
369
370
371document.addEventListener('DOMContentLoaded', () => {
372
373    if( window.customOnLoads ) {
374        window.customOnLoads.forEach( f => {
375            try {
376                if( typeof f === 'function' ) {
377                    f()
378                }
379            }
380            catch( ex ) {
381                console.error( 'ERROR: failed to run customOnLoad: ', ex );
382            }
383        })
384    }
385
386    function initVideo( v ) {
387        if( v.__videoInited ) {
388            return
389        }
390        v.__videoInited = true
391        v.addEventListener('pause', () => {
392            v.__paused = true
393        })
394        _G.visibilityService.observe(v, result => {
395            if( result.isIntersecting ) {
396                if( v.__paused ) {
397                    return
398                }
399                v.muted = true
400                v.play()
401                if(v.getAttribute("data-speed")) {
402                    v.playbackRate = parseFloat(v.getAttribute("data-speed"))
403                }
404                // if( document.querySelector('html').classList.contains('editing') ) {
405                    //v.pause()
406                // }
407            }
408        })
409    }
410
411    _G.fxService.init()
412    _G.reinitHandlers.push( id => {
413        document.getElementById(id).querySelectorAll('.fx').forEach( el => {
414            _G.fxService.initElem(el)
415        })
416        document.querySelectorAll('video[data-autoplay="true"]').forEach(initVideo )
417    })
418
419
420    document.querySelectorAll('.with-scroll-parallax').forEach(elem => {
421        _G.parallaxService.add(elem)
422    })
423    document.querySelectorAll( '.with-smart-bg.with-bg-video video' ).forEach(( v => {
424        v.muted = true
425        v.play()
426    }))
427
428    document.querySelectorAll('video.video[data-autoplay="true"]').forEach(initVideo )
429
430    document.addEventListener( 'editor.on', () => {
431    })
432
433    _G.quickMessage = ( msg, options={} ) => {
434        const m = document.createElement('div')
435        m.classList.add('quick-message')
436        if( options.error ) {
437            m.classList.add( 'error' )
438        }
439        m.style.opacity = '0'
440        m.innerText = msg
441        document.body.appendChild( m )
442        setTimeout( () => {
443            m.style.opacity = '1'
444        }, 10 )
445        setTimeout( () => {
446            m.style.opacity = '0'
447            m.addEventListener( 'transitionend', () => {
448                m.remove()
449            },{once:true})
450        }, 3000 )
451        m.addEventListener('click', ev => {
452            m.style.opacity = '0'
453            m.addEventListener( 'transitionend', () => {
454                m.remove()
455            },{once:true})
456        }, {once: true})
457    }
458
459    _G.applyRipple = function( event, button  ) {
460
461        const circle = document.createElement("span")
462        const diameter = Math.max(button.clientWidth, button.clientHeight)
463        const radius = diameter / 2;
464
465        circle.style.width = circle.style.height = `${diameter}px`
466        const rect = button.getBoundingClientRect()
467        circle.style.left = `${event.clientX - (rect.left + radius)}px`
468        circle.style.top = `${event.clientY - (rect.top + radius)}px`
469        circle.classList.add("ripple")
470
471        const ripple = button.getElementsByClassName("ripple")[0]
472        if (ripple) {
473          ripple.remove()
474        }
475
476        button.appendChild(circle)
477
478        circle.addEventListener( 'animationend', () => {
479            circle.remove()
480        }, { once: true })
481    }
482
483    _G.createFragment = htmlStr => {
484        var frag = document.createDocumentFragment(), temp = document.createElement('div');
485        temp.innerHTML = htmlStr;
486        while (temp.firstChild) {
487            frag.appendChild(temp.firstChild);
488        }
489        return frag;
490    }
491
492    function scrollToBlock( id ) {
493        console.log( 'will scroll to ', id )
494        const elem = document.querySelector(id)
495        if( elem ) {
496            elem.scrollIntoView({
497                behavior: 'smooth',
498                block: 'start',
499                inline: 'nearest',
500            })
501            history.pushState({}, '', id)
502            // window.location.hash = id
503        }
504    }
505
506    document.addEventListener( 'click', event => {
507        if( event.target && ( event.target.matches( '.block-layout .button' ) || event.target.matches( '.block-layout .button *' ))) {
508            const button = event.target.closest('.button')
509            if( button ) {
510                _G.applyRipple(event, button )
511                if( button.tagName === 'BUTTON' ) {
512                    const form = button.closest('form')
513                    if( form && form.getAttribute('action') &&
514                        form.getAttribute('action').indexOf('#bid_') === 0 ) {
515                        event.stopPropagation()
516                        event.preventDefault()
517                        scrollToBlock(form.getAttribute('action'))
518                    }
519                }
520            }
521        }
522        if( event.target && ( event.target.matches( '.block-layout a' ) || event.target.matches('.block-layout a *'))) {
523            const link = event.target.closest('a')
524            if( link && link.getAttribute('href') && link.getAttribute('href').indexOf('#bid_') === 0 ) {
525                event.stopPropagation()
526                event.preventDefault()
527                scrollToBlock(link.getAttribute('href'))
528            }
529        }
530    })
531})
532
533function debounce(func, wait, immediate) {
534	var timeout;
535	return function() {
536		var context = this, args = arguments;
537		var later = function() {
538			timeout = null;
539			if (!immediate) func.apply(context, args);
540		};
541		var callNow = immediate && !timeout;
542		clearTimeout(timeout);
543		timeout = setTimeout(later, wait);
544		if (callNow) func.apply(context, args);
545	};
546}
547
548function openTranslate( toLang ) {
549    toLang = toLang || "en";
550    window.open("https://" + window.location.hostname.replaceAll("-","--")
551        .replaceAll(".","-") + ".translate.goog" + window.location.pathname +
552        "?_x_tr_sl=auto&_x_tr_tl=" + toLang + "&_x_tr_hl=en&_x_tr_pto=wapp' target='_blank'>Translate Page")
553}
554
555function mrp_basic_auth_logout( safelocation ) {
556    const c = '';
557    var a, b = "You should be logged out now.";
558    try {
559        a = document.execCommand("ClearAuthenticationCache", 'false')
560    } catch (d) {
561    }
562    a || ((a = window.XMLHttpRequest ? new window.XMLHttpRequest : window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : void 0) ?
563        (a.open("HEAD", c || location.href, !0, "logout", (new Date).getTime().toString()), a.send(""), a = 1) : a = void 0);
564    a || (b = "Your browser is too old or too weird to support log out functionality. Close all windows and restart the browser.");
565    // alert(b)
566    document.body.innerHTML = '';
567    setTimeout(() => {
568        const url = window.location.href;
569        const fake = btoa('logout:logout')
570        // history.replaceState({}, '', url + '?t' + Date.now() );
571        window.location = safelocation || 'https://private-office.myrealpage.com'
572        // fetch( url, {
573        //     headers: {
574        //         'Authorization': 'Basic fake'
575        //     }
576        // })
577        // .finally( () => {
578        //
579        // });
580    }, 1000 )
581}
582
583/* ==== INCLUDE: /js/responsive-containers-mod.js ==== */
584
585/*
586MIT Licensed.
587Copyright (c) 2011 Andy Hume (http://andyhume.net, [email protected]).
588 
589Permission is hereby granted, free of charge, to any person obtaining a copy
590of this software and associated documentation files (the "Software"), to deal
591in the Software without restriction, including without limitation the rights
592to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
593copies of the Software, and to permit persons to whom the Software is
594furnished to do so, subject to the following conditions:
595
596The above copyright notice and this permission notice shall be included in
597all copies or substantial portions of the Software.
598
599THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
600IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
601FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
602AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
603LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
604OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
605THE SOFTWARE.
606*/
607
608(function(win) {
609	
610	if( window.responsiveContainersLoaded ) {
611		return;
612	}
613	
614	window.responsiveContainersLoaded = true;
615
616    var doc = win.document,
617        els = [],
618        check_data_attributes = true,
619        loaded = false;
620    
621    
622	if( window.mrp_v2_ready ) {
623		window.mrp_v2_ready( function() {
624			_gmrp.$( document ).on( "mrp.responsify.containers mrp.popup.close", 
625            	function(e) { 
626            		//console.log( "mrp.ajax-idx.show" );
627            		for( var i=0; i<els.length; ++i ) {
628            			delete els[i].cq_rules;
629            		}
630            		els = []; 
631            		//var b = new Date().getTime();
632            		findContainerQueries();             		
633            		applyRules(); 
634            		//console.log( ( new Date().getTime() - b  ) + "ms" );
635            	}
636            );
637		});
638	}
639
640    function add(elements, query, value, class_name) {
641        var split_value = /([0-9]*)(px|em)/.exec(value);
642        for (var i = 0, j = elements.length; i<j; ++i) {
643            var el = elements[i];
644            el.cq_rules = el.cq_rules || [];
645            el.cq_rules.push([null, query, split_value[1], split_value[2], class_name]);
646            els.push(el);
647        }
648        if (loaded) { // if we're not 'loaded' yet, domLoaded will run applyRules() for us.
649            applyRules();
650        }
651    }
652
653    function ignoreDataAttributes() {
654        check_data_attributes = false;
655    }
656
657    function findContainerQueries() {
658        if (check_data_attributes) {
659            // Find data-squery attributes.
660            var nodes = [];
661            if (doc.querySelectorAll) {
662                var nodes = doc.querySelectorAll("[data-squery]");
663            } else {
664                // If no query selectors.
665                var e = doc.getElementsByTagName("*");
666                for (var i = 0, j = e.length; i<j; ++i) {
667                    if (e[i].getAttribute("data-squery")) {
668                        nodes.push(e[i]);
669                    }
670                }
671            }
672            // Parse the data-squery attribute and store resulting rules on the element.
673            for (var i = 0, j = nodes.length; i<j; ++i) {
674                var el = nodes[i];
675                if( el.cq_rules && el.cq_rules.length > 0 ) {
676                	continue;
677                }
678                var cq_rules = [];
679                var raw_rules = el.getAttribute("data-squery").split(" ");
680                for (var k = 0, l = raw_rules.length; k<l; ++k) {
681                    var rule = /(.*):([0-9]*)(px|em)=(.*)/.exec(raw_rules[k]);
682                    if (rule) {
683                        cq_rules.push(rule);
684                    }
685                }
686                el.cq_rules = el.cq_rules || [];
687                el.cq_rules = el.cq_rules.concat(cq_rules);
688                els.push(el);
689            }
690        }
691    }
692
693    function applyRules() {
694        // For each element, apply the rules to the class name.
695    	console.log( "els:", els.length );
696        for (var i = 0, j = els.length; i<j; ++i) {
697            el = els[i];
698            console.log( "els.cq_rules:",el.cq_rules.length );
699            for (var k = 0, l = el.cq_rules.length; k<l; ++k) {
700                var rule = el.cq_rules[k];
701
702                // Get a target width value in pixels.
703                var width = parseInt(rule[2]);
704                if (rule[3] === "em") {
705                    width = emsToPixels(parseFloat(rule[2]), el);
706                }
707
708                // Calculate the width of the target without the class added.
709                var defaultWidth = getDefaultWidth(el, rule[4]);
710                // Test current width against target width and add/remove class values.
711                if ( compareFunction[rule[1]](defaultWidth, width) ) {
712                	window._gmrp && _gmrp.$ && _gmrp.$( document ).trigger( "mrp.resp.container.change", "+" + rule[4] );
713                    if (el.className.indexOf(rule[4]) < 0) {
714                        el.className += " " + rule[4];
715                    }
716                } else {
717                	window._gmrp && _gmrp.$ && _gmrp.$( document ).trigger( "mrp.resp.container.change", "-" + rule[4] );
718                    var class_name = el.className.replace(new RegExp('(^| )'+rule[4]+'( |$)'), '$1'); 
719                    class_name = class_name.replace(/ $/, '');
720                    el.className = class_name;
721                }
722            }
723        }
724    }
725
726    var compareFunction = {
727        "min-width": function(a, b) {
728            return a > b;
729        },
730        "max-width": function(a, b) {
731            return a < b;
732        }
733    }
734
735    function contentReady() {
736        if (loaded) {
737            return;
738        }
739        loaded = true;
740        findContainerQueries();
741        applyRules();
742        if (win.addEventListener) {
743            win.addEventListener("resize", applyRules, false);
744            
745        }
746        // Allow for resizing text after the page has loaded.
747        var current_em = emsToPixels(1, doc.body);
748        win.setInterval(function() {
749            var new_em = emsToPixels(1, doc.body);
750            if (new_em !== current_em) {
751                applyRules();
752                current_em = new_em;
753            }
754        }, 2000);
755    }
756
757    function memoize( f ) {
758        return function () {
759            var args = Array.prototype.slice.call(arguments);
760            f.memoize = f.memoize || {};
761            return (args in f.memoize) ? f.memoize[args] : f.memoize[args] = f.apply(this, args);
762        };
763    }
764
765    var emsToPixels = memoize(function(em, scope) {
766        var test = doc.createElement("div");
767        test.style.fontSize = "1em";
768        test.style.margin = "0";
769        test.style.padding = "0";
770        test.style.border = "none";
771        test.style.width = "1em";
772        scope.appendChild(test);
773        var val = test.offsetWidth;
774        scope.removeChild(test);
775        return Math.round(val * em);
776    });
777
778    var getDefaultWidth = function(el, class_name) {
779    	if( true ) {
780    		// we don't need to be fancy, simple width is ok, all the resp containers are flexible
781    		return el.offsetWidth;
782    	}
783    	//console.log( "hit width", el );
784        var test = el.cloneNode(true);
785        test.className = (" " + test.className + " ").replace(" " + class_name + " ", " ");
786        test.style.height = 0;
787        test.style.visibility = "hidden";
788        test.style.overflow = "hidden";
789        test.style.clear = "both";
790        var parent = el.parentNode;
791        parent.insertBefore(test, el);
792        var val = test.offsetWidth;
793        parent.removeChild(test);
794        return val;
795    }
796    
797    if( window.addEventListener ) {
798    	console.log( "installing mrpRescanResponsifyContainers listener" );
799    	window.addEventListener("mrpRescanResponsifyContainers", function() {
800    		console.log( "mrpRescanResponsifyContainers" );
801    		findContainerQueries();
802    		applyRules();
803    	}, false);
804    }
805    else if (window.attachEvent) {
806    	window.attachEvent("mrpRescanResponsifyContainers", function() {
807    		findContainerQueries();
808    		applyRules();
809    	});
810    }
811    
812	if( /loaded|complete|interactive/.test(doc.readyState) ) {
813		contentReady();
814	}
815	else if (doc.addEventListener) {
816        doc.addEventListener("DOMContentLoaded", contentReady, false);
817        // or
818        win.addEventListener("load", contentReady, false);
819    }
820    // If old IE
821    else if (doc.attachEvent) {
822        doc.attachEvent("onreadystatechange", contentReady);
823        // or
824        win.attachEvent("onload", contentReady);
825    }
826
827
828    win["SelectorQueries"] = {
829        "add": add,
830        "ignoreDataAttributes": ignoreDataAttributes
831    }
832
833})(this);
834
835
836
837/* ==== INCLUDE: /js/blocks/menu200c.js ==== */
838
839document.addEventListener( 'DOMContentLoaded', ev => {
840
841    document.body.addEventListener( 'mouseover', ev => {
842
843        if( document.querySelector('html').classList.contains('editing')) {
844            return
845        }
846        if( !ev.target.matches( '.hmenu2 li.has-submenu, .hmenu2 li.has-submenu > *' ) ) {
847            return
848        }
849        const el = ev.target.closest( 'li' )
850        ev.preventDefault()
851        ev.stopPropagation()
852
853        document.querySelectorAll( '.hmenu2 li.open' ).forEach( open => {
854            if( open.contains(el) ) {
855                return
856            }
857            open.classList.remove('open')
858            open.classList.remove('visible')
859        })
860        if( el.classList.contains('open')) {
861            // toggle
862            el.classList.remove('open');
863            el.classList.remove('visible');
864            return;
865        }
866        // open -> does display: block which acquires dimension for popper
867        el.classList.add( 'open' )
868        setTimeout( () => {
869            // then we fade it in
870            el.classList.add( 'visible' )
871        }, 100 )
872
873        if( el.__popper ) {
874            el.__popper.update()
875            return
876        }
877
878        console.log( 'placement', el.closest('ul' ).classList.contains('mrp-menu-level-0') ? 'bottom-start' : 'right-start' )
879
880        el.__popper = Popper.createPopper( el, el.querySelector( 'ul'), {
881            placement: el.closest('ul' ).classList.contains('mrp-menu-level-0') ? 'bottom-start' : 'right-start',
882        })
883    })
884
885})
886
887
888/*!
889 * Mmenu Light
890 * mmenujs.com/mmenu-light
891 *
892 * Copyright (c) Fred Heusschen
893 * www.frebsite.nl
894 *
895 * License: CC-BY-4.0
896 * http://creativecommons.org/licenses/by/4.0/
897 *
898 * MODIFIED with new class names
899 */
900
901!function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var i=function(){function t(t){var e=this;this.listener=function(t){(t.matches?e.matchFns:e.unmatchFns).forEac
901h((function(t){t()}))},this.toggler=window.matchMedia(t),this.toggler.addListener(this.listener),this.matchFns=[],this.unmatchFns=[]}return t.prototype.add=function(t,e){this.matchFns.push(t),this.unmatchFns.push(e),(this.toggler.matches?t:e)()},t}(),s=function(t){return Array.prototype.slice.call(t)},o=function(t,e){return s((e||document).querySelectorAll(t))},r=("ontouchstart"in window||navigator.msMaxTouchPoints,navigator.userAgent.indexOf("MSIE")>-1||navigator.appVersion.indexOf("Trident/")>-1),a="mm2-spn",c=function(){function t(t,e,n,i,s){this.node=t,this.title=e,this.slidingSubmenus=i,this.selectedClass=n,this.node.classList.add(a),r&&(this.slidingSubmenus=!1),this.node.classList.add(a+"--"+s),this.node.classList.add(a+"--"+(this.slidingSubmenus?"navbar":"vertical")),this._setSelectedl(),this._initAnchors()}return Object.defineProperty(t.prototype,"prefix",{get:function(){return a},enumerable:!1,configurable:!0}),t.prototype.openPanel=function(t){var e=t.parentElement;if(this.slidingSubmenus){var n=t.dataset.mmSpnTitle;e===this.node?this.node.classList.add(a+"--main"):(this.node.classList.remove(a+"--main"),n||s(e.children).forEach((function(t){t.matches("a, span")&&(n=t.textContent)}))),n||(n=this.title),this.node.dataset.mmSpnTitle=n,o(".mm2-spn--open",this.node).forEach((function(t){t.classList.remove(a+"--open"),t.classList.remove(a+"--parent")})),t.classList.add(a+"--open"),t.classList.remove(a+"--parent");for(var i=t.parentElement.closest("ul");i;)i.classList.add(a+"--open"),i.classList.add(a+"--parent"),i=i.parentElement.closest("ul")}else{var r=t.matches(".mm2-spn--open");r?e.classList.remove(a+"--open-parent"):e.classList.add(a+"--open-parent"),t.classList[r?"remove":"add"](a+"--open");for(var c=t.parentElement.closest("ul");c;)c.classList.add(a+"--open"),c=c.parentElement.closest("ul")}},t.prototype._setSelectedl=function(){var t=o("."+this.selectedClass,this.node),e=t[t.length-1],n=null;e&&(n=e.closest("ul")),n||(n=this.node.querySelector("ul")),this.openPanel(n)},t.prototype._initAnchors=function(){var t=this;this.node.addEventListener("click",(function(e){var n=e.target,i=!1;(i=(i=(i=i||function(t){return!!t.matches("a")}(n))||function(e){var n;return!!(n=e.closest("span")?e.parentElement:!!e.closest("li")&&e)&&(s(n.children).forEach((function(e){e.matches("ul")&&t.openPanel(e)})),!0)}(n))||function(e){var n=o(".mm2-spn--open",e),i=n[n.length-1];if(i){var s=i.parentElement.closest("ul");
901if(s)return t.openPanel(s),!0}return!1}(n))&&e.stopImmediatePropagation()}))},t}(),d=function(){function t(t,e){var n=this;void 0===t&&(t=null),this.wrapper=document.createElement("div"),this.wrapper.classList.add("mm2-ocd"),this.wrapper.classList.add("mm2-ocd--"+e),this.content=document.createElement("div"),this.content.classList.add("mm2-ocd__content"),this.wrapper.append(this.content),this.backdrop=document.createElement("div"),this.backdrop.classList.add("mm2-ocd__backdrop"),this.wrapper.append(this.backdrop),document.body.append(this.wrapper),t&&this.content.append(t);var i=function(t){n.close(),t.stopImmediatePropagation()};this.backdrop.addEventListener("touchstart",i,{passive:!0}),this.backdrop.addEventListener("mousedown",i,{passive:!0})}return Object.defineProperty(t.prototype,"prefix",{get:function(){return"mm2-ocd"},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.wrapper.classList.add("mm2-ocd--open"),document.querySelector('html').classList.add("mm2-ocd-opened")},t.prototype.close=function(){this.wrapper.classList.remove("mm2-ocd--open"),document.querySelector('html').classList.remove("mm2-ocd-opened")},t}(),l=function(){function t(t,e){void 0===e&&(e="all"),this.menu=t,this.toggler=new i(e)}return t.prototype.navigation=function(t){var e=this;if(!this.navigator){var n=(t=t||{}).title,i=void 0===n?"Menu":n,s=t.selectedClass,o=void 0===s?"Selected":s,r=t.slidingSubmenus,a=void 0===r||r,d=t.theme,l=void 0===d?"light":d;this.navigator=new c(this.menu,i,o,a,l),this.toggler.add((function(){return e.menu.classList.add(e.navigator.prefix)}),(function(){return e.menu.classList.remove(e.navigator.prefix)}))}return this.navigator},t.prototype.offcanvas=function(t){var e=this;if(!this.drawer){var n=(t=t||{}).position,i=void 0===n?"left":n;this.drawer=new d(null,i);var s=document.createComment("original menu location");this.menu.after(s),this.toggler.add((function(){e.drawer.content.append(e.menu)}),(function(){e.drawer.close(),s.after(e.menu)}))}return this.drawer},t}();e.default=l;window.MmenuLight2=l}]);
902
903;(function () {
904
905    const menus = {}
906
907    const init = (id) => {
908        // re-entrant
909
910        if( id ) {
911            // re-init
912            // first destroy all existing (after apply in-place changes) constructs
913            document.querySelectorAll( '[data-rel="' + id + '"]').forEach( existing => {
914                // existing.remove()
915            })
916        }
917
918        document.querySelectorAll( '.vmenu200c').forEach( (el, index) => {
919            if( el.classList.contains('inited')) {
920                return
921            }
922            el.classList.add('inited')
923
924            const blockId = el.closest( '.block-layout' ).getAttribute('id')
925
926
927
928            const menu = new MmenuLight2( el, 'all' )
929            const navigation = menu.navigation({
930				selected: 'selected',
931				slidingSubmenus: 'true' === el.getAttribute('data-slide'),
932				theme: 'true' === el.getAttribute('data-dark') ? 'dark' : 'light',
933				title: ''
934			})
935
936			const drawer = menu.offcanvas({
937				position: 'right' === el.getAttribute('data-position') ? 'right' : 'left',
938			})
939
940			drawer.wrapper.setAttribute( 'data-rel', blockId )
941
942			el.classList.remove('initial')
943
944            // if id was given to us in init(id), then we are reiniting
945            if( id && index === 0 ) {
946                menus[blockId] = []
947            }
948            if( !menus[blockId] ) {
949                // array for potentially multiple per block
950                menus[blockId] = []
951            }
952            menus[blockId].push({ navigation, drawer })
953        })
954    }
955
956    document.addEventListener('DOMContentLoaded', () => {
957        init()
958        _G.reinitHandlers.push(init)
959
960        document.addEventListener('editor.on', () => {
961            Reflect.ownKeys(menus).forEach( m => {
962                const handlers = menus[m]
963                handlers.forEach( h => {
964                    try {
965                        h.drawer.close()
966                    }
967                    catch( e ) {}
968                })
969            })
970        })
971
972        document.addEventListener('keydown', ev => {
973            if( ev.key === 'Escape' ) {
974                Reflect.ownKeys(menus).forEach( m => {
975                    const handlers = menus[m]
976                    handlers.forEach( h => {
977                        try {
978                            h.drawer.close()
979                        }
980                        catch( e ) {}
981                    })
982                })
983            }
984        })
985
986        window.addEventListener('hashchange', ev => {
987            Reflect.ownKeys(menus).forEach( m => {
988                const handlers = menus[m]
989                handlers.forEach( h => {
990                    try {
991                        h.drawer.close()
992                    }
993                    catch( e ) {}
994                })
995            })
996        })
997
998        document.addEventListener('click', ev => {
999            if( ev.target.className === 'close-button' ) {
1000                Reflect.ownKeys(menus).forEach( m => {
1001                    const handlers = menus[m]
1002                    handlers.forEach( h => {
1003                        try {
1004                            h.drawer.close()
1005                        }
1006                        catch( e ) {}
1007                    })
1008                })
1009            }
1010        })
1011
1012        document.addEventListener('click', ev => {
1013            if( ev.target && ev.target &&
1014                ev.target.closest('.vmenu-opener2')) {
1015
1016                if( document.querySelector('html').classList.contains('editing')) {
1017                    return
1018                }
1019                const blockId = ev.target.closest('.block-layout').getAttribute('id')
1020                const index = parseInt(ev.target.closest('.vmenu-opener2').getAttribute( 'data-index')) || 0
1021                const handlers = menus[blockId]
1022                if( Array.isArray(handlers) && handlers[index]) {
1023                    handlers[index].drawer.open()
1024                    if( handlers[index].navigation.slidingSubmenus ) {
1025                        handlers[index].navigation.openPanel(handlers[index].navigation.node.querySelector('ul'))
1026                    }
1027                    handlers[index].drawer.content.querySelector('.vmenu200c').focus()
1028                }
1029            }
1030        })
1031    })
1032})()
1033
1034
1035
1036document.addEventListener( 'DOMContentLoaded', function() {
1037
1038    function initBlock(id) {
1039        const block = document.getElementById(id)
1040        if( block.querySelector('.fixed-menu')) {
1041            init( block.querySelector( '.fixed-menu' ) )
1042        }
1043    }
1044
1045    function isMenuVisible (el) {
1046        var rect = el.getBoundingClientRect();
1047
1048        if( rect.top < 0 ) {
1049            return false;
1050        }
1051        else {
1052            return true;
1053        }
1054    }
1055
1056    function floatMenu( el ) {
1057        // if( el.querySelector('.fixed' ).classList.contains( 'floating')) {
1058        //     return
1059        // }
1060        if( document.querySelector('html').classList.contains('editing') ) {
1061            return unfloatMenu(el)
1062        }
1063        el.querySelector('.fixed' ).style.opacity = '1'
1064        // el.querySelector('.fixed' ).classList.add( 'floating' )
1065        el.classList.add( 'fixed-on' )
1066    }
1067
1068    function unfloatMenu( el ) {
1069        // if( !el.querySelector('.fixed' ).classList.contains( 'floating')) {
1070        //     return
1071        // }
1072        // el.querySelector('.fixed' ).classList.remove( 'floating' )
1073        el.classList.remove( 'fixed-on' )
1074    }
1075
1076    function init( el ) {
1077        if( !el || !el.querySelector( '.fixed' )) {
1078            return
1079        }
1080
1081        window.addEventListener( 'scroll', function() {
1082            isMenuVisible( el ) ? unfloatMenu(el) : floatMenu(el)
1083        }, { passive: true })
1084
1085
1086        if( !isMenuVisible(el) ) {
1087            floatMenu(el)
1088        }
1089
1090        document.addEventListener( 'editor.on', function() {
1091            unfloatMenu( el )
1092        })
1093        document.addEventListener( 'editor.off', function() {
1094            if( !isMenuVisible( el ) ) {
1095                floatMenu( el )
1096            }
1097        })
1098    }
1099
1100    document.querySelectorAll( '.fixed-menu' ).forEach( function(el) {
1101        init( el )
1102    })
1103
1104    _G.reinitHandlers.push(initBlock)
1105})
1106
1107
1108/* ==== INCLUDE: /js/blocks/masonryGallery.js ==== */
1109
vendor: 5,594 bytes, lines 1110-1116
1110/*!
1111 * imagesLoaded PACKAGED v4.1.4
1112 * JavaScript is all like "You images are done yet or what?"
1113 * MIT License
1114 */
1115
1116!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
1116
1117
1118;(function () {
1119
1120    document.addEventListener('editor.on', () => {
1121        setTimeout(() => {
1122            document.querySelectorAll('.m-gallery').forEach( g => {
1123                const gallery = Masonry.data(g)
1124                if( gallery ) {
1125                    gallery.layout()
1126                }
1127            })
1128        }, 1000 )
1129    })
1130    document.addEventListener('editor.off', () => {
1131        setTimeout(() => {
1132            document.querySelectorAll('.m-gallery').forEach( g => {
1133                const gallery = Masonry.data(g)
1134                if( gallery ) {
1135                    gallery.layout()
1136                }
1137            })
1138        }, 1000 )
1139    })
1140
1141    document.addEventListener('inline.image.changed', (event) => {
1142        setTimeout(() => {
1143            const img = event.detail
1144            if( !img ) {
1145                return
1146            }
1147            if( img.nodeName !== 'IMG' ) {
1148                return
1149            }
1150            document.querySelectorAll('.m-gallery').forEach( g => {
1151                if( g.contains(img) ) {
1152                    let gallery = Masonry.data(g)
1153                    if( !gallery ) {
1154                        // for some reason on initial init, this doesn't stick
1155                        gallery = g.__masonry
1156                    }
1157                    if (gallery) {
1158                        gallery.layout()
1159                    }
1160                }
1161            })
1162        }, 1000 )
1163    })
1164
1165    const init = () => {
1166
1167        // reentrant
1168
1169        document.querySelectorAll('.m-gallery').forEach(el => {
1170
1171            if (el.classList.contains('inited')) {
1172                return
1173            }
1174
1175            el.classList.add('inited')
1176
1177            let gutter = parseInt(el.getAttribute("data-gutter"))
1178            if (isNaN(gutter)) {
1179                gutter = 10
1180            }
1181
1182            el.style.setProperty('--gutter', gutter + 'px');
1183
1184            const gallery = new Masonry(el, {
1185                itemSelector: '.m-gallery-item',
1186                columnWidth: '.m-grid-sizer',
1187                percentPosition: true,
1188                gutter,
1189                // fitWidth: true,
1190            })
1191
1192            el.__masonry = gallery
1193
1194            el.addEventListener('click', (ev) => {
1195
1196                if( document.querySelector('html').classList.contains('editing')) {
1197                    return
1198                }
1199                const item = ev.target.closest('.m-gallery-item')
1200                if (!item) {
1201                    return
1202                }
1203
1204                if( !item.querySelector('.gallery-image') ) {
1205                    return
1206                }
1207
1208                let loadingPromise
1209
1210                if( item.classList.contains('is-expanded')) {
1211                    // back to thumb
1212                    const img = item.querySelector('.gallery-image')
1213                    if( img && img.getAttribute('data-thumb')) {
1214                        img.src = img.getAttribute('data-thumb')
1215                        // setTimeout(() => {
1216                        loadingPromise = Promise.resolve()
1217                        // }, 500 )
1218                    }
1219                }
1220                else {
1221                    // full res
1222                    loadingPromise = new Promise( (resolve, reject) => {
1223                        const img = item.querySelector('.gallery-image')
1224                        if( img && img.getAttribute('data-original')) {
1225                            img.setAttribute('data-thumb', img.src )
1226                            const loadImg = new Image()
1227                            loadImg.onload = () => {
1228                                if( loadImg.decode ) {
1229                                    loadImg.decode().then( () => {
1230                                        img.src = img.getAttribute('data-original')
1231                                        resolve()
1232                                    })
1233                                }
1234                                else {
1235                                    img.src = img.getAttribute('data-original')
1236                                    resolve()
1237                                }
1238                            }
1239                            loadImg.src = img.getAttribute('data-original')
1240                        }
1241                    })
1242                }
1243
1244                const transitionProp = typeof document.documentElement.style.transition == 'string' ?
1245                    'transition' : 'WebkitTransition'
1246                const transitionEndEvent = {
1247                    WebkitTransition: 'webkitTransitionEnd',
1248                    transition: 'transitionend'
1249                }[transitionProp];
1250
1251                const content = item.querySelector('.m-gallery-item-content')
1252                const size = content.getBoundingClientRect()
1253
1254                content.style[transitionProp] = 'none'
1255                content.style.width = size.width + 'px'
1256                // content.style.height = size.height + 'px'
1257
1258                item.classList.toggle('is-expanded')
1259
1260                // force redraw
1261                const redraw = content.offsetWidth;
1262                content.style[transitionProp] = ''
1263
1264                const listener = () => {
1265                    content.style.width = ''
1266                    content.style.height = ''
1267                    content.removeEventListener(transitionEndEvent, listener, false)
1268                    loadingPromise.then(() => {
1269                        setTimeout(() => {
1270                            gallery.layout()
1271                        }, 600)
1272                    })
1273                }
1274                content.addEventListener(transitionEndEvent, listener, false)
1275
1276                content.style.width = '100%'
1277                content.style.height = item.parentElement.getBoundingClientRect().width + 'px'
1278
1279                gallery.once('layoutComplete', () => {
1280                    // setTimeout(() => {
1281                    const rect = item.getBoundingClientRect()
1282                    console.log('rect', rect)
1283
1284                    window.scrollTo({
1285                        top: rect.top + window.scrollY,
1286                        left: 0,
1287                        behavior: 'smooth',
1288                    })
1289                    // }, 200 )
1290
1291                })
1292                gallery.layout()
1293            })
1294            const imgLoad = imagesLoaded(el)
1295            imgLoad.on('progress', (instance, image) => {
1296                el.classList.add('inited')
1297                // console.log( 'image loaded', instance, image)
1298                //if( image.img.classList.contains('fx')) {
1299                    //image.img.classList.remove('fx')
1300                //}
1301                gallery.layout()
1302            })
1303        })
1304    }
1305
1306    document.addEventListener('DOMContentLoaded', () => {
1307        init()
1308    })
1309    _G.reinitHandlers.push(init)
1310})()
1311
1312/* ==== INCLUDE: /js/blocks/fslightbox.js ==== */
1313
1314!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o,r="fslightbox-",i="".concat(r,"styles"),s="".concat(r,"full-dimension"),a="".concat(r,"cursor-grabbing"),c="".concat(r,"flex-centered"),u="".concat(r,"open"),l="".concat(r,"transform-transition"),d="".concat(r,"absoluted"),h="".concat(r,"slide-btn"),p="".concat(h,"-container"),m="".concat(r,"fade-in"),f="".concat(r,"fade-out"),g=m+"-strong",b=f+"-strong",v="".concat(r,"caption"),x=v+"-inner",w=v+"-active",T="".concat(r,"opacity-"),y="".concat(T,"0"),S="".concat(T,"1"),L="".concat(r,"source"),C="".concat(L,"-wrappers-container"),A="".concat(C,"-pinching"),I="".concat(r,"thumb"),E=I+"s",z="".concat(E,"-loader"),W="".concat(E,"-cursorer"),F="".concat(E,"-inner"),M=I+"s-active",P=I+"-wrapper",N=P+"-darkener",k=I+"-invalid",B=I+"-active";function H(e){return(H="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})(e)}"object"===("undefined"==typeof document?"undefined":H(document))&&((o=document.createElement("style")).className=i,o.appendChild(document.createTextNode(".fslightbox-fade-in{animation:fslightbox-fade-in .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out{animation:fslightbox-fade-out .3s ease}.fslightbox-fade-in-strong{animation:fslightbox-fade-in-strong forwards .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out-strong{animation:fslightbox-fade-out-strong .3s ease}@keyframes fslightbox-fade-in{from{opacity:.65}to{opacity:1}}@keyframes fslightbox-fade-out{from{opacity:.35}to{opacity:0}}@keyframes fslightbox-fade-in-strong{from{opacity:.3}to{opacity:1}}@keyframes fslightbox-fade-out-strong{from{opacity:1}to{opacity:0}}.fslightbox-scale-in{animation:fslightbox-scale-in .5s ease}@keyframes fslightbox-scale-in{from{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.fslightbox-absoluted{position:absolute;top:0;left:0}.fslightbox-cursor-grabbing{cursor:grabbing!important}.fslightbox-full-dimension{width:100%;height:100%}.fslightbox-open{overflow:hidden;height:100%}.fslightbox-flex-centered{display:flex;justify-content:center;align-items:center}.fslightbox-opacity-0{opacity:0!important}.fslightbox-opacity-1{opacity:1!important}.fslightbox-scrollbarfix{padding-right:17px}.fslightbox-transform-transition{transition:transform .3s!important}.fslightbox-container{font-family:Arial,sans-serif;position:fixed;top:0;left:0;background:linear-gradient(rgba(30,30,30,.9),#000 1810%);z-index:1000000000;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fslightbox-container *{box-sizing:border-box}.fslightbox-svg-path{transition:fill .15s ease;fill:#d1d2d2}.fslightbox-loader{display:block;margin:auto;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:67px;height:67px}.fslightbox-loader div{box-sizing:border-box;display:block;position:absolute;width:54px;height:54px;margin:6px;border:5px solid;border-color:#999 transparent transparent transparent;border-radius:50%;animation:fslightbox-loader 1.2s cubic-bezier(.5,0,.5,1) infinite}.fslightbox-loader div:nth-child(1){animation-delay:-.45s}.fslightbox-loader div:nth-child(2){animation-delay:-.3s}.fslightbox-loader div:nth-child(3){animation-delay:-.15s}@keyframes fslightbox-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fslightbox-thumbs-loader{width:54px!important;height:54px!important}.fslightbox-thumbs-loader div{border-width:4px!important;width:44px!important;height:44px!important}.fslightbox-nav{height:45px;width:100%;transition:opacity .3s}.fslightbox-slide-number-container{display:flex;justify-content:center;align-items:center;position:relative;height:100%;font-size:15px;color:#d7d7d7;z-index:0;max-width:55px;text-align:left}.fslightbox-slide-number-container .fslightbox-flex-centered{height:100%}.fslightbox-slash{display:block;margin:0 5px;width:1px;height:12px;transform:rotate(15deg);background:#fff}.fslightbox-toolbar{position:absolute;z-index:3;right:0;top:0;height:45px;display:flex;background:rgba(35,35,35,.65)}.fslightbox-toolbar-button{height:100%;width:45px;cursor:pointer}.fslightbox-toolbar-button:hover .fslightbox-svg-path{fill:#fff}.fslightbox-slide-btn-container{display:flex;align-items:center;padding:12px 12px 12px 6px;position:absolute;top:50%;cursor:pointer;z-index:3;transform:translateY(-50%);transition:opacity .3s}@media (min-width:476px){.fslightbox-slide-btn-container{padding:22px 22px 22px 6px}}@media (min-width:768px){.fslightbox-slide-btn-container{padding:30px 30px 30px 6px}}.fslightbox-slide-btn-container:hover .fslightbox-svg-path{fill:#f1f1f1}.fslightbox-slide-btn{padding:9px;font-size:26px;background:rgba(35,35,35,.65)}@media (min-width:768px){.fslightbox-slide-btn{padding:10px}}@media (min-width:1600px){.fslightbox-slide-btn{padding:11px}}.fslightbox-slide-btn-container-previous{left:0}@media (max-width:475.99px){.fslightbox-slide-btn-container-previous{padding-left:3px}}.fslightbox-slide-btn-container-next{right:0;padding-left:12px;padding-right:3px}@media (min-width:476px){.fslightbox-slide-btn-container-next{padding-left:22px}}@media (min-width:768px){.fslightbox-slide-btn-container-next{padding-left:30px}}@media (min-width:476px){.fslightbox-slide-btn-container-next{padding-right:6px}}.fslightbox-down-event-detector{position:absolute;z-index:1}.fslightbox-slide-swiping-hoverer{z-index:4}.fslightbox-slideshow-bar{width:0;height:2px;z-index:4;opacity:0;background:#fff;transition:opacity .4s}.fslightbox-invalid-file-wrapper{font-size:24px;color:#eaebeb;margin:auto}.fslightbox-video{object-fit:cover}.fslightbox-youtube-iframe{border:0}.fslightbox-source{position:relative;display:block;margin:auto;z-index:2;opacity:0;cursor:zoom-in;transform:translateZ(0);backface-visibility:hidden}.fslightbox-source-wrappers-container{transition:transform .2s linear;z-index:2}.fslightbox-source-wrappers-container-pinching{transition-duration:.1s}.fslightbox-thumbs{position:absolute;bottom:0;left:0;width:100%;z-index:-1;background:linear-gradient(180deg,rgba(0,0,0,0),#1e1e1e 100%);opacity:0;transition:opacity .2s;padding:0 5px 12px 5px;height:114px}@media (min-width:992px){.fslightbox-thumbs{padding-bottom:13px;height:120px}}@media (min-width:1600px){.fslightbox-thumbs{padding-bottom:14px;height:126px}}.fslightbox-thumbs-active{opacity:1;z-index:3}.fslightbox-thumbs-inner{height:100%;display:inline-flex;justify-content:flex-start;align-items:center}.fslightbox-thumb-wrapper{position:relative;height:100%;margin:0 4px;opacity:0;transition:opacity .3s}.fslightbox-thumb-wrapper svg{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer;z-index:1}
1314.fslightbox-thumb-wrapper path{fill:#fff}.fslightbox-thumb-wrapper-darkener{position:absolute;top:2px;left:2px;width:calc(100% - 4px);height:calc(100% - 4px);background:rgba(0,0,0,.4);cursor:pointer}.fslightbox-thumb{cursor:pointer;border-radius:1px;height:100%;width:auto!important;border:2px solid transparent}.fslightbox-thumb-active{border:2px solid #fff!important}.fslightbox-thumb-invalid{background:linear-gradient(to bottom,#0f0f0f,rgba(15,15,15,.5));display:inline-block;min-width:155px}.fslightbox-thumbs-cursorer{z-index:4;cursor:grabbing}.fslightbox-caption{position:absolute;bottom:0;left:50%;width:100%;background:linear-gradient(180deg,rgba(0,0,0,0),#1e1e1e 100%);transform:translateX(-50%);opacity:0;transition:opacity .2s;z-index:-1}.fslightbox-caption-inner{padding:25px;max-width:1200px;color:#eee;text-align:center;font-size:14px}@media (min-width:768px){.fslightbox-caption-inner{padding:30px 25px}}.fslightbox-caption-active{opacity:1;z-index:3}")),document.head.appendChild(o));function O(e){var t,n=e.props,o=0,r={};this.getSourceTypeFromLocalStorageByUrl=function(e){return t[e]?t[e]:i(e)},this.handleReceivedSourceTypeForUrl=function(e,n){!1===r[n]&&(o--,"invalid"!==e?r[n]=e:delete r[n],0===o&&(!function(e,t){for(var n in t)e[n]=t[n]}(t,r),localStorage.setItem("fslightbox-types",JSON.stringify(t))))};var i=function(e){o++,r[e]=!1};n.disableLocalStorage?(this.getSourceTypeFromLocalStorageByUrl=function(){},this.handleReceivedSourceTypeForUrl=function(){}):(t=JSON.parse(localStorage.getItem("fslightbox-types")))||(t={},this.getSourceTypeFromLocalStorageByUrl=i)}function D(e,t,n,o){var r=e.data,i=e.elements.sources,s=n/o,a=0;this.adjustSize=function(){if((a=r.maxSourceWidth/s)<r.maxSourceHeight)return n<r.maxSourceWidth&&(a=o),c();a=o>r.maxSourceHeight?r.maxSourceHeight:o,c()};var c=function(){var e=i[t].style;e.width=a*s+"px",e.height=a+"px"}}function R(e,t,n,o){var r=this,i=e.collections.sourceSizers,s=e.core.sourceEnhancementWrappersTransformer,a=e.elements,c=a.sources,u=a.sourceAnimationWrappers,l=a.sourceMainWrappers,d=e.resolve,h=e.props.initialAnimation;this.runNormalLoadActions=function(){c[t].classList.add(S),u[t].classList.add(h),l[t].removeChild(l[t].firstChild)},this.runInitialLoadActions=function(){r.runNormalLoadActions(),i[t]=d(D,[t,n,o]),i[t].adjustSize(),s.ifSourceIsLoadedTransformEnhancementWrapperAtIndex(t)}}function X(e,t){var n,o=this,r=e.elements.sources,i=e.props,s=e.resolve;this.handleImageLoad=function(e){var t=e.target,n=t.width,r=t.height;o.handleImageLoad=a(n,r)},this.handleVideoLoad=function(e){var t=e.target,r=t.videoWidth,i=t.videoHeight;n=!0,o.handleVideoLoad=a(r,i)},this.handleNotMetaDatedVideoLoad=function(){n||o.handleYoutubeLoad()},this.handleYoutubeLoad=function(){var e=1920,t=1080;i.maxYoutubeDimensions&&(e=i.maxYoutubeDimensions.width,t=i.maxYoutubeDimensions.height),o.handleYoutubeLoad=a(e,t)},this.handleCustomLoad=function(){setTimeout((function(){o.handleCustomLoad=a(r[t].offsetWidth,r[t].offsetHeight)}))};var a=function(e,n){var o=s(R,[t,e,n]);return o.runInitialLoadActions(),o.runNormalLoadActions}}function Y(e,t,n){var o=e.elements.sources,r=e.props.customClasses,i=r[t]?r[t]:"";o[t].className=n+" "+i}function j(e,t){var n=e.elements.sources,o=e.props.customAttributes;for(var r in o[t])n[t].setAttribute(r,o[t][r])}function U(e,t){var n=e.collections.sourcesLoadsHandlers,o=e.elements,r=o.sources,i=o.sourceAnimationWrappers,s=e.props.sources;r[t]=document.createElement("img"),Y(e,t,L),r[t].src=s[t],r[t].onload=n[t].handleImageLoad,j(e,t),i[t].appendChild(r[t])}function Z(e,t){var n=e.collections.sourcesLoadsHandlers,o=e.elements,r=o.sources,i=o.sourceAnimationWrappers,s=e.props,a=s.sources,c=s.videosPosters;r[t]=document.createElement("video"),Y(e,t,L),r[t].src=a[t],r[t].onloadedmetadata=function(e){n[t].handleVideoLoad(e)},r[t].controls=!0,j(e,t),c[t]&&(r[t].poster=c[t]);var u=document.createElement("source");u.src=a[t],r[t].appendChild(u),setTimeout(n[t].handleNotMetaDatedVideoLoad,3e3),i[t].appendChild(r[t])}function V(e,t){var n=e.collections.sourcesLoadsHandlers,o=e.elements,i=o.sources,s=o.sourceAnimationWrappers,a=e.props.sources;i[t]=document.createElement("iframe"),Y(e,t,"".concat(L," ").concat(r,"youtube-iframe")),i[t].src="https://www.youtube.com/embed/".concat(a[t].match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/)[2]),i[t].allowFullscreen=!0,j(e,t),s[t].appendChild(i[t]),n[t].handleYoutubeLoad()}function q(e,t){var n=e.collections.sourcesLoadsHandlers,o=e.elements,r=o.sources,i=o.sourceAnimationWrappers,s=e.props.sources;r[t]=s[t],Y(e,t,"".concat(r[t].className," ").concat(L)),i[t].appendChild(r[t]),n[t].handleCustomLoad()}function _(e,t){var n=e.elements,o=n.sources,i=n.sourceAnimationWrappers,s=n.sourceMainWrappers;e.props.sources;o[t]=document.createElement("div"),o[t].className="".concat(r,"invali
1314d-file-wrapper ").concat(c," ").concat(g),o[t].innerHTML="Invalid source",i[t].appendChild(o[t]),s[t].removeChild(s[t].firstChild)}function J(e,t,n){var o=e.props.thumbsIcons;if(o[n]){t.appendChild(o[n]);var r=document.createElement("div");r.className=N,t.appendChild(r)}}function $(e,t,n){var o=e.elements,r=o.thumbsWrappers,i=o.thumbsInner;r[t]=document.createElement("div"),r[t].className=P,J(e,r[t],t),function(e,t,n,o){var r=e.core.thumbLoadHandler.handleLoad,i=e.elements.thumbs,s=e.stageIndexes.current;i[n]=document.createElement("img"),i[n].src=o;var a=I;s===n&&(a+=" ".concat(B)),i[n].className=a,i[n].onload=r,t.appendChild(i[n])}(e,r[t],t,n),i.appendChild(r[t])}function G(e,t,n,o,i){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttributeNS(null,"width",t),s.setAttributeNS(null,"height",t),s.setAttributeNS(null,"viewBox",o);var a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttributeNS(null,"class","".concat(r,"svg-path")),a.setAttributeNS(null,"d",i),s.appendChild(a),e.appendChild(s),s}function K(e,t){var n=e.elements,o=n.thumbsWrappers,r=n.thumbsInner;o[t]=document.createElement("div"),o[t].className="".concat(k," ").concat(P),J(e,o[t],t),function(e,t,n){var o=e.core.thumbLoadHandler.handleLoad,r=e.elements.thumbs,i=e.stageIndexes.current;r[n]=document.createElement("div");var s="".concat(I," ").concat(c);i===n&&(s+=" ".concat(B)),r[n].className=s,G(r[n],"22px",0,"0 0 30 30","M15,3C8.373,3,3,8.373,3,15c0,6.627,5.373,12,12,12s12-5.373,12-12C27,8.373,21.627,3,15,3z M16.212,8l-0.2,9h-2.024l-0.2-9 H16.212z M15.003,22.189c-0.828,0-1.323-0.441-1.323-1.182c0-0.755,0.494-1.196,1.323-1.196c0.822,0,1.316,0.441,1.316,1.196 C16.319,21.748,15.825,22.189,15.003,22.189z"),t.appendChild(r[n]),setTimeout(o)}(e,o[t],t),r.appendChild(o[t])}function Q(e){var t=e.collections.thumbsRenderFunctions,n=e.props.sources,o=0;this.addFunctionToToBeRenderedAtIndex=function(e,n){t[n]=e,o++},this.renderThumbsIfAllTypesDetected=function(){if(o===n.length)for(var e=0;e<n.length;e++)t[e]&&(t[e](),delete t[e])}}function ee(e){var t=e.data,n=e.props,o=n.showThumbsOnMount,r=n.sources,i=n.thumbs,s=(0,e.resolve)(Q);this.buildThumbForTypeAndIndex=function(n,a){var c;c=i[a]?function(){return $(e,a,i[a])}:"image"===n?function(){return $(e,a,r[a])}:function(){return K(e,a)},s.addFunctionToToBeRenderedAtIndex(c,a),(o||t.isThumbing)&&s.renderThumbsIfAllTypesDetected()}}function te(e){var t,n=e.collections,o=n.sourcesLoadsHandlers,r=n.sourcesRenderFunctions,i=e.core.sourceDisplayFacade,s=e.props.disableThumbs,a=e.resolve;s||(t=a(ee)),this.runActionsForSourceTypeAndIndex=function(n,c){var u;switch("invalid"!==n&&(o[c]=a(X,[c])),n){case"image":u=U;break;case"video":u=Z;break;case"youtube":u=V;break;case"custom":u=q;break;default:u=_}r[c]=function(){return u(e,c)},i.displaySourcesWhichShouldBeDisplayed(),s||t.buildThumbForTypeAndIndex(n,c)}}function ne(){var e,t,n,o,r,i={isUrlYoutubeOne:function(e){var t=document.createElement("a");return t.href=e,"www.youtube.com"===t.hostname},getTypeFromResponseContentType:function(e){return e.slice(0,e.indexOf("/"))}};this.setUrlToCheck=function(t){e=t},this.getSourceType=function(t){if(i.isUrlYoutubeOne(e))return t("youtube");n=t,(o=new XMLHttpRequest).open("GET",e,!0),o.onreadystatechange=s,o.send()};var s=function(){if(4===o.readyState&&0===o.status&&!r)return a();if(2===o.readyState){if(200!==o.status&&206!==o.status)return r=!0,a();r=!0,u(i.getTypeFromResponseContentType(o.getResponseHeader("content-type"))),c()}},a=function(){t="invalid",c()},c=function(){o.abort(),n(t)},u=function(e){switch(e){case"image":t="image";break;case"video":t="video";break;default:t="invalid"}}}function oe(e,t,n){var o=e.props,r=o.types,i=o.type,s=o.sources,a=e.resolve;this.getTypeSetByClientForIndex=function(e){var t;return r&&r[e]?t=r[e]:i&&(t=i),t},this.retrieveTypeWithXhrForIndex=function(e){var o=a(ne);o.setUrlToCheck(s[e]),o.getSourceType((function(o){t.handleReceivedSourceTypeForUrl(o,s[e]),n.runActionsForSourceTypeAndIndex(o,e)}))}}function re(e,t){var n=e.elements,o=n.sourceMainWrappers,r=n.sourceEnhancementWrappers;r[t]=document.createElement("div"),r[t].className=l,o[t].appendChild(r[t]),function(e,t){var n=e.elements,o=n.sourceAnimationWrappers,r=n.sourceEnhancementWrappers;o[t]=document.createElement("div"),r[t].appendChild(o[t])}(e,t)}function ie(e,t){var n=e.elements,o=n.sourceWrappersContainer,r=n.sourceMainWrappers;r[t]=document.createElement("div"),r[t].className="".concat(d," ").concat(s," ").concat(c),r[t].innerHTML='<div class="fslightbox-loader"><div></div><div></div><div></div><div></div></div>',o.appendChild(r[t]),re(e,t)}function se(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function ae(e){return function(e){if(Array.isArray(e))return ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}(e)||function(){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 ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function ue(e,t,n){return function(){for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];var s=n?[].concat(ae(n),r):r;t.apply(void 0,ae(s))&&e.apply(void 0,r)}}function le(e){return!e.touches||e.touches.length<=2}function de(){this.getMouseDownListenerFunc=function(e){return se()?void 0:ue(e,le)},this.getTouchStartListenerForFunc=function(e){return se()?ue(e,le):void 0}}function he(e,t){var n=document.createElement("div");return n.className="".concat(r,"toolbar-button ").concat(c),n.title=t,e.appendChild(n),n}function pe(e,t,n){var o=he(e,t.title);o.onclick=n,G(o,t.width,t.height,t.viewBox,t.d)}
1314function me(e){return!e.sourcesPointerProps.isPointering}function fe(e,t){var n=e.core,o=n.clickZoomer,i=o.zoomIn,s=o.zoomOut,a=n.lightboxCloser.close,c=n.thumbsToggler,u=e.middleware,l=e.props,d=l.customToolbarButtons,h=l.disableThumbs,p=l.toolbarButtons,m=document.createElement("div");m.className="".concat(r,"toolbar"),t.appendChild(m);for(var f=function(t){pe(m,d[t],(function(){return d[t].onClick(e)}))},g=0;g<d.length;g++)f(g);h||pe(m,p.thumbs,c.toggleThumbs),pe(m,p.zoomIn,u(i,me)),pe(m,p.zoomOut,u(s,me)),function(e,t){var n=e.core.slideshowManager.toggleSlideshow,o=e.componentsServices,r=e.props.toolbarButtons.slideshow,i=r.start,s=r.pause,a=he(t,i.title);a.onclick=n;var c=G(a,i.width,i.height,i.viewBox,i.d);function u(e){a.title=e.title,c.setAttributeNS(null,"width",e.width),c.setAttributeNS(null,"height",e.height),c.setAttributeNS(null,"viewBox",e.viewBox),c.firstChild.setAttributeNS(null,"d",e.d)}o.startSlideshow=function(){u(s)},o.stopSlideshow=function(){u(i)}}(e,m),function(e,t){var n=e.core.fullscreenToggler,o=e.componentsServices,r=e.data,i=e.props.toolbarButtons.fullscreen,s=i.enter,a=i.exit,c=he(t);c.title="Enter fullscreen";var u=G(c,s.width,s.height,s.viewBox,s.d);function l(e){u.setAttributeNS(null,"width",e.width),u.setAttributeNS(null,"height",e.height),u.setAttributeNS(null,"viewBox",e.viewBox),u.firstChild.setAttributeNS(null,"d",e.d)}o.enterFullscreen=function(){r.isFullscreenOpen=!0,c.title="Exit fullscreen",l(a)},o.exitFullscreen=function(){r.isFullscreenOpen=!1,c.title="Enter fullscreen",l(s)},c.onclick=function(){r.isFullscreenOpen?n.exitFullscreen():n.enterFullscreen()}}(e,m),pe(m,p.close,a)}function ge(e){var t=e.props.sources,n=e.elements;n.nav=document.createElement("div"),n.nav.className="".concat(r,"nav"),n.container.appendChild(n.nav),fe(e,n.nav),t.length>1&&function(e,t){var n=e.componentsServices,o=e.props.sources,i=(e.stageIndexes,document.createElement("div"));i.className="".concat(r,"slide-number-container");var s=document.createElement("div");s.className=c;var a=document.createElement("span");n.setSlideNumber=function(e){return a.innerHTML=e};var u=document.createElement("span");u.className="".concat(r,"slash");var l=document.createElement("div");l.innerHTML=o.length,i.appendChild(s),s.appendChild(a),s.appendChild(u),s.appendChild(l),t.appendChild(i),setTimeout((function(){s.offsetWidth>55&&(i.style.justifyContent="flex-start")}))}(e,n.nav)}function be(e,t){var n=this,o=e.elements.sourceMainWrappers,r=e.props,i=0,s=0,a=0;this.translate=function(e,t){return s=e,void 0!==t&&(a=t),n},this.getTranslateX=function(){return i},this.getTranslateY=function(){return a},this.negative=function(){c(-(1+r.slideDistance)*innerWidth)},this.zero=function(){c(0)},this.positive=function(){c((1+r.slideDistance)*innerWidth)};var c=function(e){i=e+s,u(),s=0},u=function(){o[t].style.transform="translate(".concat(i,"px, ").concat(a,"px)")}}function ve(e,t){var n=e.core.slideChangeFacade,o=e.elements,r=e.props.slideButtons,i=t.charAt(0).toUpperCase()+t.slice(1),s="slideButton".concat(i),a=r[t];o[s]=document.createElement("div"),o[s].className="".concat(p," ").concat(p,"-").concat(t),o[s].title=a.title,o[s].onclick=n["changeTo".concat(i)],function(e,t){var n=document.createElement("div");n.className="".concat(h," ").concat(c),G(n,t.width,t.height,t.viewBox,t.d),e.appendChild(n)}(o[s],a),o.container.appendChild(o[s])}function xe(e){var t=e.collections.thumbsRenderFunctions,n=e.core,o=n.sourceEnhancementWrappersTransformer,r=n.zoomer,i=e.data,s=e.elements,a=e.props.sources,c=e.stageIndexes;this.openThumbs=function(){r.ifZoomingResetZoom(),s.thumbsContainer.classList.add(M),u("remove"),i.isThumbing=!0;for(var e=0;e<a.length;e++)o.ifSourceIsLoadedTransformEnhancementWrapperAtIndex(e),t[e]&&(t[e](),delete t[e])},this.closeThumbs=function(){r.ifZoomingResetZoom(),s.thumbsContainer.classList.remove(M),u("add"),i.isThumbing=!1;for(var e=0;e<a.length;e++)o.ifSourceIsLoadedTransformEnhancementWrapperAtIndex(e)};var u=function(e){s.captions[c.current]&&s.captions[c.current].classList[e](w)}}function we(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function Te(e,t){var n=e.classList;n.contains(t)||n.add(t)}function ye(e){var t=e.data,n=e.elements,o=e.stageIndexes;this.runActions=function(){we(n.thumbsContainer,c);var e=innerWidth/2,i=n.thumbsWrappers[o.current],s=i.offsetLeft+i.offsetWidth/2,a=t.thumbsInnerWidth-s;s>e&&a>e?r(e-s):s>e?r(innerWidth-t.thumbsInnerWidth-9):a>e&&r(0)},this.runToThinThumbsActions=function(){Te(n.thumbsContainer,c),r(0)};var r=function(e){t.thumbsTransform=e,n.thumbsInner.style.transform="translateX(".concat(e,"px)")}}function Se(e,t){var n=[];return function(){n.push(!0),setTimeout((function(){n.pop(),n.length||e()}),t)}}function Le(e){var t,n,o,r,i,s=e.core,a=e.collections,c=e.data,u=e.elements,d=e.props;c.thumbsInnerWidth=null,c.thumbsTransform=0,c.isThumbing=d.showThumbsOnMount,c.thumbedSourceEnhancementWrapperScale=null,e.thumbsSwipingProps={isSwiping:!1,downClientX:null,
1314swipedX:null},a.thumbsRenderFunctions=[],s.thumbLoadHandler={},s.thumbsOpeningActions={},s.thumbsTransformer={},s.thumbsTransformTransitioner={},s.thumbsToggler={},s.thumbsSwipingDown={},u.thumbsContainer=null,u.thumbs=[],u.thumbsWrappers=[],u.thumbsComponents=[],u.thumbsInner=null,function(e){var t=e.core,n=t.thumbLoadHandler,o=t.windowResizeActioner,r=e.componentsServices,i=e.data,s=e.elements.thumbsWrappers;n.handleLoad=function(){if(i.unloadedThumbsCount--,0===i.unloadedThumbsCount){for(var e=0;e<s.length;e++)s[e].classList.add(S);o.runThumbsActions(),r.hideThumbsLoader()}}}(e),function(e){var t=e.core.thumbsToggler,n=e.data,o=(0,e.resolve)(xe);t.toggleThumbs=function(){n.isThumbing?o.closeThumbs():o.openThumbs()}}(e),function(e){var t=e.core,n=t.thumbsTransformer,o=t.thumbsTransformTransitioner,r=e.data,i=(0,e.resolve)(ye);n.transformToCurrent=function(){r.thumbsInnerWidth>innerWidth?i.runActions():i.runToThinThumbsActions()},n.transformToCurrentWithTransition=function(){r.thumbsInnerWidth>innerWidth&&o.callActionWithTransition(i.runActions)}}(e),function(e){var t=e.core.thumbsTransformTransitioner,n=e.elements,o=Se((function(){n.thumbsInner.classList.remove(l)}),300);t.callActionWithTransition=function(e){n.thumbsInner.classList.add(l),e(),o()}}(e),n=(t=e).core,o=n.thumbsSwipingDown,r=n.pointeringBucket,i=t.thumbsSwipingProps,o.listener=function(e){r.runSwipingDownActionsForPropsAndEvent(i,e),e.touches||e.preventDefault()}}function Ce(e){var t=e.componentsServices,n=e.elements,o=e.data;n.thumbsContainer=document.createElement("div");var r=E;o.isThumbing&&(r+=" ".concat(M)),n.thumbsContainer.className=r,n.container.appendChild(n.thumbsContainer),n.thumbsContainer.innerHTML='<div data-test-id="thumbs-loader" class="fslightbox-loader '.concat(z,'"><div></div><div></div><div></div><div></div></div>'),t.hideThumbsLoader=function(){n.thumbsContainer.removeChild(n.thumbsContainer.firstChild)},function(e){var t=e.elements;t.thumbsCursorer=document.createElement("div"),t.thumbsCursorer.className="".concat(W," ").concat(s," ").concat(d)}(e),function(e){var t=e.core.thumbsSwipingDown.listener,n=e.elements,o=new de;n.thumbsInner=document.createElement("div"),n.thumbsInner.className=F,n.thumbsInner.addEventListener("mousedown",o.getMouseDownListenerFunc(t)),n.thumbsInner.addEventListener("touchstart",o.getTouchStartListenerForFunc(t)),n.thumbsContainer.appendChild(n.thumbsInner)}(e)}function Ae(e){var t=this,n=e.core,o=n.eventsDispatcher,r=n.fullscreenToggler,i=n.globalEventsController,s=n.scrollbarRecompensor,a=n.slideshowManager,c=n.zoomer,l=e.data,d=e.elements,h=e.props,p=e.sourcesPointerProps;this.isLightboxFadingOut=!1,this.runActions=function(){t.isLightboxFadingOut=!0,d.container.classList.add(b),i.removeListeners(),a.resetSlideshow(),h.exitFullscreenOnClose&&l.isFullscreenOpen&&r.exitFullscreen(),c.ifZoomingResetZoom(),setTimeout((function(){t.isLightboxFadingOut=!1,p.isSwiping=!1,d.container.classList.remove(b),document.documentElement.classList.remove(u),s.removeRecompense(),document.body.removeChild(d.container),o.dispatch("onClose")}),270)}}function Ie(e,t){var n=e.elements.thumbs,o=e.stageIndexes;n&&n[o.current]&&(n[o.current].classList.remove(B),n[t].classList.add(B))}function Ee(e){var t=e.core,n=t.slideshowManager,o=t.slideChangeFacade,r=e.componentsServices,i=e.elements,s=e.props,a=0,c=!1;function u(){i.slideshowBar.classList.remove(S),r.stopSlideshow(),c=!1}function l(){var e=(a+=16.67)/s.slideshowTime;i.slideshowBar.style.width=e*innerWidth+"px",e>=1&&(a=0,o.changeToNext()),c&&requestAnimationFrame(l)}n.toggleSlideshow=function(){c?u():(c=!0,i.slideshowBar.classList.add(S),r.startSlideshow(),l())},n.resetSlideshow=function(){a=0,c&&u()}}function ze(e){var t=e.core,n=t.clickZoomer,o=t.fullscreenToggler,r=t.lightboxCloser,i=t.slideChangeFacade,s=t.slideshowManager,a=t.thumbsToggler,c=e.middleware,u=e.props;this.listener=function(e){if("Space"!==e.code)switch(e.key){case"Escape":r.close();break;case"ArrowLeft":i.changeToPrevious();break;case"ArrowRight":i.changeToNext();break;case"t":u.disableThumbs||a.toggleThumbs();break;case"+":c(n.zoomIn,me)();break;case"-":c(n.zoomOut,me)();break;case"F11":e.preventDefault(),o.enterFullscreen()}else s.toggleSlideshow()}}function We(){var e=!1;return function(){return!e&&(e=!0,requestAnimationFrame((function(){e=!1})),!0)}}function Fe(e){var t=We();return function(){return e.isPointering&&t()}}function Me(e){var t=e.core.pointeringBucket,n=e.data,o=e.elements,r=e.thumbsSwipingProps;this.runActions=function(e){t.runSwipingMoveActionsForPropsAndEvent(r,e),o.thumbsInner.style.transform="translateX(".concat(n.thumbsTransform+r.swipedX,"px)"),o.thumbsContainer.contains(o.thumbsCursorer)||o.thumbsContainer.appendChild(o.thumbsCursorer)}}function Pe(e){var t=e.data,n=e.resolve,o=Fe(e.thumbsSwipingProps),r=n(Me);this.listener=function(e){t.thumbsInnerWidth>innerWidth&&o()&&r.runActions(e)}}function Ne(e,t){e.contains(t)&&e.removeChild(t)}function ke(e){var t=e.data,n=e.core,o=n.slideIndexChanger,r=n.thumbsTransformTransitioner,i=n.pointeringBucket,s=e.elements,a=e.thumbsSwipingProps,c=s.thumbsWrappers;this.runNoSwipeActionsForEvent=function(e){Ne(s.thumbsContainer,s.thumbsCursorer),a.isPointering=!1;for(var t=0;t<c.length;t++)if(c[t]&&c[t].contains(e.target))return void o.jumpTo(t)},this.runActions=function(){if(Ne(s.thumbsContainer,s.thumbsCursorer),t.thumbsTransform+=a.swipedX,i.runSwipingTopActionsForPropsAndEvent(a),t.thumbsTransform>0)return u(0);t.thumbsTransform<innerWidth-t.thumbsInnerWidth-9&&u(innerWidth-t.thumbsInnerWidth-9)};var u=function(e){t.thumbsTransform=e,r.callActionWithTransition((function(){s.thumbsInner.style.transform="translateX(".concat(e,"px)")}))}}function Be(e){var t=e.resolve,n=e.thumbsSwipingProps,o=t(ke);this.listener=function(e){n.isPointering&&(n.swipedX?o.runActions():o.runNoSwipeActionsForEvent(e))}}function He(e){return e.touches?e.touches[0].clientY:e.clientY}function Oe(e){var t=e.collections.sourceMainWrapperTransformers,n=e.core.zoomer,o=e.data,r=e.sourcesPointerProps;this.runZoomingPinchActionsForHypot=function(e){var t=e-r.pinchedHypot,i=o.zoom+t/Math.hypot(innerWidth,innerHeight)*10;i<.9&&(i=.9),n.zoomTo(i),r.pinchedHypot=e},this.translateSourceOuterAtIndexUsingMethod=function(e,n){t[e].translate(r.swipedX)[n]()}}function De(e){return Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY)}function Re(e){return e.touches?e.touches[0].clientX:e.clientX}function Xe(e){var t=e.collections.sourceMainWrapperTransformers,n=e.core.pointeringBucket,o=e.data,r=e.elements,i=e.resolve,s=e.sourcesPointerProps,a=e.stageIndexes,c=i(Oe);this.runActions=function(e){n.runSwipingMoveActionsForPropsAndEvent(s,e),r.container.contains(r.slideSwipingHoverer)||r.container.appendChild(r.slideSwipingHoverer)},this.runPinchActions=function(e){var t=De(e);s.pinchedHypot?c.runZoomingPinchActionsForHypot(t):s.pinchedHypot=t},this.runNormalSwipeActions=function(){c.translateSourceOuterAtIndexUsingMethod(a.current,"zero"),void 0!==a.previous&&s.swipedX>0?c.translateSourceOuterAtIndexUsingMethod(a.previous,"negative"):void 0!==a.next&&s.swipedX<0&&c.translateSourceOuterAtIndexUsingMethod(a.next,"positive")},this.runZoomSwipeActions=function(e){s.swipedX=(Re(e)-s.downClientX)/o.zoom,s.swipedY=(He(e)-s.downClientY)/o.zoom,t[a.current].translate(s.upSwipedX+s.swipedX,s.upSwipedY+s.swipedY).zero()}}function Ye(e){return e.touches?e.touches.length:0}function je(e){var t=e.data,n=e.resolve,o=e.props.sources,r=e.sourcesPointerProps,i=Fe(r),s=n(Xe);this.listener=function(e){i()&&(s.runActions(e),Ye(e)&&r.isPinching?s.runPinchActions(e):1===t.zoom?1===o.length?r.swipedX=1:s.runNormalSwipeActions(e):s.runZoomSwipeActions(e))}}function Ue(e){var t=e.collections.sourceMainWrapperTransformers,n=e.core,o=n.slideIndexChanger,r=n.clickZoomer,i=e.data,s=e.elements.sourceMainWrappers,a=e.sourcesPointerProps,c=e.stageIndexes;this.runPositiveSwipedXActions=function(){void 0===c.previous||(u("positive"),o.changeTo(c.previous)),u("zero")},this.runNegativeSwipedXActions=function(){void 0===c.next||(u("negative"),o.changeTo(c.next)),u("zero")},this.saveCurrentSourceOuterPosition=function(){a.upSwipedX=t[c.current].getTranslateX(),a.upSwipedY=t[c.current].getTranslateY()},this.runSourceDownEventTargetActions=function(){i.zoom<=1?r.zoomIn():r.zoomOut()};var u=function(e){s[c.current].classList.add(l),t[c.current][e]()}}function Ze(e){var t=e.core,n=t.lightboxCloser,o=t.pointeringBucket,r=e.data,i=e.elements,s=e.resolve,a=e.sourcesPointerProps,c=(e.stageIndexes,s(Ue));this.runActions=function(){Ne(i.container,i.slideSwipingHoverer),a.isPinching=!1,a.pinchedHypot=0,o.runSwipingTopActionsForPropsAndEvent(a),we(i.sourceWrappersContainer,A)},this.runSwipeActions=function(){1===r.zoom?a.swipedX>0?c.runPositiveSwipedXActions():c.runNegativeSwipedXActions():c.saveCurrentSourceOuterPosition()},this.runNoSwipeActions=function(){a.isSourceDownEventTarget?c.runSourceDownEventTargetActions():n.close()}}function Ve(e){var t=e.data,n=e.resolve,o=e.sourcesPointerProps,r=e.core.zoomer,i=n(Ze);this.listener=function(e){o.isPointering&&(o.isPinching||(o.swipedX?i.runSwipeActions():i.runNoSwipeActions()),i.runActions(e),t.zoom<1&&(r.zoomTo(1),r.stopZooming()))}}function qe(e){var t=e.core.inactiver,n=e.props,o=e.resolve,r=o(je),i=o(Ve),s=o(Pe),a=o(Be);this.moveListener=function(e){t.listener(e),r.listener(e),n.disableThumbs||s.listener(e)},this.upListener=function(e){i.listener(e),n.disableThumbs||a.listener(e)}}function _e(e){var t=e.core.zoomer,n=e.data;this.listener=function(e){if(1===n.zoom){if(e.deltaY>0)return;t.startZooming()}var o=.1*n.zoom,r=n.zoom;e.deltaY<0?r+=o:(r-=o)<1&&(r=1),t.zoomTo(r),1===r&&t.stopZooming()}}function Je(e){var t=e.data,n=e.elements,o=e.stageIndexes;this.runOpacity0ActionUsingMethod=function(e){n.slideButtonPrevious&&(n.slideButtonPrevious.classList[e](y),n.slideButtonNext.classList[e](y))},this.runActiveEnhancementActionUsingMethod=function(e){t.isThumbing?n.thumbsContainer.classList[e](M):n.captions[o.current]&&n.captions[o.current].classList[e](w)}}function $e(e){var t=e.core.zoomer,n=e.data,o=e.elements,r=e.sourcesPointerProps;this.runPinchActions=function(e){r.isPinching=!0,r.pinchedHypot=De(e),Te(o.sourceWrappersContainer,A),1===n.zoom&&t.startZooming()}}function Ge(e){var t,n,o,r=e.data,i=e.elements,s=r.captionHeights,a=r.notThumbedSourceEnhancementWrapperScales,c=r.notThumbedSourceEnhancementWrapperTranslatesY,u=i.sourceEnhancementWrappers,l=i.sources;this.setUpThumbedEnhancementWrapperTransform=function(){t=i.thumbsContainer.offsetHeight,n=r.thumbedSourceEnhancementWrapperTranslateY,o="translateY(".concat(n,"px) scale(").concat(r.thumbedSourceEnhancementWrapperScale,")")},this.setUpNotThumbedEnhancementWrapperTransformAtIndex=function(e){t=s[e],n=c[e],o="translateY(".concat(n,"px) scale(").concat(a[e],")")},this.ifSourceIsLoadedTransformEnhancementWrapperAtIndex=function(e){l[e]&&(innerWidth<innerHeight&&l[e].offsetWidth>l[e].offsetHeight+t?u[e].style.transform="translateY(".concat(n/2,"px) scale(1)"):u[e].style.transform=o)}}function Ke(e){var t,n,o;!function(e){var t=e.core.captionsActioner,n=e.data,o=e.elements.captions;t.changeActiveCaptionFromTo=function(e,t){n.isThumbing||(r(e,we),r(t,Te))};var r=function(e,t){o[e]&&t(o[e],w)}}(e),n=(t=e).core.classFacade,o=t.elements,n.removeFromEachElementClassIfContains=function(e,t){for(var n=0;n<o[e].length;n++)we(o[e][n],t)},function(e){var t=e.core,n=t.clickZoomer,o=t.zoomer,r=e.data,i=e.elements,s=e.props.zoomIncrement,a=Se((function(){we(i.sourceWrappersContainer,l)}),300);n.zoomIn=function(){c(),u(r.zoom+s)},n.zoomOut=function(){r.zoom-s<=1?1!==r.zoom&&(u(1),o.stopZooming()):(c(),u(r.zoom-s),1===r.zoom&&o.stopZooming())};var c=function(){1===r.zoom&&o.startZooming()},u=function(e){Te(i.sourceWrappersContainer,l),o.zoomTo(e),a()}}
1314(e),function(e){var t=e.core.eventsDispatcher,n=e.props;t.dispatch=function(t){n[t]&&n[t](e)}}(e),function(e){var t=e.componentsServices,n=e.core.fullscreenToggler;n.enterFullscreen=function(){t.enterFullscreen();var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},n.exitFullscreen=function(){t.exitFullscreen(),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()}}(e),function(e){var t,n,o,r=e.core,i=r.inactiver,s=r.globalEventsController,a=r.windowResizeActioner,c=e.middleware,u=e.resolve,l=u(qe),d=u(ze),h=u(_e);s.addListeners=function(){se()?(t=ue(l.moveListener,le),n=ue(l.upListener,le),document.addEventListener("touchstart",i.listener,{passive:!0}),document.addEventListener("touchmove",t,{passive:!0}),document.addEventListener("touchend",n)):(document.addEventListener("mousedown",i.listener),document.addEventListener("mousemove",l.moveListener),document.addEventListener("mouseup",l.upListener)),addEventListener("resize",a.runActions),document.addEventListener("keydown",d.listener);var e=We();o=c(o=function(t){return e()&&h.listener(t)},me),document.addEventListener("wheel",o)},s.removeListeners=function(){se()?(document.removeEventListener("touchstart",i.listener),document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)):(document.removeEventListener("mousedown",i.listener),document.removeEventListener("mousemove",l.moveListener),document.removeEventListener("mouseup",l.upListener)),removeEventListener("resize",a.runActions),document.removeEventListener("keydown",d.listener),document.removeEventListener("wheel",o)}}(e),function(e){var t=e.core.inactiver,n=e.data,o=e.elements,r=e.props.UIFadeOutTime,i=!1,s=Se((function(){i=!0,a(c)}),r);t.listener=function(){s(),i&&(a(u),i=!1)};var a=function(e){e(o.nav),1===n.zoom&&o.slideButtonPrevious&&(e(o.slideButtonPrevious),e(o.slideButtonNext)),n.isThumbing&&e(o.thumbsContainer)},c=function(e){e.classList.add(y)},u=function(e){e.classList.remove(y)}}(e),function(e){var t=e.core.lightboxCloser,n=(0,e.resolve)(Ae);t.close=function(){n.isLightboxFadingOut||n.runActions()}}(e),tt(e),function(e){var t=e.core.pointeringBucket,n=e.elements;t.runSwipingDownActionsForPropsAndEvent=function(e,t){e.isPointering=!0,e.downClientX=Re(t),e.swipedX=0},t.runSwipingMoveActionsForPropsAndEvent=function(e,t){Te(n.container,a),e.swipedX=Re(t)-e.downClientX},t.runSwipingTopActionsForPropsAndEvent=function(e){we(n.container,a),e.isPointering=!1}}(e),function(e){var t=e.data,n=e.core.scrollbarRecompensor;n.addRecompense=function(){"complete"===document.readyState?o():window.addEventListener("load",(function(){o(),n.addRecompense=o}))};var o=function(){document.body.offsetHeight>window.innerHeight&&(document.body.style.marginRight=t.scrollbarWidth+"px")};n.removeRecompense=function(){document.body.style.removeProperty("margin-right")}}(e),Ee(e),function(e){var t=e.core,n=t.slideChangeFacade,o=t.slideIndexChanger,r=t.stageManager;e.props.sources.length>1?(n.changeToPrevious=function(){o.jumpTo(r.getPreviousSlideIndex())},n.changeToNext=function(){o.jumpTo(r.getNextSlideIndex())}):(n.changeToPrevious=function(){},n.changeToNext=function(){})}(e),function(e){var t=e.collections.sourceMainWrapperTransformers,n=e.componentsServices,o=e.core,r=o.captionsActioner,i=o.classFacade,s=o.eventsDispatcher,a=o.slideIndexChanger,c=o.sourceDisplayFacade,u=o.stageManager,d=o.thumbsTransformer,h=o.zoomer,p=e.elements.sourceAnimationWrappers,m=e.props,g=m.disableThumbs,b=m.initialAnimation,v=m.slideChangeAnimation,x=e.stageIndexes,w=Se((function(){i.removeFromEachElementClassIfContains("sourceAnimationWrappers",f)}),300);a.changeTo=function(t){Ie(e,t),h.ifZoomingResetZoom(),r.changeActiveCaptionFromTo(x.current,t),x.current=t,u.updateStageIndexes(),g||d.transformToCurrentWithTransition(),n.setSlideNumber(t+1),c.displaySourcesWhichSh
1314ouldBeDisplayed(),s.dispatch("onSlideChange")},a.jumpTo=function(e){var n=x.current;a.changeTo(e),i.removeFromEachElementClassIfContains("sourceMainWrappers",l),we(p[n],b),we(p[n],v),p[n].classList.add(f),we(p[e],b),we(p[e],f),p[e].classList.add(v),w(),t[e].zero(),setTimeout((function(){n!==x.current&&t[n].negative()}),270)}}(e),function(e){var t=e.core.sourceEnhancementWrappersTransformer,n=e.data,o=(0,e.resolve)(Ge);t.ifSourceIsLoadedTransformEnhancementWrapperAtIndex=function(e){n.isThumbing?o.setUpThumbedEnhancementWrapperTransform():o.setUpNotThumbedEnhancementWrapperTransformAtIndex(e),o.ifSourceIsLoadedTransformEnhancementWrapperAtIndex(e)},t.ifSourceIsLoadedTransformThumbedEnhancementWrapperAtIndex=function(e){o.setUpThumbedEnhancementWrapperTransform(e),o.ifSourceIsLoadedTransformEnhancementWrapperAtIndex(e)},t.ifSourceIsLoadedTransformNotThumbedEnhancementWrapperAtIndex=function(e){o.setUpNotThumbedEnhancementWrapperTransformAtIndex(e),o.ifSourceIsLoadedTransformEnhancementWrapperAtIndex(e)}}(e),function(e){var t=e.collections.sourcesRenderFunctions,n=e.core.sourceDisplayFacade,o=e.props.loadOnlyCurrentSource,r=e.stageIndexes;function i(e){t[e]&&(t[e](),delete t[e])}n.displaySourcesWhichShouldBeDisplayed=function(){if(o)i(r.current);else for(var e in r)i(r[e])}}(e),function(e){var t=e.core,n=t.classFacade,o=t.sourcesPointerDown,r=t.pointeringBucket,i=e.elements,s=e.resolve,a=e.sourcesPointerProps,c=e.stageIndexes,u=i.sources,d=s($e);o.listener=function(e){"VIDEO"===e.target.tagName||e.touches||e.preventDefault(),r.runSwipingDownActionsForPropsAndEvent(a,e),a.isMoveCallFirst=!0,a.downClientY=He(e),2===Ye(e)?d.runPinchActions(e):n.removeFromEachElementClassIfContains("sourceMainWrappers",l);var t=u[c.current];t&&t.contains(e.target)?a.isSourceDownEventTarget=!0:a.isSourceDownEventTarget=!1}}(e),function(e){var t=e.stageIndexes,n=e.core.stageManager,o=e.props.sources.length-1;n.getPreviousSlideIndex=function(){return 0===t.current?o:t.current-1},n.getNextSlideIndex=function(){return t.current===o?0:t.current+1},n.updateStageIndexes=0===o?function(){}:1===o?function(){0===t.current?(t.next=1,delete t.previous):(t.previous=0,delete t.next)}:function(){t.previous=n.getPreviousSlideIndex(),t.next=n.getNextSlideIndex()},n.isSourceInStage=o<=2?function(){return!0}:function(e){var n=t.current;if(0===n&&e===o||n===o&&0===e)return!0;var r=n-e;return-1===r||0===r||1===r}}(e),function(e){var t=e.collections,n=t.sourceMainWrapperTransformers,o=t.sourceSizers,r=e.core,i=r.sourceEnhancementWrappersTransformer,s=r.windowResizeActioner,a=r.thumbsTransformer,c=e.data,u=e.elements,d=e.props,h=d.disableThumbs,p=d.sources,m=e.stageIndexes,f=c.notThumbedSourceEnhancementWrapperScales,g=c.captionHeights,b=c.notThumbedSourceEnhancementWrapperTranslatesY,v=u.captions,x=u.sourceMainWrappers,w=u.thumbs;s.runActions=function(){innerWidth<992?c.maxSourceWidth=innerWidth:c.maxSourceWidth=.9*innerWidth,c.maxSourceHeight=.9*innerHeight,h||(c.thumbedSourceEnhancementWrapperScale=1-u.thumbsContainer.offsetHeight/innerHeight,c.thumbedSourceEnhancementWrapperTranslateY=-u.thumbsContainer.offsetHeight/2),0===c.unloadedThumbsCount&&s.runThumbsActions();for(var e=0;e<p.length;e++){if(v[e]){g[e]=v[e].offsetHeight;var t=g[e]-25;f[e]=1-t/innerHeight,b[e]=-t/2}else f[e]=1,b[e]=0;we(x[e],l),i.ifSourceIsLoadedTransformEnhancementWrapperAtIndex(e),e!==m.current&&n[e].negative(),o[e]&&o[e].adjustSize()}},s.runThumbsActions=function(){c.thumbsInnerWidth=0;for(var e=0;e<p.length;e++)c.thumbsInnerWidth+=w[e].offsetWidth+8;a.transformToCurrent()}}(e),function(e){var t=e.collections.sourceMainWrapperTransformers,n=e.core,o=n.sourceEnhancementWrappersTransformer,r=n.zoomer,i=e.data,s=e.elements,a=e.resolve,c=e.sourcesPointerProps,u=e.stageIndexes,d=s.sources,h=s.sourceMainWrappers,p=a(Je);r.zoomTo=function(e){i.zoom=f(e),s.sourceWrappersContainer.style.transform="scale(".concat(i.zoom,")")},r.ifZoomingResetZoom=function(){1!==i.zoom&&(r.zoomTo(1),r.stopZooming())},r.startZooming=function(){m("grab"),p.runOpacity0ActionUsingMethod("add"),p.runActiveEnhancementActionUsingMethod("remove"),o.ifSourceIsLoadedTransformEnhancementWrapperAtIndex(u.current)},r.stopZooming=function(){m("zoom-in"),p.runOpacity0ActionUsingMethod("remove"),p.runActiveEnhancementActionUsingMethod("add"),h[u.current].classList.add(l),t[u.current].translate(0,0).zero(),o.ifSourceIsLoadedTransformEnhancementWrapperAtIndex(u.current),c.upSwipedX=0,c.upSwipedY=0};var m=function(e){d[u.current]&&(d[u.current].style.cursor=e)},f=function(e){return parseFloat(e.toPrecision(12))}}(e)}function Qe(e,t){var n=e.data.isThumbing,o=e.elements,r=o.captions,i=o.container,s=e.props.captions,a=e.stageIndexes.current;r[t]=document.createElement("div");var u="".concat(v," ").concat(c);a!==t||n||(u+=" ".concat(w)),r[t].className=u;var l=document.createElement("div");l.className=x,l.innerHTML=s[t],r[t].appendChild(l),i.appendChild(r[t])}
1314function et(e){var t=e.core.eventsDispatcher,n=e.data,o=e.elements,i=e.props,a=i.disableThumbs,c=i.showThumbsOnMount,u=i.sources;n.isInitialized=!0,n.unloadedThumbsCount=u.length,function(e){for(var t=e.collections.sourceMainWrapperTransformers,n=e.props.sources,o=e.resolve,r=0;r<n.length;r++)t[r]=o(be,[r])}(e),a||(n.isThumbing=c,Le(e)),Ke(e),o.container=document.createElement("div"),o.container.className="".concat(r,"container ").concat(s," ").concat(g),function(e){var t=e.elements;t.slideSwipingHoverer=document.createElement("div"),t.slideSwipingHoverer.className="".concat(r,"slide-swiping-hoverer ").concat(s," ").concat(d)}(e),ge(e),function(e){var t=e.elements;t.slideshowBar=document.createElement("div"),t.slideshowBar.className="".concat(r,"slideshow-bar ").concat(d),t.container.appendChild(t.slideshowBar)}(e),function(e){var t=e.core.sourcesPointerDown.listener,n=e.elements,o=e.props.sources,r=new de,i=document.createElement("div");i.className="".concat(C," ").concat(d," ").concat(s),n.container.appendChild(i),i.addEventListener("mousedown",r.getMouseDownListenerFunc(t)),i.addEventListener("touchstart",r.getTouchStartListenerForFunc(t)),n.sourceWrappersContainer=i;for(var a=0;a<o.length;a++)ie(e,a)}(e),function(e){for(var t=e.props.captions,n=0;n<t.length;n++)t[n]&&Qe(e,n)}(e),u.length>1&&function(e){ve(e,"previous"),ve(e,"next")}(e),a||Ce(e),function(e){for(var t=e.props.sources,n=e.resolve,o=n(O),r=n(te),i=n(oe,[o,r]),s=0;s<t.length;s++)if("string"==typeof t[s]){var a=i.getTypeSetByClientForIndex(s);if(a)r.runActionsForSourceTypeAndIndex(a,s);else{var c=o.getSourceTypeFromLocalStorageByUrl(t[s]);c?r.runActionsForSourceTypeAndIndex(c,s):i.retrieveTypeWithXhrForIndex(s)}}else r.runActionsForSourceTypeAndIndex("custom",s)}(e),t.dispatch("onInit")}function tt(e){var t=e.collections.sourceMainWrapperTransformers,n=e.componentsServices,o=e.core,r=o.captionsActioner,i=o.eventsDispatcher,s=o.lightboxOpener,a=o.globalEventsController,c=o.scrollbarRecompensor,l=o.sourceDisplayFacade,d=o.stageManager,h=o.windowResizeActioner,p=e.data,m=e.elements,f=e.stageIndexes;s.open=function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s=f.current;Ie(e,o),f.current=o,p.isInitialized?i.dispatch("onShow"):et(e),d.updateStageIndexes(),l.displaySourcesWhichShouldBeDisplayed(),r.changeActiveCaptionFromTo(s,o),n.setSlideNumber(o+1),document.body.appendChild(m.container),document.documentElement.classList.add(u),c.addRecompense(),a.addListeners(),h.runActions(),t[f.current].zero(),i.dispatch("onOpen")}}function nt(){var e=localStorage.getItem("fslightbox-scrollbar-width");if(e)return e;var t=function(){var e=document.createElement("div"),t=e.style;return t.visibility="hidden",t.width="100px",t.msOverflowStyle="scrollbar",t.overflow="scroll",e}(),n=function(){var e=document.createElement("div");return e.style.width="100%",e}();document.body.appendChild(t);var o=t.offsetWidth;t.appendChild(n);var r=n.offsetWidth;document.body.removeChild(t);var i=o-r;return localStorage.setItem("fslightbox-scrollbar-width",i.toString()),i}function ot(e,t,n){return(ot=rt()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&it(r,n.prototype),r}).apply(null,arguments)}function rt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function it(e,t){return(it=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function st(e){return function(e){if(Array.isArray(e))return at(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return at(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return at(e,t)}(e)||function(){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 at(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function ct(){for(var e=document.getElementsByTagName("a"),t=function(t){if(!e[t].hasAttribute("data-fslightbox"))return"continue";var n=e[t].getAttribute("data-fslightbox"),o=e[t].getAttribute("href");fsLightboxInstances[n]||(fsLightboxInstances[n]=new FsLightbox);var r=null;r="#"===o.charAt(0)?document.getElementById(o.substring(1)):o,fsLightboxInstances[n].props.sources.push(r),fsLightboxInstances[n].elements.a.push(e[t]);var i=fsLightboxInstances[n].props.sources.length-1;e[t].onclick=function(e){e.preventDefault(),fsLightboxInstances[n].open(i)},d("captions","data-caption"),d("customClasses","data-class"),d("customClasses","data-custom-class"),d("types","data-type"),d("thumbs","data-thumb"),d("videosPosters","data-vi
1314deo-poster");for(var s=["href","data-fslightbox","data-caption","data-class","data-custom-class","data-type","data-thumb","data-video-poster"],a=e[t].attributes,c=fsLightboxInstances[n].props.customAttributes,u=0;u<a.length;u++)if(-1===s.indexOf(a[u].name)&&"data-"===a[u].name.substr(0,5)){c[i]||(c[i]={});var l=a[u].name.substr(5);c[i][l]=a[u].value}function d(o,r){e[t].hasAttribute(r)&&(fsLightboxInstances[n].props[o][i]=e[t].getAttribute(r))}},n=0;n<e.length;n++)t(n);var o=Object.keys(fsLightboxInstances);window.fsLightbox=fsLightboxInstances[o[o.length-1]]}window.FsLightbox=function(){var e=this;this.props={sources:[],maxYoutubeDimensions:null,customAttributes:[],customClasses:[],types:[],thumbs:[],thumbsIcons:[],captions:[],videosPosters:[],customToolbarButtons:[],initialAnimation:g,slideChangeAnimation:m,slideDistance:.3,slideshowTime:8e3,UIFadeOutTime:8e3,zoomIncrement:.25,toolbarButtons:{thumbs:{width:"17px",height:"17px",viewBox:"0 0 22 22",d:"M 3 2 C 2.448 2 2 2.448 2 3 L 2 6 C 2 6.552 2.448 7 3 7 L 6 7 C 6.552 7 7 6.552 7 6 L 7 3 C 7 2.448 6.552 2 6 2 L 3 2 z M 10 2 C 9.448 2 9 2.448 9 3 L 9 6 C 9 6.552 9.448 7 10 7 L 13 7 C 13.552 7 14 6.552 14 6 L 14 3 C 14 2.448 13.552 2 13 2 L 10 2 z M 17 2 C 16.448 2 16 2.448 16 3 L 16 6 C 16 6.552 16.448 7 17 7 L 20 7 C 20.552 7 21 6.552 21 6 L 21 3 C 21 2.448 20.552 2 20 2 L 17 2 z M 3 9 C 2.448 9 2 9.448 2 10 L 2 13 C 2 13.552 2.448 14 3 14 L 6 14 C 6.552 14 7 13.552 7 13 L 7 10 C 7 9.448 6.552 9 6 9 L 3 9 z M 10 9 C 9.448 9 9 9.448 9 10 L 9 13 C 9 13.552 9.448 14 10 14 L 13 14 C 13.552 14 14 13.552 14 13 L 14 10 C 14 9.448 13.552 9 13 9 L 10 9 z M 17 9 C 16.448 9 16 9.448 16 10 L 16 13 C 16 13.552 16.448 14 17 14 L 20 14 C 20.552 14 21 13.552 21 13 L 21 10 C 21 9.448 20.552 9 20 9 L 17 9 z M 3 16 C 2.448 16 2 16.448 2 17 L 2 20 C 2 20.552 2.448 21 3 21 L 6 21 C 6.552 21 7 20.552 7 20 L 7 17 C 7 16.448 6.552 16 6 16 L 3 16 z M 10 16 C 9.448 16 9 16.448 9 17 L 9 20 C 9 20.552 9.448 21 10 21 L 13 21 C 13.552 21 14 20.552 14 20 L 14 17 C 14 16.448 13.552 16 13 16 L 10 16 z M 17 16 C 16.448 16 16 16.448 16 17 L 16 20 C 16 20.552 16.448 21 17 21 L 20 21 C 20.552 21 21 20.552 21 20 L 21 17 C 21 16.448 20.552 16 20 16 L 17 16 z",title:"Thumbnails"},zoomIn:{width:"20px",height:"20px",viewBox:"0 0 30 30",d:"M 13 3 C 7.4889971 3 3 7.4889971 3 13 C 3 18.511003 7.4889971 23 13 23 C 15.396508 23 17.597385 22.148986 19.322266 20.736328 L 25.292969 26.707031 A 1.0001 1.0001 0 1 0 26.707031 25.292969 L 20.736328 19.322266 C 22.148986 17.597385 23 15.396508 23 13 C 23 7.4889971 18.511003 3 13 3 z M 13 5 C 17.430123 5 21 8.5698774 21 13 C 21 17.430123 17.430123 21 13 21 C 8.5698774 21 5 17.430123 5 13 C 5 8.5698774 8.5698774 5 13 5 z M 12.984375 7.9863281 A 1.0001 1.0001 0 0 0 12 9 L 12 12 L 9 12 A 1.0001 1.0001 0 1 0 9 14 L 12 14 L 12 17 A 1.0001 1.0001 0 1 0 14 17 L 14 14 L 17 14 A 1.0001 1.0001 0 1 0 17 12 L 14 12 L 14 9 A 1.0001 1.0001 0 0 0 12.984375 7.9863281 z",title:"Zoom In"},zoomOut:{width:"20px",height:"20px",viewBox:"0 0 30 30",d:"M 13 3 C 7.4889971 3 3 7.4889971 3 13 C 3 18.511003 7.4889971 23 13 23 C 15.396508 23 17.597385 22.148986 19.322266 20.736328 L 25.292969 26.707031 A 1.0001 1.0001 0 1 0 26.707031 25.292969 L 20.736328 19.322266 C 22.148986 17.597385 23 15.396508 23 13 C 23 7.4889971 18.511003 3 13 3 z M 13 5 C 17.430123 5 21 8.5698774 21 13 C 21 17.430123 17.430123 21 13 21 C 8.5698774 21 5 17.430123 5 13 C 5 8.5698774 8.5698774 5 13 5 z M 9 12 A 1.0001 1.0001 0 1 0 9 14 L 17 14 A 1.0001 1.0001 0 1 0 17 12 L 9 12 z",title:"Zoom Out"},slideshow:{start:{width:"16px",height:"16px",viewBox:"0 0 30 30",d:"M 6 3 A 1 1 0 0 0 5 4 A 1 1 0 0 0 5 4.0039062 L 5 15 L 5 25.996094 A 1 1 0 0 0 5 26 A 1 1 0 0 0 6 27 A 1 1 0 0 0 6.5800781 26.8125 L 6.5820312 26.814453 L 26.416016 15.908203 A 1 1 0 0 0 27 15 A 1 1 0 0 0 26.388672 14.078125 L 6.5820312 3.1855469 L 6.5800781 3.1855469 A 1 1 0 0 0 6 3 z",title:"Turn on slideshow"},pause:{width:"14px",height:"14px",viewBox:"0 0 356.19 356.19",d:"M121,0c18,0,33,15,33,33v372c0,18-15,33-33,33s-32-15-32-33V33C89,15,103,0,121,0zM317,0c18,0,32,15,32,33v372c0,18-14,33-32,33s-33-15-33-33V33C284,15,299,0,317,0z",title:"Turn off slideshow"}},fullscreen:{enter:{width:"20px",height:"20px",viewBox:"0 0 18 18",d:"M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z",title:"Enter fullscreen"},exit:{width:"24px",height:"24px",viewBox:"0 0 950 1024",d:"M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z",title:"Exit fullscreen"}},close:{width:"20px",height:"20px",viewBox:"0 0 24 24",d:"M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z",title:"Close"}},slideButtons:{previous:{width:"20px",height:"20px",viewBox:"0 0 20 20",d:"M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184
1314-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z",title:"Previous"},next:{width:"20px",height:"20px",viewBox:"0 0 20 20",d:"M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z",title:"Next"}}},this.data={isInitialized:!1,isThumbing:!1,maxSourceWidth:0,maxSourceHeight:0,scrollbarWidth:nt(),isFullscreenOpen:!1,isSlideshowOn:!1,captionHeights:[],notThumbedSourceEnhancementWrapperScales:[],sourceEnhancementFixerWrapperTranslatesY:[],thumbedSourceEnhancementWrapperTranslateY:null,notThumbedSourceEnhancementWrapperTranslatesY:[],zoom:1},this.sourcesPointerProps={isPointering:!1,downClientX:null,downClientY:null,isSourceDownEventTarget:!1,isMoveCallFirst:!1,swipedX:0,swipedY:0,upSwipedX:0,upSwipedY:0,pinchedHypot:0},this.stageIndexes={},this.elements={a:[],captions:[],container:null,nav:null,slideSwipingHoverer:null,slideButtonPrevious:null,slideButtonNext:null,sourceWrappersContainer:null,slideshowBar:null,sourceAnimationWrappers:[],sourceEnhancementWrappers:[],sourceEnhancementFixerWrappers:[],sourceMainWrappers:[],sources:[]},this.componentsServices={enterFullscreen:null,exitFullscreen:null,setSlideNumber:function(){},startSlideshow:null,stopSlideshow:null},this.middleware=function(t,n){return ue(t,n,[e])},this.resolve=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.unshift(e),ot(t,st(n))},this.collections={sourceMainWrapperTransformers:[],sourcesLoadsHandlers:[],sourcesRenderFunctions:[],sourceSizers:[]},this.core={captionsActioner:{},classFacade:{},clickZoomer:{},eventsDispatcher:{},fullscreenToggler:{},globalEventsController:{},inactiver:{},lightboxCloser:{},lightboxOpener:{},lightboxUpdater:{},pointeringBucket:{},scrollbarRecompensor:{},slideshowManager:{},slideChangeFacade:{},slideIndexChanger:{},sourceEnhancementWrappersTransformer:{},sourceDisplayFacade:{},sourcesPointerDown:{},stageManager:{},swipingActioner:{},windowResizeActioner:{},zoomer:{}},tt(this),this.open=this.core.lightboxOpener.open,this.close=function(){return e.core.lightboxCloser.close()}},window.fsLightboxInstances={},ct(),window.refreshFsLightbox=function(){for(var e in fsLightboxInstances){var t=fsLightboxInstances[e].props;fsLightboxInstances[e]=new FsLightbox,fsLightboxInstances[e].props=t,fsLightboxInstances[e].props.sources=[],fsLightboxInstances[e].elements.a=[]}ct()}}])}));
1315
1316/* ==== INCLUDE: /js/blocks/gallery.js ==== */
1317
1318;(function() {
1319
1320    let instance = null
1321
1322    document.addEventListener('editor.on', () => {
1323        if( instance ) {
1324            instance.close()
1325            instance = null
1326        }
1327    })
1328
1329
1330    function openLightbox( id, galleryElem, imgClicked ) {
1331        if( !window.FsLightbox ) {
1332            return
1333        }
1334        if( document.querySelector('html').classList.contains('editing') ) {
1335            return
1336        }
1337        const lightbox = new FsLightbox(id)
1338        lightbox.props.exitFullscreenOnClose = true
1339        const clickedSrc = imgClicked && imgClicked.getAttribute('src')
1340        let index = 0
1341        const sources = []
1342        const captions = []
1343        galleryElem.querySelectorAll( 'img.gallery-image').forEach( (img,idx) => {
1344            if( img.getAttribute('src') === clickedSrc ) {
1345                index = idx
1346            }
1347            sources.push( img.getAttribute('data-original'))
1348            captions.push( img.getAttribute('alt') || '' )
1349        })
1350        lightbox.props.captions = captions
1351        lightbox.props.sources = sources
1352        lightbox.props.onClose = () => {
1353            instance = null
1354        }
1355        lightbox.props.disableThumbs = true
1356        lightbox.props.slideChangeAnimation = 'slide-change-animation'
1357        lightbox.open(index)
1358        instance = lightbox
1359    }
1360
1361    function checkInitGallery(id) {
1362        if( !id ) {
1363            return
1364        }
1365        const el = document.getElementById(id)
1366        if( !el ) {
1367            return
1368        }
1369        const outer = el.querySelector('.m-gallery-outer')
1370        if( !outer ) {
1371            return
1372        }
1373        if( outer.__initedLightbox ) {
1374            return
1375        }
1376        if( !outer.classList.contains('lightbox')) {
1377            return
1378        }
1379        outer.__initedLightbox = true
1380
1381        outer.querySelectorAll('.m-gallery-item-content').forEach( item => {
1382            item.addEventListener( 'click', event => {
1383                event.preventDefault();
1384                event.stopPropagation();
1385                const img = event.target.closest('.m-gallery-item-content')
1386                    .querySelector('img')
1387                //console.log( 'click', img)
1388                if( !img ) {
1389                    return
1390                }
1391                openLightbox( id, outer, img )
1392            })
1393        })
1394
1395        //console.log( 'initializing fslightbox' )
1396    }
1397
1398    document.addEventListener( 'DOMContentLoaded', () => {
1399        document.querySelectorAll( '.img-gallery-100' ).forEach( el => {
1400            checkInitGallery( el.getAttribute('id'))
1401        })
1402    })
1403
1404})();
1405
1406/* ==== INCLUDE: /js/blocks/forms.js ==== */
1407
1408;(function() {
1409
1410    // --- WAF attestation token (alpha) --------------------------------------
1411    // Active only when the server emits window._wafTokenEndpoint (blank
1412    // waf.token.url in wps-application.properties = never emitted = inert).
1413    // Contract: never block, never break a submission -- any failure means no
1414    // token, the form submits exactly as before and the server scores "missing".
1415    const wafToken = (function() {
1416        let cached = null       // { token, exp }
1417        let inflight = null
1418
1419        const endpoint = () => window._wafTokenEndpoint
1420        const fresh = () => cached && (cached.exp - 30) > Math.floor(Date.now() / 1000)
1421
1422        function request() {
1423            if( !endpoint() || !window.fetch ) {
1424                return Promise.resolve(null)
1425            }
1426            if( inflight ) {
1427                return inflight
1428            }
1429            const ctrl = window.AbortController ? new AbortController() : null
1430            const timer = ctrl && setTimeout( () => ctrl.abort(), 3000 )
1431            inflight = fetch( endpoint(), { mode: 'cors', credentials: 'omit',
1432                                            signal: ctrl ? ctrl.signal : undefined } )
1433                .then( r => r.ok ? r.json() : null )
1434                .then( j => {
1435                    if( j && j.token ) {
1436                        cached = j
1437                    }
1438                    return j && j.token
1439                })
1440                .catch( () => null )    // unreachable/CORS/timeout -> no token
1441                .finally( () => {
1442                    if( timer ) clearTimeout(timer)
1443                    inflight = null
1444                })
1445            return inflight
1446        }
1447
1448        // mint on first interaction with any dynamic form; re-mint when stale
1449        document.addEventListener( 'focusin', ev => {
1450            if( endpoint() && ev.target.closest
1451                    && ev.target.closest('.mrp-dynamic-form') && !fresh() ) {
1452                request()
1453            }
1454        })
1455
1456        return { get: () => fresh() ? cached.token : null, request }
1457    })()
1458
1459
1460    function processSubmitResponse( origForm, html ) {
1461
1462        const targetFormEl = origForm.querySelector('[name=__targetForm]')
1463        if( !targetFormEl ) {
1464            console.error( "Failed to find __targetForm" )
1465            return
1466        }
1467
1468        const targetForm = targetFormEl.getAttribute('value')
1469
1470        const htmlFragment = _G.createFragment(html)
1471
1472        const newTargetFormEl = htmlFragment.querySelector('[name=__targetForm][value="' + targetForm + '"]')
1473
1474        if( !newTargetFormEl ) {
1475            console.error( "Failed to find targetForm in the returned response" )
1476            return
1477        }
1478        const newForm = newTargetFormEl.closest('form')
1479        // const newForm = _G.createFragment( html ).querySelector('form')
1480        newForm.querySelectorAll('.form-error').forEach( el => {
1481            el.remove()
1482        })
1483        origForm.parentElement.replaceChild( newForm, origForm )
1484
1485        setTimeout(function() {
1486            const firstError = newForm.querySelector('.control-error')
1487            if( firstError ) {
1488                const top = firstError.getBoundingClientRect().top
1489                if( top < 0 ) {
1490                    window.scrollTo( {top:  window.scrollY + top - 100, behavior: 'smooth'})
1491                }
1492            }
1493        }, 50)
1494    }
1495
1496    _G.onSubmitForm = ( form, customCallback ) => {
1497
1498        let submitting = true
1499
1500        function submitFeedback( form ) {
1501            setTimeout( () => {
1502
1503                if( !submitting ) {
1504                    return
1505                }
1506                const submit = form.querySelector( '[type=submit]')
1507                if( submit ) {
1508                    // const submitText = submit.innerText;
1509                    // submit.setAttribute('data-submit-text', submitText )
1510                    // submit.innerText = 'Sending'
1511                    submit.classList.add('submitting')
1512                    submit.setAttribute('disabled', 'disabled')
1513                }
1514            }, 100 )
1515        }
1516
1517        function undoSubmitFeedback( form ) {
1518            // note that we are passing our original form, not the new replaced form
1519            // so this will only fire if there was a network issue and no form
1520            // arrived back; otherwise, the new form would have had reset submit anyways
1521            const submit = form.querySelector( '[type=submit]')
1522            if( submit ) {
1523                // submit.innerText = submit.getAttribute('data-submit-text')
1524                submit.classList.remove('submitting')
1525                submit.removeAttribute('disabled')
1526            }
1527        }
1528
1529        let authTk = form.getAttribute('data-tk')
1530        if( !authTk ) {
1531            // try hidden
1532            const hidden = form.querySelector('input[name=__sh]')
1533            if( hidden ) {
1534                authTk = hidden.getAttribute('value')
1535            }
1536            if( !authTk ) {
1537                // bail
1538                console.error( 'auth token missing' )
1539                return
1540            }
1541        }
1542
1543        const data = new URLSearchParams()
1544        for (const pair of new FormData(form)) {
1545            data.append(pair[0], pair[1].toString())
1546        }
1547        data.append( '__src_url', window.location.href )
1548        data.append( '__sh', authTk )
1549
1550        if( !wafToken.get() ) {
1551            wafToken.request()  // last-chance mint; races the submit delay below
1552        }
1553
1554        submitFeedback( form )
1555
1556        setTimeout( () => {
1557            const wafTk = wafToken.get()
1558            if( wafTk ) {
1559                data.append( '__waf_tk', wafTk )
1560            }
1561            fetch( window.location.href, {
1562                method: 'post',
1563                body: data,
1564                headers: {
1565                    'X-Requested-With': 'fetch',
1566                    'X-Form-Submit': 'true',
1567                    'X-Form-Submit-From': window.location.href,
1568                }
1569            }).then( response => {
1570                if( customCallback ) {
1571                    return customCallback(response)
1572                }
1573                const redir = response.headers.get('Location')
1574                if( redir ) {
1575                    return window.location = redir
1576                }
1577                response.text().then( html => {
1578                    // console.log( 'form html', html )
1579
1580                    const error = response.headers.get('X-Form-Error')
1581                    const successURL = response.headers.get( 'X-Success-URL')
1582                    const success = response.headers.get( 'X-Success-Message' )
1583
1584                    if( !error && success && successURL ) {
1585                        window.location = successURL
1586                        return
1587                    }
1588
1589                    processSubmitResponse( form, html )
1590
1591                    if( error ) {
1592                        _G.quickMessage(error, { error: true } );
1593                    }
1594                    else if( success ) {
1595                        _G.quickMessage(success)
1596
1597                        if( window.dataLayer ) {
1598                            window.dataLayer.push( {
1599                                event: 'formSubmitted',
1600                                formURL: window.location.href,
1601                                title: document.title,
1602                                formName: data.get( '__formName') || ''
1603                            })
1604                        }
1605
1606                        window.dispatchEvent( new CustomEvent( "mrp.webFormSubmitted", {
1607                            detail: {
1608                                formURL: window.location.href,
1609                                title: document.title,
1610                                formName: data.get( '__formName') || ''
1611                            }
1612                        }));
1613                    }
1614                })
1615            }).catch( err => {
1616                console.error( "error occurred during form submission", err )
1617                _G.quickMessage('Error occurred during form submission', { error: true } );
1618            }).finally( () => {
1619                submitting = false
1620                undoSubmitFeedback(form)
1621            })
1622        }, 1000 )
1623
1624
1625        return false;
1626    }
1627
1628
1629    function processBlogCommentSubmitResponse( origForm, html ) {
1630
1631        const formID = origForm.getAttribute("id");
1632
1633        const htmlFragment = _G.createFragment(html)
1634
1635        const newForm = htmlFragment.querySelector('#' + formID)
1636
1637        // const successEl = newForm.querySelector(".form-success");
1638        // if( successEl && successEl.innerText ) {
1639        //     const message = successEl.innerText;
1640        //     setTimeout(() => {
1641        //         _G.quickMessage( message, {
1642        //
1643        //         });
1644        //     }, 100 );
1645        //     successEl.remove();
1646        // }
1647
1648        // const newForm = _G.createFragment( html ).querySelector('form')
1649        newForm.querySelectorAll('.form-error').forEach( el => {
1650            el.remove()
1651        })
1652        const authTk = newForm.getAttribute("data-tk");
1653        if( authTk ) {
1654            const authTkEl = document.createElement("input");
1655            authTkEl.setAttribute( "type", "hidden" );
1656            authTkEl.setAttribute( "value", authTk );
1657            newForm.appendChild( authTkEl );
1658        }
1659        const srcUrlEl = document.createElement("input");
1660        srcUrlEl.setAttribute( "type", "hidden" );
1661        srcUrlEl.setAttribute( "value", window.location.href );
1662        newForm.appendChild( srcUrlEl );
1663        origForm.parentElement.replaceChild( newForm, origForm );
1664
1665
1666        setTimeout(function() {
1667            const firstError = newForm.querySelector('.control-error')
1668            if( firstError ) {
1669                const top = firstError.getBoundingClientRect().top
1670                if( top < 0 ) {
1671                    window.scrollTo( {top:  window.scrollY + top - 100, behavior: 'smooth'})
1672                }
1673            }
1674        }, 50)
1675    }
1676
1677    _G.onBlogCommentSubmitForm = ( form, customCallback ) => {
1678
1679        let submitting = true
1680
1681        function submitFeedback( form ) {
1682            setTimeout( () => {
1683
1684                if( !submitting ) {
1685                    return
1686                }
1687                const submit = form.querySelector( '[type=submit]')
1688                if( submit ) {
1689                    // const submitText = submit.innerText;
1690                    // submit.setAttribute('data-submit-text', submitText )
1691                    // submit.innerText = 'Sending'
1692                    submit.classList.add('submitting')
1693                    submit.setAttribute('disabled', 'disabled')
1694                }
1695            }, 100 )
1696        }
1697
1698        function undoSubmitFeedback( form ) {
1699            // note that we are passing our original form, not the new replaced form
1700            // so this will only fire if there was a network issue and no form
1701            // arrived back; otherwise, the new form would have had reset submit anyways
1702            const submit = form.querySelector( '[type=submit]')
1703            if( submit ) {
1704                // submit.innerText = submit.getAttribute('data-submit-text')
1705                submit.classList.remove('submitting')
1706                submit.removeAttribute('disabled')
1707            }
1708        }
1709
1710        let authTk = form.getAttribute('data-tk')
1711        if( !authTk ) {
1712            // try hidden
1713            const hidden = form.querySelector('input[name=__sh]')
1714            if( hidden ) {
1715                authTk = hidden.getAttribute('value')
1716            }
1717            if( !authTk ) {
1718                // bail
1719                console.error( 'auth token missing' )
1720                return
1721            }
1722        }
1723
1724        const data = new URLSearchParams()
1725        for (const pair of new FormData(form)) {
1726            data.append(pair[0], pair[1].toString())
1727        }
1728        data.append( '__src_url', window.location.href )
1729        data.append( '__sh', authTk )
1730
1731        submitFeedback( form )
1732
1733        setTimeout( () => {
1734            fetch( window.location.href, {
1735                method: 'post',
1736                body: data,
1737                headers: {
1738                    'X-Requested-With': 'fetch',
1739                    'X-Form-Submit': 'true',
1740                    'X-Form-Submit-From': window.location.href,
1741                }
1742            }).then( response => {
1743                if( customCallback ) {
1744                    return customCallback(response)
1745                }
1746                const redir = response.headers.get('Location')
1747                if( redir ) {
1748                    return window.location = redir
1749                }
1750                response.text().then( html => {
1751                    // console.log( 'form html', html )
1752
1753                    const error = response.headers.get('X-Form-Error')
1754                    const successURL = response.headers.get( 'X-Success-URL')
1755                    const success = true;
1756                    // const success = "Comment submitted. It will be reviewed and published shortly."
1757
1758                    if( !error && success && successURL ) {
1759                        window.location = successURL
1760                        return
1761                    }
1762
1763                    processBlogCommentSubmitResponse( form, html )
1764
1765                    if( error ) {
1766                        _G.quickMessage(error, { error: true } );
1767                    }
1768                    else {
1769                        // _G.quickMessage(success)
1770
1771                        if( window.dataLayer ) {
1772                            window.dataLayer.push( {
1773                                event: 'formSubmitted',
1774                                formURL: window.location.href,
1775                                title: document.title,
1776                                formName: data.get( '__formName') || ''
1777                            })
1778                        }
1779                    }
1780                })
1781            }).catch( err => {
1782                console.error( "error occurred during form submission", err )
1783                _G.quickMessage('Error occurred during form submission', { error: true } );
1784            }).finally( () => {
1785                submitting = false
1786                undoSubmitFeedback(form)
1787            })
1788        }, 1000 )
1789
1790
1791        return false;
1792    }
1793})()
1794
1795/* ==== INCLUDE: /js/blocks/maps.js ==== */
1796
1797
1798window.mapboxJsLoaded = false
1799window.mapboxCssLoaded = false
1800
1801function initMaps() {
1802    _G.maps = []
1803
1804    // const BG_IMG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAATCAYAAABPwleqAAAAZUlEQVQ4T+2TQQ7AIAgEl88WnyR+lgbSNGotCT31IEezs+IkEgDFxyGDVfM8EWHDCetbWEKWRX8grN9YasXB/HhEEwGXMpzbx5hH54IOHPIr2MrugjfQpQWSveBadZmLYN8guuAEQo5PBQyQLMoAAAAASUVORK5CYII="
1805    // const BG_IMG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAL0lEQVQ4T2NkYGD4z0AmYARp/v+fdP2MjIwMo5pJCPXRACMhsEBKB0GAkehiuHIAy842AX0JUPAAAAAASUVORK5CYII="
1806    const BG_IMG = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAPAA8DASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAABgAI/8QAJRAAAQMEAQQCAwAAAAAAAAAAAQIDBAUGBxEUAAgSExUxISJB/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AN54ixFYtSxPZUyZZdvSpciiQnXn36UwtxxamEFSlKKNkkkkk/e+iXdZi+zbdwHdFQpVpUKmT2eL6pUOmssuo3KZSfFaUgjYJB0fokdWL+6zFtu40tKlVC6OPPg0iJFkM/HyleDiGUJWnaWiDogjYJHRnuT7k8cX/hW4qDQbi59Wl8b0x+DJb8/GS0tX7LbCRpKVH8n+dB//2Q=="
1807
1808    const sources = document.querySelectorAll( '[data-rel=block-map]')
1809    const promises = []
1810
1811    const resizeObserver = new ResizeObserver((entries) => {
1812        entries.forEach( entry => {
1813            const map = entry && entry.target && entry.target['__map']
1814            if( map ) {
1815                try {
1816                    map.resize()
1817                }
1818                catch( e ) {
1819                    console.warn( 'ERROR in maps', e )
1820                }
1821            }
1822        })
1823    })
1824
1825    function addMarker(map, marker) {
1826        // console.log('to add marker', marker)
1827        var m = new mapboxgl.Marker({
1828            color: "#d9534f"
1829        }).setLngLat([marker.geometry.coordinates[0], marker.geometry.coordinates[1]])
1830
1831        try {
1832            m.getElement().setAttribute('data-id', marker.id)
1833        }
1834        catch( e ) {
1835            console.error( e )
1836        }
1837
1838        if (marker.properties && marker.properties.label) {
1839
1840            try {
1841                m.getElement().setAttribute('data-label', marker.properties.label)
1842            }
1843            catch( e ) {
1844                console.error( e )
1845            }
1846
1847            const popup = new mapboxgl.Popup({offset: 25,focusAfterOpen:false})
1848            if (marker.properties.link) {
1849                const link = document.createElement('a')
1850                link.setAttribute('href', marker.properties.link )
1851                link.innerText = marker.properties.label
1852                if( marker.properties.openInNewWindow ) {
1853                    link.setAttribute('target', '_blank')
1854                }
1855                popup.setHTML(link.outerHTML)
1856
1857                m.getElement().classList.add("has-link")
1858            } else {
1859                popup.setText(
1860                    `${marker.properties.label}`
1861                )
1862            }
1863            m.setPopup(popup)
1864        }
1865        m.addTo(map);
1866        if (marker.properties && !marker.properties.hideInitially) {
1867            m.togglePopup();
1868        }
1869        return m
1870    }
1871
1872    function addMarkers( map, geojson ) {
1873
1874        // console.log( 'to add markers', geojson )
1875        geojson.__markers = {}
1876        geojson.__markerDefs = {}
1877        geojson.features.forEach( f => {
1878            if( f.geometry && f.geometry.type === 'Point' ) {
1879                const marker = addMarker( map, f )
1880                geojson.__markers[f.id] = marker
1881                geojson.__markerDefs[f.id] = f
1882            }
1883        })
1884    }
1885
1886
1887    function hideAllMarkers( geojson ) {
1888        Object.keys(geojson.__markers || {}).forEach( key => {
1889            const m = geojson.__markers[key]
1890            const p = m.getPopup()
1891            if( p && p.isOpen() ) {
1892                // p.remove()
1893                try {
1894                    // p.getElement().style.opacity = '0'
1895                    // setTimeout(() => {
1896                    m.togglePopup()
1897                    // }, 200)
1898                }
1899                catch( e ) {
1900                    console.error(e)
1901                }
1902            }
1903        })
1904    }
1905
1906    function showAllMarkers( geojson ) {
1907        Object.keys(geojson.__markers || {}
1907).forEach( key => {
1908            const m = geojson.__markers[key]
1909            const p = m.getPopup()
1910            if( p && !p.isOpen() ) {
1911                try {
1912                    m.togglePopup()
1913                }
1914                catch( e ) {
1915                    console.error(e)
1916                }
1917            }
1918        })
1919    }
1920
1921    function restoreAllMarkers( geojson ) {
1922        Object.keys(geojson.__markers || {}).forEach( key => {
1923            const m = geojson.__markers[key]
1924            const p = m.getPopup()
1925            if( p && !p.isOpen() ) {
1926                try {
1927                    m.togglePopup()
1928                }
1929                catch( e ) {
1930                    console.error(e)
1931                }
1932            }
1933        })
1934    }
1935
1936
1937    if( sources.length > 0 ) {
1938        promises.push( new Promise( (resolve, reject) => {
1939            if( window.mapboxJsLoaded ) {
1940                window.mapboxJsLoaded = true
1941                return resolve()
1942            }
1943            // LazyLoad.js( "https://api.mapbox.com/mapbox-gl-js/v1.11.1/mapbox-gl.js", () => {
1944            //     resolve()
1945            // })
1946            LazyLoad.js( "https://api.tiles.mapbox.com/mapbox-gl-js/v2.6.1/mapbox-gl.js", () => {
1947                resolve()
1948            })
1949            // LazyLoad.js( "https://api.tiles.mapbox.com/mapbox-gl-js/v2.6.0-beta.1/mapbox-gl.js", () => {
1950            //     resolve()
1951            // })
1952        }))
1953        promises.push( new Promise( (resolve, reject) => {
1954            if( window.mapboxCssLoaded ) {
1955                return resolve()
1956            }
1957            // LazyLoad.css( "https://api.mapbox.com/mapbox-gl-js/v1.11.1/mapbox-gl.css", () => {
1958            //     window.mapboxCssLoaded = true
1959            //     resolve()
1960            // })
1961            LazyLoad.css( "https://api.tiles.mapbox.com/mapbox-gl-js/v2.6.1/mapbox-gl.css", () => {
1962                window.mapboxCssLoaded = true
1963                resolve()
1964            })
1965            // LazyLoad.css( "https://api.tiles.mapbox.com/mapbox-gl-js/v2.6.0-beta.1/mapbox-gl.css", () => {
1966            //     window.mapboxCssLoaded = true
1967            //     resolve()
1968            // })
1969        }))
1970        Promise.all(promises).then( () => {
1971            sources.forEach( source => {
1972                try {
1973                    const jsonSource = source.querySelector('script')
1974                    if( !jsonSource ) {
1975                        return
1976                    }
1977                    const json = JSON.parse( jsonSource.innerHTML )
1978                    mapboxgl.accessToken = json.key
1979                    source.innerHTML = ''
1980
1981                    // this is dumb by mapbox doesn't recognize non-numeric IDs on features
1982                    let id = 1
1983                    json.geoJson.features = json.geoJson.features.map( f => ({
1984                        ...f,
1985                        id: ++id,
1986                        state: { hover: false },
1987                    }))
1988
1989                    console.log( 'geojson', json.geoJson )
1990
1991                    const map = new mapboxgl.Map({
1992                        container: source,
1993                        style: 'mapbox://styles/mapbox/streets-v11',
1994                        center: [json.centerLng, json.centerLat],
1995                        zoom : json.zoom,
1996                        pitch: json.pitch,
1997                        scrollZoom: false,
1998                        attributionControl : false,
1999                        trackResize : true,
2000                        cooperativeGestures: true,
2001                    })
2002                    const nav = new mapboxgl.NavigationControl();
2003                    map.addControl(nav, 'top-left');
2004                    source['__map'] = map
2005                    resizeObserver.observe(source)
2006                    map.on( 'load', () => {
2007                        map.loadImage( BG_IMG, (error, image) => {
2008                            console.log( 'loaded image', image, error )
2009                            map.addImage('mrp_label_bg', image, {
2010                                content: [3, 3, 13, 13],
2011                                stretchX: [[3, 5],[10,12]],
2012                                stretchY: [[3, 5], [8,13]]
2013                            })
2014
2015                            map.addSource( 'data', {
2016                                type: 'geojson',
2017                                data: json.geoJson,
2018                            })
2019                            map.addLayer({
2020                                id: 'line',
2021                                source: 'data',
2022                                type: 'line',
2023                                filter: ['==', ['geometry-type'], 'LineString'],
2024                                layout: {
2025                                    'line-cap': 'round',
2026                                    'line-join': 'round'
2027                                },
2028                                paint: {
2029                                    'line-color': '#3e81a9',
2030                                    'line-width': 2,
2031                                }
2032                            })
2033                            map.addLayer({
2034                                id: 'polygon-fill',
2035                                source: 'data',
2036                                type: 'fill',
2037                                filter: ['==', ['geometry-type'], 'Polygon'],
2038                                paint: {
2039                                    'fill-color': '#3e81a9',
2040                                    'fill-outline-color': '#3e81a9',
2041                                    // 'fill-opacity': 0.1
2042                                    'fill-opacity': [
2043                                        'case',
2044                                        ['==', ['feature-state', 'hover'], true],
2045                                        0.3,
2046                                        0.1
2047                                    ]
2048                                }
2049                            })
2050                            map.addLayer({
2051                                id: 'polygon-line',
2052                                source: 'data',
2053                                type: 'line',
2054                                filter: ['==', ['geometry-type'], 'Polygon'],
2055                                layout: {
2056                                    'line-cap': 'round',
2057                                    'line-join': 'round'
2058                                },
2059                                paint: {
2060                                    'line-color': '#3e81a9',
2061                                    // 'line-width': 2
2062                                    'line-width': [
2063                                        'case',
2064                                        ['==', ['feature-state', 'hover'], true],
2065                                        5,
2066                                        2
2067                                    ]
2068                                }
2069                            })
2070                            map.addLayer({
2071                                id: 'marker-halo',
2072                                source: 'data',
2073                                type: 'circle',
2074                                filter: ['==', ['geometry-type'], 'Point'],
2075                                paint: {
2076                                    'circle-radius': 9,
2077                                    'circle-opacity': 1,
2078                                    // 'circle-color': '#fff',
2079                                    'circle-color': 'transparent' // making transparent
2080                                },
2081                            })
2082                            map.addLayer({
2083                                id: 'marker',
2084                                source: 'data',
2085                                type: 'circle',
2086                                filter: ['==', ['geometry-type'], 'Point'],
2087                                paint: {
2088                                    'circle-radius': 20,
2089                                    'circle-opacity': 1,
2090                                    // 'circle-color': '#3e81a9',
2091                                    'circle-color': 'transparent' // making transparent
2092                                },
2093                            })
2094                            // map.addLayer({
2095                            //     id: 'marker-label',
2096                            //     source: 'data',
2097                            //     type: 'symbol',
2098                            //     filter: ['all', ['has', 'label'], ['!=', 'label', '']],
2099                            //     paint: {
2100                            //         'text-halo-color': '#fff',
2101                            //         'text-halo-width': 2,
2102                            //         'text-halo-blur': 2,
2103                            //         // 'text-color': '#3e81a9',
2104                            //         'text-color': '#333333',
2105                            //     },
2106                            //     layout: {
2107                            //         'text-field': ['get', 'label'],
2108                            //         'text-font': [
2109                            //             'Open Sans Semibold',
2110                            //         ],
2111                            //         'text-offset': [0, -3],
2112                            //         'text-anchor': 'bottom',
2113                            //         'text-size': 16,
2114                            //         'text-allow-overlap': true,
2115                            //         'text-ignore-placement': true,
2116                            //         'text-variable-anchor': ['bottom', 'top'],
2117                            //         'text-justify': 'auto',
2118                            //         'icon-image' : 'mrp_label_bg',
2119                            //         'icon-text-fit' : 'both',
2120                            //         'icon-text-fit-padding': [8,8,8,8],
2121                            //     }
2122                            // })
2123                            addMarkers(map, json.geoJson)
2124
2125                            map.on( 'click', 'polygon-fill', e => {
2126                                // console.log( 'click on', e, e.features )
2127                                if( e.features && e.features[0] ) {
2128                                    const props = e.features[0].properties || {}
2129                                    if (props.link) {
2130                                        if( props.openInNewWindow ) {
2131                                            window.open( props.link, '_blank' )
2132                                        }
2133                                        else {
2134                                            window.location = props.link
2135                                        }
2136                                    }
2137                                }
2138                            })
2139                            let hoverId = -1;
2140                            map.on( 'mousemove', 'polygon-fill', e => {
2141                                // console.log( 'hoverId', hoverId )
2142                                if( e.features && e.features[0] ) {
2143                                    const props = e.features[0].properties || {}
2144                                    if( props.link ) {
2145                                        if( hoverId >= 0 ) {
2146                                            map.setFeatureState(
2147                                                { source: 'data', id: hoverId },
2148                                                { hover: false }
2149                                            )
2150                                        }
2151                                        hoverId = e.features[0].id
2152                                        map.setFeatureState(
2153                                            { source: 'data', id: hoverId },
2154                                            { hover: true }
2155                                        )
2156                                        map.getCanvas().style.cursor = 'pointer'
2157                                    }
2158                                }
2159                            })
2160                            map.on( 'mouseleave', 'polygon-fill', e => {
2161                                // console.log( 'mouse out', e )
2162                                map.getCanvas().style.cursor = ''
2163                                if( hoverId >= 0 ) {
2164                                    map.setFeatureState(
2165                                        { source: 'data', id: hoverId },
2166                                        { hover: false }
2167                                    )
2168                                    hoverId = -1
2169                                }
2170                                // console.log( 'hoverId', hoverId )
2171                            })
2172                            map.on( 'click', e => {
2173                                //showAllMarkers(json.geoJson)
2174                            })
2175                            map.on( 'mouseleave', 'marker', e => {
2176                                //showAllMarkers(json.geoJson)
2177                            })
2178                            // let hoverPopup = null;
2179                            map.on( 'mouseenter', 'marker', e => {
2180                                if( e.features && e.features[0] ) {
2181                                    // console.log( 'marker', json.geoJson.__markers[e.features[0].id] )
2182                                    // if( hoverPopup ) {
2183                                    //     hoverPopup.remove()
2184                                    //     hoverPopup = null;
2185                                    // }
2186                                    hideAllMarkers(json.geoJson)
2187                                    const marker = json.geoJson.__markers[e.features[0].id]
2188                                    if( marker ) {
2189                                        const popup = marker.getPopup()
2190                                        if( popup && !popup.isOpen() ) {
2191                                            // popup.addTo(map)
2192                                            // hoverPopup = popup
2193                                            marker.togglePopup()
2194                                        }
2195                                    }
2196                                }
2197                            })
2198                            // setTimeout(() => {
2199                            //     map.resize()
2200                            // }, 1000)
2201                            // map.on( 'mouseleave', 'marker', e => {
2202                            //     if( hoverPopup ) {
2203                            //         hoverPopup.remove()
2204                            //         hoverPopup = null;
2205                            //     }
2206                            // })
2207                        })
2208                    })
2209                    //console.log( 'geoJSON', json )
2210                }
2211                catch( e ) {
2212                    console.error( 'Failed to init maps', e )
2213                }
2214            })
2215        })
2216    }
2217}
2218
2219document.addEventListener('DOMContentLoaded', () => {
2220    initMaps()
2221
2222    _G.reinitHandlers.push(initMaps)
2223});
2224
2225/* ==== INCLUDE: /js/blocks/brand-footer.js ==== */
2226
2227;(function () {
2228
2229    function hideDelete() {
2230        const deleteElements = document.querySelectorAll('.myrealpage-footer [data-command="delete"]');
2231
2232        deleteElements.forEach(function (element) {
2233            element.style.display = 'none';
2234        });
2235
2236        // const moveupElements = document.querySelectorAll('.myrealpage-footer [data-command="moveup"]');
2237        //
2238        // moveupElements.forEach(function (element) {
2239        //     element.style.display = 'none';
2240        // });
2241        //
2242        // const movedownElements = document.querySelectorAll('.myrealpage-footer [data-command="movedown"]');
2243        //
2244        // movedownElements.forEach(function (element) {
2245        //     element.style.display = 'none';
2246        // });
2247
2248        const cloneElements = document.querySelectorAll('.myrealpage-footer [data-command="clone"]');
2249
2250        cloneElements.forEach(function (element) {
2251            element.style.display = 'none';
2252        });
2253    }
2254
2255    function addRef() {
2256        const links = document.querySelectorAll( ".myrealpage-footer a[href=\"https://myrealpage.com/\"]" );
2257        const hostname = window.location.hostname;
2258        links.forEach( link => {
2259            link.setAttribute( "href", "https://myrealpage.com/?ref=" + encodeURIComponent(hostname));
2260        })
2261    }
2262
2263    document.addEventListener('DOMContentLoaded', function () {
2264        hideDelete();
2265        addRef();
2266    });
2267})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.