UNPKG

@ekolabs/eko-gallery-react

Version:

eko gallery for react framework

14 lines • 88.4 kB
"use strict";var e=require("react");function n(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}var o={pack:function(e){const o={};if(!n(e))return o;if(e.itemId&&(o.item_id=e.itemId),e.itemName&&(o.item_name=e.itemName),n(e.itemPrice)){const t=e.itemPrice;o.item_price=function(e){const o={};return n(e)&&(e.amount&&(o.amount=Number(e.amount)),e.currency&&(o.currency=e.currency)),o}(t)}return e.quantity&&(o.quantity=Number(e.quantity)),o}};const t="mobile",a="notmobile";function r(){return((window.navigator.userAgentData?window.navigator.userAgentData.mobile:navigator.maxTouchPoints>0&&/Mobile|Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&!/Tablet|iPad/i.test(navigator.userAgent))?t:a)===t}const i={};class l{constructor(e){this.key=`eko.${e}`}setDataStorage(e,n){if("undefined"!=typeof window)try{var o,t;let a=null===(o=window.localStorage)||void 0===o?void 0:o.getItem(this.key);a=JSON.parse(a)||{},a[e]=n,null===(t=window.localStorage)||void 0===t||t.setItem(this.key,JSON.stringify(a))}catch(e){console.error(`[setDataStorage]: ${e}`)}}getDataStorage(e){if("undefined"!=typeof window)try{var n;let o=null===(n=window.localStorage)||void 0===n?void 0:n.getItem(this.key);return o=JSON.parse(o)||{},o[e]}catch(e){console.error(`[getDataStorage]: ${e}`)}}removeDataStorage(e){if("undefined"!=typeof window)try{var n;let t=null===(n=window.localStorage)||void 0===n?void 0:n.getItem(this.key);var o;if(t)if(t=JSON.parse(t),delete t[e],Object.keys(t).length>0)null===(o=window.localStorage)||void 0===o||o.setItem(this.key,JSON.stringify(t));else this.removeAll()}catch(e){console.error(`[removeDataStorage]: ${e}`)}}removeAll(){if("undefined"!=typeof window)try{var e;null===(e=window.localStorage)||void 0===e||e.removeItem(this.key)}catch(e){console.error(`[removeAll]: ${e}`)}}}function s(e){return i[e]||(i[e]=new l(e)),i[e]}const c=s("gallery-react").getDataStorage("gallery-react");function d(e){window.EkoAnalytics("registerContextPacker",{tag:e,match:/.*/,schema:"iglu:com.helloeko/products/jsonschema/1-0-1",getData(e={}){var n,t;if(e.items)return{items:e.items.map((e=>function(e){const n=o.pack(e);return e.id&&(n.id=e.id),e.sku&&(n.sku=e.sku),e.upc&&(n.upc=e.upc),e.name&&(n.name=e.name),n}(e)))};const a=(null===(n=window.eko)||void 0===n||null===(n=n.config)||void 0===n?void 0:n.product)||(null==c||null===(t=c.config)||void 0===t?void 0:t.product);if(a){return{items:[{id:a.id,item_id:a.sku,sku:a.sku,upc:a.upc,typeid:a.type,name:a.name}]}}return null}})}function u(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function k(e){const n={};return u(e)&&(e.amount&&(n.amount=Number(e.amount)),e.currency&&(n.currency=e.currency)),n}var v={isObject:u,pricePack:k,itemPack:function(e){const n={};if(!u(e))return n;if(e.itemId&&(n.item_id=e.itemId),e.itemName&&(n.item_name=e.itemName),u(e.itemPrice)){const o=e.itemPrice;n.item_price=k(o)}return e.quantity&&(n.quantity=Number(e.quantity)),e.sellingPlan&&(n.selling_plan=function(e){const n={};return u(e)&&(e.id&&(n.id=e.id),e.name&&(n.name=e.name)),n}(e.sellingPlan)),n}};const p=s("gallery-react").getDataStorage("gallery-react");const m=s("gallery-react").getDataStorage("gallery-react");const g=s("gallery-react").getDataStorage("gallery-react");const y="eko-gallery-react";var f={register:function(){var e;e=y,window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/page/jsonschema/1-0-0",match:/^pixel\..*/,getData:function(){return{url:document.location.href||"",referrer:document.referrer||"",title:document.title||""}}}),d(y),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/cart/jsonschema/1-0-1",match:/pixel\.cart\.(add|remove)$/,getData(e){const n={};if((e=e||{}).cartId&&(n.cart_id=e.cartId),Array.isArray(e.items)&&(n.items=e.items.map((e=>v.itemPack(e)))),v.isObject(e.totalPrice)){const o=e.totalPrice;n.total_price=v.pricePack(o)}return e.totalQuantity&&(n.total_quantity=Number(e.totalQuantity)),n}})}(y),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/organization/jsonschema/1-0-0",match:/.*/,getData:function(){var e,n;const o=(null===(e=window.eko)||void 0===e||null===(e=e.config)||void 0===e?void 0:e.customer)||(null==p||null===(n=p.config)||void 0===n?void 0:n.customer);if(o)return{id:null==o?void 0:o.organizationId}}})}(y),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/space/jsonschema/1-0-2",match:/.*/,getData:function(){var e,n;const o=(null===(e=window.eko)||void 0===e||null===(e=e.config)||void 0===e?void 0:e.customer)||(null==m||null===(n=m.config)||void 0===n?void 0:n.customer);if(o)return{id:null==o?void 0:o.spaceId}}})}(y),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/asset/jsonschema/1-0-1",match:/.*/,getData:function(e){var n,o;if(null!=e&&e.type&&null!=e&&e.publishitemid&&null!=e&&e.name)return{deliverableid:"",publishitemid:null==e?void 0:e.publishitemid,type:null==e?void 0:e.type,name:null==e?void 0:e.name,artifactid:""};const t=null===(n=window.eko)||void 0===n||null===(n=n.config)||void 0===n?void 0:n.__autoGenerated.publishItem,a=null==g||null===(o=g.config)||void 0===o?void 0:o.__autoGenerated.publishItem,r=t||a;return r?{deliverableid:"",publishitemid:null==r?void 0:r.id,type:"interactive",name:"",artifactid:""}:void 0}})}(y),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/traffic_allocation/jsonschema/1-0-0",match:"trafficallocation.decision",getData:function(e){if(!e)return;const n={decision:e.decision};return e.config&&(n.config=e.config),isNaN(e.traffic_split)||(n.traffic_split=e.traffic_split),e.provider&&(n.provider=e.provider),n}})}(y),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/checkout/jsonschema/1-0-4",match:/pixel\.(checkout|order)$/,getData(e){const n={};if((e=e||{}).checkoutId&&(n.checkout_id=e.checkoutId),Array.isArray(e.items)&&(n.items=e.items.map((e=>v.itemPack(e)))),v.isObject(e.totalPrice)){const o=e.totalPrice;n.total_price=v.pricePack(o)}return e.totalQuantity&&(n.total_quantity=Number(e.totalQuantity)),n}})}(y),function(e){window.EkoAnalytics("registerContextPacker",{tag:e,schema:"iglu:com.helloeko/order/jsonschema/1-0-2",match:"pixel.order",getData(e){const n={};if((e=e||{}).orderId&&(n.order_id=e.orderId),Array.isArray(e.items)&&(n.items=e.items.map((e=>v.itemPack(e)))),v.isObject(e.totalPrice)){const o=e.totalPrice;n.total_price=v.pricePack(o)}return e.totalQuantity&&(n.total_quantity=Number(e.totalQuantity)),n}})}(y)}};function b(e,n){let o="";try{o=window[e].getItem(n),o||(o=function(e){const n=document.cookie.split(";");for(let o=0;o<n.length;o++){const t=n[o].trim();if(0===t.indexOf(e+"="))return t.substring(e.length+1)}return""}(n))}catch(e){console.warn("[eko-gallery-react] Error while getting the id from storage:",n,e)}return o}function h(e){let n=Array.isArray(e.items)?e.items:[e];return n=n.map((e=>({itemId:e.id,itemName:e.name,itemPrice:e.price,quantity:e.quantity||1,variantId:e.variantId,sellingPlan:e.sellingPlan}))),n}function w(e){return{cartId:e.cartId,items:h(e),totalPrice:e.totalPrice,totalQuantity:e.totalQuantity}}var x={"pixel.cart.add":w,"pixel.cart.remove":w,"pixel.product_viewed":function(e){let n=h(e);return n=n.map((e=>function(e){let n=b("localStorage","eko.metadata");if(n&&n[e.itemId]){let o=n[e.itemId].product;e.id=null==o?void 0:o.id,e.sku=null==o?void 0:o.sku,e.upc=null==o?void 0:o.upc,e.name=null==o?void 0:o.name}return e}(e))),{items:n}},"pixel.checkout":function(e){return{checkoutId:e.checkoutId,items:h(e),totalPrice:e.totalPrice,totalQuantity:e.totalQuantity}},"pixel.order":function(e){return{checkoutId:e.checkoutId,orderId:e.orderId,items:h(e),totalPrice:e.totalPrice,totalQuantity:e.totalQuantity}}};const E="https://storage.eko.com/efu/ekoanalytics/master/latest/EkoAnalyticsPlatform.min.gz.js";let I=!1;var M={init:function(e){f.register(),function(e){if(I)return;let n=e?window.location.host:"development";const o=document.createElement("script");o.setAttribute("pxid",n),o.type="text/javascript",o.async=!0,o.src=E,document.body.appendChild(o),I=!0}(e)},onRouteChanged:function(){window.EkoAnalytics("reset")},track:function(e,n){x[e]&&(n=x[e](n)),window.EkoAnalytics("track",e,n)}};function S(){return S=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var t in o)({}).hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e},S.apply(null,arguments)}function D(e,n){return e(n={exports:{}},n.exports),n.exports /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */}var j="function"==typeof Symbol&&Symbol.for,P=j?Symbol.for("react.element"):60103,R=j?Symbol.for("react.portal"):60106,T=j?Symbol.for("react.fragment"):60107,C=j?Symbol.for("react.strict_mode"):60108,A=j?Symbol.for("react.profiler"):60114,q=j?Symbol.for("react.provider"):60109,$=j?Symbol.for("react.context"):60110,O=j?Symbol.for("react.async_mode"):60111,N=j?Symbol.for("react.concurrent_mode"):60111,B=j?Symbol.for("react.forward_ref"):60112,_=j?Symbol.for("react.suspense"):60113,z=j?Symbol.for("react.suspense_list"):60120,L=j?Symbol.for("react.memo"):60115,F=j?Symbol.for("react.lazy"):60116,W=j?Symbol.for("react.block"):60121,G=j?Symbol.for("react.fundamental"):60117,V=j?Symbol.for("react.responder"):60118,H=j?Symbol.for("react.scope"):60119;function U(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case P:switch(e=e.type){case O:case N:case T:case A:case C:case _:return e;default:switch(e=e&&e.$$typeof){case $:case B:case F:case L:case q:return e;default:return n}}case R:return n}}}function Y(e){return U(e)===N}var Q={AsyncMode:O,ConcurrentMode:N,ContextConsumer:$,ContextProvider:q,Element:P,ForwardRef:B,Fragment:T,Lazy:F,Memo:L,Portal:R,Profiler:A,StrictMode:C,Suspense:_,isAsyncMode:function(e){return Y(e)||U(e)===O},isConcurrentMode:Y,isContextConsumer:function(e){return U(e)===$},isContextProvider:function(e){return U(e)===q},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===P},isForwardRef:function(e){return U(e)===B},isFragment:function(e){return U(e)===T},isLazy:function(e){return U(e)===F},isMemo:function(e){return U(e)===L},isPortal:function(e){return U(e)===R},isProfiler:function(e){return U(e)===A},isStrictMode:function(e){return U(e)===C},isSuspense:function(e){return U(e)===_},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===T||e===N||e===A||e===C||e===_||e===z||"object"==typeof e&&null!==e&&(e.$$typeof===F||e.$$typeof===L||e.$$typeof===q||e.$$typeof===$||e.$$typeof===B||e.$$typeof===G||e.$$typeof===V||e.$$typeof===H||e.$$typeof===W)},typeOf:U},J=D((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,o=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,k=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,f=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function h(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case o:var v=e.type;switch(v){case c:case d:case a:case i:case r:case k:return v;default:var g=v&&v.$$typeof;switch(g){case s:case u:case m:case p:case l:return g;default:return n}}case t:return n}}}var w=c,x=d,E=s,I=l,M=o,S=u,D=a,j=m,P=p,R=t,T=i,C=r,A=k,q=!1;function $(e){return h(e)===d}n.AsyncMode=w,n.ConcurrentMode=x,n.ContextConsumer=E,n.ContextProvider=I,n.Element=M,n.ForwardRef=S,n.Fragment=D,n.Lazy=j,n.Memo=P,n.Portal=R,n.Profiler=T,n.StrictMode=C,n.Suspense=A,n.isAsyncMode=function(e){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(e)||h(e)===c},n.isConcurrentMode=$,n.isContextConsumer=function(e){return h(e)===s},n.isContextProvider=function(e){return h(e)===l},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},n.isForwardRef=function(e){return h(e)===u},n.isFragment=function(e){return h(e)===a},n.isLazy=function(e){return h(e)===m},n.isMemo=function(e){return h(e)===p},n.isPortal=function(e){return h(e)===t},n.isProfiler=function(e){return h(e)===i},n.isStrictMode=function(e){return h(e)===r},n.isSuspense=function(e){return h(e)===k},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===i||e===r||e===k||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===l||e.$$typeof===s||e.$$typeof===u||e.$$typeof===y||e.$$typeof===f||e.$$typeof===b||e.$$typeof===g)},n.typeOf=h}()}));J.AsyncMode,J.ConcurrentMode,J.ContextConsumer,J.ContextProvider,J.Element,J.ForwardRef,J.Fragment,J.Lazy,J.Memo,J.Portal,J.Profiler,J.StrictMode,J.Suspense,J.isAsyncMode,J.isConcurrentMode,J.isContextConsumer,J.isContextProvider,J.isElement,J.isForwardRef,J.isFragment,J.isLazy,J.isMemo,J.isPortal,J.isProfiler,J.isStrictMode,J.isSuspense,J.isValidElementType,J.typeOf;var X=D((function(e){"production"===process.env.NODE_ENV?e.exports=Q:e.exports=J})),Z=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable; /* object-assign (c) Sindre Sorhus @license MIT */var ne=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},o=0;o<10;o++)n["_"+String.fromCharCode(o)]=o;var t=Object.getOwnPropertyNames(n).map((function(e){return n[e]}));if("0123456789"!==t.join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var o,t,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),r=1;r<arguments.length;r++){for(var i in o=Object(arguments[r]))K.call(o,i)&&(a[i]=o[i]);if(Z){t=Z(o);for(var l=0;l<t.length;l++)ee.call(o,t[l])&&(a[t[l]]=o[t[l]])}}return a},oe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",te=Function.call.bind(Object.prototype.hasOwnProperty),ae=function(){};if("production"!==process.env.NODE_ENV){var re=oe,ie={},le=te;ae=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function se(e,n,o,t,a){if("production"!==process.env.NODE_ENV)for(var r in e)if(le(e,r)){var i;try{if("function"!=typeof e[r]){var l=Error((t||"React class")+": "+o+" type `"+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[r]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}i=e[r](n,r,t,o,null,re)}catch(e){i=e}if(!i||i instanceof Error||ae((t||"React class")+": type specification of "+o+" `"+r+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in ie)){ie[i.message]=!0;var s=a?a():"";ae("Failed "+o+" type: "+i.message+(null!=s?s:""))}}}se.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(ie={})};var ce=se,de=function(){};function ue(){return null}"production"!==process.env.NODE_ENV&&(de=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var ke=function(e,n){var o="function"==typeof Symbol&&Symbol.iterator,t="@@iterator";var a="<<anonymous>>",r={array:c("array"),bigint:c("bigint"),bool:c("boolean"),func:c("function"),number:c("number"),object:c("object"),string:c("string"),symbol:c("symbol"),any:s(ue),arrayOf:function(e){return s((function(n,o,t,a,r){if("function"!=typeof e)return new l("Property `"+r+"` of component `"+t+"` has invalid PropType notation inside arrayOf.");var i=n[o];if(!Array.isArray(i))return new l("Invalid "+a+" `"+r+"` of type `"+k(i)+"` supplied to `"+t+"`, expected an array.");for(var s=0;s<i.length;s++){var c=e(i,s,t,a,r+"["+s+"]",oe);if(c instanceof Error)return c}return null}))},element:s((function(n,o,t,a,r){var i=n[o];return e(i)?null:new l("Invalid "+a+" `"+r+"` of type `"+k(i)+"` supplied to `"+t+"`, expected a single ReactElement.")})),elementType:s((function(e,n,o,t,a){var r=e[n];return X.isValidElementType(r)?null:new l("Invalid "+t+" `"+a+"` of type `"+k(r)+"` supplied to `"+o+"`, expected a single ReactElement type.")})),instanceOf:function(e){return s((function(n,o,t,r,i){if(!(n[o]instanceof e)){var s=e.name||a;return new l("Invalid "+r+" `"+i+"` of type `"+(((c=n[o]).constructor&&c.constructor.name?c.constructor.name:a)+"` supplied to `")+t+"`, expected instance of `"+s+"`.")}var c;return null}))},node:s((function(e,n,o,t,a){return u(e[n])?null:new l("Invalid "+t+" `"+a+"` supplied to `"+o+"`, expected a ReactNode.")})),objectOf:function(e){return s((function(n,o,t,a,r){if("function"!=typeof e)return new l("Property `"+r+"` of component `"+t+"` has invalid PropType notation inside objectOf.");var i=n[o],s=k(i);if("object"!==s)return new l("Invalid "+a+" `"+r+"` of type `"+s+"` supplied to `"+t+"`, expected an object.");for(var c in i)if(te(i,c)){var d=e(i,c,t,a,r+"."+c,oe);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&de(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),ue;return s((function(n,o,t,a,r){for(var s=n[o],c=0;c<e.length;c++)if(i(s,e[c]))return null;var d=JSON.stringify(e,(function(e,n){return"symbol"===v(n)?String(n):n}));return new l("Invalid "+a+" `"+r+"` of value `"+String(s)+"` supplied to `"+t+"`, expected one of "+d+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&de("Invalid argument supplied to oneOfType, expected an instance of array."),ue;for(var n=0;n<e.length;n++){var o=e[n];if("function"!=typeof o)return de("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+p(o)+" at index "+n+"."),ue}return s((function(n,o,t,a,r){for(var i=[],s=0;s<e.length;s++){var c=(0,e[s])(n,o,t,a,r,oe);if(null==c)return null;c.data&&te(c.data,"expectedType")&&i.push(c.data.expectedType)}return new l("Invalid "+a+" `"+r+"` supplied to `"+t+"`"+(i.length>0?", expected one of type ["+i.join(", ")+"]":"")+".")}))},shape:function(e){return s((function(n,o,t,a,r){var i=n[o],s=k(i);if("object"!==s)return new l("Invalid "+a+" `"+r+"` of type `"+s+"` supplied to `"+t+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return d(t,a,r,c,v(u));var p=u(i,c,t,a,r+"."+c,oe);if(p)return p}return null}))},exact:function(e){return s((function(n,o,t,a,r){var i=n[o],s=k(i);if("object"!==s)return new l("Invalid "+a+" `"+r+"` of type `"+s+"` supplied to `"+t+"`, expected `object`.");var c=ne({},n[o],e);for(var u in c){var p=e[u];if(te(e,u)&&"function"!=typeof p)return d(t,a,r,u,v(p));if(!p)return new l("Invalid "+a+" `"+r+"` key `"+u+"` supplied to `"+t+"`.\nBad object: "+JSON.stringify(n[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=p(i,u,t,a,r+"."+u,oe);if(m)return m}return null}))}};function i(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function l(e,n){this.message=e,this.data=n&&"object"==typeof n?n:{},this.stack=""}function s(e){if("production"!==process.env.NODE_ENV)var o={},t=0;function r(r,i,s,c,d,u,k){if(c=c||a,u=u||s,k!==oe){if(n){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+s;!o[p]&&t<3&&(de("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),o[p]=!0,t++)}}return null==i[s]?r?null===i[s]?new l("The "+d+" `"+u+"` is marked as required in `"+c+"`, but its value is `null`."):new l("The "+d+" `"+u+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,s,c,d,u)}var i=r.bind(null,!1);return i.isRequired=r.bind(null,!0),i}function c(e){return s((function(n,o,t,a,r,i){var s=n[o];return k(s)!==e?new l("Invalid "+a+" `"+r+"` of type `"+v(s)+"` supplied to `"+t+"`, expected `"+e+"`.",{expectedType:e}):null}))}function d(e,n,o,t,a){return new l((e||"React class")+": "+n+" type `"+o+"."+t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function u(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(u);if(null===n||e(n))return!0;var a=function(e){var n=e&&(o&&e[o]||e[t]);if("function"==typeof n)return n}(n);if(!a)return!1;var r,i=a.call(n);if(a!==n.entries){for(;!(r=i.next()).done;)if(!u(r.value))return!1}else for(;!(r=i.next()).done;){var l=r.value;if(l&&!u(l[1]))return!1}return!0;default:return!1}}function k(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function v(e){if(null==e)return""+e;var n=k(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function p(e){var n=v(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return l.prototype=Error.prototype,r.checkPropTypes=ce,r.resetWarningCache=ce.resetWarningCache,r.PropTypes=r,r};function ve(){}function pe(){}pe.resetWarningCache=ve;var me=D((function(e){if("production"!==process.env.NODE_ENV){var n=X;e.exports=ke(n.isElement,!0)}else e.exports=function(){function e(e,n,o,t,a,r){if(r!==oe){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function n(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:pe,resetWarningCache:ve};return o.PropTypes=o,o}()}));const ge=/https?:\/\/(.*?\.)?eko.com/,ye={"eko.project.interaction":"interaction","eko.project.swipe":"swipe"};let fe=null,be=null,he=[];function we(e){return n=>{var o;if(!ge.test(n.origin)||"eko.embedapi"!==(null===(o=n.data)||void 0===o?void 0:o.source))return;const t=n.data,a=ye[t.type];a&&(e?e(a,t.data):he.push({type:a,data:t.data}))}}"undefined"!=typeof window&&(be=we(null),window.addEventListener("message",be));var xe={subscribe:function(e){"function"==typeof e?fe?console.warn("[eko-gallery-react] Ignoring events subscribe since already subscribed"):(fe=e,be=we(e),window.addEventListener("message",be),function(e){he.forEach((n=>{e(n.type,n.data)})),he=[]}(e)):console.warn("[eko-gallery-react] Ignoring events subscribe since a callback function was not provided as argument")},unsubscribe:function(){be?(window.removeEventListener("message",be),be=null,fe=null,he=[]):console.warn("[eko-gallery-react] Ignoring events unsubscribe since not subscribed")},send:function(e,n){fe?fe(e,n):he.push({type:e,data:n})}};const Ee=({index:n,activeIndex:o,setActiveIndex:t,item:a,src:r,navItemRefs:i,itemIcon:l})=>{var s,c;const d=null==a||null===(s=a.media)||void 0===s?void 0:s.srcset,u=null==a||null===(c=a.media)||void 0===c?void 0:c.sizes,k=!r&&(null==a?void 0:a.label),v=d?r:function(e,n=200){if(!e)return null;try{let o=e;e.includes("assets.eko.com")&&e.includes("/raw/")&&(o=e.replace("/raw/","/image/"));const t=new URL(o);return t.searchParams.set("width",n),t.href}catch(n){return e}}(r,150);let p=["addons-container",k?"full-thumb-label":""].join(" ").trim();return e.createElement("li",{className:"eko-nav-item","aria-current":o===n,onClick:function(){t(n),function(e){M.track("gallery.interaction",{elementid:`thumbnail-${e}`,interactiontype:"click"}),xe.send("interaction",{elementid:`thumbnail-${e}`,interactiontype:"click"})}(n)},ref:i.current[n]},e.createElement("button",{type:"button","aria-label":`Go to item ${n}`},!k&&e.createElement("img",{src:v,srcSet:d,sizes:u,alt:null==a?void 0:a.name,loading:"eager",fetchPriority:"high"}),e.createElement("div",{className:p},(null==a?void 0:a.stepsIndication)&&e.createElement("div",{className:"step-indicator"},e.createElement("span",null),e.createElement("span",null),e.createElement("span",null)),(null==a?void 0:a.label)&&e.createElement("div",{className:"thumb-label"},null==a?void 0:a.label)),l&&e.createElement("div",{className:"item-icon"},e.createElement("span",{style:{backgroundImage:`url(${l})`}}))))};Ee.propTypes={index:me.number,activeIndex:me.number,setActiveIndex:me.func.isRequired,item:me.object.isRequired,src:me.string,navItemRefs:me.object.isRequired,itemIcon:me.string};const Ie=({layout:n,nav:o,isVerticalNav:t,showPrevArrow:a,showNextArrow:r})=>{var i,l,s,c,d;const u=e.useRef(null),k=e.useRef(null),v="arrows"===(null==n||null===(i=n.mobile)||void 0===i||null===(i=i.config)||void 0===i||null===(i=i.navPagination)||void 0===i?void 0:i.type)?"eko-mobile-arrows":"",p="arrows"===(null!==(l=null==n||null===(s=n.desktop)||void 0===s||null===(s=s.config)||void 0===s||null===(s=s.navPagination)||void 0===s?void 0:s.type)&&void 0!==l?l:"arrows")?"eko-desktop-arrows":"",m=v||p,g=t?null==o||null===(c=o.current)||void 0===c?void 0:c.scrollHeight:null==o||null===(d=o.current)||void 0===d?void 0:d.scrollWidth;function y(e){const n=t?o.current.clientHeight:o.current.clientWidth,a=function(e,n){const o=t?n.scrollTop:n.scrollLeft;return Math.max(-o,Math.min(g-e-o,e))}("next"===e?n:-n,o.current);return{top:t?a:0,left:t?0:a,behavior:"smooth"}}function f(e){var n,t,a;const r=y(e),i="next"===e?null==k||null===(n=k.current)||void 0===n?void 0:n.id:null==u||null===(t=u.current)||void 0===t?void 0:t.id;var l,s;window.EkoAnalytics("track","gallery.interaction",{elementid:i,interactiontype:"click"}),null==o||null===(a=o.current)||void 0===a||a.scrollBy(r),l=i,s="click",M.track("gallery.interaction",{elementId:l,interactiontype:s}),xe.send("interaction",{elementId:l,interactiontype:s})}return e.createElement(e.Fragment,null,m&&e.createElement(e.Fragment,null,e.createElement("button",S({type:"button","aria-label":"Go to previous item","aria-hidden":a?"false":"true",onClick:()=>f("prev"),ref:u,id:"eko-nav-prev-arrow",className:`eko-nav-arrow eko-prev-nav-button ${v} ${p} ${a?"":"eko-hidden-nav-button"}`},a?{}:{tabIndex:"-1"}),e.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M5.56127 9.52817C5.28966 9.22635 5.28966 8.77361 5.56127 8.502L10.39 3.67331C10.6918 3.37157 11.1445 3.37157 11.4161 3.67331C11.7179 3.94492 11.7179 4.39766 11.4161 4.66927L7.10044 8.98487L11.4161 13.3307C11.7179 13.6023 11.7179 14.055 11.4161 14.3266C11.1445 14.6285 10.6918 14.6285 10.4202 14.3266L5.56127 9.52817Z",fill:"black"}))),e.createElement("button",S({type:"button","aria-label":"Go to next item","aria-hidden":r?"false":"true",onClick:()=>f("next"),ref:k,className:`eko-nav-arrow eko-next-nav-button ${v} ${p} ${r?"":"eko-hidden-nav-button"}`,id:"eko-nav-next-arrow"},r?{}:{tabIndex:"-1"}),e.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M12.4387 8.47185C12.7103 8.77367 12.7103 9.22641 12.4387 9.49802L7.61003 14.3267C7.30821 14.6284 6.85547 14.6284 6.58386 14.3267C6.28212 14.0551 6.28212 13.6024 6.58386 13.3308L10.8996 9.01515L6.58386 4.66933C6.28212 4.39772 6.28212 3.94499 6.58386 3.67338C6.85547 3.37155 7.30821 3.37155 7.57982 3.67338L12.4387 8.47185Z",fill:"black"})))))};function Me(e,n,o){let t;return function(){const o=this,a=arguments;clearTimeout(t),t=setTimeout((function(){t=null,e.apply(o,a)}),n)}}Ie.propTypes={layout:me.object.isRequired,nav:me.object.isRequired,isVerticalNav:me.bool.isRequired,showPrevArrow:me.bool.isRequired,showNextArrow:me.bool.isRequired};const Se=({items:n,setActiveIndex:o,activeIndex:t,layout:a,carouselMounted:i,forceMobile:l})=>{const s=e.useRef(null),c=e.useRef(null),d=e.useRef([]),u=3,[k,v]=e.useState(null),[p,m]=e.useState(!1),[g,y]=e.useState(0),[f,b]=e.useState(!1),[h,w]=e.useState(!1);function x(){var e;const n=l||window.innerWidth<768?"mobile":"desktop",o=(null==a||null===(e=a[n])||void 0===e||null===(e=e.config)||void 0===e?void 0:e.orientation)||("desktop"===n?"left":"bottom");m("left"===o||"right"===o);const t=c.current.parentNode,r=i?".eko-smart-gallery-container iframe":".eko-carousel",s=t.querySelector(r);setTimeout((()=>{y(s.clientHeight)}),0)}function E(){var e,n;const o=l||r()?"mobile":"desktop",t=null!==(e=null==a||null===(n=a[o])||void 0===n||null===(n=n.config)||void 0===n||null===(n=n.navPagination)||void 0===n?void 0:n.scrollThreshold)&&void 0!==e?e:u;!function(e=u){var n,o;const t=s.current;if(!t)return;const i="none"!==(null==a||null===(n=a.desktop)||void 0===n||null===(n=n.config)||void 0===n||null===(n=n.navPagination)||void 0===n?void 0:n.type),c=(d=null==a||null===(o=a.mobile)||void 0===o||null===(o=o.config)||void 0===o||null===(o=o.navPagination)||void 0===o?void 0:o.type,"mask"===d||"arrows"===d);var d;if((l||r())&&!c)return void t.style.setProperty("-webkit-mask","none");if(!r()&&!i)return void t.style.setProperty("-webkit-mask","none");const k=t.scrollHeight-t.clientHeight,v=t.scrollTop>e?"85%":"100%",m=t.scrollTop<=k-e?"15%":"0%",g=t.scrollWidth-t.clientWidth,y=t.scrollLeft>e?"15%":"0%",f=t.scrollLeft<=g-e?"85%":"100%";p?t.style.setProperty("-webkit-mask",`linear-gradient(0deg,#0000,#000 ${m} ${v},#0000)`):t.style.setProperty("-webkit-mask",`linear-gradient(90deg,#0000,#000 ${y} ${f},#0000)`)}(t),function(e=u){var n,o,t,a,r,i;const l=p?null==s||null===(n=s.current)||void 0===n?void 0:n.scrollTop:null==s||null===(o=s.current)||void 0===o?void 0:o.scrollLeft,c=p?null==s||null===(t=s.current)||void 0===t?void 0:t.clientHeight:null==s||null===(a=s.current)||void 0===a?void 0:a.clientWidth,d=p?null==s||null===(r=s.current)||void 0===r?void 0:r.scrollHeight:null==s||null===(i=s.current)||void 0===i?void 0:i.scrollWidth;d-e<c?(b(!1),w(!1)):l<=e?(b(!1),w(!0)):l+c>d-e?(b(!0),w(!1)):l+e>0&&l<d-e&&(b(!0),w(!0))}(t)}d.current=null==n?void 0:n.map(((n,o)=>{var t,a;return null!==(t=null==d||null===(a=d.current)||void 0===a?void 0:a[o])&&void 0!==t?t:e.createRef()}));const I=Me((e=>{var n;n=e,M.track("gallery.interaction",{elementid:"nav",interactiontype:n}),xe.send("interaction",{elementid:"nav",interactiontype:n})}),200);const S=e.useCallback((e=>{o({index:e,step:0,source:"nav"})}),[]);return e.useEffect((()=>{var e;v(null===(e=d.current)||void 0===e?void 0:e[t])}),[t]),e.useEffect((()=>{if(null!=k&&k.current&&null!=s&&s.current){const e=k.current,n=s.current.clientWidth/2,o=e.clientWidth/2,t=s.current.clientHeight/2,a=e.clientHeight/2;s.current.scrollTo({left:e.offsetLeft-n+o,top:e.offsetTop-t+a,behavior:"smooth"})}}),[k]),e.useEffect((()=>{x()}),[]),e.useEffect((()=>(window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)})),[c,i,l]),e.useEffect((()=>{y(0),x()}),[n,c,i,l]),e.useEffect((()=>{E();const e=new ResizeObserver(E);return e.observe(s.current),()=>{e.disconnect()}}),[n,l,p]),e.createElement("div",{className:"eko-nav-container",ref:c,style:{opacity:g>0?1:0,height:""+(g&&p?g+"px":"auto")}},e.createElement(Ie,{layout:a,nav:s,isVerticalNav:p,showPrevArrow:f,showNextArrow:h}),e.createElement("ul",{className:`eko-nav eko-mobile-nav-selected-${null!==(D=null==a||null===(j=a.mobile)||void 0===j||null===(j=j.config)||void 0===j?void 0:j.navItemsSelectedType)&&void 0!==D?D:"underline"} eko-desktop-nav-selected-${null!==(P=null==a||null===(R=a.desktop)||void 0===R||null===(R=R.config)||void 0===R?void 0:R.navItemsSelectedType)&&void 0!==P?P:"underline"}`,ref:s,onScroll:function(){E()},onWheel:function(){I("wheel")},onTouchMove:function(){I("swipe")}},null==n?void 0:n.map(((n,o)=>{var a;const r=(null==n||null===(a=n.media)||void 0===a?void 0:a.url)||(null==n?void 0:n.media)||"";return e.createElement(Ee,{key:r+o,index:o,activeIndex:t,setActiveIndex:S,item:n,src:r,navItemRefs:d,itemIcon:null==n?void 0:n.icon})}))));var D,j,P,R};Se.propTypes={items:me.array.isRequired,activeIndex:me.number,setActiveIndex:me.func.isRequired,layout:me.object,carouselMounted:me.bool,forceMobile:me.bool};function De(){M.track("gallery.cover.displayed"),xe.send("gallerycoverdisplayed")}function je(e){if(!e)return e;try{const n=new URL(e);return n.host.includes("assets.eko.com")&&n.pathname.startsWith("/image")&&!n.searchParams.has("width")?(n.pathname.endsWith(".png")&&(n.pathname=n.pathname.replace(/\.png$/,".webp")),n.searchParams.set("width",1920),n.toString()):e}catch(n){return e}}const Pe=({item:n,src:o,srcset:t,sizes:a,isCoverElement:r})=>{const i=e.useRef(null);return e.useEffect((()=>{var e;if(r){if(null===(e=i.current)||void 0===e||!e.complete)return i.current.addEventListener("load",De,{once:!0}),()=>{var e;null===(e=i.current)||void 0===e||e.removeEventListener("load",De,{once:!0})};De()}}),[]),e.createElement("img",{ref:i,src:je(o),srcSet:t,sizes:a,alt:n.name,fetchPriority:r?"high":"auto",loading:r?"eager":"lazy",style:{width:"100%",height:"100%"}})};Pe.propTypes={item:me.object.isRequired,src:me.string,srcset:me.string,sizes:me.string,isCoverElement:me.bool};const Re=Me((e=>{var n;n=e,M.track("gallery.interaction",{elementid:"carousel",interactiontype:n}),xe.send("interaction",{elementid:"carousel",interactiontype:n})}),200);function Te(){Re("wheel")}const Ce=e.forwardRef((({items:n,setActiveIndex:o,activeIndex:t,showSmartLoaders:a},r)=>{const i=e.useRef(null),l=e.useRef([]);l.current=null==n?void 0:n.map(((n,o)=>{var t,a;return null!==(t=null==l||null===(a=l.current)||void 0===a?void 0:a[o])&&void 0!==t?t:e.createRef()}));const[s,c]=e.useState(),[d,u]=e.useState(),k=e.useRef(t),v=e.useRef(!1);function p(){const e=function(e){const n=e.scrollLeft,o=e.scrollWidth-e.clientWidth;return 0===n?0:n>o?100:n/o*100}(i.current)*(null==n?void 0:n.length)/100,t=Math.min(Math.trunc(e),(null==n?void 0:n.length)-1),a=k.current;"nav"!==a.source&&"external-nav"!==a.source?(v.current&&t!==a.index&&(v.current=!1),v.current||(t>(null==n?void 0:n.length)-1?o({index:(null==n?void 0:n.length)-1,source:"carousel"}):o({index:t,source:"carousel"}))):t===a.index?v.current=!0:v.current&&t!==a.index&&(v.current=!1,o({index:t,source:"carousel"}))}return e.useImperativeHandle(r,(()=>({prev:()=>{o({index:Math.max(0,k.current.index-1),source:"carousel"})},next:()=>{o({index:Math.min((null==n?void 0:n.length)-1,k.current.index+1),source:"carousel"})}}))),e.useEffect((()=>{const e=i.current;if(e)return e.addEventListener("scroll",p),()=>{e.removeEventListener("scroll",p)}}),[n]),e.useEffect((()=>{var e;let n=null===(e=l.current)||void 0===e?void 0:e[t.index];if(n&&("nav"===t.source||"external-nav"===t.source)){const e=n.current,o=i.current.clientWidth/2,t=(null==e?void 0:e.clientWidth)/2,a=(null==e?void 0:e.offsetLeft)-o+t;i.current.scrollTo({left:a,behavior:"smooth"})}}),[t]),e.useEffect((()=>{k.current=t,"nav"!==t.source&&"external-nav"!==t.source||(v.current=!1)}),[t]),e.createElement("ul",{className:"eko-carousel",ref:i,onScroll:p,onWheel:Te,onTouchMove:function(e){u(e.targetTouches[0].clientX)},onTouchStart:function(e){c(e.targetTouches[0].clientX),u(null)},onTouchEnd:function(){d&&s&&(s-d>75||s-d<-75)&&Re("swipe")}},null==n?void 0:n.map(((n,o)=>{const t=(null==n?void 0:n.cover)||(null==n?void 0:n.media),r=(null==t?void 0:t.url)||t;return e.createElement("li",{className:"eko-carousel-item",key:r+o,ref:l.current[o]},e.createElement(Pe,{item:n,src:r,srcset:null==t?void 0:t.srcset,sizes:null==t?void 0:t.sizes,isCoverElement:0===o}),a&&"image"!==n.type&&e.createElement("div",{className:"eko-smart-loading"},e.createElement("div",null),e.createElement("p",null,"Loading video experience")))})))}));function Ae(e){var n;return function(e){var n;return"eko.block.event"===(null==e||null===(n=e.data)||void 0===n?void 0:n.type)}(e)&&"GalleryBlock"===(null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.blockType)}Ce.propTypes={items:me.array.isRequired,setActiveIndex:me.func.isRequired,activeIndex:me.object,showSmartLoaders:me.bool},Ce.displayName="CarouselLoop";const qe="eko.project.invoke",$e="eko.block.invoke";function Oe(e,n,o){var t;null!=e&&e.contentWindow&&(null==e||null===(t=e.contentWindow)||void 0===t||t.postMessage({target:"eko.embedapi",type:n,data:o},"*"))}function Ne(e){return`#variantId=${encodeURIComponent(e)}`}const Be=e.forwardRef((({config:n,instanceId:o,setActiveItem:t,activeItem:a,variantId:i,smartGalleryLoaded:l,onLoad:s,forceMobile:c},d)=>{var u,k,v;const p=null!==(u=null===(k=n.options)||void 0===k?void 0:k.galleryEnv)&&void 0!==u?u:"",m=null===(v=n.__autoGenerated)||void 0===v||null===(v=v.publishItem)||void 0===v?void 0:v.id,g=function(e={}){let n="";return Object.entries(e).forEach((([e,o])=>{n+=`&${e}=${o}`})),n}(null==n?void 0:n.qp),y=function(e,n,o){return`https://${e}play.eko.com/embed?${o?`id=${o}`:`piid=${n}`}&nocover=true&galleryBlockMode=gallery&eko_pixel=true`}(p,m,o),f=e.useRef(null),b=e.useRef(null),h=e.useRef(!1),[w,x]=e.useState(Ne(i||"ekonovar")),[E,I]=e.useState(y+g+w);let S;function D(){M.track("gallery.project.display"),s(),xe.send("galleryloaded")}return e.useImperativeHandle(d,(()=>({prev:()=>{Oe(null==b?void 0:b.current,$e,{action:"onPrevModule"})},next:()=>{Oe(null==b?void 0:b.current,$e,{action:"onNextModule"})}}))),e.useEffect((()=>{h.current?Oe(null==b?void 0:b.current,qe,{action:"updateVariant",args:{id:i}}):x(Ne(i))}),[i]),e.useEffect((()=>{Oe(null==b?void 0:b.current,$e,{action:"updateActiveModule",args:{activeItemIndex:null==a?void 0:a.index,activeModuleIndex:null==a?void 0:a.step}})}),[a]),e.useEffect((()=>{function e(e){if((function(e){var n;return"eko.project.blockstart"===(null==e||null===(n=e.data)||void 0===n?void 0:n.type)}(e)||function(e){var n,o;return"eko.project.started"===(null==e||null===(n=e.data)||void 0===n?void 0:n.type)&&(null==e||null===(o=e.data)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.started)}(e))&&!h.current)return n=e.data.data.blockType,h.current=!0,void("GalleryBlock"===n?Oe(null==b?void 0:b.current,$e,{action:"updateActiveModule",args:{activeItemIndex:null==a?void 0:a.index,activeModuleIndex:null==a?void 0:a.step}}):D());var n;if(h.current){if(function(e){var n;return Ae(e)&&"activeModuleChanged"===(null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.name)}(e))return void function(e){const n=e.data.data.data.activeItemIndex,o=e.data.data.data.activeModuleIndex;n===(null==a?void 0:a.index)&&o===(null==a?void 0:a.step)||t({index:n,step:o,source:"carousel"})}(e);(function(e){var n;return Ae(e)&&"activeModuleChangeDone"===(null==e||null===(n=e.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.name)})(e)&&!l&&D()}}return S=c||r()?"mobile":"desktop",function(e,n={}){window.addEventListener("message",e,n)}(e),()=>{!function(e,n={}){window.removeEventListener("message",e,n)}(e)}}),[a]),e.useEffect((()=>{h.current||Oe(null==b?void 0:b.current,qe,{action:"queryProjectStarted"})}),[a,l]),e.useEffect((()=>{h.current=!1}),[n]),e.useEffect((()=>{I(y+g+w)}),[w]),e.createElement("div",{className:"eko-smart-gallery-container "+(l?"":"eko-project-not-ready"),ref:f,"data-type":"smart-gallery","data-qp":g,"data-variant":i,"data-device":S},e.createElement("iframe",{allow:"autoplay; fullscreen",title:"eko gallery",src:E,style:{border:0},ref:b}))}));Be.propTypes={config:me.object.isRequired,instanceId:me.string,setActiveItem:me.func.isRequired,activeItem:me.object.isRequired,variantId:me.string,smartGalleryLoaded:me.bool,onLoad:me.func,forceMobile:me.bool},Be.displayName="SmartGallery";const _e=()=>e.createElement("style",{suppressHydrationWarning:!0},'.eko-gallery {\n --accentColorEko: #000;\n --primaryColorEko: #000;\n --backgroundColorEko: #25D7A2;\n --navItemsBackgroundColorEko: transparent;\n --navItemsBannerBackgroundColorEko: #EEEEEE;\n --carouselItemsBackgroundColorEko: transparent;\n --carouselInteractiveCoverBackgroundColorEko: transparent;\n --galleryGapEkoMobile: 12px;\n --galleryGapEkoDesktop: 12px;\n --galleryPaddingEkoMobile: 0;\n --galleryPaddingEkoDesktop: 0;\n --galleryMaxWidthEkoMobile: 100%;\n --galleryMaxWidthEkoDesktop: 900px;\n --galleryTransition: .8s cubic-bezier(.35, 0, 0, 1) 1.5s;\n --navBarPaddingEkoMobile: 0 0 0 20px;\n --navBarPaddingEkoDesktop: 0;\n --navItemsWidthEkoMobile: 80px;\n --navItemsWidthEkoDesktop: 80px;\n --navItemsHeightEkoMobile: 80px;\n --navItemsHeightEkoDesktop: 80px;\n --navItemsGapEkoMobile: 14px;\n --navItemsGapEkoDesktop: 14px;\n --navItemsRadiusEkoMobile: 8px;\n --navItemsRadiusEkoDesktop: 8px;\n --navItemsSelectedMarginEkoMobile: 3px;\n --navItemsSelectedMarginEkoDesktop: 3px;\n --navItemsSelectedThicknessEkoMobile: 3px;\n --navItemsSelectedThicknessEkoDesktop: 3px;\n --navItemsSelectedUnderlineRadiusEkoMobile: 100px;\n --navItemsSelectedUnderlineRadiusEkoDesktop: 100px;\n --navItemsObjectFitEkoMobile: cover;\n --navItemsObjectFitEkoDesktop: cover;\n --navMediaBadgeSizeEkoMobile: 22px;\n --navMediaBadgeSizeEkoDesktop: 22px;\n --navMediaBadgeMarginTopEkoMobile: 4px;\n --navMediaBadgeMarginTopEkoDesktop: 4px;\n --navMediaBadgeMarginRightEkoMobile: 4px;\n --navMediaBadgeMarginRightEkoDesktop: 4px;\n --carouselItemsAspectRatioEkoMobile: 1 / 1;\n --carouselItemsAspectRatioEkoDesktop: 1 / 1;\n --carouselItemsRadiusEkoMobile: 0px;\n --carouselItemsRadiusEkoDesktop: 12px;\n --carouselItemsObjectFitEkoMobile: cover;\n --carouselItemsObjectFitEkoDesktop: cover;\n --navBannerFontSizeEkoMobile: 12px;\n --navBannerFontSizeEkoDesktop: 12px;\n --navBannerFontLineHeightEkoMobile: 120%;\n --navBannerFontLineHeightEkoDesktop: 120%;\n --navBannerFontFamilyEkoMobile: inherit;\n --navBannerFontFamilyEkoDesktop: inherit;\n --navBannerFontWeightEkoMobile: 400;\n --navBannerFontWeightEkoDesktop: 400;\n --outerWidth: 0\n}\n\n.eko-gallery * {\n box-sizing: border-box\n}\n\n.eko-gallery ul,\n.eko-gallery li {\n padding: 0;\n text-indent: 0;\n list-style-type: none;\n font-size: 0;\n margin: 0\n}\n\n.eko-gallery button {\n border: none;\n padding: 0\n}\n\n.eko-gallery .eko-hidden {\n display: none !important\n}\n\n.eko-gallery .eko-not-visible {\n visibility: hidden !important\n}\n\n.eko-hidden-variant {\n display: none !important\n}\n\n.eko-sr-only {\n width: 1px;\n height: 1px;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden\n}\n\n.eko-sticky-top {\n position: sticky;\n top: 0\n}\n\n.eko-gallery .eko-nav {\n height: 100%;\n display: flex;\n align-items: start;\n align-self: start;\n flex-shrink: 0;\n scrollbar-width: none;\n -ms-overflow-style: none\n}\n\n.eko-gallery .eko-nav li {\n font-size: 0;\n position: relative;\n display: flex;\n flex-shrink: 0;\n justify-content: center;\n -webkit-box-pack: center;\n cursor: pointer\n}\n\n.eko-gallery .eko-nav li button {\n position: relative;\n background-color: transparent;\n border-radius: 0;\n line-height: 0;\n overflow: hidden;\n cursor: pointer\n}\n\n.eko-gallery .eko-nav li button img {\n background-color: var(--navItemsBackgroundColorEko);\n pointer-events: none\n}\n\n.eko-gallery .eko-nav li button .item-icon {\n position: absolute;\n top: 0;\n right: 0;\n width: 32px;\n height: 32px;\n transform: scale(.25);\n transform-origin: top right\n}\n\n.eko-gallery .eko-nav li button .item-icon span {\n display: block;\n width: 400%;\n height: 400%;\n position: absolute;\n top: 0;\n right: 0;\n background-position: top right;\n background-repeat: no-repeat;\n background-size: contain\n}\n\n.eko-gallery .eko-nav li .addons-container {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n font-size: 10px;\n line-height: 100%\n}\n\n.eko-gallery .eko-nav li .addons-container .thumb-label {\n width: 100%;\n background: var(--navItemsBannerBackgroundColorEko);\n padding: 4px;\n text-align: center;\n text-wrap: balance;\n color: var(--primaryColorEko)\n}\n\n.eko-gallery .eko-nav li .addons-container .step-indicator {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 5px;\n padding: 6px\n}\n\n.eko-gallery .eko-nav li .addons-container .step-indicator span {\n width: 5px;\n height: 5px;\n border-radius: 100px;\n background: #fff;\n box-shadow: 0 0 3px #00000094\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label {\n position: relative\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label .step-indicator {\n position: absolute;\n bottom: 0\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label .thumb-label {\n align-content: center\n}\n\n.eko-gallery .eko-nav::-webkit-scrollbar {\n display: none\n}\n\n.eko-nav-container {\n display: flex\n}\n\n.eko-nav-container:has(.eko-nav.eko-not-visible) .eko-nav-arrow {\n display: none\n}\n\n.eko-nav-container {\n position: relative;\n opacity: 0;\n transition: opacity .15s ease-in\n}\n\n.eko-nav-container .eko-nav-arrow {\n width: 28px;\n height: 28px;\n position: absolute;\n display: none;\n justify-content: center;\n align-items: center;\n border-radius: 28px;\n background-color: #fff;\n box-shadow: 0 0 6px #0000001f;\n z-index: 1;\n bottom: 50%;\n opacity: 1;\n transition: opacity .15s ease-in;\n transform: translateY(50%);\n cursor: pointer\n}\n\n.eko-nav-container .eko-nav-arrow.eko-prev-nav-button svg,\n.eko-nav-container .eko-nav-arrow.eko-next-nav-button svg {\n padding: 1px\n}\n\n.eko-nav-container .eko-nav-arrow.eko-prev-nav-button {\n left: 8px\n}\n\n.eko-nav-container .eko-nav-arrow.eko-next-nav-button {\n right: 8px\n}\n\n.eko-nav-container .eko-nav-arrow.eko-hidden-nav-button {\n opacity: 0;\n pointer-events: none\n}\n\n.eko-gallery .eko-nav {\n gap: var(--navItemsGapEkoMobile);\n padding: var(--navBarPaddingEkoMobile)\n}\n\n.eko-gallery .eko-nav li button img {\n width: var(--navItemsWidthEkoMobile);\n height: var(--navItemsHeightEkoMobile);\n object-fit: var(--navItemsObjectFitEkoMobile)\n}\n\n.eko-gallery .eko-nav li .addons-container .thumb-label {\n font-family: var(--navBannerFontFamilyEkoMobile);\n font-size: var(--navBannerFontSizeEkoMobile);\n line-height: var(--navBannerFontLineHeightEkoMobile);\n font-weight: var(--navBannerFontWeightEkoMobile)\n}\n\n.eko-gallery .eko-nav li .addons-container.full-thumb-label .thumb-label {\n width: var(--navItemsWidthEkoMobile);\n height: var(--navItemsHeightEkoMobile)\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-underline li {\n padding-bottom: calc(var(--navItemsSelectedThicknessEkoMobile) + var(--navItemsSelectedMarginEkoMobile))\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-underline li button {\n border-radius: var(--navItemsRadiusEkoMobile)\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-underline li[aria-current=true]:after {\n content: "";\n width: 100%;\n height: var(--navItemsSelectedThicknessEkoMobile);\n border-radius: var(--navItemsSelectedUnderlineRadiusEkoMobile);\n background-color: var(--accentColorEko);\n display: block;\n position: absolute;\n bottom: 0;\n left: 0\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-outline li {\n padding: var(--navItemsSelectedMarginEkoMobile)\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-outline li button {\n border-radius: var(--navItemsRadiusEkoMobile)\n}\n\n.eko-gallery .eko-nav.eko-mobile-nav-selected-outline li[aria-current=true] {\n border-radius: calc(var(--navItemsRadiusEkoMobile) + var(--navItemsSelectedMarginEkoMobile));\n box-shadow: 0 0 0 var(--navItemsSelectedThicknessEkoMobile) var(--accentColorEko)\n}\n\n@media screen and (min-width: 768px) {\n .eko-gallery.eko-liquid-gallery .eko-nav {\n gap: var(--navItemsGapEkoDesktop);\n padding: var(--navBarPaddingEkoDes