!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},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=31)}([function(e,t,n){"use strict";n.r(t),n.d(t,"canShowBadgeStock",(function(){return S}));const i={ERROR:-1,NEGATIVE:0,NOT_TRACKED:1,OUT_OF_STOCK:2,LOW_STOCK:3,MEDIUM_STOCK:4,HIGH_STOCK:5,FULL_STOCK:6},o=1,a=2,l="#E5E3E3",s="#FC7B66",r="#F6C243",c="#B7CD5F",p="#5FCD8D",_={[i.NEGATIVE]:0,[i.NOT_TRACKED]:0,[i.OUT_OF_STOCK]:0,[i.LOW_STOCK]:10,[i.MEDIUM_STOCK]:30,[i.HIGH_STOCK]:70,[i.FULL_STOCK]:100};function d(e){let t={[i.OUT_OF_STOCK]:s,[i.LOW_STOCK]:s,[i.MEDIUM_STOCK]:r,[i.HIGH_STOCK]:c,[i.FULL_STOCK]:p};return"function"==typeof bssFixSupportBadgeStockColors&&(t=bssFixSupportBadgeStockColors(BSS_PL.$,BSS_PL,i,t)),Object.keys(t).includes(String(e))&&t[String(e)]?t[String(e)]:l}function u(e,t){const n=e[e.length-1].qty,o=g(e,t);var a,l;if(o!==i.ERROR)return{type:o,...e[o],...o>=i.LOW_STOCK&&{progress:(a=100*t/n,l=o,a>_[l]?_[l]:a)}}}function g(e,t){if(e.length<7)return i.ERROR;switch(!0){case t<0&&e[i.NEGATIVE].enable:return i.NEGATIVE;case null===t&&e[i.NOT_TRACKED].enable:return i.NOT_TRACKED;case 0===t&&e[i.OUT_OF_STOCK].enable:return i.OUT_OF_STOCK;case t<=0:return i.ERROR;case t<=e[i.LOW_STOCK].qty&&e[i.LOW_STOCK].enable:return i.LOW_STOCK;case t=e[i.FULL_STOCK].qty&&e[i.FULL_STOCK].enable:return i.FULL_STOCK;case t>=e[i.HIGH_STOCK].qty&&e[i.HIGH_STOCK].enable:return i.HIGH_STOCK;default:return i.ERROR}}function S(e,t){return-1!==g(e,t)}BSS_PL.LabelStyle.getBadgeStockHtml=e=>{const{badgeType:t,fixedPercentLabel:n,itemWidth:l,variant:s,productType:r}=e,{configs:c,qtyInventory:p,className:_,styleForLabelText:g,badgeStockStyle:S,marginTop:f,marginBottom:m,animationClassName:b,item:h,animationStyles:L}=e,{labelTextId:y,altText:P,fontSize:x,fontFamily:C,fontStyle:B,fontColor:w,fontWeight:v}=e,{statusLink:$,textHoverValue:T,linkTextHoverValue:I,targetValue:O,textArr:k}=e;let N={};if(N=k.length?u(k,p):u(c,p),!N)return;const{progress:A,content:D,type:F}=N,E=F>=i.LOW_STOCK?unescape(D).replace("#",p):unescape(D),R=[7,8,9,10].includes(t),M=[7,9].includes(t),H="percentage"==n;let V=R?"position: relative !important;":"position: absolute !important;";const U=R?`position-badge="${M?"before":"after"}"`:"";return`\n
\n \n
\n ${E}\n
\n ${S===o?`
`:""}\n ${S===a?`
`:""}\n
\n `}},function(e,t){void 0===BSS_PL.conditions&&(BSS_PL.conditions={}),void 0===BSS_PL.LabelStyle&&(BSS_PL.LabelStyle={}),void 0===BSS_PL.common&&(BSS_PL.common={}),void 0===BSS_PL.integration&&(BSS_PL.integration={}),void 0===BSS_PL.collectionImg&&(BSS_PL.collectionImg={})},function(e,t){BSS_PL.conditions.showOnPage=(e,t)=>{if(e.pages){const n=BSS_PL.page.isProductPage(),i=BSS_PL.page.isHomePage(),o=BSS_PL.page.isCollectionPage(),a=BSS_PL.page.isSearchPage(),l=BSS_PL.page.isCartPage(),s=BSS_PL.page.isOtherPage(),r=e.pages.split(",");let c=!1;"function"==typeof bssFixSupportCustomAllowShowOnPage&&(c=bssFixSupportCustomAllowShowOnPage(e,t));let p=r.indexOf("1")>=0&&n||r.indexOf("2")>=0&&o||r.indexOf("7")>=0&&i||r.indexOf("3")>=0&&s||r.indexOf("4")>=0&&a||r.indexOf("5")>=0&&l||c;return r.indexOf("6")>-1&&e.related_product_tag&&t&&e.related_product_tag.indexOf(t.className)>-1&&(p=!1),p}return!1},BSS_PL.conditions.showOnDevice=e=>{const t=BSS_PL.helper.isPcScreen()?"desktop":"mobile",n=2==e.label_type&&0==e[t+"_show_badges"];return!(1==e.label_type&&0==e[t+"_show_labels"]||n)},BSS_PL.conditions.notShowOnCustomBlock=(e,t,n)=>{if(!t.pages.includes("6"))return!0;const i=e(n);let o=["grid-view-item","supports-js","grid-product__image-wrapper","grid-product__wrapper","grid__item small--one-half","product-item__link-wrapper"];"function"==typeof bssFixSupportDefaultRelatedProduct&&(o=bssFixSupportDefaultRelatedProduct());let a=t.related_product_tag?t.related_product_tag.split(","):[];a.length&&(o=a);for(const e of o){let t=e.trim();if(i.hasClass(t))return!1}return!0},BSS_PL.conditions.notShowOnCustomPage=e=>{if(e.check_custom_page){let t=e.custom_page?e.custom_page.split(","):[];for(const e of t)if(BSS_PL.helper.checkCustomPage(e))return!1}return!0},BSS_PL.conditions.showOnCustomPage=e=>{if(e.check_include_custom_page&&e.include_custom_page){let t=e.include_custom_page.split(",");for(const e of t)if(BSS_PL.helper.checkCustomPage(e))return!0;return!1}return!1},BSS_PL.conditions.applyToProduct=(e,t,i,a)=>{if(i.product_type==BSS_PL.const.PRODUCT_TYPE.PRODUCTS){if(!i.product)return!1;return!!i.product.split(",").find(e=>t.id==e)}if(i.product_type==BSS_PL.const.PRODUCT_TYPE.COLLECTIONS&&(BSS_PL.plan.ADVANCED||BSS_PL.storeId<=BSS_PL.storeIdCustomOld)){if(!i.collection||!t.collections)return!1;return!!i.collection.split(",").find(e=>-1!==t.collections.findIndex(t=>t==e))}if(i.product_type==BSS_PL.const.PRODUCT_TYPE.VENDORS){if(!i.vendors||!t.vendor)return!1;const e=t.vendor;return i.vendors.includes(e)}if(i.product_type==BSS_PL.const.PRODUCT_TYPE.TAGS&&(BSS_PL.plan.ADVANCED||BSS_PL.storeId<=BSS_PL.storeIdCustomOld)){if(!i.tags)return!1;const e=i.tags.split(","),n=t.tags;return!!e.find(e=>n.includes(e))}if(BSS_PL.plan.PLATINUM&&i.product_type==BSS_PL.const.PRODUCT_TYPE.VARIANTS&&t.variants.length){if(!i.variant)return!1;const n=i.variant.split(","),o=BSS_PL.helper.getProductVariantId(e,a,t);return Array.isArray(o)?n.some(e=>o.includes(e)):n.includes(o)}if(BSS_PL.plan.PLATINUM&&i.product_type==BSS_PL.const.PRODUCT_TYPE.METAFIELDS){const l=i.metafields;if(!t.metafields||!l)return!1;const s=JSON.parse(l),{metafield_type:r,valueProductMetafield:c,matching_type:p}=s;if(1===r)return n(c,t.metafields,p);if(2===r){const n=BSS_PL.helper.getProductVariantId(e,a,t);return Array.isArray(n)?n.some(e=>o(s,t,e)):o(s,t,n)}return!1}if(8==i.exclude_products){if(!i.collection||!t.collections)return!1;return!i.collection.split(",").find(e=>-1!==t.collections.findIndex(t=>t==e))}return!0},BSS_PL.conditions.productTitle=(e,t)=>{if(t.condition_product_title&&e.title){const n=JSON.parse(t.condition_product_title);if(n.enable){if(1==n.type)return e.title.includes(n.content.trim());if(2==n.type)return e.title==n.content.trim()}}return!0},BSS_PL.conditions.excludeProduct=(e,t)=>{if(!BSS_PL.plan.ADVANCED)return!1;if(8==t.exclude_products){if(!t.collection||!e.collections)return!1;return t.collection.split(",").find(t=>-1!==e.collections.findIndex(e=>e==t))}if(5==t.exclude_products&&t.excludeTags){const n=t.excludeTags.split(","),i=e.tags;return n.find(e=>i.includes(e))}return!(7!=t.exclude_products||!t.exclude_product_ids)&&t.exclude_product_ids.includes(e.id)},BSS_PL.conditions.allowCustomer=(e,t)=>{if(!e.plan.ADVANCED)return!0;let n=!0;switch(t.customer_type){case"allcustomers":break;case"customer_tags":n=null!==t.customer_tags&&void 0!==t.customer_tags&&e.customerTags.split(",").some(e=>""!==e&&t.customer_tags.includes(e));break;case"login_customer":n="null"!==e.customerTags;break;case"not_login_customer":n="null"===e.customerId;break;case"specific_customers":n="null"!==e.customerId&&-1!==t.customer_ids.indexOf(e.customerId)}if(n&&t.exclude_customers)switch(t.exclude_customers){case"exclude_customer_tags":n=null!==t.exclude_customer_tags&&void 0!==t.exclude_customer_tags&&!e.customerTags.split(",").some(e=>""!==e&&t.exclude_customer_tags.includes(e));break;case"exclude_specific_customers":n="null"===e.customerId||-1===t.exclude_customer_ids.indexOf(e.customerId)}return n},BSS_PL.conditions.visibilityDate=(e,t)=>{if(!t.enable_visibility_date||!e.plan.ADVANCED)return!0;const n=new Date,i=t.from_date?new Date(t.from_date):null,o=t.to_date?new Date(t.to_date):null;return(null===i||n>=i)&&(null===o||n<=o)},BSS_PL.conditions.visibilityPeriod=(e,t)=>{const n=t.publish_at;if(!e.enable_visibility_period||!n)return!0;let i=n.replace(" ","T").replace(" -","-").replace(" +","+"),o=new Date(i);return isNaN(o.getTime())&&(o=new Date(n)),o.setDate(o.getDate()+e.visibility_period),o.getTime()>Date.now()},BSS_PL.conditions.visibilityFixedTime=(e,t)=>{if(t.enable_fixed_time&&e.plan.ADVANCED){const e=JSON.parse(t.fixed_time);let n=new Date,i=n.getDay();if(!e[i].selected)return!1;if(!e[i].allDay){let t=+(n.getHours().toString()+(n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes()).toString()),o=+e[i].timeStart.replace(":",""),a=+e[i].timeEnd.replace(":","");if(ta)return!1}}return!0},BSS_PL.conditions.productPublishDate=(e,t)=>{if(!t.enable_product_publish)return!0;const n=BSS_PL.settingsData.disableLiquidSearch?e.published_at:e.publish_at.replace(/ /g,"T").slice(0,e.publish_at.length-6),i=new Date(n).getTime(),o=new Date(t.product_publish_from).getTime(),a=new Date(t.product_publish_to).getTime();return BSS_PL.plan.ADVANCED&&i>=o&&(0===a||i<=a)},BSS_PL.conditions.priceRange=(e,t,n,i)=>{if(!n.enable_price_range)return!0;let o=1;if(n.conditions_apply_type&&(o=JSON.parse(n.conditions_apply_type).price||1),BSS_PL.plan.ADVANCED&&1==n.enable_price_range){const a=n.price_range_from?parseFloat(n.price_range_from):null,l=n.price_range_to?parseFloat(n.price_range_to):null,s=e=>!a&&e>l||!l&&el,r=()=>{let e=t.variants;return e.forEach(t=>{const n=parseFloat(t.price/100);s(n)&&(e=e.filter(e=>e.id!=t.id))}),!!e.length};if(o==BSS_PL.const.APPLY_TYPE.PRODUCT){if(n.product_type==BSS_PL.const.PRODUCT_TYPE.VARIANTS)return r();{const e=parseFloat(t.price/100);return!s(e)}}if(o==BSS_PL.const.APPLY_TYPE.VARIANT&&BSS_PL.plan.PLATINUM){const n=BSS_PL.page.isProductPage(),o=BSS_PL.page.isCartPage();if(n||o){const n=BSS_PL.helper.getProductVariantId(e,i,t),o=t.variants.find(e=>e.id==n);if(o){const e=parseFloat(o.price/100);return!s(e)}return r()}if(e(i).closest('[class*="featured-product"]').length){const n=BSS_PL.helper.getProductVariantId(e,i,t),o=t.variants.find(e=>e.id==n);if(o){const e=parseFloat(o.price/100);return!s(e)}}return r()}}return!0},BSS_PL.conditions.showCountDown=e=>{if(!e.label_text_enable||1!=e.enable_countdown_timer||!BSS_PL.plan.ADVANCED)return!0;if(1==e.countdown_type)return 1==!e.option_end_countdown||(new Date).getTime()<=new Date(e.countdown_time).getTime();if(2==e.countdown_type){const t=new Date,n=/^(\d{1,2}):(\d{1,2}):?(\d{0,2})$/,[i,o,a,l]=n.exec(e.countdown_daily_from_time),[s,r,c,p]=n.exec(e.countdown_daily_to_time),_=new Date(t).setHours(o,a,l)<=new Date,d=new Date(t).setHours(r,c,p)<=new Date;return _&&!(d&&1==e.option_end_countdown)}return 1==!e.option_end_countdown||(new Date).getTime()>=new Date(e.countdown_interval_start_time).getTime()},BSS_PL.conditions.allowCountry=e=>{if(BSS_PL.countryCode&&e.enable_allowed_countries&&e.locations){return-1!==e.locations.split(",").indexOf(BSS_PL.countryCode)}return!0},BSS_PL.conditions.allowLocale=e=>{if(Shopify.locale&&e.enable_allowed_locales&&e.locales){return-1!==e.locales.split(",").indexOf(Shopify.locale)}return!0},BSS_PL.conditions.checkApplyToCollectionImg=(e,t,n)=>{const i=JSON.parse(t.condition_product_title);if(!BSS_PL.plan.ADVANCED||!n.isCollectionData||i.enable)return!1;if(1!=t.collection_image_type||!t.collection_image||!n.id)return!1;var o=t.collection_image.split(",");return-1!=e.inArray(n.id.toString(),o)},BSS_PL.conditions.checkSaleLabelText=(e,t,n,i,o)=>{const{discount:a,discountAmount:l,hasBlockSaleSaleAmountText:s}=BSS_PL.getDiscount(e,i,n,t);if(t.label_text_enable){const e=-1!==unescape(t.label_text).indexOf("{sale}"),n=-1!==unescape(t.label_text).indexOf("{sale_amount}");if(e&&a<=0||s)return;if(n&&0==l)return;if(a<=0&&e)return;if(t.product_type==BSS_PL.const.PRODUCT_TYPE.VARIANTS&&o){const t=o.compare_at_price,i=o.price;if(parseFloat(((t-i)/t*100).toFixed(0))<=0&&"{sale}"==e)return;if(i-t<=0&&"{sale_amount}"==n)return}}return!0};const n=(e,t,n)=>{for(const o of e){const e=t.find(e=>e&&e.namespace===o.namespace&&e.key===o.key);if(!e||e.type!==o.type.name){if(2===n)return!1;continue}const a=o.type.name.startsWith("list."),l=a?o.type.name.replace("list.",""):o.type.name,s=a?o.listValue:o.value;let r=e.value;if("string"==typeof r&&(a||["dimension","volume","weight","rating","money"].includes(l))&&(r=JSON.parse(r)),a){if(1===n&&r.some(e=>s.some(t=>i(e,t,l))))return!0;if(2===n&&r.every(e=>s.every(t=>!i(e,t,l))))return!1}else{const e=i(r,s,l);if(e&&1===n)return!0;if(!e&&2===n)return!1}}return 1!==n&&e.length>0},i=(e,t,n)=>["dimension","volume","weight"].includes(n)?Number(e.value)===Number(t.value)&&BSS_PL.const.UNIT_METAFIELD[e.unit]===t.unit:"money"===n?Number(t.value)===Number(e.amount):"rating"===n?Number(t.value)===Number(e.value):"date_time"===n?e===BSS_PL.helper.convertDateUTC(t):"number_integer"===n?parseInt(e)===parseInt(t):"number_decimal"===n?parseFloat(e)===parseFloat(t.value):"multi_line_text_field"===n?String(e)===String(t):"color"===n?String(e).toUpperCase()===String(t).toUpperCase():String(e).trim()===String(t).trim(),o=(e,t,i)=>{const o=t.variants.find(e=>e.id===Number(i));return!!o&&n(e.valueVariantMetafield,o.metafields,e.matching_type)}},function(e,t){function n(e,t,n,i){return void 0!==t.get(n)&&null!=t.get(n)&&t.get(n).includes(e)?i=!1:t.set(n,[e]),i}BSS_PL.conditions.checkFirstImage=function(e,t,i,o,a){let l=!0;const s=BSS_PL.page.getPageName(),r=BSS_PL.page.isProductPage(),c=e(i);if(BSS_PL.plan.ADVANCED&&(r||BSS_PL.page.isBeaeBuilderPage())&&1==t.label_on_image&&a||48948===BSS_PL.storeId){const t=["product__modal-opener","product-single__photos","product__media-container","gallery__image-wrapper","product-single__image-wrapper","product__photo--single","product-single__photo"],r=["product__image-wrapper","product-gallery--media-wrapper","product-gallery--image-background"],p=["beae-product-single__media--image"],_=["image-wrap"];for(let e in[...t,...r,...p,..._])if(c.hasClass(e)){l=n(e,a,o,l);break}return c.hasClass("product-single__media")?a&&(c.parent().hasClass("product-single__media-wrapper")||27405==BSS_PL.storeId)&&(l=n("product-single__media",a,o,l)):e(".ecom-builder").length&&c.hasClass("ecom-product-single__media--image")&&c.closest(".ecom-product-single__media-wrapper").length?l=n("ecom-product-single__media--image",a,o,l):c.hasClass("product__photo-wrapper")&&c.hasClass("product__photo-wrapper-product-template")?l=n("product__photo-wrapper",a,o,l):c.hasClass("product__submedia-wrapper")||c.hasClass("product__media-wrapper")?l=n("product__submedia-wrapper",a,o,l):c.is(".product .product-media-container .product__media")&&(void 0!==a.get(o)&&null!=a.get(o)&&a.get(o).includes(".product .product-media-container .product__media")?l=!1:a.set(o,[".product .product-media-container .product__media"])),"function"==typeof bssFixSupportFirstImageLabel&&(l=bssFixSupportFirstImageLabel(e,s,i,a,o,l)),l}return!0}},function(e,t){BSS_PL.conditions.discountRange=(e,t,a,l,s,r)=>{const c=t.enable_discount_range,p=t.discount_type;let _=t.discount_from,d=t.discount_to,u=1;if(t.conditions_apply_type&&(u=JSON.parse(t.conditions_apply_type).discount||1),c){if(u==BSS_PL.const.APPLY_TYPE.PRODUCT){if(4==t.product_type)return o({prod:s,discountType:p,discountFrom:_,discountTo:d});if(t.label_text&&(t.label_text.includes("%7Bsale%7D")||t.label_text.includes("%7Bsale_amount%7D")))return i(p,_,d,a,l);if(46228==BSS_PL.storeId&&s.variants.length>0)return i(p,_,d,a,l);{const{discount:e,discountAmount:t}=n(s.compare_at_price_max,s.price_min);return i(p,_,d,e,t)}}if(u==BSS_PL.const.APPLY_TYPE.VARIANT){const t=BSS_PL.page.isProductPage(),a=BSS_PL.page.isCartPage();if(t||a){const t=BSS_PL.helper.getProductVariantId(e,r,s),a=s.variants.find(e=>e.id==t);if(a){const{discount:e,discountAmount:t}=n(a.compare_at_price,a.price);return i(p,_,d,e,t)}return o({prod:s,discountType:p,discountFrom:_,discountTo:d})}if(e(r).closest('[class*="featured-product"]').length){const t=BSS_PL.helper.getProductVariantId(e,r,s),o=s.variants.find(e=>e.id==t);if(o){const{discount:e,discountAmount:t}=n(o.compare_at_price,o.price);return i(p,_,d,e,t)}}return o({prod:s,discountType:p,discountFrom:_,discountTo:d})}}return!0};const n=(e,t)=>{let n=0,i=0;if(e>0){const o=parseFloat(((e-t)/e*100).toFixed(0));n=isNaN(o)?0:o,i=parseFloat(-(e-t).toFixed(0))}else n=-1;return{discount:n,discountAmount:i}},i=(e,t,n,i,o)=>{let a=1==e?i:Math.abs(o)/100;if(!a||a<=0)return!1;if(t||n){return!(t&&!n&&an||t&&n&&(an))}return!0},o=({prod:e,discountType:t,discountFrom:i,discountTo:o})=>{if(e.variants.length){let a=e.variants;return a.forEach((function(e){const{discount:l,discountAmount:s}=n(e.compare_at_price,e.price),r=1==t?l:Math.abs(s)/100;if(r<=0)a=a.filter(t=>t.id!=e.id);else{if(i&&!o&&ro||i&&o&&(ro))a=a.filter(t=>t.id!=e.id);else if(!i&&!o)return!0}})),Boolean(a.length)}return!1}},function(e,t){BSS_PL.conditions.showByInventory=(e,t,n,i,o,a)=>{let l=!0;if(BSS_PL.plan.FREE)return l;const s=BSS_PL.page.getPageName();let r=t.inventory;if(2==JSON.parse(t.conditions_apply_type||"{}").inventory){let i,s;if(BSS_PL.page.isProductPage())i=BSS_PL.helper.getProductVariantId(e,a,o);else if((BSS_PL.page.isCartPage()||e(a).closest('[class*="featured-product"]').length)&&(i=BSS_PL.helper.getProductVariantId(e,a,o),!i))return!1;if(i&&(s=o.variants.find(e=>e.id.toString()===i.toString())),s)n=s.available,l=r==BSS_PL.const.INVENTORY_CONDITION.ANY||r==BSS_PL.const.INVENTORY_CONDITION.IN_STOCK&&n||r==BSS_PL.const.INVENTORY_CONDITION.OUT_OF_STOCK&&!n||r==BSS_PL.const.INVENTORY_CONDITION.GREATER_THAN&&t.instock<=s.quantity||r==BSS_PL.const.INVENTORY_CONDITION.LESS_THAN&&t.instock>=s.quantity&&n||r==BSS_PL.const.INVENTORY_CONDITION.STOCK_RANGE&&BSS_PL.conditions.checkStockRangeCondition(t,s.quantity,s);else switch(r){case BSS_PL.const.INVENTORY_CONDITION.IN_STOCK:l=o.variants.some(e=>e.available);break;case BSS_PL.const.INVENTORY_CONDITION.OUT_OF_STOCK:l=o.variants.every(e=>!e.available);break;case BSS_PL.const.INVENTORY_CONDITION.GREATER_THAN:l=o.variants.some(e=>e.quantity>=t.instock);break;case BSS_PL.const.INVENTORY_CONDITION.LESS_THAN:l=o.variants.some(e=>e.quantity<=t.instock&&e.available);break;case BSS_PL.const.INVENTORY_CONDITION.STOCK_RANGE:l=o.variants.some(e=>BSS_PL.conditions.checkStockRangeCondition(t,e.quantity,e))}}else l=r==BSS_PL.const.INVENTORY_CONDITION.ANY||r==BSS_PL.const.INVENTORY_CONDITION.IN_STOCK&&n||r==BSS_PL.const.INVENTORY_CONDITION.OUT_OF_STOCK&&!n||r==BSS_PL.const.INVENTORY_CONDITION.GREATER_THAN&&t.instock<=i||r==BSS_PL.const.INVENTORY_CONDITION.LESS_THAN&&t.instock>=i&&n||r==BSS_PL.const.INVENTORY_CONDITION.STOCK_RANGE&&BSS_PL.conditions.checkStockRangeCondition(t,i,o),"function"==typeof bssFixSupportIsShowByStock&&(l=bssFixSupportIsShowByStock(t,r,n,i));return"function"==typeof bssFixSupportMainInfoShowByStock&&(l=bssFixSupportMainInfoShowByStock(BSS_PL.$,s,o,r,l,t)),l}},function(e,t,n){const{canShowBadgeStock:i}=n(0);BSS_PL.conditions.getProductStock=(e,t,n,i=!1)=>{let o=t.available;const a=BSS_PL.page.getPageName();let l,s;"function"==typeof bssFixSupportOutOfStockQuantity&&(o=bssFixSupportOutOfStockQuantity(o,t)),l=t.variants.every(e=>"continue"===e.inventory_policy||null===e.inventory_management)&&i?null:t.variants.filter(e=>null!==e.inventory_management).reduce((e,t)=>e+t.quantity,0);let r=t.variants[0];if(e(n).closest('form[action="/cart"]').length||e(n).closest(".product").length||e(n).closest('[class*="featured-product"]').length||e(n).closest(".product-block-list").length||e(n).closest(".page-content--product").length){const i=BSS_PL.helper.getProductVariantId(e,n,t),o=t.variants.find(e=>e.id.toString()===i);o&&(r=o)}if(BSS_PL.page.isProductPage()&&t.variants.length){let e=Number(new URLSearchParams(window.location.search).get("variant"));if(e){const n=t.variants.find(t=>t.id.toString()===e.toString());n&&(r=n)}}return s=35925!==BSS_PL.storeId&&null==r.inventory_management||"shopify"===r.inventory_management&&"continue"===r.inventory_policy&&i?null:r.quantity,"function"==typeof bssFixSupportLabelTextInventoryQuantity&&(s=bssFixSupportLabelTextInventoryQuantity(e,BSS_PL,n,a,s,r)),"function"==typeof bssFixSupportTotalInventoryQuantity&&(l=bssFixSupportTotalInventoryQuantity(e,BSS_PL,n,a,l,t)),{isAvailable:o,totalInventoryQuantity:l,variantInventoryQuantity:s,prodVariantSelected:r}},BSS_PL.conditions.checkStockCondition=(e,t,n,o)=>{if(n.inventory===BSS_PL.const.INVENTORY_CONDITION.ANY)return{isShowByStock:!0,isAllowShowBadgeStock:!0};const a=JSON.parse(n.conditions_apply_type||"{}"),{isAvailable:l,totalInventoryQuantity:s,variantInventoryQuantity:r}=BSS_PL.conditions.getProductStock(e,t),c=2==a.inventory?r:s;return{isShowByStock:BSS_PL.conditions.showByInventory(e,n,l,c,t,o),isAllowShowBadgeStock:2==n.label_type&&n.label_text_enable&&n.enable_badge_stock&&i(n.badge_stock_config,s)}},BSS_PL.conditions.checkStockRangeCondition=(e,t,n)=>{const{from_stock:i,to_stock:o}=e;if(null==i&&null==o)return!0;if(n.inventory_management){if(null==i||null==o){if(t<=0&&"deny"==n.inventory_policy)return!1;if(null!=o&&t<=o)return!0;if(null!=i&&t>=i)return!0}if(null!=i&&null!=o)switch(n.inventory_policy){case"continue":if(i<=t&&o>=t)return!0;break;case"deny":if(t>0&&i<=t&&o>=t)return!0;break;default:return!1}}return!1}},function(e,t,n){const{default:i}=n(8),o=["Dawn","Sense","Craft","Crave","Ride","Colorblock","Taste","Refresh","Studio","Publisher","Origin","Spotlight"];BSS_PL.LabelStyle.getAnimationClassName=function(e){let t="";switch(e){case 1:t="bss-animated bss-animate-pulse ";break;case 2:t="bss-animated bss-animate-bounceIn ";break;case 3:t="bss-animated bss-animate-bounceOut ";break;case 4:t="bss-animated bss-animate-swing ";break;case 5:t="bss-animated bss-animate-hiThere ";break;case 6:t="bss-animated bss-animate-flash ";break;case 7:t="bss-animated bss-animate-rollIn ";break;case 8:t="bss-animated bss-animate-rollOut "}return t},BSS_PL.LabelStyle.getPositionClassName=function(e){const t=BSS_PL.helper.isPcScreen();if(2==e.label_type){let n="bss-pb-bottom-left";switch(t?e.position:e.mobile_position){case 1:n="bss-pb-bottom-center";break;case 2:n="bss-pb-bottom-right"}return n}if((BSS_PL.plan.PLATINUM&&t?9==e.position:9==e.mobile_position)||e.label_text_enable)return"";let n="bss-pl-top-left";switch(t?e.position:e.mobile_position){case 1:n="bss-pl-top-center";break;case 2:n="bss-pl-top-right";break;case 3:n="bss-pl-middle-left";break;case 4:n="bss-pl-middle-center";break;case 5:n="bss-pl-middle-right";break;case 6:n="bss-pl-bottom-left";break;case 7:n="bss-pl-bottom-center";break;case 8:n="bss-pl-bottom-right"}return n},BSS_PL.LabelStyle.getSizeStylesForLabel=function(e){const t=BSS_PL.helper.isPcScreen()?"desktop":"mobile",n=BSS_PL.helper.isFirefox(),i=e[t+"_fixed_percent_label"]==BSS_PL.const.LABEL_SIZE_SUFFIX_CONFIG.PERCENTAGE||1==e[t+"_fixed_percent_label"]?"%":"px";let o,a,l=e[t+"_width_label"],s=e[t+"_height_label"];"%"==i&&l>100&&(l=100),o=-1==l||null==l?"auto !important":n?`${l}${i}`:`calc(${l}${i} + 1px)`,"%"==i&&s>100&&(s=100),a=-1==s||null==s?"auto !important":n?`${s}${i}`:`calc(${s}${i} + 1px)`;return{width:o,height:a}},BSS_PL.LabelStyle.getSizeStylesForBadge=function(e){const t=BSS_PL.helper.isPcScreen()?"desktop":"mobile",n=e[t+"_fixed_percent_label"]==BSS_PL.const.LABEL_SIZE_SUFFIX_CONFIG.PERCENTAGE||1==e[t+"_fixed_percent_label"]?"%":"px";let i=e[t+"_width_label"],o=e[t+"_height_label"];"%"==n&&o>100&&(o=100),"%"==n&&i>100&&(i=100);return{width:`${i}${n}`,height:"%"==n?"auto":o+"px"}},BSS_PL.LabelStyle.getCustomPositionStyleForFreeTheme=function(e,t,n){const i=BSS_PL.helper.isPcScreen()?t.position:t.mobile_position;let o={};const a=e(n),{parentHeight:l,parentWidth:s}=function(e,t){t.hasClass("hide")&&t.addClass("hide-clone").removeClass("hide");let n=t.outerWidth(),i=t.outerHeight();return t.hasClass("hide-clone")&&t.addClass("hide").removeClass("hide-clone"),{parentHeight:i,parentWidth:n}}(0,a);if(!BSS_PL.plan.PLATINUM&&9!==i&&!t.label_text_enable){if([1,2,4,5,7,8].includes(i)){let e=0;if(a.hasClass("cart__image-wrapper")){let t=a.find("img").width(),n=(a.width()-t)/2;e=parseFloat(s)-parseFloat(a.width())+n}let t="px";a.hasClass("cart__image-wrapper")&&(t+=" !important"),o.right=`${e}${t}`}if([6,7,8].includes(i)&&a.hasClass("cart__image-wrapper")){let e=a.find("img").height();o.bottom=parseFloat(l)-parseFloat(e)+"px !important"}if([2,5,8].includes(i))o.left="auto !important";else if([0,3,6].includes(i)&&a.hasClass("cart__image-wrapper")){o.left="";let e=a.find("img").width(),t=(a.width()-e)/2;o.left=t||0,o.left+="px !important"}}return o},BSS_PL.LabelStyle.getZIndexImage=function(){const e=BSS_PL.page.getPageName();let t="z-index:4;";if(o.includes(Shopify.theme.name)&&("collections"==e||window.location.pathname.includes("/cart"))||Shopify.theme.name.includes("Colorblock")&&"products"==e){let e=document.querySelector("#shopify-section-header")?document.querySelector("#shopify-section-header"):document.querySelector(".shopify-section-group-header-group.section-header");setTimeout((function(){e.style.zIndex="7"}),500)}if((Shopify.theme.name.includes("Dawn")||Shopify.theme.name.includes("Sense"))&&(t="z-index: 2;","products"==e&&BSS_PL.plan.ADVANCED)){t="z-index: 3;";let e=document.querySelector("#shopify-section-header")?document.querySelector("#shopify-section-header"):document.querySelector(".shopify-section-group-header-group.section-header");setTimeout((function(){e.style.zIndex="5"}),500)}return Shopify.theme.name.includes("Debut")&&BSS_PL.plan.ADVANCED&&setTimeout((function(){let e=document.querySelectorAll(".full-width-link");for(let t of e)t.style.zIndex="0"}),500),t},BSS_PL.LabelStyle.getZIndexLabelText=function(){let e="z-index: 4;";const t=BSS_PL.page.getPageName();if(o.includes(Shopify.theme.name)&&("collections"==t||window.location.pathname.includes("/cart"))||Shopify.theme.name.includes("Colorblock")&&"products"==t){let e=document.querySelector("#shopify-section-header")?document.querySelector("#shopify-section-header"):document.querySelector(".shopify-section-group-header-group.section-header");setTimeout((function(){e.style.zIndex="7"}),500)}if((Shopify.theme.name.includes("Dawn")||Shopify.theme.name.includes("Sense"))&&(e="z-index: 2;","products"==t&&"ten_usd"==BSS_PL.currentPlan||BSS_PL.plan.PLATINUM)){e="z-index: 3;";let t=document.querySelector("#shopify-section-header")?document.querySelector("#shopify-section-header"):document.querySelector(".shopify-section-group-header-group.section-header");setTimeout((function(){t.style.zIndex="5"}),500)}if(Shopify.theme.name.includes("Debut")&&BSS_PL.plan.ADVANCED){let e=document.querySelectorAll(".full-width-link");setTimeout((function(){for(let t of e)t.style.zIndex="0"}),500)}return"function"==typeof bssFixSupportZIndexLabelText&&(e=bssFixSupportZIndexLabelText()),e},BSS_PL.LabelStyle.getToolTipContent=function(e){let t="",n="",i="_self",o="disable";return 1==e.statusLabelHoverText&&BSS_PL.plan.ADVANCED&&(t=e.toolTipText?unescape(e.toolTipText):"",i=e.labelHoverTextLink&&"_blank",e.labelHoverTextLink&&(o="enable",n=`onclick="window.open('${e.labelHoverTextLink}', '${i}')"`)),t&&("function"==typeof bssFixSupportRemoveTooltipWhenScroll?bssFixSupportRemoveTooltipWhenScroll(t):BSS_PL.helper.createToolTip(t)),{textHoverValue:t,linkTextHoverValue:n,targetValue:i,statusLink:o,textHoverContent:`bss-data-tooltip="${t}" ${n}`}},BSS_PL.LabelStyle.getLabelPositionStyleForPlatinum=function(e,t,n){if(!BSS_PL.plan.PLATINUM||t.label_type!=BSS_PL.const.CONFIG_TYPE.LABEL)return{};const o=BSS_PL.helper.isPcScreen(),a=o?"desktop":"mobile";let l={},s=t[a+"_width_label"],r=t[a+"_height_label"],c=t[a+"_label_unlimited_top"],p=t[a+"_label_unlimited_left"],_=c+"%",d=p+"%";if(0!=t[a+"_fixed_percent_label"]&&"fixed"!=t[a+"_fixed_percent_label"]||(c>r/500*100&&(_=`calc(${c+r/500*100-(-1!=r?r/10:s/10)}% - ${r}px)`),p>s/500*100&&(d=`calc(${p+s/500*100-s/10}% - ${s}px)`)),38982==BSS_PL.storeId&&o&&(_=`calc(${c+r/500*100}% - ${r}px)`,d=`calc(${p+s/500*100}% - ${s}px)`),o?9==t.position:9==t.mobile_position)if(BSS_PL.LabelStyle.handlePositionUnlimited(e,t,n),!t.label_text_enable&&t[a+"_lock_aspect_ratio"]){if(l={...l,...i(t,a)},("Dawn"===Shopify.theme.name||"Crave"===Shopify.theme.name)&&"/collections"===window.location.pathname){var u=e(".card--media .card__content");if(u.length>0){const t=e(u[1]).outerHeight();l=l.bottom?{...l,bottom:`calc(${l.bottom.match(/([0-9.]+)%/)[0]} + ${t}px)!important`}:l}}}else l={top:_+" !important",left:d+" !important"};return l},BSS_PL.LabelStyle.calculateBadgeHeight=e=>{let t=e(".bss_pb_img");if(!t.length)return;let n=0;e.each(t,(function(t,i){const o=e(i);if(o.closest(".bss-price-container.bss-inline").length)return;o.css("visibility","hidden"),"relative"!==o.css("position")&&o.css("position","relative"),"function"==typeof bssFixSupportCheckBadgeStyle&&bssFixSupportCheckBadgeStyle(e,i);let a=600;"function"==typeof bssFixSupportTimeoutCalcBadgeHeight&&(a=bssFixSupportTimeoutCalcBadgeHeight()),setTimeout(()=>{let t=0;o.length&&(n=parseInt(o.find(".bss-countdown-display").css("padding"))||0),o.find(".bss-pb-frontend").length&&e.each(o.find(".bss-pb-frontend"),(function(i,l){const s=e(l);t=s.height();let r=s.css("margin-top"),c=s.css("margin-bottom");if(s.closest(".bss_parent_text").length&&(r=s.closest(".bss_parent_text").css("margin-top")),s.closest(".bss_pb_img").length&&(c=s.closest(".bss_pb_img").css("margin-bottom")),s.hasClass("bss-pb-stock")&&(t=s.outerHeight()),t=parseInt(t)+parseInt(r||0)+parseInt(c||0),parseInt(o.height()){const e=s.outerWidth(),n=o.find("[data-bss-pl-text-id]").css("aspect-ratio"),i=!"auto unset inherit revert".includes(n)&&n?(()=>{const[e,t]=n.split("/").map(Number);return e?t/e:0})():0,a=s.outerHeight(),l=i>0?e*i:t{let t=e(".bss_pb_img").find("[position-badge]"),n=600;"function"==typeof bssFixSupportTimeoutCalcBadgeHeight&&(n=bssFixSupportTimeoutCalcBadgeHeight()),setTimeout(()=>{t.length&&e.each(t,(function(t,i){const o=e(i),a=e(i).attr("badge-width"),l=e(i).attr("position-badge"),s=e(i).parent().attr("data-position-err"),r=e(i).closest(".bss_pb_img");if(r.length&&e(i).closest(".bss-price-container").length&&!/width\s*:/i.test(r.attr("style")||"")){const e=r.attr("style")||"";r.attr("style",`${e}; min-height: auto !important; width: ${a>0?Number(a)+"%":"auto"} !important;`)}if(s){const e=r.attr("style")||"";r.attr("style",`${e}; min-height: auto !important; width: ${a>0?Number(a)+"%":"auto"} !important;`)}const c=e(i).find("[badge-font-size-ratio]");setTimeout(()=>{if(l&&c.length){const e=Number(c.attr("badge-font-size-ratio")),t=o.outerWidth(),n=o.find("[data-bss-pl-text-id]").css("aspect-ratio"),i="auto"!==n&&n?(()=>{const[e,t]=n.split("/").map(Number);return e?t/e:0})():0,a=o.outerHeight(),l=i>0?t*i:a,s=o.css("min-height");parseFloat(s){const t=e(".bss_pb_img:has(.bss_pl_label_text), .bss_pl_img:has(.bss_pl_label_text)");t.length&&e.each(t,(function(t,n){const i=e(n).find(".bss_pl_label_text.bss-pl-triangle, .bss_pl_label_text.bss-pl-trapezoid");i&&setTimeout(()=>{const e=i.outerWidth(),t=i.outerHeight();let n=0;n=i.is(".bss_pb_img")?180*Math.atan2(e,e)/Math.PI:180*Math.atan2(t,e)/Math.PI,i.find(".bss_pl_text_hover_text").css("transform",`rotate(${n}deg)`)},300)}))},BSS_PL.LabelStyle.getResponsiveFontSize=function(e,t,n,i){if(0===i)return 0;let o=BSS_PL.helper.getElementImage(e,n);if([7,8,9,10].includes(t.badge_type))return 0;"function"==typeof bssFixSupportParentForResponsiveFontSize&&(o=bssFixSupportParentForResponsiveFontSize(e,t,n));const a=BSS_PL.helper.isPcScreen()?"desktop":"mobile",l=unescape(t.label_text).replace(/<[^>]+>/g,"").length,s=e(o).outerWidth(),r=e(o).outerHeight(),c="percentage"!==t[a+"_fixed_percent_label"]?t[a+"_width_label"]:t[a+"_width_label"]*s/100,p="percentage"!==t[a+"_fixed_percent_label"]?t[a+"_height_label"]:t[a+"_height_label"]*r/100;return p*i/Math.sqrt(.75*p*i*l/c)},BSS_PL.LabelStyle.getSpecialBackgroundShape=function(e,t,n,i,o="",a=0){const l={top:{x1:"50%",y1:"100%",x2:"50%",y2:"0%"},bottom:{x1:"50%",y1:"0%",x2:"50%",y2:"100%"},left:{x1:"100%",y1:"50%",x2:"0%",y2:"50%"},right:{x1:"0%",y1:"50%",x2:"100%",y2:"50%"},"top left":{x1:"100%",y1:"100%",x2:"0%",y2:"0%"},"top right":{x1:"0%",y1:"100%",x2:"100%",y2:"0%"},"bottom left":{x1:"100%",y1:"0%",x2:"0%",y2:"100%"},"bottom right":{x1:"0%",y1:"0%",x2:"100%",y2:"100%"}};const s={2:``,3:``,4:``,5:``,6:``,7:``,8:``,9:``,10:``,11:``,12:``,13:``,14:``,15:``,16:``,17:``,18:``,19:``,20:``,21:``,22:``,23:``,24:``,25:``,26:``,27:``,28:``,29:``,30:``,31:``};if(o){const n=function(e,t){const n=e.match(/linear-gradient\(to ((?:top|bottom|left|right)(?:\s+(?:top|bottom|left|right))?),\s*(#[0-9A-Fa-f]+),\s*(#[0-9A-Fa-f]+)\)/);if(!n)return"";const{x1:i,y1:o,x2:a,y2:s}=l[n[1]]||{};return i?`\n \n \n \n \n `:""}(o,e),i=s[t];return i?i.replace(/]*)>/,""+n):""}return s[t]||""}},function(e,t,n){"use strict";function i(e,t){const n=e.preview_board_width,i=e.preview_board_height,o=e[t+"_label_unlimited_top"],a=e[t+"_label_unlimited_left"];let l=e[t+"_width_label"],s=e[t+"_height_label"];const r={},c=e.img_aspect_ratio;if(-1===l&&-1===s||null==l&&null==s)return{};if("percentage"==e[t+"_fixed_percent_label"]||1==e[t+"_fixed_percent_label"]){if(-1===l||null==l){l=i*(s*c)/n}if(-1===s||null==s){s=n*(l/c)/i}}else-1!==l&&null!=l||(l=s*c),-1!==s&&null!=s||(s=l/c),l=l/n*100,s=s/i*100;const p=Math.max(0,100-s-o),_=Math.max(0,100-l-a);return o<=p?r.top=o+"%!important":r.bottom=p+"%!important",a<=_?r.left=a+"%!important":r.right=_+"%!important",r}n.r(t),n.d(t,"default",(function(){return i}))},function(e,t){BSS_PL.LabelStyle.getLabelImgHtml=function(e,t,n,i=!1){const o=BSS_PL.helper.isPcScreen()?"desktop":"mobile",{textHoverContent:a,statusLink:l}=BSS_PL.LabelStyle.getToolTipContent(t),s=t.public_img_url,r=BSS_PL.LabelStyle.getAnimationClassName(t.animation_type),c=2==t.label_type?"bss-pb-frontend":"bss-pl-frontend",p=BSS_PL.LabelStyle.getPositionClassName(t),_=BSS_PL.LabelStyle.getZIndexImage(),d=`${c} ${p} ${r} bss_pl_text_hover_link_${l}`,u=`animation-duration: ${void 0===t.animation_duration?2:t.animation_duration||.5}s;\n animation-iteration-count: ${t.animation_repeat||"infinite"};`,g={...BSS_PL.LabelStyle.getCustomPositionStyleForFreeTheme(e,t,n),...BSS_PL.LabelStyle.getLabelPositionStyleForPlatinum(e,t,n)};let S=BSS_PL.helper.convertObjectStyleToInlineStyle(g);S+=function(e){let t,n,i,o="",a="px !important;";return BSS_PL.helper.isPcScreen()?(t=e.desktop_width_label,n=2!=e.label_type||"percentage"!=e.desktop_fixed_percent_label&&1!=e.desktop_fixed_percent_label?e.desktop_height_label:"auto",i=e.margin_top):(t=e.mobile_width_label,n=2!=e.label_type||"percentage"!=e.mobile_fixed_percent_label&&1!=e.mobile_fixed_percent_label?e.mobile_height_label:"auto",i=e.mobile_margin_top),("percentage"!=e.desktop_fixed_percent_label&&1!=e.desktop_fixed_percent_label||!BSS_PL.helper.isPcScreen())&&("percentage"!=e.mobile_fixed_percent_label&&1!=e.mobile_fixed_percent_label||BSS_PL.helper.isPcScreen())||(a="% !important;",15494==BSS_PL.storeId&&(a="%;"),t>100&&(t=100),n>100&&(n=100)),(t||0==t||null==t)&&(o+="width:",-1==t||null==t?o+="auto !important;":(o+=t,18833==BSS_PL.storeId?o+="%;":o+=a)),(n||0==n||-1==n||null==n)&&(o+="height:",-1==n||null==n?o+="auto !important;":(o+=n,o+=a)),2!=e.label_type||e.enable_multi_badge||(i||0==i)&&(o+="margin-top:",o+=i,o+="px !important;"),o}(t);const f=i?`\n \n ${BSS_PL.resource.HIGHLIGHT_SVG}\n `:`\n \n ${BSS_PL.resource.HIGHLIGHT_SVG}\n `,m=[7,8,9,10].includes(t.badge_type),b=[7,9].includes(t.badge_type),h="percentage"==t[o+"_fixed_percent_label"];let L=m?"position: relative !important;":"position: absolute !important;";const y=m?`position-badge="${b?"before":"after"}"`:"",P=S.match(/width:\s*([\d.]+)/),x=P?P[1]:0;let C=`\n ${1==t.statusLabelAltText?unescape(t.labelAltText):t.name}0?u:""}\n opacity: ${t.label_opacity/100};\n ${_} \n ${!i&&S}; \n ${m&&h?"width: 100% !important ;":""}\n "\n ${a}\n onanimationend="this.className = this.className.replace('${r}', '')"\n badge-width = ${m&&h?x:0}\n ${y}\n />\n ${9===t.animation_type?f:""}\n `;if("function"==typeof bssFixSupportImgTag){const e=bssFixSupportImgTag(t,s,className,r,styleName,c);e&&(C=e)}return C}},function(e,t,n){const{default:i}=n(11);function o(e,t,n,i,o){if(n<0){let t=parseFloat(-n/100).toFixed(2);"function"==typeof bssFixSupportFormatValueSale&&(t=bssFixSupportFormatValueSale(t)),e.indexOf("{sale_amount}")>-1&&(e="{"!=i[0]?e.replace(/{sale_amount}/g,`${o}${t}`):e.replace(/{sale_amount}/g,`${t}${o}`))}else{if("{sale_amount}"==e&&0==n)return;e=e.replace(/{sale_amount}/g,"")}let a=t>=0?parseInt(t)+"%":"";return e=e.replace(/{sale}/g,a)}function a(e){if(!e)return"";let t=e.value;try{["rating","money","weight","volume","dimension"].includes(e.type)&&(t=JSON.parse(t))}catch(n){t=e.value}const n=(e,t)=>new Date(e).toLocaleString("en-US",t);switch(e.type){case"money":return`${t.amount} ${t.currency_code}`;case"rating":return t.value;case"color":return t.toString().toUpperCase();case"boolean":return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase();case"weight":case"volume":case"dimension":return`${t.value} ${BSS_PL.const.UNIT_METAFIELD[t.unit]}`;case"date_time":return n(t,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZone:"UTC"});case"date":return n(t,{year:"numeric",month:"short",day:"numeric"});default:return t}}const l=(e,t,n,i,l,s,r)=>{const c=(e=>{if(BSS_PL.plan.ADVANCED&&1===e.label_text_enable&&e.translations&&e.translations.length){const t=e.translations.find(e=>e.code===BSS_PL.countryCode);if(t)return t.text}return e.label_text})(n);let p;if(p=unescape(c),p=function(e,t){return t.enable_countdown_timer?(e.indexOf("{end}")>-1&&(e=e.replace("{end}",`{end}`)),e):e}(p,n),p=function(e,t){const n=BSS_PL.helper.isPcScreen()?t.label_text_font_size:t.mobile_font_size_label,i=t.emoji?t.emoji.split(","):[],o=t.emoji_position?t.emoji_position.split(","):[];for(let t=0;t-1){let a=` `,l=e.slice(0,e.indexOf(String.fromCodePoint(i[t]))),s=e.slice(e.indexOf(String.fromCodePoint(i[t]))+2);e=l+a+s}return e}(p,n),p=function(e){for(let t=127462;t<127488;t++)if(e.indexOf(String.fromCodePoint(t.toString()))>-1){let n=e.slice(0,e.indexOf(String.fromCodePoint(t.toString()))),i=e.slice(e.indexOf(String.fromCodePoint(t.toString()))+2);e=n+i}return e}(p),p=function(e){let t=e;const n={year:"numeric",month:"2-digit",day:"2-digit"};return t=t.replace(/{MM\/DD\/YYYY}/g,new Intl.DateTimeFormat("en-US",n).format(new Date)),t=t.replace(/{DD\/MM\/YYYY}/g,new Intl.DateTimeFormat("en-GB",n).format(new Date)),t=t.replace(/{YYYY\/MM\/DD}/g,new Intl.DateTimeFormat("ja-JP",n).format(new Date)),t=t.replace(/{MMMM DD, YYYY}/g,new Intl.DateTimeFormat("en-US",{...n,month:"long"}).format(new Date)),t=t.replace(/{DDD, MMM DD, YYYY}/g,new Intl.DateTimeFormat("en-US",{...n,weekday:"long"}).format(new Date)),"function"==typeof bssFixSupportCustomDateFormatForToday&&(t=bssFixSupportCustomDateFormatForToday(e)),t}(p),p=function(e){return["flag-ac","flag-cp","flag-ea","flag-ic","flag-ta"].forEach(t=>{e.includes(`{${t}}`)&&(e=e.replace(new RegExp(`{${t}}`,"g"),"🏳️"))}),Object.entries({"flag-england":"gb-eng","flag-scotland":"gb-sct","flag-wales":"gb-wls"}).forEach(([t,n])=>{e.includes(`{${t}}`)&&(e=e.replace(new RegExp(`{${t}}`,"g"),`flag`))}),!e.includes("{flag")||e.includes("{flag-england}")||e.includes("{flag-scotland}")||e.includes("{flag-wales}")||(e=e.replace(/\{flag-([a-z]{2})\}/gi,(e,t)=>`flag`)),e}(p),!t.isCollectionData){const c=t.price,_=t.price_min/100,d=t.price_max/100,u=t.format_money,g=(e=>{let t="",n=e.format_money;if("function"==typeof bssFixSupportFormatMoney)t=bssFixSupportFormatMoney(t);else if(null!=n&&null!=n)if("{"!=n[0]){let e=0;for(;"{"!=n[e];)t+=n[e],e++}else{let e=n.length-1;for(;"}"!=n[e];)t+=n[e],e--;t=t.split("").reverse().join("")}return t})(t),{discount:S,discountAmount:f}=BSS_PL.getDiscount(e,t,i,n);if(p=function(e,t,n,i,o,a){return null===t&&e.includes("{inventory_quantity}")&&(e=BSS_PL.helper.safeDecodeURI(n.label_text_unlimited_stock)),t>0?e=e.replace("{inventory_quantity}",t):null!==t&&e.includes("{inventory_quantity}")&&(e=BSS_PL.helper.safeDecodeURI(n.label_text_out_stock)),e=null===t&&e.includes("{inventory}")?BSS_PL.helper.safeDecodeURI(n.label_text_unlimited_stock):e.replace("{inventory}",BSS_PL.helper.safeDecodeURI(function(e,t,n,i,o){return e(o).closest('form[action="/cart"]').length||e(o).closest(".product").length||e(o).closest('[class*="featured-product"]').length||e(o).closest(".page-content--product").length?n.inventory_management||"continue"!==n.inventory_policy?n.inventory_management&&n.available||!n.inventory_management||n.inventory_management&&"continue"===n.inventory_policy?i.label_text_in_stock:n.inventory_management&&!n.available?i.label_text_out_stock:n.available?i.label_text_in_stock:i.label_text_out_stock:i.label_text_unlimited_stock:"continue"!==t.inventory_policy||t.inventory_management?t.variants.reduce((e,t)=>t.quantity>e.quantity?t:e).available?i.label_text_in_stock:i.label_text_out_stock:i.label_text_unlimited_stock}(BSS_PL.$,i,o,n,a)))}(p,l,n,t,s,i),p=function(e,t,n,i,o){let a=n!=t?t:i/100,l=n!=t?n:i/100;return e.indexOf("{min_price}")>-1&&(e=e.replace("{min_price}",a+o)),e.indexOf("{max_price}")>-1&&(e=e.replace("{max_price}",l+o)),e}(p,_,d,c,g),p=o(p,S,f,u,g),p=function(e,t,n=null){if(BSS_PL.plan.PLATINUM){const i=function(e){const t=/{{(.*?)}}/g;let n;const i=[];for(;null!==(n=t.exec(e));){const e=n[1].split(".");e.length>=3&&i.push({type:e[0],namespace:e[1],key:e.slice(2).join(".")})}return i}(e);let o=e;return i.forEach(({type:e,namespace:i,key:l})=>{let s="";if(n=parseInt(BSS_PL.currentVariantId),"product"===e){s=a(t.metafields.find(e=>e&&e.namespace===i&&e.key===l))}else if("variant"===e&&BSS_PL.page.isProductPage()){const e=t.variants.find(e=>e.id===n);if(e){s=a(e.metafields.find(e=>e&&e.namespace===i&&e.key===l))}}const r=new RegExp(`{{${e}\\.${i}\\.${l}}}`,"g");o=o.replace(r,s)}),o}return e}(p,t),1==n.label_type&&n.product_type==BSS_PL.const.PRODUCT_TYPE.VARIANTS){const e=r.price,t=r.compare_at_price,n=e-t;let i=-1;t>0&&(i=parseFloat((n/t*100).toFixed(0)),isNaN(i)&&(i=0)),p=o(p,i,n,u,g)}else p=o(p,S,f,u,g)}return p};function s(e,t,n){return 3===e.label_shape_type?``:2===e.label_shape_type?`\n ${BSS_PL.LabelStyle.getSpecialBackgroundShape(e.label_text_id,Number(e.label_shape),t,n,e.bg_style&&"gradient"===e.bg_style?t:"",Number(e.transparent_background))}\n `:""}BSS_PL.LabelStyle.getLabelTextHtml=function(e,t,n,o,a,r,c=!1){const p=BSS_PL.helper.isPcScreen(),_=p?"desktop":"mobile",d=BSS_PL.helper.isFirefox();let u,g,S;t.isCollectionData||({totalInventoryQuantity:u,variantInventoryQuantity:g,prodVariantSelected:S}=BSS_PL.conditions.getProductStock(e,t,o,!0));const{textHoverValue:f,linkTextHoverValue:m,statusLink:b,targetValue:h,textHoverContent:L}=BSS_PL.LabelStyle.getToolTipContent(n),y=1==n.label_type?`top: ${d?0:-.5}px;`:"",P=1==n.label_type?`left: ${d?0:-.5}px;`:"",x=p?9==n.position:9==n.mobile_position,C=BSS_PL.LabelStyle.getPositionClassName(n);if(n.label_text&&""!=n.label_text){const p=2==n.label_type?"bss-pb-frontend ":"bss-pl-frontend ",d=["trapezoid","triangle","square","circle"];let B=n[_+"_width_label"],w=n[_+"_height_label"];const v={...BSS_PL.LabelStyle.getCustomPositionStyleForFreeTheme(e,n,o),...BSS_PL.LabelStyle.getLabelPositionStyleForPlatinum(e,n,o)};let $=BSS_PL.helper.convertObjectStyleToInlineStyle(v),T=n.label_text_enable&&3==n.countdown_type&&n.option_end_countdown&&1==n.option_end_countdown&&n.enable_countdown_timer?"opacity: 0; ":"";if($+=function(e){var t,n,i="",o="px";return BSS_PL.helper.isPcScreen()?(t=e.desktop_width_label,n=2!=e.label_type||"percentage"!=e.desktop_fixed_percent_label&&1!=e.desktop_fixed_percent_label?e.desktop_height_label:"auto"):(t=e.mobile_width_label,n=2!=e.label_type||"percentage"!=e.mobile_fixed_percent_label&&1!=e.mobile_fixed_percent_label?e.mobile_height_label:"auto"),("percentage"!=e.desktop_fixed_percent_label&&1!=e.desktop_fixed_percent_label||!BSS_PL.helper.isPcScreen())&&("percentage"!=e.mobile_fixed_percent_label&&1!=e.mobile_fixed_percent_label||BSS_PL.helper.isPcScreen())||(o="%",t>100&&(t=100),n>100&&(n=100)),(t||0==t)&&(BSS_PL.helper.isFirefox()?(i+="width:",i+=t,i+=o,i+=";"):(i+="width:",i+="calc(",i+=t,i+=o,i+=" + 1px ) ;")),(n||0==n)&&("twenty_usd"==BSS_PL.currentPlan&&9==e.position&&BSS_PL.helper.isPcScreen()||9==e.mobile_position&&!BSS_PL.helper.isPcScreen()?i+="min-height:":i+="height:","auto"==n?i+=n+";":BSS_PL.helper.isFirefox()?(i+=n,i+=o,i+=";"):(i+="calc(",i+=n,i+=o,i+=" + 1px ) ;")),i}(n),x){BSS_PL.LabelStyle.handlePositionUnlimited(e,n,o),$+=i(e,BSS_PL,n,o)}"percentage"!=n[_+"_fixed_percent_label"]&&1!=n[_+"_fixed_percent_label"]||(B>100&&(B=100),w>100&&(w=100));const I=BSS_PL.LabelStyle.getAnimationClassName(n.animation_type),{fontSize:O,fontFamily:k,fontStyle:N,fontWeight:A,fontColor:D,altText:F,labelTextId:E,backgroundColor:R,borderRadius:M,borderSize:H,borderColor:V,borderStyle:U,marginBottom:z,marginTop:Y,opaCity:q,shape:G,transform:K,topBottomPadding:Z,filter:j,aspectRatio:W}=(e=>{const t=BSS_PL.helper.isPcScreen();let n;n=e.label_shadow.h_offset||0===e.label_shadow.h_offset?`${e.label_shadow.h_offset||0}px ${e.label_shadow.v_offset||0}px ${e.label_shadow.blur||0}px ${e.label_shadow_color}`:`${e.label_shadow||0}px ${e.label_shadow||0}px ${e.label_shadow||0}px ${e.label_shadow_color}`;const i=t?null!=e.desktop_height_label?e.desktop_height_label.toString():"-1":null!=e.mobile_height_label?e.mobile_height_label.toString():"-1",o=t?"fixed"==e.desktop_fixed_percent_label?"px":"%":"fixed"==e.mobile_fixed_percent_label?"px":"%",a=2==e.label_type&&"text"==e.label_badge_type,l="%"==o&&i>0;return{fontSize:t?e.label_text_font_size:e.mobile_font_size_label,fontFamily:e.label_text_font_family||"inherit",fontStyle:1==e.label_text_style||3==e.label_text_style?"italic":"normal",fontWeight:2==e.label_text_style||3==e.label_text_style?"bold":"normal",fontColor:e.label_text_color,altText:1==e.statusLabelAltText?unescape(e.labelAltText):e.name,labelTextId:e.label_text_id,backgroundColor:1==e.transparent_background?"transparent":e.bg_style&&"gradient"===e.bg_style?`linear-gradient(${e.label_text_background_color.value||e.label_text_background_color})`:e.label_text_background_color.value||e.label_text_background_color,filter:n,borderRadius:e.border_radius?e.border_radius:e.label_border_radius+"px",borderSize:e.border_size?e.border_size:0,borderColor:e.border_color?e.border_color:"#000",borderStyle:e.border_style?e.border_style:"solid",marginBottom:t?e.margin_bottom:e.mobile_margin_bottom,marginTop:t?e.margin_top:e.mobile_margin_top,opaCity:e.label_opacity/100,shape:e.label_shape,transform:`rotate(${e.angle}deg)`,topBottomPadding:e.topBottom_padding||4,aspectRatio:a&&l&&e.no_ratio_height&&i>0?100/i:i<0?"":"unset"}})(n),J=`animation-duration: ${void 0===n.animation_duration?2:n.animation_duration||.5}s;\n animation-iteration-count: ${n.animation_repeat||"infinite"};`,Q=BSS_PL.page.isProductPage()?g:u;if(2==n.label_type&&n.enable_badge_stock){let e=(e=>{let t=e.badge_stock_config;return BSS_PL.plan.ADVANCED&&1===e.label_text_enable&&e.translations&&e.translations.length&&t.length&&e.translations.forEach(e=>{if(BSS_PL.countryCode==e.code){let n=JSON.parse(unescape(e.text));t=n}}),t})(n);return BSS_PL.LabelStyle.getBadgeStockHtml({qtyInventory:Q,configs:n.badge_stock_config,className:p+C,styleForLabelText:$,badgeStockStyle:n.badge_stock_style,badgeType:n.badge_type,variant:n.variant,productType:n.product_type,fixedPercentLabel:n[_+"_fixed_percent_label"],itemWidth:B,fontSize:O,fontFamily:k,fontStyle:N,fontWeight:A,fontColor:D,altText:F,statusLink:b,textHoverValue:f,linkTextHoverValue:m,targetValue:h,labelTextId:E,marginBottom:z,marginTop:Y,textArr:e,animationClassName:I,animationStyles:J,item:n})}a.push(n);const X=BSS_PL.LabelStyle.getZIndexLabelText(),ee=[7,8,9,10].includes(n.badge_type),te=[7,9].includes(n.badge_type),ne="percentage"==n[_+"_fixed_percent_label"];let ie="bss-pl-"+n.label_shape,oe=ee?"position: relative !important;":"position: absolute !important;";BSS_PL.page.isProductPage()&&"function"==typeof bssFixSupportPositionStyle&&(oe=bssFixSupportPositionStyle());let ae=`margin-top: ${Y}px;`,le=`filter: drop-shadow(${j});`;if(1==n.label_type){ae=`margin-top: ${BSS_PL.LabelStyle.getConfigMarginTopLabel(e,BSS_PL,n,o)}px; margin-left: ${BSS_PL.LabelStyle.getConfigMarginLeftLabel(e,BSS_PL,n,o)}px;`}const se=["%7Binventory%7D","%7Binventory_quantity%7D","%7Bsale_amount%7D","%7Bsale%7D"].includes(n.label_text),re=l(e,t,n,o,Q,S,r),ce=!n.label_shape_type||1==n.label_shape_type,pe=ee?`position-badge="${te?"before":"after"}"`:"",_e=`\n \n ${BSS_PL.resource.HIGHLIGHT_SVG}\n `;return`
0?J:""}\n\n "\n badge-width = ${ee&&ne?B:0}\n ${pe}\n >\n
\n ${9===n.animation_type&&2===n.label_type?_e:""}\n
${re}
\n ${2===n.label_type?s(n,R,le):""}\n
\n ${9===n.animation_type&&1===n.label_type?_e:""}\n ${1===n.label_type?s(n,R,le):""}\n
\n `}}},function(e,t,n){"use strict";function i(e,t,n,i){let o=t.helper.isPcScreen()?"desktop":"mobile",a=n[o+"_width_label"],l=n[o+"_height_label"],s=n[o+"_label_unlimited_top"],r=n[o+"_label_unlimited_left"],c=s+"%",p=r+"%";!t.plan.PLATINUM||"fixed"!=n[o+"_fixed_percent_label"]&&0!=n[o+"_fixed_percent_label"]||(s>l/500*100&&(c=`calc(${s+l/500*100}% - ${l}px)`),r>a/500*100&&(p=`calc(${r+a/500*100}% - ${a}px)`));let _=`\n top : ${c} !important;\n left : ${p} !important;\n margin-top : 0 !important;\n margin-left : 0 !important;`;return"function"==typeof bssFixSupportLabelTextStyle&&(_=bssFixSupportLabelTextStyle(e,i,_,s,r)),_}n.r(t),n.d(t,"default",(function(){return i}))},function(e,t){BSS_PL.LabelStyle.getMultiBadgeHtml=function(e,t,n){const i=BSS_PL.LabelStyle.getZIndexImage(),o=BSS_PL.helper.isPcScreen(),a=o?"desktop":"mobile",{textHoverValue:l,linkTextHoverValue:s,targetValue:r}=BSS_PL.LabelStyle.getToolTipContent(t),c=1==t.statusLabelHoverText?`bss-data-tooltip="${l}" ${s?`onclick="window.open('${s}', '${r}')"`:""}`:"",p={...BSS_PL.LabelStyle.getCustomPositionStyleForFreeTheme(e,t,n),...t.label_type==BSS_PL.const.CONFIG_TYPE.BADGE?BSS_PL.LabelStyle.getSizeStylesForBadge(t):{}},_=BSS_PL.helper.convertObjectStyleToInlineStyle(p),d=BSS_PL.LabelStyle.getAnimationClassName(t.animation_type),u=t.multipleBadge.header_text?`1?"bold":"normal"};\n font-family: ${t.multipleBadge.header_text_font_family||"inherit"};\n "\n >${unescape(t.multipleBadge.header_text)}

`:"",g=o?t.margin_top:t.mobile_margin_top,S=o?t.position:t.mobile_position,f=void 0===t.animation_duration?2:t.animation_duration||.5,m=[7,8,9,10].includes(t.badge_type),b=[7,9].includes(t.badge_type),h="percentage"==t[a+"_fixed_percent_label"],L=m?`position-badge="${b?"before":"after"}"`:"",y=_.match(/width:\s*([\d.]+)/),P=y?y[1]:0,x=`\n \n ${BSS_PL.resource.HIGHLIGHT_SVG}\n `;return`\n
\n ${u}\n
\n ${t.multipleBadge.public_img_url.reduce((e,n)=>e+`\n
\n ${1==t.statusLabelAltText?unescape(t.labelAltText):t.name} \n ${9===t.animation_type?x:""}\n
\n `,"")}\n
\n
\n `}},function(e,t){BSS_PL.LabelStyle.getMaxValueMarginTop=e=>{let t=0;for(const n of e){const e=BSS_PL.helper.isPcScreen()?n.margin_top:n.mobile_margin_top;t=Math.max(t,e)}return t},BSS_PL.LabelStyle.getMaxValueMarginBottom=e=>{let t=0;for(const n of e){const e=BSS_PL.helper.isPcScreen()?n.margin_bottom:n.mobile_margin_bottom;t=Math.max(t,e)}return t},BSS_PL.LabelStyle.getConfigMarginTopLabel=(e,t,n,i)=>{let o=t.helper.isPcScreen(),a=o?"desktop":"mobile",l=t.helper.getElementImage(e,i);const s=e(l);(s.css("max-height")&&-1!=s.css("max-height").indexOf("%")||"none"==s.css("max-height"))&&(0==l.height()||s.css("height")&&-1!=s.css("height").indexOf("%"))&&s.closest(".photos__item, .supports-js").length&&(l=s.closest(".photos__item, .supports-js"));let r=0,c=l.height()>0?l.height():parseFloat(s.css("max-height")),p=n[a+"_height_label"],_=o?n.margin_top:n.mobile_margin_top;return r=0==n[a+"_fixed_percent_label"]||"fixed"==n[a+"_fixed_percent_label"]?(c-p)/100*_:_+p>100?_{let o=t.helper.isPcScreen(),a=o?"desktop":"mobile",l=t.helper.getElementImage(e,i);const s=e(l);(s.css("max-width")&&-1!=s.css("max-width").indexOf("%")||"none"==s.css("max-width"))&&(0==l.width()||s.css("width")&&-1!=s.css("width").indexOf("%"))&&(l=s.closest(".photos__item, .supports-js"));let r=0,c=l.width()>0?l.width():parseFloat(s.css("max-width")),p=n[a+"_width_label"],_=o?n.margin_left:n.mobile_margin_left;return r=0==n[a+"_fixed_percent_label"]||"fixed"==n[a+"_fixed_percent_label"]?(c-p)/100*_:_+p>100?_{let i=BSS_PL.page.getPageName(),o=[],a=BSS_PL.helper.isPcScreen()?"desktop":"mobile";if(-1!=[9493,24729].indexOf(BSS_PL.storeId)&&BSS_PL.page.isCollectionPage()&&o.push("collections"),-1===o.indexOf("collections")||-1===o.indexOf("products")||-1===o.indexOf("/")||-1===o.indexOf("/search")){const o='img[src*="//cdn.shopify.com/s/files/"]:not(.bss-pl-frontend), img[srcset*="/cdn.shopify.com/s/files/"]:not(.bss-pl-frontend)';let l=e(n).find(o).first();-1===["Dawn","Sense"].indexOf(Shopify.theme.name)||BSS_PL.page.isProductPage()||(e(n).hasClass("product__media")?l=e(n).closest(".card-wrapper ").find(o).first():e(n).hasClass("card__heading h5")&&(l=e(n).closest(".card-wrapper ").find(".card__inner").first()));let s=l.width(),r=l.height();if("function"==typeof bssFixSupportParentSizePositionPlatinum){const{_widthParent:t,_heightParent:o}=bssFixSupportParentSizePositionPlatinum(e,i,n,s,r);s=t,r=o}if(s&&r){const e=t[a+"_label_unlimited_left"],n=t[a+"_label_unlimited_top"],i=t[a+"_width_label"],o=t[a+"_height_label"];if("fixed"==t[a+"_fixed_percent_label"]||0==t[a+"_fixed_percent_label"]){const l=e*s/100;l+i>s&&(t[a+"_label_unlimited_left"]=100*l/s);const c=n*r/100;c+o>r&&(t[a+"_label_unlimited_top"]=100*c/r),(10884==BSS_PL.storeId&&e<0||l<0)&&(t[a+"_label_unlimited_left"]=0)}}}}},function(e,t){BSS_PL.LabelStyle.onClickThumbnailResizeMarginLabelText=(e,t)=>{let n=BSS_PL.page.getHandleProductPage(),i=e(`[data-handle="${n}"]`);const o=[".product-single__thumbnails-item","li.grid__item",".thumbnail.slick-slide",".rondell-item",".TabList__Item",".product-single__thumbnail-item",".product-gallery__thumbnail",".view-mode .icon-mode",".product-tabs__wrapper a.sf-tab-header",".thumbnail-list"].join(", "),a=e(o);a.length&&a.on("click",()=>{i=e(this).closest(".product-single__media-group").find(".product-single__media-wrapper").not(".hide"),"function"==typeof bssFixSupportOnClickThumbnail&&(i=bssFixSupportOnClickThumbnail(e,this,page,i)),t.forEach(t=>{let n=0;"function"==typeof bssFixSupportConfigLabelTextTimeouts&&(n=bssFixSupportConfigLabelTextTimeouts(n)),setTimeout(()=>{const n=BSS_PL.LabelStyle.getConfigMarginTopLabel(e,BSS_PL,t,i),o=BSS_PL.LabelStyle.getConfigMarginLeftLabel(e,BSS_PL,t,i);i.find(`div[bss-config-id="${t.label_text_id}"].bss_parent_text`).css("margin-top",n+"px").css("margin-left",o+"px")},n)})})},BSS_PL.LabelStyle.resizeMarginLabelOnScroll=(e,t)=>{if("function"==typeof bssFixSupportResizeMarginLabelTextOnScroll){let n=e(`[data-handle="${BSS_PL.page.getHandleProductPage()}"]`);const i=BSS_PL.page.getPageName();bssFixSupportResizeMarginLabelTextOnScroll(e,BSS_PL,n,i,t,BSS_PL.LabelStyle.getConfigMarginTopLabel,BSS_PL.LabelStyle.getConfigMarginLeftLabel)}}},function(e,t){function n(e){const t=!BSS_PL.helper.isPcScreen()&&e.set_size_on_mobile,n=t?e.mobile_width_label:e.desktop_width_label,i=t?e.mobile_height_label:e.desktop_height_label,o=t?e.mobile_fixed_percent_label:e.desktop_fixed_percent_label;return`width: ${n>0?`${n}${"percentage"===o?"%":"px"}`:"fit-content"}; height: ${i>0?`${i}${"percentage"===o?"%":"px"}`:"fit-content"}; ${BSS_PL.LabelStyle.getZIndexLabelText()}`}BSS_PL.LabelStyle.getLabelGroupHtml=(e,t,i,o,a,l,s,r)=>{let c=[],p=[];const _=i.margin,d=(()=>{const e=[`flex-direction: ${1===i.layout?"row":"column"};`,1===i.layout?BSS_PL.const.POSITION_HORIZONTAL_LABEL_GROUP[i.position]:BSS_PL.const.POSITION_VERTICAL_LABEL_GROUP[i.position],_.top>0?`top: ${_.top}${i.margin_type};`:null,_.left>0?`left: ${_.left}${i.margin_type};`:null,_.bottom>0?`bottom: ${_.bottom}${i.margin_type};`:null,_.right>0?`right: ${_.right}${i.margin_type};`:null,i.gap>0?`gap: ${i.gap}px;`:null].filter(Boolean);return e.length>0?e.join(" "):null})();o.forEach((t,o)=>{if(t){let _=!0;1==i.condition_type&&(_=BSS_PL.common.checkConfigCondition(e,o,t,l,a,s,r));const d=BSS_PL.conditions.checkSaleLabelText(e,t,l,a,r);if(!_||!d)return;if(t.img_url||t.label_text_enable&&t.label_text||t.public_url_s3.length){let i="";i=t.label_text_enable?`
${BSS_PL.LabelStyle.getLabelTextHtml(e,a,t,l,p,r,!0)}
`:`
${BSS_PL.LabelStyle.getLabelImgHtml(e,t,l,!0)}
`,c.push(i)}}}),c.length&&t.push(`
${c.join("")}
`)}},function(e,t){BSS_PL.common.getLabelHtml=(e,t,n,i,o,a,l,s,r,c)=>{const p=BSS_PL.helper.isPcScreen(),_=p?"desktop":"mobile",d=p?9===n.position:9===n.mobile_position,u=p?n.position:n.mobile_position;if(BSS_PL.integration.laiReview.status){if(!BSS_PL.integration.laiReviewAdapter(e,n,t))return}if(a)if(BSS_PL.storeId<=BSS_PL.storeIdOldWIthPriority&&317!==BSS_PL.storeId&&11130!==BSS_PL.storeId&&9518!==BSS_PL.storeId&&9306!==BSS_PL.storeId)if(2==n.label_type)l.length?l.map(e=>{e.position!==u&&(l.push(n),BSS_PL.plan.PLATINUM&&d?i.push(a):n.label_text_enable?o.push(a):i[u]=a)}):(BSS_PL.plan.PLATINUM&&d?i.push(a):n.label_text_enable?o.push(a):i[u]=a,l.push(n));else if(BSS_PL.plan.PLATINUM)if(0==l.length)d?i.push(a):n.label_text_enable?o.push(a):i[u]=a,l.push(n);else{const e=n[_+"_label_unlimited_left"],t=n[_+"_label_unlimited_top"];l.map(s=>{const r=s[_+"_label_unlimited_left"],c=s[_+"_label_unlimited_top"];r===e&&c===t||(d?i.push(a):n.label_text_enable?o.push(a):i[u]=a,l.push(n))})}else 0==l.length?(n.label_text_enable?o.push(a):i[u]=a,l.push(n)):l.map(e=>{n.label_text_enable?o.push(a):e.position!==u&&(i[u]=a),l.push(n)});else if(BSS_PL.plan.PLATINUM&&d&&!c.appendLabelPriority)n.enable_priority&&(c.appendLabelPriority=!0),i.push(a);else if(2==n.label_type){[7,8,9,10].includes(n.badge_type)?i.push(a):!0!==s[u]&&(s[u]=!0,i.push(a))}else n.label_text_enable?i.push(a):!0!==r[u]&&(r[u]=!0,a&&i.push(a))}},function(e,t){BSS_PL.common.getLabelHtmlList=(e,t,n,i,o,a)=>{let l,s=JSON.parse(JSON.stringify(n)),r=[],c=[],p=[];const _=[],d=[],u=[];let g={appendLabelPriority:!1};return t.forEach((t,n)=>{const i=BSS_PL.configDataLabelGroup||[];let S=!1;if(i.forEach(e=>{e.label_ids.includes(t.id)&&(S=!0)}),S)return;if(0!==n&&r[0]&&r[0].includes("multiple-badge"))return;if(0!==n&&t.enable_multi_badge&&r[0])return;if(t.label_text_enable&&/%7B%7Bvariant\.custom\.(\w+)%7D%7D/g.test(t.label_text)&&!BSS_PL.page.isProductPage())return;const f=BSS_PL.conditions.notShowOnCustomBlock(e,t,o),m=BSS_PL.conditions.showOnDevice(t),b=BSS_PL.conditions.showOnPage(t),h=BSS_PL.conditions.notShowOnCustomPage(t),L=BSS_PL.conditions.showOnCustomPage(t),y=BSS_PL.conditions.allowCustomer(BSS_PL,t),P=BSS_PL.conditions.allowCountry(t),x=BSS_PL.conditions.allowLocale(t),C=BSS_PL.conditions.checkFirstImage(e,t,o,n,a),B=BSS_PL.conditions.visibilityFixedTime(BSS_PL,t),w=BSS_PL.conditions.visibilityDate(BSS_PL,t),v=BSS_PL.conditions.showCountDown(t);if(f&&m&&(b||L)&&h&&y&&P&&x&&C&&B&&w&&v&&!g.appendLabelPriority){if(s.isCollectionData){if(!BSS_PL.conditions.checkApplyToCollectionImg(e,t,s))return}else{const{discount:n,discountAmount:i,hasBlockSaleSaleAmountText:a}=BSS_PL.getDiscount(e,s,o,t),r=BSS_PL.conditions.applyToProduct(e,s,t,o),c=BSS_PL.conditions.productTitle(s,t),p=!BSS_PL.conditions.excludeProduct(s,t),_=BSS_PL.conditions.priceRange(e,s,t,o),d=BSS_PL.conditions.productPublishDate(s,t),u=BSS_PL.conditions.visibilityPeriod(t,s),g=BSS_PL.conditions.discountRange(e,t,n,i,s,o);if(!(r&&c&&p&&_&&d&&u&&g))return;if(t.product_type==BSS_PL.const.PRODUCT_TYPE.VARIANTS&&(l=BSS_PL.common.handleVariantLabel(e,s,t,o),!l&&t.product_type==BSS_PL.const.PRODUCT_TYPE.VARIANTS))return;if(t.label_type==BSS_PL.const.CONFIG_TYPE.LABEL){const{isShowByStock:n}=BSS_PL.conditions.checkStockCondition(e,s,t,o);if(!n)return}if(t.label_type==BSS_PL.const.CONFIG_TYPE.BADGE){const{isShowByStock:n,isAllowShowBadgeStock:i}=BSS_PL.conditions.checkStockCondition(e,s,t,o),a=t.label_type==BSS_PL.const.CONFIG_TYPE.BADGE&&t.label_text_enable&&t.enable_badge_stock;if(!n||a&&!i)return}if(t.label_text_enable){const e=-1!==unescape(t.label_text).indexOf("{sale}"),o=-1!==unescape(t.label_text).indexOf("{sale_amount}");if(e&&n<=0||a)return;if(o&&0==i)return;if(n<=0&&e)return;if(t.product_type==BSS_PL.const.PRODUCT_TYPE.VARIANTS){const t=l.compare_at_price,n=l.price;if(parseFloat(((t-n)/t*100).toFixed(0))<=0&&"{sale}"==e)return;if(n-t<=0&&"{sale_amount}"==o)return}}}if(t.img_url||t.label_text_enable&&t.label_text||t.public_url_s3.length||t.enable_multi_badge){let n="";t.enable_multi_badge?t.multipleBadge&&t.multipleBadge.public_img_url&&(n=BSS_PL.LabelStyle.getMultiBadgeHtml(e,t,o)):n=BSS_PL.LabelStyle.getLabelImgHtml(e,t,o),t.label_text_enable&&(n=BSS_PL.LabelStyle.getLabelTextHtml(e,s,t,o,p,l)),void 0!==n&&(n.replace(/\s+/g," ").trim(),BSS_PL.common.getLabelHtml(e,s,t,r,c,n,_,d,u,g))}}}),BSS_PL.LabelStyle.onClickThumbnailResizeMarginLabelText(e,p),BSS_PL.LabelStyle.resizeMarginLabelOnScroll(e,p),BSS_PL.storeId<=BSS_PL.storeIdOldWIthPriority&&(r=r.concat(c)),r},BSS_PL.common.getBadgeHTML=(e,t,n,i,o,a)=>{const l=t.LabelStyle.getMaxValueMarginBottom(n),s=t.common.getLabelHtmlList(e,n,i,a,o);if(s.length){const t=s.some(t=>e(t).is("[position-badge]")||e(t).find("[position-badge]").length>0),n="display: none!important;";if(t){let t=[],i=[];s.forEach(o=>{e(o).is("[position-badge]")||e(o).find("[position-badge]").length>0?t.push(`\n
\n ${o} \n
\n `):i.push(o)});let o=i.length>0?`\n
\n ${i.join("")}\n
\n `:"";return t.join("")+o}return`\n
\n ${s.join("")} \n
\n `}return!1},BSS_PL.common.fixBadgeDisplayIssue=(e,t,n)=>{let i;const o=BSS_PL.page.getHandleProductPage(),a=decodeURI(o);if(!(n.handle===a))return;if(!t)return;t=t.replace(/
!["SCRIPT","STYLE","META","LINK","NOSCRIPT"].includes(e.tagName)&&Array.from(e.attributes||[]).some(t=>n.some(n=>t.name.includes(n)||"string"==typeof t.value&&t.value.includes(n)||"string"==typeof e.className&&e.className.includes(n)||"string"==typeof e.id&&e.id.includes(n)))),a=i.querySelector("h1, h2, h3, h4, h5, h6, [class*='title'], [id*='title'], [name*='title']");return o&&a?i:t(i,n)}let n=[["title"],["info"],["product"]],o=null;for(let i of n)if(o=t(e,i),o)break;if(!o)return null;i=o;let a=o.querySelector("[class*='title'], [id*='title'], [name*='title']");return a||(a=o.querySelector("h1, h2, h3, h4, h5, h6")),a||null}()),s=t.match(/bss-config-id=(\d+)/)&&t.match(/bss-config-id=(\d+)/)[1]||null;if(!s)return;if(!i)return;const r=e(i).find(`.bss_pb_img:has([bss-config-id=${Number(s)}])`).length;l&&!r&&l.append(t)}},function(e,t){BSS_PL.common.getTimeoutLoadFunction=(e,t)=>{let n=t.page.getPageName(),i=200;if("function"==typeof bssFixSupportTimeoutWithSpecificPage){const o=bssFixSupportTimeoutWithSpecificPage(e,t,i,n);o&&(i=o)}return i}},function(e,t){BSS_PL.common.handleVariantLabel=(e,t,n,i)=>{let o=BSS_PL.page.getPageName(),a={},l=n.variant.split(","),s=t.variants.map(e=>e.id);if(!l.length||!s.length)return;let r=t.variants.filter(e=>l.includes(e.id.toString()));const c=BSS_PL.helper.getProductVariantId(e,i,t);if(l.some(e=>e===c)&&(a=r.find(e=>e.id.toString()===c)),"products"==o||[47822,49305].includes(BSS_PL.storeId)){if(!l.filter(e=>-1!==s.indexOf(+e)).length)return;if("function"==typeof bssFixSupportHandleVariantIdProductPage&&(c=bssFixSupportHandleVariantIdProductPage(e,c)),a=r.find(e=>e.id==c),1===n.label_type)if([16685,20031].includes(BSS_PL.storeId)){let t=e(i).find("img:first").attr("srcset");if(!t)return;t=t.replace(/\_\d+x\d+|\_\d+x/,""),t=t.replace(/&[\w=]+/g,""),a=r.find(e=>t.includes(e.image))}else{if(!n.variant.includes(c))return;"function"==typeof bssFixSupportAppendVariantImg&&bssFixSupportAppendVariantImg(e,i)}}return a}},function(e,t){const n=(e,t,n,i)=>{const o=n?0:1,a=o*Math.floor(e/864e5),l=o*Math.floor(e%864e5/36e5),s=o*Math.floor(e%36e5/6e4),r=o*Math.floor(e%6e4/1e3);if("function"==typeof bssFixSupportCustomTimeFormatForCountDown){let e=bssFixSupportCustomTimeFormatForCountDown(a,l,s,r,t,i);if(e)return e}switch(t){case 0:return`${l+24*a}h ${s}m ${r}s`;case 1:return`${l+24*a}h ${s}m`;case 2:return`${a}d ${l}h ${s}m`;default:return`${s+60*(l+24*a)}m ${r}s`}},i=e=>{document.querySelectorAll(".bss-text-content-end-"+e).forEach(e=>{e.closest(".bss_pl_img:has(.bss_pl_label_text), .bss_pb_img:has(.bss_pl_label_text)").remove()}),document.querySelectorAll(".bss-text-content-start-"+e).forEach(e=>{e.closest(".bss_pl_img:has(.bss_pl_label_text), bss_pb_img:has(.bss_pl_label_text)").remove()})},o=(e,t)=>{const i=setInterval(()=>{if(t){let l="",s=BSS_PL.helper.parseTimeToMilliseconds(e.countdown_interval_break_length);const{isInBreakdownTime:r,timeLeftInPeriod:c}=BSS_PL.helper.calculateTimePassed(e.countdown_interval_start_time,e.countdown_interval_break_length,e.countdown_interval_length);l=n(c,e.option_format_countdown,!1,e.countdown_type),document.querySelectorAll(".bss-text-content-end-"+e.label_text_id).forEach(e=>{e.innerHTML=l}),r?(clearInterval(i),1==e.option_end_countdown&&(a=e.label_text_id,document.querySelectorAll(".bss-text-content-end-"+a).forEach(e=>{e.closest(".bss_pl_img:has(.bss_pl_label_text) .bss_parent_text, .bss_pb_img:has(.bss_pl_label_text) .bss_parent_text").style.opacity=0}),document.querySelectorAll(".bss-text-content-start-"+a).forEach(e=>{e.closest(".bss_pl_img:has(.bss_pl_label_text) .bss_parent_text, .bss_pb_img:has(.bss_pl_label_text) .bss_parent_text").style.opacity=0})),setTimeout(()=>o(e,t),s)):(e=>{document.querySelectorAll(".bss-text-content-end-"+e).forEach(e=>{e.closest(".bss_pl_img:has(.bss_pl_label_text) .bss_parent_text, .bss_pb_img:has(.bss_pl_label_text) .bss_parent_text").style.opacity=1}),document.querySelectorAll(".bss-text-content-start-"+e).forEach(e=>{e.closest(".bss_pl_img:has(.bss_pl_label_text) .bss_parent_text, .bss_pb_img:has(.bss_pl_label_text) .bss_parent_text").style.opacity=1})})(e.label_text_id)}var a},1e3)};BSS_PL.common.handleShowCountDown=()=>{const e=BSS_PL.configData.filter(e=>(e=>e.label_text_enable&&1==e.enable_countdown_timer&&BSS_PL.plan.ADVANCED)(e));e.length&&(e.forEach(e=>{const t=unescape(e.label_text).indexOf("{end}")>-1;if(1==e.countdown_type){let o=(new Date).getTime()>new Date(e.countdown_time).getTime();1==e.option_end_countdown&&o||((e,t,o)=>{const a=new Date(e.start_day_countdown).getTime(),l=new Date(e.countdown_time).getTime();let s=setInterval(()=>{let r=a<(new Date).getTime()?(new Date).getTime():a,c=l-r,p=!1;if(t){let t=n(c,e.option_format_countdown,o,e.countdown_type);document.querySelectorAll(".bss-text-content-end-"+e.label_text_id).forEach(e=>{e.innerHTML=t}),p=c<=1e3}p&&(clearInterval(s),1==e.option_end_countdown&&i(e.label_text_id))},1e3)})(e,t,o)}else 2==e.countdown_type?((e,t)=>{let o=!1;const a=/^(\d{1,2}):(\d{1,2}):?(\d{0,2})$/,[l,s,r,c]=a.exec(e.countdown_daily_from_time),[p,_,d,u]=a.exec(e.countdown_daily_to_time),g=setInterval(()=>{const a=new Date,l=new Date(a).setHours(_,d,u)-new Date,p=new Date(a).setHours(_,d,u)-new Date(a).setHours(s,r,c),S=new Date(a).setHours(s,r,c)-new Date<=0;if(t){let t="";l<=0&&(t=n(0,e.option_format_countdown,!0,e.countdown_type)),S||(t=n(p,e.option_format_countdown,!1,e.countdown_type)),l>0&&S&&(t=n(l,e.option_format_countdown,!1,e.countdown_type)),document.querySelectorAll(".bss-text-content-end-"+e.label_text_id).forEach(e=>e.innerHTML=t),o=l<=0||!S}o&&(clearInterval(g),1==e.option_end_countdown&&i(e.label_text_id))},1e3)})(e,t):o(e,t)}),setTimeout(()=>{document.querySelectorAll(".bss-countdown-display").forEach(e=>e.style.display="flex")},1e3))}},function(e,t){BSS_PL.common.getLabelGroupHtmlList=(e,t,n,i,o,a)=>{let l=JSON.parse(JSON.stringify(n)),s=[],r={};return t.forEach((t,n)=>{let i=[],c=!0;const p=BSS_PL.conditionConfigData.find(e=>3!=t.condition_type?e.id==t.condition_config_id:e.id==t.manual_condition_config_id);if(p||1===t.condition_type){if(t.label_ids.length){const e=new Map(BSS_PL.configData.map(e=>[e.id,e]));i=t.label_ids.map(t=>{const n=e.get(t);return n&&(n.desktop_show_labels&&BSS_PL.helper.isPcScreen()||n.mobile_show_labels&&!BSS_PL.helper.isPcScreen())?n:null})}1!==t.condition_type&&(c=BSS_PL.common.checkConfigCondition(e,n,p,o,l,a,r)),c&&BSS_PL.LabelStyle.getLabelGroupHtml(e,s,t,i,l,o,a,r)}}),s}},function(e,t){BSS_PL.common.checkConfigCondition=(e,t,n,i,o,a,l)=>{let s=!0;const r=BSS_PL.conditions.notShowOnCustomBlock(e,n,i),c=BSS_PL.conditions.showOnDevice(n),p=BSS_PL.conditions.showOnPage(n),_=BSS_PL.conditions.notShowOnCustomPage(n),d=BSS_PL.conditions.showOnCustomPage(n),u=BSS_PL.conditions.allowCustomer(BSS_PL,n),g=BSS_PL.conditions.allowCountry(n),S=BSS_PL.conditions.allowLocale(n),f=BSS_PL.conditions.checkFirstImage(e,n,i,t,a),m=BSS_PL.conditions.visibilityFixedTime(BSS_PL,n),b=BSS_PL.conditions.visibilityDate(BSS_PL,n),h=BSS_PL.conditions.showCountDown(n);if(r&&c&&(p||d)&&_&&u&&g&&S&&f&&m&&b&&h||(s=!1),o.isCollectionData){BSS_PL.conditions.checkApplyToCollectionImg(e,n,o)||(s=!1)}else{const{discount:t,discountAmount:a}=BSS_PL.getDiscount(e,o,i,n),l=BSS_PL.conditions.applyToProduct(e,o,n,i),r=BSS_PL.conditions.productTitle(o,n),c=!BSS_PL.conditions.excludeProduct(o,n),p=BSS_PL.conditions.priceRange(e,o,n,i),_=BSS_PL.conditions.productPublishDate(o,n),d=BSS_PL.conditions.visibilityPeriod(n,o),u=BSS_PL.conditions.discountRange(e,n,t,a,o,i);if(l&&r&&c&&p&&_&&d&&u||(s=!1),n.product_type==BSS_PL.const.PRODUCT_TYPE.VARIANTS&&(BSS_PL.common.handleVariantLabel(e,o,n,i)||(s=!1)),n.label_type==BSS_PL.const.CONFIG_TYPE.LABEL||n.label_type==BSS_PL.const.CONFIG_TYPE.LABEL_GROUP){const{isShowByStock:t}=BSS_PL.conditions.checkStockCondition(e,o,n,i);t||(s=!1)}if(n.label_type==BSS_PL.const.CONFIG_TYPE.BADGE){const{isShowByStock:t,isAllowShowBadgeStock:a}=BSS_PL.conditions.checkStockCondition(e,o,n,i),l=n.label_type==BSS_PL.const.CONFIG_TYPE.BADGE&&n.label_text_enable&&n.enable_badge_stock;if(!t||l&&!a)return}}return s}},function(e,t){BSS_PL.integration.getConfigCompatibleLangify=e=>{if((BSS_PL.plan.ADVANCED||44366===BSS_PL.storeId)&&(void 0!==window.langify||54590===BSS_PL.storeId)){const t=({name:e})=>!(e.includes("[")&&Shopify.locale!==e.split("[")[1].split("]")[0]);return e.filter(t)}return e}},function(module,exports){BSS_PL.integration.laiReviewAdapter=($,dataLabel,dataProduct)=>{let ProdId=dataProduct.id.toString(),checkIntegration=!0,rateElements=$("#scm-product-detail-rate, .scm-reviews-rate"),checkProductApplyLabel=!1;return $.each(rateElements,(function(index,rateElement){let laiReviewProdId=$(rateElement)&&$(rateElement).length?JSON.parse($(rateElement).attr("data-product-id")):"";BSS_PL.integration.laiReview.config&&laiReviewProdId==ProdId&&BSS_PL.integration.laiReview.config.forEach(integrationConfig=>{if(integrationConfig.status&&dataLabel.label_id==integrationConfig.label_id){if(checkProductApplyLabel)return;let laiReviewConfig=$(rateElement)&&$(rateElement).length?JSON.parse($(rateElement).attr("data-rate-version2")):null,totalReview="",total=0,reviewPoint="",average=0,review="";laiReviewConfig&&(total=laiReviewConfig.rate1+laiReviewConfig.rate2+laiReviewConfig.rate3+laiReviewConfig.rate4+laiReviewConfig.rate5,average=laiReviewConfig.average);let condition="";integrationConfig.condition.length&&(integrationConfig.condition.forEach(e=>{"totalReview"==e.type&&(totalReview=total,totalReview+="greater"==e.check?" > ":"less"==e.check?" < ":" == ",totalReview+=e.num.toString()),"reviewPoint"==e.type&&(reviewPoint=average,reviewPoint+="greater"==e.check?" > ":"less"==e.check?" < ":" == ",reviewPoint+=e.num.toString()),"rate5"!=e.type&&"rate4"!=e.type&&"rate3"!=e.type&&"rate2"!=e.type&&"rate1"!=e.type||(review+=laiReviewConfig?"laiReviewConfig."+e.type:"0",review+="greater"==e.check?" > ":"less"==e.check?" < ":" == ",review+=e.num.toString(),review+=0==integrationConfig.type?" && ":" || ")}),0==integrationConfig.type?(totalReview&&(condition+=totalReview+" && "),reviewPoint&&(condition+=reviewPoint+" && "),review&&(condition+=review)):(totalReview&&(condition+=totalReview+" || "),reviewPoint&&(condition+=reviewPoint+" || "),review&&(condition+=review)),"&"!=condition[condition.length-2]&&"|"!=condition[condition.length-2]||(condition=condition.slice(0,condition.length-3)),eval(condition)||(checkIntegration=!1),checkProductApplyLabel=!0)}})})),checkIntegration}},function(e,t,n){const{default:i}=n(32);function o(e,t,n,i,o){let a=BSS_PL.page.getPageName(),l=new Map;e.each(i,(function(i,s){let r=e(s);if(!r.closest("gp-hero-banner").length&&(e(s).closest("product-form").find("gp-product-images-v2").length&&(r=e(s).closest("product-form").find("gp-product-images-v2")),!r.find(".bss_pl_img").length)){let i=BSS_PL.common.getLabelHtmlList(e,t,n,o,s,l);if(i.length){let t=`
${i.join("")}
`,n=!1;"function"==typeof bssFixSupportInitLabelPageFly&&(n=bssFixSupportInitLabelPageFly(e,s,a,t)),n||r.prepend(t)}}}))}function a(e,t,n,a){let l={baseImgUrl:t.apiServerProduction+"/images/"+t.storeId+"/240/"};function s(n,a=!1){let s=[];try{s=n,"string"==typeof s&&(s=JSON.parse(n))}catch(e){console.log("product label: JSON parse returns no item")}s.length&&a&&s.map((function(n){l.collects=n.collections;const a=[`[data-product-id="${n.id}"][data-pf-type="ProductImage2"]`,`[data-product-id="${n.id}"][data-pf-type="ProductImage"] [data-pf-type="MasterImage"]`,`[data-product-id="${n.id}"][data-pf-type="ProductMedia"] [data-media-type="image"]`,`[data-product-id="${n.id}"][data-pf-type="ProductMedia2"] [data-media-type="image"]`,`[product-id="${n.id}"]`].join(",");let s=e(a),r=s[0];t.configs.label.length&&o(e,t.configs.label,n,s,l);if(t.configData.some(e=>2==e.label_type)&&document.querySelectorAll("[bss-product-id].bss-pb-container").length){let o=t.configData.filter(e=>2==e.label_type);o.length&&(s=e(`[bss-product-id="${n.id}"].bss-pb-container`),i(e,t,o,s,n,l))}else t.configs.badgeProductImage.length&&t.initForBadgeProductImageOnPageFly(e,t,s,n,l),t.configs.badgeCustomSelector.length&&t.initForBadgeCustomSelector(e,t,s,n,l,r),t.configs.badgePrice.length&&t.initForBadgePriceOnPageFly(e,t,s,n,l),t.configs.badgeName.length&&t.initForBadgeProductNameOnPageFly(e,t,s,n,l);t.LabelStyle.calculateLabelTextAngle(e),t.LabelStyle.calculateBadgeHeight(e)}))}t.plWorker?(t.plWorker.onmessage=t=>{const{type:i,data:o}=t.data;if("success"===i){s(o,!0)}else"error"===i&&(e.get(n,s),console.error("Worker error:",o.message))},t.plWorker.postMessage({action:"getProductData",data:{urlSearchLiquid:`${window.location.origin}${n}`,listIdProduct:a,publicAccessToken:t.publicAccessToken,domain:Shopify.shop,configProductMetafields:t.configProductMetafields,configVariantMetafields:t.configVariantMetafields,isPageFly:!0}})):e.get(n,s)}function l(e,t){let n=[];if(e.forEach(e=>{e.isIntersecting&&(n.includes(e.target)||BSS_PL.listItems.includes(e.target)||(n.push(e.target),BSS_PL.listItems.push(e.target)),t.unobserve(e.target))}),n.length){let{encodeUrlData:e,listIdProduct:t}=s(BSS_PL.$,n);a(BSS_PL.$,BSS_PL,e,t)}}function s(e,t){let n=[],i=[];e.each(t,(function(t,o){let a="";a=e(o).attr("data-product-id")?e(o).attr("data-product-id"):e(o).attr("product-id"),a&&""!=a&&(-1!==a.indexOf("product-")&&(a=a.replace("product-","")),-1===n.indexOf('id:"'+a+'"')&&(n.push('id:"'+a+'"'),i.push(a)))}));let o="/search?q="+n.join(" OR ")+"&view=bss.product.labels";return{encodeUrlData:encodeURI(o),listIdProduct:i}}BSS_PL.integration.initPageFlyAdapter=(e,t)=>{let n=e("[data-product-id], gp-product [product-id]");if("function"==typeof bssFixSupportPageFlyProductIds&&(n=bssFixSupportPageFlyProductIds(e,t,n)),n.attr("bss-pl-product-active",!0),49024!=t.storeId||!t.settingsData.enableIntersection||t.page.isCartPage()||t.page.isProductPage()){let{encodeUrlData:i,listIdProduct:o}=s(e,n);a(e,t,i,o)}else{let e=new IntersectionObserver(l,{root:null,rootMargin:"0px 0px 100px 0px",threshold:.3});n.each((function(t,n){e.observe(this)}))}}},function(e,t){BSS_PL.getDiscount=function(e,t,n,i){let o=0,a=0;if(!i.enable_discount_range&&!i.label_text_enable&&(i.label_text.includes("%7Bsale%7D")||i.label_text.includes("%7Bsale_amount%7D"))||[40410,46721].includes(BSS_PL.storeId))return{discount:o,discountAmount:a,hasBlockSaleSaleAmountText:!1};function l(e){if(e.compare_at_price>0){const t=parseFloat(((e.compare_at_price-e.price)/e.compare_at_price*100).toFixed(0))||0;o=Math.max(o,t);const n=parseFloat(-(e.compare_at_price-e.price).toFixed(0));a=Math.min(a,n)}}let s=[...Array.from(document.querySelectorAll('.featured-product form[action="/cart/add"] input[name="id"][value]')).map(e=>e.value)];if(s.length){const e=t.variants.find(e=>e.id.toString()===s.slice(-1)[0]);e&&l(e),s=[]}const r=[];if(window.location.pathname.includes("/cart")&&!e(n).closest(".featured-product").length){const t=e(n).closest(".cart-item, .cart__row, .cart-page__item, .cart-row, .cart__table-row, .ajax-cart__item-image__wrapper, .line-item").find('a[href*="variant"]');if(t.length){const n=e(t[0]).attr("href").split("=")[1];n&&r.push(n)}}const c=new URLSearchParams(window.location.search).get("variant");if(c?r.push(c.trim()):BSS_PL.page.isProductPage()&&r.push(t.variants[0].id.toString()),r.length){const e=t.variants.find(e=>e.id.toString()===r.slice(-1)[0]);e&&l(e)}else t.variants&&t.variants.forEach(l);if("function"==typeof bssFixSupportGetDiscountImageList){const e=bssFixSupportGetDiscountImageList(BSS_PL,t);void 0!==e&&(o=e)}return{discount:o,discountAmount:a,hasBlockSaleSaleAmountText:!1}}},function(e,t){BSS_PL.collectionImg.addCollectionsDataHandle=function(e,t){let n=[];t.length&&t.each((function(t,i){let o;const a=e(i);a.attr("data-bss-pl","active"),o=a.attr("href")&&"#"!=a.attr("href")?BSS_PL.helper.getHandleByUrlCollections(a.attr("href")):a.parent().find('a[href*="/collections"]').attr("href")&&"#"!=a.parent().find('a[href*="/collections"]').attr("href")?BSS_PL.helper.getHandleByUrlCollections(a.parent().find('a[href*="/collections"]').attr("href")):a.find("img").first().attr("alt"),o&&(-1==e.inArray(o,n)&&n.push(o),a&&a.find(".grid-link__image-centered").length?a.find(".grid-link__image-centered").attr("data-handle",o):a&&a.find(".featured-box--image .lazyload__image-wrapper").length?a.find(".featured-box--image .lazyload__image-wrapper").attr("data-handle",o):a&&a.find(".featured-card__image-container").length?a.find(".featured-card__image-container").attr("data-handle",o):e(i)&&e(i).hasClass("card__media")&&("Dawn"===Shopify.theme.name||"Crave"===Shopify.theme.name)&&window.location.pathname.includes("/collections")?e(i).closest(".card--media").attr("data-handle",o):"function"==typeof bssFixSupportAddLabelCollection?bssFixSupportAddLabelCollection(e,i,o):a.parent().attr("data-handle",o))})),n.length&&BSS_PL.collectionImg.getCollectionInfo(e)}},function(e,t,n){const{default:i}=n(29);BSS_PL.collectionImg.getCollectionInfo=function(e){let t={baseImgUrl:BSS_PL.apiServerProduction+"/images/"+BSS_PL.storeId+"/240/"};if(BSS_PL.collectionID&&BSS_PL.collectionHandle&&BSS_PL.collectionTitle){const n=BSS_PL.configData.filter(e=>1==e.label_type||null==e.label_type);let o,a=BSS_PL.collectionID.split(","),l=BSS_PL.collectionHandle.split(","),s=BSS_PL.collectionTitle.split(","),r=[];for(let e=0;e${o.join("")}
`;if(s=i(e,BSS_PL,l,t),!s){!e(l).hasClass("swatchProductColor")&&!e(l).hasClass("hero-content")&&(e(l).css("position","relative"),t=`
${o.join("")}
`,e(l).prepend(t))}}}})),BSS_PL.LabelStyle.calculateLabelTextAngle(e))}))}}},function(e,t,n){"use strict";function i(e,t,n,i){let o=!1;return"function"==typeof bssFixSupportStoreCollection&&(o=bssFixSupportStoreCollection(e,n,i,o)),o}n.r(t),n.d(t,"default",(function(){return i}))},function(e,t){BSS_PL.collectionImg.getCollectionsItems=function(e){let t=e("img:not([data-bss-pl=active]):not(.action-link)").closest("a"),n=e('a[href*="/collections/"]:not([data-bss-pl=active]):not(.action-link):not(.header__menu-item)');return(-1!=[11656,33069].indexOf(BSS_PL.storeId)||Shopify&&Shopify.theme&&-1!=Shopify.theme.name.indexOf("Express"))&&(t=n),n&&n.closest(".card__inner").find(".card__media").length?t=n.closest(".card__inner").find(".card__media"):n&&n.closest(".collection-list__item").find(".collection-list__image-wrapper").length?t=n.closest(".collection-list__item").find(".collection-list__image-wrapper"):n&&n.closest(".grid__item").find(".collection-grid-item__link").length?t=n.closest(".grid__item").find(".collection-grid-item__link"):n&&n.closest(".category").find("a")&&37526==BSS_PL.storeId&&(t=n.closest(".category").find("a")),t}},function(e,t,n){"use strict";n.r(t);n(1),n(2),n(3),n(4),n(5),n(6),n(7),n(9),n(10),n(0),n(12),n(13),n(14),n(15),n(16),n(17),n(18),n(19),n(20),n(21),n(22),n(23),n(24),n(25),n(26),n(27),n(28),n(30)},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var i=["trapezoid","triangle","square","circle"];function o(e,t,n,o,a,l){e.each(o,(function(o,s){let r=t.LabelStyle.getMaxValueMarginTop(n);const c=t.common.getBadgeHTML(e,t,n,a,s,l);let p=e(s);if(c&&!p.prev(".bss_pb_img").length){p.append(c);let t=0,o=0,a=e(p).parent().find("img.bss-pb-frontend").first();n.forEach(n=>{!function(e){return"fixed"==e.desktop_fixed_percent_label||0==e.desktop_fixed_percent_label||"fixed"==e.mobile_fixed_percent_label||0==e.mobile_fixed_percent_label||("percentage"==e.desktop_fixed_percent_label||1==e.desktop_fixed_percent_label||"percentage"==e.mobile_fixed_percent_label||1==e.mobile_fixed_percent_label)&&1==e.label_text_enable}(n)?setTimeout((function(){if(!a.length)return;t=a.width();let n=a[0].naturalHeight,i=a[0].naturalWidth;o=parseInt(t/i*n);let l=e(p).parent().find(".bss_pb_img").first();e(l).height(o+"px")}),300):-1!==i.indexOf(n.label_shape)?setTimeout((function(){o=e(p).find(`div[bss-config-id="${n.label_text_id}"].bss_parent_text .bss-pb-frontend`).first().width(),o=parseInt(o);let t=e(p).prev().find(`div[bss-config-id="${n.label_text_id}"].bss_parent_text`);e(t).height(o+"px")}),300):setTimeout((function(){o=e(p).parent().find(`div[bss-config-id="${n.label_text_id}"].bss_parent_text .bss-pb-frontend`).first().height(),o=parseInt(o)+parseInt(r);let t=e(p).parent().find(".bss_pb_img");e(t).height(o+"px")}),300)})}}))}}]);