/*! * 0.82.1 - 2025-10-01T07:48:38.994Z * Copyright (c) 2025 Okendo Pty Ltd * */(function(e){function o(o){for(var l,a,t=o[0],r=o[1],i=0,d=[];ie.toLowerCase())},supportedSourceLocaleCodesLowerCase(){return a["awsSupportedLocaleCodes"].map(e=>e.toLowerCase())}}},"522e":function(e,o,l){"use strict";l.d(o,"a",(function(){return a}));const a={get:(e,o)=>(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 i=s(e,r);i+=o;const d=Date.now(),n=t,c=()=>{const e=Date.now()-d;let o=i;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("342a"),r=l("a8f8"),i=l("522e"),d=l("0625"),n=l("88a3");let c;const u="Could not retrieve Okendo Reviews & UGC configuration";async function m(){var e,o;if(c)return await c;const l=document.getElementById("oke-reviews-settings");if(l)c=Promise.resolve(JSON.parse(l.innerText));else{const l=document.querySelector('meta[name="oke:subscriber_id"]'),a=null===(e=document.querySelector("script[data-oke-subscriber-id]"))||void 0===e?void 0:e.getAttribute("data-oke-subscriber-id"),s=null!==(o=null===l||void 0===l?void 0:l.content)&&void 0!==o?o:a;if(!s)return;const t=async()=>{try{const[e,o]=await Promise.all([i["a"].get(`${d["a"].apiBaseUrl}/stores/${s}/widget_plus_settings`),n["a"]]);return o.addOrUpdateTargetBlock("style","oke-css-vars",e.cssVariables,"outerHTML"),o.addOrUpdateTargetBlock("style","oke-reviews-custom-css",e.customCss,"outerHTML"),o.addOrUpdateTargetBlock("svg","oke-star-symbols",e.starSymbols,"outerHTML","body"),e.reviewsHeaderConfig}catch(e){console.error(u)}};c=t()}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}var v,b;let w;const g=document.querySelector('meta[name="oke:subscriber_id"]'),h=null===(v=document.querySelector("script[data-oke-subscriber-id]"))||void 0===v?void 0:v.getAttribute("data-oke-subscriber-id"),k=document.querySelector('meta[name="oke:auto_initialise"]'),p=document.querySelector('meta[name="oke:hide_reviews_tab"]'),j=null!==(b=null===g||void 0===g?void 0:g.content)&&void 0!==b?b:h;function y(e){const{isTestModeEnabled:o,locale:l,localeAndVariant:a,matchCustomerLocale:s}=e;return{isTestModeEnabled:o,locale:l,localeAndVariant:a,matchCustomerLocale:s}}(!j||j&&k)&&(async()=>{const e=await m();e&&("interactive"!==document.readyState&&"complete"!==document.readyState?document.addEventListener("readystatechange",()=>{S(e)},{once:!0}):S(e))})();const L={initAllWidgets:A,setWidgetSettings:W,setWidgetLocale:_,setSubscriberId:F,initWidget:P,setProduct:q,setGroup:E};async function S(e){const o=await f(e),l=y(e),a=Object(r["getLocaleWithFallback"])(null===l||void 0===l?void 0:l.localeAndVariant,null===l||void 0===l?void 0:l.locale),s=t["a"].getCustomerLocaleFromShopify(l),i=s&&s.code!==a.code;await A(e.subscriberId,o,void 0,l,e.features,e.analyticsSettings,e.customDomain,i)}async function A(e,o,l,a,t,r,i,d=!0){var n,c,u,v;if(!e||!o){const l=await m();if(!l)return;o=await f(l),t=null!==t&&void 0!==t?t:l.features,e=null!==(n=null!==e&&void 0!==e?e:j)&&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]")),g=Array.from(document.querySelectorAll("[data-oke-questions-widget]")),h=Array.from(document.querySelectorAll("[data-oke-carousel]")),k=Array.from(document.querySelectorAll("[data-oke-badge]")),y=Array.from(document.querySelectorAll("[data-oke-media-grid]")),L=Array.from(document.querySelectorAll("[data-oke-media-carousel]")),S=Array.from(document.querySelectorAll("[data-oke-scroll-target]")),A=Array.from(document.querySelectorAll("[data-oke-reviews-keywords]")),O=Array.from(document.querySelectorAll("[data-oke-reviews-modal-trigger]")),q=Array.from(document.querySelectorAll("[data-oke-reviews-summary]")),E=!p&&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=!!d||await C(u,o,c);!m&&u.length&&T(u);const f=m?b:b.filter(e=>""===e.innerHTML.trim());S.length>0&&s["a"].bindScrollEventForElements(S);const p=f.length||c.length||g.length||h.length||k.length||y.length||L.length||A.length||O.length||q.length||E;if(p){const s=await z(!1);await s.setGlobalWidgetSettingsAndDirectives(o,a,e,t,r,i),s.initialiseWidgets({starRating:f,widget:c,questions:g,homepageCarousel:h,reviewsKeywords:A,reviewsModal:O,reviewsSummary:q,reviewsTab:E,badge:k,mediaGrid:y,mediaCarousel:L},l)}}}async function C(e,o,l){let s=!1;return e.length&&(s=l.length>0||await a["a"].areStarRatingsClickable(o.starRatings)),s}async function T(e){const{default:o}=await l.e("modules/okendo-metafield-star-rating-utils").then(l.bind(null,"06b3"));o.bindEventsToMetafieldStarRatings(e)}async function O(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 P(e,!0)}}async function q(e,o){await O(e,o,"product")}async function E(e,o){await O(e,o,"group")}async function P(e,o=!1){if(!(null===e||void 0===e?void 0:e.innerHTML)||!e.hasAttribute("data-oke-rendered")||o){const o=await z();o.initialiseWidget([e])}}async function W(e,o){const l=await z();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&&_(a.code,a.variant)}async function F(e){const o=await z();o.setSubscriberId(e)}async function _(e,o){const l=await z();l.setWidgetLocale(e,o),document.dispatchEvent(new Event("oke-locale-changed"))}async function z(e=!0){if(w)return Promise.resolve(w);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 M(a),w=a),a}async function M(e){const o=await m();if(o){const l=y(o),a=await f(o);e.setGlobalWidgetSettingsAndDirectives(a,l,o.subscriberId,o.features,o.analyticsSettings,o.customDomain)}}window.okeWidgetApi=L,document.dispatchEvent(new Event("oke-script-loaded"))},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=i,o.getSubscriberLocaleWithFallback=d,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 i(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 d(e,l=o.english){return i(e.localeAndVariant,e.locale,l)}function n(e){const o=d(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="(?