window.fgData={"offers":[],"settings":{"gift_format":"same_as_original_products","auto_add_gift":true,"sync_quantity":"stop_offer","cal_gift_discount":"current_price","using_draft_order":false,"select_one_gift_price":true,"admin_api_access_token":null,"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":"Buy for 99\u20ac & get a FREE sweatshirt or sweatpants","add_to_cart_btn_title":"Choose gift","running_text":"","select_gift_btn":"Size","show_product_title":true,"show_variant_title":true,"show_pagination":false,"show_gift_for_customer":"by_products","number_product_slider":4},"color":{"gift_slider_title_color":"#121212","product_title_color":"#000000","original_price_color":"#121212","discounted_price_color":"#d11f1f","add_to_cart_color":"#FFFFFF","add_to_cart_btn_color":"#221c34"},"others":{"hidden_brand_mark":true,"gift_img_size":"&width=480&height=480"},"disable_slider_checkbox":{"enable":false,"time":10,"text":"Don't show this offer again"}},"gift_icon":{"gift_icon_path":"images\/fg-icons\/fg-icon-red.png","shopify_gift_icon_path":"fg-icon-red.png","product_page":{"gift_icon":{"status":true,"size":"50"},"gift_thumbnail":{"status":true,"size":"100","title":"Free Gift"}},"collection_page":{"status":true,"size":"50"}},"promotion_message":{"show_on_cart_page":true,"text_color":"#ffffff","background_color":"#F72119"}}};/* END_FG_DATA */ const _0x1e7cd1=_0x50af;function _0x50af($,x){let t=_0x4a9c();return(_0x50af=function($,x){return t[$-=480]})($,x)}function _0x4a9c(){let $=["Update cart.attributes ","dataset","currentTarget","product_narrow","#7367f0","4EjaZAx",".icartCheckoutBtn, .rebuy-cart__checkout-button, .qsc2-checkout-button, #mu-checkout-button, .satcb-cs-checkout-btn, .hs-checkout-purchase","location","href","fg-checkout",'
\n \n \n
',"&width=480&height=480","product_type","total_spend_on_order_history","key","catch","GIFT_ICON_SECTION_ID","setItem","GIFTS_POPUP_SECTION","value_customer_tags","Widgets","and","/cart","enable_process_offer_loading","sca-fg-form-icon-product-page","show_variant_title","total_spent_on_last_order","fit-content","application/json","text/html","#sca_fg_gift_thumbnail_items_section","gift_icon_path","open","formatter","data-template","belongs_to_offer","searchParams","message","error",'
\n \n \n \n \n \n \n ',"checkIsBlockCheckout","redirected","api","none","isReachConditions","original_variant_shopify_id","title","value","Error decoding cookie:",", .sca_handle_button_checkout, input[name='checkout'], button[name='checkout'], input[name='goto_pp'], button[name='goto_pp'], input[name='goto_gc'], button[name='goto_gc'], a[href$='checkout'], form[action='/checkout'] input[type='submit'], button.new_checkout_button, input[value='Checkout'], input[value='Checkout'], input[value='Check out'], input[value='Check Out'] a.checkout-link ","cloneNode","fg-xhr:send","toggle","items","offers","shopify_cart","fgAppearancePromotionMessage","includes","Add to cart",'\n \n ',".original-price del","?sca_add_gift","addEventListener","Slide Cart - qikify","fg-gifts:render-cart","cal_gift_discount",".sca-fg-notifications","track","{{sca_min_total}}","initializeForXHR","maxOfferPriority","sub_conditions","/cart.js?sca_fetch&",'{{ fg_gift_icon_alt }}',"style","URL","parentElement","#82868b","querySelector","gift_thumbnail","SLIDECART_OPEN","variants_ids","toString","offer_id","customGiftImgSize","customer","disable_async_process_fg","slice","arrGiftsData","$$$$","shop",'a[href*="/collections/sca_fg"]',".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], div[class*=hs-cart-drawer] .hs-site-cart-popup-layout",".sca-promotion-message-layout","sca-gift-icon-collection-img","show_pagination","country_code","UpCart - AfterSell","clone_product_handle","HS_SLIDE_CART_CLOSE","mode_override_checkout","Select your free gift!","add","hidden","#sca_fg_section_gifts_popup","childElementCount","specific_link_address",'\n \n \n \n ',"now","data-variant","sca_update_url","sca_fetch_cart","max_gifts_can_get","split","handle","GIFT_ADDED","push","#sca_fg_cart_section_gifts_slider","sca-fg-icon-collection-page","application/liquid","sections_cart","offer_conditions","variant_title","/cart/add","#sca_fg_variant_select_section","product_shopify_id","STICKY_CART_UPDATE","every","fgAppearanceGiftIcon","readyState","stop_lower_priority","sca_text_notify_success","setAttribute","append","fetch","by_variants","variants_quantity","GIFTS_POPUP_SECTION_ID","fg_fetch_attributes","freegifts-main-page-container","getItem","disableShopify_getCart","boolean",".fg-secomapp-handle-add-to-cart ","sca_locale","number_of_order","#sca-gift-icon","display","parse","querySelectorAll","gift_items","price","50%","USD","cart","clone_checkout","order_created_from","remove","set","find","type","function","compressToEncodedURIComponent","maxWidth","fetchCheckoutEvents","select_one_gift_price","sca_clone_checkout","values","CART_MSG_ITEM_SECTION","productsInPage","7iRlEOZ","defineProperty","hasAttribute","Can not fetch all body","#shopify-section-header #cart-icon-bubble","#close-fg-toast","enable_check_variants_has_gift","data-img","NumberFormat","rate","entries","gift_settings",".satcb-cs-close","money","getElementById","current_collection","product","Show","product_id","SATCB","sca_cart_xhr","arrGiftsAdd","arrOfferAdded","sca_fg_cart_icon_query","#fg-gift-thumbnail-title .glider-prev","sca-fg-out-stock","variant_id","openCart","compressToBase64",".freegifts-main-container .glider-prev","scaCustomLoadingCheckout","map","disable_override_xhr","gift_icon","have_not_got_gift_from_this_offer",'
\n \n {{ fg_product_img_alt }}\n \n
',"original_product_shopify_id","insertBefore","fgData","preventDefault","replace","#sca_fg_gift_thumbnail_section","getAttribute",".freegifts-main-container .glider-next","CartSlider","#UpcartPopup:has(#CartPopup[class*='styles_active'])","fg-cart:end-process","fg-gifts:updated","CUSTOM_EVENTS","quantity","data-price",'
\n
\n {{ fg_slider_title }}\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n {{ sca_fg_disable_slider_section }}\n
',"then","Shopify.getCart","disable_slider_checkbox","substring","$","secomappGetCartRunning","offer_name","#fg-gift-items .dropdown > .dropdown-menu > li","upcartRegisterAddToCart","src",".gift-original-url",".btn-add-to-cart.sca-fg-out-stock","not have orders and gifts","number_of_gift_can_receive","totarrCustomerOrderal_spend_on_order_history","info","data-fg-checkout-btn","fg-gift-items","textContent","STICKY_CART_OPEN","readystatechange","unit",".fg-secomapp-cart-drawer ","startsWith",", \n .fg-secomapp-cart-item-promotion\n ","innerText","classList","prototype","subscription_products","min_amount","hasDoneProcessCheckout","parentNode","6px 0","compare_gift_price_with_product","GET","change","routes","[type='submit'][name='add'], [type='button'][name='add'], [data-add-to-cart], [data-action='add-to-cart']","get","variant_shopify_id","&data_checkout=","is_only","d-block","vendor","Failed to get customer location","product_has_icon","renderPromotionMessage","/products/","62NhJQkq","GIFT_ICON_SECTION","item_count","#fg-gift-items","appendChild","variants","action","/?sections=","selling_plan_allocation","join","customer_tags","include","Don't show this offer again","XMLHttpRequest","#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg","data-original-id","trigger_body","productsByID","en-US","variantId","sca_handle_checkout","10MHnrsu","removeItem","max_amount","sca-promotion-message-layout","width",".selected-variant","sca_slidecart_tcc","selling_plan","active","FG_OVERRIDE_XHR_OPEN",".dropdown-menu","sections","sca-gift-thumbnail","sca_fg_form_checkbox_button_query","number","stop_offer","GIFT_THUMBNAIL_SECTION","Free Gift","log","email","/cart/change","rebuy:smartcart.show","reRenderCartCustom","customer_order_history","5hzUIkp","FGSECOMAPP_HIDDEN_GIFT_POPUP","size","arrGiftsRemove","#fg-gift-items .btn-add-to-cart","product_vendors","product_page","prepareDataForDisplayWidgetByRule","clearInterval","string","fgAppearanceGiftSlider",".product-item-thumbnail","giftsAvailable","root","select_gift_btn","Error listening XHR send",".sca-list-gift-thumbnail","current_product","730605OAPlXR","gift_img_size","this is others","isDelayShowAdded","FGSECOMAPP","customerLocation","GIFT_ITEM_SECTION","6931aQAduw","call",".sca-promotion-glider","padding","SECOMAPP_FREEGIFT","prepend","target","Sticky Cart - Codeinero","dispatchEvent","text","div","sca_process_gifts","sync_quantity","freegifts","tabindex","start","294072wXERTP","charAt","json","3303588lEQgtX","discounted_price","sca_deplay_cart_msg","1682502nJvetR","checkout","others","HS_SLIDE_CART_UPDATE","Escape","END_VALIDATE_CHECKOUT",".freegifts-main-container .slide-container #sca-hidden-gift-popup .sca-disable-checkbox","unicart","auto add gift: ","SHOPIFY_CART","timeoutId","products","invoice_url","settings","?sca_process_gifts","application/json;","pathname","gifts","condition_result","sca_fg_price","sca_root_checkout","&sca_products_handle=","Monster Cart","unshift","#fg-gift-items .dropdown","color","getTime","freegiftProxy","GIFT_THUMBNAIL_ITEMS_SECTION","sca_fg_main_promotion_message_query","enable_toast_added","end_time",'

\n {{ fg_cart_message }}\n

',"failed to parse cart section ","fg_decimal","openSlider","reduce","Out of stock","value_customer_locations","concat","original_price","className","customLoadingCheckout","height","sca_offers_added","hidden_brand_mark","sca-gift-icon-collection-page","add_to_cart_btn_color","final_price","GIFT_UPDATED","flat","isArray","auto_add_all_gifts","createElement","status","current_variant",".fg-secomapp-cart-icon ","scaHandleConfigValue","forEach",'.btn-add-to-cart[data-variant="',"iCart","cookie","CART_MSG_SECTION","stringify","(Discount)","manual_input_inventory","sca_fg_img_collection_gift_icon_query",'
{{ fg_gift_thumbnail_title }}
\n\n
\n
\n
\n {{ sca_fg_gift_thumbnail_items_section }}\n
\n \n
\n \xab\n \xbb\n
\n
\n
\n
',"GIFT_SELECT_SECTION_ID","reload","sca_fg_title_product_gift_icon_query","free-gift-icon","contains","100%","data-original-price","100",".btn-add-to-cart","Add gift to cart successfully!","icartSideCartOpenEvent","sca_add_gift","5976twRbir","locale","fg-xhr:open","original_compare_at_price","positions","click","#sca_fg_gift_icon_section","#sca_fg_cart_message_items_section","type_customer_locations","sections_url","CART_MSG_SECTION_ID","240","show_product_title",".sca-gift-icon-collection-page","glider-animated","7712445hPrfRn","11ktctpa","gift_should_the_same","stopPropagation","flex","indexOf","sca-fg-form-thumbnail-product-page","fgAppearance","undefined","POST","send","sca_fg_cart_drawer_query","body","headers","sca-is-visible-fg","fgCallback","SLIDECART_UPDATE","GIFT_ITEM_SECTION_ID",".fg-secomapp-collection-img, .product-card, #product-grid .grid__item, .product-grid .grid__item, .card-list .card-list__column, .cc-product-list .product-block, .collection-list.grid .grid__item, .collection-grid.grid .grid__item ","promotion_message","sca_add_url","cartItems","giftsAdded","cal_gift_for_other_rules","currency","product_types","#freegifts-main-popup-container [data-close]","variant","compare_at_price","last_total","gift_popup_title","format","tags","monster_refresh","show_gift_for_customer","SLIDECART_CLOSE","https://geoip.secomtech.com/?json","#sca_fg_section_gift_item","disabled","sca_link_checkout","is_multiply","relative","removeEventListener","Cannot define custom loading with type: ","hide","keys","gift_products","innerHTML","type_customer_tags","sca-d-none","scaCountRenderEventCheckout","priority","DISABLE_SLIDER_SECTION_ID","other_products","60%","fgSettings","replaceAll","-sca_clone_freegift","isUpdateCart","product_collections","#secomapp_freegifts_version",'a[href*="/products/"]',"data-offer","70%","apply","thumbnail","CART_MSG_ITEM_SECTION_ID","backgroundColor",".gift-price","parseFromString","sca-gift-icon-img","number_of_products","HS_SLIDE_CART_OPEN",".product_name, .product-title, .product__title, .product-single__title, .tt-title, .ProductMeta__Title","getCart","appearance","GIFT_SELECT_SECTION","fg-fetch:override","gift_slider","sca_fg_codes","sca_catch","sca-gift-icon","GIFT_THUMBNAIL_ITEMS_SECTION_ID","original_product_handle","filter","END_PROCESS_CART","SHOW_GIFT_SLIDER","opacity","collections","sca_amount_fixed","some","position","sca_fg_value_checkout","end","length",".dots","FG_OVERRIDE_FETCH","/cart/update"];return(_0x4a9c=function(){return $})()}!function($,x){let t=_0x50af,e=$();for(;;)try{let a=parseInt(t(881))/1*(-parseInt(t(811))/2)+-parseInt(t(874))/3*(parseInt(t(546))/4)+-parseInt(t(856))/5*(-parseInt(t(903))/6)+parseInt(t(711))/7*(parseInt(t(897))/8)+-parseInt(t(983))/9*(-parseInt(t(832))/10)+-parseInt(t(999))/11*(parseInt(t(900))/12)+parseInt(t(998))/13;if(177410===a)break;e.push(e.shift())}catch(i){e.push(e.shift())}}(_0x4a9c,177410),window.fgData?.appearance?.[_0x1e7cd1(744)]?.[_0x1e7cd1(572)]&&fgGiftIcon&&(window.fgData[_0x1e7cd1(518)][_0x1e7cd1(744)][_0x1e7cd1(572)]=fgGiftIcon),function $(){let x=_0x1e7cd1;window[x(878)]={},FGSECOMAPP[x(611)]=null,FGSECOMAPP[x(1019)]=Object[x(708)](Shopify?.[x(1019)]??{}),FGSECOMAPP[x(595)]=[],FGSECOMAPP[x(498)]=window[x(749)]?.[x(916)]??{},FGSECOMAPP[x(1005)]=window[x(749)]?.[x(518)]??{},FGSECOMAPP.fgAppearanceGiftSlider=FGSECOMAPP.fgAppearance?.gift_slider?.general,FGSECOMAPP.fgAppearanceGiftIcon=FGSECOMAPP[x(1005)]?.gift_icon,FGSECOMAPP[x(597)]=FGSECOMAPP[x(1005)]?.promotion_message,FGSECOMAPP.fgCallback=[],FGSECOMAPP[x(768)]=!1,FGSECOMAPP[x(733)]=[],FGSECOMAPP.scaCountRenderEventCheckout=0,FGSECOMAPP[x(581)]=!1,FGSECOMAPP.scaHandleConfigValue={...Shopify?.[x(960)]},FGSECOMAPP[x(854)]=Shopify?.reRenderCartCustom??void 0,FGSECOMAPP[x(741)]=Shopify?.scaCustomLoadingCheckout??void 0,FGSECOMAPP[x(710)]={},FGSECOMAPP[x(828)]={},FGSECOMAPP[x(793)]=!1,FGSECOMAPP[x(661)]={},FGSECOMAPP[x(501)]=!1,FGSECOMAPP[x(912)]={},FGSECOMAPP.sca_price=Shopify?.[x(922)]??x(901),FGSECOMAPP.CUSTOM_EVENTS={SHOW_GIFT_SLIDER:"fg-gifts:show-slider",GIFT_UPDATED:x(758),GIFT_ADDED:"fg-gifts:added",CART_AUTO_UPDATED:"fg-cart:auto-updated",GIFT_TO_CART:x(605),START_PROCESS_CART:"fg-cart:start-process",END_PROCESS_CART:x(757),START_VALIDATE_CHECKOUT:"fg-checkout:start",END_VALIDATE_CHECKOUT:"fg-checkout:end",FG_OVERRIDE_FETCH:x(520),FG_OVERRIDE_XHR_OPEN:x(985),FG_OVERRIDE_XHR_SEND:x(592)};let t={GIFTS_CART_SECTION_ID:x(658),GIFTS_CART_SECTION:x(762),GIFTS_POPUP_SECTION_ID:x(645),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(480),GIFT_ITEM_SECTION:'
\n
\n \n
\n
\n \n {{ fg_original_price }}\n \n {{ fg_gift_price }}\n
\n \n \n \n \n
\n
\n
',GIFT_SELECT_SECTION_ID:x(665),GIFT_SELECT_SECTION:'
  • \n {{ fg_variant_title }}\n
  • ',DISABLE_SLIDER_SECTION_ID:"#sca_fg_disable_slider_section",DISABLE_SLIDER_SECTION:x(551),CART_MSG_SECTION_ID:"#sca_fg_cart_message_section",CART_MSG_SECTION:'
    \n {{ sca_fg_cart_message_items_section }}\n
    ',CART_MSG_ITEM_SECTION_ID:x(990),CART_MSG_ITEM_SECTION:x(935),GIFT_THUMBNAIL_SECTION_ID:x(752),GIFT_THUMBNAIL_SECTION:x(970),GIFT_THUMBNAIL_ITEMS_SECTION_ID:x(571),GIFT_THUMBNAIL_ITEMS_SECTION:x(746),GIFT_ICON_SECTION_ID:x(989),GIFT_ICON_SECTION:x(614)},e=()=>{let $=x,t=FGSECOMAPP[$(1005)]?.[$(521)],e=t?.[$(905)]?.[$(948)],a=!I(t)&&void 0!==e&&!e;return a?$(600):""},a=()=>{let $=x,e=FGSECOMAPP[$(1005)]?.[$(521)],a=e?.[$(765)]??{};document[$(619)]($(909))?.checked&&localStorage.setItem($(857),""+Date[$(649)]());let i=document.querySelector(t[$(495)])?.[$(490)]??t.DISABLE_SLIDER_SECTION;return a?.enable?i[$(499)](/{{\s*fg_text_disable_slider\s*}}/gm,h(a[$(890)]??$(823))):""},{fetch:i}=window,r=()=>{let $=x;document[$(619)]($(503))?.[$(753)]($(575))!==$(550)&&(window[$(675)]=async(...x)=>{let t=$;try{let e=x[0];if(!(e?.[t(598)](t(664))||e?.[t(598)](t(852))||e?.[t(598)]("/cart/update")))return setTimeout(function(){$m()},1e3),await i(...x);{let a=e?.[t(598)](t(664)),r=e?.[t(598)](t(852))||e?.includes("/cart/update");n(x[1]);let c=200,o=null,s=await i(...x)[t(763)]($=>{let x=t;return(o=$,c=$.status,$[x(582)])?$:$[x(899)]()})[t(556)]($=>{console[t(579)]($)});if(document.dispatchEvent(new CustomEvent(FGSECOMAPP[t(759)][t(539)],{detail:{args:x,response:o,FGSECOMAPP:FGSECOMAPP}})),a&&x[1].headers?.[t(982)]&&200!==c){let f=JSON[t(689)](x[1][t(1010)])?.id,u=document[t(619)](t(962)+f+'"]');u[t(788)]=t(940),u[t(789)].contains(t(736))||u[t(789)].add(t(736)),u[t(481)]=!0,u.style[t(884)]="",u[t(615)][t(510)]=t(618),document[t(690)](".btn-add-to-cart")[t(961)]($=>{let x=t;parseInt($[x(753)](x(650)))===f||$.classList[x(975)](x(736))||($[x(481)]=!1,$[x(615)].backgroundColor=FGSECOMAPP.fgAppearance?.[x(521)]?.[x(928)]?.[x(950)]??x(545))})}if(200!==c&&(a&&x[1].headers?.[t(982)]||r&&x[1][t(1011)]?.[t(892)]))return l(s,o);if(Shopify?.[t(627)])return $o([e,...x.slice(1)])[t(763)](),l(s,o);if(await $o([e,...x[t(628)](1)]),r&&x[1]?.[t(1011)]?.[t(892)])return l(s,o);let g=r?FGSECOMAPP[t(912)]??s??{}:s;return await d(x,s,g),l(g,o)}}catch(p){return await i(...x)}})},c=window[x(824)][x(790)][x(573)],o=window[x(824)][x(790)][x(1008)],s=()=>{let $=x;Shopify?.[$(743)]||(window.XMLHttpRequest.prototype.open=function(x,t){let e=$;try{document[e(889)](new CustomEvent(FGSECOMAPP[e(759)][e(841)],{detail:{fgXHR:this}}))}catch(a){console[e(579)]("Error listening XHR open",a)}finally{c[e(507)](this,arguments)}},window.XMLHttpRequest[$(790)].send=function(x){let t=$;try{document.dispatchEvent(new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS.FG_OVERRIDE_XHR_OPEN,{detail:{fgXHR:this}}));let{_url:e}=this;(e?.includes(t(664))||e?.includes(t(852))||e?.[t(598)](t(540)))&&this.addEventListener(t(783),function(){let $=t;this[$(670)]===XMLHttpRequest.DONE&&200===this[$(957)]&&$o([e,{}])[$(763)]()})}catch(a){console[t(579)](t(871),a)}finally{o[t(882)](this,x)}})};FGSECOMAPP[x(610)]=()=>{let $=x;try{if(Shopify?.[$(682)]||typeof Shopify?.[$(517)]!==$(702))return;Shopify[$(517)]=async function(x){let t=$;if(!FGSECOMAPP[t(768)]){FGSECOMAPP.secomappGetCartRunning=!0,await $o([t(764),{}]);let e=await $i(t(731));typeof x===t(702)&&(0>FGSECOMAPP[t(1013)][t(1003)](x)&&FGSECOMAPP[t(1013)].push(x),x(e)),FGSECOMAPP[t(768)]=!1}FGSECOMAPP[t(705)]()},typeof ShopifyAPI!==$(1006)&&typeof ShopifyAPI.getCart!==$(1006)&&(ShopifyAPI[$(517)]=Shopify?.[$(517)]),typeof Shopify?.api!==$(1006)&&void 0!==Shopify?.[$(583)][$(517)]&&(Shopify.api[$(517)]=Shopify?.[$(517)])}catch(t){console.error(t)}};let n=$=>{let t=x;try{let e=$?.[t(1010)];e instanceof FormData?FGSECOMAPP[t(661)]={sections:e[t(801)]("sections"),sections_url:e[t(801)]("sections_url")}:typeof e===t(865)&&(e=JSON[t(689)](e),FGSECOMAPP[t(661)]={sections:e?.[t(843)],sections_url:e?.[t(992)]})}catch(a){FGSECOMAPP[t(661)]={}}},l=($,t)=>{let e=x;try{let a=Shopify?.[e(679)]??["url","type","redirected","ok"],i=new Response(JSON.stringify($),t);for(let r of a)Object[e(712)](i,r,{value:t[r]});return i}catch(c){return new Response(JSON[e(966)]($))}},f=async()=>{let $=x;if(Shopify.do_not_add_freegift_attribute)return;let t={freegift_attributes:""};if(!I(FGSECOMAPP[$(733)])){let e=[$(885)];for(let a of FGSECOMAPP[$(733)]){let r=FGSECOMAPP[$(595)][$(700)](x=>x.id===a[$(576)])?.[$(612)]?.specific_link_address;I(r)||e.push(r)}t={freegift_attributes:e[$(623)]()}}try{await i((Shopify?.[$(651)]??"/cart/update")+"?sca_attr_cart",{method:$(1007),headers:{"X-Requested-With":$(824),"Content-Type":$(918)},body:JSON[$(966)]({attributes:t})})}catch(c){console[$(579)]($(541)+c.message)}},d=async($,t,e)=>{let a=x;try{if($[1]?.[a(1011)]?.[a(892)])return;let r={},c=Object[a(488)](t.sections??{})?.filter($=>I(FGSECOMAPP.sections_cart[$]))??[];if(c&&c[a(537)]&&FGSECOMAPP[a(501)]&&(r=await i(a(818)+c.join(","))[a(763)]($=>$[a(899)]())),FGSECOMAPP[a(501)]=!1,r={...FGSECOMAPP[a(661)],...r},I(r))return;t.sections={...t[a(843)],...r},I(e)||(e.sections={...t[a(843)]})}catch(o){}},u=async($,t,e)=>{let a=x;e=e?.[a(623)]();let i=document[a(690)](a(860));i[a(961)](x=>{let t=a;x.disabled=!0;let e=x.getAttribute(t(650))-0;e===$&&(x[t(615)][t(884)]=t(795),x[t(490)]='\n \n \n \n \n \n '),x[t(615)].backgroundColor=t(618)});let r=FGSECOMAPP.arrOfferAdded[a(700)](x=>e===x.belongs_to_offer?.[a(623)]()&&$===x[a(830)]);r?r[a(760)]+=t:FGSECOMAPP[a(733)][a(926)]({variantId:$,belongs_to_offer:e,quantity:t}),localStorage[a(558)](a(947),LZString[a(739)](JSON.stringify(FGSECOMAPP.arrOfferAdded))),b(a(896));let c=await fetch((Shopify?.[a(1018)]??"/cart/add.js")+a(602),{method:"POST",headers:{Accept:a(569),"Content-Type":a(569),sca_add_gift:!0},body:JSON[a(966)]({quantity:t,id:$})}),o=await c[a(899)]();c.ok&&(i[a(961)](x=>{let t=a;x.disabled=!0;let e=x.getAttribute(t(650))-0;e===$&&(x.style[t(884)]=t(795),x[t(490)]=t(648)),x[t(615)].backgroundColor=""}),$s()),document[a(889)](new CustomEvent(FGSECOMAPP[a(759)][a(656)],{detail:{gift:o,status:c.ok,FGSECOMAPP:FGSECOMAPP}}))},g=$=>{let t=x,e=t(500);return!I($)&&("object"==typeof $&&($[t(655)]?.[t(598)](e)||$[t(1030)]?.includes(t(894)))||typeof $===t(865)&&$[t(598)](e))},p=$=>{let{selling_plan_allocation:t}=$;return!I(t)&&!I(t?.[x(839)])},b=$=>{let t=x;try{if(!Shopify?.[t(564)])return;let e=".icartCheckoutBtn, .rebuy-cart__checkout-button, .qsc2-checkout-button, #mu-checkout-button, .satcb-cs-checkout-btn, .hs-checkout-purchase, .sca_handle_button_checkout, input[name='checkout'], button[name='checkout'], input[name='goto_pp'], button[name='goto_pp'], input[name='goto_gc'], button[name='goto_gc'], a[href$='checkout'], form[action='/checkout'] input[type='submit'], button.new_checkout_button, input[value='Checkout'], input[value='Checkout'], input[value='Check out'], input[value='Check Out'] a.checkout-link "+w("sca_fg_form_checkbox_button_query");document[t(690)](e)[t(961)](x=>{let e=t;FGSECOMAPP[e(945)]($,x)[e(763)]()})}catch(a){}},_=async($,t)=>{let e=x;try{if(I($)&&I(t))return;let a={};if(FGSECOMAPP[e(1019)]?.[e(527)]($=>g($))?.forEach($=>{a[$.variant_id]=$[e(760)]}),($=$?.[e(527)]($=>!I($[e(737)])))?.forEach($=>{let x=e;a[$[x(737)]]=(a[$[x(737)]]??0)+($.quantity??1)}),Object[e(488)](a)?.[e(961)]($=>{a[$]=a[$]>=0?a[$]:0}),I(Object[e(488)](a)))return;$?.forEach($=>{let x=e,t=FGSECOMAPP[x(733)][x(700)](t=>$.offer_id?.[x(623)]()===t[x(576)]?.[x(623)]()&&$[x(737)]===t[x(830)]);t?t[x(760)]+=$[x(760)]:FGSECOMAPP.arrOfferAdded[x(926)]({variantId:$.variant_id,belongs_to_offer:$[x(624)]?.[x(623)](),quantity:$[x(760)]})}),localStorage[e(558)](e(947),LZString.compressToBase64(JSON[e(966)](FGSECOMAPP[e(733)]))),FGSECOMAPP.isUpdateCart=!0,b(e(896)),await fetch((Shopify?.[e(651)]??e(540))+e(917),{method:e(1007),headers:{Accept:"application/json","Content-Type":e(569),sca_process_gifts:!0},body:JSON.stringify({updates:a,...FGSECOMAPP[e(661)]})})[e(763)](x=>{let a=e;return x.ok&&$[a(537)]&&!t[a(537)]&&$s(),x[a(899)]()})[e(763)]($=>{let x=e;FGSECOMAPP[x(661)]=$.sections}),document[e(889)](new CustomEvent(FGSECOMAPP[e(759)].CART_AUTO_UPDATED,{detail:{arrGiftsAdd:$,arrGiftsRemove:t,FGSECOMAPP:FGSECOMAPP}})),document[e(619)](e(503))?.[e(753)](e(575))===e(550)&&location[e(972)]()}catch(i){b(e(536)),console.error(i)}},h=($,t=!1)=>{let e=x;return(""+$)[e(499)](/\$/g,e(t?630:767))},m=0,v=()=>{let $=x,i=document[$(725)]($(680));if(i){let r=document.querySelector(t.GIFTS_CART_SECTION_ID)?.[$(490)]??t.GIFTS_CART_SECTION;i.innerHTML=r[$(499)](/{{\s*fg_slider_title\s*}}/gm,h(FGSECOMAPP[$(866)].gift_popup_title??$(642)))[$(499)](/{{\s*sca_fg_disable_slider_section\s*}}/gm,h(e()))}else{let c=localStorage[$(681)]($(857))-0,o=FGSECOMAPP.fgAppearance?.[$(521)]?.disable_slider_checkbox??{},s=(o?.time??0)*6e4,n=!isNaN(c)&&c+s>Date[$(649)]();if(n||(localStorage[$(833)]($(857)),!(i=document.getElementById("freegifts-main-popup-container"))))return;let l=document[$(619)](t[$(678)])?.innerHTML??t[$(559)];i.innerHTML=l.replaceAll(/{{\s*fg_slider_title\s*}}/gm,h(FGSECOMAPP.fgAppearanceGiftSlider[$(1028)]??$(642)))[$(499)](/{{\s*sca_fg_disable_slider_section\s*}}/gm,h(a()+" "+e())),i[$(789)][$(643)]($(1012)),m++}},y=($,e)=>{let a=x,i=document[a(619)](t[a(971)])?.[a(490)]??t[a(519)];return $.map($=>i[a(499)](/{{\s*fg_variant_img\s*}}/gm,h(K($[a(508)]??e),!0))[a(499)](/{{\s*fg_variant_id\s*}}/gm,h($[a(802)]))[a(499)](/{{\s*fg_original_variant_id\s*}}/gm,h($[a(586)]))[a(499)](/{{\s*fg_variant_price\s*}}/gm,h(T($)))[a(499)](/{{\s*fg_original_variant_price\s*}}/gm,h(C($))).replaceAll(/{{\s*fg_variant_title\s*}}/gm,h($[a(663)])))[a(820)](" \n")},T=$=>FGSECOMAPP[x(574)].format(k($?.price)),C=$=>{let t=x,e=FGSECOMAPP?.[t(498)]?.[t(606)]==="compare_at_price"?$?.[t(986)]??$?.[t(943)]:$?.[t(943)];return FGSECOMAPP[t(574)][t(1029)](k(e??0))},S=($,t)=>{let e=x;return I(FGSECOMAPP[e(828)][$])?t??"#":FGSECOMAPP[e(828)][$].handle},E=($,t)=>{let e=x;return FGSECOMAPP.fgAppearanceGiftSlider[e(995)]?I(FGSECOMAPP[e(828)][$])?t[e(751)]("\xbb","")[e(751)](/\(\d*% off\)/,"")[e(751)](e(967),"")??"":FGSECOMAPP.productsByID[$][e(587)]:""},I=$=>{let t=x;if(0===$)return!0;if(typeof $==t(846)||"boolean"==typeof $)return!1;if(typeof $==t(1006)||null===$)return!0;if(void 0!==$[t(537)])return 0===$.length;let e=0;for(let a in $)$.hasOwnProperty(a)&&e++;return 0===e},w=$=>{let t=x;try{let e={...FGSECOMAPP[t(960)]},a=e[$];if(a=a?a.trim():null,!I(a)&&a[t(537)]>0)try{return document.querySelector(a),", "+a}catch(i){}return""}catch(r){return""}},A=()=>{let $=x;try{FGSECOMAPP[$(574)]=new Intl[$(719)](Shopify?.[$(685)]??Shopify?.[$(984)],{style:$(1022),currency:Shopify?.[$(1022)]?.[$(840)]??"USD"})}catch(t){FGSECOMAPP[$(574)]=new Intl.NumberFormat($(829),{style:$(1022),currency:Shopify?.[$(1022)]?.[$(840)]??$(694)})}},k=$=>{let t=x;$=$??0;let e=Shopify?.[t(1022)]?.[t(720)]??1;return 1===parseFloat(e)?$:($*e).toFixed(Shopify?.[t(937)]??2)},O=$=>{let t=x;try{return $[FGSECOMAPP.sca_price]??$?.[t(951)]??$?.[t(692)]}catch(e){return $?.[t(951)]??$?.[t(692)]}},D=$=>{let t=x;return $[t(527)]($=>void 0===$[t(1021)]||!0===$.cal_gift_for_other_rules).reduce(($,x)=>$+x.quantity*O(x),0)/100},R=$=>{let t=x;return $.filter($=>void 0===$[t(1021)]||$[t(1021)])[t(939)](($,x)=>$+x[t(760)],0)},L=($,t,e)=>{let a=x,i=t[a(544)];return e?.[a(804)]&&($=$[a(527)]($=>p($))),I(i)?$:$[a(527)]($=>{let x=a;return!i[x(742)](t=>{let e=x;switch(t.type){case e(622):return Object[e(708)](t[e(588)]).map($=>$[e(1025)])[e(953)]().map($=>$.id)[e(598)]($[e(737)]);case e(1023):return Object[e(488)](t.value).includes($.product_type);case e(861):return Object.keys(t[e(588)])[e(598)]($[e(806)]);case"product_collections":let a=Object[e(488)](t[e(588)]),i=$[e(531)]?.[e(742)]($=>$.id+"")?.[e(527)]($=>a[e(598)]($));return!I(i);default:return!1}})[x(598)](!1)})},P=($,t)=>{let e=x;return $?.[e(742)]($=>{let x=e;if(void 0!==$[x(1021)]){let a=FGSECOMAPP[x(733)]?.filter(t=>t[x(830)]===$[x(737)]),i=a?.[x(939)](($,x)=>$+x.quantity,0);if(i===$[x(760)]){let r=a?.[x(527)](e=>{let a=x;if(e[a(576)]?.toString()===t[a(623)]())return!1;let i=FGSECOMAPP.offers?.[a(700)]($=>$.id?.[a(623)]()===e[a(576)]?.toString()),r=i.gift_settings??{},c=O($);return r[a(1021)]&&c>0})?.[x(939)](($,t)=>$+t[x(760)],0);return{...$,cal_gift_for_other_rules:r>0,quantity:r??0}}return{...$,cal_gift_for_other_rules:!1,quantity:0}}return{...$}})??[]},G=($,t,e,a)=>{let i=x,r=0,c=L(t,$,a);c=P(c,$[i(624)]);let o;return $[i(784)]===i(724)?o=D(c):$.unit===i(514)&&(o=R(c)),o>=$[i(792)]&&(null===$[i(834)]||o<=$[i(834)])&&(r=e[i(776)],$[i(483)]&&(r=Math.floor(o/$.min_amount)*r)),r},N=($,t,e,a)=>{let i=x,r={},c=[],o=0;return t[i(742)](x=>{let t=G(x,$,e,a);0!==t&&(o=t),c[i(657)](t>0)}),r.max_gifts_can_get=o,r[i(921)]=c,r},F=($,t)=>{let e=x,a=!1;return 1===$[e(537)]?a=$[0]:2===$.length&&(t===e(562)&&(a=$[0]&&$[1]),"or"===t&&(a=$[0]||$[1])),a},M=($,t)=>{let e=x,a=$?.[e(742)]($=>$[e(737)]);FGSECOMAPP[e(733)]=FGSECOMAPP[e(733)][e(527)]($=>a?.[e(598)]($[e(830)]));let i=t.gift_items.map($=>$[e(802)]),r=FGSECOMAPP[e(733)].filter($=>$[e(576)]?.[e(623)]()===t.id?.[e(623)]())?.[e(742)]($=>$.variantId),c=$[e(527)]($=>{let x=e;return g($)&&($.cal_gift_for_other_rules=!1),i[x(598)]($[x(737)])&&r[x(598)]($.variant_id)}),o=c[e(742)]($=>{let x=e,a=t[x(722)];$.cal_gift_for_other_rules=a[x(1021)],$.belongs_to_offer=t.id?.toString();let i=FGSECOMAPP[x(733)]?.filter(e=>e[x(576)]?.toString()!==t.id?.[x(623)]()&&$[x(737)]===e.variantId)?.[x(939)](($,t)=>$+t[x(760)],0);return{...$,quantity:$.quantity-i}});return o[e(527)]($=>$.belongs_to_offer?.toString()===t.id?.[e(623)]())},H=$=>{let t=x,e=$[t(1020)].filter(x=>x[t(576)]?.[t(623)]()!==$.id?.[t(623)]()).map($=>$[t(729)]);return Object[t(708)]($[t(489)]).filter($=>!e[t(598)]($[t(666)]))},q=($,t)=>{let e=x,a=M($,t),i=N($,t.offer_conditions,t[e(722)],t[e(612)]?.[e(791)]),r=F(i[e(921)],t.condition_relationship);if(r){let c=a[e(527)]($=>$[e(576)]?.toString()===t.id?.[e(623)]())[e(939)](($,x)=>$+x[e(760)],0);i[e(653)]=i[e(653)]-c,t[e(1020)]=a,t.giftsAvailable=i.max_gifts_can_get}else t[e(1020)]=a,t.giftsAvailable=0;return typeof FGSECOMAPP[e(611)]===e(846)&&t.priority>FGSECOMAPP[e(611)]&&(r=!1),r||!t[e(671)]||FGSECOMAPP.maxOfferPriority!==t.priority||I(a)||(FGSECOMAPP[e(611)]=null),t.isReachConditions=r,t.stop_lower_priority&&r&&(null==FGSECOMAPP[e(611)]||t[e(494)]<=FGSECOMAPP[e(611)])&&FGSECOMAPP[e(611)]!==t[e(494)]&&(FGSECOMAPP[e(611)]=t.priority),t},U=$=>{let t=x,e=$+"=",a=document[t(964)][t(654)](";");for(let i=0;i{let e=x,a=!0,i=!0,r=!0,c=!0;if(!I($[e(612)]?.[e(647)])){let o=U("sca_fg_codes");a=o&&JSON[e(689)](o)[e(598)]($.sub_conditions[e(647)])}if(!I($[e(612)]?.[e(821)])){let{customer_tags:s}=$[e(612)],n=s?.[e(560)]?.[e(533)]($=>t.customer[e(1030)]?.[e(598)]($));i=s?.[e(491)]===e(822)?n:!n}if(!I($[e(612)]?.customer_locations)){let{customer_locations:l}=$[e(612)],f=l?.[e(941)]?.includes(FGSECOMAPP[e(879)]);c=l?.[e(991)]==="include"?f:!f}if(!I($[e(612)]?.[e(855)])){let d=!0,u=$[e(612)].customer_order_history,g=t[e(626)].orders??[];if(u.order_created_from){let p=Date.parse(u[e(697)])/1e3;g=g[e(527)]($=>$.created_at>=p)}if(!I(u?.[e(777)])&&(0!==u[e(554)].min_amount||0!==u[e(554)].max_amount)){let b=u[e(554)][e(792)],_=u[e(554)][e(834)],h=g[e(939)](($,x)=>$+x.total_price,0)/100;d&=(h>=b||!b)&&(h<=_||!_)}if(!I(u?.[e(567)])&&(0!==u[e(567)][e(792)]||0!==u[e(567)][e(834)])){let m=t[e(626)][e(1027)]/100,v=u[e(567)][e(792)],y=u.total_spent_on_last_order[e(834)];d&=(m>=v||!v)&&(m<=y||!y)}if(!I(u?.[e(686)])){let T=!(0!==u[e(686)][e(792)]||0!==u[e(686)].max_amount),C=g[e(537)],S=u[e(686)][e(792)],E=u[e(686)][e(834)];d&=T?I(g):(C>=S||!S)&&(C<=E||!E)}if(u?.[e(745)]){let w=t[e(626)][e(894)]??[],A=$[e(691)]?.[e(533)]($=>w.includes($[e(802)]))||$[e(691)]?.[e(533)]($=>w.includes($[e(586)]+"_"+($[e(943)]-$.price)*100));d&=!A}r=d}return a&&i&&r&&c},j=($,t,e)=>{let a=x,i=[],r=[],c=[],o=[];for(let s of t){let n=q($,s);if(!n.isReachConditions){n[a(1020)][a(537)]>0&&n[a(1020)][a(961)]($=>{let x=a;r[x(657)]({variant_id:$[x(737)],quantity:$[x(760)],offer_id:s.id})});continue}if(n[a(868)]<0){n[a(1020)].forEach($=>{let x=a;r[x(657)]({variant_id:$[x(737)],quantity:$[x(760)],offer_id:s.id})});continue}0!==n[a(868)]&&(s[a(612)]?B(s,SECOMAPP)&&i[a(657)](s):i[a(657)](s))}if($?.[a(961)]($=>{let x=a;I($[x(576)])&&g($)&&r.push({variant_id:$[x(737)],quantity:$[x(760)],offer_id:$.belongs_to_offer?.toString()})}),e||I(r)){let l=i[a(742)]($=>{let x=a;return{id:$.id,offerName:$[x(769)],offerPriority:$.priority,stopLowerPriority:$.stop_lower_priority,gifts:H($),giftsAvailable:$[x(868)],giftsAdded:$[x(1020)],isReachConditions:$[x(585)]}});if(!I(l)){let f={};for(let d of l){let u=z(FGSECOMAPP.fgSettings,d);u?.[a(537)]>0?c=c.concat([...u]):d[a(920)][a(742)]($=>{let x=a;f[$.product_shopify_id]={...$,belongs_to_offer:d.id?.[x(623)]()}})}o=Object[a(708)](f)??[]}}return{arrGiftsAdd:c,arrGiftsRemove:r,arrGiftsData:o}},X=($,t)=>{let e=x,a=new Set;return $?.forEach($=>a[e(643)]($[e(624)])),a[e(961)]($=>{let x=e,t=FGSECOMAPP.offers?.[x(700)](x=>x.id?.toString()===$?.toString());if(I(t)||!t[x(585)]){FGSECOMAPP.arrOfferAdded=FGSECOMAPP.arrOfferAdded?.[x(527)](t=>t[x(576)]?.[x(623)]()!==$?.[x(623)]());return}if(t.giftsAvailable>=0)return;let a=[],i=FGSECOMAPP[x(733)]?.[x(527)](t=>t.belongs_to_offer?.[x(623)]()===$?.[x(623)]())??[];if(t?.[x(722)]?.[x(955)])a=a[x(942)]([...i]),t[x(868)]=0;else for(let r of i){if(t.giftsAvailable>=0)break;t[x(868)]+=r[x(760)],t[x(868)]<=0?a[x(657)]({...r}):(r[x(760)]=t[x(868)],t[x(868)]=0)}a?.forEach($=>{let t=x;FGSECOMAPP[t(733)]=FGSECOMAPP[t(733)]?.[t(527)](x=>$[t(830)]!==x[t(830)]||$[t(576)]?.toString()!==x[t(576)]?.[t(623)]())})}),t?.[e(527)]($=>{let x=e;return g($)&&($.quantity=FGSECOMAPP[x(733)]?.[x(527)](t=>$.variant_id===t[x(830)])?.[x(939)](($,t)=>$+t[x(760)],0)??0),$.quantity>0})??[]},V=async($,t)=>{let e=x,{arrGiftsAdd:a,arrGiftsRemove:i,arrGiftsData:r}=j($,t,!1),c=X(i,$);if(!I(i)){let o=j(c,t,!0);X(o?.[e(859)],$),a=o?.[e(732)],i=i?.[e(942)](o?.[e(859)])??[],r=o?.[e(629)]}return await _(a,i),f().then(),r},z=($,t)=>{let e=x,a=[];if($.auto_add_gift){let i=t.gifts,r=i[e(939)](($,x)=>$+x[e(816)][e(537)],0),c=FGSECOMAPP[e(595)][e(527)]($=>$.id===t.id),o=c[0][e(722)][e(955)],s=c[0][e(1e3)];if(1===r||o||s.status){if($.not_show_gift_if_already_on_cart&&!J(i))return!1;let n=$?.compare_gift_price_with_product;if(n&&!Z(i,n))return!1;if(s.status){if(s.type===e(1025)){let l=FGSECOMAPP[e(1019)];l=l[e(527)]($=>$.product_id===i[0][e(747)]);let f=i[0][e(816)][e(527)]($=>l[0][e(737)]===$.original_variant_shopify_id)[0];if(0===f[e(692)])return a.push({variant_id:f[e(802)],quantity:t[e(868)],offer_id:t.id}),a}else if(o){let d=i?.[e(939)](($,x)=>($+x?.[e(816)]?.[e(537)])??0,0);if(!d)return!1;let u=(t?.[e(868)]??0)/d;for(let g of i)for(let p of g[e(816)])a[e(657)]({variant_id:p.variant_shopify_id,quantity:u,offer_id:t.id});return a}}else{if(o){let b=i?.[e(939)](($,x)=>($+x?.[e(816)]?.[e(537)])??0,0);if(!b)return!1;let _=(t?.[e(868)]??0)/b;for(let h of i)for(let m of h[e(816)])a[e(657)]({variant_id:m[e(802)],quantity:_,offer_id:t.id});return a}{let v=i[0].variants[0];if(0===v.price)return console[e(850)](e(911)+i[0].variants[0][e(802)]+" "+i[0][e(816)][0][e(663)]),a[e(657)]({variant_id:v[e(802)],quantity:t[e(868)],offer_id:t.id}),a}}}}return!1},W=$=>"Default Title"===$,K=$=>{let t=x;try{let e=Shopify[t(625)]??FGSECOMAPP[t(1005)]?.[t(521)]?.others?.[t(875)]??t(552),a=new URL($),i=new URLSearchParams(e);return i[t(961)](($,x)=>a.searchParams[t(699)](x,$)),a.toString()}catch(r){return $}},Y=$=>{let e=x,a=$;if(FGSECOMAPP[e(866)].show_gift_for_customer===e(676))for(let i of(a=[],$)){let r=i[e(816)];r&&r[e(537)]&&r[e(961)]($=>a[e(657)]({...i,thumbnail:$[e(508)],variants:[$]}))}let c=document[e(725)](e(780));c&&(c[e(490)]=a[e(742)]($=>{let x=e,a=$?.[x(816)][0]??{},i=W(a[x(663)]),r=$[x(816)]?.length,c=h(E($[x(747)],$[x(587)])),o=FGSECOMAPP[x(866)]?.[x(1032)]===x(676),s=document.querySelector(t[x(1015)])?.innerHTML??t[x(880)];return s.replaceAll(/{{\s*fg_product_handle\s*}}/gm,h(S($[x(747)],$[x(526)]),!0)).replaceAll(/{{\s*fg_product_img\s*}}/gm,h(K($[x(508)]),!0))[x(499)](/{{\s*fg_product_img_alt\s*}}/gm,c).replaceAll(/{{\s*fg_product_title\s*}}/gm,c)[x(499)](/{{\s*fg_gifts_check_show_by_variants\s*}}/gm,h(o&&FGSECOMAPP[x(866)][x(566)]?"":x(492))).replaceAll(/{{\s*fg_gifts_check_show_by_products\s*}}/gm,o?x(492):"")[x(499)](/{{\s*fg_check_selected_variant\s*}}/gm,1===r?"active "+(i?x(492):""):"").replaceAll(/{{\s*fg_variant_title\s*}}/gm,h(1!==r?FGSECOMAPP[x(866)][x(870)]??"Select variant":a.variant_title)).replaceAll(/{{\s*fg_original_price\s*}}/gm,h(C(a)))[x(499)](/{{\s*fg_gift_price\s*}}/gm,h(T(a)))[x(499)](/{{\s*sca_fg_variant_select_section\s*}}/gm,h(y($.variants,$[x(508)]))).replaceAll(/{{\s*fg_product_belongs_to_offer\s*}}/gm,$[x(576)]).replaceAll(/{{\s*fg_variant_id\s*}}/gm,h(1===r?a[x(802)]:""))[x(499)](/{{\s*fg_add_to_cart\s*}}/gm,h(FGSECOMAPP[x(866)]?.add_to_cart_btn_title??x(599)))})[e(820)](" \n"),new Glider(document[e(619)](e(814)),{slidesToShow:1,slidesToScroll:1,draggable:!1,dots:FGSECOMAPP.fgAppearanceGiftSlider[e(636)]?e(538):null,arrows:{prev:e(740),next:e(754)},responsive:[{breakpoint:1024,settings:{slidesToShow:FGSECOMAPP[e(866)].number_product_slider??4,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]}),document[e(889)](new CustomEvent(FGSECOMAPP[e(759)][e(529)],{detail:FGSECOMAPP})))},Q=async()=>{let $=x;try{let t=window[$(749)]?.[$(595)]??[];for(let e in await $y(),FGSECOMAPP[$(828)])I(FGSECOMAPP[$(828)][e]?.id)&&delete FGSECOMAPP[$(828)][e];let a=[];return t[$(961)](x=>{let t=$;try{let e=JSON.parse(JSON[t(966)](x));if(x[t(1e3)].status){let i=x[t(662)][0][t(544)],r=i[0].value,c=[...e[t(691)]],o=[...e.gift_products];if("variant"===x[t(1e3)][t(701)])for(let s in r){let n=r[s]?.variant??[];for(let l of n){e.offer_conditions[0][t(544)]=[{type:i[0][t(701)],value:{[s]:{...r[s],variant:[{...l}]}}}],e[t(691)]=c[t(527)]($=>$.original_product_shopify_id+""===s&&l.id===$[t(586)]),e[t(489)]=o[t(527)]($=>$.original_product_shopify_id+""===s),e[t(489)][0].variants=[...e[t(691)]];let f=e[t(722)][t(776)],d=e[t(722)][t(955)];e[t(722)][t(955)]&&(f=e[t(691)][t(537)]),1===e[t(691)][t(537)]&&0===e[t(691)][0].price&&(d=!0),a[t(657)](JSON[t(689)](JSON.stringify({...e,gift_settings:{...e[t(722)],number_of_gift_can_receive:f,auto_add_all_gifts:d},id:e.id+"_"+r[s].handle+"_"+l.id})))}}else if(x[t(1e3)][t(701)]===t(727))for(let u in r){e[t(662)][0][t(544)]=[{type:i[0][t(701)],value:{[u]:r[u]}}],e[t(691)]=c.filter($=>$[t(747)]+""===u),e[t(489)]=o[t(527)]($=>$[t(747)]+""===u);let g=e[t(722)].number_of_gift_can_receive,p=e.gift_settings[t(955)];e.gift_settings[t(955)]&&(g=e[t(691)][t(537)]),1===e[t(691)][t(537)]&&0===e[t(691)][0][t(692)]&&(p=!0),a[t(657)](JSON.parse(JSON.stringify({...e,gift_settings:{...e[t(722)],number_of_gift_can_receive:g,auto_add_all_gifts:p},id:e.id+"_"+r[u][t(655)]})))}}}catch(b){console[t(579)](b)}}),(t=(t=(t=t?.[$(527)](x=>!x?.[$(1e3)]?.[$(957)])?.concat(a))?.[$(742)]($=>({...$,id:$.id.toString()})))?.filter(x=>{let t=$;if(!$t(x.start_time,x.end_time))return!1;let e=!I(x[t(612)]?.[t(855)]||x[t(612)]?.[t(821)]);if(x.sub_conditions&&(!B(x,SECOMAPP)||e&&I(SECOMAPP.customer[t(851)])))return!1;let a={...FGSECOMAPP[t(828)]},i=!1;if(FGSECOMAPP[t(498)][t(893)]===t(847)){x[t(691)]=x?.[t(691)][t(527)]($=>{let x=t,e=a[$[x(747)]]?.[x(677)]??{};return e[$[x(586)]]>0})??[];let r=x[t(691)]?.[t(742)]($=>$[t(802)]);x.gift_products=x?.[t(489)]?.[t(527)]($=>{let x=t;return $[x(816)]=$?.variants?.filter($=>r?.[x(598)]($.variant_shopify_id)),$?.variants?.[x(537)]>0}),i=!0}else if(FGSECOMAPP[t(498)][t(968)]){x[t(691)]=x?.gift_items[t(527)]($=>{let x=t,e=a[$[x(666)]]?.[x(677)]??{};return e[$[x(802)]]>0});let c=x[t(691)]?.[t(742)]($=>$.variant_shopify_id);x[t(489)]=x?.[t(489)]?.filter($=>{let x=t;return $[x(816)]=$?.[x(816)]?.[x(527)]($=>c?.[x(598)]($.variant_shopify_id)),$?.variants?.[x(537)]>0}),i=!0}return i&&x[t(722)]?.auto_add_all_gifts&&(x[t(722)].number_of_gift_can_receive=x.gift_items?.[t(537)]),!i||x[t(691)]&&x.gift_items[t(537)]>0}))?.[$(742)](x=>{let t=$,e=x[t(691)][t(742)]($=>$[t(747)]);return x[t(489)]=x.gift_products?.filter($=>{let x=t;return e[x(598)]($[x(747)])}),x[t(662)]?.[t(961)]($=>{let x=t;$[x(784)]===x(724)&&($[x(792)]=k($[x(792)]),$[x(834)]=I($[x(834)])?$[x(834)]:k($[x(834)]))}),x})}catch(i){return console[$(579)](i),[]}},J=$=>{let t=x;for(let e of FGSECOMAPP[t(1019)])if($[0][t(747)]===e.product_id)return!1;return!0},Z=($,t)=>{let e=x;for(let a of FGSECOMAPP[e(1019)]){let i=$[0][e(816)][0].original_price;if(!a[e(655)][e(598)](e(500))&&(t===e(1026)&&(i=$[0][e(816)][0][e(986)]),i>O(a)/100))return!1}return!0},$$=async()=>{let $=x;try{let t=[];window[$(749)]?.[$(595)]?.[$(961)](x=>{let e=$,a=[];x[e(489)][e(961)]($=>{let x=e;a.push($[x(639)],$[x(526)])}),t=[...t,...a]}),await $h(t=(t=[...new Set(t)])[$(527)](x=>I(FGSECOMAPP[$(710)][x]))),Object[$(708)](FGSECOMAPP[$(710)])?.[$(961)](x=>{let t=$,{info:e}=x;I(e)||I(e?.id)||(FGSECOMAPP[t(828)][e.id]={...e})})}catch(e){console[$(579)](e)}},$x=async $=>{let t=x;A(),FGSECOMAPP[t(705)](),(FGSECOMAPP?.[t(498)]?.[t(893)]===t(847)||FGSECOMAPP?.[t(498)]?.[t(968)])&&await $$(),FGSECOMAPP[t(595)]=await Q(),FGSECOMAPP[t(610)](),r(),s();try{I($)?(FGSECOMAPP[t(733)]=[],localStorage[t(558)](t(947),LZString[t(739)](JSON[t(966)](FGSECOMAPP[t(733)])))):FGSECOMAPP.arrOfferAdded=JSON.parse(LZString.decompressFromBase64(localStorage[t(681)](t(947))))}catch(e){FGSECOMAPP.arrOfferAdded=[],localStorage.setItem(t(947),LZString[t(739)](JSON[t(966)](FGSECOMAPP[t(733)])))}let a={};FGSECOMAPP[t(595)]?.[t(961)]($=>{let x=t;a[$.id]=$?.[x(691)]?.[x(742)]($=>$[x(802)])});let i=Object.keys(a);FGSECOMAPP[t(733)]=FGSECOMAPP[t(733)]?.[t(527)]($=>i?.[t(598)]($.belongs_to_offer?.[t(623)]())&&a[$.belongs_to_offer?.toString()][t(598)]($[t(830)]));let c={};FGSECOMAPP[t(733)]?.[t(961)]($=>{let x=t,e=c[$[x(576)]+"_"+$[x(830)]]??{};c[$[x(576)]+"_"+$[x(830)]]={...$,belongs_to_offer:$[x(576)]?.toString(),quantity:(e?.[x(760)]??0)+($?.[x(760)]??0)}}),FGSECOMAPP[t(733)]=Object[t(708)](c),localStorage[t(558)]("sca_offers_added",LZString[t(739)](JSON[t(966)](FGSECOMAPP.arrOfferAdded)));let o=await V($,FGSECOMAPP[t(595)]);await $e(o),$4(),$v(),$m()},$0=function(){let $=x,t=document[$(690)]("[data-open]"),e=document[$(690)]($(1024)),i=$(1012),r=document.querySelectorAll($(860)),c=r[$(537)];for(let o=0;o{let t=$;x[t(887)]===document.querySelector("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg")&&(document[t(619)](t(825))[t(789)][t(698)](i),a())}),document[$(603)]("keyup",x=>{let t=$;x[t(555)]===t(907)&&document[t(619)](t(825))&&(document[t(619)]("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg")[t(789)][t(698)](i),a())}),document.querySelectorAll($(927))[$(961)](x=>x[$(603)]($(988),function(){let x=$;this[x(673)](x(895),1),this.focus(),this[x(789)][x(593)](x(840)),this[x(619)](x(842)).classList[x(593)](x(805))})),document[$(690)]("#fg-gift-items .dropdown")[$(961)](x=>document[$(603)]($(988),function(t){let e=$,a=x[e(975)](t[e(887)]);a||(x[e(789)][e(698)](e(840)),x[e(619)](e(842)).classList[e(698)](e(805))),document[e(690)](e(774))[e(961)]($=>{let x=e;$.disabled=!0,$[x(615)][x(510)]=x(618)})})),document[$(690)]($(770)).forEach(x=>{let t=$;x[t(603)](t(988),function(){let $=t,x=this[$(753)]("id"),e=this[$(753)]($(718)),a=this[$(753)]($(761)),i=this[$(753)]($(977)),r=this.getAttribute($(826)),c=this[$(617)][$(617)][$(617)][$(617)];c[$(619)]($(867))[$(673)]($(772),e);let o=new URL(c.querySelector(".gift-original-url")[$(549)]);o[$(577)][$(699)]($(1025),r),c[$(619)]($(773)).href=o[$(623)]();let s=this[$(617)][$(617)][$(617)];s[$(619)]($(601))[$(781)]=i,s[$(619)]($(511)).textContent=a;let n=s?.[$(619)]($(979));n.setAttribute($(650),x),n[$(481)]=!1,n[$(615)]="";let l=this[$(617)][$(617)][$(619)]($(837));l[$(789)][$(643)]($(840)),l.innerHTML=this[$(788)]})}),document[$(690)]("#fg-gift-items .btn-add-to-cart")[$(961)](x=>x.addEventListener($(988),async function(){let x=$,t=this[x(753)]("data-variant")-0,e=this[x(753)](x(505));try{await u(t,1,e);let a=document[x(619)](x(825));a&&(FGSECOMAPP[x(877)]=!0,await new Promise($=>setTimeout($,800)),a.classList[x(698)](i)),window.location[x(549)][x(598)]("/cart")?location[x(972)]():typeof Shopify?.[x(517)]===x(702)&&await Shopify?.[x(517)](0===FGSECOMAPP[x(1013)][x(537)]?function(){}:FGSECOMAPP.fgCallback[0])}catch(r){console.error(r)}}))},$t=($,t)=>{if($){let e=new Date,a=e.getTime(),i=new Date($)[x(929)]();if(!t)return a>=i;{let r=new Date(t).getTime();return a>=i&&a<=r}}return!1},$e=async $=>{let t=x;if(FGSECOMAPP[t(498)]?.[t(706)])for(let e of FGSECOMAPP[t(1019)])g(e)&&($=$[t(527)]($=>$.product_shopify_id!==e[t(729)]));if(FGSECOMAPP[t(498)]?.not_show_gift_if_already_on_cart)for(let a of FGSECOMAPP.cartItems)$=$.filter($=>$.original_product_shopify_id!==a[t(729)]);if(FGSECOMAPP.fgSettings?.[t(796)])for(let i of FGSECOMAPP[t(1019)])$=$[t(527)]($=>{let x=t;return $[x(816)]=$[x(816)].filter($=>{let t=x,e=$[t(943)];return FGSECOMAPP.fgSettings?.[t(796)]==="compare_at_price"&&(e=$.original_compare_at_price),e<=O(i)/100}),!I($.variants)});$&&$[t(537)]>0&&(FGSECOMAPP[t(877)]?(await new Promise($=>setTimeout($,1500)),FGSECOMAPP.isDelayShowAdded=!1,v(),Y($)):(v(),Y($))),$0(),FGSECOMAPP.fetchCheckoutEvents(),FGSECOMAPP[t(809)](FGSECOMAPP.offers),$c=[]},$a=async $=>{let t=x;$c=[];let e=new URL(window.location[t(549)]);e[t(577)][t(699)](t(652),""),i(e[t(623)]())[t(763)]($=>$[t(890)]()).then($=>{let x=t,e=new DOMParser,a=e.parseFromString($,x(570)),i=x(785)+w(x(1009)),r=x(959)+w(x(734)),c=document.querySelector(i),o=!1;c&&(o=!0,c.innerHTML=a[x(619)](i)?.[x(490)]??c[x(490)]);let s=document[x(619)](r);s||(s=document[x(619)]("#shopify-section-header #cart-icon-bubble, .shopify-section.section-header #cart-icon-bubble")),s&&(o=!0,s[x(490)]=a[x(619)](r)?.innerHTML??a.querySelector(x(715))?.[x(490)]??s.innerHTML),o||console[x(850)](x(714))}),typeof FGSECOMAPP?.[t(854)]===t(702)&&await FGSECOMAPP[t(854)](),document.dispatchEvent(new CustomEvent(FGSECOMAPP[t(759)][t(952)],{detail:FGSECOMAPP})),b("end"),setTimeout(function(){$e($)},800)},$i=async $=>{let t=x,e=await i(t(613)+($??""),{method:t(797),headers:{Accept:"application/json","Content-Type":t(569)}}).then($=>$.json()),a=e[t(594)];return FGSECOMAPP.SHOPIFY_CART=e,FGSECOMAPP.cartItems=a?.[t(742)]($=>{let x=t;return{...FGSECOMAPP[x(1019)]?.[x(700)](x=>x.id===$.id),...$}})??[],e},$r=async()=>{let $=x,t=FGSECOMAPP.SHOPIFY_CART;try{await i(SECOMAPP[$(930)],{method:"GET",headers:{"Content-Type":$(660)}}).then(async x=>{let e=$,a=await x[e(899)]();FGSECOMAPP[e(1019)]=a?.cart?.[e(742)]($=>{let x=e;return{...FGSECOMAPP[x(1019)]?.find(x=>x.id===$.id),...$.product,collections:$[x(531)],tags:$.tags}})??[],FGSECOMAPP[e(912)]=a?.[e(596)]??{},t=FGSECOMAPP.SHOPIFY_CART})[$(556)](async x=>{let e=$;console[e(579)](e(936)+x[e(578)]),t=await $i()})}catch(e){console[$(579)]($(523),e[$(578)]),t=await $i()}return t},$c=[],$o=async $=>{let t=x;try{$c[t(657)]($[0]),document[t(889)](new CustomEvent(FGSECOMAPP[t(759)].START_PROCESS_CART,{detail:{events:$c,FGSECOMAPP:FGSECOMAPP}})),await $r();let e=await V(FGSECOMAPP[t(1019)],FGSECOMAPP[t(595)]);FGSECOMAPP[t(809)](FGSECOMAPP.offers);let a=!1;return $[0][t(786)](t(664))&&JSON[t(966)]($[1][t(1011)]??[])[t(598)](t(982))?(console.log("event add gift to cart from popup",[...$c]),await $a(e),a=!0):$[0].startsWith("/cart/update")&&JSON[t(966)]($[1][t(1011)]??[])[t(598)](t(892))?(console[t(850)]("event auto process gifts with cart",[...$c]),await $a(e),a=!0):(console.log(t(876),[...$c]),await $e(e)),a&&(window[t(548)][t(549)][t(598)](t(563))||document[t(619)](t(503))?.getAttribute(t(575))===t(550))&&($c=[],location.reload()),document[t(889)](new CustomEvent(FGSECOMAPP[t(759)][t(528)],{detail:{events:$c,FGSECOMAPP:FGSECOMAPP}})),FGSECOMAPP.cartItems}catch(i){console.error(i)}},$s=()=>{let $=x;if(!Shopify?.[$(933)])return;let t=document.querySelector($(607));if(!t)return;t[$(490)]="";let e=Shopify?.[$(672)]??$(980),a=document.createElement("li");a[$(944)]="sca-fg-toast sca-fg-success",a[$(490)]=$(580)+e+'
    \n
    \n \n \n \n \n \n ',t[$(815)](a),a[$(913)]=setTimeout(()=>$n(a),3e3),document[$(619)]($(716))?.[$(603)]($(988),()=>$n(a))},$n=$=>{let t=x;$[t(789)][t(643)](t(487)),$.timeoutId&&clearTimeout($[t(913)]),setTimeout(()=>$[t(698)](),500)},$l=$=>{let t=x;try{let e=FGSECOMAPP.fgSettings?.mode_override_checkout,a="trigger_body"===e?$.target:$[t(543)]??$[t(887)];a?.hasAttribute("sca_handle_checkout")||(a=document[t(619)]("#sca-spinner-checkout")?.[t(794)]);let i=JSON.parse(a[t(753)](t(779)));if(a[t(588)]=i?.[t(588)]??"",a.innerHTML=i?.innerHTML??"",a.disabled=!1,a.removeEventListener(t(988),$f),a.removeAttribute(t(831)),e===t(696)){a[t(794)][t(619)]("[sca_root_checkout]").click();return}e===t(827)&&window[t(485)](t(988),$d,!0),a[t(988)]()}catch(r){window[t(548)][t(751)]((Shopify?.[t(799)]?.[t(869)]??"/")+t(904)),console[t(579)](r[t(578)])}};FGSECOMAPP.customLoadingCheckout=async($,t)=>{let e=x;if($===e(896)&&t)t[e(481)]=!0,t[e(673)](e(779),JSON[e(966)]({innerHTML:t.innerHTML,value:t[e(588)]})),typeof FGSECOMAPP?.[e(741)]===e(702)?await FGSECOMAPP[e(741)]($):(t[e(588)]=Shopify?.[e(535)]??"Loading...",t[e(490)]=Shopify?.sca_fg_innerHTML??'
    \n Loading...\n
    ');else if($===e(536)&&t){if("function"==typeof FGSECOMAPP?.[e(741)])await FGSECOMAPP[e(741)]($);else{let a=JSON[e(689)](t[e(753)](e(779)));t[e(588)]=a?.[e(588)]??"",t.innerHTML=a?.[e(490)]??""}t[e(481)]=!1}else $===e(579)?(typeof FGSECOMAPP?.scaCustomLoadingCheckout===e(702)&&await FGSECOMAPP[e(741)]($),window[e(548)][e(751)]((Shopify?.[e(799)]?.[e(869)]??"/")+e(904))):console[e(579)](e(486),$)};let $f=async $=>{let t=x;try{$[t(750)](),$[t(1001)](),$.stopImmediatePropagation();let e=FGSECOMAPP[t(498)]?.[t(641)],a=e===t(827)?$[t(887)]:$[t(543)]??$.target,{form:r}=a;if(await FGSECOMAPP[t(945)](t(896),a),document[t(889)](new CustomEvent(FGSECOMAPP[t(759)].START_VALIDATE_CHECKOUT,{detail:FGSECOMAPP})),FGSECOMAPP[t(581)])return!1;FGSECOMAPP[t(581)]=!0;try{let c=new URL(r[t(817)]);c[t(577)][t(674)]("sca_checkout_form",""),await i(c[t(623)](),{method:t(1007),body:new FormData(r)})}catch(o){console[t(850)]("not type checkout btn")}if(I(FGSECOMAPP[t(595)])&&I(FGSECOMAPP.cartItems?.[t(700)]($=>g($))))return console[t(850)](t(775)),$l($),!1;await $r();let s=[...FGSECOMAPP[t(1019)]],n=!1;for(let l of FGSECOMAPP[t(595)])if(l[t(1020)]&&l[t(1020)][t(537)]){let f=q(s,l),d=$t(l.start_time,l[t(934)]);!d&&f[t(1020)][t(537)]>0&&(n=!0),f[t(585)]||(n=!0),f[t(868)]<0&&(n=!0),l[t(612)]&&!B(l,SECOMAPP)&&(n=!0)}if(await V(s,FGSECOMAPP[t(595)]),n)location[t(972)]();else try{FGSECOMAPP[t(498)].using_draft_order&&!I(FGSECOMAPP.cartItems?.[t(700)]($=>g($)))?await i(SECOMAPP[t(930)]+"&sca_shop_name="+Shopify?.[t(631)],{method:"GET",headers:{"Content-Type":"application/liquid"}})[t(763)](async $=>{let x=t,e=await $[x(899)]();e.cart=(e[x(695)]??[])[x(742)]($=>{let t=x;return $.product[t(531)]=$.collections?.[t(742)]($=>({id:$.id})),$[t(727)].tags=$.tags,{id:$[t(727)].id,variant_id:$[t(727)][t(737)],title:$.product.title,handle:$[t(727)][t(655)],price:O($.product),quantity:$[t(727)][t(760)],product_type:$[t(727)][t(553)],vendor:$[t(727)].vendor,tags:$[t(727)][t(1030)],collections:$[t(727)].collections,selling_plan_allocation:$[t(727)][t(819)]}}),e[x(905)]={arr_offer_added:FGSECOMAPP.arrOfferAdded,secomapp:{customer:SECOMAPP?.customer??{},fg_codes:SECOMAPP?.fg_codes??[],fgSettings:FGSECOMAPP[x(498)]},cookie_fg_code:U(x(522)),shopify_currency:Shopify?.[x(1022)]},await i(SECOMAPP.freegiftProxy+x(803)+LZString.compressToEncodedURIComponent(e=JSON[x(966)](e)),{method:x(797),headers:{"Content-Type":x(660)}})[x(763)](async $=>{let t=x,e=await $.json();try{FGSECOMAPP[t(581)]=!1,e[t(482)]&&(window[t(548)][t(549)]=e[t(482)][t(915)])}catch(a){console[t(579)](a)}})}):(console[t(850)]("not using draft order"),FGSECOMAPP[t(581)]=!1,$l($))}catch(u){FGSECOMAPP[t(581)]=!1,$l(u)}await FGSECOMAPP[t(945)](t(536),a=e===t(827)?$.target:$[t(543)]??$[t(887)]),document[t(889)](new CustomEvent(FGSECOMAPP[t(759)][t(908)],{detail:FGSECOMAPP}))}catch(p){await FGSECOMAPP.customLoadingCheckout(t(579)),document[t(889)](new CustomEvent(FGSECOMAPP[t(759)].END_VALIDATE_CHECKOUT,{detail:FGSECOMAPP})),console[t(579)](p)}},$d=async $=>{$.target?.[x(713)]("sca_handle_checkout")&&await $f($)},$8=()=>{let $=x,t=FGSECOMAPP[$(498)]?.[$(641)],e=$(547),a=e+$(590)+w($(845));document[$(690)](a)[$(961)](x=>{let e=$,a=x[e(713)](e(923)),i=x[e(713)]("sca_clone_checkout"),r=x.hasAttribute(e(831));if("clone_checkout"===t){if(a)return;if(!i&&!r){let c=x.cloneNode(!0);c[e(603)](e(988),$f),c.setAttribute(e(831),""),c.setAttribute(e(707),""),x[e(615)][e(688)]=e(584),x[e(615)].visibility=e(644),x[e(615)][e(530)]="0",x.setAttribute(e(923),""),x[e(794)]?.[e(815)](c)}i&&!r&&(x[e(603)](e(988),$f),x.setAttribute(e(831),""))}else t===e(827)?x[e(673)](e(831),""):r||(x[e(603)](e(988),$f),x[e(673)]("sca_handle_checkout",""));FGSECOMAPP[e(793)]=!0}),t===$(827)&&window[$(603)]($(988),$d,!0)};FGSECOMAPP[x(705)]=()=>{let $=x;FGSECOMAPP[$(493)]=0;let t=setInterval(()=>{let x=$;$8(),FGSECOMAPP[x(493)]++,(FGSECOMAPP[x(493)]>10||FGSECOMAPP.hasDoneProcessCheckout)&&(FGSECOMAPP[x(493)]=0,clearInterval(t))},400)};let $1=$=>{let t=x;try{let e={},a={},i=FGSECOMAPP[t(595)];if(I($)){$=[],I(Shopify?.[t(873)])||$.push({...Shopify?.[t(873)]});let r={...Shopify?.[t(496)],...Shopify?.[t(726)]?.[t(914)]};Object[t(708)](FGSECOMAPP[t(710)])?.[t(527)]($=>!I($[t(778)])&&(I($?.[t(808)])||$?.[t(808)]&&!$?.[t(987)]?.[t(668)]($=>$?.[t(789)]?.[t(975)](t(949)))))?.forEach($=>{let x=t;r[$[x(778)].id]={...$[x(778)]}}),$=$[t(942)]([...Object[t(708)](r)])}for(let c in $?.[t(961)]($=>{let x=t,e=FGSECOMAPP[x(710)][$.handle];FGSECOMAPP[x(710)][$[x(655)]]={...e,info:{...$},product_has_icon:!!I(i)&&void 0}}),i?.forEach(x=>{let i=t,r=x[i(662)];if(1===r.length&&r[0][i(784)]===i(514)&&typeof r[0][i(483)]===i(683)){let c,o=r[0].product_narrow;o?.[i(961)](x=>{let t=i;switch(x[t(701)]){case"variants_ids":c=Object.values(x[t(588)]);break;case t(1023):let e=Object[t(488)](x[t(588)]);e[t(537)]>0&&(c=(void 0===c?$:c)?.[t(527)]($=>e[t(598)]($.type))??[]);break;case t(861):let a=Object.keys(x.value);a[t(537)]>0&&(c=(void 0===c?$:c)?.filter($=>a[t(598)]($[t(806)]))??[]);break;case t(502):let r=Object.keys(x.value);r.length>0&&(c=(void 0===c?$:c)?.[t(527)]($=>{let x=t,e=$[x(531)]?.map($=>$.id+""),a=e?.[x(527)]($=>r.includes($));return!I(a)})??[])}}),c?.[i(961)]($=>{let t=i,r=$[t(655)];if(e[r]){let c=e[r]?.[t(742)]($=>$[t(747)]),o=x.gift_products?.[t(527)]($=>!c?.[t(598)]($.original_product_shopify_id));e[r]=e[r][t(942)](o)}else e[r]=x[t(489)];let s=$[t(1025)]?.[t(742)]($=>$.id)??[];a[r]=s[t(942)](a[r]??[]),a[r]=[...new Set(a[r])]})}}),e){let o=FGSECOMAPP[t(710)][c];FGSECOMAPP.productsInPage[c]={...o,gifts_will_receive:[...e[c]],product_has_icon:!0,variants_has_gift:[...a[c]]}}return Object[t(721)](e)?.[t(537)]?e:{}}catch(s){return console.error(s),null}},$u=$=>{let e=x,a=FGSECOMAPP.fgAppearanceGiftIcon[e(862)]??{};if(!a.gift_thumbnail?.[e(957)])return;let i=document[e(619)](t[e(525)])?.[e(490)]??t[e(931)],r=$?.[e(742)]($=>i[e(499)](/{{\s*fg_product_handle\s*}}/gm,h(S($[e(747)],$[e(526)]),!0))[e(499)](/{{\s*fg_product_img\s*}}/gm,h(K($[e(508)]),!0))[e(499)](/{{\s*fg_product_img_alt\s*}}/gm,h(E($[e(747)],$[e(587)]))))[e(820)](""),c=document[e(619)](t.GIFT_THUMBNAIL_SECTION_ID)?.[e(490)]??t[e(848)],o=c[e(499)](/{{\s*fg_gift_thumbnail_title\s*}}/gm,h(a[e(620)]?.title??e(849)))[e(499)](/{{\s*sca_fg_gift_thumbnail_items_section\s*}}/gm,r)[e(499)](/{{\s*fg_check_show_narrow\s*}}/gm,$?.[e(537)]>=4?"":e(492)),s=e(684)+w("sca_fg_btn_gift_thumbnail_query"),n=document[e(619)](s)??document[e(619)](e(800));if(!n)return;n[e(794)][e(615)].width=e(976),n[e(794)][e(615)][e(946)]="auto",n[e(794)]?.className?.[e(598)](e(1004))||n[e(794)]?.[e(789)]?.add(e(1004));let l=n.parentNode.querySelector("#sca-gift-thumbnail");if(l)l[e(490)]=o;else{(l=document[e(956)](e(891))).setAttribute("id",e(844));let f=new DOMParser()[e(512)](o,e(570));l[e(490)]=f[e(1010)][e(490)],n[e(794)][e(748)](l,n)}n[e(794)][e(748)](l,n);let d=document[e(619)]("#fg-gift-thumbnail-title");if(d)switch(a[e(620)]?.[e(858)]){case"32":d.style[e(704)]=e(693);break;case"50":d[e(615)][e(704)]=e(497);break;case e(978):d[e(615)].maxWidth=e(506);break;case"160":d[e(615)][e(704)]="80%";break;case e(994):d[e(615)][e(704)]=e(976);break;default:d[e(615)][e(704)]=e(497)}if($?.[e(537)]>=4)new Glider(document[e(619)](e(872)),{slidesToShow:3,slidesToScroll:1,draggable:!0,dots:".dots-thumbnail",arrows:{prev:e(735),next:"#fg-gift-thumbnail-title .glider-next"}});else{d&&(d.style[e(704)]="100%");let u=document[e(619)](e(872));u&&(u.style.display=e(1002))}},$g=()=>{let $=x;if(!(FGSECOMAPP[$(669)][$(862)]??{})[$(744)]?.[$(957)])return;let e=document[$(619)](t[$(557)])?.innerHTML??t[$(812)],a=e.replaceAll(/{{\s*fg_gift_icon\s*}}/gm,FGSECOMAPP.fgAppearanceGiftIcon[$(572)])[$(499)](/{{\s*fg_gift_icon_alt\s*}}/gm,"free-gift-icon").replaceAll(/{{\s*fg_class_product_or_collection_page\s*}}/gm,$(513)),i=".fg-secomapp-product-title "+w($(973)),r=document.querySelector(i)??document[$(619)]($(516));if(!r)return;r.style[$(534)]=$(484),r[$(615)][$(836)]=$(568),r[$(944)]?.includes($(565))||r[$(789)]?.[$(643)]($(565));let c=r[$(619)]($(687));if(c)c[$(490)]=a;else{(c=document[$(956)]($(891))).setAttribute("id",$(524));let o=new DOMParser()[$(512)](a,$(570));c.innerHTML=o[$(1010)][$(490)],r[$(815)](c)}},$p=()=>{let $=x,t=[],e=$(1016)+w($(969));return document[$(690)](e)[$(961)](x=>{let e=$,a=x[e(619)](e(504)),i=a?.[e(753)](e(549))?.split("/")??[],r=i?.[e(1003)]("products"),c=r>=0?i[r+1]??null:null;if(c=c?.[e(654)]("?")?.shift(),g(c)){x[e(698)]();return}let o=x.querySelector(e(632));if(o){x.remove();return}if(I(c))return;let s=decodeURI(c);I(FGSECOMAPP.productsInPage[s]?.info)&&t[e(657)](s);let n=(FGSECOMAPP[e(710)][s]?.[e(987)]??[])[e(527)]($=>!x.isSameNode($));n[e(657)](x),FGSECOMAPP[e(710)][s]={...FGSECOMAPP[e(710)][s],positions:[...n]}}),t},$b=$=>{let e=x;Object.keys($)?.[e(961)]($=>{let x=e,a=FGSECOMAPP.productsInPage[$]?.positions??[];if(I(a)||!Array[x(954)](a))return;if(!(FGSECOMAPP[x(669)].collection_page??{})[x(957)])return;let i=document[x(619)](t[x(557)])?.innerHTML??t.GIFT_ICON_SECTION,r=i[x(499)](/{{\s*fg_gift_icon\s*}}/gm,FGSECOMAPP[x(669)][x(572)]).replaceAll(/{{\s*fg_gift_icon_alt\s*}}/gm,x(974)).replaceAll(/{{\s*fg_class_product_or_collection_page\s*}}/gm,x(635));a[x(961)]($=>{let t=x;$[t(615)].position=t(484),$.className?.includes(t(659))||$[t(789)]?.[t(643)]("sca-fg-icon-collection-page");let e=$[t(619)](t(996));if(e)e.innerHTML=r;else{(e=document[t(956)](t(891)))[t(673)]("class",t(949));let a=new DOMParser()[t(512)](r,"text/html");e[t(490)]=a[t(1010)].innerHTML,$[t(815)](e)}})})},$_=async $=>{let t=x;await i(SECOMAPP[t(930)]+t(924)+LZString[t(703)](JSON[t(966)]($)),{method:t(797),headers:{"Content-Type":"application/liquid"}})[t(763)](async $=>{let x=t,e=await $[x(899)](),a=[];e?.products?.[x(961)]($=>{let t=x;I($?.[t(914)]?.id)||a[t(657)]({...$[t(914)],collections:$[t(531)],variants_quantity:$[t(677)]})});let i=$1(a);$b(i)})[t(556)]($=>{console[t(579)]($)})},$h=async $=>{let t=x,e=[];for(let[a,i]of $[t(721)]())I(FGSECOMAPP[t(710)][i]?.[t(778)])&&e.push(i),20===e.length&&(await $_([...e]),e=[]),a===$[t(537)]-1&&e.length>0&&(await $_([...e]),e=[])},$m=()=>{let $=$p(),t=$1();$b(t),$h($)[x(763)]()},$4=()=>{let $=x;Shopify?.[$(717)]&&document[$(603)]($(798),function(){let x=$,t=new URL(document[x(616)]),e=parseInt(t[x(577)][x(801)]("variant"));$v(isNaN(e)?void 0:e)})},$v=$=>{let t=x;if(!location[t(549)].includes(t(810)))return;document[t(619)](t(687))?.[t(698)](),document[t(619)]("#sca-gift-thumbnail")?.[t(698)]();let e=$1();if(I(e))return;let a=location[t(919)][t(654)]("/"),i=a?.[t(1003)](t(914)),r=decodeURI(i>=0?a[i+1]??null:null);if(!Object[t(488)](e)?.includes(r))return;let c=e[r],o=FGSECOMAPP[t(710)][r]?.variants_has_gift??[];!(Shopify?.enable_check_variants_has_gift&&(!I($)&&!o[t(598)]($)||I($)&&!I(Shopify?.[t(873)]?.[t(958)])&&!o[t(598)](Shopify?.[t(873)]?.current_variant?.id)))&&($u(c),$g(c))};FGSECOMAPP[x(809)]=$=>{let e=x;try{I($)&&($=[...FGSECOMAPP[e(595)]]);let a=location.href[e(598)]("/cart"),i=[];if($?.[e(961)]($=>{let x=e;if($[x(585)]||I($.promotion_message)||!I(FGSECOMAPP[x(611)])&&!$[x(585)]&&$.stop_lower_priority&&$[x(494)]>FGSECOMAPP[x(611)])return;let t=$[x(1017)];$[x(662)]?.forEach($=>{let e=x,a=L(FGSECOMAPP[e(1019)],$);a=P(a,$[e(624)]);let i=0,r=null,c=0;"money"===$.unit?(i=D(a),r=e(609),c=Shopify?.[e(532)]??2):$[e(784)]===e(514)&&(i=R(a),r="{{sca_min_quantity}}",c=0);let o=Math.max($[e(792)]-i,0).toFixed(c);t=t[e(499)](r,o)}),i[x(657)](t)}),I(i)){document[e(690)](e(634))[e(961)]($=>$[e(490)]="");return}let r="",c=document[e(619)](t[e(509)])?.innerHTML??t[e(709)],o=i[e(742)]($=>c[e(499)](/{{\s*fg_cart_message\s*}}/gm,h($))).join(""),s=document.querySelector(t[e(993)])?.[e(490)]??t[e(965)],n=s.replaceAll(/{{\s*sca_fg_cart_message_items_section\s*}}/gm,o);FGSECOMAPP.fgAppearancePromotionMessage.show_on_cart_page&&(r=n);let l="#MainContent, #mainContent, #main, .main-content",f=document[e(619)](l),d=f?.[e(619)]("cart-items, .cart-header, .section-header"),u=e(633),g=document[e(690)](u+e(787)+w(e(932))),p=document[e(690)](e(634));I(p)||p[e(961)]($=>$[e(490)]=r),(p=document[e(956)](e(891)))[e(673)]("id",e(835)),p[e(789)].add(e(835));let b=new DOMParser()[e(512)](r,"text/html");p.innerHTML=b[e(1010)][e(490)],I(g)?!f?.querySelector(e(634))&&(b=new DOMParser()[e(512)](r,e(570)),p[e(490)]=b.body.innerHTML,f&&d&&a?d[e(886)](p):f&&a&&f.prepend(p)):g?.[e(961)]($=>{let x=e;if($[x(619)](".sca-promotion-message-layout"))return;let t=p[x(591)](!0);$[x(886)](t)});try{document[e(690)](e(883))[e(961)]($=>{let x=new Glider($);(($,x)=>{let t=_0x50af,e=$[t(608)][t(646)],a=null,i=1;function r(){a=setTimeout(()=>{i>=e&&(i=0),$.scrollItem(i++)},x)}$.ele.addEventListener(t(997),function(){window[t(864)](a),r()}),r()})(x,Shopify?.[e(902)]??3e3)})}catch(_){console[e(579)](_)}}catch(m){console[e(579)](m)}};let $y=async()=>{let $=x;try{let t=await i($(1034)),e=await t.json();FGSECOMAPP[$(879)]=e?.[$(637)]}catch(a){console.log($(807))}},$3=function(){let $=x;try{document[$(603)](FGSECOMAPP[$(759)][$(952)],async()=>{let x=$;try{window[x(910)]&&(unicart[x(889)](x(728)),console[x(850)]("Unicart"))}catch(t){console[x(579)]("Unicart",t)}try{window[x(863)]&&(await window[x(863)](),console[x(850)](x(963)))}catch(e){console.error(x(963),e)}try{window.SLIDECART_UPDATE&&(await $i(x(838)).then($=>{let t=x;window[t(1014)]($),window[t(621)]()}),console[x(850)]("SLIDECART - HQ"))}catch(a){console.error("SLIDECART - HQ",a)}try{let i=document[x(619)]("#upCartStickyButton .upcart-sticky-cart-quantity-icon-text");window[x(771)]&&(await window[x(771)](),console[x(850)]("UpCart - AfterSell"),i&&(i.innerHTML=FGSECOMAPP?.[x(912)]?.[x(813)]??0))}catch(r){console.error(x(638),r)}try{window[x(667)]&&(await window[x(667)](),window[x(782)](),console[x(850)](x(604)))}catch(c){console[x(579)](x(604),c)}try{window?.[x(730)]?.[x(561)]?.[x(755)]?.[x(938)]&&(await window[x(730)].Widgets[x(755)][x(938)](),console.log(x(888)))}catch(o){console[x(579)](x(888),o)}try{window.monster_refresh&&(await window[x(1031)](),window[x(738)](),console.log("Monster Cart"))}catch(s){console[x(579)](x(925),s)}try{window.HS_SLIDE_CART_UPDATE&&await (window[x(906)](),window[x(515)](),console[x(850)]("Slide Cart - Heysenior"))}catch(n){console[x(579)](x(925),n)}}),window[$(603)]($(981),function(x){FGSECOMAPP[$(809)](),FGSECOMAPP.fetchCheckoutEvents()}),document.addEventListener($(853),x=>{FGSECOMAPP.renderPromotionMessage(),FGSECOMAPP[$(705)]()}),window.SLIDECART_OPENED=function(){FGSECOMAPP.renderPromotionMessage(),FGSECOMAPP[$(705)]()},window.upcartOnCartOpened=()=>{let x=$;FGSECOMAPP[x(809)](),FGSECOMAPP[x(705)]()},document[$(603)](FGSECOMAPP[$(759)][$(529)],()=>{let x=$;try{typeof window[x(640)]===x(702)&&window[x(640)](),"function"==typeof window.closeCart&&window.closeCart(),typeof window[x(1033)]===x(702)&&window[x(1033)](),document[x(619)](x(723))?.[x(988)]()}catch(t){console[x(579)](t)}}),document.addEventListener(FGSECOMAPP[$(759)][$(539)],()=>{let x=$;try{!document[x(619)](x(756))&&window.upcartRegisterAddToCart&&window[x(771)]()}catch(t){console[x(579)](t)}})}catch(t){console.error(t)}};$x(FGSECOMAPP[x(1019)])[x(763)](()=>{$3()})}();