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