/*! * 0.75.2 - 2025-03-26T23:16:10.813Z * Copyright (c) 2025 Okendo Pty Ltd * */(function(e){function o(o){for(var l,a,t=o[0],r=o[1],d=0,i=[];d(o?fetch(e,o):fetch(e)).then(e=>e.json()),post:(e,o)=>fetch(e,{method:"POST",body:JSON.stringify(o)}).then(e=>e.json())}},"6f27":function(e,o,l){"use strict";let a;const s=(e,o)=>{if("HTML"===e.nodeName)return-o;const l=e.getBoundingClientRect().top,a=parseInt((window.getComputedStyle(e).scrollMarginTop||0).toString(),10);return l+o-a};function t(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}o["a"]={smoothScrollTo(e,o=-48){const l=500;a||(a=window.requestAnimationFrame||function(e){window.setTimeout(e,16)});const r=window.pageYOffset;let d=s(e,r);d+=o;const i=Date.now(),n=t,c=()=>{const e=Date.now()-i;let o=d;e{const o=e.getAttribute("data-oke-scroll-target");if(!o)return;const l=document.querySelector(o);l&&(e.addEventListener("click",()=>this.smoothScrollTo(l)),e.style.cursor="pointer")})}}},"88a3":function(e,o,l){"use strict";o["a"]={addOrUpdateTargetBlock(e,o,l,a="innerHTML",s="head"){if(!l)return;const t=document.querySelector(s),r=t.querySelector("#"+o);if(r)r[a]=l;else{const s=document.createElement(e);s.id=o,t.prepend(s),s[a]=l}},getFocusableElements(e,o){if(e){const l=["button","a","input","select","textarea","[tabindex]"],a=o?l:l.map(e=>e+':not([tabindex="-1"])');return Array.from(e.querySelectorAll(a.join(",")))}},getFirstFocusable(e){if(e){const o=this.getFocusableElements(e);if(null===o||void 0===o?void 0:o.length)return o[0]}},sanitiseControlId(e){if(!(null===e||void 0===e?void 0:e.length))return;const o=/[^\p{L}\p{N}-]+/gu,l=/^[-]+|[-]+$/gu,a=/^[^\p{L}]+/u,s=e.toLowerCase().replace(o,"-");return s.replace(l,"").replace(a,"id-")}}},a8f8:function(e,o,l){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,o,l,a){void 0===a&&(a=l);var s=Object.getOwnPropertyDescriptor(o,l);s&&!("get"in s?!o.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return o[l]}}),Object.defineProperty(e,a,s)}:function(e,o,l,a){void 0===a&&(a=l),e[a]=o[l]}),s=this&&this.__exportStar||function(e,o){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(o,l)||a(o,e,l)};Object.defineProperty(o,"__esModule",{value:!0}),s(l("ffff"),o)},cd49:function(e,o,l){"use strict";l.r(o);var a=l("02e8"),s=l("6f27"),t=l("dc15"),r=l("a8f8"),d=l("522e"),i=l("0625"),n=l("88a3");let c;const u="Could not retrieve Okendo Reviews & UGC configuration";async function m(){if(c)return await c;const e=document.getElementById("oke-reviews-settings");if(e)c=Promise.resolve(JSON.parse(e.innerText));else{const e=document.querySelector('meta[name="oke:subscriber_id"]'),o=null===e||void 0===e?void 0:e.content;if(!o)return;const l=async()=>{try{const[e,l]=await Promise.all([d["a"].get(`${i["a"].apiBaseUrl}/stores/${o}/widget_plus_settings`),n["a"]]);return l.addOrUpdateTargetBlock("style","oke-css-vars",e.cssVariables,"outerHTML"),l.addOrUpdateTargetBlock("style","oke-reviews-custom-css",e.customCss,"outerHTML"),l.addOrUpdateTargetBlock("svg","oke-star-symbols",e.starSymbols,"outerHTML","body"),e.reviewsHeaderConfig}catch(e){console.error(u)}};c=l()}return await c}async function f(e){let{widgetSettings:o}=e;if(!o){const{default:e}=await Promise.all([l.e("okendo-reviews-core"),l.e("modules/okendo-reviews-settings")]).then(l.bind(null,"4adb"));o=e}return o}let v;const b=document.querySelector('meta[name="oke:subscriber_id"]'),w=document.querySelector('meta[name="oke:auto_initialise"]'),g=document.querySelector('meta[name="oke:hide_reviews_tab"]'),h=null===b||void 0===b?void 0:b.content;function k(e){const{isTestModeEnabled:o,locale:l,localeAndVariant:a,matchCustomerLocale:s}=e;return{isTestModeEnabled:o,locale:l,localeAndVariant:a,matchCustomerLocale:s}}(!h||h&&w)&&(async()=>{const e=await m();e&&("interactive"!==document.readyState&&"complete"!==document.readyState?document.addEventListener("readystatechange",()=>{j(e)},{once:!0}):j(e))})();const p={initAllWidgets:y,setWidgetSettings:q,setWidgetLocale:P,setSubscriberId:E,initWidget:C,setProduct:O,setGroup:T};async function j(e){const o=await f(e),l=k(e),a=Object(r["getLocaleWithFallback"])(null===l||void 0===l?void 0:l.localeAndVariant,null===l||void 0===l?void 0:l.locale),s=Object(t["a"])(l),d=s&&s.code!==a.code;await y(e.subscriberId,o,void 0,l,e.features,e.analyticsSettings,e.customDomain,d)}async function y(e,o,l,a,t,r,d,i=!0){var n,c,u,v;if(!e||!o){const l=await m();if(!l)return;o=await f(l),e=null!==(n=null!==e&&void 0!==e?e:h)&&void 0!==n?n:l.subscriberId}if(!e)return void console.error("No Okendo Reviews & UGC Subscriber ID. Please check your configuration.");const b=Array.from(document.querySelectorAll("[data-oke-star-rating]")),w=Array.from(document.querySelectorAll("[data-oke-widget]")),k=Array.from(document.querySelectorAll("[data-oke-questions-widget]")),p=Array.from(document.querySelectorAll("[data-oke-carousel]")),j=Array.from(document.querySelectorAll("[data-oke-badge]")),y=Array.from(document.querySelectorAll("[data-oke-media-grid]")),A=Array.from(document.querySelectorAll("[data-oke-media-carousel]")),O=Array.from(document.querySelectorAll("[data-oke-scroll-target]")),T=Array.from(document.querySelectorAll("[data-oke-reviews-modal-trigger]")),C=Array.from(document.querySelectorAll("[data-oke-reviews-summary]")),q=!g&&null!==(u=null===(c=o.reviewsTab)||void 0===c?void 0:c.enabled)&&void 0!==u&&u;if(e){const n=null===window||void 0===window?void 0:window.okeShowPreviewData,c=n||(null===(v=o.reviewsWidget)||void 0===v?void 0:v.showWhenEmpty)?w:w.filter(e=>""!==e.innerHTML.trim()),u=b.filter(e=>""!==e.innerHTML.trim()),m=!!i||await L(u,o,c);!m&&u.length&&S(u);const f=m?b:b.filter(e=>""===e.innerHTML.trim());O.length>0&&s["a"].bindScrollEventForElements(O);const g=f.length||c.length||k.length||p.length||j.length||y.length||A.length||T.length||C.length||q;if(g){const s=await W(!1);await s.setGlobalWidgetSettingsAndDirectives(o,a,e,t,r,d),s.initialiseWidgets({starRating:f,widget:c,questions:k,homepageCarousel:p,reviewsModal:T,reviewsSummary:C,reviewsTab:q,badge:j,mediaGrid:y,mediaCarousel:A},l)}}}async function L(e,o,l){let s=!1;return e.length&&(s=l.length>0||await a["a"].areStarRatingsClickable(o.starRatings)),s}async function S(e){const{default:o}=await l.e("modules/okendo-metafield-star-rating-utils").then(l.bind(null,"06b3"));o.bindEventsToMetafieldStarRatings(e)}async function A(e,o,l){var a;if(e){null===(a=e.firstElementChild)||void 0===a||a.remove();const s=`data-oke-reviews-${"group"===l?"product":"group"}-id`;(null===e||void 0===e?void 0:e.hasAttribute(s))&&e.removeAttribute(s),e.setAttribute(`data-oke-reviews-${l}-id`,o),await C(e,!0)}}async function O(e,o){await A(e,o,"product")}async function T(e,o){await A(e,o,"group")}async function C(e,o=!1){if(!(null===e||void 0===e?void 0:e.innerHTML)||!e.hasAttribute("data-oke-rendered")||o){const o=await W();o.initialiseWidget([e])}}async function q(e,o){const l=await W();l.setWidgetSettings(e,o);const a=Object(r["getLocaleWithFallback"])(null===o||void 0===o?void 0:o.localeAndVariant,null===o||void 0===o?void 0:o.locale);a&&P(a.code,a.variant)}async function E(e){const o=await W();o.setSubscriberId(e)}async function P(e,o){const l=await W();l.setWidgetLocale(e,o),document.dispatchEvent(new Event("oke-locale-changed"))}async function W(e=!0){if(v)return Promise.resolve(v);const{InitialiseWidgets:o}=await Promise.all([l.e("okendo-reviews-core"),l.e("okendo-reviews-styles"),l.e("okendo-reviews-translation"),l.e("modules/okendo-widget-init")]).then(l.bind(null,"2003")),a=new o;return e&&(await _(a),v=a),a}async function _(e){const o=await m();if(o){const l=k(o),a=await f(o);e.setGlobalWidgetSettingsAndDirectives(a,l,o.subscriberId,o.features,o.analyticsSettings,o.customDomain)}}window.okeWidgetApi=p,document.dispatchEvent(new Event("oke-script-loaded"))},dc15:function(e,o,l){"use strict";l.d(o,"a",(function(){return s}));var a=l("a8f8");function s(e){var o;if(null===e||void 0===e?void 0:e.matchCustomerLocale)return Object(a["getLocale"])(null===(o=window.Shopify)||void 0===o?void 0:o.locale)}},ffff:function(e,o,l){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.awsSupportedLocaleCodes=o.allLocalesWithAliases=o.localeAliases=o.allLocales=o.english=o.LocaleUtils=void 0,o.getLocale=t,o.getAllLocales=r,o.getLocaleWithFallback=d,o.getSubscriberLocaleWithFallback=i,o.getSubscriberLocaleTranslationFilename=n,o.getLocaleTranslationFilename=c;const a=f();var s;function t(e,l){if(void 0===e)return;const a=m(e)?e:o.localeAliases[e.toLowerCase()],s=o.allLocales[a];if(s){if("string"===typeof s)return{code:a};if("variants"in s){if(l){const e=s.variants[l];if(e)return{code:a,variant:l}}return{code:a,variant:s.defaultVariant}}}}function r(){const e=[];for(const[l,a]of Object.entries(o.allLocales))if("string"===typeof a)e.push({name:a,code:l});else if("variants"in a)for(const[o,{name:s}]of Object.entries(a.variants))e.push({name:s,code:l,variant:o});return e.sort((e,o)=>e.name.localeCompare(o.name))}function d(e,l,a=o.english){var s,r;return null!==(r=null!==(s=t(null===e||void 0===e?void 0:e.code,null===e||void 0===e?void 0:e.variant))&&void 0!==s?s:t(l))&&void 0!==r?r:a}function i(e,l=o.english){return d(e.localeAndVariant,e.locale,l)}function n(e){const o=i(e);return u(o)}function c(e,o){const l=t(e,o);if(l)return u(l)}function u(e){return`${e.code.toLowerCase()}${e.variant?"-"+e.variant.toLowerCase():""}`}function m(e){return!!e&&Object.keys(s.kOkendoLocales).some(o=>o.toLowerCase()===e.toLowerCase())}function f(){const e="(?([A-Za-z]{2,3}))",o="(?