(function(e){var t={};function i(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:false,exports:{}};e[r].call(o.exports,o,o.exports,i);o.l=true;return o.exports}i.m=e;i.c=t;i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:true,get:r})};i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:true})};i.t=function(e,t){1&t&&(e=i(e));if(8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);i.r(r);Object.defineProperty(r,"default",{enumerable:true,value:e});if(2&t&&"string"!=typeof e)for(var o in e)i.d(r,o,function(t){return e[t]}.bind(null,o));return r};i.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};i.d(t,"a",t);return t};i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};i.p="https://assets.squarespace.com/universal/scripts-compressed/";return i(i.s="./src/main/webapp/universal/scripts-v6/rollups/image-zoom.manifest.js")})({"./src/main/webapp/universal/node_modules/@babel/runtime/helpers/arrayWithHoles.js":function(e,t){function i(e){if(Array.isArray(e))return e}e.exports=i},"./src/main/webapp/universal/node_modules/@babel/runtime/helpers/interopRequireDefault.js":function(e,t){function i(e){return e&&e.__esModule?e:{default:e}}e.exports=i},"./src/main/webapp/universal/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":function(e,t){function i(e,t){var i=[];var r=true;var o=false;var n=void 0;try{for(var s=e[Symbol.iterator](),a;!(r=(a=s.next()).done);r=true){i.push(a.value);if(t&&i.length===t)break}}catch(e){o=true;n=e}finally{try{r||null==s["return"]||s["return"]()}finally{if(o)throw n}}return i}e.exports=i},"./src/main/webapp/universal/node_modules/@babel/runtime/helpers/nonIterableRest.js":function(e,t){function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}e.exports=i},"./src/main/webapp/universal/node_modules/@babel/runtime/helpers/slicedToArray.js":function(e,t,i){var r=i("./src/main/webapp/universal/node_modules/@babel/runtime/helpers/arrayWithHoles.js");var o=i("./src/main/webapp/universal/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");var n=i("./src/main/webapp/universal/node_modules/@babel/runtime/helpers/nonIterableRest.js");function s(e,t){return r(e)||o(e,t)||n()}e.exports=s},"./src/main/webapp/universal/scripts-v6/image-zoom.js":function(e,t,i){var r=i("./src/main/webapp/universal/src/shared/utils/rendering.js");YUI.add("squarespace-image-zoom",function(e){e.namespace("Squarespace");var t=e.Squarespace.ImageZoom=e.Base.create("image-zoom",e.Base,[],{initializer:function(){if(!this._shouldInitialize())return;if(!this.get("host"))return;this._initializeZoom()},destructor:function(){if(!this._shouldInitialize())return;var e=this.get("zoomedNode");e&&e.remove(true);this.get("host").removeClass(t.CSS_PREFIX).removeClass(t.CSS_PREFIX+"--behavior-"+this.get("behavior"));this.get("dropzone").setStyle("position","").removeClass(t.CSS_PREFIX+"-dropzone");this._zoomTriggerEvent&&this._zoomTriggerEvent.detach();this._mouseMoveEvent&&this._mouseMoveEvent.detach();this._mouseOutEvent&&this._mouseOutEvent.detach();this._resizeEvent&&this._resizeEvent.detach();this._zoomTriggerEvent=null;this._mouseMoveEvent=null;this._mouseOutEvent=null;this._resizeEvent=null},_bindUI:function(){var t=this.get("host");this._zoomTriggerEvent=t.on(this.get("behavior"),this._toggleZoom,this);this._mouseMoveEvent=t.on("mousemove",this._trackMovement,this);this._mouseOutEvent=t.on("mouseout",this._zoomOut,this);this._resizeEvent=e.one(window).on("resize",this._refresh,this)},_shouldInitialize:function(){return!e.UA.mobile&&window.Modernizr.csstransforms},_initializeZoom:function(){var e=this.get("host");var i=e.one("img");var r=this.get("dropzone");e.addClass(t.CSS_PREFIX);e.addClass(t.CSS_PREFIX+"--behavior-"+this.get("behavior"));r.addClass(t.CSS_PREFIX+"-dropzone");"static"===r.getStyle("position")&&r.setStyle("position","relative");if(i.getAttribute("src")){this._appendZoomedNode();this._bindUI()}else i.once("load",function(){this._appendZoomedNode();this._bindUI()},this)},_appendZoomedNode:function(){var i=this.get("host").one("img");var r=i.getAttribute("data-src");if(!r)return null;var o=i.getAttribute("data-image-dimensions");o||(o=i.get("clientWidth")+"x"+i.get("clientHeight"));var n=i.getAttribute("data-image-focal-point");n||(n="0.5,0.5");var s=e.Node.create('
');s.setStyle("transform","scale("+this.get("zoom")+")");s.one("img").plug(e.Squarespace.Loader2,{load:true,mode:"fill"});this.set("zoomedNode",s);this.get("dropzone").append(s)},_refresh:function(){var e=this.get("host").one("img").getAttribute("data-src");var t=this.get("zoomedNode").one("img");t.setAttribute("src",e+"?format="+this._getSquarespaceSizeForWidth());t.fire("refresh")},_toggleZoom:function(e){this.get("_isZoomedIn")?this._zoomOut():this._zoomIn(e);e.stopPropagation()},_zoomIn:function(e){this.get("host").addClass("is-zoomed");this.set("_isZoomedIn",true);this._trackMovement(e)},_zoomOut:function(){this.get("host").removeClass("is-zoomed");this.set("_isZoomedIn",false)},_trackMovement:function(e){if(!this.get("_isZoomedIn"))return;var t=Math.max((e.pageX-this.get("host").getX())/this.get("host").get("clientWidth")*100,0);var i=Math.max((e.pageY-this.get("host").getY())/this.get("host").get("clientHeight")*100,0);this.get("zoomedNode").setStyle("transformOrigin",t+"% "+i+"%")},_getSquarespaceSizeForWidth:function(){var e=this.get("host").one("img").get("clientWidth");return r.getSquarespaceSizeForWidth(e*this.get("zoom"))}},{CSS_PREFIX:"sqs-image-zoom",ATTRS:{host:{value:null,validator:function(t){var i=e.one(t);return e.instanceOf(i,e.Node)&&i.one("img")&&i.all("img").size()<2},writeOnce:true},dropzone:{valueFn:function(){return this.get("host")},validator:function(t){return e.instanceOf(e.one(t),e.Node)},writeOnce:true},behavior:{value:"hover",validator:function(e){if("hover"!==e&&"click"!==e)return false;return true},writeOnce:true},zoom:{value:1.5,validator:function(e){("number"!==typeof e||e<=1||e>5)&&false&&console.warn("[squarespace-image-zoom]: Not a valid zoom value, defaulting to 1.5.");return true},writeOnce:true},_isZoomedIn:{value:false}}})},"1.0",{requires:["base","event","node","squarespace-image-loader","yui-base"]})},"./src/main/webapp/universal/scripts-v6/rollups/image-zoom.manifest.js":function(e,t,i){i("./src/main/webapp/universal/scripts-v6/image-zoom.js")},"./src/main/webapp/universal/src/shared/utils/rendering.js":function(e,t,i){"use strict";var r=i("./src/main/webapp/universal/node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:true});t.getWidthForHeight=n;t.getHeightForWidth=s;t.getDimensionsFromNode=a;t.getSquarespaceSizeForWidth=u;t.getIconUrl=l;var o=r(i("./src/main/webapp/universal/node_modules/@babel/runtime/helpers/slicedToArray.js"));function n(e,t,i){return e/t*i}function s(e,t,i){return t/e*i}function a(e){var t=e.getAttribute("data-image-dimensions");if("string"===typeof t){var i=t.split("x").map(function(e){return Number(e)}),r=(0,o.default)(i,2),n=r[0],s=r[1];return{width:n,height:s}}return{width:null,height:null}}function u(e){window.devicePixelRatio&&(e*=window.devicePixelRatio);if(e>1500)return"2500w";if(e>1e3)return"1500w";if(e>750)return"1000w";if(e>500)return"750w";if(e>300)return"500w";if(e>100)return"300w";return"100w"}function l(e,t,i){return"/universal/images-v6/icons/icon-".concat(e,"-").concat(t,"-").concat(i,".png")}}}); //# sourceMappingURL=https://sourcemaps.squarespace.net/universal/scripts-compressed/image-zoom-d6d4ba4a67fed8d1539f8-min.en-US.js.map