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":true},"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 _0x76c68e=_0x34a0;function _0x34a0($,x){let e=_0x152d();return(_0x34a0=function($,x){return e[$-=431]})($,x)}function _0x152d(){let $=["show_variant_title","variants_ids",'">\n ',"glider-animated","change","sca_process_gifts","class",'">\n ',"discount_percentage","message","gift_popup_title","sca-gift-thumbnail","Default Title","stopPropagation",".btn-add-to-cart","hasDoneProcessCheckout","text/html","length","variantId","#fg-gift-items .dropdown","variants","stopImmediatePropagation",'',"sections","money","concat","show_pagination","data-version","specific_link_address","240","active","scaCountRenderEventCheckout",'\n \n ',"application/json","belongs_to_offer","push","disabled","reRenderCartCustom","sca-is-visible-fg","enable_check_variants_has_gift","mode_override_checkout","charAt",'a[href*="/collections/sca_fg"]',"stop_lower_priority","hasOwnProperty","rate","time","offer_name","number","
","[sca_root_checkout]","sca_add_gift","not type checkout btn","hasAttribute",'" target="_blank">\n
\n \n ","\n ",'"\n data-original-price="',"sca_fg_codes","gift_icon","classList","883815bNvQUS","1895103wkDWvt","sca_fg_form_checkbox_button_query","getTime","product_types","#CartDrawer .drawer__inner","{{sca_min_total}}","#sca-gift-thumbnail",'\n ',"api","substring","sca-gift-icon-collection-page",'" id="',"fgAppearancePromotionMessage","original_price","opacity","parse","\n \n ","gift_products","entries",'\n \n ',"function",".freegifts-main-container .slide-container #sca-hidden-gift-popup .sca-disable-checkbox",'\n
","stop_offer","contains","fgAppearanceGiftIcon","add",".sca-promotion-message-layout","346402qmPDjg","data-template","src",'\n \n ',"vendor","application/liquid","FGSECOMAPP_HIDDEN_GIFT_POPUP","product_page","startsWith","catch","gift_should_the_same","clearInterval","click","routes","backgroundColor","/products/","forEach","height","body","#fg-gift-thumbnail-title .glider-next","fg_codes","sca-fg-form-thumbnail-product-page","current_product","disableShopify_getCart","sections_url","innerText","product",'',"variants_has_gift","cloneNode","textContent",'\n \n "})[x(612)](" \n"),new Glider(document[x(748)](x(538)),{slidesToShow:1,slidesToScroll:1,draggable:!1,dots:FGSECOMAPP.fgAppearanceGiftSlider[x(570)]?".dots":null,arrows:{prev:x(512),next:".freegifts-main-container .glider-next"},responsive:[{breakpoint:1024,settings:{slidesToShow:FGSECOMAPP.fgAppearanceGiftSlider[x(746)]??4,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]}))},R=()=>{let $=_0x76c68e;try{let x=window.fgData?.[$(444)]??[];for(let e in Shopify?.products)g(Shopify?.[$(741)][e]?.id)&&delete Shopify?.[$(741)][e];let t=[];return x.forEach(x=>{let e=$,a=JSON[e(652)](JSON[e(835)](x));if(x[e(865)][e(524)]){let i=x[e(698)][0][e(747)],r=i[0][e(627)],c=[...a[e(708)]],n=[...a[e(654)]];if(x.gift_should_the_same[e(506)]===e(704))for(let o in r){let l=r[o]?.variant??[];for(let s of l){a[e(698)][0][e(747)]=[{type:i[0][e(506)],value:{[o]:{...r[o],variant:[{...s}]}}}],a[e(708)]=c[e(459)]($=>$[e(501)]+""===o&&s.id===$.original_variant_shopify_id),a.gift_products=n[e(459)]($=>$[e(501)]+""===o),a[e(654)][0][e(564)]=[...a[e(708)]];let d=a.gift_settings[e(657)],f=a[e(802)][e(720)];a[e(802)][e(720)]&&(d=a[e(708)].length),1===a[e(708)][e(561)]&&0===a[e(708)][0][e(488)]&&(f=!0),t[e(579)](JSON.parse(JSON.stringify({...a,gift_settings:{...a[e(802)],number_of_gift_can_receive:d,auto_add_all_gifts:f},id:a.id+"_"+r[o][e(730)]+"_"+s.id})))}}else if(x[e(865)].type===e(881))for(let _ in r){a[e(698)][0][e(747)]=[{type:i[0][e(506)],value:{[_]:r[_]}}],a[e(708)]=c[e(459)]($=>$[e(501)]+""===_),a.gift_products=n[e(459)]($=>$[e(501)]+""===_);let u=a[e(802)].number_of_gift_can_receive,b=a[e(802)][e(720)];a[e(802)][e(720)]&&(u=a[e(708)].length),1===a[e(708)].length&&0===a.gift_items[0][e(488)]&&(b=!0),t.push(JSON[e(652)](JSON.stringify({...a,gift_settings:{...a[e(802)],number_of_gift_can_receive:u,auto_add_all_gifts:b},id:a.id+"_"+r[_][e(730)]})))}}}),(x=(x=(x=x?.[$(459)](x=>!x?.[$(865)]?.status)?.concat(t))?.map(x=>{let e=$;return{...x,id:x.id[e(839)]()}}))?.[$(459)](x=>{let e=$;if(!W(x[e(441)],x[e(787)]))return!1;let t=!g(x[e(445)]?.[e(770)]||x.sub_conditions?.[e(665)]);if(x.sub_conditions&&(!P(x,SECOMAPP)||t&&g(SECOMAPP.customer[e(886)])))return!1;let a={...Shopify?.[e(741)]},i=!1;if(FGSECOMAPP.fgSettings[e(683)]===e(850)){x.gift_items=x?.[e(708)][e(459)]($=>{let x=e,t=a[$[x(501)]]?.[x(535)]??{};return t[$[x(712)]]>0})??[];let r=x[e(708)]?.map($=>$[e(725)]);x.gift_products=x?.gift_products?.[e(459)]($=>{let x=e;return $.variants=$?.[x(564)]?.filter($=>{let e=x;return r?.[e(662)]($.variant_shopify_id)}),$?.[x(564)]?.[x(561)]>0}),i=!0}else if(FGSECOMAPP.fgSettings[e(495)]){x[e(708)]=x?.gift_items[e(459)]($=>{let x=e,t=a[$.product_shopify_id]?.[x(535)]??{};return t[$[x(725)]]>0});let c=x[e(708)]?.map($=>$[e(725)]);x[e(654)]=x?.[e(654)]?.filter($=>{let x=e;return $.variants=$?.[x(564)]?.[x(459)]($=>{let e=x;return c?.[e(662)]($[e(725)])}),$?.[x(564)]?.[x(561)]>0}),i=!0}return i&&x.gift_settings?.[e(720)]&&(x[e(802)][e(657)]=x.gift_items?.[e(561)]),!i||x[e(708)]&&x[e(708)].length>0}))?.map(x=>{let e=$,t=x[e(708)][e(828)]($=>$[e(501)]);return x[e(654)]=x[e(654)]?.[e(459)]($=>{let x=e;return t[x(662)]($.original_product_shopify_id)}),x.offer_conditions?.[e(871)]($=>{let x=e;$[x(460)]===x(568)&&($[x(625)]=m($[x(625)]),$[x(471)]=g($[x(471)])?$[x(471)]:m($[x(471)]))}),x})}catch(a){return console[$(883)](a),[]}},j=$=>{let x=_0x76c68e;for(let e of FGSECOMAPP[x(788)]){let t=e[x(518)];if($[0][x(501)]===t)return!1}return!0},N=$=>{let x=_0x76c68e;for(let e of FGSECOMAPP[x(788)]){let t=$[0][x(564)][0][x(650)];if(FGSECOMAPP[x(537)][x(478)]===x(736)&&(t=$[0].variants[0][x(517)]),t>e[x(488)]/100)return!1}return!0},F=async()=>{let $=_0x76c68e;try{let x=[];window[$(734)]?.[$(444)]?.[$(871)](e=>{let t=$,a=[];e[t(654)][t(871)]($=>{let x=t;a[x(579)]($[x(540)],$.original_product_handle)}),x=[...x,...a]}),await $c(x=(x=[...new Set(x)])[$(459)](x=>g(FGSECOMAPP[$(672)][x]))),Object[$(803)](FGSECOMAPP[$(672)])?.[$(871)](x=>{let e=$,{info:t}=x;g(t)||g(t?.id)||(Shopify[e(741)][t.id]={...t})})}catch(e){console[$(883)](e)}},B=async $=>{let x=_0x76c68e;h(),FGSECOMAPP[x(613)](),FGSECOMAPP?.[x(537)]?.[x(683)]===x(850)||FGSECOMAPP?.fgSettings?.[x(495)]?await F():F()[x(806)](),FGSECOMAPP[x(444)]=R(),FGSECOMAPP.initializeForXHR(),a();try{g($)?(FGSECOMAPP[x(611)]=[],localStorage[x(690)](x(503),LZString[x(826)](JSON.stringify(FGSECOMAPP[x(611)])))):FGSECOMAPP[x(611)]=JSON[x(652)](LZString.decompressFromBase64(localStorage.getItem(x(503))))}catch(e){FGSECOMAPP[x(611)]=[],localStorage[x(690)](x(503),LZString[x(826)](JSON[x(835)](FGSECOMAPP[x(611)])))}let t={};FGSECOMAPP[x(444)]?.forEach($=>{let e=x;t[$.id]=$?.[e(708)]?.[e(828)]($=>$[e(725)])});let i=Object.keys(t);FGSECOMAPP[x(611)]=FGSECOMAPP[x(611)]?.filter($=>i?.[x(662)]($.belongs_to_offer?.[x(839)]())&&t[$[x(578)]?.[x(839)]()][x(662)]($[x(562)]));let r={};FGSECOMAPP[x(611)]?.[x(871)]($=>{let e=x,t=r[$[e(578)]+"_"+$[e(562)]]??{};r[$[e(578)]+"_"+$[e(562)]]={...$,belongs_to_offer:$.belongs_to_offer?.[e(839)](),quantity:(t?.quantity??0)+($?.[e(440)]??0)}}),FGSECOMAPP.arrOfferAdded=Object.values(r),localStorage[x(690)]("sca_offers_added",LZString[x(826)](JSON[x(835)](FGSECOMAPP[x(611)])));let c=await O($,FGSECOMAPP.offers);X(c),$o(),$l(),$n()},U=function(){let $=_0x76c68e,x=document[$(884)]("[data-open]"),t=document.querySelectorAll($(497)),a=$(582),i=document[$(884)]("#fg-gift-items .btn-add-to-cart"),r=i[$(561)];for(let n=0;n{let t=$;x[t(732)]===document[t(748)](t(678))&&(document[t(748)]("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg")[t(635)][t(711)](a),e())}),document[$(776)]("keyup",x=>{let t=$;x[t(841)]===t(699)&&document[t(748)](t(678))&&(document[t(748)](t(678))[t(635)][t(711)](a),e())}),document[$(884)]($(563))[$(871)](x=>x[$(776)]($(867),function(){let x=$;this.setAttribute(x(466),1),this.focus(),this[x(635)][x(688)](x(574)),this[x(748)](x(805)).classList[x(688)]("d-block")})),document[$(884)]($(563))[$(871)](x=>document[$(776)]($(867),function(e){let t=$,a=x.contains(e.target);a||(x[t(635)].remove(t(574)),x[t(748)](t(805))[t(635)][t(711)](t(468))),document[t(884)](t(473))[t(871)]($=>{let x=t;$.disabled=!0,$[x(603)].backgroundColor=x(703)})})),document[$(884)]("#fg-gift-items .dropdown > .dropdown-menu > li").forEach(x=>{let e=$;x[e(776)](e(867),function(){let $=e,x=this.getAttribute("id"),t=this[$(810)]("data-img"),a=this.getAttribute("data-price"),i=this[$(810)]($(819)),r=this[$(810)]($(686)),c=this.parentElement[$(481)][$(481)][$(481)];c[$(748)]($(818)).setAttribute($(857),t);let n=new URL(c[$(748)](".gift-original-url")[$(687)]);n[$(705)].set($(704),r),c.querySelector($(530))[$(687)]=n.toString();let o=this[$(481)][$(481)][$(481)];o[$(748)]($(543))[$(452)]=i,o.querySelector($(502))[$(452)]=a;let l=o?.[$(748)]($(558));l[$(697)]("data-variant",x),l[$(580)]=!1,l[$(603)]="";let s=this.parentElement[$(481)][$(748)]($(494));s[$(635)][$(853)]("active"),s.innerHTML=this[$(880)]})}),document[$(884)]($(663)).forEach(x=>x[$(776)]("click",async function(){let x=$,e=this.getAttribute(x(509))-0,t=this[x(810)]("data-offer");try{await c(e,1,t);let i=document[x(748)](x(678));i&&i[x(635)][x(711)](a),window.location[x(687)].includes("/cart")?location[x(443)]():typeof Shopify?.getCart===x(669)&&await Shopify?.[x(472)](0===FGSECOMAPP[x(446)][x(561)]?function(){}:FGSECOMAPP.fgCallback[0])}catch(r){console[x(883)](r)}}))},W=($,x)=>{let e=_0x76c68e;if($){let t=new Date,a=t.getTime(),i=new Date($).getTime();if(!x)return a>=i;{let r=new Date(x)[e(639)]();return a>=i&&a<=r}}return!1},X=$=>{let x=_0x76c68e;if(FGSECOMAPP[x(537)]?.[x(532)])for(let e of FGSECOMAPP[x(788)])n(e)&&($=$[x(459)]($=>$[x(832)]!==e[x(518)]));if(FGSECOMAPP[x(537)]?.[x(442)])for(let t of FGSECOMAPP.cartItems)$=$[x(459)]($=>$[x(501)]!==t[x(518)]);if(FGSECOMAPP[x(537)]?.[x(478)])for(let a of FGSECOMAPP[x(788)])$=$[x(459)]($=>{let e=x,t=$[e(564)][0][e(650)];return FGSECOMAPP[e(537)]?.[e(478)]===e(736)&&(t=$[e(564)][0].original_compare_at_price),t<=a[e(488)]/100});$&&$.length>0&&(s(),M($)),U(),FGSECOMAPP.fetchCheckoutEvents(),FGSECOMAPP[x(726)](FGSECOMAPP[x(444)]),Q=[]},z=async $=>{let x=_0x76c68e;Q=[];let e=window[x(623)][x(687)],a=await t(e,{method:"GET"});await a[x(464)]()[x(806)]($=>{let e=x,t=new DOMParser,a=t[e(790)]($,e(560)),i=".fg-secomapp-cart-drawer "+p(e(696)),r=e(599)+p(e(610)),c=document[e(748)](i);c||(c=document[e(748)](e(641)));let n=!1;c&&(n=!0,c[e(432)]=a[e(748)](i)?.[e(432)]??a.querySelector(e(641))?.[e(432)]??c[e(432)]);let o=document[e(748)](r);o||(o=document[e(748)]("#shopify-section-header #cart-icon-bubble, .shopify-section.section-header #cart-icon-bubble")),o&&(n=!0,o[e(432)]=a[e(748)](r)?.[e(432)]??a[e(748)](e(750))?.[e(432)]??o[e(432)]),n||console.log("Can not fetch all body")}),"function"==typeof FGSECOMAPP?.[x(581)]&&await FGSECOMAPP[x(581)](),setTimeout(function(){X($)},800)},V=async()=>{let $=_0x76c68e;try{await t(SECOMAPP[$(840)],{method:$(813),headers:{"Content-Type":"application/liquid"}})[$(806)](async x=>{let e=$,t=await x[e(493)]();FGSECOMAPP[e(788)]=t?.[e(617)]?.map($=>{let x=e;return{...FGSECOMAPP[x(788)]?.[x(659)](x=>x.id===$.id),...$[x(881)],collections:$[x(608)],tags:$.tags}})??[]})[$(864)](async x=>{let e=$;console[e(883)](e(684)+x[e(553)]);let a=await t(e(448),{method:"GET",headers:{Accept:"application/json","Content-Type":e(577)}}),i=(await a[e(493)]())[e(845)];FGSECOMAPP[e(788)]=i?.[e(828)]($=>{let x=e;return{...FGSECOMAPP[x(788)]?.[x(659)](x=>x.id===$.id),...$}})??[]})}catch(x){console[$(883)]($(822),x[$(553)]);let e=await t($(448),{method:$(813),headers:{Accept:$(577),"Content-Type":$(577)}}),a=(await e.json())[$(845)];FGSECOMAPP[$(788)]=a?.[$(828)](x=>{let e=$;return{...FGSECOMAPP[e(788)]?.[e(659)]($=>$.id===x.id),...x}})??[]}},Q=[],K=async $=>{let x=_0x76c68e;try{$===x(448)?Q[x(579)]("/cart/change.js"):Q[x(579)]($[0]),await V();let e=await O(FGSECOMAPP[x(788)],FGSECOMAPP.offers);FGSECOMAPP[x(726)](FGSECOMAPP[x(444)]);let a=!1;$[0].startsWith(x(793))&&JSON[x(835)]($[1][x(480)]??[])[x(662)](x(595))?(console[x(541)](x(534),[...Q]),await z(e),a=!0):$[0][x(863)](x(685))&&JSON[x(835)]($[1][x(480)]??[])[x(662)](x(549))&&(Q[x(662)](x(793))||1===Q[x(561)])?(console[x(541)]("event auto process gifts with cart",[...Q]),await z(e),a=!0):(console.log("this is others",[...Q]),X(e)),a&&(window[x(623)].href.includes("/cart")||document[x(748)](x(723))?.[x(810)]("data-template")===x(492))&&(Q=[],location[x(443)]());let i=await t(x(448),{method:"GET",headers:{Accept:x(577),"Content-Type":x(577)}});return await i[x(493)]()[x(806)]($=>{let e=x;FGSECOMAPP[e(788)]=$.items?.map($=>{let x=e;return{...FGSECOMAPP[x(788)]?.find(x=>x.id===$.id),...$}})}),FGSECOMAPP[x(788)]}catch(r){console[x(883)](r)}},Y=()=>{},Z=($,{value:x,innerHTML:e})=>{let t=_0x76c68e;try{let a=FGSECOMAPP[t(537)]?.mode_override_checkout,i=a===t(751)?$[t(732)]:$[t(677)]??$[t(732)];if(i?.[t(597)]("sca_handle_checkout")||(i=document[t(748)](t(606))?.[t(483)]),i.value=x,i[t(432)]=e,i[t(580)]=!1,i[t(528)]("click",J),i.removeAttribute(t(796)),a===t(454)){i[t(483)][t(748)](t(594))[t(867)]();return}"trigger_body"===a&&(document[t(873)][t(528)](t(867),$$,!0),document[t(873)][t(525)](t(763))),i.click()}catch(r){window[t(623)][t(607)]((Shopify?.[t(868)]?.[t(824)]??"/")+"checkout"),console[t(883)](r[t(553)])}},J=async $=>{let x=_0x76c68e;try{$[x(533)](),$[x(557)](),$[x(565)]();let e=FGSECOMAPP[x(537)]?.[x(584)],a="trigger_body"===e?$.target:$.currentTarget??$.target,{form:i}=a,r="",c="";if(a&&(a.disabled=!0,r=a.innerHTML,c=a[x(627)],typeof FGSECOMAPP?.[x(738)]===x(669)?await FGSECOMAPP[x(738)]("start"):(a[x(627)]="Loading...",a.innerHTML=x(475))),FGSECOMAPP.checkIsBlockCheckout)return!1;FGSECOMAPP.checkIsBlockCheckout=!0;try{await t(x(676),{method:x(765),body:new FormData(i)})}catch(o){console[x(541)](x(596))}if(g(FGSECOMAPP.offers)&&g(FGSECOMAPP.cartItems?.[x(659)]($=>n($))))return console[x(541)](x(437)),Z($,{value:c,innerHTML:r}),!1;let l=await t("/cart.js",{method:x(813),headers:{Accept:x(577),"Content-Type":x(577)}}),s=(await l[x(493)]()).items;await V();let d=FGSECOMAPP[x(788)]?.map($=>{let e=x;return{...s?.find(x=>x.id===$.id),collections:$[e(608)],tags:$[e(628)]}})??[],f=!1;for(let _ of FGSECOMAPP[x(444)])if(_.giftsAdded&&_[x(505)][x(561)]){let u=E(d,_),b=W(_.start_time,_[x(787)]);!b&&u[x(505)][x(561)]>0&&(f=!0),u[x(660)]||(f=!0),u.giftsAvailable<0&&(f=!0),_.sub_conditions&&!P(_,SECOMAPP)&&(f=!0)}if(await O(d,FGSECOMAPP.offers),f)location.reload();else try{FGSECOMAPP.fgSettings[x(602)]&&!g(FGSECOMAPP[x(788)]?.find($=>n($)))?await t(SECOMAPP[x(840)]+"&sca_shop_name="+Shopify?.[x(706)],{method:x(813),headers:{"Content-Type":x(860)}}).then(async $=>{let e=x,a=await $[e(493)]();a[e(617)]=(a.cart??[]).map($=>{let x=e;return $[x(881)][x(608)]=$[x(608)]?.map($=>({id:$.id})),$[x(881)][x(628)]=$[x(628)],{id:$[x(881)].id,variant_id:$[x(881)][x(797)],title:$[x(881)][x(799)],handle:$.product[x(730)],price:$[x(881)][x(488)],quantity:$[x(881)][x(440)],product_type:$.product[x(504)],vendor:$[x(881)][x(859)],tags:$[x(881)].tags,collections:$.product.collections}}),a.others={arr_offer_added:FGSECOMAPP[e(611)],secomapp:{customer:SECOMAPP?.[e(616)]??{},fg_codes:SECOMAPP?.[e(875)]??[],fgSettings:FGSECOMAPP[e(537)]},cookie_fg_code:I(e(633)),shopify_currency:Shopify?.[e(626)]},await t(SECOMAPP.freegiftProxy+e(807)+LZString.compressToEncodedURIComponent(a=JSON.stringify(a)),{method:e(813),headers:{"Content-Type":e(860)}}).then(async $=>{let x=e,t=await $[x(493)]();try{FGSECOMAPP[x(786)]=!1,t[x(438)]&&(window.location[x(687)]=t[x(438)][x(542)])}catch(a){console.error(a)}})}):(console[x(541)](x(604)),FGSECOMAPP[x(786)]=!1,Z($,{value:c,innerHTML:r}))}catch(p){FGSECOMAPP[x(786)]=!1,Z(p,{value:c,innerHTML:r})}(a=e===x(751)?$[x(732)]:$.currentTarget??$[x(732)])&&(typeof FGSECOMAPP?.scaCustomLoadingCheckout===x(669)?await FGSECOMAPP[x(738)](x(816)):(a.value=c,a[x(432)]=r),a[x(580)]=!1)}catch(h){typeof FGSECOMAPP?.scaCustomLoadingCheckout===x(669)&&await FGSECOMAPP.scaCustomLoadingCheckout(x(816)),console.error(h)}},$$=async $=>{let x=_0x76c68e;$[x(732)]?.hasAttribute(x(796))&&await J($)},$x=()=>{let $=_0x76c68e,x=FGSECOMAPP.fgSettings?.mode_override_checkout,e=$(761)+p($(638));if(document[$(884)](e)[$(871)](e=>{let t=$,a=e[t(597)](t(764)),i=e[t(597)]("sca_clone_checkout"),r=e[t(597)](t(796));if(x===t(454)){if(a)return;if(!i&&!r){let c=e[t(451)](!0);c.addEventListener(t(867),J),c[t(697)](t(796),""),c.setAttribute("sca_clone_checkout",""),e[t(603)].display="none",e[t(603)][t(520)]=t(479),e.style[t(651)]="0",e[t(697)](t(764),""),e[t(483)]?.[t(707)](c)}i&&!r&&(e[t(776)](t(867),J),e[t(697)](t(796),""))}else x===t(751)?e[t(697)](t(796),""):r||(e[t(776)]("click",J),e.setAttribute(t(796),""));FGSECOMAPP[t(559)]=!0}),x===$(751)){if(document[$(873)].hasAttribute("sca_trigger_body"))return;document.body[$(776)]("click",$$,!0)}};FGSECOMAPP[_0x76c68e(613)]=()=>{let $=_0x76c68e;FGSECOMAPP[$(575)]=0;let x=setInterval(()=>{let e=$;$x(),FGSECOMAPP[e(575)]++,(FGSECOMAPP[e(575)]>10||FGSECOMAPP[e(559)])&&(FGSECOMAPP[e(575)]=0,clearInterval(x))},400)};let $0=$=>{let x=_0x76c68e;try{let e={},t={},a=FGSECOMAPP[x(444)];if(g($)){$=[],g(Shopify?.[x(877)])||$[x(579)]({...Shopify?.[x(877)]});let i={...Shopify?.other_products,...Shopify?.current_collection?.products};Object.values(FGSECOMAPP.productsInPage)?.[x(459)]($=>!g($[x(516)])&&(g($?.[x(529)])||$?.[x(529)]&&!$?.[x(691)]?.[x(635)]?.[x(851)](x(647))))?.[x(871)]($=>{let e=x;i[$[e(516)].id]={...$[e(516)]}}),$=$[x(569)]([...Object[x(803)](i)])}for(let r in $?.[x(871)]($=>{let e=x,t=FGSECOMAPP[e(672)][$[e(730)]];FGSECOMAPP[e(672)][$[e(730)]]={...t,info:{...$},product_has_icon:!!g(a)&&void 0}}),a?.[x(871)](a=>{let i=x,r=a[i(698)];if(1===r[i(561)]&&r[0].unit===i(462)&&"boolean"==typeof r[0].is_multiply){let c,n=r[0][i(747)];n?.forEach(x=>{let e=i;switch(x[e(506)]){case"variants_ids":c=Object[e(803)](x[e(627)]);break;case"product_types":let t=Object.keys(x[e(627)]);t[e(561)]>0&&(c=(void 0===c?$:c)?.filter($=>t[e(662)]($[e(506)]))??[]);break;case e(455):let a=Object.keys(x[e(627)]);a[e(561)]>0&&(c=(void 0===c?$:c)?.[e(459)]($=>a[e(662)]($[e(859)]))??[]);break;case e(834):let r=Object[e(804)](x[e(627)]);r[e(561)]>0&&(c=(void 0===c?$:c)?.[e(459)]($=>{let x=e,t=$[x(608)]?.[x(828)]($=>$.id+""),a=t?.[x(459)]($=>r[x(662)]($));return!g(a)})??[])}}),c?.[i(871)]($=>{let x=i,r=$[x(730)];if(e[r]){let c=e[r]?.[x(828)]($=>$[x(501)]),n=a.gift_products?.[x(459)]($=>!c?.[x(662)]($[x(501)]));e[r]=e[r][x(569)](n)}else e[r]=a[x(654)];let o=$[x(704)]?.map($=>$.id)??[];t[r]=o[x(569)](t[r]??[]),t[r]=[...new Set(t[r])]})}}),e){let c=FGSECOMAPP[x(672)][r];FGSECOMAPP[x(672)][r]={...c,gifts_will_receive:[...e[r]],product_has_icon:!0,variants_has_gift:[...t[r]]}}return Object[x(655)](e)?.[x(561)]?e:{}}catch(n){return console[x(883)](n),null}},$e=$=>{let x=_0x76c68e,e=FGSECOMAPP[x(852)].product_page??{},t="";e[x(531)]?.[x(524)]&&(t=x(449)+(e[x(531)]?.title??"Free Gift")+x(753)+$?.[x(828)]($=>x(671)+u($[x(501)],$[x(782)])+'" target="_blank">\n
=4?x(755):"")+x(756));let a=x(727)+p(x(846)),i=document[x(748)](a)??document.querySelector(x(692));if(!i)return;i[x(483)][x(603)].width="100%",i[x(483)][x(603)][x(872)]=x(783),i[x(483)]?.className?.includes(x(876))||i.parentNode?.classList?.[x(853)](x(876));let r=i[x(483)][x(748)](x(643));if(r)r.innerHTML=t;else{(r=document[x(447)](x(710)))[x(697)]("id",x(555));let c=new DOMParser()[x(790)](t,x(560));r[x(432)]=c[x(873)].innerHTML,i[x(483)][x(491)](r,i)}i.parentNode[x(491)](r,i);let n=document[x(748)](x(827));if(n)switch(e[x(531)]?.[x(823)]){case"32":n[x(603)][x(829)]="50%";break;case"50":n[x(603)][x(829)]="60%";break;case x(713):n[x(603)].maxWidth=x(467);break;case x(702):n[x(603)][x(829)]=x(724);break;case x(573):n[x(603)].maxWidth=x(693);break;default:n[x(603)][x(829)]=x(809)}if($?.length>=4)new Glider(document[x(748)](x(680)),{slidesToShow:3,slidesToScroll:1,draggable:!0,dots:x(470),arrows:{prev:x(490),next:x(874)}});else{n&&(n.style[x(829)]=x(693));let o=document.querySelector(x(680));o&&(o[x(603)].display="flex")}},$t=()=>{let $=_0x76c68e,x=FGSECOMAPP[$(852)][$(862)]??{},e="";x.gift_icon?.[$(524)]&&(e='\n
{let $=_0x76c68e,x=[],e=$(808)+p($(615));return document[$(884)](e)[$(871)](e=>{let t=$,a=e[t(748)](t(694)),i=a?.[t(810)](t(687))?.[t(435)]("/")??[],r=i?.[t(722)](t(741)),c=r>=0?i[r+1]??null:null;if(c=c?.[t(435)]("?")?.shift(),n(c)){e[t(711)]();return}let o=e.querySelector(t(586));if(o){e[t(711)]();return}if(g(c))return;let l=decodeURI(c);g(FGSECOMAPP[t(672)][l]?.[t(516)])&&x[t(579)](l),FGSECOMAPP.productsInPage[l]={...FGSECOMAPP.productsInPage[l],position:e}}),x},$i=$=>{let x=_0x76c68e;Object[x(804)]($)?.forEach($=>{let e=x,t=FGSECOMAPP[e(672)][$]?.[e(691)];if(!t)return;let a=FGSECOMAPP.fgAppearanceGiftIcon.collection_page??{},i="";a.status&&(i='\n
{let x=_0x76c68e;await t(SECOMAPP.freegiftProxy+"&sca_products_handle="+LZString.compressToEncodedURIComponent(JSON[x(835)]($)),{method:x(813),headers:{"Content-Type":x(860)}})[x(806)](async $=>{let e=x,t=await $[e(493)](),a=[];t?.[e(741)]?.[e(871)]($=>{let x=e;g($?.products?.id)||a.push({...$[x(741)],collections:$[x(608)],variants_quantity:$[x(535)]})});let i=$0(a);$i(i)}).catch($=>{let e=x;console[e(883)]($)})},$c=async $=>{let x=_0x76c68e,e=[];for(let[t,a]of $.entries())g(FGSECOMAPP[x(672)][a]?.[x(516)])&&e[x(579)](a),20===e[x(561)]&&(await $r([...e]),e=[]),t===$[x(561)]-1&&e.length>0&&(await $r([...e]),e=[])},$n=()=>{let $=_0x76c68e,x=$a(),e=$0();$i(e),$c(x)[$(806)]()},$o=()=>{let $=_0x76c68e;Shopify?.[$(583)]&&document[$(776)]($(548),function(){let x=$,e=new URL(document[x(731)]),t=parseInt(e[x(705)][x(739)]("variant"));$l(isNaN(t)?void 0:t)})},$l=$=>{let x=_0x76c68e;if(!location[x(687)].includes(x(870)))return;document[x(748)](x(815))?.[x(711)](),document.querySelector(x(643))?.[x(711)]();let e=$0();if(g(e))return;let t=location[x(811)].split("/"),a=t?.[x(722)]("products"),i=decodeURI(a>=0?t[a+1]??null:null);if(!Object.keys(e)?.[x(662)](i))return;let r=e[i],c=FGSECOMAPP[x(672)][i]?.[x(450)]??[];!(Shopify?.[x(583)]&&(!g($)&&!c[x(662)]($)||g($)&&!g(Shopify?.[x(877)]?.[x(752)])&&!c.includes(Shopify?.[x(877)]?.[x(752)]?.id)))&&($e(r),$t(r))};FGSECOMAPP[_0x76c68e(726)]=$=>{let x=_0x76c68e;try{g($)&&($=[...FGSECOMAPP[x(444)]]);let e=location[x(687)][x(662)](x(676)),t=[];if($?.[x(871)]($=>{let e=x;if($[e(660)]||g($[e(784)])||!g(FGSECOMAPP[e(774)])&&!$[e(660)]&&$[e(587)]&&$[e(695)]>FGSECOMAPP.maxOfferPriority)return;let a=$[e(784)];if(a.includes("{{sca_min_total}}")&&1===$[e(698)][e(561)]&&"money"===$[e(698)][0][e(460)]){if($[e(660)])return;{let i=0,r=FGSECOMAPP[e(788)],c=$.offer_conditions[0][e(747)];for(let n in r)if(!r[n][e(578)]){if(g(c))i+=r[n].price/100*r[n][e(440)];else{let o=r[n],l=!0;c?.forEach($=>{let x=e;if(!l)return!1;switch($[x(506)]){case x(545):l=Object[x(804)]($[x(627)])[x(662)](o.product_id[x(839)]());return;case x(640):l=Object[x(804)]($[x(627)])[x(662)](o[x(504)]);return;case x(455):l=Object[x(804)]($[x(627)]).includes(o.vendor);return;case x(834):let t=Object[x(804)]($[x(627)]),a=o[x(608)]?.[x(828)]($=>$.id+"")?.[x(459)]($=>t[x(662)]($));l=!g(a);return;default:l=!1;return}}),l&&(i+=o[e(488)]/100*o[e(440)])}}let s=($[e(698)][0].min_amount-i)[e(664)](2);a=a[e(607)](e(642),s)}}if(a[e(662)](e(848))&&1===$[e(698)][e(561)]&&$[e(698)][0].unit===e(462)){if($[e(660)])return;{let d=$[e(698)][0][e(625)],f=FGSECOMAPP[e(788)];for(let _ in f){let u=$[e(698)][0].product_narrow;if(g(u))d-=f[_][e(440)];else{let b=f[_],p=!0;u?.[e(871)]($=>{let x=e;if(!p)return!1;switch($[x(506)]){case x(545):p=Object[x(804)]($[x(627)]).includes(b[x(518)][x(839)]());return;case"product_types":p=Object[x(804)]($[x(627)])[x(662)](b.product_type);return;case x(455):p=Object[x(804)]($[x(627)])[x(662)](b[x(859)]);return;case x(834):let t=Object[x(804)]($[x(627)]),a=b.collections?.[x(828)]($=>$.id+"")?.[x(459)]($=>t[x(662)]($));p=!g(a);return;default:p=!1;return}}),p&&(d-=b[e(440)])}}a=a.replace(e(848),d)}}t[e(579)]({promotion_message:a})}),t=t?.[x(561)]?t:null,g(t)){document[x(884)](x(854)).forEach($=>$[x(432)]="");return}let a="",i=x(754)+t?.map($=>x(767)+$.promotion_message+x(593))[x(612)]("")+x(849);FGSECOMAPP[x(649)][x(789)]&&(a=i);let r=x(817),c=document.querySelector(r),n=c?.querySelector(x(675)),o=document.querySelectorAll(x(847)+p("sca_fg_main_promotion_message_query")),l=document[x(884)](x(854));if(g(l)){(l=document[x(447)](x(710)))[x(697)]("id",x(510)),l[x(635)].add(x(510));let s=new DOMParser()[x(790)](a,x(560));l[x(432)]=s[x(873)][x(432)],g(o)?(s=new DOMParser()[x(790)](a,"text/html"),l.innerHTML=s[x(873)][x(432)],c&&n&&e?n[x(785)](l):c&&e&&c[x(785)](l)):o?.forEach($=>{let x=l.cloneNode(!0);$.prepend(x)})}else l.forEach($=>$.innerHTML=a);try{document.querySelectorAll(x(601)).forEach($=>{let x=new Glider($);(($,x)=>{let e=_0x34a0,t=$.track[e(745)],a=null,i=1;function r(){a=setTimeout(()=>{let x=_0x34a0;i>=t&&(i=0),$[x(749)](i++)},3e3)}$[e(775)][e(776)](e(547),function(){window[e(866)](a),r()}),r()})(x,3e3)})}catch(d){console[x(883)](d)}}catch(f){console[x(883)](f)}},B(FGSECOMAPP[_0x76c68e(788)])[_0x76c68e(806)]()}}catch($s){console[_0x76c68e(541)](_0x76c68e(844),$s)}