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 _0x321081=_0xc45b;function _0xc45b($,x){let t=_0x596c();return(_0xc45b=function($,x){return t[$-=453]})($,x)}!function($,x){let t=_0xc45b,e=$();for(;;)try{let a=-parseInt(t(897))/1+-parseInt(t(718))/2*(parseInt(t(868))/3)+-parseInt(t(815))/4*(parseInt(t(758))/5)+parseInt(t(757))/6*(-parseInt(t(526))/7)+-parseInt(t(558))/8+parseInt(t(715))/9*(-parseInt(t(841))/10)+parseInt(t(548))/11;if(781646===a)break;e.push(e.shift())}catch(i){e.push(e.shift())}}(_0x596c,781646);try{let $=document[_0x321081(636)](_0x321081(708))?.[_0x321081(822)](_0x321081(765));if($===_0x321081(554)){window[_0x321081(473)]?.[_0x321081(692)]?.gift_icon?.[_0x321081(925)]&&fgGiftIcon&&(window[_0x321081(473)][_0x321081(692)][_0x321081(671)][_0x321081(925)]=fgGiftIcon),window[_0x321081(753)]={},FGSECOMAPP[_0x321081(618)]=null,FGSECOMAPP[_0x321081(702)]=Object.values(Shopify?.[_0x321081(702)]??{}),FGSECOMAPP[_0x321081(606)]=[],FGSECOMAPP[_0x321081(893)]=window[_0x321081(473)]?.settings??{},FGSECOMAPP.fgAppearance=window[_0x321081(473)]?.[_0x321081(692)]??{},FGSECOMAPP[_0x321081(610)]=FGSECOMAPP.fgAppearance?.[_0x321081(466)]?.[_0x321081(510)],FGSECOMAPP[_0x321081(678)]=FGSECOMAPP[_0x321081(740)]?.[_0x321081(671)],FGSECOMAPP[_0x321081(614)]=FGSECOMAPP[_0x321081(740)]?.promotion_message,FGSECOMAPP[_0x321081(669)]=[],FGSECOMAPP[_0x321081(689)]=!1,FGSECOMAPP[_0x321081(537)]=[],FGSECOMAPP[_0x321081(849)]=0,FGSECOMAPP[_0x321081(521)]=!1,FGSECOMAPP.scaHandleConfigValue={...Shopify?.scaHandleConfigValue},FGSECOMAPP[_0x321081(522)]=Shopify?.reRenderCartCustom??void 0,FGSECOMAPP[_0x321081(915)]=Shopify?.[_0x321081(915)]??void 0,FGSECOMAPP[_0x321081(907)]={},FGSECOMAPP[_0x321081(667)]=!1,FGSECOMAPP[_0x321081(647)]={},FGSECOMAPP[_0x321081(734)]=!1,FGSECOMAPP[_0x321081(465)]={};let x=()=>{let $=_0x321081,x=FGSECOMAPP.fgAppearance?.[$(466)],t=x?.others?.[$(881)],e=!b(x)&&void 0!==t&&!t;return e?$(503):""},t=()=>{let $=_0x321081,x=FGSECOMAPP[$(740)]?.[$(466)],t=x?.disable_slider_checkbox??{};return document.querySelector($(869))?.[$(894)]&&localStorage[$(790)]($(851),""+Date[$(568)]()),t?.enable?$(776)+t.text+$(563):""},{fetch:e}=window,a=()=>{let $=_0x321081;document[$(770)]("#secomapp_freegifts_version")?.getAttribute($(791))!==$(608)&&(window.fetch=async(...x)=>{let t=$;try{if(x[0][t(518)](t(697))){i(x[1]);let a=200,r=await e(...x)[t(479)]($=>{let x=t;return(a=$[x(469)],$[x(743)])?$:$[x(895)]()})[t(597)]($=>{let x=t;console[x(909)]($)});if(x[1][t(918)]?.[t(858)]&&200!==a){let o=JSON[t(877)](x[1].body)?.id,n=document[t(770)](t(691)+o+'"]');return n[t(863)]=t(926),n.classList[t(693)](t(825))||n[t(820)][t(731)]("sca-fg-out-stock"),n[t(687)]=!0,n[t(500)].backgroundColor="#82868b",document[t(585)](t(864))[t(640)]($=>{let x=t;parseInt($.getAttribute("data-variant"))===o||$[x(820)].contains(x(825))||($[x(687)]=!1,$[x(500)][x(912)]=FGSECOMAPP[x(740)]?.[x(466)]?.[x(569)]?.add_to_cart_btn_color??x(706))}),!1}return await Z([t(697),...x[t(485)](1)]),await c(x,r),new Response(JSON[t(578)](r))}if(!(x[0][t(518)](t(570))||x[0][t(518)](t(624))))return setTimeout(function(){$l()},1e3),await e(...x);{i(x[1]);let l=200,s=await e(...x)[t(479)]($=>{let x=t;return(l=$[x(469)],$[x(743)])?$:$[x(895)]()})[t(597)]($=>{console.error($)});if(x[1][t(918)]?.[t(620)]&&200!==l)return!1;if(await Z([x[0][t(518)](t(570))?t(570):"/cart/update",...x[t(485)](1)]),x[1]?.[t(918)]?.[t(620)])return new Response(JSON[t(578)](s));let d=await e(t(531))[t(479)]($=>$.json());return await c(x,s,d),new Response(JSON.stringify(d))}}catch(f){return await e(...x)}})};FGSECOMAPP.initializeForXHR=()=>{let $=_0x321081;try{if(Shopify?.disableShopify_getCart||"function"!=typeof Shopify?.[$(910)])return;Shopify.getCart=async function(x){let t=$;if(!FGSECOMAPP[t(689)]){FGSECOMAPP[t(689)]=!0,await Z(t(531));let e=await fetch(t(531),{method:"GET",headers:{Accept:t(698),sca_fetch:t(628),"Content-Type":"application/json"}});"function"==typeof x&&(0>FGSECOMAPP.fgCallback.indexOf(x)&&FGSECOMAPP[t(669)].push(x),x(await e[t(895)]())),FGSECOMAPP[t(689)]=!1}FGSECOMAPP[t(591)]()},typeof ShopifyAPI!==$(652)&&typeof ShopifyAPI.getCart!==$(652)&&(ShopifyAPI[$(910)]=Shopify?.getCart),void 0!==Shopify?.[$(827)]&&typeof Shopify?.[$(827)].getCart!==$(652)&&(Shopify[$(827)].getCart=Shopify?.[$(910)])}catch(x){console.error(x)}};let i=$=>{let x=_0x321081;try{let t=$?.body;t instanceof FormData?FGSECOMAPP[x(647)]={sections:t.get(x(862)),sections_url:t.get(x(480))}:"string"==typeof t&&(t=JSON[x(877)](t),FGSECOMAPP[x(647)]={sections:t?.[x(862)],sections_url:t?.[x(480)]})}catch(e){FGSECOMAPP[x(647)]={}}},r=async()=>{let $=_0x321081;if(!b(FGSECOMAPP.arrOfferAdded)){let x=["SECOMAPP_FREEGIFT"];for(let t of FGSECOMAPP.arrOfferAdded){let a=FGSECOMAPP.offers[$(594)]($=>$.id===t.belongs_to_offer)?.sub_conditions?.[$(898)];b(a)||x[$(595)](a)}let i={freegift_attributes:x.toString()};try{await e("/cart/update",{method:$(914),headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":$(710)},body:JSON[$(578)]({attributes:i})})}catch(r){console[$(909)]($(771)+r[$(759)])}}},c=async($,x,t)=>{let a=_0x321081;try{if($[1]?.headers?.sca_process_gifts)return;let i={},r=Object.keys(x[a(862)]??{})?.[a(892)]($=>b(FGSECOMAPP[a(647)][$]))??[];if(r&&r[a(766)]&&FGSECOMAPP[a(734)]&&(i=await e(a(845)+r[a(828)](","))[a(479)]($=>$[a(895)]())),FGSECOMAPP[a(734)]=!1,i={...FGSECOMAPP[a(647)],...i},b(i))return;x[a(862)]={...x[a(862)],...i},b(t)||(t[a(862)]={...x[a(862)]})}catch(c){}},o=async($,x,t)=>{let e=_0x321081;t=t?.[e(756)]();let a=document.querySelectorAll(e(789));a[e(640)](x=>{let t=e;x[t(687)]=!0;let a=x[t(822)](t(580))-0;a===$&&(x[t(500)][t(720)]="6px 0",x[t(643)]=t(882)),x[t(500)][t(912)]=t(723)});let i=FGSECOMAPP.arrOfferAdded.find(x=>t===x[e(661)]?.[e(756)]()&&$===x[e(781)]);i?i[e(471)]+=x:FGSECOMAPP[e(537)].unshift({variantId:$,belongs_to_offer:t,quantity:x}),localStorage[e(790)](e(635),LZString.compressToBase64(JSON[e(578)](FGSECOMAPP.arrOfferAdded)));let r=await fetch(e(506),{method:e(914),headers:{Accept:e(698),"Content-Type":e(698),sca_add_gift:e(858)},body:JSON[e(578)]({quantity:x,id:$})}),c=await r[e(895)]();if(r.ok)return a[e(640)](x=>{let t=e;x[t(687)]=!0;let a=x.getAttribute(t(580))-0;a===$&&(x[t(500)].padding=t(644),x[t(643)]=t(577)),x[t(500)][t(912)]=""}),J(),c},n=$=>{let x=_0x321081,t=x(793);return!b($)&&("object"==typeof $&&($[x(704)]?.[x(518)](t)||$[x(632)]?.[x(518)](x(712)))||typeof $===x(917)&&$[x(518)](t))},l=async($,x)=>{let t=_0x321081;try{if(b($)&&b(x))return;let e={};if(FGSECOMAPP[t(702)]?.[t(892)]($=>n($))?.[t(640)]($=>{let x=t;e[$[x(709)]]=$[x(471)]}),($=$?.[t(892)]($=>!b($[t(709)])))?.[t(640)]($=>{let x=t;e[$[x(709)]]=(e[$[x(709)]]??0)+($[x(471)]??1)}),Object[t(600)](e)?.forEach($=>{e[$]=e[$]>=0?e[$]:0}),b(Object[t(600)](e)))return;$?.[t(640)]($=>{let x=t,e=FGSECOMAPP[x(537)].find(t=>$.offer_id?.[x(756)]()===t[x(661)]?.[x(756)]()&&$[x(709)]===t[x(781)]);e?e.quantity+=$[x(471)]:FGSECOMAPP[x(537)][x(557)]({variantId:$.variant_id,belongs_to_offer:$[x(699)]?.toString(),quantity:$.quantity})}),localStorage.setItem("sca_offers_added",LZString[t(738)](JSON[t(578)](FGSECOMAPP[t(537)]))),FGSECOMAPP[t(734)]=!0,await fetch(t(624),{method:t(914),headers:{Accept:t(698),"Content-Type":t(698),sca_process_gifts:!0},body:JSON[t(578)]({updates:e,...FGSECOMAPP[t(647)]})})[t(479)](e=>{let a=t;return e.ok&&$[a(766)]&&!x[a(766)]&&J(),e[a(895)]()})[t(479)]($=>{let x=t;FGSECOMAPP[x(647)]=$.sections}),document.querySelector("#secomapp_freegifts_version")?.[t(822)](t(791))===t(608)&&location[t(871)]()}catch(a){console[t(909)](a)}},s=0,d=()=>{let $=_0x321081,e=document[$(636)]($(527));if(e)e[$(643)]=$(701)+(FGSECOMAPP.fgAppearanceGiftSlider.gift_popup_title??$(779))+$(482)+x()+$(555);else{let a=localStorage[$(819)]($(851))-0,i=FGSECOMAPP[$(740)]?.gift_slider?.[$(886)]??{},r=(i?.[$(840)]??0)*6e4,c=!isNaN(a)&&a+r>Date[$(568)]();if(c||(localStorage[$(778)]($(851)),!(e=document[$(636)]($(579)))))return;e[$(643)]='
\n \n
\n '+(FGSECOMAPP[$(610)][$(454)]??$(779))+$(649)+t()+"\n "+x()+$(744),e.classList[$(731)]("sca-is-visible-fg"),s++}},f=($,x)=>{let t=_0x321081;return $.map($=>'\n
  • {let x=_0x321081;return FGSECOMAPP[x(830)][x(478)](v($?.[x(602)]))},u=$=>{let x=_0x321081,t=FGSECOMAPP?.[x(893)]?.[x(499)]==="compare_at_price"?$?.[x(695)]:$?.[x(655)];return FGSECOMAPP[x(830)][x(478)](v(t??0))},g=($,x)=>{let t=_0x321081;return b(Shopify?.[t(590)][$])?x??"#":Shopify?.[t(590)][$][t(704)]},p=($,x)=>{let t=_0x321081;return FGSECOMAPP[t(610)][t(615)]?b(Shopify?.products[$])?x.replace("\xbb","")[t(553)](/\(\d*% off\)/,"")??"":Shopify?.[t(590)][$][t(551)]:""},b=$=>{let x=_0x321081;if(0===$)return!0;if(typeof $==x(645)||typeof $==x(844))return!1;if(typeof $==x(652)||null===$)return!0;if(typeof $[x(766)]!=x(652))return 0===$[x(766)];let t=0;for(let e in $)$.hasOwnProperty(e)&&t++;return 0===t},h=$=>{let x=_0x321081;try{let t={...FGSECOMAPP.scaHandleConfigValue},e=t[$];if(e=e?e[x(622)]():null,!b(e)&&e.length>0)try{return document[x(770)](e),", "+e}catch(a){}return""}catch(i){return""}},m=()=>{let $=_0x321081;try{FGSECOMAPP[$(830)]=new Intl.NumberFormat(Shopify?.sca_locale??Shopify?.[$(700)],{style:$(735),currency:Shopify?.currency?.[$(472)]??$(550)})}catch(x){FGSECOMAPP[$(830)]=new Intl[$(507)]($(476),{style:$(735),currency:Shopify?.[$(735)]?.active??$(550)})}},v=$=>{let x=_0x321081;$=$??0;let t=Shopify?.[x(735)]?.rate??1;return 1===parseFloat(t)?$:($*t)[x(696)](Shopify?.fg_decimal??2)},y=$=>{let x=_0x321081;return $.filter($=>void 0===$[x(920)]||!0===$[x(920)])[x(739)](($,t)=>$+t[x(471)]*(t[x(874)]??t.price),0)/100},w=$=>{let x=_0x321081;return $[x(892)]($=>void 0===$[x(920)]||$[x(920)]).reduce(($,t)=>$+t[x(471)],0)},k=($,x)=>{let t=_0x321081,e=x[t(517)];return b(e)?$:$.filter($=>{let x=t;return!e[x(565)](t=>{let e=x;switch(t[e(842)]){case"variants_ids":return Object[e(529)](t[e(541)])[e(565)]($=>$[e(728)])[e(924)]()[e(565)]($=>$.id)[e(518)]($.variant_id);case"product_types":return Object[e(600)](t[e(541)])[e(518)]($.product_type);case e(468):return Object.keys(t.value)[e(518)]($[e(619)]);case e(811):let a=Object[e(600)](t[e(541)]),i=$.collections?.[e(565)]($=>$.id+"")?.[e(892)]($=>a.includes($));return!b(i);default:return!1}})[x(518)](!1)})},A=($,x)=>{let t=_0x321081;return $?.[t(565)]($=>{let e=t;if(typeof $[e(920)]!==e(652)){let a=FGSECOMAPP[e(537)]?.[e(892)](x=>x[e(781)]===$[e(709)]),i=a?.[e(739)](($,x)=>$+x[e(471)],0);if(i===$.quantity){let r=FGSECOMAPP[e(537)]?.[e(892)]($=>{let t=e;if($.belongs_to_offer?.[t(756)]()===x[t(756)]())return!1;let a=FGSECOMAPP[t(606)]?.[t(594)](x=>x.id?.[t(756)]()===$[t(661)]?.[t(756)]()),i=a[t(605)]??{};return i[t(920)]&&100!==parseInt(i[t(562)])})?.[e(739)](($,x)=>$+x[e(471)],0);return{...$,cal_gift_for_other_rules:r>0,quantity:r??0}}return{...$,cal_gift_for_other_rules:!1,quantity:0}}return{...$}})??[]},C=($,x,t)=>{let e=_0x321081,a=0,i=k(x,$);i=A(i,$[e(699)]);let r;return $[e(913)]===e(498)?r=y(i):"number_of_products"===$.unit&&(r=w(i)),r>=$[e(523)]&&(null===$[e(928)]||r<=$[e(928)])&&(a=t.number_of_gift_can_receive,$[e(794)]&&(a=Math[e(573)](r/$.min_amount)*a)),a},S=($,x,t)=>{let e=_0x321081,a={},i=[],r=0;return x[e(565)](x=>{let a=e,c=C(x,$,t);0!==c&&(r=c),i[a(595)](c>0)}),a[e(785)]=r,a.condition_result=i,a},q=($,x)=>{let t=_0x321081,e=!1;return 1===$[t(766)]?e=$[0]:2===$[t(766)]&&(x===t(713)&&(e=$[0]&&$[1]),"or"===x&&(e=$[0]||$[1])),e},T=($,x)=>{let t=_0x321081,e=$?.[t(565)]($=>$[t(709)]);FGSECOMAPP[t(537)]=FGSECOMAPP[t(537)][t(892)]($=>e?.[t(518)]($[t(781)]));let a=x[t(891)][t(565)]($=>$[t(679)]),i=FGSECOMAPP[t(537)][t(892)]($=>$.belongs_to_offer?.[t(756)]()===x.id?.[t(756)]())?.[t(565)]($=>{let x=t;return $[x(781)]}),r=$[t(892)]($=>{let x=t;return n($)&&($[x(920)]=!1),a[x(518)]($[x(709)])&&i[x(518)]($[x(709)])}),c=r[t(565)]($=>{let e=t,a=x[e(605)];$[e(920)]=a.cal_gift_for_other_rules,$[e(661)]=x.id?.toString();let i=FGSECOMAPP[e(537)]?.[e(892)](t=>t.belongs_to_offer?.[e(756)]()!==x.id?.[e(756)]()&&$[e(709)]===t[e(781)])?.[e(739)](($,x)=>$+x.quantity,0);return{...$,quantity:$.quantity-i}});return c.filter($=>{let e=t;return $[e(661)]?.[e(756)]()===x.id?.[e(756)]()})},L=$=>{let x=_0x321081,t=$[x(657)].filter(t=>t[x(661)]?.[x(756)]()!==$.id?.toString())[x(565)]($=>$.product_id);return Object[x(529)]($[x(921)])[x(892)]($=>!t[x(518)]($[x(724)]))},E=($,x)=>{let t=_0x321081,e=T($,x),a=S($,x[t(539)],x[t(605)]),i=q(a[t(571)],x[t(857)]);if(i){let r=e[t(892)]($=>$.belongs_to_offer?.toString()===x.id?.toString())[t(739)](($,x)=>$+x[t(471)],0);a.max_gifts_can_get=a[t(785)]-r,x[t(657)]=e,x.giftsAvailable=a[t(785)]}else x[t(657)]=e,x.giftsAvailable=0;return typeof FGSECOMAPP[t(618)]===t(645)&&x[t(633)]>FGSECOMAPP.maxOfferPriority&&(i=!1),i||!x.stop_lower_priority||FGSECOMAPP[t(618)]!==x[t(633)]||b(e)||(FGSECOMAPP[t(618)]=null),x[t(730)]=i,x[t(751)]&&i&&(null==FGSECOMAPP[t(618)]||x[t(633)]<=FGSECOMAPP[t(618)])&&FGSECOMAPP[t(618)]!==x[t(633)]&&(FGSECOMAPP[t(618)]=x[t(633)]),x},I=$=>{let x=_0x321081,t=$+"=",e=decodeURIComponent(document[x(489)]).split(";");for(let a=0;a{let t=_0x321081,e=!0,a=!0,i=!0,r=!0;if(!b($.sub_conditions?.[t(898)])){let c=I(t(664));e=c&&JSON[t(877)](c)[t(518)]($.sub_conditions[t(898)])}if(!b($[t(797)]?.[t(745)])){let{customer_tags:o}=$[t(797)],n=o?.value_customer_tags?.[t(802)]($=>x.customer[t(632)]?.[t(518)]($));a=o?.[t(540)]===t(768)?n:!n}if(!b($.sub_conditions?.[t(816)])){let{customer_locations:l}=$[t(797)],s=l?.[t(627)]?.[t(518)](FGSECOMAPP.customerLocation);r=l?.type_customer_locations==="include"?s:!s}if(!b($[t(797)]?.[t(681)])){let d=!0,f=$[t(797)][t(681)],_=x[t(625)][t(532)]??[];if(f[t(663)]){let u=Date[t(877)](f[t(663)])/1e3;_=_[t(892)]($=>$[t(809)]>=u)}if(!b(f?.[t(873)])&&(0!==f[t(714)][t(523)]||0!==f[t(714)].max_amount)){let g=f[t(714)][t(523)],p=f[t(714)][t(928)],h=_[t(739)](($,x)=>$+x[t(511)],0)/100;d&=(h>=g||!g)&&(h<=p||!p)}if(!b(f?.[t(572)])&&(0!==f[t(572)][t(523)]||0!==f[t(572)][t(928)])){let m=x[t(625)].last_total/100,v=f[t(572)][t(523)],y=f[t(572)].max_amount;d&=(m>=v||!v)&&(m<=y||!y)}if(!b(f?.number_of_order)){let w=!(0!==f[t(767)].min_amount||0!==f[t(767)][t(928)]),k=_[t(766)],A=f[t(767)][t(523)],C=f[t(767)][t(928)];d&=w?b(_):(k>=A||!A)&&(k<=C||!C)}if(f?.[t(561)]){let S=x.customer[t(712)]??[],q=$[t(891)]?.[t(802)]($=>S[t(518)]($[t(679)]))||$.gift_items?.[t(802)]($=>S[t(518)]($[t(458)]+"_"+($[t(655)]-$[t(602)])*100));d&=!q}i=d}return e&&a&&i&&r},G=($,x,t)=>{let e=_0x321081,a=[],i=[],r=[],c=[];for(let o of x){let l=E($,o);if(!l.isReachConditions){l.giftsAdded.length>0&&l[e(657)][e(640)]($=>{let x=e;i[x(595)]({variant_id:$.variant_id,quantity:$.quantity,offer_id:o.id})});continue}if(l[e(519)]<0){l.giftsAdded[e(640)]($=>{let x=e;i[x(595)]({variant_id:$.variant_id,quantity:$[x(471)],offer_id:o.id})});continue}0!==l[e(519)]&&(o[e(797)]?P(o,SECOMAPP)&&a[e(595)](o):a[e(595)](o))}if($?.[e(640)]($=>{let x=e;b($[x(661)])&&n($)&&i[x(595)]({variant_id:$[x(709)],quantity:$[x(471)],offer_id:$[x(661)]?.[x(756)]()})}),t||b(i)){let s=a[e(565)]($=>{let x=e;return{id:$.id,offerName:$[x(670)],offerPriority:$.priority,stopLowerPriority:$[x(751)],gifts:L($),giftsAvailable:$.giftsAvailable,giftsAdded:$.giftsAdded,isReachConditions:$[x(730)]}});if(!b(s)){let d={};for(let f of s){let _=F(FGSECOMAPP[e(893)],f);_?.[e(766)]>0?r=r[e(492)]([..._]):f[e(707)].map($=>{let x=e;d[$[x(724)]]={...$,belongs_to_offer:f.id?.[x(756)]()}})}c=Object[e(529)](d)??[]}}return{arrGiftsAdd:r,arrGiftsRemove:i,arrGiftsData:c}},H=($,x)=>{let t=_0x321081,e=new Set;return $?.[t(640)]($=>e.add($.offer_id)),e.forEach($=>{let x=t,e=FGSECOMAPP[x(606)]?.[x(594)](t=>t.id?.[x(756)]()===$?.[x(756)]());if(b(e)||!e[x(730)]){FGSECOMAPP[x(537)]=FGSECOMAPP[x(537)]?.filter(t=>t[x(661)]?.[x(756)]()!==$?.toString());return}if(e[x(519)]>=0)return;let a=[],i=FGSECOMAPP[x(537)]?.filter(t=>t[x(661)]?.[x(756)]()===$?.toString())??[];if(e?.[x(605)]?.auto_add_all_gifts)a=a[x(492)]([...i]),e[x(519)]=0;else for(let r of i){if(e[x(519)]>=0)break;e[x(519)]+=r[x(471)],e[x(519)]<=0?a[x(595)]({...r}):(r.quantity=e[x(519)],e[x(519)]=0)}a?.[x(640)]($=>{let t=x;FGSECOMAPP[t(537)]=FGSECOMAPP[t(537)]?.[t(892)](x=>$[t(781)]!==x[t(781)]||$[t(661)]?.[t(756)]()!==x[t(661)]?.[t(756)]())})}),x?.[t(892)]($=>{let x=t;return n($)&&($[x(471)]=FGSECOMAPP[x(537)]?.[x(892)](t=>$[x(709)]===t[x(781)])?.[x(739)](($,t)=>$+t[x(471)],0)??0),$[x(471)]>0})??[]},M=async($,x)=>{let t=_0x321081,{arrGiftsAdd:e,arrGiftsRemove:a,arrGiftsData:i}=G($,x,!1),c=H(a,$);if(!b(a)){let o=G(c,x,!0);H(o?.[t(642)],$),e=o?.arrGiftsAdd,a=a?.[t(492)](o?.arrGiftsRemove)??[],i=o?.[t(887)]}return await l(e,a),await r(),i},F=($,x)=>{let t=_0x321081,e=[];if($[t(612)]){let a=x[t(707)],i=a[t(739)](($,x)=>$+x[t(460)][t(766)],0),r=FGSECOMAPP[t(606)][t(892)]($=>$.id===x.id),c=r[0].gift_settings[t(576)],o=r[0][t(741)];if(1===i||c||o[t(469)]){if($.not_show_gift_if_already_on_cart&&!B(a)||$?.compare_gift_price_with_product&&!D(a))return!1;if(o[t(469)]){if(o[t(842)]===t(728)){let n=FGSECOMAPP[t(702)];n=n[t(892)]($=>{let x=t;return $[x(613)]===a[0][x(808)]});let l=a[0][t(460)].filter($=>n[0].variant_id===$.original_variant_shopify_id)[0];if(0===l[t(602)]&&100===parseInt(l.discount_percentage))return e[t(595)]({variant_id:l.variant_shopify_id,quantity:x[t(519)],offer_id:x.id}),e}else if(c){let s=a?.[t(739)](($,x)=>($+x?.variants?.[t(766)])??0,0);if(!s)return!1;let d=(x?.[t(519)]??0)/s;for(let f of a)for(let _ of f.variants)e[t(595)]({variant_id:_[t(679)],quantity:d,offer_id:x.id});return e}}else{if(c){let u=a?.[t(739)](($,x)=>($+x?.variants?.length)??0,0);if(!u)return!1;let g=(x?.giftsAvailable??0)/u;for(let p of a)for(let b of p[t(460)])e[t(595)]({variant_id:b.variant_shopify_id,quantity:g,offer_id:x.id});return e}{let h=a[0][t(460)][0];if(0===h[t(602)]&&100===parseInt(h.discount_percentage))return console[t(832)](t(824)+a[0][t(460)][0].variant_shopify_id+" "+a[0][t(460)][0][t(796)]),e[t(595)]({variant_id:h.variant_shopify_id,quantity:x.giftsAvailable,offer_id:x.id}),e}}}}return!1},R=$=>{let x=_0x321081;return $===x(534)},O=$=>{let x=_0x321081,t=$;if("by_variants"===FGSECOMAPP[x(610)][x(559)])for(let e of(t=[],$)){let a=e[x(460)];a&&a.length&&a.forEach($=>t.push({...e,thumbnail:$[x(487)],variants:[$]}))}let i=document.getElementById(x(475));i&&(i[x(643)]=t[x(565)]($=>{let t=x,e=$?.[t(460)][0]??{};return t(629)+g($[t(808)],$[t(686)])+t(533)+$[t(487)]+t(662)+p($[t(808)],$[t(551)])+t(514)+(FGSECOMAPP[t(610)][t(559)]===t(749)&&FGSECOMAPP[t(610)][t(787)]?t(616)+(1===$[t(460)][t(766)]?t(683)+(R(e[t(796)])?t(589):"")+t(836)+e[t(796)]+t(520):t(593)+(FGSECOMAPP[t(610)][t(601)]??t(850))+t(581))+"\n

    ":"")+t(835)+u(e)+t(705)+_(e)+t(929)+(FGSECOMAPP.fgAppearanceGiftSlider[t(559)]!==t(749)?t(853)+(1===$[t(460)][t(766)]?t(683)+(R(e[t(796)])?t(589):"")+'">'+e[t(796)]+t(581):''+(FGSECOMAPP[t(610)][t(601)]??t(850))+t(581))+t(682)+f($[t(460)],$[t(487)])+"\n \n
  • ":"")+t(658)+$[t(661)]+t(502)+(1===$.variants[t(766)]?e.variant_shopify_id:"")+t(509)+(FGSECOMAPP[t(610)].add_to_cart_btn_title??t(763))+t(484)})[x(828)](" \n"),new Glider(document[x(770)](x(623)),{slidesToShow:1,slidesToScroll:1,draggable:!1,dots:FGSECOMAPP[x(610)][x(890)]?x(490):null,arrows:{prev:x(474),next:x(493)},responsive:[{breakpoint:1024,settings:{slidesToShow:FGSECOMAPP[x(610)].number_product_slider??4,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]}))},j=async()=>{let $=_0x321081;try{let x=window[$(473)]?.offers??[];for(let t in await $1(),Shopify?.[$(590)])b(Shopify?.products[t]?.id)&&delete Shopify?.[$(590)][t];let e=[];return x[$(640)](x=>{let t=$,a=JSON.parse(JSON[t(578)](x));if(x[t(741)][t(469)]){let i=x[t(539)][0].product_narrow,r=i[0][t(541)],c=[...a[t(891)]],o=[...a[t(921)]];if(x[t(741)].type===t(728))for(let n in r){let l=r[n]?.[t(728)]??[];for(let s of l){a[t(539)][0][t(517)]=[{type:i[0][t(842)],value:{[n]:{...r[n],variant:[{...s}]}}}],a[t(891)]=c.filter($=>$[t(808)]+""===n&&s.id===$[t(458)]),a[t(921)]=o.filter($=>$[t(808)]+""===n),a[t(921)][0].variants=[...a[t(891)]];let d=a[t(605)][t(775)],f=a.gift_settings[t(576)];a[t(605)].auto_add_all_gifts&&(d=a.gift_items[t(766)]),1===a[t(891)][t(766)]&&0===a.gift_items[0].price&&(f=!0),e[t(595)](JSON[t(877)](JSON[t(578)]({...a,gift_settings:{...a.gift_settings,number_of_gift_can_receive:d,auto_add_all_gifts:f},id:a.id+"_"+r[n][t(704)]+"_"+s.id})))}}else if(x[t(741)][t(842)]===t(496))for(let _ in r){a[t(539)][0][t(517)]=[{type:i[0][t(842)],value:{[_]:r[_]}}],a[t(891)]=c[t(892)]($=>$.original_product_shopify_id+""===_),a.gift_products=o[t(892)]($=>$[t(808)]+""===_);let u=a[t(605)][t(775)],g=a[t(605)][t(576)];a[t(605)][t(576)]&&(u=a[t(891)][t(766)]),1===a[t(891)].length&&0===a[t(891)][0][t(602)]&&(g=!0),e[t(595)](JSON[t(877)](JSON[t(578)]({...a,gift_settings:{...a[t(605)],number_of_gift_can_receive:u,auto_add_all_gifts:g},id:a.id+"_"+r[_][t(704)]})))}}}),(x=(x=(x=x?.[$(892)](x=>!x?.gift_should_the_same?.[$(469)])?.concat(e))?.map(x=>{let t=$;return{...x,id:x.id[t(756)]()}}))?.[$(892)](x=>{let t=$;if(!X(x[t(481)],x[t(866)]))return!1;let e=!b(x[t(797)]?.customer_order_history||x.sub_conditions?.customer_tags);if(x[t(797)]&&(!P(x,SECOMAPP)||e&&b(SECOMAPP[t(625)][t(567)])))return!1;let a={...Shopify?.products},i=!1;if(FGSECOMAPP[t(893)].sync_quantity===t(788)){x[t(891)]=x?.[t(891)].filter($=>{let x=t,e=a[$[x(808)]]?.[x(764)]??{};return e[$[x(458)]]>0})??[];let r=x[t(891)]?.[t(565)]($=>$[t(679)]);x.gift_products=x?.[t(921)]?.[t(892)]($=>{let x=t;return $.variants=$?.[x(460)]?.filter($=>{let t=x;return r?.includes($[t(679)])}),$?.[x(460)]?.[x(766)]>0}),i=!0}else if(FGSECOMAPP.fgSettings[t(690)]){x.gift_items=x?.[t(891)][t(892)]($=>{let x=t,e=a[$[x(724)]]?.[x(764)]??{};return e[$[x(679)]]>0});let c=x[t(891)]?.[t(565)]($=>$[t(679)]);x[t(921)]=x?.gift_products?.[t(892)]($=>{let x=t;return $[x(460)]=$?.[x(460)]?.filter($=>{let t=x;return c?.[t(518)]($[t(679)])}),$?.[x(460)]?.length>0}),i=!0}return i&&x[t(605)]?.[t(576)]&&(x[t(605)][t(775)]=x[t(891)]?.length),!i||x[t(891)]&&x.gift_items.length>0}))?.[$(565)](x=>{let t=$,e=x[t(891)].map($=>$[t(808)]);return x[t(921)]=x[t(921)]?.[t(892)]($=>{let x=t;return e[x(518)]($.original_product_shopify_id)}),x[t(539)]?.forEach($=>{let x=t;$[x(913)]===x(498)&&($[x(523)]=v($.min_amount),$.max_amount=b($[x(928)])?$[x(928)]:v($[x(928)]))}),x})}catch(a){return console.error(a),[]}},B=$=>{let x=_0x321081;for(let t of FGSECOMAPP[x(702)]){let e=t.product_id;if($[0][x(808)]===e)return!1}return!0},D=$=>{let x=_0x321081;for(let t of FGSECOMAPP.cartItems){let e=$[0][x(460)][0][x(655)];if(FGSECOMAPP[x(893)][x(607)]===x(916)&&(e=$[0][x(460)][0][x(695)]),e>t[x(602)]/100)return!1}return!0},N=async()=>{let $=_0x321081;try{let x=[];window[$(473)]?.[$(606)]?.[$(640)](t=>{let e=$,a=[];t[e(921)][e(640)]($=>{let x=e;a[x(595)]($.clone_product_handle,$[x(686)])}),x=[...x,...a]}),await $n(x=(x=[...new Set(x)])[$(892)](x=>b(FGSECOMAPP[$(907)][x]))),Object.values(FGSECOMAPP[$(907)])?.[$(640)]($=>{let{info:x}=$;b(x)||b(x?.id)||(Shopify.products[x.id]={...x})})}catch(t){console.error(t)}},z=async $=>{let x=_0x321081;m(),FGSECOMAPP[x(591)](),FGSECOMAPP?.[x(893)]?.sync_quantity===x(788)||FGSECOMAPP?.[x(893)]?.[x(690)]?await N():N()[x(479)](),FGSECOMAPP[x(606)]=await j(),FGSECOMAPP.initializeForXHR(),a();try{b($)?(FGSECOMAPP[x(537)]=[],localStorage[x(790)](x(635),LZString.compressToBase64(JSON[x(578)](FGSECOMAPP.arrOfferAdded)))):FGSECOMAPP[x(537)]=JSON[x(877)](LZString[x(719)](localStorage[x(819)]("sca_offers_added")))}catch(t){FGSECOMAPP[x(537)]=[],localStorage[x(790)](x(635),LZString[x(738)](JSON[x(578)](FGSECOMAPP.arrOfferAdded)))}let e={};FGSECOMAPP[x(606)]?.[x(640)]($=>{let t=x;e[$.id]=$?.[t(891)]?.map($=>$[t(679)])});let i=Object[x(600)](e);FGSECOMAPP[x(537)]=FGSECOMAPP[x(537)]?.filter($=>i?.includes($[x(661)]?.[x(756)]())&&e[$[x(661)]?.[x(756)]()][x(518)]($[x(781)]));let r={};FGSECOMAPP[x(537)]?.forEach($=>{let t=x,e=r[$[t(661)]+"_"+$.variantId]??{};r[$.belongs_to_offer+"_"+$[t(781)]]={...$,belongs_to_offer:$[t(661)]?.[t(756)](),quantity:(e?.quantity??0)+($?.[t(471)]??0)}}),FGSECOMAPP[x(537)]=Object.values(r),localStorage.setItem(x(635),LZString[x(738)](JSON[x(578)](FGSECOMAPP[x(537)])));let c=await M($,FGSECOMAPP[x(606)]);await W(c),$s(),$d(),$l()},U=function(){let $=_0x321081,x=document[$(585)]($(544)),e=document.querySelectorAll($(865)),a=$(760),i=document[$(585)]($(789)),r=i[$(766)];for(let c=0;c{let e=$;x[e(854)]===document.querySelector("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg")&&(document[e(770)](e(556))[e(820)][e(889)](a),t())}),document.addEventListener("keyup",x=>{let e=$;x[e(834)]===e(603)&&document.querySelector(e(556))&&(document.querySelector(e(556)).classList[e(889)](a),t())}),document[$(585)]($(512))[$(640)](x=>x[$(586)]("click",function(){let x=$;this.setAttribute(x(680),1),this[x(630)](),this[x(820)][x(774)](x(472)),this.querySelector(x(477))[x(820)].toggle(x(665))})),document.querySelectorAll($(512)).forEach(x=>document.addEventListener("click",function(t){let e=$,a=x[e(693)](t.target);a||(x[e(820)][e(889)]("active"),x[e(770)](e(477))[e(820)][e(889)](e(665))),document[e(585)](e(717))[e(640)]($=>{let x=e;$[x(687)]=!0,$[x(500)][x(912)]=x(723)})})),document[$(585)]($(648))[$(640)](x=>{let t=$;x.addEventListener(t(859),function(){let $=t,x=this[$(822)]("id"),e=this[$(822)]("data-img"),a=this.getAttribute($(626)),i=this.getAttribute($(846)),r=this.getAttribute($(803)),c=this[$(545)].parentElement[$(545)][$(545)];c.querySelector($(582))[$(875)]($(634),e);let o=new URL(c[$(770)]($(486))[$(566)]);o[$(762)][$(672)]($(728),r),c[$(770)]($(486))[$(566)]=o.toString();let n=this[$(545)][$(545)][$(545)];n[$(770)]($(843))[$(515)]=i,n[$(770)]($(831))[$(515)]=a;let l=n?.[$(770)](".btn-add-to-cart");l.setAttribute("data-variant",x),l[$(687)]=!1,l[$(500)]="";let s=this[$(545)][$(545)][$(770)]($(927));s.classList[$(731)]("active"),s.innerHTML=this[$(863)]})}),document.querySelectorAll("#fg-gift-items .btn-add-to-cart")[$(640)](x=>x[$(586)]("click",async function(){let x=$,t=this[x(822)](x(580))-0,e=this[x(822)](x(867));try{await o(t,1,e);let i=document.querySelector(x(556));i&&(FGSECOMAPP.isDelayShowAdded=!0,await new Promise($=>setTimeout($,800)),i[x(820)][x(889)](a)),window[x(552)][x(566)][x(518)](x(651))?location[x(871)]():"function"==typeof Shopify?.[x(910)]&&await Shopify?.[x(910)](0===FGSECOMAPP[x(669)][x(766)]?function(){}:FGSECOMAPP.fgCallback[0])}catch(r){console[x(909)](r)}}))},X=($,x)=>{let t=_0x321081;if($){let e=new Date,a=e[t(456)](),i=new Date($).getTime();if(!x)return a>=i;{let r=new Date(x)[t(456)]();return a>=i&&a<=r}}return!1},W=async $=>{let x=_0x321081;if(FGSECOMAPP[x(893)]?.[x(459)])for(let t of FGSECOMAPP[x(702)])n(t)&&($=$[x(892)]($=>$[x(724)]!==t[x(613)]));if(FGSECOMAPP[x(893)]?.[x(549)])for(let e of FGSECOMAPP[x(702)])$=$[x(892)]($=>$[x(808)]!==e[x(613)]);if(FGSECOMAPP[x(893)]?.[x(607)])for(let a of FGSECOMAPP[x(702)])$=$.filter($=>{let t=x;return $.variants=$[t(460)][t(892)]($=>{let x=t,e=$[x(655)];return FGSECOMAPP.fgSettings?.[x(607)]==="compare_at_price"&&(e=$[x(695)]),e<=a[x(602)]/100}),!b($[t(460)])});$&&$.length>0&&(FGSECOMAPP.isDelayShowAdded?(await new Promise($=>setTimeout($,1500)),FGSECOMAPP[x(668)]=!1,d(),O($)):(d(),O($))),U(),FGSECOMAPP[x(591)](),FGSECOMAPP[x(754)](FGSECOMAPP[x(606)]),K=[]},Y=async $=>{let x=_0x321081;K=[];let t=window[x(552)][x(566)],a=await e(t,{method:"GET"});await a[x(899)]().then($=>{let t=x,e=new DOMParser,a=e[t(688)]($,t(838)),i=t(905)+h(t(483)),r=t(784)+h("sca_fg_cart_icon_query"),c=document[t(770)](i),o=!1;c&&(o=!0,c[t(643)]=a[t(770)](i)?.[t(643)]??c[t(643)]);let n=document.querySelector(r);n||(n=document.querySelector(t(631))),n&&(o=!0,n[t(643)]=a[t(770)](r)?.[t(643)]??a[t(770)](t(783))?.innerHTML??n[t(643)]),o||console[t(832)](t(505))}),typeof FGSECOMAPP?.reRenderCartCustom===x(721)&&await FGSECOMAPP.reRenderCartCustom(),setTimeout(function(){W($)},800)},V=async()=>{let $=_0x321081;try{await e(SECOMAPP[$(792)],{method:"GET",headers:{"Content-Type":$(673)}}).then(async x=>{let t=$,e=await x[t(895)]();FGSECOMAPP.cartItems=e?.[t(848)]?.[t(565)]($=>{let x=t;return{...FGSECOMAPP[x(702)]?.[x(594)](x=>x.id===$.id),...$[x(496)],collections:$[x(528)],tags:$[x(632)]}})??[],FGSECOMAPP[t(465)]=e?.[t(547)]??{}})[$(597)](async x=>{let t=$;console[t(909)](t(604)+x.message);let a=await e(t(531),{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}}),i=await a[t(895)](),r=i[t(543)];FGSECOMAPP[t(465)]=i,FGSECOMAPP[t(702)]=r?.[t(565)]($=>{let x=t;return{...FGSECOMAPP[x(702)]?.[x(594)](x=>x.id===$.id),...$}})??[]})}catch(x){console[$(909)]("sca_catch",x[$(759)]);let t=await e($(531),{method:$(747),headers:{Accept:$(698),"Content-Type":$(698)}}),a=(await t.json())[$(543)];FGSECOMAPP[$(702)]=a?.[$(565)](x=>{let t=$;return{...FGSECOMAPP[t(702)]?.[t(594)]($=>$.id===x.id),...x}})??[]}},K=[],Z=async $=>{let x=_0x321081;try{"/cart.js"===$?K[x(595)](x(525)):K[x(595)]($[0]),await V();let t=await M(FGSECOMAPP[x(702)],FGSECOMAPP[x(606)]);FGSECOMAPP[x(754)](FGSECOMAPP[x(606)]);let a=!1;$[0].startsWith(x(697))&&JSON[x(578)]($[1][x(918)]??[]).includes(x(858))?(console.log("event add gift to cart from popup",[...K]),await Y(t),a=!0):$[0].startsWith(x(624))&&JSON[x(578)]($[1].headers??[]).includes(x(620))&&(K[x(518)](x(697))||1===K.length)?(console[x(832)](x(761),[...K]),await Y(t),a=!0):(console[x(832)](x(675),[...K]),await W(t)),a&&(window.location[x(566)][x(518)](x(651))||document[x(770)]("#secomapp_freegifts_version")?.[x(822)](x(791))===x(608))&&(K=[],location[x(871)]());let i=await e(x(531),{method:x(747),headers:{Accept:x(698),"Content-Type":"application/json"}});return await i[x(895)]()[x(479)]($=>{let t=x;FGSECOMAPP[t(702)]=$.items?.[t(565)]($=>{let x=t;return{...FGSECOMAPP[x(702)]?.[x(594)](x=>x.id===$.id),...$}})}),FGSECOMAPP.cartItems}catch(r){console[x(909)](r)}},J=()=>{let $=_0x321081;if(!Shopify?.enable_toast_added)return;let x=document[$(770)]($(494));if(!x)return;x.innerHTML="";let t=Shopify?.sca_text_notify_success??$(461),e=document[$(769)]("li");e[$(818)]="sca-fg-toast sca-fg-success",e.innerHTML=$(711)+t+$(641),x[$(884)](e),e[$(588)]=setTimeout(()=>Q(e),3e3),document.querySelector($(542))?.[$(586)]("click",()=>Q(e))},Q=$=>{let x=_0x321081;$[x(820)].add(x(501)),$.timeoutId&&clearTimeout($[x(588)]),setTimeout(()=>$[x(889)](),500)},$$=($,{value:x,innerHTML:t})=>{let e=_0x321081;try{let a=FGSECOMAPP[e(893)]?.[e(729)],i=a===e(777)?$[e(854)]:$[e(805)]??$.target;if(i?.[e(596)](e(508))||(i=document[e(770)]("#sca-spinner-checkout")?.parentNode),i[e(541)]=x,i[e(643)]=t,i[e(687)]=!1,i[e(737)]("click",$x),i[e(703)]("sca_handle_checkout"),a===e(463)){i[e(885)][e(770)]("[sca_root_checkout]")[e(859)]();return}a===e(777)&&window[e(737)](e(859),$0,!0),i[e(859)]()}catch(r){window[e(552)][e(553)]((Shopify?.[e(584)]?.[e(536)]??"/")+"checkout"),console[e(909)](r[e(759)])}},$x=async $=>{let x=_0x321081;try{$[x(462)](),$.stopPropagation(),$.stopImmediatePropagation();let t=FGSECOMAPP.fgSettings?.mode_override_checkout,a=t===x(777)?$[x(854)]:$[x(805)]??$.target,{form:i}=a,r="",c="";if(a&&(a[x(687)]=!0,r=a.innerHTML,c=a[x(541)],"function"==typeof FGSECOMAPP?.scaCustomLoadingCheckout?await FGSECOMAPP[x(915)](x(513)):(a[x(541)]="Loading...",a[x(643)]=x(878))),FGSECOMAPP[x(521)])return!1;FGSECOMAPP[x(521)]=!0;try{await e(x(651),{method:x(914),body:new FormData(i)})}catch(o){console[x(832)]("not type checkout btn")}if(b(FGSECOMAPP[x(606)])&&b(FGSECOMAPP[x(702)]?.find($=>n($))))return console.log(x(453)),$$($,{value:c,innerHTML:r}),!1;let l=await e(x(531),{method:x(747),headers:{Accept:x(698),"Content-Type":x(698)}}),s=(await l[x(895)]()).items;await V();let d=FGSECOMAPP[x(702)]?.map($=>{let t=x;return{...s?.find(x=>x.id===$.id),collections:$[t(528)],tags:$[t(632)]}})??[],f=!1;for(let _ of FGSECOMAPP.offers)if(_.giftsAdded&&_[x(657)][x(766)]){let u=E(d,_),g=X(_.start_time,_.end_time);!g&&u[x(657)][x(766)]>0&&(f=!0),u[x(730)]||(f=!0),u[x(519)]<0&&(f=!0),_.sub_conditions&&!P(_,SECOMAPP)&&(f=!0)}if(await M(d,FGSECOMAPP[x(606)]),f)location[x(871)]();else try{FGSECOMAPP[x(893)][x(677)]&&!b(FGSECOMAPP[x(702)]?.[x(594)]($=>n($)))?await e(SECOMAPP[x(792)]+x(742)+Shopify?.[x(799)],{method:"GET",headers:{"Content-Type":x(673)}})[x(479)](async $=>{let t=x,a=await $[t(895)]();a[t(848)]=(a[t(848)]??[])[t(565)]($=>{let x=t;return $[x(496)][x(528)]=$[x(528)]?.[x(565)]($=>({id:$.id})),$[x(496)].tags=$[x(632)],{id:$.product.id,variant_id:$[x(496)][x(709)],title:$[x(496)][x(551)],handle:$[x(496)][x(704)],price:$[x(496)][x(602)],quantity:$[x(496)][x(471)],product_type:$.product.product_type,vendor:$[x(496)][x(619)],tags:$[x(496)][x(632)],collections:$[x(496)][x(528)]}}),a[t(902)]={arr_offer_added:FGSECOMAPP[t(537)],secomapp:{customer:SECOMAPP?.customer??{},fg_codes:SECOMAPP?.[t(852)]??[],fgSettings:FGSECOMAPP[t(893)]},cookie_fg_code:I(t(664)),shopify_currency:Shopify?.currency},await e(SECOMAPP[t(792)]+t(659)+LZString[t(826)](a=JSON.stringify(a)),{method:"GET",headers:{"Content-Type":t(673)}})[t(479)](async $=>{let x=t,e=await $[x(895)]();try{FGSECOMAPP.checkIsBlockCheckout=!1,e[x(780)]&&(window.location[x(566)]=e[x(780)][x(574)])}catch(a){console.error(a)}})}):(console[x(832)](x(455)),FGSECOMAPP[x(521)]=!1,$$($,{value:c,innerHTML:r}))}catch(p){FGSECOMAPP.checkIsBlockCheckout=!1,$$(p,{value:c,innerHTML:r})}(a=t===x(777)?$.target:$[x(805)]??$.target)&&(typeof FGSECOMAPP?.[x(915)]===x(721)?await FGSECOMAPP[x(915)]("end"):(a.value=c,a.innerHTML=r),a.disabled=!1)}catch(h){typeof FGSECOMAPP?.[x(915)]===x(721)&&await FGSECOMAPP[x(915)](x(654)),console.error(h)}},$0=async $=>{let x=_0x321081;$[x(854)]?.[x(596)](x(508))&&await $x($)},$t=()=>{let $=_0x321081,x=FGSECOMAPP[$(893)]?.[$(729)],t=$(804)+h($(653));document.querySelectorAll(t)[$(640)](t=>{let e=$,a=t.hasAttribute("sca_root_checkout"),i=t[e(596)](e(676)),r=t.hasAttribute(e(508));if(x===e(463)){if(a)return;if(!i&&!r){let c=t.cloneNode(!0);c[e(586)](e(859),$x),c[e(875)]("sca_handle_checkout",""),c[e(875)](e(676),""),t[e(500)][e(575)]=e(725),t[e(500)][e(637)]=e(464),t.style.opacity="0",t[e(875)](e(617),""),t[e(885)]?.[e(884)](c)}i&&!r&&(t[e(586)](e(859),$x),t[e(875)](e(508),""))}else x===e(777)?t[e(875)](e(508),""):r||(t[e(586)]("click",$x),t.setAttribute(e(508),""));FGSECOMAPP[e(667)]=!0}),x===$(777)&&window[$(586)]($(859),$0,!0)};FGSECOMAPP[_0x321081(591)]=()=>{let $=_0x321081;FGSECOMAPP[$(849)]=0;let x=setInterval(()=>{let t=$;$t(),FGSECOMAPP[t(849)]++,(FGSECOMAPP.scaCountRenderEventCheckout>10||FGSECOMAPP[t(667)])&&(FGSECOMAPP.scaCountRenderEventCheckout=0,clearInterval(x))},400)};let $e=$=>{let x=_0x321081;try{let t={},e={},a=FGSECOMAPP[x(606)];if(b($)){$=[],b(Shopify?.[x(666)])||$[x(595)]({...Shopify?.[x(666)]});let i={...Shopify?.[x(650)],...Shopify?.[x(722)]?.products};Object.values(FGSECOMAPP[x(907)])?.[x(892)]($=>!b($[x(660)])&&(b($?.[x(621)])||$?.[x(621)]&&!$?.[x(497)]?.[x(820)]?.[x(693)](x(782))))?.forEach($=>{let t=x;i[$[t(660)].id]={...$[t(660)]}}),$=$[x(492)]([...Object[x(529)](i)])}for(let r in $?.[x(640)]($=>{let t=x,e=FGSECOMAPP[t(907)][$[t(704)]];FGSECOMAPP.productsInPage[$[t(704)]]={...e,info:{...$},product_has_icon:!!b(a)&&void 0}}),a?.forEach(a=>{let i=x,r=a[i(539)];if(1===r.length&&r[0].unit===i(587)&&"boolean"==typeof r[0].is_multiply){let c,o=r[0][i(517)];o?.forEach(x=>{let t=i;switch(x[t(842)]){case"variants_ids":c=Object[t(529)](x[t(541)]);break;case"product_types":let e=Object[t(600)](x[t(541)]);e[t(766)]>0&&(c=(void 0===c?$:c)?.filter($=>e.includes($[t(842)]))??[]);break;case t(468):let a=Object[t(600)](x[t(541)]);a.length>0&&(c=(void 0===c?$:c)?.[t(892)]($=>a[t(518)]($[t(619)]))??[]);break;case"product_collections":let r=Object[t(600)](x[t(541)]);r[t(766)]>0&&(c=(void 0===c?$:c)?.[t(892)]($=>{let x=t,e=$.collections?.[x(565)]($=>$.id+""),a=e?.filter($=>r.includes($));return!b(a)})??[])}}),c?.[i(640)]($=>{let x=i,r=$[x(704)];if(t[r]){let c=t[r]?.[x(565)]($=>$[x(808)]),o=a[x(921)]?.[x(892)]($=>!c?.[x(518)]($[x(808)]));t[r]=t[r].concat(o)}else t[r]=a[x(921)];let n=$[x(728)]?.[x(565)]($=>$.id)??[];e[r]=n.concat(e[r]??[]),e[r]=[...new Set(e[r])]})}}),t){let c=FGSECOMAPP[x(907)][r];FGSECOMAPP[x(907)][r]={...c,gifts_will_receive:[...t[r]],product_has_icon:!0,variants_has_gift:[...e[r]]}}return Object[x(908)](t)?.length?t:{}}catch(o){return console[x(909)](o),null}},$a=$=>{let x=_0x321081,t=FGSECOMAPP[x(678)][x(880)]??{};if(!t[x(870)]?.[x(469)])return;let e=x(847)+(t[x(870)]?.[x(551)]??x(736))+'
    \n \n
    \n
    \n
    \n '+$?.[x(565)]($=>'\n
    \n \n =4?x(813):"")+x(538),a=x(524)+h("sca_fg_btn_gift_thumbnail_query"),i=document[x(770)](a)??document[x(770)](x(900));if(!i)return;i.parentNode.style[x(896)]=x(560),i[x(885)][x(500)][x(504)]=x(906),i[x(885)]?.[x(818)]?.[x(518)]("sca-fg-form-thumbnail-product-page")||i[x(885)]?.[x(820)]?.[x(731)]("sca-fg-form-thumbnail-product-page");let r=i[x(885)][x(770)](x(748));if(r)r[x(643)]=e;else{(r=document[x(769)](x(901)))[x(875)]("id","sca-gift-thumbnail");let c=new DOMParser()[x(688)](e,"text/html");r[x(643)]=c[x(733)][x(643)],i[x(885)][x(694)](r,i)}i[x(885)][x(694)](r,i);let o=document[x(770)](x(798));if(o)switch(t[x(870)]?.size){case"32":o[x(500)][x(488)]="50%";break;case"50":o.style[x(488)]="60%";break;case"100":o[x(500)][x(488)]=x(491);break;case"160":o[x(500)][x(488)]="80%";break;case x(685):o[x(500)][x(488)]=x(560);break;default:o[x(500)].maxWidth=x(872)}if($?.length>=4)new Glider(document[x(770)](x(773)),{slidesToShow:3,slidesToScroll:1,draggable:!0,dots:".dots-thumbnail",arrows:{prev:x(919),next:"#fg-gift-thumbnail-title .glider-next"}});else{o&&(o[x(500)][x(488)]="100%");let n=document[x(770)](x(773));n&&(n[x(500)][x(575)]=x(923))}},$i=()=>{let $=_0x321081;if(!(FGSECOMAPP.fgAppearanceGiftIcon[$(880)]??{})[$(671)]?.status)return;let x=$(638)+FGSECOMAPP[$(678)][$(925)]+$(812),t=$(674)+h("sca_fg_title_product_gift_icon_query"),e=document[$(770)](t)??document.querySelector(".product_name, .product-title, .product__title, .product-single__title, .tt-title, .ProductMeta__Title");if(!e)return;e[$(500)][$(497)]="relative",e[$(500)][$(896)]="fit-content",e[$(818)]?.[$(518)]("sca-fg-form-icon-product-page")||e.classList?.[$(731)]($(860));let a=e[$(770)]($(467));if(a)a[$(643)]=x;else{(a=document[$(769)]($(901)))[$(875)]("id",$(807));let i=new DOMParser()[$(688)](x,$(838));a.innerHTML=i[$(733)][$(643)],e.appendChild(a)}},$r=()=>{let $=_0x321081,x=[],t=".fg-secomapp-collection-img, .product-card, #product-grid .grid__item, .card-list .card-list__column, .cc-product-list .product-block, .collection-list.grid .grid__item, .collection-grid.grid .grid__item "+h($(535));return document.querySelectorAll(t)[$(640)](t=>{let e=$,a=t[e(770)](e(752)),i=a?.[e(822)](e(566))?.[e(786)]("/")??[],r=i?.indexOf(e(590)),c=r>=0?i[r+1]??null:null;if(c=c?.[e(786)]("?")?.[e(904)](),n(c)){t[e(889)]();return}let o=t.querySelector(e(457));if(o){t[e(889)]();return}if(b(c))return;let l=decodeURI(c);b(FGSECOMAPP[e(907)][l]?.[e(660)])&&x[e(595)](l),FGSECOMAPP.productsInPage[l]={...FGSECOMAPP[e(907)][l],position:t}}),x},$c=$=>{let x=_0x321081;Object[x(600)]($)?.[x(640)]($=>{let t=x,e=FGSECOMAPP[t(907)][$]?.[t(497)];if(!e)return;if(!(FGSECOMAPP.fgAppearanceGiftIcon.collection_page??{})[t(469)])return;let a='\n {let x=_0x321081;await e(SECOMAPP[x(792)]+x(611)+LZString[x(826)](JSON.stringify($)),{method:"GET",headers:{"Content-Type":x(673)}})[x(479)](async $=>{let t=x,e=await $[t(895)](),a=[];e?.[t(590)]?.forEach($=>{let x=t;b($?.[x(590)]?.id)||a[x(595)]({...$[x(590)],collections:$[x(528)],variants_quantity:$[x(764)]})});let i=$e(a);$c(i)})[x(597)]($=>{let t=x;console[t(909)]($)})},$n=async $=>{let x=_0x321081,t=[];for(let[e,a]of $.entries())b(FGSECOMAPP[x(907)][a]?.[x(660)])&&t.push(a),20===t.length&&(await $o([...t]),t=[]),e===$[x(766)]-1&&t[x(766)]>0&&(await $o([...t]),t=[])},$l=()=>{let $=_0x321081,x=$r(),t=$e();$c(t),$n(x)[$(479)]()},$s=()=>{let $=_0x321081;Shopify?.[$(470)]&&document.addEventListener("change",function(){let x=$,t=new URL(document[x(564)]),e=parseInt(t[x(762)][x(716)](x(728)));$d(isNaN(e)?void 0:e)})},$d=$=>{let x=_0x321081;if(!location[x(566)][x(518)](x(495)))return;document.querySelector("#sca-gift-icon")?.[x(889)](),document[x(770)](x(748))?.[x(889)]();let t=$e();if(b(t))return;let e=location.pathname.split("/"),a=e?.[x(599)](x(590)),i=decodeURI(a>=0?e[a+1]??null:null);if(!Object.keys(t)?.[x(518)](i))return;let r=t[i],c=FGSECOMAPP.productsInPage[i]?.[x(806)]??[];!(Shopify?.[x(470)]&&(!b($)&&!c[x(518)]($)||b($)&&!b(Shopify?.[x(666)]?.[x(814)])&&!c[x(518)](Shopify?.current_product?.[x(814)]?.id)))&&($a(r),$i(r))};FGSECOMAPP[_0x321081(754)]=$=>{let x=_0x321081;try{b($)&&($=[...FGSECOMAPP.offers]);let t=location.href.includes("/cart"),e=[];if($?.[x(640)]($=>{let t=x;if($.isReachConditions||b($[t(609)])||!b(FGSECOMAPP.maxOfferPriority)&&!$[t(730)]&&$[t(751)]&&$[t(633)]>FGSECOMAPP[t(618)])return;let a=$[t(609)];$[t(539)]?.[t(640)]($=>{let x=t,e=k(FGSECOMAPP[x(702)],$);e=A(e,$[x(699)]);let i=0,r=null,c=0;$.unit===x(498)?(i=y(e),r=x(821),c=Shopify?.[x(833)]??2):$.unit===x(587)&&(i=w(e),r=x(829),c=0);let o=Math[x(726)]($.min_amount-i,0)[x(696)](c);a=a.replaceAll(r,o)}),e[t(595)](a)}),b(e)){document.querySelectorAll(x(592))[x(640)]($=>$[x(643)]="");return}let a="",i='
    \n '+e?.map($=>x(727)+$+x(795))[x(828)]("")+x(744);FGSECOMAPP.fgAppearancePromotionMessage[x(903)]&&(a=i);let r=x(746),c=document.querySelector(r),o=c?.[x(770)](x(888)),n=document[x(585)](".fg-secomapp-cart-item-promotion "+h(x(876))),l=document[x(585)](x(592));if(b(l)){(l=document[x(769)](x(901))).setAttribute("id","sca-promotion-message-layout"),l[x(820)].add("sca-promotion-message-layout");let s=new DOMParser()[x(688)](a,x(838));l[x(643)]=s[x(733)].innerHTML,b(n)?(s=new DOMParser()[x(688)](a,x(838)),l[x(643)]=s[x(733)].innerHTML,c&&o&&t?o[x(772)](l):c&&t&&c[x(772)](l)):n?.[x(640)]($=>{let t=x,e=l[t(823)](!0);$[t(772)](e)})}else l[x(640)]($=>$[x(643)]=a);try{document.querySelectorAll(x(583)).forEach($=>{let x=new Glider($);(($,x)=>{let t=_0xc45b,e=$[t(656)][t(817)],a=null,i=1;function r(){a=setTimeout(()=>{let x=_0xc45b;i>=e&&(i=0),$[x(810)](i++)},3e3)}$[t(516)][t(586)]("glider-animated",function(){window[t(911)](a),r()}),r()})(x,3e3)})}catch(d){console[x(909)](d)}}catch(f){console[x(909)](f)}};let $1=async()=>{let $=_0x321081;try{let x=await fetch($(732)),t=await x[$(895)]();FGSECOMAPP[$(800)]=t?.[$(922)]}catch(e){console.log($(856))}};z(FGSECOMAPP.cartItems).then()}}catch($f){console[_0x321081(832)](_0x321081(879),$f)}function _0x596c(){let $=["#fg-gift-thumbnail-title .glider-prev","cal_gift_for_other_rules","gift_products","country_code","flex","flat","gift_icon_path","Out of stock",".selected-variant","max_amount","\n
    \n ","not have orders and gifts","gift_popup_title","not using draft order","getTime",'a[href*="/collections/sca_fg"]',"original_variant_shopify_id","select_one_gift_price","variants","Add gift to cart successfully!","preventDefault","clone_checkout","hidden","SHOPIFY_CART","gift_slider","#sca-gift-icon","product_vendors","status","enable_check_variants_has_gift","quantity","active","fgData",".freegifts-main-container .glider-prev","fg-gift-items","en-US",".dropdown-menu","format","then","sections_url","start_time",'\n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n ',"sca_fg_cart_drawer_query","\n \n
    \n
    \n
    ","slice",".gift-original-url","thumbnail","maxWidth","cookie",".dots","70%","concat",".freegifts-main-container .glider-next",".sca-fg-notifications","/products/","product","position","money","cal_gift_discount","style","hide",'"\n data-variant="','\n
    \n Powered by\n \n BOGOS: Free Gift & Buy X get Y\n \n \n
    \n ',"height","Can not fetch all body","/cart/add.js","NumberFormat","sca_handle_checkout",'">\n ',"general","total_price","#fg-gift-items .dropdown","start","

    \n ","textContent","ele","product_narrow","includes","giftsAvailable"," \n ","checkIsBlockCheckout","reRenderCartCustom","min_amount",".fg-secomapp-handle-add-to-cart ","/cart/change.js","1001lXyXBH","freegifts-main-page-container","collections","values",'"\n data-original-price="',"/cart.js","orders",'" target="_blank">\n \n \n \n ',"offer_conditions","type_customer_tags","value","#close-fg-toast","items","[data-open]","parentElement","\n \n \n ","shopify_cart","70973210jkGRkZ","not_show_gift_if_already_on_cart","USD","title","location","replace","3.0","\n ","#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg","unshift","10815920jleliY","show_gift_for_customer","100%","have_not_got_gift_from_this_offer","discount_percentage","\n \n ","URL","map","href","email","now","color","/cart/change","condition_result","total_spent_on_last_order","floor","invoice_url","display","auto_add_all_gifts",'\n \n \n \n ',"stringify","freegifts-main-popup-container","data-variant","",".product-item-thumbnail",".sca-promotion-glider","routes","querySelectorAll","addEventListener","number_of_products","timeoutId","sca-d-none","products","fetchCheckoutEvents",".sca-promotion-message-layout",'',"find","push","hasAttribute","catch","dataset","indexOf","keys","select_gift_btn","price","Escape","failed to parse cart section ","gift_settings","offers","compare_gift_price_with_product","fg-checkout","promotion_message","fgAppearanceGiftSlider","&sca_products_handle=","auto_add_gift","product_id","fgAppearancePromotionMessage","show_product_title",'

    \n ',"sca_root_checkout","maxOfferPriority","vendor","sca_process_gifts","product_has_icon","trim","#fg-gift-items","/cart/update","customer","data-price","value_customer_locations","fetch_new_cart",'\n

    \n \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n ',"other_products","/cart","undefined","sca_fg_form_checkbox_button_query","end","original_price","track","giftsAdded",'\n
    \n