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 _0x5c4574=_0x4121;!function($,x){let e=_0x4121,t=$();for(;;)try{let a=parseInt(e(595))/1+-parseInt(e(229))/2+parseInt(e(365))/3*(parseInt(e(529))/4)+-parseInt(e(277))/5+parseInt(e(577))/6*(-parseInt(e(296))/7)+parseInt(e(439))/8*(parseInt(e(288))/9)+parseInt(e(602))/10;if(423630===a)break;t.push(t.shift())}catch(i){t.push(t.shift())}}(_0x43e6,423630);try{let $=document[_0x5c4574(157)](_0x5c4574(172))?.getAttribute(_0x5c4574(474));if("3.0"===$){window[_0x5c4574(337)]?.[_0x5c4574(486)]?.[_0x5c4574(589)]?.[_0x5c4574(407)]&&fgGiftIcon&&(window[_0x5c4574(337)][_0x5c4574(486)][_0x5c4574(589)][_0x5c4574(407)]=fgGiftIcon),window[_0x5c4574(249)]={},FGSECOMAPP.maxOfferPriority=null,FGSECOMAPP[_0x5c4574(571)]=Object[_0x5c4574(164)](Shopify?.[_0x5c4574(571)]??{}),FGSECOMAPP.offers=[],FGSECOMAPP[_0x5c4574(408)]=window[_0x5c4574(337)]?.[_0x5c4574(495)]??{},FGSECOMAPP[_0x5c4574(587)]=window[_0x5c4574(337)]?.[_0x5c4574(486)]??{},FGSECOMAPP.fgAppearanceGiftSlider=FGSECOMAPP[_0x5c4574(587)]?.[_0x5c4574(370)]?.[_0x5c4574(355)],FGSECOMAPP[_0x5c4574(381)]=FGSECOMAPP[_0x5c4574(587)]?.[_0x5c4574(589)],FGSECOMAPP[_0x5c4574(233)]=FGSECOMAPP[_0x5c4574(587)]?.promotion_message,FGSECOMAPP.fgCallback=[],FGSECOMAPP[_0x5c4574(501)]=!1,FGSECOMAPP[_0x5c4574(513)]=[],FGSECOMAPP.scaCountRenderEventCheckout=0,FGSECOMAPP[_0x5c4574(498)]=!1,FGSECOMAPP[_0x5c4574(559)]={...Shopify?.[_0x5c4574(559)]},FGSECOMAPP[_0x5c4574(165)]=Shopify?.[_0x5c4574(165)]??void 0,FGSECOMAPP[_0x5c4574(417)]=Shopify?.[_0x5c4574(417)]??void 0,FGSECOMAPP[_0x5c4574(196)]={},FGSECOMAPP[_0x5c4574(289)]=!1,FGSECOMAPP[_0x5c4574(531)]={},FGSECOMAPP[_0x5c4574(537)]=!1,FGSECOMAPP[_0x5c4574(449)]={};let x=()=>{let $=_0x5c4574,x=FGSECOMAPP[$(587)]?.[$(370)],e=x?.[$(582)]?.[$(476)],t=!g(x)&&void 0!==e&&!e;return t?$(396):""},e=()=>{let $=_0x5c4574,x=FGSECOMAPP[$(587)]?.gift_slider,e=x?.[$(328)]??{};return document[$(332)]($(390))?.checked&&localStorage[$(224)]($(170),""+Date[$(416)]()),e?.[$(152)]?$(209)+e[$(475)]+$(329):""},{fetch:t}=window,a=()=>{let $=_0x5c4574;"fg-checkout"!==document[$(332)]($(211))?.getAttribute($(268))&&(window[$(303)]=async(...x)=>{let e=$;try{if(x[0][e(538)]("/cart/add")){i(x[1]);let a=200,r=await t(...x)[e(349)]($=>{let x=e;return a=$[x(445)],$.json()});if(x[1][e(527)]?.[e(153)]&&200!==a){let c=JSON[e(261)](x[1][e(295)])?.id,o=document[e(332)](e(561)+c+'"]');return o[e(330)]=e(579),o[e(420)][e(310)](e(192))||o.classList[e(601)](e(192)),o.disabled=!0,o[e(274)][e(542)]="#82868b",document[e(517)](".btn-add-to-cart").forEach($=>{let x=e;parseInt($[x(206)]("data-variant"))===c||$[x(420)][x(310)](x(192))||($[x(149)]=!1,$[x(274)].backgroundColor=FGSECOMAPP[x(587)]?.gift_slider?.[x(140)]?.[x(563)]??"#7367f0")}),!1}return await V([e(278),...x.slice(1)]),await _(x,r),new Response(JSON[e(600)](r))}if(!(x[0].includes("/cart/change")||x[0][e(538)](e(481))))return setTimeout(function(){$n()},1e3),await t(...x);{i(x[1]);let n=200,s=await t(...x)[e(349)]($=>{let x=e;return n=$[x(445)],$.json()});if(x[1][e(527)]?.sca_process_gifts&&200!==n)return!1;if(await V([x[0].includes(e(573))?e(573):e(481),...x[e(283)](1)]),x[1]?.[e(527)]?.sca_process_gifts)return new Response(JSON[e(600)](s));let l=await t("/cart.js").then($=>{let x=e;return $[x(415)]()});return await _(x,s,l),new Response(JSON.stringify(l))}}catch(f){return await t(...x)}})};FGSECOMAPP[_0x5c4574(533)]=()=>{let $=_0x5c4574;try{if(Shopify?.disableShopify_getCart||typeof Shopify?.getCart!==$(286))return;Shopify[$(385)]=async function(x){let e=$;if(!FGSECOMAPP[e(501)]){FGSECOMAPP[e(501)]=!0,await V(e(382));let t=await fetch(e(382),{method:e(320),headers:{Accept:e(281),sca_fetch:e(592),"Content-Type":e(281)}});typeof x===e(286)&&(0>FGSECOMAPP.fgCallback[e(516)](x)&&FGSECOMAPP[e(282)].push(x),x(await t[e(415)]())),FGSECOMAPP[e(501)]=!1}FGSECOMAPP[e(427)]()},typeof ShopifyAPI!==$(147)&&void 0!==ShopifyAPI[$(385)]&&(ShopifyAPI[$(385)]=Shopify?.[$(385)]),void 0!==Shopify?.[$(158)]&&typeof Shopify?.[$(158)].getCart!==$(147)&&(Shopify[$(158)][$(385)]=Shopify?.[$(385)])}catch(x){console[$(379)](x)}};let i=$=>{let x=_0x5c4574;try{let e=$?.body;e instanceof FormData?FGSECOMAPP[x(531)]={sections:e[x(132)](x(586)),sections_url:e[x(132)](x(130))}:"string"==typeof e&&(e=JSON.parse(e),FGSECOMAPP[x(531)]={sections:e?.[x(586)],sections_url:e?.[x(130)]})}catch(t){FGSECOMAPP[x(531)]={}}},r=async()=>{let $=_0x5c4574;if(!g(FGSECOMAPP.arrOfferAdded)){let x=[$(145)];for(let e of FGSECOMAPP[$(513)]){let a=FGSECOMAPP[$(183)][$(215)](x=>x.id===e[$(392)])?.sub_conditions?.[$(262)];g(a)||x[$(360)](a)}let i={freegift_attributes:x[$(315)]()};try{await t($(481),{method:"POST",headers:{"X-Requested-With":$(241),"Content-Type":$(428)},body:JSON.stringify({attributes:i})})}catch(r){console[$(379)]("Update cart.attributes "+r[$(363)])}}},_=async($,x,e)=>{let a=_0x5c4574;try{if($[1]?.[a(527)]?.[a(494)])return;let i={},r=Object[a(324)](x[a(586)]??{})?.[a(543)]($=>g(FGSECOMAPP[a(531)][$]))??[];if(r&&r[a(190)]&&FGSECOMAPP[a(537)]&&(i=await t("/?sections="+r[a(167)](",")).then($=>$.json())),FGSECOMAPP.isUpdateCart=!1,i={...FGSECOMAPP[a(531)],...i},g(i))return;x.sections={...x[a(586)],...i},g(e)||(e[a(586)]={...x.sections})}catch(_){}},c=async($,x,e)=>{let t=_0x5c4574;e=e?.[t(315)]();let a=document[t(517)]("#fg-gift-items .btn-add-to-cart");a[t(270)](x=>{let e=t;x.disabled=!0;let a=x[e(206)]("data-variant")-0;a===$&&(x.style[e(477)]=e(307),x[e(243)]=e(419)),x[e(274)][e(542)]="#82868b"});let i=FGSECOMAPP[t(513)].find(x=>e===x[t(392)]?.[t(315)]()&&$===x.variantId);i?i[t(280)]+=x:FGSECOMAPP[t(513)].unshift({variantId:$,belongs_to_offer:e,quantity:x}),localStorage.setItem("sca_offers_added",LZString[t(565)](JSON[t(600)](FGSECOMAPP[t(513)])));let r=await fetch(t(350),{method:t(300),headers:{Accept:t(281),"Content-Type":t(281),sca_add_gift:t(153)},body:JSON[t(600)]({quantity:x,id:$})}),_=await r[t(415)]();if(r.ok)return a.forEach(x=>{let e=t;x[e(149)]=!0;let a=x[e(206)](e(348))-0;a===$&&(x.style[e(477)]="6px 0",x.innerHTML=e(422)),x[e(274)][e(542)]=""}),Z(),_},o=$=>{let x=_0x5c4574,e=x(193);return!g($)&&(typeof $===x(344)&&($[x(457)]?.includes(e)||$[x(339)]?.[x(538)](x(248)))||typeof $===x(210)&&$.includes(e))},n=async($,x)=>{let e=_0x5c4574;try{if(g($)&&g(x))return;let t={};if(FGSECOMAPP.cartItems?.[e(543)]($=>o($))?.forEach($=>{let x=e;t[$[x(212)]]=$[x(280)]}),($=$?.[e(543)]($=>!g($[e(212)])))?.forEach($=>{let x=e;t[$[x(212)]]=(t[$[x(212)]]??0)+($[x(280)]??1)}),Object[e(324)](t)?.[e(270)]($=>{t[$]=t[$]>=0?t[$]:0}),g(Object.keys(t)))return;$?.[e(270)]($=>{let x=e,t=FGSECOMAPP[x(513)].find(e=>$.offer_id?.[x(315)]()===e.belongs_to_offer?.[x(315)]()&&$[x(212)]===e[x(461)]);t?t[x(280)]+=$[x(280)]:FGSECOMAPP[x(513)].unshift({variantId:$[x(212)],belongs_to_offer:$.offer_id?.[x(315)](),quantity:$[x(280)]})}),localStorage.setItem(e(413),LZString[e(565)](JSON[e(600)](FGSECOMAPP[e(513)]))),FGSECOMAPP[e(537)]=!0,await fetch(e(481),{method:e(300),headers:{Accept:e(281),"Content-Type":e(281),sca_process_gifts:!0},body:JSON[e(600)]({updates:t,...FGSECOMAPP[e(531)]})})[e(349)](t=>{let a=e;return t.ok&&$[a(190)]&&!x[a(190)]&&Z(),t[a(415)]()})[e(349)]($=>{let x=e;FGSECOMAPP[x(531)]=$[x(586)]}),document[e(332)]("#secomapp_freegifts_version")?.[e(206)](e(268))===e(181)&&location.reload()}catch(a){console[e(379)](a)}},s=0,l=()=>{let $=_0x5c4574,t=document[$(157)]($(522));if(t)t[$(243)]=$(226)+(FGSECOMAPP[$(361)][$(131)]??$(218))+$(362)+x()+$(444);else{let a=localStorage[$(335)]($(170))-0,i=FGSECOMAPP[$(587)]?.[$(370)]?.[$(328)]??{},r=(i?.[$(322)]??0)*6e4,_=!isNaN(a)&&a+r>Date[$(416)]();if(_||(localStorage.removeItem($(170)),!(t=document[$(157)]($(572)))))return;t[$(243)]=$(411)+(FGSECOMAPP.fgAppearanceGiftSlider[$(131)]??$(218))+$(604)+e()+$(371)+x()+$(484),t[$(420)].add("sca-is-visible-fg"),s++}},f=($,x)=>{let e=_0x5c4574;return $.map($=>e(150)+($.thumbnail??x)+'" id="'+$[e(552)]+e(384)+$[e(166)]+e(151)+d($)+'"\n data-original-price="'+u($[e(399)],$[e(166)],$[e(358)]??0)+e(528)+$[e(269)]+e(404))[e(167)](" \n")},d=$=>{let x=_0x5c4574;return FGSECOMAPP[x(605)][x(221)](v($?.price))},u=($,x,e)=>{let t=_0x5c4574;e=v(e);let a=g(Shopify?.products[$])?null:Shopify?.products[$],i=a?.[t(143)],r=i&&Array[t(395)](i)&&i[t(190)]>0?i[0].price??a?.[t(560)]??100*e:100*e;return x&&(r=a?.[t(143)]?.find($=>x===$.id)?.[t(560)]??r),FGSECOMAPP[t(605)].format(r/100)},b=($,x)=>{let e=_0x5c4574;return g(Shopify?.products[$])?x??"#":Shopify?.[e(608)][$][e(457)]},p=($,x)=>{let e=_0x5c4574;if(FGSECOMAPP.fgAppearanceGiftSlider.show_product_title)return g(Shopify?.[e(608)][$])?x[e(437)]("\xbb","")[e(437)](/\(\d*% off\)/,"")??"":Shopify?.[e(608)][$][e(308)]},g=$=>{let x=_0x5c4574;if(0===$)return!0;if(typeof $==x(176)||typeof $==x(227))return!1;if(typeof $==x(147)||null===$)return!0;if(typeof $[x(190)]!=x(147))return 0===$.length;let e=0;for(let t in $)$[x(401)](t)&&e++;return 0===e},h=$=>{let x=_0x5c4574;try{let e={...FGSECOMAPP[x(559)]},t=e[$];if(t=t?t.trim():null,!g(t)&&t[x(190)]>0)try{return document[x(332)](t),", "+t}catch(a){}return""}catch(i){return""}},m=()=>{let $=_0x5c4574;try{FGSECOMAPP[$(605)]=new Intl[$(549)](Shopify?.[$(323)]??Shopify?.[$(546)],{style:$(471),currency:Shopify?.[$(471)]?.[$(512)]??"USD"})}catch(x){FGSECOMAPP[$(605)]=new Intl[$(549)]("en-US",{style:$(471),currency:Shopify?.[$(471)]?.[$(512)]??"USD"})}},v=$=>{let x=_0x5c4574;$=$??0;let e=Shopify?.[x(471)]?.rate??1;return 1===parseFloat(e)?$:($*e).toFixed(Shopify?.[x(472)]??2)},y=$=>{let x=_0x5c4574;return $.filter($=>void 0===$[x(490)]||!0===$.cal_gift_for_other_rules)[x(207)](($,e)=>$+e[x(280)]*(e[x(374)]??e[x(560)]),0)/100},w=$=>{let x=_0x5c4574;return $[x(543)]($=>void 0===$[x(490)]||$.cal_gift_for_other_rules).reduce(($,e)=>$+e[x(280)],0)},k=($,x)=>{let e=_0x5c4574,t=x[e(569)];return g(t)?$:$[e(543)]($=>{let x=e;return!t[x(238)](e=>{let t=x;switch(e[t(342)]){case t(225):return Object[t(164)](e.value)[t(238)]($=>$[t(580)])[t(197)]()[t(238)]($=>$.id)[t(538)]($[t(212)]);case"product_types":return Object[t(324)](e[t(594)])[t(538)]($[t(429)]);case t(426):return Object[t(324)](e[t(594)])[t(538)]($[t(327)]);case t(519):let a=Object[t(324)](e[t(594)]),i=$[t(156)]?.map($=>$.id+"")?.filter($=>a[t(538)]($));return!g(i);default:return!1}})[x(538)](!1)})},A=($,x)=>{let e=_0x5c4574;return $?.[e(238)]($=>{let t=e;if(typeof $[t(490)]!==t(147)){let a=FGSECOMAPP[t(513)]?.filter(x=>x[t(461)]===$[t(212)]),i=a?.[t(207)](($,x)=>$+x[t(280)],0);if(i===$[t(280)]){let r=FGSECOMAPP.arrOfferAdded?.[t(543)]($=>{let e=t;if($[e(392)]?.[e(315)]()===x[e(315)]())return!1;let a=FGSECOMAPP[e(183)]?.[e(215)](x=>x.id?.[e(315)]()===$[e(392)]?.[e(315)]()),i=a.gift_settings??{};return i[e(490)]&&100!==parseInt(i[e(354)])})?.[t(207)](($,x)=>$+x[t(280)],0);return{...$,cal_gift_for_other_rules:r>0,quantity:r??0}}return{...$,cal_gift_for_other_rules:!1,quantity:0}}return{...$}})??[]},C=($,x,e)=>{let t=_0x5c4574,a=0,i=k(x,$);i=A(i,$[t(466)]);let r;return"money"===$[t(366)]?r=y(i):$[t(366)]===t(266)&&(r=w(i)),r>=$[t(480)]&&(null===$[t(220)]||r<=$[t(220)])&&(a=e[t(259)],$[t(219)]&&(a=Math[t(380)](r/$.min_amount)*a)),a},S=($,x,e)=>{let t=_0x5c4574,a={},i=[],r=0;return x[t(238)](x=>{let a=t,_=C(x,$,e);0!==_&&(r=_),i[a(360)](_>0)}),a[t(128)]=r,a[t(389)]=i,a},T=($,x)=>{let e=!1;return 1===$.length?e=$[0]:2===$.length&&("and"===x&&(e=$[0]&&$[1]),"or"===x&&(e=$[0]||$[1])),e},q=($,x)=>{let e=_0x5c4574,t=$?.map($=>$[e(212)]);FGSECOMAPP[e(513)]=FGSECOMAPP[e(513)][e(543)]($=>t?.[e(538)]($[e(461)]));let a=x[e(267)].map($=>$[e(552)]),i=FGSECOMAPP[e(513)][e(543)]($=>$.belongs_to_offer?.[e(315)]()===x.id?.[e(315)]())?.[e(238)]($=>{let x=e;return $[x(461)]}),r=$[e(543)]($=>{let x=e;return o($)&&($[x(490)]=!1),a.includes($[x(212)])&&i[x(538)]($[x(212)])}),_=r[e(238)]($=>{let t=e,a=x[t(359)];$[t(490)]=a[t(490)],$.belongs_to_offer=x.id?.toString();let i=FGSECOMAPP[t(513)]?.filter(e=>e[t(392)]?.[t(315)]()!==x.id?.[t(315)]()&&$[t(212)]===e[t(461)])?.[t(207)](($,x)=>$+x.quantity,0);return{...$,quantity:$[t(280)]-i}});return _[e(543)]($=>{let t=e;return $[t(392)]?.[t(315)]()===x.id?.[t(315)]()})},E=$=>{let x=_0x5c4574,e=$[x(191)][x(543)](e=>e[x(392)]?.[x(315)]()!==$.id?.toString())[x(238)]($=>$[x(507)]);return Object.values($[x(553)])[x(543)]($=>!e[x(538)]($.product_shopify_id))},I=($,x)=>{let e=_0x5c4574,t=q($,x),a=S($,x.offer_conditions,x[e(359)]),i=T(a[e(389)],x[e(263)]);if(i){let r=t[e(543)]($=>$[e(392)]?.[e(315)]()===x.id?.toString())[e(207)](($,x)=>$+x[e(280)],0);a[e(128)]=a[e(128)]-r,x[e(191)]=t,x[e(443)]=a[e(128)]}else x[e(191)]=t,x.giftsAvailable=0;return typeof FGSECOMAPP[e(511)]===e(176)&&x[e(544)]>FGSECOMAPP[e(511)]&&(i=!1),i||!x[e(285)]||FGSECOMAPP[e(511)]!==x[e(544)]||g(t)||(FGSECOMAPP.maxOfferPriority=null),x[e(368)]=i,x[e(285)]&&i&&(null==FGSECOMAPP.maxOfferPriority||x[e(544)]<=FGSECOMAPP[e(511)])&&FGSECOMAPP[e(511)]!==x[e(544)]&&(FGSECOMAPP[e(511)]=x.priority),x},L=$=>{let x=_0x5c4574,e=$+"=",t=decodeURIComponent(document.cookie)[x(566)](";");for(let a=0;a{let e=_0x5c4574,t=!0,a=!0,i=!0;if(!g($[e(515)]?.[e(262)])){let r=L(e(463));t=r&&JSON.parse(r)[e(538)]($.sub_conditions[e(262)])}if(!g($[e(515)]?.[e(373)])){let{customer_tags:_}=$[e(515)],c=_?.[e(607)]?.[e(547)]($=>x[e(421)][e(339)]?.[e(538)]($));a=_?.type_customer_tags===e(319)?c:!c}if(!g($[e(515)]?.[e(473)])){let o=!0,n=$[e(515)][e(473)],s=x[e(421)][e(488)]??[];if(n[e(134)]){let l=Date[e(261)](n.order_created_from)/1e3;s=s.filter($=>$.created_at>=l)}if(!g(n?.totarrCustomerOrderal_spend_on_order_history)&&(0!==n[e(441)][e(480)]||0!==n[e(441)][e(220)])){let f=n.total_spend_on_order_history[e(480)],d=n[e(441)].max_amount,u=s[e(207)](($,x)=>$+x[e(136)],0)/100;o&=(u>=f||!f)&&(u<=d||!d)}if(!g(n?.[e(482)])&&(0!==n.total_spent_on_last_order.min_amount||0!==n[e(482)][e(220)])){let b=x[e(421)].last_total/100,p=n[e(482)][e(480)],h=n[e(482)][e(220)];o&=(b>=p||!p)&&(b<=h||!h)}if(!g(n?.number_of_order)){let m=!(0!==n.number_of_order[e(480)]||0!==n.number_of_order[e(220)]),v=s[e(190)],y=n[e(301)][e(480)],w=n[e(301)][e(220)];o&=m?g(s):(v>=y||!y)&&(v<=w||!w)}if(n?.[e(467)]){let k=x[e(421)].freegifts??[],A=$[e(267)]?.some($=>k[e(538)]($[e(552)]))||$[e(267)]?.[e(547)]($=>k[e(538)]($[e(166)]+"_"+($.original_price-$[e(560)])*100));o&=!A}i=o}return t&&a&&i},G=($,x,e)=>{let t=_0x5c4574,a=[],i=[],r=[],_=[];for(let c of x){let n=I($,c);if(!n[t(368)]){n[t(191)][t(190)]>0&&n[t(191)][t(270)]($=>{let x=t;i[x(360)]({variant_id:$.variant_id,quantity:$.quantity,offer_id:c.id})});continue}if(n.giftsAvailable<0){n[t(191)][t(270)]($=>{let x=t;i[x(360)]({variant_id:$[x(212)],quantity:$[x(280)],offer_id:c.id})});continue}0!==n.giftsAvailable&&(c[t(515)]?P(c,SECOMAPP)&&a[t(360)](c):a[t(360)](c))}if($?.[t(270)]($=>{let x=t;g($[x(392)])&&o($)&&i.push({variant_id:$[x(212)],quantity:$[x(280)],offer_id:$[x(392)]?.[x(315)]()})}),e||g(i)){let s=a[t(238)]($=>{let x=t;return{id:$.id,offerName:$[x(179)],offerPriority:$.priority,stopLowerPriority:$[x(285)],gifts:E($),giftsAvailable:$[x(443)],giftsAdded:$[x(191)],isReachConditions:$.isReachConditions}});if(!g(s)){let l={};for(let f of s){let d=M(FGSECOMAPP.fgSettings,f);d?.[t(190)]>0?r=r[t(535)]([...d]):f[t(182)][t(238)]($=>{let x=t;l[$[x(299)]]={...$,belongs_to_offer:f.id?.toString()}})}_=Object[t(164)](l)??[]}}return{arrGiftsAdd:r,arrGiftsRemove:i,arrGiftsData:_}},j=($,x)=>{let e=_0x5c4574,t=new Set;return $?.[e(270)]($=>t[e(601)]($[e(466)])),t[e(270)]($=>{let x=e,t=FGSECOMAPP[x(183)]?.[x(215)](e=>e.id?.toString()===$?.[x(315)]());if(g(t)||!t[x(368)]){FGSECOMAPP.arrOfferAdded=FGSECOMAPP[x(513)]?.[x(543)](e=>e.belongs_to_offer?.toString()!==$?.[x(315)]());return}if(t.giftsAvailable>=0)return;let a=[],i=FGSECOMAPP[x(513)]?.[x(543)](e=>e[x(392)]?.[x(315)]()===$?.toString())??[];if(t?.[x(359)]?.[x(255)])a=a.concat([...i]),t[x(443)]=0;else for(let r of i){if(t[x(443)]>=0)break;t[x(443)]+=r[x(280)],t.giftsAvailable<=0?a.push({...r}):(r[x(280)]=t[x(443)],t[x(443)]=0)}a?.[x(270)]($=>{let e=x;FGSECOMAPP[e(513)]=FGSECOMAPP[e(513)]?.filter(x=>$.variantId!==x.variantId||$[e(392)]?.toString()!==x[e(392)]?.[e(315)]())})}),x?.[e(543)]($=>{let x=e;return o($)&&($[x(280)]=FGSECOMAPP[x(513)]?.[x(543)](e=>$[x(212)]===e.variantId)?.[x(207)](($,e)=>$+e[x(280)],0)??0),$[x(280)]>0})??[]},F=async($,x)=>{let e=_0x5c4574,{arrGiftsAdd:t,arrGiftsRemove:a,arrGiftsData:i}=G($,x,!1),_=j(a,$);if(!g(a)){let c=G(_,x,!0);j(c?.[e(435)],$),t=c?.[e(353)],a=a?.[e(535)](c?.[e(435)])??[],i=c?.[e(526)]}return await n(t,a),await r(),i},M=($,x)=>{let e=_0x5c4574,t=[];if($[e(377)]){let a=x[e(182)],i=a.reduce(($,x)=>$+x[e(143)].length,0),r=FGSECOMAPP[e(183)].filter($=>$.id===x.id),_=r[0][e(359)][e(255)],c=r[0][e(168)];if(1===i||_||c.status){if($[e(585)]&&!D(a)||$?.compare_gift_price_with_product&&!N(a))return!1;if(c[e(445)]){if(c[e(342)]===e(580)){let o=FGSECOMAPP[e(571)];o=o[e(543)]($=>{let x=e;return $[x(507)]===a[0][x(399)]});let n=a[0][e(143)][e(543)]($=>{let x=e;return o[0][x(212)]===$[x(166)]})[0];if(0===n.price&&100===parseInt(n[e(354)]))return t.push({variant_id:n[e(552)],quantity:x[e(443)],offer_id:x.id}),t}else if(_){let s=a?.[e(207)](($,x)=>($+x?.[e(143)]?.[e(190)])??0,0);if(!s)return!1;let l=(x?.giftsAvailable??0)/s;for(let f of a)for(let d of f[e(143)])t[e(360)]({variant_id:d.variant_shopify_id,quantity:l,offer_id:x.id});return t}}else{if(_){let u=a?.[e(207)](($,x)=>($+x?.[e(143)]?.length)??0,0);if(!u)return!1;let b=(x?.giftsAvailable??0)/u;for(let p of a)for(let g of p[e(143)])t[e(360)]({variant_id:g[e(552)],quantity:b,offer_id:x.id});return t}{let h=a[0].variants[0];if(0===h[e(560)]&&100===parseInt(h.discount_percentage))return console.log("auto add gift: "+a[0][e(143)][0].variant_shopify_id+" "+a[0][e(143)][0][e(269)]),t[e(360)]({variant_id:h[e(552)],quantity:x.giftsAvailable,offer_id:x.id}),t}}}}return!1},O=$=>{let x=_0x5c4574;return $===x(505)},H=$=>{let x=_0x5c4574,e=$;if("by_variants"===FGSECOMAPP[x(361)][x(208)])for(let t of(e=[],$)){let a=t[x(143)];a&&a[x(190)]&&a.forEach($=>e[x(360)]({...t,thumbnail:$.thumbnail,variants:[$]}))}let i=document.getElementById("fg-gift-items");i&&(i.innerHTML=e[x(238)]($=>{let e=x,t=$?.[e(143)][0]??{};return e(228)+b($[e(399)],$[e(186)])+e(213)+$[e(254)]+e(351)+p($[e(399)],$.title)+e(235)+(FGSECOMAPP[e(361)].show_gift_for_customer===e(406)&&FGSECOMAPP[e(361)][e(450)]?e(174)+(1===$[e(143)][e(190)]?e(240)+(O(t[e(269)])?e(584):"")+e(597)+t.variant_title+e(465):e(346)+(FGSECOMAPP[e(361)][e(313)]??e(548))+e(305))+"\n

":"")+e(452)+u($[e(399)],t?.[e(166)],t?.[e(358)])+'\n \n '+d(t)+"\n \n "+(FGSECOMAPP[e(361)].show_gift_for_customer!==e(406)?'";FGSECOMAPP[x(233)][x(253)]&&(a=i);let r=document[x(332)]("#MainContent, #mainContent, #main, .main-content"),_=r?.querySelector(x(545)),c=document[x(517)](x(442)+h(x(142))),o=document[x(517)](x(388));if(g(o)){(o=document[x(272)](x(570))).setAttribute("id","sca-promotion-message-layout"),o[x(420)][x(601)]("sca-promotion-message-layout");let n=new DOMParser()[x(455)](a,x(387));o[x(243)]=n.body[x(243)],g(c)?(n=new DOMParser()[x(455)](a,x(387)),o[x(243)]=n[x(295)][x(243)],r&&_&&e?_.prepend(o):r&&e&&r[x(454)](o)):c?.[x(270)]($=>{let e=x,t=o[e(246)](!0);$[e(454)](t)})}else o.forEach($=>$[x(243)]=a);try{document[x(517)](x(588))[x(270)]($=>{let x=new Glider($);(($,x)=>{let e=_0x4121,t=$.track[e(230)],a=null,i=1;function r(){a=setTimeout(()=>{i>=t&&(i=0),$.scrollItem(i++)},3e3)}$.ele[e(376)](e(599),function(){window.clearInterval(a),r()}),r()})(x,3e3)})}catch(s){console.error(s)}}catch(l){console[x(379)](l)}},U(FGSECOMAPP[_0x5c4574(571)])[_0x5c4574(349)]()}}catch($f){console.log("can not check freegifts version",$f)}function _0x4121($,x){let e=_0x43e6();return(_0x4121=function($,x){return e[$-=128]})($,x)}function _0x43e6(){let $=["fgSettings","clone_checkout",".btn-add-to-cart.sca-fg-out-stock",'
\n \n
\n ','\n \n
\n
","status","collection_page","#fg-gift-items .dropdown","display","SHOPIFY_CART","show_variant_title","sca-fg-form-thumbnail-product-page",'\n \n \n
\n
\n \n ',"isDelayShowAdded","prepend","parseFromString","sca_fg_title_product_gift_icon_query","handle","sca_fg_img_collection_gift_icon_query","sca_handle_checkout","getTime","variantId","other_products","sca_fg_codes","items"," \n ","offer_id","have_not_got_gift_from_this_offer",'
\n \n \n \n \n \n \n ',"data-original-price","Free Gift","currency","fg_decimal","customer_order_history","data-version","text","hidden_brand_mark","padding","hide","parentElement","min_amount","/cart/update","total_spent_on_last_order","removeAttribute","\n
","80%","appearance","event add gift to cart from popup","orders","invoice_url","cal_gift_for_other_rules","appendChild",'
\n Loading...\n
',"sca-is-visible-fg","sca_process_gifts","settings","hasAttribute","removeEventListener","checkIsBlockCheckout","sca-fg-form-icon-product-page",'\n
\n
\n
\n ',"secomappGetCartRunning",".freegifts-main-container .glider-prev","target","{{sca_min_total}}","Default Title",".sca-list-gift-thumbnail","product_id","/cart/change.js","sca_root_checkout","fit-content","maxOfferPriority","active","arrOfferAdded","variants_quantity","sub_conditions","indexOf","querySelectorAll",".selected-variant","product_collections","flex","100%","freegifts-main-page-container","100","70%","Add to cart","arrGiftsData","headers",'">\n ',"159504IAHXeW",'" alt="free-gift-icon" class="sca-gift-icon-collection-img" />\n ',"sections_cart","scaCountRenderEventCheckout","initializeForXHR","size","concat","product_has_icon","isUpdateCart","includes","product_page",".gift-price","stop_offer","backgroundColor","filter","priority","cart-items, .cart-header, .section-header","locale","some","Select variant","NumberFormat","pathname","click","variant_shopify_id","gift_products",".original-price del",'"\n data-variant="',"mode_override_checkout","&data_checkout=","product","scaHandleConfigValue","price",'.btn-add-to-cart[data-variant="',"240","add_to_cart_btn_color","#82868b","compressToBase64","split",".fg-secomapp-cart-icon ","relative","product_narrow","div","cartItems","freegifts-main-popup-container","/cart/change",'\n
\n .dropdown-menu > li","others","start_time","sca-d-none","not_show_gift_if_already_on_cart","sections","fgAppearance",".sca-promotion-glider","gift_icon","sca_link_checkout","#freegifts-main-popup-container [data-close]","fetch_new_cart","application/liquid","value","78985HDqLwU","select_one_gift_price",'">\n ','\n \n
\n
\n\n
\n
\n \n
\n
\n \n
\n
\n
\n ',"formatter","sca_fg_cart_drawer_query","value_customer_tags","products","max_gifts_can_get","not have orders and gifts","sections_url","gift_popup_title","get","compare_gift_price_with_product","order_created_from","

","total_price",'\n
\n \n \n \n \n \n ',"height","tabindex","color","textContent","sca_fg_main_promotion_message_query","variants",".dots","SECOMAPP_FREEGIFT","enable_toast_added","undefined","data-offer","disabled",'\n
  • \n ',"entries","number",".fg-secomapp-handle-add-to-cart ","offer_conditions","offer_name","failed to parse cart section ","fg-checkout","gifts","offers","[sca_root_checkout]","URL","original_product_handle","sca_amount_fixed","original_compare_at_price","end","length","giftsAdded","sca-fg-out-stock","-sca_clone_freegift","open","#shopify-section-header #cart-icon-bubble","productsInPage","flat","enable_check_variants_has_gift","trigger_body","routes","checkout","60%","freegiftProxy","sca_clone_checkout","manual_input_inventory","getAttribute","reduce","show_gift_for_customer",'\n
    \n \n \n\n
    \n
    \n
    \n ',"3357YDipLx","hasDoneProcessCheckout","#fg-gift-items .btn-add-to-cart",'\n
    ',"toggle","show_pagination","gift_thumbnail","body","35FshExl","data-original-id","sca_fg_cart_icon_query","product_shopify_id","POST","number_of_order","#fg-gift-thumbnail-title .glider-prev","fetch","stopPropagation","","fg_codes","6px 0","title","sca-fg-toast sca-fg-success","contains","key","160","select_gift_btn","\n \n
    ","toString","root","href","\n
    \n\n ","include","GET","50%","time","sca_locale","keys",'">\n ',"substring","vendor","disable_slider_checkbox","\n
    \n ","innerText","src","querySelector","current_variant","sca_catch","getItem",".gift-original-url","fgData","location","tags","#fg-gift-thumbnail-title","reload","type",'\n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n ',"message","maxWidth","3XMDYLq","unit",".dots-thumbnail","isReachConditions","sca-gift-icon-collection-page","gift_slider","\n ","focus","customer_tags","final_price","sync_quantity","addEventListener","auto_add_gift","info","error","floor","fgAppearanceGiftIcon","/cart.js","position",'" data-original-id="',"getCart","event auto process gifts with cart","text/html",".sca-promotion-message-layout","condition_result",".freegifts-main-container .slide-container #sca-hidden-gift-popup .sca-disable-checkbox","decompressFromBase64","belongs_to_offer","current_product",'
    \n ',"isArray",'\n \n ',"sca-fg-icon-collection-page","dataset","original_product_shopify_id","product_types","hasOwnProperty","max","sca-gift-icon","\n
  • ",".product_name, .product-title, .product__title, .product-single__title, .tt-title, .ProductMeta__Title","by_variants","gift_icon_path"];return(_0x43e6=function(){return $})()}