window.fgData={"offers":[],"settings":{"auto_add_gift":true,"compare_gift_price_with_product":false,"cal_gift_discount":"compare_at_price","select_one_gift_price":false,"not_show_gift_if_already_on_cart":false,"sync_quantity":false,"manual_input_inventory":false,"using_draft_order":false,"delete_gift_after_turn_off_offer":true,"gift_format":"same_as_original_products","admin_api_access_token":null},"appearance":{"gift_slider":{"general":{"gift_popup_title":"SELECT YOUR FREE SAMPLES!","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_products","number_product_slider":4},"color":{"gift_slider_title_color":"#121212","product_title_color":"#000000","original_price_color":"#121212","discounted_price_color":"#B80429","add_to_cart_color":"#FFFFFF","add_to_cart_btn_color":"#B80429"},"others":{"hidden_brand_mark":true}},"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":false,"size":"50"},"gift_thumbnail":{"status":false,"size":"100","title":"Free Gift"}},"collection_page":{"status":false,"size":"50"}},"promotion_message":{"show_on_cart_page":false,"text_color":"#ffffff","background_color":"#B80429"}}};/* END_FG_DATA */ const _0x5e6743=_0x4d33;function _0xaf54(){let $=[".fg-secomapp-cart-item-promotion ","size","current_variant","value","vendor","cookie","2007ZctykE","fetchCheckoutEvents","maxWidth","specific_link_address","[type='submit'][name='add'], [type='button'][name='add'], [data-add-to-cart], [data-action='add-to-cart']","set",'">\n ',"textContent","map","relative","belongs_to_offer","3947598UTrXgi","not using draft order","gift_items","sca-gift-thumbnail","/cart/change","key","cart-items, .cart-header, .section-header","cloneNode","getCart","freegiftProxy","hasDoneProcessCheckout","not type checkout btn","original_product_handle","replace","sca-fg-out-stock","href","getElementById","sca_fg_form_checkbox_button_query","fg-gift-items","&data_checkout=","isReachConditions","variant_title","value_customer_tags","sca-fg-form-thumbnail-product-page",".product-item-thumbnail","gift_products","data-price",'" alt="free-gift-icon" class="sca-gift-icon-collection-img" />\n ',"width","toString",".sca-promotion-message-layout","remove",".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 ","scaHandleConfigValue","cal_gift_for_other_rules","currency","scaCountRenderEventCheckout",'\n \n ',"final_price","100%","insertBefore","src",'\n \n \n ',"location","gifts","others",'.btn-add-to-cart[data-variant="',"#fg-gift-items .dropdown > .dropdown-menu > li","classList","fg-checkout",'"\n data-variant="',"setItem","data-variant","offer_id","createElement","removeAttribute","decompressFromBase64","boolean","customer_order_history","fgSettings","push","parse","product_page","offers","settings","format","scaCustomLoadingCheckout",'"\n data-price="',"","price","#secomapp_freegifts_version","checkout","shift","gift_should_the_same","total_spent_on_last_order","auto add gift: ","number","Out of stock","NumberFormat","&sca_products_handle=","60%","floor","locale","variant_id","glider-animated","70%","variants","compressToEncodedURIComponent","function","addEventListener","number_of_products","#shopify-section-header #cart-icon-bubble, .shopify-section.section-header #cart-icon-bubble","log",'" id="',".fg-secomapp-handle-add-to-cart ","sca_fg_codes",'a[href*="/collections/sca_fg"]',"data-original-price","product_has_icon",".fg-secomapp-product-title ","isUpdateCart",".sca-list-gift-thumbnail","variantId","/cart","api","sca_offers_added","cart",".freegifts-main-container .glider-prev","text/html","includes","gift_settings","entries","invoice_url","info","body","disableShopify_getCart","manual_input_inventory","this is others","gift_thumbnail","80%","gift_slider","#freegifts-main-popup-container [data-close]","product_type","arrGiftsData","substring","getItem","end_time","totarrCustomerOrderal_spend_on_order_history","sections_url","some","error","tabindex","split",".product_name, .product-title, .product__title, .product-single__title, .tt-title, .ProductMeta__Title","variants_ids","end","customer_tags","compare_gift_price_with_product","length","start","total_spend_on_order_history","original_price","{{sca_min_quantity}}","100","sca_catch","style","add","div","change",'

\n ',"fgData","\n ","money",'"\n data-original-price="',"thumbnail","sync_quantity","428gTSKXx","Can not fetch all body","auto","string","arrOfferAdded","toFixed","formatter",'\n

\n Powered by\n \n BOGOS: Free Gift & Buy X get Y\n \n \n
\n ',"min_amount","undefined","979783TRmtDI","current_product",'\n\n
\n
\n
\n ',"concat","variant_shopify_id","#fg-gift-items .btn-add-to-cart",'">\n ',"target",".sca-gift-icon-collection-page","original_variant_shopify_id","max_amount","type","status","include","message","unit","customer","currentTarget","fgAppearanceGiftSlider","#fg-gift-items .dropdown","number_of_order","reload","{{sca_min_total}}",".sca_handle_button_checkout, input[name='checkout'], button[name='checkout'], input[name='goto_pp'], button[name='goto_pp'], input[name='goto_gc'], button[name='goto_gc'], a[href$='checkout'], form[action='/checkout'] input[type='submit'], button.new_checkout_button, input[value='Checkout'], input[value='Checkout'], input[value='Check out'], input[value='Check Out'] a.checkout-link ","position","sca-d-none","slice","hasAttribute","number_of_gift_can_receive","\n

","[data-open]","compare_at_price",".gift-original-url","\n
\n ","flat","clearInterval","hidden_brand_mark","\n
","#sca-gift-thumbnail","show_product_title","application/json","removeEventListener","arrGiftsRemove","by_variants","product_vendors","gift_icon",'","condition_result","show_on_cart_page","/cart/add.js","focus","total_price","collections","renderPromotionMessage",'a[href*="/products/"]',"sections_cart","

","giftsAdded","current_collection","sca_fg_img_collection_gift_icon_query",'\n
',"handle","parseFromString","variant","products","giftsAvailable","gift_popup_title","variants_quantity","product_collections","catch","flex","sca_locale",'" target="_blank">\n \n
\n
\n \n ',"product_id","json","orders","d-block",".gift-price","last_total","general","object","reRenderCartCustom",'
\n \n
\n ',"-sca_clone_freegift","sections","auto_add_all_gifts","appearance","stop_lower_priority","sca_fg_cart_icon_query","#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg","gift_icon_path","show_gift_for_customer","routes","product_narrow","active","className","fg_decimal",'
\n Loading...\n
',"email","

\n ","maxOfferPriority","find","prepend","get",'\n
\n
\n ',"/cart/change.js","order_created_from",'" alt="free-gift-icon" class="sca-gift-icon-img" />\n ',"POST",'\n ","using_draft_order","#7367f0","Select variant",'">\n ',"initializeForXHR","querySelector",".freegifts-main-container .glider-next","enable_check_variants_has_gift","color","display","freegifts-main-page-container","disabled","\n ","stop_offer","offer_name","indexOf","then","join","appendChild","6212136viQnvs","\n \n
\n
\n
","sub_conditions",'" target="_blank">\n {let $=_0x5e6743,x=FGSECOMAPP[$(432)]?.[$(626)],e=x?.[$(551)]?.[$(708)],t=!p(x)&&void 0!==e&&!e;return t?$(669):""},{fetch:e}=window,t=()=>{let $=_0x5e6743;document[$(445)]($(576))?.[$(537)]($(722))!==$(555)&&(window[$(801)]=async(...x)=>{let t=$;try{if(x[0][t(615)](t(733))){a(x[1]);let r=200,n=await e(...x)[t(456)]($=>{let x=t;return r=$[x(684)],$[x(823)]()});if(x[1].headers?.sca_add_gift&&200!==r){let c=JSON.parse(x[1][t(620)])?.id,o=document.querySelector(t(552)+c+'"]');return o.innerText=t(583),o.classList.contains(t(499))||o[t(554)][t(652)](t(499)),o[t(451)]=!0,o[t(651)][t(737)]=t(732),document[t(728)](".btn-add-to-cart").forEach($=>{let x=t;parseInt($.getAttribute("data-variant"))===c||$.classList.contains(x(499))||($.disabled=!1,$.style[x(737)]=FGSECOMAPP.fgAppearance?.[x(626)]?.[x(448)]?.add_to_cart_btn_color??x(441))}),!1}return await Y([t(733),...x[t(698)](1)]),await i(x,n),new Response(JSON.stringify(n))}if(!(x[0][t(615)](t(489))||x[0][t(615)](t(819))))return setTimeout(function(){$r()},1e3),await e(...x);{a(x[1]);let d=200,s=await e(...x)[t(456)]($=>{let x=t;return d=$[x(684)],$[x(823)]()});if(x[1].headers?.[t(816)]&&200!==d)return!1;if(await Y([x[0][t(615)](t(489))?"/cart/change":t(819),...x.slice(1)]),x[1]?.[t(427)]?.[t(816)])return new Response(JSON.stringify(s));let l=await e("/cart.js")[t(456)]($=>$.json());return await i(x,s,l),new Response(JSON[t(798)](l))}}catch(f){return await e(...x)}})};FGSECOMAPP[_0x5e6743(444)]=()=>{let $=_0x5e6743;try{if(Shopify?.[$(621)]||typeof Shopify?.getCart!==$(594))return;Shopify[$(493)]=async function(x){let e=$;if(!FGSECOMAPP[e(720)]){FGSECOMAPP[e(720)]=!0,await Y(e(434));let t=await fetch(e(434),{method:e(545),headers:{Accept:e(712),sca_fetch:"fetch_new_cart","Content-Type":e(712)}});typeof x===e(594)&&(0>FGSECOMAPP.fgCallback.indexOf(x)&&FGSECOMAPP[e(726)][e(566)](x),x(await t[e(823)]())),FGSECOMAPP[e(720)]=!1}FGSECOMAPP[e(475)]()},typeof ShopifyAPI!==$(671)&&typeof ShopifyAPI[$(493)]!==$(671)&&(ShopifyAPI[$(493)]=Shopify?.getCart),void 0!==Shopify?.[$(610)]&&typeof Shopify?.[$(610)][$(493)]!==$(671)&&(Shopify.api.getCart=Shopify?.[$(493)])}catch(x){console[$(636)](x)}};let a=$=>{let x=_0x5e6743;try{let e=$?.body;e instanceof FormData?FGSECOMAPP[x(775)]={sections:e[x(417)](x(833)),sections_url:e[x(417)](x(634))}:typeof e===x(665)&&(e=JSON[x(567)](e),FGSECOMAPP[x(775)]={sections:e?.[x(833)],sections_url:e?.sections_url})}catch(t){FGSECOMAPP[x(775)]={}}},i=async($,x,t)=>{let a=_0x5e6743;try{if($[1]?.[a(427)]?.[a(816)])return;let i={},r=Object.keys(x[a(833)]??{})?.filter($=>p(FGSECOMAPP[a(775)][$]))??[];if(r&&r.length&&FGSECOMAPP.isUpdateCart&&(i=await e("/?sections="+r[a(457)](","))[a(456)]($=>$.json())),FGSECOMAPP[a(606)]=!1,i={...FGSECOMAPP[a(775)],...i},p(i))return;x[a(833)]={...x[a(833)],...i},p(t)||(t[a(833)]={...x[a(833)]})}catch(n){}},r=async($,x,e)=>{let t=_0x5e6743;e=e?.[t(514)]();document.querySelectorAll(t(677)).forEach(x=>{let e=t;x[e(451)]=!0;let a=x[e(537)](e(558))-0;a===$&&(x[e(810)]="Loading..."),x[e(651)].backgroundColor="#82868b"});let a=FGSECOMAPP[t(666)].find(x=>e===x.belongs_to_offer?.[t(514)]()&&$===x[t(608)]);a?a[t(532)]+=x:FGSECOMAPP[t(666)][t(727)]({variantId:$,belongs_to_offer:e,quantity:x}),localStorage[t(557)](t(611),LZString[t(430)](JSON.stringify(FGSECOMAPP.arrOfferAdded)));let i=await fetch(t(769),{method:t(422),headers:{Accept:t(712),"Content-Type":t(712),sca_add_gift:t(538)},body:JSON[t(798)]({quantity:x,id:$})}),r=await i[t(823)]();if(i.ok)return setTimeout(function(){J()},1e3),r},n=$=>{let x=_0x5e6743,e=x(832);return!p($)&&(typeof $===x(829)&&($[x(781)]?.[x(615)](e)||$[x(735)]?.[x(615)](x(428)))||"string"==typeof $&&$.includes(e))},c=async($,x)=>{let e=_0x5e6743;try{if(p($)&&p(x))return;let t={};if(FGSECOMAPP[e(750)]?.[e(731)]($=>n($))?.[e(817)]($=>{let x=e;t[$.variant_id]=$[x(532)]}),($=$?.[e(731)]($=>!p($.variant_id)))?.forEach($=>{let x=e;t[$[x(589)]]=(t[$[x(589)]]??0)+($[x(532)]??1)}),Object[e(754)](t)?.[e(817)]($=>{t[$]=t[$]>=0?t[$]:0}),p(Object[e(754)](t)))return;$?.[e(817)]($=>{let x=e,t=FGSECOMAPP[x(666)][x(415)](e=>$[x(559)]?.[x(514)]()===e[x(484)]?.[x(514)]()&&$[x(589)]===e[x(608)]);t?t[x(532)]+=$[x(532)]:FGSECOMAPP[x(666)][x(727)]({variantId:$[x(589)],belongs_to_offer:$.offer_id?.[x(514)](),quantity:$[x(532)]})}),localStorage[e(557)](e(611),LZString.compressToBase64(JSON.stringify(FGSECOMAPP[e(666)]))),FGSECOMAPP[e(606)]=!0,await fetch(e(819),{method:e(422),headers:{Accept:"application/json","Content-Type":"application/json",sca_process_gifts:!0},body:JSON[e(798)]({updates:t,...FGSECOMAPP[e(775)]})})[e(456)]($=>$[e(823)]())[e(456)]($=>{let x=e;FGSECOMAPP[x(775)]=$[x(833)]}),document[e(445)](e(576))?.[e(537)](e(722))===e(555)&&location[e(693)]()}catch(a){console.error(a)}},o=0,d=()=>{let $=_0x5e6743,e=document[$(501)]($(450));if(e)e[$(810)]=$(418)+(FGSECOMAPP.fgAppearanceGiftSlider[$(786)]??"Select your free gift!")+$(730)+x()+$(657);else{if(!(e=document[$(501)]($(747))))return;e[$(810)]=$(831)+(FGSECOMAPP[$(690)].gift_popup_title??$(811))+'\n
\n
\n
\n\n
\n
\n \n
\n
\n \n
\n
\n
\n '+x()+$(709),e.classList.add("sca-is-visible-fg"),o++}},s=($,x)=>{let e=_0x5e6743;return $[e(482)]($=>e(749)+($[e(660)]??x)+e(599)+$[e(676)]+'" data-original-id="'+$[e(681)]+e(573)+l($)+e(659)+f($[e(536)],$[e(681)],$[e(647)]??0)+e(678)+$[e(506)]+e(452))[e(457)](" \n")},l=$=>FGSECOMAPP.formatter.format(h($?.price)),f=($,x,e)=>{let t=_0x5e6743;e=h(e);let a=p(Shopify?.[t(784)][$])?null:Shopify?.[t(784)][$],i=a?.variants,r=i&&Array.isArray(i)&&i[t(644)]>0?i[0][t(575)]??a?.[t(575)]??100*e:100*e;return x&&(r=a?.[t(592)]?.[t(415)]($=>x===$.id)?.[t(575)]??r),FGSECOMAPP[t(668)][t(571)](r/100)},_=($,x)=>{let e=_0x5e6743;return p(Shopify?.[e(784)][$])?x??"#":Shopify?.[e(784)][$][e(781)]},u=($,x)=>{let e=_0x5e6743;if(FGSECOMAPP[e(690)][e(711)])return p(Shopify?.[e(784)][$])?x[e(498)]("\xbb","")[e(498)](/\(\d*% off\)/,"")??"":Shopify?.[e(784)][$][e(424)]},p=$=>{let x=_0x5e6743;if(0===$)return!0;if(typeof $==x(582)||typeof $==x(563))return!1;if(typeof $==x(671)||null===$)return!0;if(typeof $.length!=x(671))return 0===$[x(644)];let e=0;for(let t in $)$.hasOwnProperty(t)&&e++;return 0===e},g=$=>{let x=_0x5e6743;try{let e={...FGSECOMAPP[x(518)]},t=e[$];if(t=t?t[x(719)]():null,!p(t)&&t[x(644)]>0)try{return document[x(445)](t),", "+t}catch(a){}return""}catch(i){return""}},b=()=>{let $=_0x5e6743;try{FGSECOMAPP[$(668)]=new Intl[$(584)](Shopify?.[$(791)]??Shopify?.[$(588)],{style:"currency",currency:Shopify?.[$(520)]?.active??"USD"})}catch(x){FGSECOMAPP[$(668)]=new Intl.NumberFormat("en-US",{style:$(520),currency:Shopify?.currency?.[$(843)]??$(467)})}},h=$=>{let x=_0x5e6743;$=$??0;let e=Shopify?.currency?.[x(466)]??1;return 1===parseFloat(e)?$:($*e).toFixed(Shopify?.[x(845)]??2)},m=$=>{let x=_0x5e6743;return $[x(731)]($=>void 0===$[x(519)]||!0===$[x(519)])[x(734)](($,e)=>$+e[x(532)]*(e[x(523)]??e[x(575)]),0)/100},v=$=>{let x=_0x5e6743;return $[x(731)]($=>void 0===$[x(519)]||$[x(519)])[x(734)](($,e)=>$+e[x(532)],0)},y=($,x)=>{let e=_0x5e6743,t=x.product_narrow;return p(t)?$:$[e(731)]($=>{let x=e;return!t[x(482)](e=>{let t=x;switch(e[t(683)]){case t(640):return Object[t(435)](e[t(471)])[t(482)]($=>$.variant)[t(706)]()[t(482)]($=>$.id).includes($[t(589)]);case t(546):return Object[t(754)](e.value)[t(615)]($.product_type);case t(716):return Object[t(754)](e[t(471)]).includes($[t(472)]);case t(788):let a=Object[t(754)](e[t(471)]),i=$[t(772)]?.map($=>$.id+"")?.[t(731)]($=>a[t(615)]($));return!p(i);default:return!1}}).includes(!1)})},w=($,x)=>{let e=_0x5e6743;return $?.[e(482)]($=>{let t=e;if(typeof $[t(519)]!==t(671)){let a=FGSECOMAPP.arrOfferAdded?.[t(731)](x=>x[t(608)]===$[t(589)]),i=a?.[t(734)](($,x)=>$+x[t(532)],0);if(i===$.quantity){let r=FGSECOMAPP[t(666)]?.[t(731)]($=>{let e=t;if($[e(484)]?.toString()===x[e(514)]())return!1;let a=FGSECOMAPP[e(569)]?.find(x=>x.id?.[e(514)]()===$[e(484)]?.[e(514)]()),i=a.gift_settings??{};return i[e(519)]&&100!==parseInt(i[e(721)])})?.[t(734)](($,x)=>$+x[t(532)],0);return{...$,cal_gift_for_other_rules:r>0,quantity:r??0}}return{...$,cal_gift_for_other_rules:!1,quantity:0}}return{...$}})??[]},k=($,x,e)=>{let t=_0x5e6743,a=0,i=y(x,$);i=w(i,$[t(559)]);let r;return $[t(687)]===t(658)?r=m(i):$.unit===t(596)&&(r=v(i)),r>=$[t(670)]&&(null===$.max_amount||r<=$[t(682)])&&(a=e[t(700)],$.is_multiply&&(a=Math[t(587)](r/$.min_amount)*a)),a},C=($,x,e)=>{let t=_0x5e6743,a={},i=[],r=0;return x.map(x=>{let t=k(x,$,e);0!==t&&(r=t),i.push(t>0)}),a[t(723)]=r,a.condition_result=i,a},A=($,x)=>{let e=_0x5e6743,t=!1;return 1===$[e(644)]?t=$[0]:2===$[e(644)]&&("and"===x&&(t=$[0]&&$[1]),"or"===x&&(t=$[0]||$[1])),t},S=($,x)=>{let e=_0x5e6743,t=$?.[e(482)]($=>$[e(589)]);FGSECOMAPP[e(666)]=FGSECOMAPP[e(666)].filter($=>t?.[e(615)]($[e(608)]));let a=x[e(487)].map($=>$[e(676)]),i=FGSECOMAPP[e(666)][e(731)]($=>$[e(484)]?.[e(514)]()===x.id?.toString())?.[e(482)]($=>$.variantId),r=$.filter($=>{let x=e;return n($)&&($.cal_gift_for_other_rules=!1),a[x(615)]($[x(589)])&&i[x(615)]($.variant_id)}),c=r[e(482)]($=>{let t=e,a=x[t(616)];$[t(519)]=a[t(519)],$[t(484)]=x.id?.[t(514)]();let i=FGSECOMAPP[t(666)]?.[t(731)](e=>e[t(484)]?.[t(514)]()!==x.id?.[t(514)]()&&$[t(589)]===e[t(608)])?.[t(734)](($,x)=>$+x[t(532)],0);return{...$,quantity:$[t(532)]-i}});return c[e(731)]($=>{let t=e;return $.belongs_to_offer?.[t(514)]()===x.id?.[t(514)]()})},T=$=>{let x=_0x5e6743,e=$[x(777)][x(731)](e=>e.belongs_to_offer?.[x(514)]()!==$.id?.toString())[x(482)]($=>$[x(822)]);return Object.values($[x(510)])[x(731)]($=>!e.includes($[x(729)]))},q=($,x)=>{let e=_0x5e6743,t=S($,x),a=C($,x[e(746)],x.gift_settings),i=A(a[e(767)],x.condition_relationship);if(i){let r=t[e(731)]($=>$[e(484)]?.[e(514)]()===x.id?.[e(514)]())[e(734)](($,x)=>$+x.quantity,0);a.max_gifts_can_get=a[e(723)]-r,x[e(777)]=t,x[e(785)]=a[e(723)]}else x[e(777)]=t,x[e(785)]=0;return typeof FGSECOMAPP.maxOfferPriority===e(582)&&x[e(464)]>FGSECOMAPP[e(414)]&&(i=!1),i||!x[e(836)]||FGSECOMAPP[e(414)]!==x.priority||p(t)||(FGSECOMAPP[e(414)]=null),x[e(505)]=i,x[e(836)]&&i&&(null==FGSECOMAPP[e(414)]||x[e(464)]<=FGSECOMAPP[e(414)])&&FGSECOMAPP[e(414)]!==x[e(464)]&&(FGSECOMAPP[e(414)]=x[e(464)]),x},E=$=>{let x=_0x5e6743,e=$+"=",t=decodeURIComponent(document[x(473)])[x(638)](";");for(let a=0;a{let e=_0x5e6743,t=!0,a=!0,i=!0;if(!p($[e(461)]?.[e(477)])){let r=E("sca_fg_codes");t=r&&JSON[e(567)](r)[e(615)]($[e(461)].specific_link_address)}if(!p($[e(461)]?.[e(642)])){let{customer_tags:n}=$.sub_conditions,c=n?.[e(507)]?.some($=>x[e(688)].tags?.[e(615)]($));a=n?.[e(426)]===e(685)?c:!c}if(!p($.sub_conditions?.customer_order_history)){let o=!0,d=$[e(461)][e(564)],s=x[e(688)][e(824)]??[];if(d[e(420)]){let l=Date.parse(d.order_created_from)/1e3;s=s[e(731)]($=>$.created_at>=l)}if(!p(d?.[e(633)])&&(0!==d[e(646)].min_amount||0!==d.total_spend_on_order_history[e(682)])){let f=d[e(646)][e(670)],_=d[e(646)][e(682)],u=s[e(734)](($,x)=>$+x[e(771)],0)/100;o&=(u>=f||!f)&&(u<=_||!_)}if(!p(d?.[e(580)])&&(0!==d[e(580)][e(670)]||0!==d[e(580)][e(682)])){let g=x[e(688)][e(827)]/100,b=d[e(580)][e(670)],h=d[e(580)][e(682)];o&=(g>=b||!b)&&(g<=h||!h)}if(!p(d?.number_of_order)){let m=!(0!==d[e(692)][e(670)]||0!==d.number_of_order[e(682)]),v=s[e(644)],y=d[e(692)][e(670)],w=d[e(692)][e(682)];o&=m?p(s):(v>=y||!y)&&(v<=w||!w)}if(d?.have_not_got_gift_from_this_offer){let k=x[e(688)][e(428)]??[],C=$.gift_items?.[e(635)]($=>k.includes($.variant_shopify_id))||$[e(487)]?.[e(635)]($=>k[e(615)]($.original_variant_shopify_id+"_"+($[e(647)]-$[e(575)])*100));o&=!C}i=o}return t&&a&&i},I=($,x,e)=>{let t=_0x5e6743,a=[],i=[],r=[],c=[];for(let o of x){let d=q($,o);if(!d[t(505)]){d[t(777)][t(644)]>0&&d[t(777)][t(817)]($=>{let x=t;i[x(566)]({variant_id:$[x(589)],quantity:$[x(532)],offer_id:o.id})});continue}if(d[t(785)]<0){d.giftsAdded[t(817)]($=>{let x=t;i[x(566)]({variant_id:$[x(589)],quantity:$[x(532)],offer_id:o.id})});continue}0!==d[t(785)]&&(o[t(461)]?L(o,SECOMAPP)&&a[t(566)](o):a[t(566)](o))}if($?.forEach($=>{let x=t;p($.belongs_to_offer)&&n($)&&i[x(566)]({variant_id:$[x(589)],quantity:$[x(532)],offer_id:$[x(484)]?.[x(514)]()})}),e||p(i)){let s=a[t(482)]($=>{let x=t;return{id:$.id,offerName:$[x(454)],offerPriority:$[x(464)],stopLowerPriority:$[x(836)],gifts:T($),giftsAvailable:$[x(785)],giftsAdded:$[x(777)],isReachConditions:$[x(505)]}});if(!p(s)){let l={};for(let f of s){let _=O(FGSECOMAPP[t(565)],f);_?.[t(644)]>0?r=r.concat([..._]):f[t(550)][t(482)]($=>{let x=t;l[$[x(729)]]={...$,belongs_to_offer:f.id?.[x(514)]()}})}c=Object[t(435)](l)??[]}}return{arrGiftsAdd:r,arrGiftsRemove:i,arrGiftsData:c}},G=($,x)=>{let e=_0x5e6743,t=new Set;return $?.[e(817)]($=>t.add($.offer_id)),t[e(817)]($=>{let x=e,t=FGSECOMAPP[x(569)]?.[x(415)](e=>e.id?.[x(514)]()===$?.[x(514)]());if(p(t)||!t[x(505)]){FGSECOMAPP[x(666)]=FGSECOMAPP[x(666)]?.[x(731)](e=>e.belongs_to_offer?.[x(514)]()!==$?.[x(514)]());return}if(t.giftsAvailable>=0)return;let a=[],i=FGSECOMAPP[x(666)]?.[x(731)](e=>e[x(484)]?.[x(514)]()===$?.toString())??[];if(t?.gift_settings?.auto_add_all_gifts)a=a[x(675)]([...i]),t[x(785)]=0;else for(let r of i){if(t[x(785)]>=0)break;t[x(785)]+=r[x(532)],t[x(785)]<=0?a[x(566)]({...r}):(r[x(532)]=t[x(785)],t.giftsAvailable=0)}a?.[x(817)]($=>{let e=x;FGSECOMAPP[e(666)]=FGSECOMAPP.arrOfferAdded?.[e(731)](x=>$[e(608)]!==x[e(608)]||$[e(484)]?.[e(514)]()!==x[e(484)]?.[e(514)]())})}),x?.filter($=>{let x=e;return n($)&&($[x(532)]=FGSECOMAPP[x(666)]?.[x(731)](e=>$[x(589)]===e[x(608)])?.reduce(($,x)=>$+x.quantity,0)??0),$[x(532)]>0})??[]},P=async($,x)=>{let e=_0x5e6743,{arrGiftsAdd:t,arrGiftsRemove:a,arrGiftsData:i}=I($,x,!1),r=G(a,$);if(!p(a)){let n=I(r,x,!0);G(n?.[e(714)],$),t=n?.[e(544)],a=a?.[e(675)](n?.arrGiftsRemove)??[],i=n?.[e(629)]}return await c(t,a),i},O=($,x)=>{let e=_0x5e6743,t=[];if($[e(761)]){let a=x[e(550)],i=a[e(734)](($,x)=>$+x[e(592)].length,0),r=FGSECOMAPP[e(569)][e(731)]($=>$.id===x.id),n=r[0].gift_settings.auto_add_all_gifts,c=r[0][e(579)];if(1===i||n||c[e(684)]){if($[e(793)]&&!D(a)||$?.[e(643)]&&!H(a))return!1;if(c[e(684)]){if(c.type===e(783)){let o=FGSECOMAPP.cartItems;o=o[e(731)]($=>{let x=e;return $[x(822)]===a[0][x(536)]});let d=a[0][e(592)][e(731)]($=>{let x=e;return o[0][x(589)]===$[x(681)]})[0];if(0===d[e(575)]&&100===parseInt(d.discount_percentage))return t[e(566)]({variant_id:d.variant_shopify_id,quantity:x.giftsAvailable,offer_id:x.id}),t}else if(n){let s=a?.reduce(($,x)=>($+x?.variants?.[e(644)])??0,0);if(!s)return!1;let l=(x?.[e(785)]??0)/s;for(let f of a)for(let _ of f[e(592)])t[e(566)]({variant_id:_[e(676)],quantity:l,offer_id:x.id});return t}}else{if(n){let u=a?.[e(734)](($,x)=>($+x?.[e(592)]?.[e(644)])??0,0);if(!u)return!1;let p=(x?.[e(785)]??0)/u;for(let g of a)for(let b of g[e(592)])t[e(566)]({variant_id:b[e(676)],quantity:p,offer_id:x.id});return t}{let h=a[0][e(592)][0];if(0===h.price&&100===parseInt(h[e(721)]))return console.log(e(581)+a[0].variants[0].variant_shopify_id+" "+a[0].variants[0][e(506)]),t[e(566)]({variant_id:h[e(676)],quantity:x[e(785)],offer_id:x.id}),t}}}}return!1},R=$=>"Default Title"===$,j=$=>{let x=_0x5e6743,e=$;if(FGSECOMAPP[x(690)][x(840)]===x(715))for(let t of(e=[],$)){let a=t.variants;a&&a[x(644)]&&a[x(817)]($=>e[x(566)]({...t,thumbnail:$[x(660)],variants:[$]}))}let i=document[x(501)](x(503));i&&(i[x(810)]=e.map($=>{let e=x,t=$?.[e(592)][0]??{};return e(807)+_($[e(536)],$[e(497)])+e(792)+$[e(660)]+'" alt="">\n

'+u($[e(536)],$[e(424)])+e(413)+(FGSECOMAPP[e(690)][e(840)]===e(715)&&FGSECOMAPP[e(690)][e(762)]?e(655)+(1===$[e(592)][e(644)]?e(527)+(R(t.variant_title)?e(697):"")+e(480)+t[e(506)]+e(439):''+(FGSECOMAPP[e(690)][e(739)]??"Select variant")+"")+e(701):"")+'\n \n

\n
\n
\n \n '+f($[e(536)],t?.[e(681)],t?.original_price)+e(522)+l(t)+e(705)+(FGSECOMAPP[e(690)][e(840)]!==e(715)?e(718)+(1===$[e(592)][e(644)]?e(527)+(R(t[e(506)])?e(697):"")+'">'+t[e(506)]+e(574):''+(FGSECOMAPP[e(690)][e(739)]??e(442))+"")+'\n \n
\n
\n\n "+($?.length>=4?x(755):"")+'\n
\n
\n
\n ');let a=x(600)+g(x(535)),i=document[x(445)](a)??document.querySelector(x(478));if(!i)return;i[x(431)][x(651)][x(513)]=x(524),i[x(431)].style[x(742)]=x(664),i[x(431)]?.[x(844)]?.[x(615)](x(508))||i[x(431)]?.[x(554)]?.[x(652)](x(508));let r=i.parentNode[x(445)](x(710));if(r)r[x(810)]=t;else{(r=document[x(560)](x(653))).setAttribute("id",x(488));let n=new DOMParser()[x(782)](t,"text/html");r.innerHTML=n[x(620)][x(810)],i.parentNode[x(525)](r,i)}i[x(431)][x(525)](r,i);let c=document.querySelector(x(539));if(c)switch(e[x(624)]?.[x(469)]){case"32":c.style.maxWidth="50%";break;case"50":c[x(651)][x(476)]=x(586);break;case x(649):c[x(651)][x(476)]=x(591);break;case"160":c[x(651)][x(476)]=x(625);break;case"240":c[x(651)].maxWidth="100%";break;default:c[x(651)][x(476)]="60%"}if($?.[x(644)]>=4)new Glider(document[x(445)](x(607)),{slidesToShow:3,slidesToScroll:1,draggable:!0,dots:x(808),arrows:{prev:"#fg-gift-thumbnail-title .glider-prev",next:"#fg-gift-thumbnail-title .glider-next"}});else{c&&(c[x(651)].maxWidth="100%");let o=document[x(445)](x(607));o&&(o.style[x(449)]=x(790))}},$0=()=>{let $=_0x5e6743,x=FGSECOMAPP.fgAppearanceGiftIcon[$(568)]??{},e="";x[$(717)]?.[$(684)]&&(e=$(423)+FGSECOMAPP[$(751)][$(839)]+$(421));let t=$(605)+g($(543)),a=document[$(445)](t)??document[$(445)]($(639));if(!a)return;a.style[$(696)]=$(483),a[$(651)][$(513)]="fit-content",a[$(844)]?.[$(615)]($(540))||a[$(554)]?.[$(652)]($(540));let i=a[$(445)]($(820));if(i)i.innerHTML=e;else{(i=document[$(560)]($(653)))[$(743)]("id","sca-gift-icon");let r=new DOMParser().parseFromString(e,$(614));i[$(810)]=r[$(620)][$(810)],a.appendChild(i)}},$e=()=>{let $=_0x5e6743,x=[],e=$(517)+g($(779));return document[$(728)](e)[$(817)](e=>{let t=$,a=e[t(445)](t(774)),i=a?.[t(537)]("href")?.split("/")??[],r=i?.[t(455)](t(784)),c=r>=0?i[r+1]??null:null;if(c=c?.[t(638)]("?")?.[t(578)](),n(c)){e[t(516)]();return}let o=e[t(445)](t(602));if(o){e[t(516)]();return}if(p(c))return;let d=decodeURI(c);p(FGSECOMAPP[t(547)][d]?.[t(619)])&&x[t(566)](d),FGSECOMAPP.productsInPage[d]={...FGSECOMAPP[t(547)][d],position:e}}),x},$t=$=>{let x=_0x5e6743;Object[x(754)]($)?.[x(817)]($=>{let e=x,t=FGSECOMAPP[e(547)][$]?.position;if(!t)return;let a=FGSECOMAPP[e(751)].collection_page??{},i="";a.status&&(i='\n {let x=_0x5e6743;await e(SECOMAPP[x(494)]+x(585)+LZString.compressToEncodedURIComponent(JSON[x(798)]($)),{method:"GET",headers:{"Content-Type":x(438)}})[x(456)](async $=>{let e=x,t=await $[e(823)](),a=[];t?.[e(784)]?.[e(817)]($=>{let x=e;p($?.products?.id)||a[x(566)]({...$[x(784)],collections:$[x(772)],variants_quantity:$.variants_quantity})});let i=$$(a);$t(i)})[x(789)]($=>{console.error($)})},$i=async $=>{let x=_0x5e6743,e=[];for(let[t,a]of $[x(617)]())p(FGSECOMAPP[x(547)][a]?.[x(619)])&&e[x(566)](a),20===e[x(644)]&&(await $a([...e]),e=[]),t===$[x(644)]-1&&e[x(644)]>0&&(await $a([...e]),e=[])},$r=()=>{let $=_0x5e6743,x=$e(),e=$$();$t(e),$i(x)[$(456)]()},$n=()=>{let $=_0x5e6743;Shopify?.[$(447)]&&document[$(595)]($(654),function(){let x=$,e=new URL(document.URL),t=parseInt(e[x(814)][x(417)]("variant"));$c(isNaN(t)?void 0:t)})},$c=$=>{let x=_0x5e6743;if(!location[x(500)].includes("/products/"))return;document[x(445)](x(820))?.[x(516)](),document[x(445)](x(710))?.remove();let e=$$();if(p(e))return;let t=location.pathname[x(638)]("/"),a=t?.[x(455)](x(784)),i=decodeURI(a>=0?t[a+1]??null:null);if(!Object.keys(e)?.[x(615)](i))return;let r=e[i],n=FGSECOMAPP[x(547)][i]?.[x(542)]??[];!(Shopify?.enable_check_variants_has_gift&&(!p($)&&!n[x(615)]($)||p($)&&!p(Shopify?.current_product?.[x(470)])&&!n.includes(Shopify?.[x(673)]?.[x(470)]?.id)))&&($x(r),$0(r))};FGSECOMAPP[_0x5e6743(773)]=$=>{let x=_0x5e6743;try{p($)&&($=[...FGSECOMAPP[x(569)]]);let e=location[x(500)][x(615)](x(609)),t=[];if($?.[x(817)]($=>{let e=x;if($[e(505)]||p($.promotion_message)||!p(FGSECOMAPP[e(414)])&&!$.isReachConditions&&$[e(836)]&&$.priority>FGSECOMAPP[e(414)])return;let a=$[e(796)];if(a[e(615)](e(694))&&1===$[e(746)][e(644)]&&"money"===$[e(746)][0][e(687)]){if($[e(505)])return;{let i=0,r=FGSECOMAPP[e(750)],n=$[e(746)][0].product_narrow;for(let c in r)if(!r[c][e(484)]){if(p(n))i+=r[c].price/100*r[c][e(532)];else{let o=r[c],d=!0;n?.forEach($=>{let x=e;if(!d)return!1;switch($[x(683)]){case x(640):d=Object[x(754)]($.value)[x(615)](o[x(822)][x(514)]());return;case"product_types":d=Object[x(754)]($[x(471)]).includes(o[x(628)]);return;case x(716):d=Object[x(754)]($[x(471)])[x(615)](o[x(472)]);return;case x(788):let t=Object[x(754)]($.value),a=o[x(772)]?.map($=>$.id+"")?.[x(731)]($=>t.includes($));d=!p(a);return;default:d=!1;return}}),d&&(i+=o[e(575)]/100*o[e(532)])}}let s=($[e(746)][0].min_amount-i)[e(667)](2);a=a[e(498)](e(694),s)}}if(a[e(615)](e(648))&&1===$[e(746)].length&&$[e(746)][0][e(687)]===e(596)){if($.isReachConditions)return;{let l=$[e(746)][0].min_amount,f=FGSECOMAPP[e(750)];for(let _ in f){let u=$[e(746)][0].product_narrow;if(p(u))l-=f[_][e(532)];else{let g=f[_],b=!0;u?.forEach($=>{let x=e;if(!b)return!1;switch($.type){case x(640):b=Object[x(754)]($.value).includes(g[x(822)][x(514)]());return;case x(546):b=Object[x(754)]($.value)[x(615)](g[x(628)]);return;case x(716):b=Object[x(754)]($.value)[x(615)](g[x(472)]);return;case"product_collections":let t=Object.keys($[x(471)]),a=g[x(772)]?.[x(482)]($=>$.id+"")?.[x(731)]($=>t[x(615)]($));b=!p(a);return;default:b=!1;return}}),b&&(l-=g[e(532)])}}a=a.replace(e(648),l)}}t[e(566)]({promotion_message:a})}),t=t?.[x(644)]?t:null,p(t)){document.querySelectorAll(".sca-promotion-message-layout")[x(817)]($=>$[x(810)]="");return}let a="",i=x(821)+t?.[x(482)]($=>'

'+$[x(796)]+x(776))[x(457)]("")+x(709);FGSECOMAPP.fgAppearancePromotionMessage[x(768)]&&(a=i);let r=document[x(445)]("#MainContent, #mainContent, #main, .main-content"),n=r?.[x(445)](x(491)),c=document[x(728)](x(468)+g("sca_fg_main_promotion_message_query")),o=document.querySelectorAll(x(515));if(p(o)){(o=document[x(560)]("div")).setAttribute("id",x(463)),o[x(554)][x(652)](x(463));let d=new DOMParser()[x(782)](a,x(614));o[x(810)]=d[x(620)].innerHTML,p(c)?(d=new DOMParser()[x(782)](a,x(614)),o[x(810)]=d[x(620)].innerHTML,r&&n&&e?n[x(416)](o):r&&e&&r.prepend(o)):c?.[x(817)]($=>{let e=x,t=o[e(492)](!0);$.prepend(t)})}else o[x(817)]($=>$[x(810)]=a);try{document[x(728)](x(795)).forEach($=>{let x=new Glider($);(($,x)=>{let e=_0x4d33,t=$[e(804)][e(753)],a=null,i=1;function r(){a=setTimeout(()=>{let x=_0x4d33;i>=t&&(i=0),$[x(809)](i++)},3e3)}$[e(529)].addEventListener(e(590),function(){window[e(707)](a),r()}),r()})(x,3e3)})}catch(s){console[x(636)](s)}}catch(l){console[x(636)](l)}},B(FGSECOMAPP[_0x5e6743(750)]).then()}}catch($o){console.log(_0x5e6743(724),$o)}