window.fgData={"offers":[{"id":17841,"shop_id":6469,"offer_name":"Free Tumbler with purchase of $100 or more!","offer_description":null,"promotion_message":null,"start_time":"2023-11-24T05:55:00.000000Z","end_time":"2023-11-28T05:59:00.000000Z","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":true,"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 PMA Tumbler (100% off)","original_product_handle":"pma-tumbler","clone_product_handle":"pma-tumbler-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0736\/5227\/3454\/products\/black-pma-mug.jpg?v=1688772848","product_shopify_id":8907918901550,"original_product_shopify_id":8443060519214,"variants":[{"id":105502,"gift_product_id":41857,"discount_type":"percentage","discount_value":100,"original_price":24.99,"original_compare_at_price":null,"original_product_shopify_id":8443060519214,"original_variant_shopify_id":45695149703470,"price":0,"product_shopify_id":8907918901550,"variant_shopify_id":47536022356270,"variant_title":"Black","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0736\/5227\/3454\/products\/black-pma-mug.jpg?v=1688772848","pivot":{"offer_id":17841,"gift_item_id":105502},"gift_product":{"id":41857,"shop_id":6469,"title":"\u00bb PMA Tumbler (100% off)","original_product_handle":"pma-tumbler","clone_product_handle":"pma-tumbler-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0736\/5227\/3454\/products\/black-pma-mug.jpg?v=1688772848","product_shopify_id":8907918901550,"original_product_shopify_id":8443060519214,"created_at":"2023-11-21T21:27:12.000000Z","updated_at":"2023-11-21T21:27:12.000000Z"}},{"id":105503,"gift_product_id":41857,"discount_type":"percentage","discount_value":100,"original_price":24.99,"original_compare_at_price":null,"original_product_shopify_id":8443060519214,"original_variant_shopify_id":45695149736238,"price":0,"product_shopify_id":8907918901550,"variant_shopify_id":47536022421806,"variant_title":"Red","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0736\/5227\/3454\/products\/red-pma-mug.jpg?v=1688774678","pivot":{"offer_id":17841,"gift_item_id":105503},"gift_product":{"id":41857,"shop_id":6469,"title":"\u00bb PMA Tumbler (100% off)","original_product_handle":"pma-tumbler","clone_product_handle":"pma-tumbler-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0736\/5227\/3454\/products\/black-pma-mug.jpg?v=1688772848","product_shopify_id":8907918901550,"original_product_shopify_id":8443060519214,"created_at":"2023-11-21T21:27:12.000000Z","updated_at":"2023-11-21T21:27:12.000000Z"}}]}],"offer_conditions":[{"id":18719,"offer_id":17841,"is_multiply":null,"min_amount":"100.00","max_amount":null,"product_narrow":[],"unit":"money"}],"gift_items":[{"id":105502,"gift_product_id":41857,"discount_type":"percentage","discount_value":100,"original_price":24.99,"original_compare_at_price":null,"original_product_shopify_id":8443060519214,"original_variant_shopify_id":45695149703470,"price":0,"product_shopify_id":8907918901550,"variant_shopify_id":47536022356270,"variant_title":"Black","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0736\/5227\/3454\/products\/black-pma-mug.jpg?v=1688772848","pivot":{"offer_id":17841,"gift_item_id":105502},"gift_product":{"id":41857,"shop_id":6469,"title":"\u00bb PMA Tumbler (100% off)","original_product_handle":"pma-tumbler","clone_product_handle":"pma-tumbler-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0736\/5227\/3454\/products\/black-pma-mug.jpg?v=1688772848","product_shopify_id":8907918901550,"original_product_shopify_id":8443060519214,"created_at":"2023-11-21T21:27:12.000000Z","updated_at":"2023-11-21T21:27:12.000000Z"}},{"id":105503,"gift_product_id":41857,"discount_type":"percentage","discount_value":100,"original_price":24.99,"original_compare_at_price":null,"original_product_shopify_id":8443060519214,"original_variant_shopify_id":45695149736238,"price":0,"product_shopify_id":8907918901550,"variant_shopify_id":47536022421806,"variant_title":"Red","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0736\/5227\/3454\/products\/red-pma-mug.jpg?v=1688774678","pivot":{"offer_id":17841,"gift_item_id":105503},"gift_product":{"id":41857,"shop_id":6469,"title":"\u00bb PMA Tumbler (100% off)","original_product_handle":"pma-tumbler","clone_product_handle":"pma-tumbler-sca_clone_freegift","thumbnail":"https:\/\/cdn.shopify.com\/s\/files\/1\/0736\/5227\/3454\/products\/black-pma-mug.jpg?v=1688772848","product_shopify_id":8907918901550,"original_product_shopify_id":8443060519214,"created_at":"2023-11-21T21:27:12.000000Z","updated_at":"2023-11-21T21:27:12.000000Z"}}]}],"settings":{"gift_format":"same_as_original_products","auto_add_gift":true,"sync_quantity":false,"cal_gift_discount":"current_price","using_draft_order":false,"select_one_gift_price":false,"manual_input_inventory":false,"compare_gift_price_with_product":false,"delete_gift_after_turn_off_offer":true,"not_show_gift_if_already_on_cart":false},"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":false,"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":"#F72119"},"today_offer":{"widget_icon_path":"images\/widget-icons\/widget-icon-1.png","shopify_widget_icon_path":"widget-icon-1.png","widget_info":{"show_widget":true,"widget_position":"bottom_right","widget_title":"TODAY OFFER","widget_subtitle":"Claim these exclusive offers today"}}},"integration":[]};/* END_FG_DATA */
const _0x5fcad6=_0x2f65;function _0x2f65($,x){let e=_0x31d4();return(_0x2f65=function($,x){return e[$-=144]})($,x)}if(!function($,x){let e=_0x2f65,t=$();for(;;)try{let a=parseInt(e(483))/1*(-parseInt(e(283))/2)+parseInt(e(581))/3*(-parseInt(e(517))/4)+-parseInt(e(663))/5+-parseInt(e(625))/6*(-parseInt(e(733))/7)+-parseInt(e(546))/8+parseInt(e(245))/9*(-parseInt(e(620))/10)+-parseInt(e(280))/11*(-parseInt(e(321))/12);if(573401===a)break;t.push(t.shift())}catch(i){t.push(t.shift())}}(_0x31d4,573401),window[_0x5fcad6(542)]?.[_0x5fcad6(294)]?.gift_icon?.gift_icon_path&&fgGiftIcon&&(window[_0x5fcad6(542)][_0x5fcad6(294)][_0x5fcad6(351)].gift_icon_path=fgGiftIcon),window[_0x5fcad6(542)]?.[_0x5fcad6(294)]?.[_0x5fcad6(295)]?.[_0x5fcad6(653)]&&fgWidgetIconsObj){let $=window[_0x5fcad6(542)].appearance.today_offer[_0x5fcad6(653)];window[_0x5fcad6(542)][_0x5fcad6(294)][_0x5fcad6(295)][_0x5fcad6(591)]=fgWidgetIconsObj[$]??$}function _0x31d4(){let $=["fg-cart:auto-updated","#sca_fg_gift_thumbnail_items_section","sca_price","find","fgData","this is others","rebuy:smartcart.show","#fg-gift-items .btn-add-to-cart","5531840kHzsqP","not have orders and gifts","sca_fg_cart_icon_query","sca-fg-today-offer-title-tooltip","sca-fg-out-stock","partially_paid","#82868b","RENDER_CART_MESSAGE",".icartCheckoutBtn, .rebuy-cart__checkout-button, .qsc2-checkout-button, #mu-checkout-button","80%","insertBefore","TODAY_OFFER_CHANGE","status","variant_title","product_collections","onCartDrawerUpdate","application/json","price","info","stopPropagation","routes","using_draft_order","compare_gift_price",".dots","freegiftProxy","cookie","fg_codes","reduce","#secomapp_freegifts_version","checkout","fg-xhr:send","maxWidth","sca-show","/cart/add.js","variants","688725pSGgUj","add_to_cart_btn_color","fg-app:end","text","sca-fg-icon-collection-page",".original-price del","type_customer_locations","rate","hasOwnProperty","sca_deplay_cart_msg","widget_icon_path","sca_checkout_form","stringify","isDelayShowAdded",".gift-price","SHOPIFY_CART","fgCallback","final_price","sca_process_gifts","offer_root","GIFT_ICON_SECTION_ID","show_pagination","d-block","#sca_fg_gift_icon_section","fg-gifts:gift-icon","toFixed","max_gifts_can_get","collections","product_types","scaCountRenderEventCheckout","keyup","gift_products","includes","TODAY_OFFER_SECTION","contains","fgAppearance","number_of_products","message","START_RENDER_APP","10IIUWpY","customize.select_variant_button_text","FoxKitV2","[sca_root_checkout]","event add gift to cart from popup","5817318jcLuiM","tabindex","tool","fg-today-offer:success","STICKY_CART_OPEN","NumberFormat","Default Title","keys","freegifts","variants_ids","isUpdateCart","compare_gift_price_with_product","childElementCount","sca_text_notify_success","application/liquid","send","map","data-fg-offer-id","variant_shopify_id","?sca_attr_cart","removeChild","#sca_fg_section_gift_item","gifts_valid","dispatchEvent","sca-today-offer-left","original_product_shopify_id",".dots-thumbnail","disabled","shopify_widget_icon_path",".fg-secomapp-collection-img","#sca_fg_cart_section_gifts_slider","is_only","shop","mode_override_checkout","cal_gift_for_other_rules","QUERY_SELECTOR","value_customer_tags","START_PROCESS_CART","2400790epXYbA","customer","Update cart.attributes ","sca_fg_value_checkout","} {","current_product","CartSlider","max_amount","data-variant","sca_fg_img_collection_gift_icon_query","product_narrow","drawer-component#Drawer-Cart cart-drawer","https://geoip.secomtech.com/?json","gift_thumbnail","active","others","SLIDECART_UPDATE","glider-animated","hasDoneProcessCheckout","data-original-id","GIFTS_CART_SECTION","END_PROCESS_CART","getItem","renderPromotionMessage","sca-fg-form-thumbnail-product-page",'
\n
\n \n \n \n \n \n
',"GIFT_SELECT_SECTION","TODAY_OFFER_ITEM_SECTION","SLIDECART - HQ",".sca-list-gift-thumbnail","url","appendChild","customer_order_history","body","#sca-spinner-checkout","sections_cart","/?sections=","sca-gift-icon-collection-img","disable_override_xhr","addEventListener","have_not_got_gift_from_this_offer","discount_type","sca_fg_title_product_gift_icon_query",".fg-secomapp-cart-item-promotion","call","pageY","style","some","entries","60%","data-fg-checkout-btn","fgAppearanceTodayOffer",".sca-promotion-message-layout","offer_name","sync_quantity","charAt","sca_root_checkout","floor","widget_title","en-US","bottom_left","arrOfferAdded",".f-product-single__title, .m-product-title","focus","positions","input[value='Check Out'] a.checkout-link","variantId","#UpcartPopup:has(#CartPopup[class*='styles_active'])","cart-drawer .mini-cart__inner .mini-cart__empty, cart-drawer .mini-cart__inner .mini-cart__main","length","7cGOcYf","openCartDrawer","country_code","cartDrawer","TODAY_OFFER_WIDGET",".gift-original-url","total_price","freegifts-main-popup-container","TODAY_OFFER_WIDGET_ID","application/json;","filter","widget_info","Rebuy","gift_slider","sca_fg_cart_drawer_query","scaCustomLoadingCheckout","json","split","monster_refresh","#sca-fg-today-offer-iframe","reRenderCartCustom","offer_conditions","offer.offer_title_","#sca_fg_disable_slider_section","none","Loading...","product_type",".f\\:featured-collection .f\\:featured-collection-block .f\\:column","enable_toast_added","fg-checkout:end","forEach","sca-is-visible-fg","dataset","?sca_add_gift","hide","fetchCart","CART_AUTO_UPDATED","show_variant_title","RENDER_TODAY_OFFER","Don't show this offer again","cloneNode",'',"hasAttribute","value","join","transcy","/cart","GIFT_SELECT_SECTION_ID","remove","giftsAdded","thumbnail","offer","pathname","fg-cart:start-process","add",'\n {{ sca_fg_cart_message_items_section }}\n
',"#sca_fg_gift_thumbnail_section","Shopify.getCart","show_gift_for_customer","click","innerHTML","sca_offers_added","api","auto","sca-gift-icon-collection-page","orders","hasDiscount","customer_locations","locale","SATCB","giftsAvailable","defineProperty","sections","sca_fg_price","#fg-gift-thumbnail-title .glider-next","enable_process_offer_loading",'\n {{ fg_cart_message }}\n
',"Select variant","customize.product_page_message","type",'{{ fg_gift_thumbnail_title }}
\n\n \n
\n
\n {{ sca_fg_gift_thumbnail_items_section }}\n
\n \n
\n
\n
\n
',"updateCart","FoxTheme","specific_link_address","min_amount","removeAttribute","email","set","#shopify-section-header #cart-icon-bubble, .shopify-section.section-header #cart-icon-bubble","compressToBase64","unit","CartJS","sca_cart_xhr","GIFT_ICON_SECTION","XMLHttpRequest","textContent","parse","GIFT_ITEM_SECTION","start_time","HS_SLIDE_CART_CLOSE","type_customer_tags","relative","text/html","startsWith","setItem","searchParams","subscribe","max","function","sca_slidecart_tcc","querySelector","bottom_right","{{sca_min_quantity}}","SLIDECART_OPEN","&sca_shop_name=","setAttribute","decompressFromBase64","100","100%","concat","default","POST","fg-messages:render","original_variant_shopify_id","div","end_time",".satcb-cs-close","isArray","fg-gifts:updated","boolean","get","product_has_icon","sca_fetch_cart","widget_subtitle","promotion_message","openCart","headers","/cart/change","width","prototype","size","gift_popup_title","Sticky Cart - Codeinero","Select your free gift!","catch","Theme FoxEcom","and",".selected-variant","getAttribute","parseFromString","Error listening XHR open","products","Escape","sub_conditions",".fg-secomapp-cart-drawer","/cart/add",'\n Loading... \n
',"href","getElementById","Slide Cart - qikify","160","CART_MSG_ITEM_SECTION_ID","SLIDECART_CLOSE",".product-card, #product-grid .grid__item, .product-grid .grid__item, .card-list .card-list__column","sca_handle_checkout","productsInPage",".sca_handle_button_checkout","GET","checked","financial_status","sca_fg_btn_gift_thumbnail_query",".dropdown-menu","offer.cart_message_","disableShopify_getCart","condition_relationship","#rebuy-cart[class*='is-visible']","Cart","clone_product_handle","innerText",".freegifts-main-container .slide-container #sca-hidden-gift-popup .sca-disable-checkbox","original_product_handle","stop_lower_priority","not type checkout btn","trigger_body","&width=480&height=480","object","root","customize.widget_subtitle","currency","manual_input_inventory","gift_settings","icartSideCartOpenEvent","price_max","vendor","&sca_products_handle=","active ","Can not fetch all body","sca-gift-thumbnail","iCart","replaceAll","productsByID","customize.disable_slider_text","2043747mytTrD","fg-gifts:show-slider","original_compare_at_price","number","#upCartStickyButton .upcart-sticky-cart-quantity-icon-text",".fg-secomapp-cart-icon","STICKY_CART_UPDATE","scaHandleConfigValue","preventDefault","variant_id","sca-gift-icon","removeItem","sca-d-none","every","money","URL","readystatechange","position","button.new_checkout_button, input[value='Checkout'], input[value='Checkout'], input[value='Check out']","disable_async_process_fg","#sca-fg-today-offer-widget .sca-fg-count-offers","open","#sca_fg_today_offer_widget","track variant auto add gift: {","compare_at_price","sca_link_checkout","HS_SLIDE_CART_UPDATE",".sca-fg-notifications","sca-today-offer-widget-left","createElement","#fg-gift-thumbnail-title .glider-prev","CUSTOM_EVENTS","MinimogEvents","count_down_value","stopImmediatePropagation","908809xRBATb","FGSECOMAPP_HIDDEN_GIFT_POPUP","sca_fg_main_promotion_message_query","12lAjYgh","CART_MSG_SECTION_ID","#fg-gift-items .dropdown > .dropdown-menu > li","enable","auto add gift: {","customize.add_to_cart_button","Monster Cart",".freegifts-main-container .glider-next","gift_icon_path","condition_result","cartItems","appearance","today_offer",' ',"push","fgSettings","giftsAddedInvalid","sca-today-offer-right","#CartPopup .styles_CartPreview__card__KX-WB, #qikify-stickycart-v2-app .qsc2-drawer-wrapper > div:nth-child(2)","general","fgAppearanceGiftIcon","checkIsBlockCheckout",'\n
\n
\n
{{ sca_fg_offer_title }} \n
\n
\n \n \n \n \n
',"fg-gift-items","values","indexOf","discount_value",".sca-gift-icon-collection-page","data-original-price","$","fgAppearancePromotionMessage","#sca_fg_variant_select_section","priority",".freegifts-main-container .glider-prev","TODAY_OFFER_ITEM_SECTION_ID","GIFT_THUMBNAIL_ITEMS_SECTION_ID","settings","color","408fBXjcg","redirected","current_variant","#fg-gift-items .dropdown","invoice_url","freegift_attributes","fg_decimal","disable_fetch_cart_checkout","[type='submit'][name='add'], [type='button'][name='add'], [data-add-to-cart], [data-action='add-to-cart']","order_created_from","end","FGSECOMAPP","free-gift-icon","block",".m-product-form--wrapper","reload","selling_plan_allocation","pageX","sections_url","Slide Cart - Heysenior","/products/","undefined","#sca_fg_today_offer_section","$$$$","gifts_id","#sca-gift-icon","#sca-fg-today-offer-iframe .sca-fg-body .sca-fg-offers .sca-fg-offer","number_of_gift_can_receive","fg-today-offer:render","sca_locale","gift_icon","className","removeEventListener","include","input[name='checkout'], button[name='checkout'], input[name='goto_pp'], button[name='goto_pp']","open-cart-drawer","product_page","parentNode","#sca-fg-today-offer-iframe .sca-fg-body .sca-fg-offers","GIFT_ITEM_SECTION_ID","sca_catch","END_VALIDATE_CHECKOUT","TODAY OFFER","done","querySelectorAll","fgAppearanceGiftSlider","auto_add_all_gifts","cal_gift_price","fg-gifts:added","is_multiply","created_at","count_down_quantity","left","subscription_products","DONE","add_to_cart_btn_title","openSlider","total_spent_on_last_order","now",'\n
\n {{ fg_slider_title }}\n
\n
\n
\n
\n ❮ \n
\n
\n ❯ \n
\n
\n
\n \n {{ sca_fg_disable_slider_section }}\n
',"secomappGetCartRunning","arrGiftsAdd",'.btn-add-to-cart[data-variant="',"not using draft order","product_id",".btn-add-to-cart","key","height","addGiftToCart","target",".sca-fg-close-today-offer","discounted_price","bogos-gift","#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg","gift_items","END_RENDER_APP","offers","then","initializeForXHR","{{sca_min_total}}","location","select_gift_btn","original_price","product_shopify_id","Rivets Cart","Claim these exclusive offers today","integration","event auto process gifts with cart","GIFT_THUMBNAIL_ITEMS_SECTION","belongs_to_offer","string","fetchCheckoutEvents","append","total_spend_on_order_history","timeoutId","failed to parse cart section ","formatter","upcartRegisterAddToCart","FG_OVERRIDE_FETCH","GIFT_UPDATED",'\n \n \n \n \n \n ',"getCart","title","enable_check_variants_has_gift","data-template","sca-promotion-message-layout","gift_img_size","start","widget_position","collection_page","stop_offer","isSameNode","sca_add_gift","upcartOnCartOpened","?sca_process_gifts","#close-fg-toast","maxOfferPriority","substring","backgroundColor","paid","/cart.js?sca_fetch&","gift_should_the_same","change","DISABLE_SLIDER_SECTION","number_gifts_thumbnail","arrGiftsRemove","offer_id",'\n \n \n \n ','\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
',"customer_tags","SLIDECART_OPENED","GIFTS_POPUP_SECTION_ID","MinimogTheme","replace","variant","compressToEncodedURIComponent","getTime","data-img","Out of stock",'\n \n ',"/cart/update","#MainContent, #mainContent, #main, .main-content","readyState","isReachConditions","DISABLE_SLIDER_SECTION_ID","currentTarget","tags","slice","toString","log","closeCart","prepend","UpCart - AfterSell","by_variants","display","sca_clone_checkout","customLoadingCheckout","#sca-fg-today-offer-widget","Error listening XHR send","sca_fg_codes",' \n ',"#sca-gift-thumbnail","186292ajcili","openDrawer",".sca-offer-title","sca-fg-tooltip","clone_checkout","number_of_order",".icart-inner .icartContain, .rebuy-cart__flyout-body, #slidecarthq .slidecarthq","parentElement","Error decoding cookie:","apply","sca_update_url","sort","quantity","handle","classList",".product-item-thumbnail","freegifts-main-page-container",".satcb-cs-checkout-btn, .hs-checkout-purchase","select_one_gift_price","SHOW_GIFT_SLIDER","clearInterval","unicart","sca-gift-icon-img","#sca_fg_cart_message_items_section","CART_MSG_ITEM_SECTION","visibility","padding","format","gifts","product","time","hidden","Widgets","error","12muwPkT","cart","input[name='goto_gc'], button[name='goto_gc'], a[href$='checkout'], form[action='/checkout'] input[type='submit']","#sca_fg_section_gifts_popup","fgIntegration","mousemove","auto add all gifts from {","-sca_clone_freegift","Failed to get customer location",'\n {{ fg_variant_title }}\n ',"sca-fg-form-icon-product-page","(Discount)",'a[href*="/products/"]',"show_widget","toggle","fg-cart:end-process","variants_quantity","FG_OVERRIDE_XHR_OPEN","ele",".sca-promotion-glider","last_total"];return(_0x31d4=function(){return $})()}!function $(){let x=_0x5fcad6;window[x(332)]={},FGSECOMAPP[x(437)]=null,FGSECOMAPP[x(293)]=Object.values(Shopify?.[x(293)]??{}),FGSECOMAPP[x(397)]=[],FGSECOMAPP[x(298)]=window[x(542)]?.[x(319)]??{},FGSECOMAPP[x(616)]=window[x(542)]?.[x(294)]??{},FGSECOMAPP.fgIntegration=window.fgData?.integration??{},FGSECOMAPP.fgAppearanceGiftSlider=FGSECOMAPP[x(616)]?.[x(746)]?.[x(302)],FGSECOMAPP.fgAppearanceGiftIcon=FGSECOMAPP[x(616)]?.[x(351)],FGSECOMAPP[x(313)]=FGSECOMAPP[x(616)]?.[x(177)],FGSECOMAPP[x(714)]=FGSECOMAPP.fgAppearance?.today_offer,FGSECOMAPP[x(597)]=[],FGSECOMAPP[x(381)]=!1,FGSECOMAPP[x(724)]=[],FGSECOMAPP[x(610)]=0,FGSECOMAPP[x(304)]=!1,FGSECOMAPP.scaHandleConfigValue={...Shopify?.[x(252)]},FGSECOMAPP[x(753)]=Shopify?.[x(753)]??void 0,FGSECOMAPP[x(748)]=Shopify?.[x(748)]??void 0,FGSECOMAPP[x(208)]={},FGSECOMAPP[x(243)]={},FGSECOMAPP[x(681)]=!1,FGSECOMAPP[x(698)]={},FGSECOMAPP[x(635)]=!1,FGSECOMAPP[x(596)]={},FGSECOMAPP[x(540)]=Shopify?.[x(806)]??x(392),FGSECOMAPP[x(345)]=[],FGSECOMAPP[x(276)]={SHOW_GIFT_SLIDER:x(246),PRODUCT_HAS_GIFTS:x(605),GIFT_UPDATED:x(171),GIFT_ADDED:x(369),CART_AUTO_UPDATED:x(538),START_PROCESS_CART:x(786),END_PROCESS_CART:x(532),START_VALIDATE_CHECKOUT:"fg-checkout:start",END_VALIDATE_CHECKOUT:x(762),START_RENDER_APP:"fg-app:start",END_RENDER_APP:x(583),FG_OVERRIDE_FETCH:"fg-fetch:override",FG_OVERRIDE_XHR_OPEN:"fg-xhr:open",FG_OVERRIDE_XHR_SEND:x(576),RENDER_TODAY_OFFER:x(349),TODAY_OFFER_CHANGE:x(628),RENDER_CART_MESSAGE:x(165)};let e={GIFTS_CART_SECTION_ID:x(655),GIFTS_CART_SECTION:x(380),GIFTS_POPUP_SECTION_ID:x(520),GIFTS_POPUP_SECTION:'\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
',GIFT_ITEM_SECTION_ID:x(646),GIFT_ITEM_SECTION:x(449),GIFT_SELECT_SECTION_ID:x(314),GIFT_SELECT_SECTION:x(526),DISABLE_SLIDER_SECTION_ID:x(756),DISABLE_SLIDER_SECTION:x(774),CART_MSG_SECTION_ID:"#sca_fg_cart_message_section",CART_MSG_SECTION:x(788),CART_MSG_ITEM_SECTION_ID:x(506),CART_MSG_ITEM_SECTION:x(809),GIFT_THUMBNAIL_SECTION_ID:x(789),GIFT_THUMBNAIL_SECTION:x(813),GIFT_THUMBNAIL_ITEMS_SECTION_ID:x(539),GIFT_THUMBNAIL_ITEMS_SECTION:'',GIFT_ICON_SECTION_ID:x(604),GIFT_ICON_SECTION:x(296),TODAY_OFFER_SECTION_ID:x(343),TODAY_OFFER_SECTION:'',TODAY_OFFER_ITEM_SECTION_ID:"#sca_fg_today_offer_item_section",TODAY_OFFER_ITEM_SECTION:x(305),TODAY_OFFER_WIDGET_ID:x(267),TODAY_OFFER_WIDGET:x(481)},t=()=>{let $=x,e=FGSECOMAPP.fgAppearance?.[$(746)],t=e?.[$(678)]?.hidden_brand_mark,a=!C(e)&&void 0!==t&&!t;return a?$(460):""},a=()=>{let $=x,t=FGSECOMAPP.fgAppearance?.[$(746)],a=t?.disable_slider_checkbox??{};document[$(153)]($(222))?.[$(211)]&&localStorage.setItem($(281),""+Date.now());let i=document[$(153)](e[$(465)])?.[$(793)]??e[$(444)];return a?.[$(286)]?i[$(242)](/{{\s*fg_text_disable_slider\s*}}/gm,h(m(a[$(584)]??$(772),$(244)))):""},{fetch:i}=window,r=()=>{let $=x;"fg-checkout"!==document[$(153)]($(574))?.[$(191)]($(425))&&(window.fetch=async(...x)=>{let e=$;try{let t=x[0];if(!(t?.[e(613)]("/cart/add")||t?.[e(613)](e(180))||t?.[e(613)]("/cart/update")))return setTimeout(function(){$7()},1e3),await i(...x);{let a=t?.includes(e(198)),r=t?.includes(e(180))||t?.[e(613)]("/cart/update");n(x[1]);let c=200,o=null,s=await i(...x)[e(398)]($=>(o=$,c=$.status,$.redirected)?$:$[e(749)]())[e(187)]($=>{console.error($)});if(document[e(648)](new CustomEvent(FGSECOMAPP[e(276)][e(419)],{detail:{args:x,response:o}})),a&&x[1][e(179)]?.[e(433)]&&200!==c){let d=JSON[e(829)](x[1][e(696)])?.id,_=document[e(153)](e(383)+d+'"]');_[e(221)]=e(459),_.classList.contains(e(550))||_[e(497)][e(787)](e(550)),_[e(652)]=!0,_.style[e(509)]="",_[e(709)][e(439)]=e(552),document[e(365)](".btn-add-to-cart")[e(763)]($=>{let x=e;parseInt($[x(191)]("data-variant"))===d||$[x(497)][x(615)](x(550))||($[x(652)]=!1,$[x(709)].backgroundColor=FGSECOMAPP[x(616)]?.[x(746)]?.[x(320)]?.[x(582)]??"#7367f0")})}if(200!==c&&(a&&x[1][e(179)]?.[e(433)]||r&&x[1][e(179)]?.[e(599)]))return f(s,o);if(Shopify?.[e(264)])return $s([t,...x[e(468)](1)])[e(398)](),f(s,o);if(await $s([t,...x[e(468)](1)]),r&&x[1]?.headers?.[e(599)])return f(s,o);let g=r?FGSECOMAPP[e(596)]??s??{}:s;return await l(x,s,g),f(g,o)}}catch(u){return await i(...x)}})},c=window[x(827)][x(182)][x(266)],o=window[x(827)][x(182)][x(640)],s=()=>{let $=x;Shopify?.[$(701)]||(window[$(827)].prototype[$(266)]=function(x,e){let t=$;try{document[t(648)](new CustomEvent(FGSECOMAPP[t(276)].FG_OVERRIDE_XHR_OPEN,{detail:{fgXHR:this}}))}catch(a){console[t(516)](t(193),a)}finally{c[t(492)](this,arguments)}},window[$(827)][$(182)][$(640)]=function(x){let e=$;try{document[e(648)](new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS[e(534)],{detail:{fgXHR:this}}));let{_url:t}=this;(t?.includes(e(198))||t?.[e(613)]("/cart/change")||t?.[e(613)](e(461)))&&this.addEventListener(e(261),function(){let $=e;this[$(463)]===XMLHttpRequest[$(375)]&&200===this[$(558)]&&$s([t,{}])[$(398)]()})}catch(a){console[e(516)](e(479),a)}finally{o[e(707)](this,x)}})};FGSECOMAPP[x(399)]=()=>{let $=x;try{if(Shopify?.[$(216)]||"function"!=typeof Shopify?.[$(422)])return;Shopify.getCart=async function(x){let e=$;if(!FGSECOMAPP[e(381)]){FGSECOMAPP.secomappGetCartRunning=!0,await $s([e(790),{}]);let t=await $r(e(825));typeof x===e(151)&&(0>FGSECOMAPP[e(597)].indexOf(x)&&FGSECOMAPP[e(597)][e(297)](x),x(t)),FGSECOMAPP[e(381)]=!1}FGSECOMAPP.fetchCheckoutEvents()},typeof ShopifyAPI!==$(342)&&typeof ShopifyAPI[$(422)]!==$(342)&&(ShopifyAPI[$(422)]=Shopify?.[$(422)]),typeof Shopify?.[$(795)]!==$(342)&&typeof Shopify?.[$(795)][$(422)]!==$(342)&&(Shopify.api[$(422)]=Shopify?.[$(422)])}catch(e){console[$(516)](e)}};let n=$=>{let e=x;try{let t=$?.body;t instanceof FormData?FGSECOMAPP.sections_cart={sections:t[e(173)](e(805)),sections_url:t[e(173)](e(339))}:typeof t===e(411)&&(t=JSON[e(829)](t),FGSECOMAPP[e(698)]={sections:t?.sections,sections_url:t?.[e(339)]})}catch(a){FGSECOMAPP.sections_cart={}}},f=($,e)=>{let t=x;try{let a=Shopify?.fg_fetch_attributes??[t(693),"type",t(322),"ok"],i=new Response(JSON.stringify($),e);for(let r of a)Object[t(804)](i,r,{value:e[r]});return i}catch(c){return new Response(JSON[t(593)]($))}},d=async()=>{let $=x;if(Shopify.do_not_add_freegift_attribute)return;let e=[];if(!C(FGSECOMAPP[$(724)]))for(let t of(e.push("SECOMAPP_FREEGIFT"),FGSECOMAPP.arrOfferAdded)){let a=FGSECOMAPP[$(397)][$(541)](x=>x.id===t[$(410)])?.sub_conditions?.[$(816)];C(a)||e[$(297)](a)}if(e[$(494)](),e[$(469)]()!==FGSECOMAPP?.[$(596)]?.attributes?.[$(326)])try{await i((Shopify?.[$(493)]??"/cart/update")+$(644),{method:$(164),headers:{"X-Requested-With":$(827),"Content-Type":$(742)},body:JSON[$(593)]({attributes:{freegift_attributes:e[$(469)]()}})})}catch(r){console[$(516)]($(665)+r[$(618)])}},l=async($,e,t)=>{let a=x;try{if($[1]?.[a(179)]?.[a(599)])return;let r={},c=Object[a(632)](e[a(805)]??{})?.[a(743)]($=>C(FGSECOMAPP[a(698)][$]))??[];if(c&&c[a(732)]&&FGSECOMAPP[a(635)]&&(r=await i(a(699)+c.join(","))[a(398)]($=>$[a(749)]())),FGSECOMAPP.isUpdateCart=!1,r={...FGSECOMAPP[a(698)],...r},C(r))return;e[a(805)]={...e.sections,...r},C(t)||(t[a(805)]={...e[a(805)]})}catch(o){}};FGSECOMAPP[x(389)]=async($,e,t)=>{let a=x;try{let i=FGSECOMAPP.arrOfferAdded[a(541)](x=>t===x.belongs_to_offer?.toString()&&$===x[a(729)]);i?i[a(495)]+=e:FGSECOMAPP[a(724)].unshift({variantId:$,belongs_to_offer:t,quantity:e}),localStorage[a(147)](a(794),LZString[a(822)](JSON[a(593)](FGSECOMAPP[a(724)]))),p(a(428));let r=await fetch((Shopify?.sca_add_url??a(579))+a(766),{method:"POST",headers:{Accept:a(562),"Content-Type":a(562),sca_add_gift:!0},body:JSON[a(593)]({quantity:e,id:$})});return await r[a(749)]()}catch(c){return!1}};let _=async($,e,t)=>{let a=x;t=t?.toString();let i=document[a(365)](a(545));i[a(763)](x=>{let e=a;x[e(652)]=!0;let t=x[e(191)](e(671))-0;t===$&&(x[e(709)][e(509)]="6px 0",x.innerHTML=e(421)),x[e(709)][e(439)]=e(552)});let r=await FGSECOMAPP[a(389)]($,e,t);r&&(i[a(763)](x=>{let e=a;x[e(652)]=!0;let t=x[e(191)]("data-variant")-0;t===$&&(x[e(709)][e(509)]="6px 0",x[e(793)]=e(448)),x[e(709)][e(439)]=""}),$n()),document.dispatchEvent(new CustomEvent(FGSECOMAPP[a(276)].GIFT_ADDED,{detail:{gift:r}}))},g=$=>{let e=x,t=e(524);return!C($)&&(typeof $===e(228)&&($[e(496)]?.[e(613)](t)||$.tags?.[e(613)](e(393))||FGSECOMAPP[e(345)]?.[e(613)]($[e(254)]))||"string"==typeof $&&$[e(613)](t))},u=$=>{let{selling_plan_allocation:x}=$;return!C(x)&&!C(x?.selling_plan)},p=$=>{let e=x;try{if(!Shopify?.[e(808)])return;let{checkout_btn_query:t}=FGSECOMAPP.QUERY_SELECTOR,a=[...t?.[e(627)],...t?.[e(407)],...t?.[e(163)]][e(743)](Boolean).join(",");document[e(365)](a)[e(763)](x=>{let t=e;FGSECOMAPP[t(477)]($,x)[t(398)]()})}catch(i){}},b=async($,e)=>{let t=x;try{if(C($)&&C(e))return;let a={};if(FGSECOMAPP[t(293)]?.filter($=>g($))?.[t(763)]($=>{a[$.variant_id]=$[t(495)]}),($=$?.[t(743)]($=>!C($[t(254)])))?.forEach($=>{let x=t;a[$[x(254)]]=(a[$[x(254)]]??0)+($[x(495)]??1)}),Object[t(632)](a)?.forEach($=>{a[$]=a[$]>=0?a[$]:0}),C(Object.keys(a)))return;$?.[t(763)]($=>{let x=t,e=FGSECOMAPP.arrOfferAdded[x(541)](e=>$[x(447)]?.[x(469)]()===e[x(410)]?.[x(469)]()&&$[x(254)]===e[x(729)]);e?e[x(495)]+=$[x(495)]:FGSECOMAPP.arrOfferAdded.unshift({variantId:$[x(254)],belongs_to_offer:$[x(447)]?.[x(469)](),quantity:$[x(495)]})}),localStorage.setItem(t(794),LZString[t(822)](JSON.stringify(FGSECOMAPP[t(724)]))),FGSECOMAPP[t(635)]=!0,p(t(428)),await fetch((Shopify?.[t(493)]??t(461))+t(435),{method:t(164),headers:{Accept:t(562),"Content-Type":t(562),sca_process_gifts:!0},body:JSON.stringify({updates:a,...FGSECOMAPP[t(698)]})}).then(x=>{let a=t;return x.ok&&$[a(732)]&&!e[a(732)]&&$n(),x[a(749)]()})[t(398)]($=>{FGSECOMAPP.sections_cart=$[t(805)]}),document[t(648)](new CustomEvent(FGSECOMAPP[t(276)][t(769)],{detail:{arrGiftsAdd:$,arrGiftsRemove:e}})),"fg-checkout"===document[t(153)](t(574))?.[t(191)](t(425))&&location[t(336)]()}catch(i){p(t(331)),console[t(516)](i)}},m=($,e)=>{let t=x;try{let a=FGSECOMAPP[t(521)]?.[t(778)],i=Shopify?.sca_transcy_locale??Shopify?.[t(801)];return a[t(286)]?a?.[i]?.[e]??$:$}catch(r){return $}},h=($,e=!1)=>{let t=x;return(""+$)[t(242)](/\$/g,t(e?344:312))},y=()=>{let $=x,i=document[$(201)]($(499));if(i){let r=document.querySelector(e.GIFTS_CART_SECTION_ID)?.[$(793)]??e[$(683)];i[$(793)]=r[$(242)](/{{\s*fg_slider_title\s*}}/gm,h(m(FGSECOMAPP[$(366)][$(184)]??$(186),"customize.gift_slider_title")))[$(242)](/{{\s*sca_fg_disable_slider_section\s*}}/gm,h(t()))}else{let c=localStorage[$(685)]("FGSECOMAPP_HIDDEN_GIFT_POPUP")-0,o=FGSECOMAPP[$(616)]?.gift_slider?.disable_slider_checkbox??{},s=(o?.[$(513)]??0)*6e4,n=!isNaN(c)&&c+s>Date[$(379)]();if(n||(localStorage[$(256)]($(281)),!(i=document[$(201)]($(740)))))return;let f=document[$(153)](e[$(452)])?.innerHTML??e.GIFTS_POPUP_SECTION;i[$(793)]=f.replaceAll(/{{\s*fg_slider_title\s*}}/gm,h(m(FGSECOMAPP[$(366)][$(184)]??$(186),"customize.gift_slider_title"))).replaceAll(/{{\s*sca_fg_disable_slider_section\s*}}/gm,h(a()+" "+t())),i[$(497)][$(787)]($(764))}},v=($,t)=>{let a=x,i=document[a(153)](e[a(780)])?.innerHTML??e[a(689)];return $.map($=>i[a(242)](/{{\s*fg_variant_img\s*}}/gm,h(K($[a(783)]??t),!0))[a(242)](/{{\s*fg_variant_id\s*}}/gm,h($[a(643)]))[a(242)](/{{\s*fg_original_variant_id\s*}}/gm,h($[a(166)]))[a(242)](/{{\s*fg_variant_price\s*}}/gm,h(T($)))[a(242)](/{{\s*fg_original_variant_price\s*}}/gm,h(E($)))[a(242)](/{{\s*fg_variant_title\s*}}/gm,h($[a(559)])))[a(777)](" \n")},T=$=>{let e=x;return FGSECOMAPP[e(417)][e(510)](O($?.[e(563)]))},E=$=>{let e=x;return FGSECOMAPP[e(417)][e(510)](O($?.[e(368)]??0))},w=($,e)=>{let t=x;return C(FGSECOMAPP[t(243)][$])?e??"#":FGSECOMAPP.productsByID[$][t(496)]},S=($,e)=>{let t=x;return FGSECOMAPP[t(366)].show_product_title?C(FGSECOMAPP[t(243)][$])?e.replace("\xbb","")[t(454)](/\(\d*% off\)/,"").replace(t(528),"")??"":FGSECOMAPP[t(243)][$][t(423)]:""},C=$=>{let e=x;if(0===$)return!0;if(typeof $==e(248)||typeof $==e(172))return!1;if(typeof $==e(342)||null===$)return!0;if(typeof $[e(732)]!=e(342))return 0===$[e(732)];let t=0;for(let a in $)$[e(589)](a)&&t++;return 0===t},I=$=>{let e=x;try{let t={...FGSECOMAPP[e(252)]},a=t[$];if(a=a?a.trim():null,!C(a)&&a[e(732)]>0)try{return document[e(153)](a),a}catch(i){}return""}catch(r){return""}},A=()=>{let $=x;try{FGSECOMAPP.formatter=new Intl.NumberFormat(Shopify?.[$(350)]??Shopify?.[$(801)],{style:$(231),currency:Shopify?.[$(231)]?.[$(677)]??"USD"})}catch(e){FGSECOMAPP[$(417)]=new Intl[$(630)]($(722),{style:$(231),currency:Shopify?.[$(231)]?.[$(677)]??"USD"})}},O=$=>{let e=x;$=$??0;let t=Shopify?.[e(231)]?.[e(588)]??1;return 1===parseFloat(t)?$:($*t)?.[e(606)](Shopify?.[e(327)]??2)},k=$=>{let e=x;try{return $[FGSECOMAPP[e(540)]]??$?.[e(598)]??$?.price}catch(t){return $?.[e(598)]??$?.[e(563)]}},D=$=>{let e=x;return $.filter($=>void 0===$[e(659)]||!0===$[e(659)]).reduce(($,x)=>$+x[e(495)]*k(x),0)/100},R=$=>{let e=x;return $[e(743)]($=>void 0===$[e(659)]||$[e(659)])[e(573)](($,x)=>$+x[e(495)],0)},F=($,e,t)=>{let a=x,i=e[a(673)];return t?.[a(656)]&&($=$[a(743)]($=>u($))),C(i)?$:$.filter($=>!i.map(x=>{let e=_0x2f65;switch(x[e(812)]){case e(634):return Object[e(307)](x[e(776)])[e(641)]($=>$[e(455)]).flat()[e(641)]($=>$.id).includes($[e(254)]);case"product_types":return Object[e(307)](x[e(776)]).includes($[e(759)]);case"product_vendors":return Object[e(307)](x.value).includes($[e(236)]);case e(560):let t=Object[e(632)](x[e(776)]),a=$[e(608)]?.[e(641)]($=>$.id+"")?.filter($=>t[e(613)]($));return!C(a);default:return!1}})[a(613)](!1))},N=($,e)=>{let t=x;return $?.[t(641)]($=>{let x=t;if(typeof $[x(659)]!==x(342)){let a=FGSECOMAPP[x(724)]?.filter(e=>e[x(729)]===$[x(254)]),i=a?.[x(573)](($,x)=>$+x.quantity,0);if(i===$[x(495)]){let r=a?.[x(743)](t=>{let a=x;if(t[a(410)]?.toString()===e[a(469)]())return!1;let i=FGSECOMAPP.offers?.find($=>$.id?.toString()===t.belongs_to_offer?.toString()),r=i.gift_settings??{},c=k($);return r[a(659)]&&c>0})?.reduce(($,x)=>$+x.quantity,0);return{...$,cal_gift_for_other_rules:r>0,quantity:r??0}}return{...$,cal_gift_for_other_rules:!1,quantity:0}}return{...$}})??[]},G=($,e)=>{let t=x,a=FGSECOMAPP[t(298)]?.[t(636)],i=FGSECOMAPP[t(298)]?.not_show_gift_if_already_on_cart,r=$,c=r;if(a){r=$[t(494)](($,x)=>k($)-k(x));let o=e.gift_items[t(641)]($=>$?.[t(568)]??0);r=r[t(743)]($=>o[t(710)](x=>x<=k($)/100)),c=JSON.parse(JSON[t(593)](r));let s=e.giftsAdded[t(494)](($,x)=>x?.[t(568)]-$?.[t(568)])[t(641)]($=>({...$}));c[t(743)]($=>$[t(495)]>0)[t(763)]($=>{let x=t,e=k($)/100;s.filter($=>$[x(495)]>0)[x(743)]($=>$?.[x(568)]<=e).forEach(e=>{let t=x,a=$[t(495)]-e[t(495)];e[t(495)]-=a>=0?e.quantity:$[t(495)],$[t(495)]=Math[t(150)](a,0)})}),e[t(299)]=s[t(743)]($=>$[t(495)]>0),c=c.filter($=>$.quantity>0)}r=r[t(743)]($=>$[t(495)]>0);let n=FGSECOMAPP[t(293)][t(641)]($=>$[t(385)]),f=e[t(612)]?.[t(641)]($=>$[t(650)]);i&&(r=r[t(743)]($=>!f?.[t(613)]($[t(385)])));let d=[];return FGSECOMAPP[t(298)]?.[t(501)]&&(d=FGSECOMAPP.cartItems[t(743)]($=>g($))[t(641)]($=>$[t(254)])),e[t(647)]=JSON.parse(JSON[t(593)](e[t(612)]))?.filter($=>{let x=t;return $[x(580)]=$[x(580)].filter($=>!d[x(613)]($[x(643)])),!(i&&n?.includes($.original_product_shopify_id))&&(a&&($[x(580)]=$[x(580)][x(743)]($=>{let e=x,t=a===e(269)?$.original_compare_at_price:$[e(403)];return c.some($=>t<=k($)/100)})),!C($[x(580)]))}),r},q=($,e,t)=>{let a=x,i=0,r=F(e,$,t[a(196)]?.[a(374)]);r=N(r,$[a(447)]),r=G(r,t);let c=0;return $.unit===a(259)?(c=D(r),t[a(278)]=Math.max($[a(817)]-c,0)):"number_of_products"===$.unit&&(c=R(r),t[a(372)]=Math.max($[a(817)]-c,0)),c>=$[a(817)]&&(null===$[a(670)]||c<=$.max_amount)&&(i=t.gift_settings[a(348)]*($[a(370)]?Math[a(720)](c/$[a(817)]):1)),i},L=($,e)=>{let t=x,a={},i=[],r=0;return e.offer_conditions[t(641)](x=>{let a=q(x,$,e);0!==a&&(r=a),i[t(297)](a>0)}),a[t(607)]=r,a.condition_result=i,a},P=($,e)=>{let t=x,a=!1;return 1===$[t(732)]?a=$[0]:2===$.length&&(e===t(189)&&(a=$[0]&&$[1]),"or"===e&&(a=$[0]||$[1])),a},M=($,e)=>{let t=x,a=$?.map($=>$[t(254)]);FGSECOMAPP.arrOfferAdded=FGSECOMAPP[t(724)][t(743)]($=>a?.[t(613)]($[t(729)]));let i=e[t(395)][t(641)]($=>$[t(643)]),r={};e.gift_items[t(743)]($=>r[$.variant_shopify_id]={fg_original_compare_at_price:$[t(247)],fg_original_price:$[t(403)],compare_gift_price:$.compare_gift_price});let c=FGSECOMAPP[t(724)][t(743)]($=>$[t(410)]?.[t(469)]()===e.id?.[t(469)]())?.[t(641)]($=>$[t(729)]),o=$[t(743)]($=>{let x=t;return g($)&&($[x(659)]=!1),i[x(613)]($.variant_id)&&c[x(613)]($[x(254)])}),s=o[t(641)]($=>{let x=t,a=e[x(233)];$.cal_gift_for_other_rules=a[x(659)],$[x(410)]=e.id?.[x(469)]();let i=FGSECOMAPP[x(724)]?.[x(743)](t=>t[x(410)]?.[x(469)]()!==e.id?.[x(469)]()&&$[x(254)]===t[x(729)])?.[x(573)](($,e)=>$+e[x(495)],0);return{...$,quantity:$[x(495)]-i,...r[$[x(254)]]}});return s[t(743)]($=>{let x=t;return $[x(410)]?.[x(469)]()===e.id?.[x(469)]()})},H=$=>{let e=x,t=$[e(782)].filter(x=>x[e(410)]?.[e(469)]()!==$.id?.[e(469)]()).map($=>$.product_id);return Object[e(307)]($[e(647)]).filter($=>!t[e(613)]($[e(404)]))},U=($,e)=>{let t=x,a=M($,e);e.giftsAdded=a;let i=L($,e),r=P(i[t(292)],e[t(217)]);if(r){let c=a[t(743)]($=>$[t(410)]?.toString()===e.id?.[t(469)]()).reduce(($,x)=>$+x[t(495)],0);i[t(607)]=i[t(607)]-c,e[t(782)]=a,e[t(803)]=i[t(607)]}else e[t(782)]=a,e[t(803)]=0;return!C(FGSECOMAPP[t(437)])&&e[t(315)]>FGSECOMAPP[t(437)]&&(r=!1),e[t(224)]&&r?FGSECOMAPP[t(437)]=e[t(315)]:!e.stop_lower_priority||r||C(a)||e[t(315)]!==FGSECOMAPP.maxOfferPriority||(FGSECOMAPP.maxOfferPriority=null),e[t(464)]=r,e},B=$=>{let e=x,t=$+"=",a=document[e(571)].split(";");for(let i=0;i{let t=x,a=!0,i=!0,r=!0,c=!0;if(!C($[t(196)]?.[t(816)])){let o=B(t(480));a=o&&JSON.parse(o).includes($[t(196)][t(816)])}if(!C($[t(196)]?.[t(450)])){let{customer_tags:s}=$.sub_conditions,n=s?.[t(661)]?.[t(710)]($=>e[t(664)][t(467)]?.[t(613)]($));i=s?.[t(833)]===t(354)?n:!n}if(!C($.sub_conditions?.[t(800)])){let{customer_locations:f}=$[t(196)],d=f?.value_customer_locations?.[t(613)](FGSECOMAPP.customerLocation);c=f?.[t(587)]===t(354)?d:!d}if(!C($.sub_conditions?.[t(695)])){let l=!0,_=$[t(196)][t(695)],g=e[t(664)][t(798)]??[];if(_[t(330)]){let u=Date.parse(_[t(330)])/1e3;g=g[t(743)]($=>$[t(371)]>=u&&[t(440),t(551)][t(613)]($[t(212)]))}if(!C(_?.[t(414)])&&(0!==_[t(414)][t(817)]||0!==_[t(414)].max_amount)){let p=_[t(414)][t(817)],b=_[t(414)][t(670)],m=g[t(573)](($,x)=>$+x[t(739)],0)/100;l&=(m>=p||!p)&&(m<=b||!b)}if(!C(_?.[t(378)])&&(0!==_[t(378)][t(817)]||0!==_[t(378)][t(670)])){let h=(e.customer[t(537)]??0)/100,y=_[t(378)][t(817)],v=_[t(378)][t(670)];l&=g[t(732)]>0&&(h>=y||!y)&&(h<=v||!v)}if(!C(_?.number_of_order)){let T=!(0!==_[t(488)][t(817)]||0!==_[t(488)][t(670)]),E=g[t(732)],w=_.number_of_order.min_amount,S=_[t(488)][t(670)];l&=T?C(g):(E>=w||!w)&&(E<=S||!S)}if(_?.[t(703)]){let I=e[t(664)][t(633)]??[],A=$.gift_items?.[t(710)]($=>I[t(613)]($[t(643)]))||$[t(395)]?.some($=>I[t(613)]($[t(166)]+"_"+($[t(403)]-$[t(563)])*100));l&=!A}r=l}return a&&i&&r&&c},j=($,e,t)=>{let a=x,i=[],r=[],c=[],o=[];for(let s of e){let n=U($,s);if(!n[a(464)]){if(!n[a(782)].length)continue;n[a(782)][a(763)]($=>{let x=a;r.push({variant_id:$[x(254)],quantity:$[x(495)],offer_id:s.id})});continue}if(n[a(803)]<0){n[a(782)].forEach($=>{let x=a;r[x(297)]({variant_id:$[x(254)],quantity:$[x(495)],offer_id:s.id})});continue}if(0===n.giftsAvailable){n[a(782)].forEach($=>{let x=a,e=FGSECOMAPP[x(724)][x(541)](e=>s.id?.[x(469)]()===e[x(410)]?.[x(469)]()&&$.variant_id===e[x(729)]);e&&(e[x(495)]=$[x(495)])});continue}(s.sub_conditions&&Y(s,SECOMAPP)||C(s.sub_conditions))&&i[a(297)](s)}if($?.[a(743)]($=>g($))[a(763)]($=>{let x=a,e=0,t=FGSECOMAPP[x(724)]?.[x(743)](e=>$[x(254)]===e[x(729)])?.reduce(($,e)=>$+e[x(495)],0)??0;t<$.quantity&&(e=$[x(495)]-t),C($[x(410)])&&(e=$[x(495)]),e>0&&r.push({variant_id:$.variant_id,quantity:e,offer_id:$[x(410)]?.[x(469)]()})}),t||C(r)){let f=i[a(641)]($=>{let x=a;return{id:$.id,offerName:$[x(716)],offerPriority:$[x(315)],stopLowerPriority:$.stop_lower_priority,gifts:H($),giftsAvailable:$[x(803)],giftsAdded:$[x(782)],isReachConditions:$[x(464)],offer:$}});if(!C(f)){let d={};for(let l of f){let _=W(FGSECOMAPP[a(298)],l);_?.[a(732)]>0?c=c[a(162)]([..._]):l.gifts[a(641)]($=>{let x=a;d[$[x(404)]]={...$,belongs_to_offer:l.id?.[x(469)]()}})}o=Object[a(307)](d)??[]}}return{arrGiftsAdd:c,arrGiftsRemove:r,arrGiftsData:o}},z=($,e)=>{let t=x,a=new Set;return $?.[t(763)]($=>a[t(787)]($[t(447)])),a.forEach($=>{let x=t,e=FGSECOMAPP.offers?.[x(541)](e=>e.id?.[x(469)]()===$?.[x(469)]());if(C(e)||!e.isReachConditions){FGSECOMAPP[x(724)]=FGSECOMAPP.arrOfferAdded?.filter(e=>e.belongs_to_offer?.[x(469)]()!==$?.[x(469)]());return}if(e[x(803)]>=0)return;let a=[],i=FGSECOMAPP[x(724)]?.filter(x=>x.belongs_to_offer?.toString()===$?.toString())??[];if(e?.[x(233)]?.[x(367)])a=a.concat([...i]),e.giftsAvailable=0;else for(let r of(FGSECOMAPP[x(298)]?.[x(636)]&&!C(e.giftsAddedInvalid)&&e[x(299)][x(763)]($=>{let t=x,i=FGSECOMAPP[t(724)][t(541)](x=>x.belongs_to_offer?.toString()===e.id?.[t(469)]()&&$.variant_id===x[t(729)]);if(C(i))return;let r=i.quantity-$[t(495)];e[t(803)]+=$[t(495)],r>0?i[t(495)]=r:(i.quantity=0,a[t(297)]({...i}))}),i)){if(e.giftsAvailable>=0)break;e[x(803)]+=r.quantity,e[x(803)]<=0?a[x(297)]({...r}):(r[x(495)]=e[x(803)],e[x(803)]=0)}a?.[x(763)]($=>{let e=x;FGSECOMAPP.arrOfferAdded=FGSECOMAPP[e(724)]?.filter(x=>$.variantId!==x[e(729)]||$[e(410)]?.[e(469)]()!==x.belongs_to_offer?.[e(469)]())})}),e?.[t(743)]($=>{let x=t;return g($)&&($[x(495)]=FGSECOMAPP[x(724)]?.[x(743)](e=>$[x(254)]===e[x(729)])?.[x(573)](($,e)=>$+e[x(495)],0)??0),$[x(495)]>0})??[]},V=async($,e)=>{let t=x,{arrGiftsAdd:a,arrGiftsRemove:i,arrGiftsData:r}=j($,e,!1),c=z(i,$);if(!C(i)){let o=j(c,e,!0);z(o?.arrGiftsRemove,$),a=o?.[t(382)],i=i?.[t(162)](o?.[t(446)])??[],r=o?.arrGiftsData}return await b(a,i),d()[t(398)](),r},W=($,e)=>{let t=x;try{let a=[],i=e[t(511)],r=i[t(573)](($,x)=>$+x.variants[t(732)],0);if(!$.auto_add_gift||r<=0)return[];let c=e[t(784)]?.[t(233)]?.[t(367)],o=e[t(784)]?.[t(442)]??{};if(o.status&&o[t(812)]===t(455)){let s=i[0][t(580)][0];0===s[t(563)]&&(a.push({variant_id:s[t(643)],quantity:e[t(803)],offer_id:e.id}),console[t(470)](t(268)+s[t(643)]+t(667)+s[t(559)]+t(667)+e.id+"}"))}else if(c){let n=(e?.[t(803)]??0)/r;i[t(763)]($=>$.variants?.[t(763)]($=>a[t(297)]({variant_id:$[t(643)],quantity:n,offer_id:e.id}))),console[t(470)](t(523)+e.id+"}")}else if(1===r){let f=i[0][t(580)][0];0===f[t(563)]&&(a.push({variant_id:f[t(643)],quantity:e[t(803)],offer_id:e.id}),console[t(470)](t(287)+f.variant_shopify_id+"} {"+f.variant_title+t(667)+e.id+"}"))}return a}catch(d){return console.error(d),[]}},X=$=>$===x(631),K=$=>{let e=x;try{let t=Shopify?.customGiftImgSize??FGSECOMAPP[e(616)]?.[e(746)]?.[e(678)]?.[e(427)]??e(227),a=new URL($),i=new URLSearchParams(t);return i.forEach(($,x)=>a[e(148)][e(820)](x,$)),a[e(469)]()}catch(r){return $}},Q=$=>{let t=x,a=$;if("by_variants"===FGSECOMAPP[t(366)][t(791)])for(let i of(a=[],$)){let r=i[t(580)];r&&r.length&&r[t(763)]($=>a[t(297)]({...i,thumbnail:$.thumbnail,variants:[$]}))}let c=document[t(201)](t(306));c&&(c[t(793)]=a[t(641)]($=>{let x=t,a=$?.variants[0]??{},i=X(a.variant_title),r=$[x(580)]?.[x(732)],c=h(S($[x(650)],$.title)),o=FGSECOMAPP.fgAppearanceGiftSlider?.show_gift_for_customer===x(474),s=document[x(153)](e[x(360)])?.innerHTML??e[x(830)];return s.replaceAll(/{{\s*fg_product_handle\s*}}/gm,h(w($[x(650)],$.original_product_handle),!0))[x(242)](/{{\s*fg_product_img\s*}}/gm,h(K($[x(783)]),!0))[x(242)](/{{\s*fg_product_img_alt\s*}}/gm,c).replaceAll(/{{\s*fg_product_title\s*}}/gm,c)[x(242)](/{{\s*fg_gifts_check_show_by_variants\s*}}/gm,h(o&&FGSECOMAPP[x(366)][x(770)]?"":x(257)))[x(242)](/{{\s*fg_gifts_check_show_by_products\s*}}/gm,o?x(257):"").replaceAll(/{{\s*fg_check_selected_variant\s*}}/gm,1===r?x(238)+(i?"sca-d-none":""):"").replaceAll(/{{\s*fg_variant_title\s*}}/gm,h(1!==r?m(FGSECOMAPP[x(366)][x(402)]??x(810),x(621)):a.variant_title))[x(242)](/{{\s*fg_original_price\s*}}/gm,h(E(a))).replaceAll(/{{\s*fg_gift_price\s*}}/gm,h(T(a)))[x(242)](/{{\s*sca_fg_variant_select_section\s*}}/gm,h(v($[x(580)],$[x(783)]))).replaceAll(/{{\s*fg_product_belongs_to_offer\s*}}/gm,$[x(410)])[x(242)](/{{\s*fg_variant_id\s*}}/gm,h(1===r?a[x(643)]:"")).replaceAll(/{{\s*fg_add_to_cart\s*}}/gm,h(m(FGSECOMAPP[x(366)]?.[x(376)]??"Add to cart",x(288))))})[t(777)](" \n"),new Glider(document[t(153)]("#fg-gift-items"),{slidesToShow:1,slidesToScroll:1,draggable:!1,dots:FGSECOMAPP[t(366)][t(602)]?t(569):null,arrows:{prev:t(316),next:t(290)},responsive:[{breakpoint:1024,settings:{slidesToShow:FGSECOMAPP[t(366)].number_product_slider??4,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]}),document[t(648)](new CustomEvent(FGSECOMAPP[t(276)].SHOW_GIFT_SLIDER,{detail:{addGiftToCartFunc:FGSECOMAPP[t(389)],gifts:$2(a)}})))},J=async()=>{let $=x;try{let e=window.fgData?.[$(397)]??[];for(let t in await $6(),FGSECOMAPP[$(243)])C(FGSECOMAPP[$(243)][t]?.id)&&delete FGSECOMAPP[$(243)][t];let a=[];e[$(763)](x=>{let e=$;FGSECOMAPP[e(345)]=FGSECOMAPP[e(345)].concat(x[e(395)][e(641)]($=>$[e(643)]));try{let t=JSON.parse(JSON[e(593)](x));if(x[e(442)][e(558)]){let i=x.offer_conditions[0].product_narrow,r=i[0].value,c=[...t[e(395)]],o=[...t[e(612)]];if(x.gift_should_the_same.type===e(455))for(let s in r){let n=r[s]?.[e(455)]??[];for(let f of n){t[e(754)][0][e(673)]=[{type:i[0][e(812)],value:{[s]:{...r[s],variant:[{...f}]}}}],t[e(395)]=c[e(743)]($=>$.original_product_shopify_id+""===s&&f.id===$[e(166)]),t[e(612)]=o[e(743)]($=>$[e(650)]+""===s),t.gift_products[0][e(580)]=[...t[e(395)]];let d=t[e(233)][e(348)],l=t[e(233)].auto_add_all_gifts;t[e(233)][e(367)]&&(d=t[e(395)][e(732)]),1===t[e(395)][e(732)]&&0===t.gift_items[0].price&&(l=!0),a[e(297)](JSON[e(829)](JSON[e(593)]({...t,gift_settings:{...t[e(233)],number_of_gift_can_receive:d,auto_add_all_gifts:l},id:t.id+"_"+r[s][e(496)]+"_"+f.id,offer_root:""+t.id})))}}else if("product"===x[e(442)][e(812)])for(let _ in r){t.offer_conditions[0][e(673)]=[{type:i[0][e(812)],value:{[_]:r[_]}}],t[e(395)]=c.filter($=>$[e(650)]+""===_),t[e(612)]=o[e(743)]($=>$[e(650)]+""===_);let g=t[e(233)][e(348)],u=t.gift_settings[e(367)];t.gift_settings[e(367)]&&(g=t.gift_items.length),1===t.gift_items[e(732)]&&0===t.gift_items[0][e(563)]&&(u=!0),a[e(297)](JSON[e(829)](JSON.stringify({...t,gift_settings:{...t.gift_settings,number_of_gift_can_receive:g,auto_add_all_gifts:u},id:t.id+"_"+r[_][e(496)],offer_root:""+t.id})))}}}catch(p){console[e(516)](p)}}),FGSECOMAPP[$(345)]=[...new Set(FGSECOMAPP[$(345)])],e=(e=(e=e?.[$(743)](x=>!x?.[$(442)]?.[$(558)])?.[$(162)](a))?.[$(641)](x=>{let e=$;return{...x,id:x.id[e(469)](),offer_root:(x[e(600)]??x.id).toString()}}))?.[$(743)](x=>{let e=$;if(!$t(x[e(831)],x[e(168)]))return!1;let t=!C(x[e(196)]?.[e(695)]||x[e(196)]?.[e(450)]);if(x.sub_conditions&&(!Y(x,SECOMAPP)||t&&C(SECOMAPP.customer[e(819)])))return!1;let a={...FGSECOMAPP[e(243)]},i=!1;if("stop_offer"===FGSECOMAPP[e(298)].sync_quantity){x[e(395)]=x?.[e(395)][e(743)]($=>{let x=a[$.original_product_shopify_id]?.[e(533)]??{};return x[$.original_variant_shopify_id]>0})??[];let r=x[e(395)]?.[e(641)]($=>$.variant_shopify_id);x[e(612)]=x?.[e(612)]?.filter($=>{let x=e;return $.variants=$?.variants?.[x(743)]($=>{let e=x;return r?.[e(613)]($[e(643)])}),$?.[x(580)]?.[x(732)]>0}),i=!0}else if(FGSECOMAPP.fgSettings[e(232)]){x.gift_items=x?.[e(395)][e(743)]($=>{let x=e,t=a[$[x(404)]]?.[x(533)]??{};return t[$[x(643)]]>0});let c=x[e(395)]?.[e(641)]($=>$[e(643)]);x[e(612)]=x?.[e(612)]?.[e(743)]($=>{let x=e;return $[x(580)]=$?.[x(580)]?.[x(743)]($=>{let e=x;return c?.[e(613)]($[e(643)])}),$?.[x(580)]?.length>0}),i=!0}return i&&x[e(233)]?.[e(367)]&&(x[e(233)][e(348)]=x[e(395)]?.[e(732)]),!i||x[e(395)]&&x.gift_items[e(732)]>0});let i=FGSECOMAPP?.[$(298)]?.cal_gift_discount===$(269)?"original_compare_at_price":$(403),r=FGSECOMAPP.fgSettings?.[$(636)],c=r===$(269)?$(247):"original_price";return e?.[$(641)](x=>{let e=$,t=x[e(395)][e(641)]($=>{let x=e;return $[x(368)]=C($[i])?$?.[x(403)]:$[i],r&&($[x(568)]=C($[c])?$?.[x(403)]:$[c]),$[x(650)]});return x[e(612)]=x[e(612)]?.[e(743)]($=>{let x=e;return $[x(580)]?.[x(763)]($=>{let e=x;$.cal_gift_price=C($[i])?$?.[e(403)]:$[i],r&&($[e(568)]=C($[c])?$?.[e(403)]:$[c])}),t[x(613)]($.original_product_shopify_id)}),x[e(754)]?.forEach($=>{let x=e;"money"===$[x(823)]&&($[x(817)]=O($[x(817)]),$[x(670)]=C($[x(670)])?$[x(670)]:O($[x(670)]))}),x})?.sort((x,e)=>x.priority-e[$(315)])}catch(o){return console[$(516)](o),[]}},Z=async()=>{let $=x;try{let e=[];window[$(542)]?.[$(397)]?.forEach(x=>{let t=$,a=[];x[t(612)][t(763)]($=>{let x=t,e=FGSECOMAPP?.[x(298)]?.sync_quantity===x(431)?$.original_product_handle??null:FGSECOMAPP?.[x(298)]?.[x(232)]?$[x(220)]??null:null;C(e)||a[x(297)](e)}),e=[...e,...a]}),await $h(e=(e=[...new Set(e)])[$(743)](x=>C(FGSECOMAPP[$(208)][x]))),Object[$(307)](FGSECOMAPP[$(208)])?.[$(763)](x=>{let e=$,{info:t}=x;C(t)||C(t?.id)||(FGSECOMAPP[e(243)][t.id]={...t})})}catch(t){console[$(516)](t)}},$$=$=>{let e=x;try{C($)?(FGSECOMAPP[e(724)]=[],localStorage[e(147)](e(794),LZString[e(822)](JSON[e(593)](FGSECOMAPP[e(724)])))):FGSECOMAPP[e(724)]=JSON[e(829)](LZString[e(159)](localStorage[e(685)](e(794))))}catch(t){FGSECOMAPP[e(724)]=[],localStorage[e(147)](e(794),LZString[e(822)](JSON[e(593)](FGSECOMAPP[e(724)])))}let a={};FGSECOMAPP[e(397)]?.[e(763)]($=>{let x=e;a[$.id]=$?.[x(395)]?.[x(641)]($=>$[x(643)])});let i=Object[e(632)](a);FGSECOMAPP[e(724)]=FGSECOMAPP[e(724)]?.[e(743)]($=>i?.includes($[e(410)]?.[e(469)]())&&a[$[e(410)]?.[e(469)]()][e(613)]($.variantId));let r={};FGSECOMAPP[e(724)]?.[e(763)]($=>{let x=e,t=r[$[x(410)]+"_"+$[x(729)]]??{};r[$[x(410)]+"_"+$.variantId]={...$,belongs_to_offer:$[x(410)]?.[x(469)](),quantity:(t?.quantity??0)+($?.quantity??0)}}),FGSECOMAPP.arrOfferAdded=Object[e(307)](r),localStorage[e(147)](e(794),LZString[e(822)](JSON[e(593)](FGSECOMAPP[e(724)])))},$x=()=>{let $=x;FGSECOMAPP.QUERY_SELECTOR={cart_drawer_query:{tool:[$(197),I($(747))]},cart_icon_query:{default:[$(821)],tool:[$(250),I($(548))]},gift_icon_product_query:{default:[".product_name, .product-title, .product__title, .product-single__title, .tt-title, .ProductMeta__Title"],integration:[$(725)],tool:[".fg-secomapp-product-title",I($(705))]},gift_icon_collection_query:{default:[$(206),".cc-product-list .product-block, .collection-list.grid .grid__item, .collection-grid.grid .grid__item"],integration:[".m-product-item, .m-product-list .swiper-slide, .f-grid .f-column",$(760)],tool:[$(654),I($(672))]},gift_thumbnail_query:{default:[$(329)],integration:[$(335)],tool:[".fg-secomapp-handle-add-to-cart",I($(213))]},cart_message_query:{default:[$(462)],integration:[$(489),$(301),".satcb-cs .satcb-cs-top-container, #monster-upsell-cart #monster-cart-wrapper div[class*=custom_scrollbar]","div[class*=hs-cart-drawer] .hs-site-cart-popup-layout, #MinimogCartDrawer m-cart-drawer-items, #CartDrawer .drawer__inner",$(731)],tool:[$(706),I($(282))]},checkout_btn_query:{default:[$(355),$(519),$(263),$(728)],integration:[$(554),$(500)],tool:[$(209),I("sca_fg_form_checkbox_button_query")]}}},$0=async $=>{let e=x;document[e(648)](new CustomEvent(FGSECOMAPP[e(276)][e(619)],{detail:{}})),$x(),A(),FGSECOMAPP[e(412)](),(FGSECOMAPP?.[e(298)]?.[e(717)]==="stop_offer"||FGSECOMAPP?.fgSettings?.[e(232)])&&await Z(),FGSECOMAPP[e(397)]=await J(),FGSECOMAPP[e(399)](),r(),s(),$$($);let t=await V($,FGSECOMAPP.offers);await $a(t),$v(),$y(),$3(),$7(),document[e(648)](new CustomEvent(FGSECOMAPP[e(276)][e(396)],{detail:{}}))},$e=function(){let $=x,e=document[$(365)]("[data-open]"),t=document[$(365)]("#freegifts-main-popup-container [data-close]"),i=$(764),r=document.querySelectorAll($(545)),c=r[$(732)];for(let o=0;o{let e=$;x.target===document[e(153)](e(394))&&(document[e(153)]("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg").classList[e(781)](i),a())}),document[$(702)]($(611),x=>{let e=$;x[e(387)]===e(195)&&document[e(153)](e(394))&&(document[e(153)](e(394))[e(497)][e(781)](i),a())}),document.querySelectorAll($(324))[$(763)](x=>x.addEventListener($(792),function(){let x=$;this[x(158)](x(626),1),this[x(726)](),this[x(497)][x(531)](x(677)),this[x(153)](".dropdown-menu").classList[x(531)](x(603))})),document[$(365)]($(324)).forEach(x=>document[$(702)]($(792),function(e){let t=$,a=x[t(615)](e[t(390)]);a||(x[t(497)].remove(t(677)),x.querySelector(t(214))[t(497)][t(781)](t(603))),document[t(365)](".btn-add-to-cart.sca-fg-out-stock")[t(763)]($=>{let x=t;$[x(652)]=!0,$[x(709)][x(439)]=x(552)})})),document[$(365)]($(285))[$(763)](x=>{let e=$;x[e(702)](e(792),function(){let $=e,x=this[$(191)]("id"),t=this[$(191)]($(458)),a=this[$(191)]("data-price"),i=this.getAttribute($(311)),r=this.getAttribute($(682)),c=this.parentElement[$(490)][$(490)][$(490)];c[$(153)]($(498))[$(158)]("src",t);let o=new URL(c[$(153)]($(738)).href);o.searchParams.set("variant",r),c.querySelector($(738))[$(200)]=o.toString();let s=this[$(490)][$(490)][$(490)];s[$(153)]($(586))[$(828)]=i,s.querySelector($(595)).textContent=a;let n=s?.[$(153)]($(386));n[$(158)]("data-variant",x),n[$(652)]=!1,n[$(709)]="";let f=this.parentElement[$(490)].querySelector($(190));f[$(497)].add($(677)),f[$(793)]=this[$(221)]})}),document.querySelectorAll($(545))[$(763)](x=>x[$(702)]($(792),async function(){let x=$,e=this[x(191)](x(671))-0,t=this[x(191)]("data-offer");try{await _(e,1,t);let a=document[x(153)]("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg");a&&(FGSECOMAPP.isDelayShowAdded=!0,await new Promise($=>setTimeout($,800)),a[x(497)][x(781)](i)),window[x(401)][x(200)][x(613)](x(779))?location.reload():"function"==typeof Shopify?.[x(422)]&&await Shopify?.[x(422)](0===FGSECOMAPP[x(597)][x(732)]?function(){}:FGSECOMAPP.fgCallback[0])}catch(r){console[x(516)](r)}}))},$t=($,e)=>{let t=x;if($){let a=new Date,i=a[t(457)](),r=new Date($)[t(457)]();if(!e)return i>=r;{let c=new Date(e).getTime();return i>=r&&i<=c}}return!1},$a=async $=>{let e=x;$&&$.length>0&&(FGSECOMAPP[e(594)]?(await new Promise($=>setTimeout($,1500)),FGSECOMAPP[e(594)]=!1,y(),Q($)):(y(),Q($))),$e(),FGSECOMAPP[e(412)](),FGSECOMAPP[e(686)](FGSECOMAPP.offers),$o=[]},$i=async $=>{let e=x;$o=[];let t=new URL(window[e(401)][e(200)]);t[e(148)].set(e(175),""),i(t[e(469)]())[e(398)]($=>$[e(584)]())[e(398)]($=>{let x=e,t=new DOMParser,a=t[x(192)]($,x(145)),{cart_drawer_query:i,cart_icon_query:r}=FGSECOMAPP[x(660)],c=[...i?.tool][x(743)](Boolean)[x(777)](","),o=[...r?.tool].filter(Boolean)[x(777)](","),s=[...r?.[x(163)]].filter(Boolean)[x(777)](","),n=document[x(153)](c),f=!1;n&&(f=!0,n[x(793)]=a.querySelector(c)?.[x(793)]??n[x(793)]);let d=document.querySelector(o);d||(d=document[x(153)](s)),d&&(f=!0,d[x(793)]=a.querySelector(o)?.[x(793)]??a[x(153)](s)?.[x(793)]??d[x(793)]),f||console[x(470)](x(239))}),"function"==typeof FGSECOMAPP?.[e(753)]&&await FGSECOMAPP[e(753)](),document[e(648)](new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS[e(420)],{detail:{}})),p(e(331)),setTimeout(function(){$a($)},800)},$r=async $=>{let e=x,t=await i(e(441)+($??""),{method:e(210),headers:{Accept:e(562),"Content-Type":"application/json"}})[e(398)]($=>$.json()),a=t.items;return FGSECOMAPP[e(596)]=t,FGSECOMAPP[e(293)]=a?.map($=>{let x=e;return{...FGSECOMAPP[x(293)]?.[x(541)](x=>x.id===$.id),...$}})??[],t},$c=async()=>{let $=x,e=FGSECOMAPP[$(596)];try{await i(SECOMAPP[$(570)],{method:$(210),headers:{"Content-Type":"application/liquid"}})[$(398)](async x=>{let t=$,a=await x[t(749)]();FGSECOMAPP.cartItems=a?.[t(518)]?.map($=>{let x=t;return{...FGSECOMAPP[x(293)]?.[x(541)](x=>x.id===$.id),...$[x(512)],collections:$[x(608)],tags:$[x(467)]}})??[],FGSECOMAPP[t(596)]=a?.shopify_cart??{},e=FGSECOMAPP[t(596)]}).catch(async x=>{let t=$;console[t(516)](t(416)+x.message),e=await $r()})}catch(t){console[$(516)]($(361),t.message),e=await $r()}return e},$o=[],$s=async $=>{let e=x;try{$o[e(297)]($[0]),document[e(648)](new CustomEvent(FGSECOMAPP[e(276)][e(662)],{detail:{events:$o}})),await $c();let t=await V(FGSECOMAPP[e(293)],FGSECOMAPP[e(397)]);FGSECOMAPP.renderPromotionMessage(FGSECOMAPP[e(397)]);let a=!1;return $[0][e(146)](e(198))&&JSON[e(593)]($[1][e(179)]??[])[e(613)](e(433))?(console[e(470)](e(624),[...$o]),await $i(t),a=!0):$[0][e(146)](e(461))&&JSON[e(593)]($[1][e(179)]??[])[e(613)](e(599))?(console[e(470)](e(408),[...$o]),await $i(t),a=!0):(console[e(470)](e(543),[...$o]),await $a(t)),$4(),a&&(window[e(401)][e(200)][e(613)](e(779))||"fg-checkout"===document[e(153)](e(574))?.getAttribute("data-template"))&&($o=[],location.reload()),document[e(648)](new CustomEvent(FGSECOMAPP[e(276)][e(684)],{detail:{events:$o}})),FGSECOMAPP[e(293)]}catch(i){console[e(516)](i)}},$n=()=>{let $=x;if(!Shopify?.[$(761)])return;let e=document[$(153)]($(272));if(!e)return;e[$(793)]="";let t=Shopify?.[$(638)]??"Add gift to cart successfully!",a=document.createElement("li");a[$(352)]="sca-fg-toast sca-fg-success",a[$(793)]=$(688)+t+' \n
\n \n \n \n \n \n ',e[$(694)](a),a[$(415)]=setTimeout(()=>$f(a),3e3),document[$(153)]($(436))?.[$(702)]($(792),()=>$f(a))},$f=$=>{let e=x;$[e(497)].add(e(767)),$[e(415)]&&clearTimeout($[e(415)]),setTimeout(()=>$.remove(),500)},$d=$=>{let e=x;try{let t=FGSECOMAPP.fgSettings?.mode_override_checkout,a=t===e(226)?$.target:$[e(466)]??$[e(390)];a?.hasAttribute(e(207))||(a=document.querySelector(e(697))?.[e(358)]);let i=JSON[e(829)](a[e(191)](e(713)));if(a[e(776)]=i?.value??"",a.innerHTML=i?.[e(793)]??"",a[e(652)]=!1,a[e(353)](e(792),$l),a[e(818)](e(207)),"clone_checkout"===t){a[e(358)].querySelector(e(623))[e(792)]();return}t===e(226)&&window.removeEventListener(e(792),$8,!0),a[e(792)]()}catch(r){window[e(401)].replace((Shopify?.routes?.[e(229)]??"/")+e(575)),console[e(516)](r[e(618)])}};FGSECOMAPP[x(477)]=async($,e)=>{let t=x;if("start"===$&&e)e[t(652)]=!0,e.setAttribute(t(713),JSON[t(593)]({innerHTML:e[t(793)],value:e[t(776)]})),typeof FGSECOMAPP?.[t(748)]===t(151)?await FGSECOMAPP.scaCustomLoadingCheckout($):(e[t(776)]=Shopify?.[t(666)]??t(758),e.innerHTML=Shopify?.sca_fg_innerHTML??t(199));else if($===t(331)&&e){if("function"==typeof FGSECOMAPP?.[t(748)])await FGSECOMAPP[t(748)]($);else{let a=JSON[t(829)](e.getAttribute(t(713)));e[t(776)]=a?.[t(776)]??"",e[t(793)]=a?.[t(793)]??""}e[t(652)]=!1}else"error"===$?(typeof FGSECOMAPP?.[t(748)]===t(151)&&await FGSECOMAPP[t(748)]($),window[t(401)][t(454)]((Shopify?.[t(566)]?.[t(229)]??"/")+"checkout")):console[t(516)]("Cannot define custom loading with type: ",$)};let $l=async $=>{let e=x;try{$[e(253)](),$[e(565)](),$[e(279)]();let t=FGSECOMAPP[e(298)]?.mode_override_checkout,a="trigger_body"===t?$[e(390)]:$[e(466)]??$[e(390)],{form:r}=a;if(await FGSECOMAPP[e(477)](e(428),a),document[e(648)](new CustomEvent(FGSECOMAPP[e(276)].START_VALIDATE_CHECKOUT,{detail:{}})),FGSECOMAPP[e(304)])return!1;FGSECOMAPP[e(304)]=!0;try{if(!Shopify?.[e(328)]){let c=new URL(r.action);c[e(148)][e(413)](e(592),""),await i(c[e(469)](),{method:e(164),body:new FormData(r)})}}catch(o){console[e(470)](e(225))}if(C(FGSECOMAPP.offers)&&C(FGSECOMAPP[e(293)]?.[e(541)]($=>g($))))return console[e(470)](e(547)),$d($),!1;await $c();let s=[...FGSECOMAPP[e(293)]],{arrGiftsRemove:n}=j(s,FGSECOMAPP.offers,!1);if(await V(s,FGSECOMAPP[e(397)]),n?.[e(732)]>0)location[e(336)]();else try{FGSECOMAPP[e(298)][e(567)]&&!C(FGSECOMAPP.cartItems?.[e(541)]($=>g($)))?await i(SECOMAPP[e(570)]+e(157)+Shopify?.[e(657)],{method:e(210),headers:{"Content-Type":e(639)}})[e(398)](async $=>{let x=e,t=await $[x(749)]();t[x(518)]=(t.cart??[])[x(641)]($=>{let e=x;return $[e(512)][e(608)]=$[e(608)]?.[e(641)]($=>({id:$.id})),$[e(512)][e(467)]=$[e(467)],{id:$[e(512)].id,variant_id:$[e(512)][e(254)],title:$[e(512)][e(423)],handle:$[e(512)][e(496)],price:k($[e(512)]),quantity:$[e(512)][e(495)],product_type:$[e(512)][e(759)],vendor:$[e(512)][e(236)],tags:$[e(512)][e(467)],collections:$.product.collections,selling_plan_allocation:$[e(512)][e(337)]}}),t.others={arr_offer_added:FGSECOMAPP.arrOfferAdded,secomapp:{customer:SECOMAPP?.[x(664)]??{},fg_codes:SECOMAPP?.[x(572)]??[],fgSettings:FGSECOMAPP[x(298)]},cookie_fg_code:B("sca_fg_codes"),shopify_currency:Shopify?.[x(231)]},await i(SECOMAPP[x(570)]+"&data_checkout="+LZString[x(456)](t=JSON[x(593)](t)),{method:x(210),headers:{"Content-Type":x(639)}})[x(398)](async $=>{let e=x,t=await $.json();try{FGSECOMAPP[e(304)]=!1,t[e(270)]&&(window.location[e(200)]=t[e(270)][e(325)])}catch(a){console[e(516)](a)}})}):(console.log(e(384)),FGSECOMAPP[e(304)]=!1,$d($))}catch(f){FGSECOMAPP[e(304)]=!1,$d(f)}await FGSECOMAPP[e(477)](e(331),a=t===e(226)?$.target:$[e(466)]??$[e(390)]),document[e(648)](new CustomEvent(FGSECOMAPP[e(276)][e(362)],{detail:{status:e(364)}}))}catch(d){await FGSECOMAPP[e(477)](e(516)),document.dispatchEvent(new CustomEvent(FGSECOMAPP[e(276)][e(362)],{detail:{status:e(516)}})),console[e(516)](d)}},$8=async $=>{let e=x;$[e(390)]?.[e(775)](e(207))&&await $l($)},$_=()=>{let $=x,e=FGSECOMAPP.fgSettings?.[$(658)],{checkout_btn_query:t}=FGSECOMAPP[$(660)],a=[...t?.tool,...t?.[$(407)],...t?.[$(163)]][$(743)](Boolean)[$(777)](",");document.querySelectorAll(a)[$(763)](x=>{let t=$,a=x.hasAttribute(t(719)),i=x.hasAttribute(t(476)),r=x[t(775)](t(207));if(e===t(487)){if(a)return;if(!i&&!r){let c=x.cloneNode(!0);c[t(702)](t(792),$l),c[t(158)](t(207),""),c[t(158)](t(476),""),x[t(709)][t(475)]=t(757),x[t(709)][t(508)]=t(514),x[t(709)].opacity="0",x[t(158)](t(719),""),x[t(358)]?.appendChild(c)}i&&!r&&(x[t(702)](t(792),$l),x[t(158)](t(207),""))}else"trigger_body"===e?x[t(158)](t(207),""):r||(x[t(702)](t(792),$l),x.setAttribute("sca_handle_checkout",""));FGSECOMAPP.hasDoneProcessCheckout=!0}),e===$(226)&&window[$(702)]("click",$8,!0)};FGSECOMAPP[x(412)]=()=>{FGSECOMAPP.scaCountRenderEventCheckout=0;let $=setInterval(()=>{let x=_0x2f65;$_(),FGSECOMAPP[x(610)]++,(FGSECOMAPP[x(610)]>10||FGSECOMAPP[x(681)])&&(FGSECOMAPP[x(610)]=0,clearInterval($))},400)};let $g=$=>{let e=x;try{let t={},a={},i=FGSECOMAPP[e(397)];if(C($)){$=[],C(Shopify?.current_product)||$[e(297)]({...Shopify?.[e(668)]});let r={...Shopify?.other_products,...Shopify?.current_collection?.[e(194)]};Object.values(FGSECOMAPP[e(208)])?.[e(743)]($=>!C($[e(564)])&&(C($?.product_has_icon)||$?.[e(174)]&&!$?.[e(727)]?.[e(258)]($=>$?.classList?.contains("sca-gift-icon-collection-page"))))?.[e(763)]($=>{let x=e;r[$[x(564)].id]={...$[x(564)]}}),$=$.concat([...Object.values(r)])}$?.[e(763)]($=>{let x=e,t=FGSECOMAPP[x(208)][$[x(496)]];FGSECOMAPP[x(208)][$.handle]={...t,info:{...$},product_has_icon:!!C(i)&&void 0}});let c=FGSECOMAPP[e(298)]?.[e(636)];for(let o in i?.[e(763)](x=>{let i=e,r=x.offer_conditions;if(1===r[i(732)]&&r[0][i(823)]===i(617)&&typeof r[0][i(370)]===i(172)){let o,s=r[0][i(673)];s?.[i(763)](x=>{let e=i;switch(x[e(812)]){case e(634):o=Object[e(307)](x.value);break;case e(609):let t=Object[e(632)](x[e(776)]);t[e(732)]>0&&(o=(void 0===o?$:o)?.[e(743)]($=>t.includes($[e(812)]))??[]);break;case"product_vendors":let a=Object[e(632)](x.value);a[e(732)]>0&&(o=(void 0===o?$:o)?.[e(743)]($=>a[e(613)]($.vendor))??[]);break;case e(560):let r=Object[e(632)](x[e(776)]);r[e(732)]>0&&(o=(void 0===o?$:o)?.[e(743)]($=>{let x=e,t=$[x(608)]?.map($=>$.id+""),a=t?.[x(743)]($=>r[x(613)]($));return!C(a)})??[])}}),o?.[i(763)]($=>{let e=i,r=$[e(496)],o=JSON[e(829)](JSON.stringify(x[e(612)])),s=FGSECOMAPP.productsInPage[r]?.[e(564)]??{};if(FGSECOMAPP[e(298)]?.not_show_gift_if_already_on_cart&&(o=o[e(743)]($=>$[e(650)]!==s?.id)),c&&(o=o[e(743)]($=>{let x=e;return $[x(580)].some($=>$?.[x(568)]<=s?.[x(235)]/100)}),C(o)))return;if(t[r]){let n=t[r];o?.forEach($=>{let t=e,a=n[t(541)](x=>x.original_product_shopify_id===$[t(650)]);if(C(a)){n[t(297)]({...$,belongs_to_offer:[x.offer_root]});return}let i=$[t(580)][t(641)]($=>$.original_variant_shopify_id);a[t(410)]?.[t(613)](x[t(600)])||a.belongs_to_offer?.[t(297)](x[t(600)]),a[t(580)]=a?.[t(580)]?.filter($=>!i[t(613)]($[t(166)]))??[],a[t(580)]=[...a[t(580)],...$[t(580)]]}),t[r]=n}else t[r]=o?.map($=>({...$,belongs_to_offer:[x[e(600)]]}));let f=($[e(580)]??$[e(455)])?.[e(641)]($=>$.id)??[];a[r]={},FGSECOMAPP[e(208)][r]?.[e(564)]?.variants?.[e(743)]($=>f[e(613)]($.id))?.forEach($=>{let x=e;a[r][$.id]=o[x(743)](e=>{let t=x,a=e[t(580)];return c&&(a=a.filter(x=>x?.[t(568)]<=$.price/100)),!C(a)})})})}}),t){let s=FGSECOMAPP[e(208)][o];FGSECOMAPP.productsInPage[o]={...s,gifts_will_receive:[...t[o]],product_has_icon:!0,variants_has_gift:{...a[o]}}}return Object[e(711)](t)?.length?t:{}}catch(n){return console[e(516)](n),null}},$u=$=>{let t=x,a=FGSECOMAPP[t(303)][t(357)]??{};if(!a[t(676)]?.[t(558)])return!1;let i=document[t(153)](e[t(318)])?.[t(793)]??e[t(409)],r=$?.[t(641)]($=>i[t(242)](/{{\s*fg_product_handle\s*}}/gm,h(w($.original_product_shopify_id,$[t(223)]),!0))[t(242)](/{{\s*fg_product_img\s*}}/gm,h(K($[t(783)]),!0))[t(242)](/{{\s*fg_product_img_alt\s*}}/gm,h(S($[t(650)],$[t(423)]))))[t(777)](""),c=document[t(153)](e.GIFT_THUMBNAIL_SECTION_ID)?.[t(793)]??e.GIFT_THUMBNAIL_SECTION,o=c[t(242)](/{{\s*fg_gift_thumbnail_title\s*}}/gm,h(m(a[t(676)]?.title??"Free Gift",t(811))))[t(242)](/{{\s*sca_fg_gift_thumbnail_items_section\s*}}/gm,r).replaceAll(/{{\s*fg_check_show_narrow\s*}}/gm,$?.[t(732)]>=4?"":t(257)),{gift_thumbnail_query:s}=FGSECOMAPP[t(660)]??{},n=[...s?.[t(627)]][t(743)](Boolean).join(","),f=[...s?.[t(407)],...s?.default][t(743)](Boolean)[t(777)](",");t(335);let d=document[t(153)](n)??document[t(153)](f);if(!d)return;d[t(358)][t(709)].width=t(161),d[t(358)].style[t(388)]=t(796),d[t(358)]?.[t(352)]?.[t(613)](t(687))||d[t(358)]?.[t(497)]?.[t(787)](t(687));let l=d.parentNode[t(153)](t(482));if(l)l[t(793)]=o;else{(l=document.createElement("div")).setAttribute("id",t(240));let _=new DOMParser()[t(192)](o,"text/html");l[t(793)]=_[t(696)][t(793)],d[t(358)][t(556)](l,d)}d[t(358)][t(556)](l,d);let g=document[t(153)]("#fg-gift-thumbnail-title");if(g)switch(a[t(676)]?.[t(183)]){case"32":g.style.maxWidth="50%";break;case"50":g.style[t(577)]=t(712);break;case t(160):g.style[t(577)]="70%";break;case t(203):g[t(709)].maxWidth=t(555);break;case"240":g[t(709)][t(577)]="100%";break;default:g.style[t(577)]=t(712)}if($?.[t(732)]>=(Shopify?.[t(445)]??4))new Glider(document.querySelector(t(692)),{slidesToShow:(Shopify?.[t(445)]??4)-1,slidesToScroll:1,draggable:!0,dots:t(651),arrows:{prev:t(275),next:t(807)}});else{g&&(g[t(709)].maxWidth="100%");let u=document.querySelector(t(692));u&&(u[t(709)][t(475)]="flex")}return $},$p=()=>{let $=x;if(!(FGSECOMAPP.fgAppearanceGiftIcon[$(357)]??{})[$(351)]?.[$(558)])return!1;let t=document[$(153)](e[$(601)])?.[$(793)]??e[$(826)],a=t[$(242)](/{{\s*fg_gift_icon\s*}}/gm,FGSECOMAPP[$(303)][$(291)])[$(242)](/{{\s*fg_gift_icon_alt\s*}}/gm,$(333)).replaceAll(/{{\s*fg_class_product_or_collection_page\s*}}/gm,$(505)),{gift_icon_product_query:i}=FGSECOMAPP[$(660)],r=[...i?.[$(627)]][$(743)](Boolean)[$(777)](","),c=[...i?.[$(163)],...i?.[$(407)]][$(743)](Boolean).join(","),o=document[$(153)](r)??document.querySelector(c);if(!o)return;o[$(709)][$(262)]=$(144),o.style[$(181)]="fit-content",o[$(352)]?.[$(613)]($(527))||o[$(497)]?.[$(787)]($(527));let s=o[$(153)]($(346));if(s)s.innerHTML=a;else{(s=document[$(274)]($(167)))[$(158)]("id",$(255));let n=new DOMParser()[$(192)](a,$(145));s.innerHTML=n[$(696)][$(793)],o.appendChild(s)}return FGSECOMAPP.fgAppearanceGiftIcon[$(291)]},$1=()=>{let $=x,e=[],{gift_icon_collection_query:t}=FGSECOMAPP[$(660)],a=[...t?.tool,...t?.[$(407)],...t?.default][$(743)](Boolean)[$(777)](",");return document[$(365)](a)[$(763)](x=>{let t=$,a=x[t(153)](t(529)),i=a?.[t(191)](t(200))?.split("/")??[],r=i?.[t(308)]("products"),c=r>=0?i[r+1]??null:null;if(c=c?.[t(750)]("?")?.shift(),g(c)){x[t(781)]();return}let o=x[t(153)]('a[href*="/collections/sca_fg"]');if(o){x[t(781)]();return}if(C(c))return;let s=decodeURI(c);C(FGSECOMAPP[t(208)][s]?.info)&&e[t(297)](s);let n=(FGSECOMAPP[t(208)][s]?.[t(727)]??[]).filter($=>!x[t(432)]($));n[t(297)](x),FGSECOMAPP[t(208)][s]={...FGSECOMAPP[t(208)][s],positions:[...n]}}),e},$b=$=>{let t=x;Object[t(632)]($)?.[t(763)]($=>{let x=t,a=FGSECOMAPP[x(208)][$]?.positions??[];if(C(a)||!Array[x(170)](a))return;if(!(FGSECOMAPP[x(303)][x(430)]??{})[x(558)])return;let i=document[x(153)](e[x(601)])?.[x(793)]??e.GIFT_ICON_SECTION,r=i[x(242)](/{{\s*fg_gift_icon\s*}}/gm,FGSECOMAPP[x(303)][x(291)]).replaceAll(/{{\s*fg_gift_icon_alt\s*}}/gm,x(333))[x(242)](/{{\s*fg_class_product_or_collection_page\s*}}/gm,x(700));a[x(763)]($=>{let e=x;$.style[e(262)]=e(144),$[e(352)]?.[e(613)](e(585))||$.classList?.[e(787)](e(585));let t=$[e(153)](e(310));if(t)t[e(793)]=r;else{(t=document.createElement(e(167))).setAttribute("class",e(797));let a=new DOMParser()[e(192)](r,e(145));t[e(793)]=a[e(696)][e(793)],$.appendChild(t)}})})},$m=async $=>{let e=x;await i(SECOMAPP.freegiftProxy+e(237)+LZString.compressToEncodedURIComponent(JSON.stringify($)),{method:e(210),headers:{"Content-Type":"application/liquid"}})[e(398)](async $=>{let x=e,t=await $[x(749)](),a=[];t?.products?.[x(763)]($=>{let e=x;C($?.products?.id)||a[e(297)]({...$.products,collections:$[e(608)],variants_quantity:$[e(533)]})});let i=$g(a);$b(i)})[e(187)]($=>{console[e(516)]($)})},$h=async $=>{let e=x,t=[];for(let[a,i]of $[e(711)]())C(FGSECOMAPP[e(208)][i]?.[e(564)])&&t.push(i),20===t.length&&(await $m([...t]),t=[]),a===$[e(732)]-1&&t[e(732)]>0&&(await $m([...t]),t=[])},$7=()=>{let $=$1(),e=$g();$b(e),$h($)[x(398)]()},$y=()=>{let $=x;Shopify?.[$(424)]&&document.addEventListener($(443),function(){let x=$,e=new URL(document[x(260)]),t=parseInt(e[x(148)][x(173)](x(455)));$3(isNaN(t)?void 0:t)})},$3=$=>{let e=x;if(!location[e(200)].includes(e(341)))return;document[e(153)](e(346))?.[e(781)](),document[e(153)](e(482))?.[e(781)]();let t=$g();if(C(t))return;let a=location[e(785)][e(750)]("/"),i=a?.[e(308)](e(194)),r=decodeURI(i>=0?a[i+1]??null:null);if(!Object[e(632)](t)?.[e(613)](r))return;let c=t[r],o=FGSECOMAPP[e(208)][r]?.variants_has_gift??{},s=Object.keys(o),n=!0;Shopify?.[e(424)]&&(C($)||s[e(613)](""+$)||(n=!1),!C($)||C(Shopify?.[e(668)]?.current_variant)||s[e(613)](Shopify?.[e(668)]?.[e(323)]?.id?.[e(469)]())||(n=!1),c=o[$??Shopify?.[e(668)]?.[e(323)]?.id]??[]),document.dispatchEvent(new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS.PRODUCT_HAS_GIFTS,{detail:{icon:FGSECOMAPP[e(303)][e(291)],gifts:$2(c),product:{handle:r,variant:$??Shopify?.[e(668)]?.[e(323)]?.id}}})),n&&($u(c),$p(c))};FGSECOMAPP[x(686)]=$=>{let t=x;try{if(!FGSECOMAPP[t(313)].show_on_cart_page)return;C($)&&($=[...FGSECOMAPP.offers]);let a=location[t(200)][t(613)](t(779)),i=[];if($?.[t(763)]($=>{let x=t;$[x(464)]||C($[x(177)])||!C(FGSECOMAPP[x(437)])&&!$[x(464)]&&$[x(315)]>FGSECOMAPP[x(437)]||C(($[x(278)]??0)+($[x(372)]??0))&&/({{sca_min_total}})|({{sca_min_quantity}})/gm.test($[x(177)])||i[x(297)]({value:m($[x(177)],x(215)+$.offer_root)[x(242)](x(400),$[x(278)]?.[x(606)](Shopify?.sca_amount_fixed??2))[x(242)](x(155),$[x(372)]),offer_root:$[x(600)]})}),document[t(648)](new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS[t(553)],{detail:{data:i}})),C(i)){document[t(365)](t(715))[t(763)]($=>$[t(793)]="");return}let r=document[t(153)](e[t(204)])?.[t(793)]??e[t(507)],c=i[t(641)]($=>r[t(242)](/{{\s*fg_cart_message\s*}}/gm,h($[t(776)]))).join(""),o=document[t(153)](e[t(284)])?.[t(793)]??e.CART_MSG_SECTION,s=o[t(242)](/{{\s*sca_fg_cart_message_items_section\s*}}/gm,c),{cart_message_query:n}=FGSECOMAPP[t(660)],f=document.querySelector([...n?.[t(163)]][t(743)](Boolean)[t(777)](",")),d=document[t(365)]([...n?.tool,...n?.[t(407)]][t(743)](Boolean)[t(777)](",")),l=document[t(365)](t(715));C(l)||l[t(763)]($=>$[t(793)]=s),(l=document[t(274)]("div"))[t(158)]("id",t(426)),l[t(497)][t(787)](t(426));let _=new DOMParser()[t(192)](s,t(145));l.innerHTML=_.body.innerHTML,C(d)||d?.[t(763)]($=>{let x=t;if($[x(153)](".sca-promotion-message-layout"))return;let e=l[x(773)](!0);$.prepend(e)}),!f?.querySelector(t(715))&&(_=new DOMParser()[t(192)](s,t(145)),l[t(793)]=_[t(696)][t(793)],f&&a&&f[t(472)](l));try{document.querySelectorAll(t(536))[t(763)]($=>{let x=new Glider($);(($,x)=>{let e=_0x2f65,t=$.track[e(637)],a=null,i=1;function r(){a=setTimeout(()=>{i>=t&&(i=0),$.scrollItem(i++)},x)}$[e(535)][e(702)](e(680),function(){window[e(503)](a),r()}),r()})(x,Shopify?.[t(590)]??3e3)})}catch(g){console[t(516)](g)}}catch(u){console[t(516)](u)}};let $6=async()=>{let $=x;try{let e=await i($(675)),t=await e[$(749)]();FGSECOMAPP.customerLocation=t?.[$(735)]}catch(a){console.log($(525))}},$2=($,e)=>{let t=x;return $?.[t(641)]($=>{let x=t;return{id:$[x(404)],title:S($[x(650)],$[x(423)]),handle:$.original_product_handle,thumbnail:$.thumbnail,belongs_to_offer:$[x(410)]??""+e,variants:$[x(580)][x(641)]($=>{let e=x;return{id:$[e(643)],title:$.variant_title,price:O($.price),original_price:O($[e(403)]),thumbnail:$.thumbnail,discount_type:$[e(704)],discount_value:$[e(309)]}})}})??[]},$v=()=>{let $=x;if(!FGSECOMAPP[$(714)]?.[$(744)]?.[$(530)]||!FGSECOMAPP[$(397)].length)return;let t=document[$(153)]($(478)),a=document.querySelector($(752));if(!t||!a)return;let i=document[$(153)](e.TODAY_OFFER_SECTION_ID)?.[$(793)]??e[$(614)],r=document.querySelector(e[$(317)])?.[$(793)]??e[$(690)],c=document[$(153)](e[$(741)])?.[$(793)]??e[$(737)],o={};FGSECOMAPP[$(397)][$(763)](x=>{let e=$;o[x[e(600)]]=x});let s=Object[$(307)](o);s[$(494)]((x,e)=>new Date(x.start_time)-new Date(e[$(831)])),t.innerHTML=c.replaceAll(/{{\s*sca_fg_today_offer_widget\s*}}/gm,h(FGSECOMAPP[$(714)][$(591)])),FGSECOMAPP[$(714)]?.[$(744)].widget_position===$(723)&&(t[$(497)].add($(273)),a[$(497)][$(787)]($(649))),FGSECOMAPP[$(714)]?.widget_info[$(429)]===$(154)&&(t[$(497)][$(787)]("sca-today-offer-widget-right"),a[$(497)][$(787)]($(300))),a[$(793)]=i[$(242)](/{{\s*sca_fg_today_offer_title\s*}}/gm,h(m(FGSECOMAPP[$(714)].widget_info[$(721)]??$(363),"customize.widget_title")))[$(242)](/{{\s*sca_fg_today_offer_subtitle\s*}}/gm,h(m(FGSECOMAPP.fgAppearanceTodayOffer[$(744)][$(176)]??$(406),$(230)))),document[$(153)]($(359))[$(793)]=s[$(641)](x=>r[$(242)](/{{\s*sca_fg_offer_id\s*}}/gm,h(x[$(600)]))[$(242)](/{{\s*sca_fg_offer_title\s*}}/gm,h(m(x[$(716)],$(755)+x.offer_root))).replaceAll(/{{\s*sca_fg_offer_title_tooltip\s*}}/gm,h(m(x[$(716)],$(755)+x[$(600)])))[$(242)](/{{\s*sca_fg_offer_img\s*}}/gm,h(x[$(612)][0][$(783)],!0)))[$(777)]("\n"),document[$(153)]($(265))[$(793)]=s[$(732)].toString(),document[$(153)]($(391)).addEventListener("click",()=>{let x=$,e=document.querySelector(x(752));e?.[x(497)][x(531)]("sca-show")}),document[$(153)]($(478))[$(702)]("click",()=>{let x=$,e=document.querySelector(x(752));e?.classList[x(531)](x(578))}),document[$(648)](new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS[$(771)],{detail:{todayOffers:s.map(x=>{let e=$,t=fgData[e(397)][e(541)]($=>$.id[e(469)]()===x.offer_root);return{id:""+t.id,title:m(x.offer_name,"offer.offer_title_"+x[e(600)]),gifts:$2(t[e(612)],t.id),success:x.isReachConditions??!1}})}})),$4();let n=(x,e,t)=>{let a=$,i=document[a(274)]("p");i.className=a(486),i[a(828)]=x,document[a(696)].appendChild(i),i[a(709)].top=t+"px",i[a(709)][a(373)]=e+"px",i[a(709)][a(475)]=a(334)},f=()=>{let x=$,e=document[x(153)](".sca-fg-tooltip");e&&e[x(358)][x(645)](e)},d=x=>{let e=$,t=document[e(153)](".sca-fg-tooltip");t&&(t[e(709)].top=x.pageY+"px",t[e(709)][e(373)]=x[e(338)]+5+"px")},l=document[$(365)]($(485));l[$(763)](function(x){let e=$;x[e(702)]("mouseenter",function($){let t=e,a=x[t(191)](t(549));n(a,$[t(338)]+5,$[t(708)]+5)}),x[e(702)]("mouseleave",function(){f()}),x[e(702)](e(522),d)})},$4=()=>{let $=x,e=[...new Set(FGSECOMAPP[$(397)]?.filter(x=>x[$(464)])?.[$(641)](x=>x[$(600)]))];document[$(648)](new CustomEvent(FGSECOMAPP[$(276)][$(557)],{detail:{idOffersSuccess:e}}));let t=document[$(365)]($(347));t[$(763)](x=>{let t=$;e.includes(x[t(191)](t(642)))?x[t(497)].add("sca-offer-archived"):x.classList.remove("sca-offer-archived")})},$T=function(){let $=x;try{document[$(702)](FGSECOMAPP[$(276)][$(420)],async()=>{let x=$;try{window[x(504)]&&(unicart[x(648)]("Show"),console.log("Unicart"))}catch(e){console.error("Unicart",e)}try{window.prepareDataForDisplayWidgetByRule&&(await window.prepareDataForDisplayWidgetByRule(),console.log("iCart"))}catch(t){console[x(516)](x(241),t)}try{window[x(745)]?.[x(219)]?.[x(768)]&&window[x(745)][x(219)][x(768)]()}catch(a){console.error(x(745),a)}try{window[x(679)]&&(await $r(x(152))[x(398)]($=>{let e=x;window[e(679)]($),window[e(156)]()}),console[x(470)](x(691)))}catch(i){console[x(516)](x(691),i)}try{let r=document.querySelector(x(249));window[x(418)]&&(await window.upcartRegisterAddToCart(),console.log("UpCart - AfterSell"),r&&(r.innerHTML=FGSECOMAPP?.[x(596)]?.item_count??0))}catch(c){console[x(516)](x(473),c)}try{window[x(251)]&&(await window[x(251)](),window[x(629)](),console.log(x(202)))}catch(o){console[x(516)]("Slide Cart - qikify",o)}try{window?.SATCB?.[x(515)]?.CartSlider?.[x(377)]&&(await window[x(802)][x(515)][x(669)][x(377)](),console.log(x(185)))}catch(s){console.error(x(185),s)}try{window[x(751)]&&(await window.monster_refresh(),window[x(178)](),console[x(470)](x(289)))}catch(n){console[x(516)](x(289),n)}try{window[x(271)]&&await (window[x(271)](),window.HS_SLIDE_CART_OPEN(),console[x(470)](x(340)))}catch(f){console[x(516)](x(289),f)}try{let d=document[x(153)]("m-cart-drawer"),l=document[x(153)](x(674));window[x(453)]&&d&&(await d?.[x(561)](!window[x(622)]?.[x(799)]),d?.open()),window[x(815)]&&l&&(await l?.[x(814)](),l?.[x(736)]?.[x(484)]())}catch(_){console[x(516)](x(188),_)}try{window[x(824)]&&await (CartJS?.[x(422)](),console.log(x(405)))}catch(g){console.error(x(405),g)}}),window[$(702)]($(234),function(x){let e=$;FGSECOMAPP[e(686)](),FGSECOMAPP[e(412)]()}),document[$(702)]($(544),x=>{let e=$;FGSECOMAPP[e(686)](),FGSECOMAPP[e(412)]()}),window[$(451)]=function(){let x=$;FGSECOMAPP[x(686)](),FGSECOMAPP[x(412)]()},window[$(434)]=()=>{FGSECOMAPP.renderPromotionMessage(),FGSECOMAPP[$(412)]()},window[$(277)]?.[$(149)]&&window[$(277)][$(149)](window[$(453)]?.pubSubEvents?.[$(734)]??$(356),function(){let x=$;FGSECOMAPP[x(686)](),FGSECOMAPP[x(412)]()}),document.addEventListener(FGSECOMAPP[$(276)][$(502)],()=>{let x=$;try{"function"==typeof window[x(832)]&&window[x(832)](),typeof window[x(471)]===x(151)&&window[x(471)](),"function"==typeof window[x(205)]&&window[x(205)](),document[x(153)](x(169))?.[x(792)]()}catch(e){console.error(e)}}),document[$(702)](FGSECOMAPP[$(276)].FG_OVERRIDE_FETCH,()=>{let x=$;try{!document.querySelector(x(730))&&window[x(418)]&&window[x(418)](),!document[x(153)](x(218))&&window.Rebuy?.Cart?.[x(768)]&&window[x(745)][x(219)][x(768)]()}catch(e){console[x(516)](e)}})}catch(e){console.error(e)}};$0(FGSECOMAPP[x(293)])[x(398)](()=>{$T()})}();