window.fgData={"offers":[{"id":15241,"shop_id":6147,"offer_name":"Free 20LT Screenwash Over \u00a3200","offer_description":null,"promotion_message":"Claim Your Free Gift on purchases of \u00a3200 or more","start_time":"2023-11-08T13:47:14.000000Z","end_time":null,"condition_relationship":null,"gift_settings":{"discount":{"type":"percentage","value":100},"auto_add_all_gifts":false,"customer_will_receive":"number_of_gift_can_receive","cal_gift_for_other_rules":false,"number_of_gift_can_receive":1},"gift_should_the_same":{"type":"variant","status":false},"sub_conditions":null,"priority":1,"stop_lower_priority":false,"status":true,"loading":"not_running","gift_products":[{"title":"\u00bb Screenwash: Ready To Use (-6\u2103) (100% off)","original_product_handle":"ready-to-use-screenwash","clone_product_handle":"ready-to-use-screenwash-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0032\/5474\/7185\/files\/ScreenwashReadytoUse5LRenderFRONT.jpg?v=1697100501","product_shopify_id":7605277360320,"original_product_shopify_id":1987965026353,"variants":[{"id":92558,"gift_product_id":37059,"discount_type":"percentage","discount_value":100,"original_price":22,"original_compare_at_price":null,"original_product_shopify_id":1987965026353,"original_variant_shopify_id":15452086272049,"price":0,"product_shopify_id":7605277360320,"variant_shopify_id":44110747140288,"variant_title":"20LTR","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0032\/5474\/7185\/files\/ScreenwashReadytoUse5LRenderFRONT.jpg?v=1697100501","pivot":{"offer_id":15241,"gift_item_id":92558},"gift_product":{"id":37059,"shop_id":6147,"title":"\u00bb Screenwash: Ready To Use (-6\u2103) (100% off)","original_product_handle":"ready-to-use-screenwash","clone_product_handle":"ready-to-use-screenwash-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0032\/5474\/7185\/files\/ScreenwashReadytoUse5LRenderFRONT.jpg?v=1697100501","product_shopify_id":7605277360320,"original_product_shopify_id":1987965026353,"created_at":"2023-11-08T13:56:17.000000Z","updated_at":"2023-11-09T04:34:03.000000Z"}}]}],"offer_conditions":[{"id":15994,"offer_id":15241,"is_multiply":null,"min_amount":"200.00","max_amount":null,"product_narrow":[],"unit":"money"}],"gift_items":[{"id":92558,"gift_product_id":37059,"discount_type":"percentage","discount_value":100,"original_price":22,"original_compare_at_price":null,"original_product_shopify_id":1987965026353,"original_variant_shopify_id":15452086272049,"price":0,"product_shopify_id":7605277360320,"variant_shopify_id":44110747140288,"variant_title":"20LTR","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0032\/5474\/7185\/files\/ScreenwashReadytoUse5LRenderFRONT.jpg?v=1697100501","pivot":{"offer_id":15241,"gift_item_id":92558},"gift_product":{"id":37059,"shop_id":6147,"title":"\u00bb Screenwash: Ready To Use (-6\u2103) (100% off)","original_product_handle":"ready-to-use-screenwash","clone_product_handle":"ready-to-use-screenwash-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0032\/5474\/7185\/files\/ScreenwashReadytoUse5LRenderFRONT.jpg?v=1697100501","product_shopify_id":7605277360320,"original_product_shopify_id":1987965026353,"created_at":"2023-11-08T13:56:17.000000Z","updated_at":"2023-11-09T04:34:03.000000Z"}}]}],"settings":{"auto_add_gift":true,"compare_gift_price_with_product":false,"cal_gift_discount":"current_price","select_one_gift_price":false,"not_show_gift_if_already_on_cart":false,"sync_quantity":false,"manual_input_inventory":false,"using_draft_order":false,"delete_gift_after_turn_off_offer":true,"gift_format":"same_as_original_products","admin_api_access_token":null,"notify_via_email":{"status":false},"barcode":"blank","type_seo":"number_integer","mode_override_checkout":"default"},"appearance":{"gift_slider":{"general":{"gift_popup_title":"Select your free gift!","add_to_cart_btn_title":"Add to cart","running_text":"","select_gift_btn":"Select variants","show_product_title":true,"show_variant_title":true,"show_pagination":true,"show_gift_for_customer":"by_variants","number_product_slider":4},"color":{"gift_slider_title_color":"#121212","product_title_color":"#000000","original_price_color":"#121212","discounted_price_color":"#ea5455","add_to_cart_color":"#FFFFFF","add_to_cart_btn_color":"#7367f0"},"others":{"hidden_brand_mark":true,"gift_img_size":"&width=480&height=480"},"disable_slider_checkbox":{"enable":false,"time":10,"text":"Don't show this offer again"}},"gift_icon":{"gift_icon_path":"images\/fg-icons\/fg-icon-red.png","shopify_gift_icon_path":"fg-icon-red.png","product_page":{"gift_icon":{"status":true,"size":"50"},"gift_thumbnail":{"status":true,"size":"100","title":"Free Gift"}},"collection_page":{"status":true,"size":"50"}},"promotion_message":{"show_on_cart_page":true,"text_color":"#ffffff","background_color":"#23168d"},"today_offer":{"widget_icon_path":"images\/widget-icons\/widget-icon-6.png","shopify_widget_icon_path":"widget-icon-6.png","widget_info":{"show_widget":true,"widget_position":"bottom_right","widget_title":"Special OFFER","widget_subtitle":"Claim these exclusive offers today"}}},"integration":{"transcy":{"install":false}}};/* END_FG_DATA */
const _0x147660=_0x36b7;function _0xf9d0(){let $=["fetchCheckoutEvents","#CartPopup .styles_CartPreview__card__KX-WB, #qikify-stickycart-v2-app .qsc2-drawer-wrapper > div:nth-child(2)","count_down_quantity","getItem","product","redirected","variants_quantity","locale","END_VALIDATE_CHECKOUT","src","product_shopify_id","not using draft order","position","offers","cart-drawer .mini-cart__inner .mini-cart__empty, cart-drawer .mini-cart__inner .mini-cart__main","customerLocation","customize.product_page_message","freegift_attributes","reduce","promotion_message","freegifts","product_type","not have orders and gifts","min_amount","show_on_cart_page","variants","SLIDECART - HQ","giftsAddedInvalid","d-block",".dots-thumbnail","GIFT_SELECT_SECTION_ID","SLIDECART_UPDATE","body",' ',"fg-today-offer:success","variantId","product_page","offer","total_spent_on_last_order","fg-app:start","FoxKitV2","manual_input_inventory","#fg-gift-items .dropdown","100%","sub_conditions","MinimogEvents","product_narrow","sca-fg-icon-collection-page",'
\n {{ fg_cart_message }}\n
','\n
\n \n \n \n \n \n
',"headers","visibility","undefined","sca_cart_xhr","#sca-fg-today-offer-widget","sca_fg_value_checkout","text","product_vendors","parseFromString","Can not fetch all body","sca-offer-archived","stop_offer","CartJS","Rebuy","routes","change","sca_fg_form_checkbox_button_query","[sca_root_checkout]",".sca_handle_button_checkout","send","handle",".cc-product-list .product-block, .collection-list.grid .grid__item, .collection-grid.grid .grid__item","subscribe","GIFTS_CART_SECTION","/cart/change","removeEventListener","fg-gifts:gift-icon","FGSECOMAPP_HIDDEN_GIFT_POPUP","sca_fg_title_product_gift_icon_query","then","not_show_gift_if_already_on_cart","getCart","SLIDECART_OPENED","#fg-gift-items","addGiftToCart","none","Escape",".gift-original-url","{{sca_min_total}}","#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg","partially_paid","USD",".btn-add-to-cart","#sca-fg-today-offer-iframe .sca-fg-body .sca-fg-offers .sca-fg-offer","Theme FoxEcom","sca-gift-icon-collection-page","SLIDECART_CLOSE","gift_should_the_same","forEach","getElementById","pageX","isArray","GIFT_SELECT_SECTION","sca-promotion-message-layout","FGSECOMAPP","#sca_fg_today_offer_widget","?sca_add_gift","show_pagination","now","substring","function",'',"others","arrGiftsAdd","maxOfferPriority","upcartRegisterAddToCart","readyState","appearance","message","compressToBase64","parentElement","auto add all gifts from {","selling_plan_allocation","Select your free gift!","#sca_fg_today_offer_item_section","sca-fg-toast sca-fg-success","floor","/products/","data-original-price","sca-d-none","100","fg_decimal","productsInPage","tabindex","height","get","$","GET","gifts_valid","current_collection","stringify","max_gifts_can_get","decompressFromBase64","fgAppearancePromotionMessage","scaCustomLoadingCheckout","fit-content","other_products","belongs_to_offer","number_of_products","prepareDataForDisplayWidgetByRule","Add gift to cart successfully!","enable","/cart/add.js","thumbnail","Widgets","tool","default",'\n \n \n \n ',".m-product-form--wrapper","product_id","querySelector","TODAY_OFFER_ITEM_SECTION","hasOwnProperty","innerHTML","this is others","integration","display","currentTarget","sca_fg_innerHTML","#secomapp_freegifts_version","GIFT_ADDED","opacity","isReachConditions","Update cart.attributes ","setItem","fetchCart","positions","9310590TEfwFQ","customize.disable_slider_text","scaCountRenderEventCheckout","include","FG_OVERRIDE_XHR_OPEN","/cart","price","sca_offers_added","select_one_gift_price","trim","max_amount",".sca-fg-tooltip","gift_icon_path","collections","active","vendor","freegifts-main-popup-container","track","&data_checkout=","startsWith","sca_amount_fixed","today_offer","bogos-gift","Slide Cart - qikify","button.new_checkout_button, input[value='Checkout'], input[value='Checkout'], input[value='Check out']","customer_order_history","initializeForXHR","map","auto_add_gift","Unicart","Default Title","location","length","DONE","paid","?sca_attr_cart","sca_clone_checkout",".product_name, .product-title, .product__title, .product-single__title, .tt-title, .ProductMeta__Title","gift_items","freegifts-main-page-container","TODAY_OFFER_WIDGET_ID",'\n
\n
\n
\n
\n \n {{ fg_original_price }}\n \n {{ fg_gift_price }} \n
\n \n
\n
\n \n {{ fg_variant_title }}\n \n \n
\n \n
\n \n
\n {{ fg_add_to_cart }}\n \n
\n
\n
','a[href*="/collections/sca_fg"]',"fg-xhr:open","POST","flex","CART_MSG_SECTION",'\n
\n
\n
{{ sca_fg_offer_title }} \n
\n
\n \n \n \n \n
',".dropdown-menu","1837913bTMrvC","bottom_right","6px 0","#7367f0","removeAttribute","contains","/cart/update","email","Cart","sca-fg-form-icon-product-page",'\n Loading... \n
',"SHOW_GIFT_SLIDER","FG_OVERRIDE_FETCH","end","using_draft_order","and","collection_page",".sca-fg-notifications","sca_fg_main_promotion_message_query","&width=480&height=480","sca-today-offer-right","sca_fg_img_collection_gift_icon_query",' \n
\n \n \n \n \n \n ',"Error listening XHR open","#sca_fg_variant_select_section","fgData","fg-checkout:start","cal_gift_for_other_rules",".sca-promotion-message-layout","root","fg-xhr:send","by_variants","offer_name","boolean","keys","customer_tags",".f\\:featured-collection .f\\:featured-collection-block .f\\:column","mouseenter","#fg-gift-thumbnail-title .glider-next","discount_value","sca_locale","SLIDECART_OPEN","target","closeCart","hasAttribute","widget_icon_path","hide","quantity","GIFT_ICON_SECTION_ID","is_multiply","defineProperty","SECOMAPP_FREEGIFT","created_at","attributes","Claim these exclusive offers today","Error listening XHR send","onCartDrawerUpdate",'',"do_not_add_freegift_attribute","sca-fg-form-thumbnail-product-page","stopPropagation","querySelectorAll","unshift","widget_info","END_RENDER_APP","arrOfferAdded","widget_title","#shopify-section-header #cart-icon-bubble, .shopify-section.section-header #cart-icon-bubble","TODAY_OFFER_ITEM_SECTION_ID","TODAY_OFFER_SECTION_ID","sca_catch","data-offer","sca-is-visible-fg","sections_cart","error","indexOf","fg-app:end","hasDoneProcessCheckout","pathname",".satcb-cs .satcb-cs-top-container, #monster-upsell-cart #monster-cart-wrapper div[class*=custom_scrollbar]","gifts","CART_MSG_SECTION_ID","giftsAvailable","Don't show this offer again",".fg-secomapp-handle-add-to-cart","value_customer_tags","add_to_cart_btn_title","giftsAdded","gift_img_size","remove","start_time","240","text/html","NumberFormat","PRODUCT_HAS_GIFTS","HS_SLIDE_CART_UPDATE","createElement","-sca_clone_freegift",'',"#freegifts-main-popup-container [data-close]","disable_async_process_fg","URL","product_types","arrGiftsRemove","split","sca-today-offer-widget-right","unicart","CART_MSG_ITEM_SECTION_ID",'\n {{ sca_fg_cart_message_items_section }}\n
',".freegifts-main-container .slide-container #sca-hidden-gift-popup .sca-disable-checkbox","upcartOnCartOpened","CUSTOM_EVENTS","/cart/add","openSlider","textContent","sync_quantity","auto_add_all_gifts","toggle","icartSideCartOpenEvent",".btn-add-to-cart.sca-fg-out-stock","not type checkout btn","variant","shopify_cart","maxWidth","enable_process_offer_loading","charAt","value","END_PROCESS_CART","compare_gift_price","product_has_icon","fg-checkout","Shopify.getCart","clone_checkout","settings","4TtdxZU","START_PROCESS_CART","replace","#sca_fg_cart_message_items_section","padding","add","specific_link_address","string","unit","cartItems","Monster Cart",".fg-secomapp-product-title","preventDefault","backgroundColor","compare_gift_price_with_product","show_gift_for_customer","input[name='checkout'], button[name='checkout'], input[name='goto_pp'], button[name='goto_pp']","#sca-fg-today-offer-iframe .sca-fg-body .sca-fg-offers","catch","open","show_widget","sca_checkout_form","XMLHttpRequest",".fg-secomapp-cart-item-promotion","subscription_products","find","MinimogTheme","sca_fg_cart_icon_query","original_price","mousemove","sca_slidecart_tcc","customer_locations","CART_AUTO_UPDATED","data-variant","12NLpOOW","formatter","sca-gift-icon","fg-today-offer:render","sca-fg-out-stock",".sca-list-gift-thumbnail","m-cart-drawer","#MainContent, #mainContent, #main, .main-content","original_compare_at_price",".sca-offer-title","total_spend_on_order_history",".icartCheckoutBtn, .rebuy-cart__checkout-button, .qsc2-checkout-button, #mu-checkout-button","#sca-gift-thumbnail","isUpdateCart","compare_at_price","value_customer_locations","enable_toast_added",".fg-secomapp-cart-icon","sca-today-offer-left","done","price_max","data-img","iCart","pageY","top","block","STICKY_CART_OPEN","current_product","STICKY_CART_UPDATE","parentNode","sca_root_checkout","secomappGetCartRunning","condition_result","cloneNode","gift_thumbnail","auto","#sca-spinner-checkout","join","RENDER_CART_MESSAGE","#sca_fg_gift_thumbnail_items_section","start","slice","fgAppearanceGiftIcon","searchParams","parse","width","disable_fetch_cart_checkout",".sca-promotion-glider","original_variant_shopify_id","customGiftImgSize","/cart.js?sca_fetch&","cal_gift_price","customize.add_to_cart_button",".sca-fg-close-today-offer","sca_process_gifts","70%","includes","priority","type","7020304CixmiN","fgAppearanceGiftSlider","set","sca-show","GIFTS_POPUP_SECTION","type_customer_locations","invoice_url","event auto process gifts with cart","count_down_value","disable_slider_checkbox","UpCart - AfterSell","checked","Rivets Cart","toFixed","fg-cart:auto-updated","fg-gifts:added","current_variant","gift_popup_title","disable_override_xhr","select_gift_btn","GIFT_THUMBNAIL_SECTION","&sca_shop_name=","#sca-gift-icon","HS_SLIDE_CART_CLOSE","CartSlider","api","href","fgSettings","dispatchEvent","#sca-fg-today-offer-widget .sca-fg-count-offers","GIFT_THUMBNAIL_ITEMS_SECTION_ID","item_count",".original-price del","application/json","log","Sticky Cart - Codeinero","div[class*=hs-cart-drawer] .hs-site-cart-popup-layout, #MinimogCartDrawer m-cart-drawer-items, #CartDrawer .drawer__inner","GIFT_ICON_SECTION","customer","entries","#sca_fg_section_gift_item","addEventListener","fg_codes","isSameNode","glider-animated","push","status","TODAY_OFFER_CHANGE","order_created_from","} {","stop_lower_priority","updateCart","customLoadingCheckout","key","fg-cart:end-process","original_product_shopify_id","mouseleave","variant_id","Select variant","sca_fg_codes","sca-gift-icon-collection-img","variant_shopify_id","Loading...","fg-gifts:updated","products","relative","getTime","widget_subtitle","Error decoding cookie:","#sca_fg_cart_message_section","max","productsByID","sections_url","number_of_order","free-gift-icon","number_gifts_thumbnail","customize.gift_slider_title","sca_price","appendChild","isDelayShowAdded","offer_root","pubSubEvents","toString","call","openDrawer","1893695MJjjlT","GIFT_THUMBNAIL_ITEMS_SECTION","discount_type",'\n \n ',"sca_handle_checkout","60%",".fg-secomapp-cart-drawer","Show","START_VALIDATE_CHECKOUT","clearInterval","[data-open]","shopify_widget_icon_path","class","values","#close-fg-toast","QUERY_SELECTOR","#fg-gift-items .btn-add-to-cart","fgCallback",".satcb-cs-checkout-btn, .hs-checkout-purchase","every","arrGiftsData","setAttribute","sca_add_url","keyup","prepend","GIFT_UPDATED","mode_override_checkout","concat","sort","final_price","GIFTS_CART_SECTION_ID","#82868b","title","80%","HS_SLIDE_CART_OPEN","apply","widget_position","orders","freegiftProxy","offer.cart_message_","number_product_slider","cookie","sca_deplay_cart_msg","disabled",".m-product-item, .m-product-list .swiper-slide, .f-grid .f-column","TODAY_OFFER_WIDGET","GIFTS_POPUP_SECTION_ID","fg-messages:render","data-fg-checkout-btn","sections","9rdNHeF","160","#sca_fg_cart_section_gifts_slider","sca_transcy_locale","color","cart","958787lRbJIB",'\n {{ fg_variant_title }}\n ',"(Discount)","6457416qpILZm","replaceAll","renderPromotionMessage","fgAppearanceTodayOffer","checkIsBlockCheckout","filter","data-template","gift_products",'\n
✕ \n
\n {{ fg_slider_title }}\n
\n
\n
\n
\n ❮ \n
\n
\n ❯ \n
\n
\n
\n \n {{ sca_fg_disable_slider_section }}\n
',"original_product_handle","SATCB","scrollItem","style","offer_conditions","application/liquid","#sca-fg-today-offer-iframe","enable_check_variants_has_gift","sca_link_checkout","number","#UpcartPopup:has(#CartPopup[class*='styles_active'])",'{{ fg_gift_thumbnail_title }}
\n\n \n
\n
\n {{ sca_fg_gift_thumbnail_items_section }}\n
\n \n
\n
\n
\n
',"test","cal_gift_discount","general","type_customer_tags",".sca-gift-icon-collection-page","className","178512DNUnNt","open-cart-drawer","div","variant_title","product_collections","#sca_fg_disable_slider_section","checkout","clone_product_handle","info","#sca_fg_gift_thumbnail_section",".product-card, #product-grid .grid__item, .product-grid .grid__item, .card-list .card-list__column","hidden","offer.offer_title_","trigger_body","DISABLE_SLIDER_SECTION","json","number_of_gift_can_receive","timeoutId","show_variant_title","#fg-gift-items .dropdown > .dropdown-menu > li","currency","fg-gift-items","transcy","tags","show_product_title","action","fg-fetch:override","reRenderCartCustom","sca-fg-today-offer-title-tooltip","sca-fg-tooltip","getAttribute",'\n
\n {{ fg_slider_title }}\n
\n
\n
\n
\n ❮ \n
\n
\n ❯ \n
\n
\n
\n \n {{ sca_fg_disable_slider_section }}\n
',"data-fg-offer-id","#sca_fg_gift_icon_section","insertBefore",".satcb-cs-close","fgIntegration","dataset","[type='submit'][name='add'], [type='button'][name='add'], [data-add-to-cart], [data-action='add-to-cart']","hidden_brand_mark","gift_slider","SHOPIFY_CART","click","sca_text_notify_success","monster_refresh","classList",'\n \n \n \n \n \n ',"track variant auto add gift: {","reload","some","gift_icon","money","prototype","50%",".fg-secomapp-collection-img","offer_id","#sca_fg_today_offer_section","fgAppearance","end_time","gift_settings","TODAY_OFFER_SECTION","variants_ids","append"];return(_0xf9d0=function(){return $})()}if(!function($,x){let t=_0x36b7,e=$();for(;;)try{let a=parseInt(t(456))/1+parseInt(t(909))/2*(parseInt(t(486))/3)+parseInt(t(943))/4*(-parseInt(t(400))/5)+parseInt(t(459))/6+-parseInt(t(775))/7+parseInt(t(315))/8*(parseInt(t(450))/9)+-parseInt(t(726))/10;if(701734===a)break;e.push(e.shift())}catch(i){e.push(e.shift())}}(_0xf9d0,701734),window[_0x147660(800)]?.appearance?.[_0x147660(536)]?.[_0x147660(738)]&&fgGiftIcon&&(window.fgData[_0x147660(666)][_0x147660(536)][_0x147660(738)]=fgGiftIcon),window.fgData?.[_0x147660(666)]?.[_0x147660(747)]?.[_0x147660(411)]&&fgWidgetIconsObj){let $=window.fgData.appearance[_0x147660(747)][_0x147660(411)];window[_0x147660(800)][_0x147660(666)][_0x147660(747)][_0x147660(820)]=fgWidgetIconsObj[$]??$}function _0x36b7($,x){let t=_0xf9d0();return(_0x36b7=function($,x){return t[$-=313]})($,x)}!function $(){let x=_0x147660;window[x(653)]={},FGSECOMAPP[x(663)]=null,FGSECOMAPP[x(918)]=Object.values(Shopify?.cartItems??{}),FGSECOMAPP[x(562)]=[],FGSECOMAPP[x(342)]=window[x(800)]?.[x(908)]??{},FGSECOMAPP[x(543)]=window[x(800)]?.appearance??{},FGSECOMAPP[x(522)]=window[x(800)]?.[x(714)]??{},FGSECOMAPP.fgAppearanceGiftSlider=FGSECOMAPP.fgAppearance?.[x(526)]?.[x(482)],FGSECOMAPP.fgAppearanceGiftIcon=FGSECOMAPP[x(543)]?.gift_icon,FGSECOMAPP[x(692)]=FGSECOMAPP.fgAppearance?.[x(568)],FGSECOMAPP[x(462)]=FGSECOMAPP[x(543)]?.[x(747)],FGSECOMAPP[x(417)]=[],FGSECOMAPP[x(974)]=!1,FGSECOMAPP[x(840)]=[],FGSECOMAPP[x(728)]=0,FGSECOMAPP[x(463)]=!1,FGSECOMAPP.scaHandleConfigValue={...Shopify?.scaHandleConfigValue},FGSECOMAPP[x(513)]=Shopify?.[x(513)]??void 0,FGSECOMAPP[x(693)]=Shopify?.[x(693)]??void 0,FGSECOMAPP[x(681)]={},FGSECOMAPP.productsByID={},FGSECOMAPP[x(852)]=!1,FGSECOMAPP[x(848)]={},FGSECOMAPP[x(956)]=!1,FGSECOMAPP[x(527)]={},FGSECOMAPP[x(392)]=Shopify?.sca_fg_price??"discounted_price",FGSECOMAPP[x(886)]={SHOW_GIFT_SLIDER:"fg-gifts:show-slider",PRODUCT_HAS_GIFTS:x(625),GIFT_UPDATED:x(378),GIFT_ADDED:x(330),CART_AUTO_UPDATED:x(329),START_PROCESS_CART:"fg-cart:start-process",END_PROCESS_CART:x(369),START_VALIDATE_CHECKOUT:x(801),END_VALIDATE_CHECKOUT:"fg-checkout:end",START_RENDER_APP:x(588),END_RENDER_APP:x(851),FG_OVERRIDE_FETCH:x(512),FG_OVERRIDE_XHR_OPEN:x(769),FG_OVERRIDE_XHR_SEND:x(805),RENDER_TODAY_OFFER:x(946),TODAY_OFFER_CHANGE:x(583),RENDER_CART_MESSAGE:x(447)};let t={GIFTS_CART_SECTION_ID:x(452),GIFTS_CART_SECTION:x(517),GIFTS_POPUP_SECTION_ID:"#sca_fg_section_gifts_popup",GIFTS_POPUP_SECTION:x(467),GIFT_ITEM_SECTION_ID:x(355),GIFT_ITEM_SECTION:x(767),GIFT_SELECT_SECTION_ID:x(799),GIFT_SELECT_SECTION:x(457),DISABLE_SLIDER_SECTION_ID:x(491),DISABLE_SLIDER_SECTION:x(660),CART_MSG_SECTION_ID:x(384),CART_MSG_SECTION:x(883),CART_MSG_ITEM_SECTION_ID:x(912),CART_MSG_ITEM_SECTION:x(597),GIFT_THUMBNAIL_SECTION_ID:x(495),GIFT_THUMBNAIL_SECTION:x(479),GIFT_THUMBNAIL_ITEMS_SECTION_ID:x(982),GIFT_THUMBNAIL_ITEMS_SECTION:x(873),GIFT_ICON_SECTION_ID:x(519),GIFT_ICON_SECTION:x(582),TODAY_OFFER_SECTION_ID:x(542),TODAY_OFFER_SECTION:x(832),TODAY_OFFER_ITEM_SECTION_ID:x(673),TODAY_OFFER_ITEM_SECTION:x(773),TODAY_OFFER_WIDGET_ID:x(654),TODAY_OFFER_WIDGET:' \n '},e=()=>{let $=x,t=FGSECOMAPP[$(543)]?.[$(526)],e=t?.[$(661)]?.[$(525)],a=!C(t)&&void 0!==e&&!e;return a?$(403):""},a=()=>{let $=x,e=FGSECOMAPP.fgAppearance?.[$(526)],a=e?.disable_slider_checkbox??{};document.querySelector($(884))?.[$(326)]&&localStorage.setItem($(626),""+Date[$(657)]());let i=document[$(709)](t.DISABLE_SLIDER_SECTION_ID)?.[$(712)]??t[$(500)];return a?.[$(700)]?i[$(460)](/{{\s*fg_text_disable_slider\s*}}/gm,h(m(a[$(605)]??$(858),$(727)))):""},{fetch:i}=window,r=()=>{let $=x;document[$(709)]($(718))?.[$(516)]($(465))!==$(905)&&(window.fetch=async(...x)=>{let t=$;try{let e=x[0];if(!(e?.[t(999)](t(887))||e?.[t(999)](t(623))||e?.[t(999)]("/cart/update")))return setTimeout(function(){$3()},1e3),await i(...x);{let a=e?.[t(999)](t(887)),r=e?.[t(999)](t(623))||e?.includes(t(781));n(x[1]);let c=200,o=null,s=await i(...x)[t(628)]($=>{let x=t;return(o=$,c=$[x(361)],$[x(554)])?$:$[x(501)]()})[t(927)]($=>{console.error($)});if(document[t(343)](new CustomEvent(FGSECOMAPP[t(886)][t(787)],{detail:{args:x,response:o}})),a&&x[1].headers?.sca_add_gift&&200!==c){let l=JSON[t(987)](x[1][t(581)])?.id,_=document.querySelector('.btn-add-to-cart[data-variant="'+l+'"]');_.innerText="Out of stock",_[t(531)][t(780)]("sca-fg-out-stock")||_[t(531)][t(914)](t(947)),_[t(443)]=!0,_.style[t(913)]="",_[t(471)][t(922)]=t(431),document[t(836)](t(641))[t(647)]($=>{let x=t;parseInt($[x(516)](x(942)))===l||$[x(531)][x(780)](x(947))||($[x(443)]=!1,$[x(471)][x(922)]=FGSECOMAPP[x(543)]?.gift_slider?.[x(454)]?.add_to_cart_btn_color??x(778))})}if(200!==c&&(a&&x[1][t(599)]?.sca_add_gift||r&&x[1][t(599)]?.[t(997)]))return d(s,o);if(Shopify?.[t(875)])return $s([e,...x[t(984)](1)])[t(628)](),d(s,o);if(await $s([e,...x[t(984)](1)]),r&&x[1]?.[t(599)]?.sca_process_gifts)return d(s,o);let g=r?FGSECOMAPP[t(527)]??s??{}:s;return await f(x,s,g),d(g,o)}}catch(u){return await i(...x)}})},c=window[x(931)][x(538)][x(928)],o=window[x(931)][x(538)][x(618)],s=()=>{let $=x;Shopify?.[$(333)]||(window.XMLHttpRequest[$(538)][$(928)]=function(x,t){let e=$;try{document[e(343)](new CustomEvent(FGSECOMAPP[e(886)].FG_OVERRIDE_XHR_OPEN,{detail:{fgXHR:this}}))}catch(a){console.error(e(798),a)}finally{c[e(435)](this,arguments)}},window[$(931)][$(538)][$(618)]=function(x){let t=$;try{document[t(343)](new CustomEvent(FGSECOMAPP[t(886)][t(730)],{detail:{fgXHR:this}}));let{_url:e}=this;(e?.[t(999)]("/cart/add")||e?.includes(t(623))||e?.includes(t(781)))&&this[t(356)]("readystatechange",function(){let $=t;this[$(665)]===XMLHttpRequest[$(759)]&&200===this[$(361)]&&$s([e,{}]).then()})}catch(a){console[t(849)](t(830),a)}finally{o[t(398)](this,x)}})};FGSECOMAPP.initializeForXHR=()=>{let $=x;try{if(Shopify?.disableShopify_getCart||"function"!=typeof Shopify?.getCart)return;Shopify[$(630)]=async function(x){let t=$;if(!FGSECOMAPP[t(974)]){FGSECOMAPP[t(974)]=!0,await $s([t(906),{}]);let e=await $r(t(602));typeof x===t(659)&&(0>FGSECOMAPP[t(417)][t(850)](x)&&FGSECOMAPP.fgCallback[t(360)](x),x(e)),FGSECOMAPP[t(974)]=!1}FGSECOMAPP[t(549)]()},typeof ShopifyAPI!==$(601)&&typeof ShopifyAPI[$(630)]!==$(601)&&(ShopifyAPI[$(630)]=Shopify?.[$(630)]),typeof Shopify?.[$(340)]!==$(601)&&typeof Shopify?.[$(340)][$(630)]!==$(601)&&(Shopify[$(340)][$(630)]=Shopify?.[$(630)])}catch(t){console[$(849)](t)}};let n=$=>{let t=x;try{let e=$?.[t(581)];e instanceof FormData?FGSECOMAPP.sections_cart={sections:e.get("sections"),sections_url:e.get(t(387))}:typeof e===t(916)&&(e=JSON[t(987)](e),FGSECOMAPP.sections_cart={sections:e?.sections,sections_url:e?.sections_url})}catch(a){FGSECOMAPP[t(848)]={}}},d=($,t)=>{let e=x;try{let a=Shopify?.fg_fetch_attributes??["url","type",e(554),"ok"],i=new Response(JSON[e(689)]($),t);for(let r of a)Object[e(825)](i,r,{value:t[r]});return i}catch(c){return new Response(JSON[e(689)]($))}},l=async()=>{let $=x;if(Shopify[$(833)])return;let t=[];if(!C(FGSECOMAPP[$(840)]))for(let e of(t[$(360)]($(826)),FGSECOMAPP.arrOfferAdded)){let a=FGSECOMAPP.offers[$(934)](x=>x.id===e[$(696)])?.[$(593)]?.[$(915)];C(a)||t[$(360)](a)}if(t[$(428)](),t[$(397)]()!==FGSECOMAPP?.[$(527)]?.[$(828)]?.[$(566)])try{await i((Shopify?.sca_update_url??$(781))+$(761),{method:$(770),headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json;"},body:JSON[$(689)]({attributes:{freegift_attributes:t.toString()}})})}catch(r){console[$(849)]($(722)+r[$(667)])}},f=async($,t,e)=>{let a=x;try{if($[1]?.headers?.[a(997)])return;let r={},c=Object[a(809)](t[a(449)]??{})?.[a(464)]($=>C(FGSECOMAPP[a(848)][$]))??[];if(c&&c[a(758)]&&FGSECOMAPP[a(956)]&&(r=await i("/?sections="+c[a(980)](",")).then($=>$[a(501)]())),FGSECOMAPP[a(956)]=!1,r={...FGSECOMAPP[a(848)],...r},C(r))return;t[a(449)]={...t[a(449)],...r},C(e)||(e.sections={...t.sections})}catch(o){}};FGSECOMAPP[x(633)]=async($,t,e)=>{let a=x;try{let i=FGSECOMAPP[a(840)][a(934)](x=>e===x[a(696)]?.[a(397)]()&&$===x[a(584)]);i?i.quantity+=t:FGSECOMAPP[a(840)][a(837)]({variantId:$,belongs_to_offer:e,quantity:t}),localStorage[a(723)]("sca_offers_added",LZString[a(668)](JSON[a(689)](FGSECOMAPP[a(840)]))),p("start");let r=await fetch((Shopify?.[a(422)]??a(701))+a(655),{method:a(770),headers:{Accept:a(348),"Content-Type":a(348),sca_add_gift:!0},body:JSON[a(689)]({quantity:t,id:$})});return await r[a(501)]()}catch(c){return!1}};let _=async($,t,e)=>{let a=x;e=e?.[a(397)]();let i=document[a(836)](a(416));i[a(647)](x=>{let t=a;x[t(443)]=!0;let e=x[t(516)](t(942))-0;e===$&&(x[t(471)][t(913)]=t(777),x[t(712)]=t(532)),x.style[t(922)]=t(431)});let r=await FGSECOMAPP.addGiftToCart($,t,e);r&&(i[a(647)](x=>{let t=a;x[t(443)]=!0;let e=x.getAttribute(t(942))-0;e===$&&(x.style[t(913)]=t(777),x[t(712)]=t(706)),x[t(471)][t(922)]=""}),$n()),document[a(343)](new CustomEvent(FGSECOMAPP[a(886)][a(719)],{detail:{gift:r}}))},g=$=>{let t=x,e=t(872);return!C($)&&("object"==typeof $&&($[t(619)]?.[t(999)](e)||$[t(509)]?.includes(t(748)))||typeof $===t(916)&&$[t(999)](e))},u=$=>{let{selling_plan_allocation:x}=$;return!C(x)&&!C(x?.selling_plan)},p=$=>{let t=x;try{if(!Shopify?.[t(899)])return;let{checkout_btn_query:e}=FGSECOMAPP[t(415)],a=[...e?.[t(704)],...e?.[t(714)],...e?.[t(705)]][t(464)](Boolean)[t(980)](",");document.querySelectorAll(a).forEach(x=>{let e=t;FGSECOMAPP[e(367)]($,x)[e(628)]()})}catch(i){}},b=async($,t)=>{let e=x;try{if(C($)&&C(t))return;let a={};if(FGSECOMAPP[e(918)]?.[e(464)]($=>g($))?.[e(647)]($=>{let x=e;a[$[x(372)]]=$[x(822)]}),($=$?.[e(464)]($=>!C($[e(372)])))?.forEach($=>{let x=e;a[$[x(372)]]=(a[$.variant_id]??0)+($.quantity??1)}),Object.keys(a)?.[e(647)]($=>{a[$]=a[$]>=0?a[$]:0}),C(Object[e(809)](a)))return;$?.[e(647)]($=>{let x=e,t=FGSECOMAPP.arrOfferAdded[x(934)](t=>$.offer_id?.[x(397)]()===t[x(696)]?.[x(397)]()&&$[x(372)]===t[x(584)]);t?t[x(822)]+=$.quantity:FGSECOMAPP.arrOfferAdded[x(837)]({variantId:$[x(372)],belongs_to_offer:$[x(541)]?.[x(397)](),quantity:$[x(822)]})}),localStorage[e(723)](e(733),LZString[e(668)](JSON[e(689)](FGSECOMAPP[e(840)]))),FGSECOMAPP.isUpdateCart=!0,p("start"),await fetch((Shopify?.sca_update_url??"/cart/update")+"?sca_process_gifts",{method:e(770),headers:{Accept:e(348),"Content-Type":"application/json",sca_process_gifts:!0},body:JSON[e(689)]({updates:a,...FGSECOMAPP[e(848)]})})[e(628)](x=>{let a=e;return x.ok&&$[a(758)]&&!t[a(758)]&&$n(),x[a(501)]()}).then($=>{let x=e;FGSECOMAPP[x(848)]=$.sections}),document[e(343)](new CustomEvent(FGSECOMAPP[e(886)][e(941)],{detail:{arrGiftsAdd:$,arrGiftsRemove:t}})),document[e(709)](e(718))?.[e(516)](e(465))===e(905)&&location[e(534)]()}catch(i){p("end"),console[e(849)](i)}},m=($,t)=>{let e=x;try{let a=FGSECOMAPP[e(522)]?.[e(508)],i=Shopify?.[e(453)]??Shopify?.[e(556)];return a.enable?a?.[i]?.[t]??$:$}catch(r){return $}},h=($,t=!1)=>{let e=x;return(""+$)[e(460)](/\$/g,t?"$$$$":e(685))},y=()=>{let $=x,i=document[$(648)]($(765));if(i){let r=document[$(709)](t[$(430)])?.innerHTML??t[$(622)];i[$(712)]=r[$(460)](/{{\s*fg_slider_title\s*}}/gm,h(m(FGSECOMAPP[$(316)][$(332)]??$(672),$(391))))[$(460)](/{{\s*sca_fg_disable_slider_section\s*}}/gm,h(e()))}else{let c=localStorage.getItem($(626))-0,o=FGSECOMAPP.fgAppearance?.[$(526)]?.[$(324)]??{},s=(o?.time??0)*6e4,n=!isNaN(c)&&c+s>Date.now();if(n||(localStorage.removeItem($(626)),!(i=document[$(648)]($(742)))))return;let d=document[$(709)](t[$(446)])?.[$(712)]??t[$(319)];i[$(712)]=d[$(460)](/{{\s*fg_slider_title\s*}}/gm,h(m(FGSECOMAPP[$(316)][$(332)]??"Select your free gift!",$(391))))[$(460)](/{{\s*sca_fg_disable_slider_section\s*}}/gm,h(a()+" "+e())),i.classList[$(914)]("sca-is-visible-fg")}},v=($,e)=>{let a=x,i=document[a(709)](t[a(579)])?.innerHTML??t[a(651)];return $[a(753)]($=>i[a(460)](/{{\s*fg_variant_img\s*}}/gm,h(K($.thumbnail??e),!0))[a(460)](/{{\s*fg_variant_id\s*}}/gm,h($.variant_shopify_id))[a(460)](/{{\s*fg_original_variant_id\s*}}/gm,h($.original_variant_shopify_id))[a(460)](/{{\s*fg_variant_price\s*}}/gm,h(T($)))[a(460)](/{{\s*fg_original_variant_price\s*}}/gm,h(E($))).replaceAll(/{{\s*fg_variant_title\s*}}/gm,h($[a(489)])))[a(980)](" \n")},T=$=>FGSECOMAPP[x(944)].format(O($?.price)),E=$=>{let t=x;return FGSECOMAPP[t(944)].format(O($?.[t(994)]??0))},w=($,t)=>{let e=x;return C(FGSECOMAPP[e(386)][$])?t??"#":FGSECOMAPP[e(386)][$][e(619)]},S=($,t)=>{let e=x;return FGSECOMAPP.fgAppearanceGiftSlider[e(510)]?C(FGSECOMAPP.productsByID[$])?t[e(911)]("\xbb","")[e(911)](/\(\d*% off\)/,"")[e(911)](e(458),"")??"":FGSECOMAPP[e(386)][$][e(432)]:""},C=$=>{let t=x;if(0===$)return!0;if(typeof $==t(477)||typeof $==t(808))return!1;if(typeof $==t(601)||null===$)return!0;if(void 0!==$[t(758)])return 0===$[t(758)];let e=0;for(let a in $)$[t(711)](a)&&e++;return 0===e},I=$=>{let t=x;try{let e={...FGSECOMAPP.scaHandleConfigValue},a=e[$];if(a=a?a[t(735)]():null,!C(a)&&a[t(758)]>0)try{return document[t(709)](a),a}catch(i){}return""}catch(r){return""}},A=()=>{let $=x;try{FGSECOMAPP[$(944)]=new Intl[$(868)](Shopify?.[$(815)]??Shopify?.[$(556)],{style:"currency",currency:Shopify?.[$(506)]?.[$(740)]??$(640)})}catch(t){FGSECOMAPP[$(944)]=new Intl.NumberFormat("en-US",{style:$(506),currency:Shopify?.[$(506)]?.active??$(640)})}},O=$=>{let t=x;$=$??0;let e=Shopify?.currency?.rate??1;return 1===parseFloat(e)?$:($*e)?.[t(328)](Shopify?.[t(680)]??2)},D=$=>{let t=x;try{return $[FGSECOMAPP[t(392)]]??$?.[t(429)]??$?.[t(732)]}catch(e){return $?.[t(429)]??$?.price}},k=$=>{let t=x;return $[t(464)]($=>void 0===$[t(802)]||!0===$[t(802)]).reduce(($,x)=>$+x[t(822)]*D(x),0)/100},R=$=>{let t=x;return $[t(464)]($=>void 0===$[t(802)]||$[t(802)]).reduce(($,x)=>$+x.quantity,0)},F=($,t,e)=>{let a=x,i=t.product_narrow;return e?.is_only&&($=$[a(464)]($=>u($))),C(i)?$:$.filter($=>!i.map(x=>{let t=_0x36b7;switch(x[t(314)]){case t(547):return Object[t(413)](x.value)[t(753)]($=>$[t(896)]).flat()[t(753)]($=>$.id)[t(999)]($.variant_id);case t(877):return Object[t(809)](x[t(901)]).includes($[t(570)]);case"product_vendors":return Object[t(809)](x[t(901)])[t(999)]($[t(741)]);case t(490):let e=Object[t(809)](x.value),a=$[t(739)]?.[t(753)]($=>$.id+"")?.[t(464)]($=>e[t(999)]($));return!C(a);default:return!1}})[a(999)](!1))},N=($,t)=>{let e=x;return $?.[e(753)]($=>{let x=e;if(typeof $[x(802)]!==x(601)){let a=FGSECOMAPP[x(840)]?.[x(464)](t=>t[x(584)]===$.variant_id),i=a?.[x(567)](($,x)=>$+x.quantity,0);if(i===$[x(822)]){let r=a?.[x(464)](e=>{let a=x;if(e[a(696)]?.[a(397)]()===t[a(397)]())return!1;let i=FGSECOMAPP.offers?.find($=>$.id?.[a(397)]()===e.belongs_to_offer?.toString()),r=i[a(545)]??{},c=D($);return r.cal_gift_for_other_rules&&c>0})?.[x(567)](($,t)=>$+t[x(822)],0);return{...$,cal_gift_for_other_rules:r>0,quantity:r??0}}return{...$,cal_gift_for_other_rules:!1,quantity:0}}return{...$}})??[]},q=($,t)=>{let e=x,a=FGSECOMAPP[e(342)]?.[e(923)],i=FGSECOMAPP.fgSettings?.[e(629)],r=$,c=r;if(a){r=$[e(428)](($,x)=>D($)-D(x));let o=t[e(764)][e(753)]($=>$?.[e(903)]??0);r=r[e(464)]($=>o[e(535)](x=>x<=D($)/100)),c=JSON[e(987)](JSON[e(689)](r));let s=t[e(862)][e(428)](($,x)=>x?.[e(903)]-$?.[e(903)])[e(753)]($=>({...$}));c[e(464)]($=>$.quantity>0)[e(647)]($=>{let x=e,t=D($)/100;s[x(464)]($=>$[x(822)]>0)[x(464)]($=>$?.[x(903)]<=t)[x(647)](t=>{let e=x,a=$[e(822)]-t[e(822)];t[e(822)]-=a>=0?t.quantity:$[e(822)],$[e(822)]=Math.max(a,0)})}),t[e(576)]=s[e(464)]($=>$.quantity>0),c=c[e(464)]($=>$[e(822)]>0)}r=r[e(464)]($=>$[e(822)]>0);let n=FGSECOMAPP[e(918)][e(753)]($=>$[e(708)]),d=t[e(466)]?.map($=>$[e(370)]);i&&(r=r[e(464)]($=>!d?.[e(999)]($[e(708)])));let l=[];return FGSECOMAPP[e(342)]?.[e(734)]&&(l=FGSECOMAPP.cartItems[e(464)]($=>g($))[e(753)]($=>$[e(372)])),t.gifts_valid=JSON.parse(JSON.stringify(t.gift_products))?.[e(464)]($=>{let x=e;return $[x(574)]=$.variants[x(464)]($=>!l[x(999)]($.variant_shopify_id)),!(i&&n?.[x(999)]($[x(370)]))&&(a&&($[x(574)]=$.variants.filter($=>{let t=x,e=a===t(957)?$[t(951)]:$[t(937)];return c[t(535)]($=>e<=D($)/100)})),!C($[x(574)]))}),r},L=($,t,e)=>{let a=x,i=0,r=F(t,$,e.sub_conditions?.[a(933)]);r=N(r,$[a(541)]),r=q(r,e);let c=0;return $[a(917)]===a(537)?(c=k(r),e[a(323)]=Math.max($.min_amount-c,0)):$[a(917)]===a(697)&&(c=R(r),e[a(551)]=Math[a(385)]($[a(572)]-c,0)),c>=$[a(572)]&&(null===$.max_amount||c<=$[a(736)])&&(i=e.gift_settings[a(502)]*($[a(824)]?Math[a(675)](c/$[a(572)]):1)),i},G=($,t)=>{let e=x,a={},i=[],r=0;return t[e(472)][e(753)](x=>{let a=L(x,$,t);0!==a&&(r=a),i[e(360)](a>0)}),a.max_gifts_can_get=r,a[e(975)]=i,a},P=($,t)=>{let e=!1;return 1===$.length?e=$[0]:2===$.length&&(t===x(790)&&(e=$[0]&&$[1]),"or"===t&&(e=$[0]||$[1])),e},M=($,t)=>{let e=x,a=$?.[e(753)]($=>$[e(372)]);FGSECOMAPP.arrOfferAdded=FGSECOMAPP[e(840)].filter($=>a?.[e(999)]($[e(584)]));let i=t[e(764)][e(753)]($=>$.variant_shopify_id),r={};t[e(764)][e(464)]($=>r[$[e(376)]]={fg_original_compare_at_price:$[e(951)],fg_original_price:$[e(937)],compare_gift_price:$[e(903)]});let c=FGSECOMAPP[e(840)][e(464)]($=>$[e(696)]?.toString()===t.id?.[e(397)]())?.map($=>$[e(584)]),o=$[e(464)]($=>(g($)&&($.cal_gift_for_other_rules=!1),i.includes($[e(372)])&&c.includes($.variant_id))),s=o.map($=>{let x=e,a=t[x(545)];$[x(802)]=a.cal_gift_for_other_rules,$.belongs_to_offer=t.id?.[x(397)]();let i=FGSECOMAPP[x(840)]?.filter(e=>e[x(696)]?.[x(397)]()!==t.id?.[x(397)]()&&$[x(372)]===e.variantId)?.[x(567)](($,t)=>$+t[x(822)],0);return{...$,quantity:$[x(822)]-i,...r[$[x(372)]]}});return s[e(464)]($=>{let x=e;return $[x(696)]?.[x(397)]()===t.id?.[x(397)]()})},H=$=>{let t=x,e=$[t(862)][t(464)](x=>x.belongs_to_offer?.toString()!==$.id?.[t(397)]())[t(753)]($=>$[t(708)]);return Object[t(413)]($[t(687)])[t(464)]($=>!e[t(999)]($.product_shopify_id))},U=($,t)=>{let e=x,a=M($,t);t.giftsAdded=a;let i=G($,t),r=P(i.condition_result,t.condition_relationship);if(r){let c=a[e(464)]($=>$[e(696)]?.toString()===t.id?.toString())[e(567)](($,x)=>$+x[e(822)],0);i[e(690)]=i.max_gifts_can_get-c,t[e(862)]=a,t.giftsAvailable=i[e(690)]}else t.giftsAdded=a,t[e(857)]=0;return!C(FGSECOMAPP.maxOfferPriority)&&t[e(313)]>FGSECOMAPP.maxOfferPriority&&(r=!1),t[e(365)]&&r?FGSECOMAPP.maxOfferPriority=t[e(313)]:!t.stop_lower_priority||r||C(a)||t[e(313)]!==FGSECOMAPP[e(663)]||(FGSECOMAPP[e(663)]=null),t[e(721)]=r,t},B=$=>{let t=x,e=$+"=",a=document[t(441)][t(879)](";");for(let i=0;i{let e=x,a=!0,i=!0,r=!0,c=!0;if(!C($[e(593)]?.specific_link_address)){let o=B(e(374));a=o&&JSON[e(987)](o)[e(999)]($[e(593)].specific_link_address)}if(!C($[e(593)]?.[e(810)])){let{customer_tags:s}=$.sub_conditions,n=s?.[e(860)]?.[e(535)]($=>t[e(353)][e(509)]?.includes($));i=s?.[e(483)]===e(729)?n:!n}if(!C($[e(593)]?.[e(940)])){let{customer_locations:d}=$[e(593)],l=d?.[e(958)]?.[e(999)](FGSECOMAPP[e(564)]);c=d?.[e(320)]===e(729)?l:!l}if(!C($[e(593)]?.[e(751)])){let f=!0,_=$.sub_conditions[e(751)],g=t.customer[e(437)]??[];if(_[e(363)]){let u=Date.parse(_[e(363)])/1e3;g=g.filter($=>$[e(827)]>=u&&[e(760),e(639)][e(999)]($.financial_status))}if(!C(_?.total_spend_on_order_history)&&(0!==_.total_spend_on_order_history.min_amount||0!==_[e(953)][e(736)])){let p=_[e(953)][e(572)],b=_[e(953)][e(736)],m=g.reduce(($,x)=>$+x.total_price,0)/100;f&=(m>=p||!p)&&(m<=b||!b)}if(!C(_?.[e(587)])&&(0!==_[e(587)][e(572)]||0!==_[e(587)][e(736)])){let h=(t[e(353)].last_total??0)/100,y=_[e(587)][e(572)],v=_[e(587)][e(736)];f&=g[e(758)]>0&&(h>=y||!y)&&(h<=v||!v)}if(!C(_?.[e(388)])){let T=!(0!==_[e(388)].min_amount||0!==_[e(388)][e(736)]),E=g.length,w=_[e(388)][e(572)],S=_[e(388)][e(736)];f&=T?C(g):(E>=w||!w)&&(E<=S||!S)}if(_?.have_not_got_gift_from_this_offer){let I=t.customer[e(569)]??[],A=$[e(764)]?.[e(535)]($=>I[e(999)]($[e(376)]))||$[e(764)]?.[e(535)]($=>I[e(999)]($[e(991)]+"_"+($.original_price-$.price)*100));f&=!A}r=f}return a&&i&&r&&c},j=($,t,e)=>{let a=x,i=[],r=[],c=[],o=[];for(let s of t){let n=U($,s);if(!n[a(721)]){if(!n[a(862)][a(758)])continue;n[a(862)][a(647)]($=>{r.push({variant_id:$.variant_id,quantity:$.quantity,offer_id:s.id})});continue}if(n[a(857)]<0){n.giftsAdded[a(647)]($=>{let x=a;r[x(360)]({variant_id:$[x(372)],quantity:$[x(822)],offer_id:s.id})});continue}if(0===n[a(857)]){n[a(862)][a(647)]($=>{let x=a,t=FGSECOMAPP[x(840)][x(934)](t=>s.id?.[x(397)]()===t.belongs_to_offer?.[x(397)]()&&$.variant_id===t.variantId);t&&(t[x(822)]=$[x(822)])});continue}(s.sub_conditions&&Y(s,SECOMAPP)||C(s.sub_conditions))&&i.push(s)}if($?.[a(464)]($=>g($))[a(647)]($=>{let x=a,t=0,e=FGSECOMAPP[x(840)]?.filter(t=>$.variant_id===t[x(584)])?.reduce(($,t)=>$+t[x(822)],0)??0;e<$[x(822)]&&(t=$[x(822)]-e),C($[x(696)])&&(t=$[x(822)]),t>0&&r.push({variant_id:$.variant_id,quantity:t,offer_id:$[x(696)]?.toString()})}),e||C(r)){let d=i[a(753)]($=>{let x=a;return{id:$.id,offerName:$[x(807)],offerPriority:$.priority,stopLowerPriority:$[x(365)],gifts:H($),giftsAvailable:$.giftsAvailable,giftsAdded:$.giftsAdded,isReachConditions:$[x(721)],offer:$}});if(!C(d)){let l={};for(let f of d){let _=W(FGSECOMAPP[a(342)],f);_?.[a(758)]>0?c=c[a(427)]([..._]):f[a(855)].map($=>{let x=a;l[$.product_shopify_id]={...$,belongs_to_offer:f.id?.[x(397)]()}})}o=Object[a(413)](l)??[]}}return{arrGiftsAdd:c,arrGiftsRemove:r,arrGiftsData:o}},V=($,t)=>{let e=x,a=new Set;return $?.[e(647)]($=>a[e(914)]($[e(541)])),a[e(647)]($=>{let x=e,t=FGSECOMAPP[x(562)]?.find(t=>t.id?.[x(397)]()===$?.[x(397)]());if(C(t)||!t[x(721)]){FGSECOMAPP.arrOfferAdded=FGSECOMAPP.arrOfferAdded?.[x(464)](t=>t[x(696)]?.toString()!==$?.[x(397)]());return}if(t.giftsAvailable>=0)return;let a=[],i=FGSECOMAPP[x(840)]?.[x(464)](t=>t[x(696)]?.[x(397)]()===$?.[x(397)]())??[];if(t?.[x(545)]?.[x(891)])a=a.concat([...i]),t[x(857)]=0;else for(let r of(FGSECOMAPP.fgSettings?.compare_gift_price_with_product&&!C(t[x(576)])&&t[x(576)][x(647)]($=>{let e=x,i=FGSECOMAPP[e(840)][e(934)](x=>x[e(696)]?.[e(397)]()===t.id?.[e(397)]()&&$[e(372)]===x[e(584)]);if(C(i))return;let r=i[e(822)]-$[e(822)];t[e(857)]+=$[e(822)],r>0?i[e(822)]=r:(i.quantity=0,a[e(360)]({...i}))}),i)){if(t[x(857)]>=0)break;t[x(857)]+=r[x(822)],t[x(857)]<=0?a[x(360)]({...r}):(r[x(822)]=t[x(857)],t[x(857)]=0)}a?.[x(647)]($=>{let t=x;FGSECOMAPP[t(840)]=FGSECOMAPP.arrOfferAdded?.[t(464)](x=>$.variantId!==x[t(584)]||$[t(696)]?.[t(397)]()!==x[t(696)]?.[t(397)]())})}),t?.[e(464)]($=>{let x=e;return g($)&&($[x(822)]=FGSECOMAPP.arrOfferAdded?.filter(t=>$[x(372)]===t.variantId)?.[x(567)](($,t)=>$+t[x(822)],0)??0),$[x(822)]>0})??[]},z=async($,t)=>{let e=x,{arrGiftsAdd:a,arrGiftsRemove:i,arrGiftsData:r}=j($,t,!1),c=V(i,$);if(!C(i)){let o=j(c,t,!0);V(o?.[e(878)],$),a=o?.[e(662)],i=i?.[e(427)](o?.[e(878)])??[],r=o?.[e(420)]}return await b(a,i),l()[e(628)](),r},W=($,t)=>{let e=x;try{let a=[],i=t[e(855)],r=i[e(567)](($,x)=>$+x.variants[e(758)],0);if(!$[e(754)]||r<=0)return[];let c=t[e(586)]?.[e(545)]?.[e(891)],o=t[e(586)]?.[e(646)]??{};if(o[e(361)]&&o[e(314)]===e(896)){let s=i[0].variants[0];0===s[e(732)]&&(a[e(360)]({variant_id:s[e(376)],quantity:t[e(857)],offer_id:t.id}),console.log(e(533)+s[e(376)]+"} {"+s[e(489)]+"} {"+t.id+"}"))}else if(c){let n=(t?.[e(857)]??0)/r;i[e(647)]($=>$[e(574)]?.forEach($=>a[e(360)]({variant_id:$.variant_shopify_id,quantity:n,offer_id:t.id}))),console.log(e(670)+t.id+"}")}else if(1===r){let d=i[0][e(574)][0];0===d.price&&(a.push({variant_id:d.variant_shopify_id,quantity:t[e(857)],offer_id:t.id}),console[e(349)]("auto add gift: {"+d[e(376)]+e(364)+d[e(489)]+e(364)+t.id+"}"))}return a}catch(l){return console.error(l),[]}},X=$=>$===x(756),K=$=>{let t=x;try{let e=Shopify?.[t(992)]??FGSECOMAPP.fgAppearance?.[t(526)]?.[t(661)]?.[t(863)]??t(794),a=new URL($),i=new URLSearchParams(e);return i[t(647)](($,x)=>a[t(986)].set(x,$)),a.toString()}catch(r){return $}},Q=$=>{let e=x,a=$;if(FGSECOMAPP[e(316)][e(924)]===e(806))for(let i of(a=[],$)){let r=i[e(574)];r&&r[e(758)]&&r[e(647)]($=>a[e(360)]({...i,thumbnail:$.thumbnail,variants:[$]}))}let c=document.getElementById(e(507));c&&(c[e(712)]=a[e(753)]($=>{let x=e,a=$?.[x(574)][0]??{},i=X(a[x(489)]),r=$.variants?.length,c=h(S($[x(370)],$.title)),o=FGSECOMAPP.fgAppearanceGiftSlider?.show_gift_for_customer===x(806),s=document[x(709)](t.GIFT_ITEM_SECTION_ID)?.[x(712)]??t.GIFT_ITEM_SECTION;return s.replaceAll(/{{\s*fg_product_handle\s*}}/gm,h(w($[x(370)],$[x(468)]),!0))[x(460)](/{{\s*fg_product_img\s*}}/gm,h(K($[x(702)]),!0))[x(460)](/{{\s*fg_product_img_alt\s*}}/gm,c)[x(460)](/{{\s*fg_product_title\s*}}/gm,c)[x(460)](/{{\s*fg_gifts_check_show_by_variants\s*}}/gm,h(o&&FGSECOMAPP[x(316)][x(504)]?"":x(678))).replaceAll(/{{\s*fg_gifts_check_show_by_products\s*}}/gm,o?x(678):"")[x(460)](/{{\s*fg_check_selected_variant\s*}}/gm,1===r?"active "+(i?x(678):""):"")[x(460)](/{{\s*fg_variant_title\s*}}/gm,h(1!==r?m(FGSECOMAPP[x(316)][x(334)]??x(373),"customize.select_variant_button_text"):a[x(489)]))[x(460)](/{{\s*fg_original_price\s*}}/gm,h(E(a)))[x(460)](/{{\s*fg_gift_price\s*}}/gm,h(T(a)))[x(460)](/{{\s*sca_fg_variant_select_section\s*}}/gm,h(v($[x(574)],$.thumbnail))).replaceAll(/{{\s*fg_product_belongs_to_offer\s*}}/gm,$.belongs_to_offer).replaceAll(/{{\s*fg_variant_id\s*}}/gm,h(1===r?a.variant_shopify_id:"")).replaceAll(/{{\s*fg_add_to_cart\s*}}/gm,h(m(FGSECOMAPP[x(316)]?.[x(861)]??"Add to cart",x(995))))})[e(980)](" \n"),new Glider(document[e(709)](e(632)),{slidesToShow:1,slidesToScroll:1,draggable:!1,dots:FGSECOMAPP.fgAppearanceGiftSlider[e(656)]?".dots":null,arrows:{prev:".freegifts-main-container .glider-prev",next:".freegifts-main-container .glider-next"},responsive:[{breakpoint:1024,settings:{slidesToShow:FGSECOMAPP.fgAppearanceGiftSlider[e(440)]??4,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]}),document[e(343)](new CustomEvent(FGSECOMAPP[e(886)][e(786)],{detail:{addGiftToCartFunc:FGSECOMAPP[e(633)],gifts:$4(a)}})))},J=async()=>{let $=x;try{let t=window[$(800)]?.offers??[];for(let e in await $5(),FGSECOMAPP[$(386)])C(FGSECOMAPP[$(386)][e]?.id)&&delete FGSECOMAPP.productsByID[e];let a=[];t[$(647)](x=>{let t=$;try{let e=JSON[t(987)](JSON.stringify(x));if(x[t(646)].status){let i=x[t(472)][0].product_narrow,r=i[0].value,c=[...e[t(764)]],o=[...e.gift_products];if("variant"===x[t(646)].type)for(let s in r){let n=r[s]?.variant??[];for(let d of n){e[t(472)][0].product_narrow=[{type:i[0][t(314)],value:{[s]:{...r[s],variant:[{...d}]}}}],e[t(764)]=c.filter($=>$[t(370)]+""===s&&d.id===$.original_variant_shopify_id),e.gift_products=o[t(464)]($=>$.original_product_shopify_id+""===s),e[t(466)][0][t(574)]=[...e[t(764)]];let l=e[t(545)][t(502)],f=e[t(545)][t(891)];e.gift_settings.auto_add_all_gifts&&(l=e[t(764)].length),1===e.gift_items[t(758)]&&0===e[t(764)][0].price&&(f=!0),a[t(360)](JSON[t(987)](JSON[t(689)]({...e,gift_settings:{...e[t(545)],number_of_gift_can_receive:l,auto_add_all_gifts:f},id:e.id+"_"+r[s].handle+"_"+d.id,offer_root:""+e.id})))}}else if(x.gift_should_the_same.type===t(553))for(let _ in r){e.offer_conditions[0][t(595)]=[{type:i[0][t(314)],value:{[_]:r[_]}}],e[t(764)]=c[t(464)]($=>$.original_product_shopify_id+""===_),e.gift_products=o[t(464)]($=>$[t(370)]+""===_);let g=e.gift_settings[t(502)],u=e[t(545)][t(891)];e[t(545)][t(891)]&&(g=e[t(764)][t(758)]),1===e[t(764)][t(758)]&&0===e[t(764)][0].price&&(u=!0),a.push(JSON[t(987)](JSON.stringify({...e,gift_settings:{...e.gift_settings,number_of_gift_can_receive:g,auto_add_all_gifts:u},id:e.id+"_"+r[_][t(619)],offer_root:""+e.id})))}}}catch(p){console[t(849)](p)}}),t=(t=(t=t?.[$(464)](x=>!x?.[$(646)]?.[$(361)])?.[$(427)](a))?.map(x=>({...x,id:x.id.toString(),offer_root:(x[$(395)]??x.id).toString()})))?.[$(464)](x=>{let t=$;if(!$e(x[t(865)],x[t(544)]))return!1;let e=!C(x[t(593)]?.[t(751)]||x.sub_conditions?.[t(810)]);if(x[t(593)]&&(!Y(x,SECOMAPP)||e&&C(SECOMAPP[t(353)][t(782)])))return!1;let a={...FGSECOMAPP[t(386)]},i=!1;if(FGSECOMAPP[t(342)][t(890)]===t(610)){x.gift_items=x?.gift_items[t(464)]($=>{let x=t,e=a[$[x(370)]]?.[x(555)]??{};return e[$[x(991)]]>0})??[];let r=x.gift_items?.[t(753)]($=>$.variant_shopify_id);x[t(466)]=x?.[t(466)]?.filter($=>{let x=t;return $.variants=$?.[x(574)]?.filter($=>{let t=x;return r?.[t(999)]($[t(376)])}),$?.variants?.length>0}),i=!0}else if(FGSECOMAPP.fgSettings[t(590)]){x[t(764)]=x?.[t(764)].filter($=>{let x=t,e=a[$[x(559)]]?.[x(555)]??{};return e[$.variant_shopify_id]>0});let c=x[t(764)]?.[t(753)]($=>$[t(376)]);x[t(466)]=x?.gift_products?.[t(464)]($=>{let x=t;return $[x(574)]=$?.variants?.filter($=>{let t=x;return c?.[t(999)]($[t(376)])}),$?.[x(574)]?.[x(758)]>0}),i=!0}return i&&x.gift_settings?.[t(891)]&&(x[t(545)].number_of_gift_can_receive=x[t(764)]?.[t(758)]),!i||x[t(764)]&&x[t(764)][t(758)]>0});let i=FGSECOMAPP?.[$(342)]?.[$(481)]===$(957)?$(951):$(937),r=FGSECOMAPP.fgSettings?.[$(923)],c=r===$(957)?"original_compare_at_price":$(937);return t?.map(x=>{let t=$,e=x.gift_items[t(753)]($=>{let x=t;return $.cal_gift_price=C($[i])?$?.[x(937)]:$[i],r&&($[x(903)]=C($[c])?$?.original_price:$[c]),$.original_product_shopify_id});return x.gift_products=x[t(466)]?.[t(464)]($=>{let x=t;return $[x(574)]?.forEach($=>{let t=x;$.cal_gift_price=C($[i])?$?.[t(937)]:$[i],r&&($[t(903)]=C($[c])?$?.[t(937)]:$[c])}),e.includes($[x(370)])}),x.offer_conditions?.[t(647)]($=>{let x=t;$.unit===x(537)&&($.min_amount=O($[x(572)]),$[x(736)]=C($[x(736)])?$.max_amount:O($.max_amount))}),x})?.[$(428)]((x,t)=>x[$(313)]-t.priority)}catch(o){return console.error(o),[]}},Z=async()=>{let $=x;try{let t=[];window[$(800)]?.offers?.[$(647)](x=>{let e=$,a=[];x.gift_products[e(647)]($=>{let x=e;a[x(360)]($[x(493)],$[x(468)])}),t=[...t,...a]}),await $h(t=(t=[...new Set(t)])[$(464)](x=>C(FGSECOMAPP[$(681)][x]))),Object[$(413)](FGSECOMAPP[$(681)])?.[$(647)](x=>{let t=$,{info:e}=x;C(e)||C(e?.id)||(FGSECOMAPP[t(386)][e.id]={...e})})}catch(e){console[$(849)](e)}},$$=$=>{let t=x;try{C($)?(FGSECOMAPP[t(840)]=[],localStorage[t(723)]("sca_offers_added",LZString.compressToBase64(JSON.stringify(FGSECOMAPP[t(840)])))):FGSECOMAPP.arrOfferAdded=JSON[t(987)](LZString[t(691)](localStorage[t(552)](t(733))))}catch(e){FGSECOMAPP[t(840)]=[],localStorage[t(723)](t(733),LZString[t(668)](JSON.stringify(FGSECOMAPP[t(840)])))}let a={};FGSECOMAPP[t(562)]?.[t(647)]($=>{let x=t;a[$.id]=$?.gift_items?.[x(753)]($=>$[x(376)])});let i=Object.keys(a);FGSECOMAPP[t(840)]=FGSECOMAPP[t(840)]?.[t(464)]($=>i?.[t(999)]($[t(696)]?.[t(397)]())&&a[$.belongs_to_offer?.[t(397)]()][t(999)]($[t(584)]));let r={};FGSECOMAPP[t(840)]?.[t(647)]($=>{let x=t,e=r[$[x(696)]+"_"+$[x(584)]]??{};r[$[x(696)]+"_"+$[x(584)]]={...$,belongs_to_offer:$[x(696)]?.[x(397)](),quantity:(e?.[x(822)]??0)+($?.[x(822)]??0)}}),FGSECOMAPP[t(840)]=Object[t(413)](r),localStorage.setItem(t(733),LZString[t(668)](JSON.stringify(FGSECOMAPP[t(840)])))},$x=()=>{let $=x;FGSECOMAPP[$(415)]={cart_drawer_query:{tool:[$(406),I("sca_fg_cart_drawer_query")]},cart_icon_query:{default:[$(842)],tool:[$(960),I($(936))]},gift_icon_product_query:{default:[$(763)],integration:[".f-product-single__title, .m-product-title"],tool:[$(920),I($(627))]},gift_icon_collection_query:{default:[$(496),$(620)],integration:[$(444),$(811)],tool:[$(540),I($(796))]},gift_thumbnail_query:{default:[$(524)],integration:[".m-product-form--wrapper"],tool:[$(859),I("sca_fg_btn_gift_thumbnail_query")]},cart_message_query:{default:[$(950)],integration:[".icart-inner .icartContain, .rebuy-cart__flyout-body, #slidecarthq .slidecarthq",$(550),$(854),$(351),$(563)],tool:[$(932),I($(793))]},checkout_btn_query:{default:[$(925),"input[name='goto_gc'], button[name='goto_gc'], a[href$='checkout'], form[action='/checkout'] input[type='submit']",$(750),"input[value='Check Out'] a.checkout-link"],integration:[$(954),$(418)],tool:[$(617),I($(615))]}}},$0=async $=>{let t=x;document[t(343)](new CustomEvent(FGSECOMAPP[t(886)].START_RENDER_APP,{detail:{}})),$x(),A(),FGSECOMAPP[t(549)](),(FGSECOMAPP?.fgSettings?.[t(890)]==="stop_offer"||FGSECOMAPP?.fgSettings?.[t(590)])&&await Z(),FGSECOMAPP[t(562)]=await J(),FGSECOMAPP[t(752)](),r(),s(),$$($);let e=await z($,FGSECOMAPP.offers);await $a(e),$2(),$6(),$y(),$3(),document.dispatchEvent(new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS[t(839)],{detail:{}}))},$t=function(){let $=x,t=document.querySelectorAll($(410)),e=document.querySelectorAll($(874)),i=$(847),r=document[$(836)]("#fg-gift-items .btn-add-to-cart"),c=r.length;for(let o=0;o{let t=$;x.target===document[t(709)](t(638))&&(document.querySelector(t(638))[t(531)].remove(i),a())}),document[$(356)]($(423),x=>{let t=$;x[t(368)]===t(635)&&document[t(709)](t(638))&&(document[t(709)](t(638))[t(531)][t(864)](i),a())}),document[$(836)]("#fg-gift-items .dropdown")[$(647)](x=>x[$(356)]($(528),function(){let x=$;this[x(421)](x(682),1),this.focus(),this.classList[x(892)](x(740)),this[x(709)](x(774))[x(531)][x(892)](x(577))})),document[$(836)]($(591))[$(647)](x=>document.addEventListener($(528),function(t){let e=$,a=x[e(780)](t.target);a||(x[e(531)][e(864)](e(740)),x[e(709)](".dropdown-menu")[e(531)][e(864)](e(577))),document[e(836)](e(894))[e(647)]($=>{let x=e;$[x(443)]=!0,$[x(471)][x(922)]=x(431)})})),document[$(836)]($(505))[$(647)](x=>{let t=$;x[t(356)]("click",function(){let $=t,x=this.getAttribute("id"),e=this[$(516)]($(964)),a=this[$(516)]("data-price"),i=this.getAttribute($(677)),r=this[$(516)]("data-original-id"),c=this[$(669)][$(669)][$(669)][$(669)];c[$(709)](".product-item-thumbnail").setAttribute($(558),e);let o=new URL(c[$(709)](".gift-original-url")[$(341)]);o[$(986)][$(317)]($(896),r),c[$(709)]($(636))[$(341)]=o[$(397)]();let s=this[$(669)][$(669)].parentElement;s[$(709)]($(347))[$(889)]=i,s[$(709)](".gift-price").textContent=a;let n=s?.[$(709)]($(641));n.setAttribute($(942),x),n[$(443)]=!1,n.style="";let d=this.parentElement[$(669)][$(709)](".selected-variant");d[$(531)][$(914)]($(740)),d.innerHTML=this.innerText})}),document[$(836)]($(416))[$(647)](x=>x.addEventListener($(528),async function(){let x=$,t=this[x(516)](x(942))-0,e=this[x(516)](x(846));try{await _(t,1,e);let a=document[x(709)](x(638));a&&(FGSECOMAPP.isDelayShowAdded=!0,await new Promise($=>setTimeout($,800)),a[x(531)][x(864)](i)),window.location[x(341)][x(999)](x(731))?location[x(534)]():typeof Shopify?.[x(630)]===x(659)&&await Shopify?.getCart(0===FGSECOMAPP.fgCallback[x(758)]?function(){}:FGSECOMAPP[x(417)][0])}catch(r){console[x(849)](r)}}))},$e=($,t)=>{let e=x;if($){let a=new Date,i=a[e(381)](),r=new Date($)[e(381)]();if(!t)return i>=r;{let c=new Date(t)[e(381)]();return i>=r&&i<=c}}return!1},$a=async $=>{let t=x;$&&$[t(758)]>0&&(FGSECOMAPP[t(394)]?(await new Promise($=>setTimeout($,1500)),FGSECOMAPP[t(394)]=!1,y(),Q($)):(y(),Q($))),$t(),FGSECOMAPP.fetchCheckoutEvents(),FGSECOMAPP[t(461)](FGSECOMAPP[t(562)]),$o=[]},$i=async $=>{let t=x;$o=[];let e=new URL(window[t(757)][t(341)]);e[t(986)].set("sca_fetch_cart",""),i(e.toString())[t(628)]($=>$[t(605)]())[t(628)]($=>{let x=t,e=new DOMParser,a=e[x(607)]($,"text/html"),{cart_drawer_query:i,cart_icon_query:r}=FGSECOMAPP[x(415)],c=[...i?.tool].filter(Boolean)[x(980)](","),o=[...r?.[x(704)]].filter(Boolean)[x(980)](","),s=[...r?.[x(705)]][x(464)](Boolean)[x(980)](","),n=document[x(709)](c),d=!1;n&&(d=!0,n[x(712)]=a[x(709)](c)?.[x(712)]??n[x(712)]);let l=document.querySelector(o);l||(l=document.querySelector(s)),l&&(d=!0,l[x(712)]=a[x(709)](o)?.innerHTML??a[x(709)](s)?.[x(712)]??l[x(712)]),d||console.log(x(608))}),typeof FGSECOMAPP?.reRenderCartCustom===t(659)&&await FGSECOMAPP[t(513)](),document.dispatchEvent(new CustomEvent(FGSECOMAPP[t(886)].GIFT_UPDATED,{detail:{}})),p(t(788)),setTimeout(function(){$a($)},800)},$r=async $=>{let t=x,e=await i(t(993)+($??""),{method:"GET",headers:{Accept:t(348),"Content-Type":t(348)}})[t(628)]($=>$[t(501)]()),a=e.items;return FGSECOMAPP.SHOPIFY_CART=e,FGSECOMAPP[t(918)]=a?.[t(753)]($=>({...FGSECOMAPP.cartItems?.find(x=>x.id===$.id),...$}))??[],e},$c=async()=>{let $=x,t=FGSECOMAPP.SHOPIFY_CART;try{await i(SECOMAPP[$(438)],{method:$(686),headers:{"Content-Type":$(473)}})[$(628)](async x=>{let e=$,a=await x[e(501)]();FGSECOMAPP.cartItems=a?.cart?.[e(753)]($=>{let x=e;return{...FGSECOMAPP[x(918)]?.[x(934)](x=>x.id===$.id),...$[x(553)],collections:$.collections,tags:$[x(509)]}})??[],FGSECOMAPP[e(527)]=a?.[e(897)]??{},t=FGSECOMAPP[e(527)]})[$(927)](async x=>{console.error("failed to parse cart section "+x[$(667)]),t=await $r()})}catch(e){console[$(849)]($(845),e.message),t=await $r()}return t},$o=[],$s=async $=>{let t=x;try{$o[t(360)]($[0]),document[t(343)](new CustomEvent(FGSECOMAPP[t(886)][t(910)],{detail:{events:$o}})),await $c();let e=await z(FGSECOMAPP[t(918)],FGSECOMAPP.offers);FGSECOMAPP[t(461)](FGSECOMAPP[t(562)]);let a=!1;return $[0][t(745)](t(887))&&JSON[t(689)]($[1][t(599)]??[])[t(999)]("sca_add_gift")?(console[t(349)]("event add gift to cart from popup",[...$o]),await $i(e),a=!0):$[0][t(745)](t(781))&&JSON[t(689)]($[1][t(599)]??[])[t(999)](t(997))?(console[t(349)](t(322),[...$o]),await $i(e),a=!0):(console.log(t(713),[...$o]),await $a(e)),$v(),a&&(window[t(757)][t(341)][t(999)](t(731))||document[t(709)](t(718))?.[t(516)](t(465))===t(905))&&($o=[],location[t(534)]()),document.dispatchEvent(new CustomEvent(FGSECOMAPP[t(886)][t(902)],{detail:{events:$o}})),FGSECOMAPP[t(918)]}catch(i){console.error(i)}},$n=()=>{let $=x;if(!Shopify?.[$(959)])return;let t=document[$(709)]($(792));if(!t)return;t[$(712)]="";let e=Shopify?.[$(529)]??$(699),a=document[$(871)]("li");a[$(485)]=$(674),a[$(712)]=$(598)+e+$(797),t[$(393)](a),a.timeoutId=setTimeout(()=>$d(a),3e3),document.querySelector($(414))?.addEventListener($(528),()=>$d(a))},$d=$=>{let t=x;$[t(531)][t(914)](t(821)),$.timeoutId&&clearTimeout($[t(503)]),setTimeout(()=>$.remove(),500)},$l=$=>{let t=x;try{let e=FGSECOMAPP[t(342)]?.[t(426)],a=e===t(499)?$.target:$.currentTarget??$[t(817)];a?.hasAttribute(t(404))||(a=document[t(709)](t(979))?.[t(972)]);let i=JSON[t(987)](a.getAttribute(t(448)));if(a[t(901)]=i?.[t(901)]??"",a[t(712)]=i?.innerHTML??"",a[t(443)]=!1,a[t(624)](t(528),$f),a[t(779)](t(404)),e===t(907)){a[t(972)].querySelector(t(616))[t(528)]();return}e===t(499)&&window.removeEventListener("click",$8,!0),a[t(528)]()}catch(r){window.location[t(911)]((Shopify?.[t(613)]?.[t(804)]??"/")+t(492)),console.error(r[t(667)])}};FGSECOMAPP[x(367)]=async($,t)=>{let e=x;if($===e(983)&&t)t[e(443)]=!0,t[e(421)](e(448),JSON[e(689)]({innerHTML:t.innerHTML,value:t[e(901)]})),"function"==typeof FGSECOMAPP?.[e(693)]?await FGSECOMAPP[e(693)]($):(t[e(901)]=Shopify?.[e(604)]??e(377),t[e(712)]=Shopify?.[e(717)]??e(785));else if($===e(788)&&t){if("function"==typeof FGSECOMAPP?.[e(693)])await FGSECOMAPP[e(693)]($);else{let a=JSON[e(987)](t[e(516)](e(448)));t[e(901)]=a?.[e(901)]??"",t.innerHTML=a?.[e(712)]??""}t.disabled=!1}else $===e(849)?(typeof FGSECOMAPP?.[e(693)]===e(659)&&await FGSECOMAPP[e(693)]($),window[e(757)].replace((Shopify?.[e(613)]?.[e(804)]??"/")+e(492))):console[e(849)]("Cannot define custom loading with type: ",$)};let $f=async $=>{let t=x;try{$[t(921)](),$[t(835)](),$.stopImmediatePropagation();let e=FGSECOMAPP[t(342)]?.mode_override_checkout,a=e===t(499)?$[t(817)]:$[t(716)]??$[t(817)],{form:r}=a;if(await FGSECOMAPP[t(367)](t(983),a),document[t(343)](new CustomEvent(FGSECOMAPP[t(886)][t(408)],{detail:{}})),FGSECOMAPP[t(463)])return!1;FGSECOMAPP.checkIsBlockCheckout=!0;try{if(!Shopify?.[t(989)]){let c=new URL(r[t(511)]);c.searchParams[t(548)](t(930),""),await i(c[t(397)](),{method:t(770),body:new FormData(r)})}}catch(o){console[t(349)](t(895))}if(C(FGSECOMAPP[t(562)])&&C(FGSECOMAPP.cartItems?.[t(934)]($=>g($))))return console.log(t(571)),$l($),!1;await $c();let s=[...FGSECOMAPP[t(918)]],{arrGiftsRemove:n}=j(s,FGSECOMAPP[t(562)],!1);if(await z(s,FGSECOMAPP[t(562)]),n?.length>0)location[t(534)]();else try{FGSECOMAPP.fgSettings[t(789)]&&!C(FGSECOMAPP[t(918)]?.find($=>g($)))?await i(SECOMAPP[t(438)]+t(336)+Shopify?.shop,{method:"GET",headers:{"Content-Type":"application/liquid"}})[t(628)](async $=>{let x=t,e=await $[x(501)]();e.cart=(e[x(455)]??[])[x(753)]($=>{let t=x;return $[t(553)][t(739)]=$[t(739)]?.[t(753)]($=>({id:$.id})),$[t(553)][t(509)]=$.tags,{id:$[t(553)].id,variant_id:$[t(553)][t(372)],title:$[t(553)][t(432)],handle:$.product.handle,price:D($[t(553)]),quantity:$[t(553)][t(822)],product_type:$[t(553)][t(570)],vendor:$[t(553)][t(741)],tags:$[t(553)].tags,collections:$[t(553)][t(739)],selling_plan_allocation:$[t(553)][t(671)]}}),e[x(661)]={arr_offer_added:FGSECOMAPP.arrOfferAdded,secomapp:{customer:SECOMAPP?.[x(353)]??{},fg_codes:SECOMAPP?.[x(357)]??[],fgSettings:FGSECOMAPP[x(342)]},cookie_fg_code:B(x(374)),shopify_currency:Shopify?.[x(506)]},await i(SECOMAPP[x(438)]+x(744)+LZString.compressToEncodedURIComponent(e=JSON[x(689)](e)),{method:x(686),headers:{"Content-Type":"application/liquid"}}).then(async $=>{let t=x,e=await $[t(501)]();try{FGSECOMAPP[t(463)]=!1,e[t(476)]&&(window.location[t(341)]=e[t(476)][t(321)])}catch(a){console.error(a)}})}):(console.log(t(560)),FGSECOMAPP[t(463)]=!1,$l($))}catch(d){FGSECOMAPP[t(463)]=!1,$l(d)}await FGSECOMAPP[t(367)](t(788),a="trigger_body"===e?$[t(817)]:$[t(716)]??$[t(817)]),document[t(343)](new CustomEvent(FGSECOMAPP[t(886)][t(557)],{detail:{status:t(962)}}))}catch(l){await FGSECOMAPP.customLoadingCheckout(t(849)),document[t(343)](new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS.END_VALIDATE_CHECKOUT,{detail:{status:"error"}})),console[t(849)](l)}},$8=async $=>{let t=x;$[t(817)]?.[t(819)]("sca_handle_checkout")&&await $f($)},$_=()=>{let $=x,t=FGSECOMAPP[$(342)]?.[$(426)],{checkout_btn_query:e}=FGSECOMAPP.QUERY_SELECTOR,a=[...e?.[$(704)],...e?.[$(714)],...e?.default].filter(Boolean).join(",");document.querySelectorAll(a)[$(647)](x=>{let e=$,a=x[e(819)](e(973)),i=x.hasAttribute("sca_clone_checkout"),r=x.hasAttribute(e(404));if(t===e(907)){if(a)return;if(!i&&!r){let c=x.cloneNode(!0);c[e(356)]("click",$f),c[e(421)]("sca_handle_checkout",""),c.setAttribute(e(762),""),x[e(471)].display=e(634),x[e(471)][e(600)]=e(497),x[e(471)][e(720)]="0",x[e(421)](e(973),""),x.parentNode?.[e(393)](c)}i&&!r&&(x[e(356)](e(528),$f),x.setAttribute(e(404),""))}else"trigger_body"===t?x[e(421)](e(404),""):r||(x.addEventListener(e(528),$f),x.setAttribute(e(404),""));FGSECOMAPP[e(852)]=!0}),"trigger_body"===t&&window[$(356)]($(528),$8,!0)};FGSECOMAPP[x(549)]=()=>{FGSECOMAPP.scaCountRenderEventCheckout=0;let $=setInterval(()=>{let x=_0x36b7;$_(),FGSECOMAPP[x(728)]++,(FGSECOMAPP[x(728)]>10||FGSECOMAPP[x(852)])&&(FGSECOMAPP.scaCountRenderEventCheckout=0,clearInterval($))},400)};let $1=$=>{let t=x;try{let e={},a={},i=FGSECOMAPP.offers;if(C($)){$=[],C(Shopify?.current_product)||$.push({...Shopify?.[t(970)]});let r={...Shopify?.[t(695)],...Shopify?.[t(688)]?.[t(379)]};Object[t(413)](FGSECOMAPP[t(681)])?.filter($=>!C($[t(494)])&&(C($?.[t(904)])||$?.product_has_icon&&!$?.[t(725)]?.[t(419)]($=>$?.[t(531)]?.[t(780)]("sca-gift-icon-collection-page"))))?.forEach($=>{let x=t;r[$[x(494)].id]={...$.info}}),$=$[t(427)]([...Object[t(413)](r)])}$?.[t(647)]($=>{let x=t,e=FGSECOMAPP[x(681)][$[x(619)]];FGSECOMAPP.productsInPage[$[x(619)]]={...e,info:{...$},product_has_icon:!!C(i)&&void 0}});let c=FGSECOMAPP[t(342)]?.[t(923)];for(let o in i?.[t(647)](x=>{let i=t,r=x[i(472)];if(1===r[i(758)]&&"number_of_products"===r[0][i(917)]&&typeof r[0].is_multiply===i(808)){let o,s=r[0].product_narrow;s?.[i(647)](x=>{let t=i;switch(x[t(314)]){case t(547):o=Object[t(413)](x[t(901)]);break;case t(877):let e=Object.keys(x.value);e[t(758)]>0&&(o=(void 0===o?$:o)?.filter($=>e[t(999)]($[t(314)]))??[]);break;case t(606):let a=Object[t(809)](x[t(901)]);a[t(758)]>0&&(o=(void 0===o?$:o)?.[t(464)]($=>a.includes($.vendor))??[]);break;case"product_collections":let r=Object.keys(x.value);r[t(758)]>0&&(o=(void 0===o?$:o)?.filter($=>{let x=t,e=$[x(739)]?.[x(753)]($=>$.id+""),a=e?.filter($=>r[x(999)]($));return!C(a)})??[])}}),o?.[i(647)]($=>{let t=i,r=$.handle,o=JSON[t(987)](JSON.stringify(x[t(466)])),s=FGSECOMAPP[t(681)][r]?.[t(494)]??{};if(FGSECOMAPP[t(342)]?.not_show_gift_if_already_on_cart&&(o=o.filter($=>$[t(370)]!==s?.id)),c&&(o=o[t(464)]($=>{let x=t;return $[x(574)][x(535)]($=>$?.compare_gift_price<=s?.[x(963)]/100)}),C(o)))return;if(e[r]){let n=e[r];o?.[t(647)]($=>{let e=t,a=n[e(934)](x=>x.original_product_shopify_id===$.original_product_shopify_id);if(C(a)){n.push({...$,belongs_to_offer:[x[e(395)]]});return}let i=$[e(574)][e(753)]($=>$.original_variant_shopify_id);a.belongs_to_offer?.[e(999)](x[e(395)])||a[e(696)]?.[e(360)](x.offer_root),a[e(574)]=a?.[e(574)]?.filter($=>!i.includes($[e(991)]))??[],a[e(574)]=[...a[e(574)],...$.variants]}),e[r]=n}else e[r]=o?.[t(753)]($=>({...$,belongs_to_offer:[x.offer_root]}));let d=($[t(574)]??$.variant)?.[t(753)]($=>$.id)??[];a[r]={},FGSECOMAPP[t(681)][r]?.info?.variants?.filter($=>d[t(999)]($.id))?.[t(647)]($=>{let x=t;a[r][$.id]=o[x(464)](t=>{let e=x,a=t.variants;return c&&(a=a[e(464)](x=>x?.compare_gift_price<=$[e(732)]/100)),!C(a)})})})}}),e){let s=FGSECOMAPP[t(681)][o];FGSECOMAPP.productsInPage[o]={...s,gifts_will_receive:[...e[o]],product_has_icon:!0,variants_has_gift:{...a[o]}}}return Object[t(354)](e)?.[t(758)]?e:{}}catch(n){return console.error(n),null}},$g=$=>{let e=x,a=FGSECOMAPP[e(985)][e(585)]??{};if(!a[e(977)]?.[e(361)])return!1;let i=document.querySelector(t[e(345)])?.[e(712)]??t[e(401)],r=$?.[e(753)]($=>i[e(460)](/{{\s*fg_product_handle\s*}}/gm,h(w($[e(370)],$[e(468)]),!0)).replaceAll(/{{\s*fg_product_img\s*}}/gm,h(K($[e(702)]),!0))[e(460)](/{{\s*fg_product_img_alt\s*}}/gm,h(S($[e(370)],$[e(432)])))).join(""),c=document[e(709)](t.GIFT_THUMBNAIL_SECTION_ID)?.innerHTML??t[e(335)],o=c[e(460)](/{{\s*fg_gift_thumbnail_title\s*}}/gm,h(m(a[e(977)]?.[e(432)]??"Free Gift",e(565)))).replaceAll(/{{\s*sca_fg_gift_thumbnail_items_section\s*}}/gm,r)[e(460)](/{{\s*fg_check_show_narrow\s*}}/gm,$?.[e(758)]>=4?"":e(678)),{gift_thumbnail_query:s}=FGSECOMAPP.QUERY_SELECTOR??{},n=[...s?.tool][e(464)](Boolean)[e(980)](","),d=[...s?.[e(714)],...s?.[e(705)]][e(464)](Boolean)[e(980)](",");e(707);let l=document.querySelector(n)??document[e(709)](d);if(!l)return;l[e(972)][e(471)][e(988)]="100%",l[e(972)][e(471)][e(683)]=e(978),l[e(972)]?.[e(485)]?.[e(999)](e(834))||l[e(972)]?.[e(531)]?.add("sca-fg-form-thumbnail-product-page");let f=l[e(972)][e(709)](e(955));if(f)f[e(712)]=o;else{(f=document[e(871)]("div"))[e(421)]("id","sca-gift-thumbnail");let _=new DOMParser()[e(607)](o,e(867));f.innerHTML=_[e(581)][e(712)],l[e(972)][e(520)](f,l)}l[e(972)][e(520)](f,l);let g=document[e(709)]("#fg-gift-thumbnail-title");if(g)switch(a[e(977)]?.size){case"32":g[e(471)][e(898)]=e(539);break;case"50":g[e(471)][e(898)]=e(405);break;case e(679):g[e(471)].maxWidth=e(998);break;case e(451):g[e(471)].maxWidth=e(433);break;case e(866):g.style.maxWidth="100%";break;default:g[e(471)][e(898)]=e(405)}if($?.length>=(Shopify?.[e(390)]??4))new Glider(document[e(709)](e(948)),{slidesToShow:(Shopify?.[e(390)]??4)-1,slidesToScroll:1,draggable:!0,dots:e(578),arrows:{prev:"#fg-gift-thumbnail-title .glider-prev",next:e(813)}});else{g&&(g[e(471)].maxWidth=e(592));let u=document[e(709)](e(948));u&&(u[e(471)][e(715)]=e(771))}return $},$u=()=>{let $=x;if(!(FGSECOMAPP[$(985)][$(585)]??{})[$(536)]?.[$(361)])return!1;let e=document.querySelector(t[$(823)])?.[$(712)]??t[$(352)],a=e[$(460)](/{{\s*fg_gift_icon\s*}}/gm,FGSECOMAPP.fgAppearanceGiftIcon.gift_icon_path)[$(460)](/{{\s*fg_gift_icon_alt\s*}}/gm,$(389))[$(460)](/{{\s*fg_class_product_or_collection_page\s*}}/gm,"sca-gift-icon-img"),{gift_icon_product_query:i}=FGSECOMAPP[$(415)],r=[...i?.[$(704)]][$(464)](Boolean)[$(980)](","),c=[...i?.[$(705)],...i?.[$(714)]].filter(Boolean)[$(980)](","),o=document[$(709)](r)??document.querySelector(c);if(!o)return;o[$(471)].position=$(380),o[$(471)][$(988)]=$(694),o[$(485)]?.includes($(784))||o[$(531)]?.[$(914)]($(784));let s=o[$(709)]($(337));if(s)s[$(712)]=a;else{(s=document[$(871)]($(488))).setAttribute("id",$(945));let n=new DOMParser()[$(607)](a,$(867));s[$(712)]=n[$(581)][$(712)],o[$(393)](s)}return FGSECOMAPP[$(985)].gift_icon_path},$p=()=>{let $=x,t=[],{gift_icon_collection_query:e}=FGSECOMAPP[$(415)],a=[...e?.[$(704)],...e?.[$(714)],...e?.[$(705)]][$(464)](Boolean)[$(980)](",");return document[$(836)](a).forEach(x=>{let e=$,a=x[e(709)]('a[href*="/products/"]'),i=a?.[e(516)](e(341))?.[e(879)]("/")??[],r=i?.indexOf(e(379)),c=r>=0?i[r+1]??null:null;if(c=c?.[e(879)]("?")?.shift(),g(c)){x[e(864)]();return}let o=x[e(709)](e(768));if(o){x[e(864)]();return}if(C(c))return;let s=decodeURI(c);C(FGSECOMAPP[e(681)][s]?.[e(494)])&&t[e(360)](s);let n=(FGSECOMAPP[e(681)][s]?.positions??[]).filter($=>!x[e(358)]($));n[e(360)](x),FGSECOMAPP[e(681)][s]={...FGSECOMAPP[e(681)][s],positions:[...n]}}),t},$b=$=>{let e=x;Object[e(809)]($)?.forEach($=>{let x=e,a=FGSECOMAPP.productsInPage[$]?.[x(725)]??[];if(C(a)||!Array[x(650)](a))return;if(!(FGSECOMAPP[x(985)][x(791)]??{})[x(361)])return;let i=document[x(709)](t[x(823)])?.[x(712)]??t[x(352)],r=i.replaceAll(/{{\s*fg_gift_icon\s*}}/gm,FGSECOMAPP[x(985)][x(738)])[x(460)](/{{\s*fg_gift_icon_alt\s*}}/gm,x(389))[x(460)](/{{\s*fg_class_product_or_collection_page\s*}}/gm,x(375));a[x(647)]($=>{let t=x;$[t(471)][t(561)]="relative",$[t(485)]?.includes(t(596))||$[t(531)]?.add("sca-fg-icon-collection-page");let e=$.querySelector(t(484));if(e)e[t(712)]=r;else{(e=document.createElement(t(488))).setAttribute(t(412),t(644));let a=new DOMParser()[t(607)](r,t(867));e[t(712)]=a.body[t(712)],$[t(393)](e)}})})},$m=async $=>{let t=x;await i(SECOMAPP.freegiftProxy+"&sca_products_handle="+LZString.compressToEncodedURIComponent(JSON[t(689)]($)),{method:t(686),headers:{"Content-Type":"application/liquid"}})[t(628)](async $=>{let x=t,e=await $.json(),a=[];e?.[x(379)]?.[x(647)]($=>{let t=x;C($?.[t(379)]?.id)||a[t(360)]({...$[t(379)],collections:$.collections,variants_quantity:$.variants_quantity})});let i=$1(a);$b(i)})[t(927)]($=>{console[t(849)]($)})},$h=async $=>{let t=x,e=[];for(let[a,i]of $[t(354)]())C(FGSECOMAPP[t(681)][i]?.info)&&e[t(360)](i),20===e[t(758)]&&(await $m([...e]),e=[]),a===$[t(758)]-1&&e[t(758)]>0&&(await $m([...e]),e=[])},$3=()=>{let $=$p(),t=$1();$b(t),$h($)[x(628)]()},$6=()=>{let $=x;Shopify?.[$(475)]&&document.addEventListener($(614),function(){let x=$,t=new URL(document[x(876)]),e=parseInt(t[x(986)][x(684)]("variant"));$y(isNaN(e)?void 0:e)})},$y=$=>{let t=x;if(!location[t(341)][t(999)](t(676)))return;document.querySelector(t(337))?.remove(),document.querySelector("#sca-gift-thumbnail")?.[t(864)]();let e=$1();if(C(e))return;let a=location[t(853)][t(879)]("/"),i=a?.[t(850)](t(379)),r=decodeURI(i>=0?a[i+1]??null:null);if(!Object[t(809)](e)?.[t(999)](r))return;let c=e[r],o=FGSECOMAPP[t(681)][r]?.variants_has_gift??{},s=Object[t(809)](o),n=!0;Shopify?.[t(475)]&&(C($)||s[t(999)](""+$)||(n=!1),!C($)||C(Shopify?.[t(970)]?.[t(331)])||s[t(999)](Shopify?.[t(970)]?.[t(331)]?.id?.[t(397)]())||(n=!1),c=o[$??Shopify?.current_product?.current_variant?.id]??[]),document.dispatchEvent(new CustomEvent(FGSECOMAPP[t(886)][t(869)],{detail:{icon:FGSECOMAPP[t(985)].gift_icon_path,gifts:$4(c),product:{handle:r,variant:$??Shopify?.[t(970)]?.[t(331)]?.id}}})),n&&($g(c),$u(c))};FGSECOMAPP[x(461)]=$=>{let e=x;try{if(!FGSECOMAPP[e(692)][e(573)])return;C($)&&($=[...FGSECOMAPP.offers]);let a=location[e(341)][e(999)](e(731)),i=[];if($?.[e(647)]($=>{let x=e;$[x(721)]||C($[x(568)])||!C(FGSECOMAPP[x(663)])&&!$[x(721)]&&$[x(313)]>FGSECOMAPP[x(663)]||C(($[x(323)]??0)+($.count_down_quantity??0))&&/({{sca_min_total}})|({{sca_min_quantity}})/gm[x(480)]($[x(568)])||i[x(360)]({value:$[x(568)][x(460)](x(637),$[x(323)]?.[x(328)](Shopify?.[x(746)]??2)).replaceAll("{{sca_min_quantity}}",$.count_down_quantity),offer_root:$.offer_root})}),document[e(343)](new CustomEvent(FGSECOMAPP[e(886)][e(981)],{detail:{data:i}})),C(i)){document.querySelectorAll(".sca-promotion-message-layout")[e(647)]($=>$[e(712)]="");return}let r=document[e(709)](t[e(882)])?.[e(712)]??t.CART_MSG_ITEM_SECTION,c=i[e(753)]($=>r[e(460)](/{{\s*fg_cart_message\s*}}/gm,h(m($.value,e(439)+$.offer_root))))[e(980)](""),o=document[e(709)](t[e(856)])?.[e(712)]??t[e(772)],s=o[e(460)](/{{\s*sca_fg_cart_message_items_section\s*}}/gm,c),{cart_message_query:n}=FGSECOMAPP[e(415)],d=document[e(709)]([...n?.default][e(464)](Boolean)[e(980)](",")),l=document[e(836)]([...n?.tool,...n?.integration][e(464)](Boolean)[e(980)](",")),f=document[e(836)](e(803));C(f)||f[e(647)]($=>$.innerHTML=s),(f=document[e(871)](e(488)))[e(421)]("id",e(652)),f[e(531)][e(914)](e(652));let _=new DOMParser().parseFromString(s,e(867));f[e(712)]=_[e(581)][e(712)],C(l)||l?.[e(647)]($=>{let x=e;if($[x(709)](x(803)))return;let t=f[x(976)](!0);$[x(424)](t)}),!d?.querySelector(".sca-promotion-message-layout")&&(_=new DOMParser()[e(607)](s,"text/html"),f.innerHTML=_.body[e(712)],d&&a&&d[e(424)](f));try{document[e(836)](e(990))[e(647)]($=>{let x=new Glider($);(($,x)=>{let t=_0x36b7,e=$[t(743)].childElementCount,a=null,i=1;function r(){a=setTimeout(()=>{let x=_0x36b7;i>=e&&(i=0),$[x(470)](i++)},x)}$.ele[t(356)](t(359),function(){window[t(409)](a),r()}),r()})(x,Shopify?.[e(442)]??3e3)})}catch(g){console.error(g)}}catch(u){console.error(u)}};let $5=async()=>{let $=x;try{let t=await i("https://geoip.secomtech.com/?json"),e=await t.json();FGSECOMAPP[$(564)]=e?.country_code}catch(a){console[$(349)]("Failed to get customer location")}},$4=($,x)=>$?.map($=>{let t=_0x36b7;return{id:$.product_shopify_id,title:S($[t(370)],$[t(432)]),handle:$[t(468)],thumbnail:$[t(702)],belongs_to_offer:$[t(696)]??""+x,variants:$[t(574)][t(753)]($=>{let x=t;return{id:$[x(376)],title:$[x(489)],price:O($[x(732)]),original_price:O($[x(937)]),thumbnail:$[x(702)],discount_type:$[x(402)],discount_value:$[x(814)]}})}})??[],$2=()=>{let $=x;if(!FGSECOMAPP[$(462)]?.[$(838)]?.[$(929)]||!FGSECOMAPP.offers[$(758)])return;let e=document.querySelector($(603)),a=document[$(709)]("#sca-fg-today-offer-iframe");if(!e||!a)return;let i=document.querySelector(t[$(844)])?.innerHTML??t[$(546)],r=document[$(709)](t[$(843)])?.[$(712)]??t[$(710)],c=document.querySelector(t[$(766)])?.[$(712)]??t[$(445)],o={};FGSECOMAPP[$(562)][$(647)](x=>{let t=$;o[x[t(395)]]=x});let s=Object[$(413)](o);s.sort((x,t)=>{let e=$;return new Date(x[e(865)])-new Date(t[e(865)])}),e[$(712)]=c.replaceAll(/{{\s*sca_fg_today_offer_widget\s*}}/gm,h(FGSECOMAPP[$(462)][$(820)])),"bottom_left"===FGSECOMAPP.fgAppearanceTodayOffer?.widget_info[$(436)]&&(e[$(531)][$(914)]("sca-today-offer-widget-left"),a[$(531)].add($(961))),FGSECOMAPP.fgAppearanceTodayOffer?.[$(838)][$(436)]===$(776)&&(e[$(531)][$(914)]($(880)),a[$(531)].add($(795))),a[$(712)]=i[$(460)](/{{\s*sca_fg_today_offer_title\s*}}/gm,h(m(FGSECOMAPP[$(462)][$(838)][$(841)]??"TODAY OFFER","customize.widget_title")))[$(460)](/{{\s*sca_fg_today_offer_subtitle\s*}}/gm,h(m(FGSECOMAPP[$(462)][$(838)][$(382)]??$(829),"customize.widget_subtitle"))),document.querySelector($(926)).innerHTML=s[$(753)](x=>r.replaceAll(/{{\s*sca_fg_offer_id\s*}}/gm,h(x[$(395)]))[$(460)](/{{\s*sca_fg_offer_title\s*}}/gm,h(m(x[$(807)],$(498)+x[$(395)])))[$(460)](/{{\s*sca_fg_offer_title_tooltip\s*}}/gm,h(m(x[$(807)],$(498)+x[$(395)])))[$(460)](/{{\s*sca_fg_offer_img\s*}}/gm,h(x[$(466)][0][$(702)],!0)))[$(980)]("\n"),document[$(709)]($(344))[$(712)]=s[$(758)][$(397)](),document[$(709)]($(996)).addEventListener($(528),()=>{let x=$,t=document.querySelector(x(474));t?.[x(531)][x(892)](x(318))}),document.querySelector($(603))[$(356)]($(528),()=>{let x=$,t=document[x(709)]("#sca-fg-today-offer-iframe");t?.[x(531)][x(892)](x(318))}),document.dispatchEvent(new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS.RENDER_TODAY_OFFER,{detail:{todayOffers:s.map(x=>{let t=$,e=fgData[t(562)][t(934)]($=>$.id[t(397)]()===x[t(395)]);return{id:""+e.id,title:m(x[t(807)],t(498)+x[t(395)]),gifts:$4(e.gift_products,e.id),success:x[t(721)]??!1}})}})),$v();let n=(x,t,e)=>{let a=$,i=document[a(871)]("p");i[a(485)]=a(515),i[a(889)]=x,document[a(581)][a(393)](i),i.style[a(967)]=e+"px",i.style.left=t+"px",i[a(471)][a(715)]=a(968)},d=()=>{let x=$,t=document[x(709)](x(737));t&&t[x(972)].removeChild(t)},l=x=>{let t=$,e=document[t(709)](".sca-fg-tooltip");e&&(e.style[t(967)]=x.pageY+"px",e.style.left=x.pageX+5+"px")},f=document[$(836)]($(952));f[$(647)](function(x){let t=$;x[t(356)](t(812),function($){let e=t,a=x[e(516)](e(514));n(a,$[e(649)]+5,$[e(966)]+5)}),x[t(356)](t(371),function(){d()}),x.addEventListener(t(938),l)})},$v=()=>{let $=x,t=[...new Set(FGSECOMAPP[$(562)]?.[$(464)]($=>$.isReachConditions)?.[$(753)]($=>$.offer_root))];document[$(343)](new CustomEvent(FGSECOMAPP[$(886)][$(362)],{detail:{idOffersSuccess:t}}));let e=document[$(836)]($(642));e[$(647)](x=>{let e=$;t.includes(x.getAttribute(e(518)))?x[e(531)][e(914)](e(609)):x[e(531)].remove(e(609))})},$7=function(){let $=x;try{document[$(356)](FGSECOMAPP[$(886)][$(425)],async()=>{let x=$;try{window[x(881)]&&(unicart[x(343)](x(407)),console[x(349)](x(755)))}catch(t){console[x(849)](x(755),t)}try{window.prepareDataForDisplayWidgetByRule&&(await window[x(698)](),console[x(349)](x(965)))}catch(e){console.error("iCart",e)}try{window[x(612)]?.Cart?.[x(724)]&&window[x(612)][x(783)][x(724)]()}catch(a){console[x(849)]("Rebuy",a)}try{window[x(580)]&&(await $r(x(939))[x(628)]($=>{window.SLIDECART_UPDATE($),window[x(816)]()}),console[x(349)](x(575)))}catch(i){console[x(849)]("SLIDECART - HQ",i)}try{let r=document.querySelector("#upCartStickyButton .upcart-sticky-cart-quantity-icon-text");window[x(664)]&&(await window.upcartRegisterAddToCart(),console[x(349)](x(325)),r&&(r.innerHTML=FGSECOMAPP?.[x(527)]?.[x(346)]??0))}catch(c){console[x(849)](x(325),c)}try{window.STICKY_CART_UPDATE&&(await window[x(971)](),window[x(969)](),console.log(x(749)))}catch(o){console[x(849)](x(749),o)}try{window?.[x(469)]?.[x(703)]?.[x(339)]?.[x(888)]&&(await window[x(469)].Widgets[x(339)][x(888)](),console.log(x(350)))}catch(s){console[x(849)](x(350),s)}try{window[x(530)]&&(await window[x(530)](),window.openCart(),console.log("Monster Cart"))}catch(n){console.error(x(919),n)}try{window[x(870)]&&await (window[x(870)](),window[x(434)](),console[x(349)]("Slide Cart - Heysenior"))}catch(d){console[x(849)](x(919),d)}try{let l=document[x(709)](x(949)),f=document.querySelector("drawer-component#Drawer-Cart cart-drawer");window[x(935)]&&l&&(await l?.[x(831)](!window[x(589)]?.hasDiscount),l?.[x(928)]()),window.FoxTheme&&f&&(await f?.[x(366)](),f?.cartDrawer?.[x(399)]())}catch(_){console[x(849)](x(643),_)}try{window[x(611)]&&await (CartJS?.getCart(),console.log(x(327)))}catch(g){console[x(849)](x(327),g)}}),window.addEventListener($(893),function(x){let t=$;FGSECOMAPP[t(461)](),FGSECOMAPP[t(549)]()}),document[$(356)]("rebuy:smartcart.show",x=>{FGSECOMAPP.renderPromotionMessage(),FGSECOMAPP[$(549)]()}),window[$(631)]=function(){let x=$;FGSECOMAPP[x(461)](),FGSECOMAPP[x(549)]()},window[$(885)]=()=>{let x=$;FGSECOMAPP[x(461)](),FGSECOMAPP[x(549)]()},window[$(594)]?.[$(621)]&&window[$(594)][$(621)](window.MinimogTheme?.[$(396)]?.openCartDrawer??$(487),function(){FGSECOMAPP[$(461)](),FGSECOMAPP.fetchCheckoutEvents()}),document[$(356)](FGSECOMAPP[$(886)][$(786)],()=>{let x=$;try{typeof window[x(338)]===x(659)&&window.HS_SLIDE_CART_CLOSE(),typeof window[x(818)]===x(659)&&window[x(818)](),typeof window[x(645)]===x(659)&&window.SLIDECART_CLOSE(),document[x(709)](x(521))?.[x(528)]()}catch(t){console[x(849)](t)}}),document.addEventListener(FGSECOMAPP.CUSTOM_EVENTS[$(787)],()=>{let x=$;try{!document[x(709)](x(478))&&window[x(664)]&&window[x(664)]()}catch(t){console[x(849)](t)}})}catch(t){console.error(t)}};$0(FGSECOMAPP[x(918)])[x(628)](()=>{$7()})}();