window.fgData={"offers":[],"settings":{"auto_add_gift":false,"compare_gift_price_with_product":false,"cal_gift_discount":"current_price","select_one_gift_price":true,"not_show_gift_if_already_on_cart":false,"sync_quantity":"stop_offer","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":"Pick Your Free 100g SPD\u2122 Treat!","add_to_cart_btn_title":"Add to cart","running_text":"","select_gift_btn":"Select variants","show_product_title":true,"show_variant_title":false,"show_pagination":true,"show_gift_for_customer":"by_variants","number_product_slider":4},"color":{"gift_slider_title_color":"#000000","product_title_color":"#000000","original_price_color":"#121212","discounted_price_color":"#DD2A22","add_to_cart_color":"#FFFFFF","add_to_cart_btn_color":"#DD2A22"},"others":{"hidden_brand_mark":true},"disable_slider_checkbox":{"enable":true,"time":10,"text":"Please don't show this offer again. *One Free 100g Treat per order."}},"gift_icon":{"gift_icon_path":"images\/fg-icons\/fg-icon-green.png","shopify_gift_icon_path":"fg-icon-green.png","product_page":{"gift_icon":{"status":false,"size":"100"},"gift_thumbnail":{"status":false,"size":"160","title":"Free 100g SPD Treat"}},"collection_page":{"status":false,"size":"160"}},"promotion_message":{"show_on_cart_page":false,"text_color":"#ffffff","background_color":"#F72119"}}};/* END_FG_DATA */ const _0xd2710e=_0x58cd;function _0x58cd($,x){let e=_0x589d();return(_0x58cd=function($,x){return e[$-=141]})($,x)}function _0x589d(){let $=["/cart/change","fg_decimal","variants_ids","log","src",".freegifts-main-container .glider-next","target","secomappGetCartRunning","substring","type","#82868b",".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 ","customer","remove","sca_offers_added","checkIsBlockCheckout","unshift","sca_fg_cart_drawer_query","getCart","2387815LkNvDB","collections","shopify_cart","application/json;","mode_override_checkout","position","isUpdateCart","select_gift_btn","XMLHttpRequest","type_customer_tags","Add to cart","data-price","",".fg-secomapp-cart-icon ","GET","/cart/update","pathname","\n \n\n ","handle","#fg-gift-thumbnail-title","
\n ","secomapp_freegifts_version","classList","hidden_brand_mark","variants","USD","promotion_message",'" data-original-id="','\n \xab\n \xbb\n ',"length","FGSECOMAPP","fgData","show_variant_title","parentNode","setItem","sync_quantity","freegifts-main-page-container","clone_product_handle","cookie","/products/","preventDefault","value","cart","product_has_icon","267382FylDhx","fg_codes","sca-fg-icon-collection-page","quantity",".sca-promotion-glider","catch","discount_percentage","flex","stop_lower_priority","concat","sca-gift-icon-collection-page","invoice_url","original_product_shopify_id",'\n\n ',"open",".selected-variant","relative","others","giftsAdded","\n
","disabled","innerHTML","fetchCheckoutEvents","reload","click","product_type","auto","15AyTSHd","/cart","Select your free gift!","status","\n',"product_page","width","3.0","sca_add_gift","cal_gift_for_other_rules","scaCountRenderEventCheckout","format","number_of_order","Free Gift","addEventListener","number_of_gift_can_receive","appearance","min_amount","sca-gift-thumbnail","70%",".fg-secomapp-cart-drawer ","4220392ohLGLy","settings",".fg-secomapp-cart-item-promotion ",'\n \n \n
'+p($[e(388)],$[e(298)])+e(352)+(FGSECOMAPP[e(293)].show_gift_for_customer===e(492)&&FGSECOMAPP[e(293)][e(364)]?e(403)+(1===$[e(356)][e(361)]?e(174)+(R(t[e(501)])?e(593):"")+'">\n '+t[e(501)]+" \n ":e(578)+(FGSECOMAPP[e(293)][e(339)]??"Select variant")+e(344))+e(409):"")+e(256)+u($[e(388)],t?.[e(303)],t?.original_price)+e(449)+f(t)+e(390)+(FGSECOMAPP[e(293)][e(312)]!==e(492)?e(533)+(1===$[e(356)][e(361)]?e(174)+(R(t[e(501)])?e(593):"")+'">'+t[e(501)]+e(344):e(578)+(FGSECOMAPP[e(293)][e(339)]??e(518))+e(344))+e(230)+l($[e(356)],$[e(497)])+e(477):"")+e(525)+$.belongs_to_offer+e(516)+(1===$[e(356)][e(361)]?t[e(599)]:"")+'">\n '+(FGSECOMAPP[e(293)][e(258)]??e(342))+e(563)})[x(192)](" \n"),new Glider(document[x(520)]("#fg-gift-items"),{slidesToShow:1,slidesToScroll:1,draggable:!1,dots:FGSECOMAPP[x(293)][x(145)]?x(598):null,arrows:{prev:x(485),next:x(318)},responsive:[{breakpoint:1024,settings:{slidesToShow:FGSECOMAPP[x(293)][x(455)]??4,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]}))},j=()=>{let $=_0xd2710e;try{let x=window[$(363)]?.[$(561)]??[];for(let e in Shopify?.[$(511)])g(Shopify?.[$(511)][e]?.id)&&delete Shopify?.[$(511)][e];let t=[];return x.forEach(x=>{let e=$,a=JSON[e(515)](JSON.stringify(x));if(x.gift_should_the_same[e(420)]){let i=x[e(220)][0][e(302)],_=i[0][e(373)],r=[...a[e(438)]],c=[...a[e(277)]];if(x.gift_should_the_same[e(322)]===e(257))for(let n in _){let o=_[n]?.[e(257)]??[];for(let d of o){a[e(220)][0][e(302)]=[{type:i[0][e(322)],value:{[n]:{..._[n],variant:[{...d}]}}}],a[e(438)]=r.filter($=>$[e(388)]+""===n&&d.id===$[e(303)]),a[e(277)]=c[e(443)]($=>$.original_product_shopify_id+""===n),a[e(277)][0][e(356)]=[...a[e(438)]];let s=a[e(265)][e(247)],l=a.gift_settings.auto_add_all_gifts;a.gift_settings[e(266)]&&(s=a[e(438)][e(361)]),1===a[e(438)][e(361)]&&0===a[e(438)][0][e(439)]&&(l=!0),t.push(JSON[e(515)](JSON[e(596)]({...a,gift_settings:{...a[e(265)],number_of_gift_can_receive:s,auto_add_all_gifts:l},id:a.id+"_"+_[n][e(350)]+"_"+d.id})))}}else if(x[e(209)][e(322)]===e(503))for(let f in _){a[e(220)][0].product_narrow=[{type:i[0][e(322)],value:{[f]:_[f]}}],a[e(438)]=r[e(443)]($=>$[e(388)]+""===f),a[e(277)]=c[e(443)]($=>$[e(388)]+""===f);let u=a[e(265)].number_of_gift_can_receive,b=a[e(265)][e(266)];a[e(265)][e(266)]&&(u=a[e(438)][e(361)]),1===a.gift_items.length&&0===a.gift_items[0][e(439)]&&(b=!0),t[e(191)](JSON[e(515)](JSON[e(596)]({...a,gift_settings:{...a[e(265)],number_of_gift_can_receive:u,auto_add_all_gifts:b},id:a.id+"_"+_[f].handle})))}}}),(x=(x=(x=x?.[$(443)](x=>!x?.gift_should_the_same?.[$(420)])?.[$(385)](t))?.[$(446)]($=>({...$,id:$.id.toString()})))?.filter(x=>{let e=$;if(!X(x[e(450)],x.end_time))return!1;let t=!g(x[e(481)]?.[e(575)]||x[e(481)]?.[e(178)]);if(x[e(481)]&&(!L(x,SECOMAPP)||t&&g(SECOMAPP.customer[e(556)])))return!1;let a={...Shopify?.[e(511)]},i=!1;if("stop_offer"===FGSECOMAPP[e(584)][e(367)]){x[e(438)]=x?.[e(438)].filter($=>{let x=e,t=a[$[x(388)]]?.variants_quantity??{};return t[$[x(303)]]>0})??[];let _=x[e(438)]?.[e(446)]($=>$[e(599)]);x[e(277)]=x?.[e(277)]?.[e(443)]($=>{let x=e;return $[x(356)]=$?.[x(356)]?.filter($=>{let e=x;return _?.includes($[e(599)])}),$?.[x(356)]?.length>0}),i=!0}else if(FGSECOMAPP[e(584)][e(170)]){x[e(438)]=x?.[e(438)][e(443)]($=>{let x=e,t=a[$[x(432)]]?.[x(539)]??{};return t[$[x(599)]]>0});let r=x[e(438)]?.[e(446)]($=>$[e(599)]);x[e(277)]=x?.gift_products?.filter($=>{let x=e;return $.variants=$?.[x(356)]?.[x(443)]($=>{let e=x;return r?.[e(297)]($[e(599)])}),$?.[x(356)]?.[x(361)]>0}),i=!0}return i&&x[e(265)]?.[e(266)]&&(x[e(265)][e(247)]=x[e(438)]?.[e(361)]),!i||x[e(438)]&&x[e(438)][e(361)]>0}))?.[$(446)](x=>{let e=$,t=x[e(438)][e(446)]($=>$.original_product_shopify_id);return x.gift_products=x[e(277)]?.[e(443)]($=>{let x=e;return t[x(297)]($[x(388)])}),x[e(220)]?.forEach($=>{let x=e;"money"===$[x(595)]&&($[x(249)]=v($.min_amount),$.max_amount=g($.max_amount)?$.max_amount:v($.max_amount))}),x})}catch(a){return console[$(604)](a),[]}},F=$=>{let x=_0xd2710e;for(let e of FGSECOMAPP.cartItems){let t=e[x(162)];if($[0][x(388)]===t)return!1}return!0},N=$=>{let x=_0xd2710e;for(let e of FGSECOMAPP[x(155)]){let t=$[0].variants[0][x(282)];if("compare_at_price"===FGSECOMAPP[x(584)].compare_gift_price_with_product&&(t=$[0][x(356)][0][x(434)]),t>e[x(439)]/100)return!1}return!0},B=async()=>{let $=_0xd2710e;try{let x=[];window[$(363)]?.offers?.forEach(e=>{let t=$,a=[];e[t(277)][t(524)]($=>{let x=t;a.push($[x(369)],$[x(284)])}),x=[...x,...a]}),await $n(x=(x=[...new Set(x)]).filter($=>g(FGSECOMAPP.productsInPage[$]))),Object[$(310)](FGSECOMAPP.productsInPage)?.[$(524)]($=>{let{info:x}=$;g(x)||g(x?.id)||(Shopify.products[x.id]={...x})})}catch(e){console[$(604)](e)}},z=async $=>{let x=_0xd2710e;m(),FGSECOMAPP[x(412)](),FGSECOMAPP?.[x(584)]?.sync_quantity==="stop_offer"||FGSECOMAPP?.[x(584)]?.manual_input_inventory?await B():B()[x(184)](),FGSECOMAPP[x(561)]=j(),FGSECOMAPP[x(263)](),a();try{g($)?(FGSECOMAPP.arrOfferAdded=[],localStorage[x(366)](x(327),LZString[x(294)](JSON.stringify(FGSECOMAPP[x(186)])))):FGSECOMAPP[x(186)]=JSON[x(515)](LZString[x(554)](localStorage[x(142)](x(327))))}catch(e){FGSECOMAPP[x(186)]=[],localStorage[x(366)]("sca_offers_added",LZString[x(294)](JSON[x(596)](FGSECOMAPP.arrOfferAdded)))}let t={};FGSECOMAPP.offers?.[x(524)]($=>{let e=x;t[$.id]=$?.[e(438)]?.map($=>$[e(599)])});let i=Object[x(553)](t);FGSECOMAPP.arrOfferAdded=FGSECOMAPP[x(186)]?.filter($=>i?.[x(297)]($[x(179)]?.[x(276)]())&&t[$[x(179)]?.[x(276)]()][x(297)]($[x(473)]));let _={};FGSECOMAPP[x(186)]?.forEach($=>{let e=x,t=_[$.belongs_to_offer+"_"+$[e(473)]]??{};_[$[e(179)]+"_"+$[e(473)]]={...$,belongs_to_offer:$[e(179)]?.[e(276)](),quantity:(t?.[e(379)]??0)+($?.[e(379)]??0)}}),FGSECOMAPP[x(186)]=Object[x(310)](_),localStorage[x(366)]("sca_offers_added",LZString[x(294)](JSON.stringify(FGSECOMAPP[x(186)])));let r=await M($,FGSECOMAPP[x(561)]);W(r),$d(),$s(),$o()},U=function(){let $=_0xd2710e,x=document[$(521)]("[data-open]"),t=document[$(521)]("#freegifts-main-popup-container [data-close]"),a=$(226),i=document[$(521)]($(217)),_=i[$(361)];for(let r=0;r<_;r++)g(i[r][$(457)]($(426)))&&(i[r][$(410)]=!0,i[r][$(428)][$(552)]=$(323));for(let n of x)n.addEventListener("click",function(){let x=$,e=this[x(223)][x(404)];document.getElementById(e)[x(354)][x(305)](a)});for(let o of t)o[$(246)]($(414),function(){let x=$;this[x(460)][x(460)][x(354)][x(326)](a),e()});document[$(246)]($(414),x=>{let t=$;x.target===document[t(520)]("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg")&&(document.querySelector("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg")[t(354)][t(326)](a),e())}),document[$(246)]($(221),x=>{let t=$;"Escape"===x.key&&document[t(520)](t(267))&&(document[t(520)]("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg")[t(354)][t(326)](a),e())}),document[$(521)]($(513))[$(524)](x=>x.addEventListener("click",function(){let x=$;this[x(259)]("tabindex",1),this.focus(),this[x(354)][x(590)]("active"),this[x(520)](x(594))[x(354)][x(590)](x(290))})),document[$(521)]($(513)).forEach(x=>document.addEventListener($(414),function(e){let t=$,a=x[t(231)](e[t(319)]);a||(x[t(354)][t(326)](t(232)),x.querySelector(t(594))[t(354)].remove("d-block")),document[t(521)](t(229))[t(524)]($=>{let x=t;$.disabled=!0,$[x(428)][x(552)]="#82868b"})})),document.querySelectorAll("#fg-gift-items .dropdown > .dropdown-menu > li").forEach(x=>{let e=$;x[e(246)]("click",function(){let $=e,x=this.getAttribute("id"),t=this[$(457)]($(193)),a=this.getAttribute($(343)),i=this[$(457)]($(304)),_=this[$(457)]("data-original-id"),r=this[$(460)][$(460)][$(460)][$(460)];r.querySelector($(189)).setAttribute($(317),t);let c=new URL(r[$(520)]($(530))[$(151)]);c[$(557)][$(288)]("variant",_),r[$(520)]($(530))[$(151)]=c.toString();let n=this[$(460)][$(460)].parentElement;n[$(520)]($(224))[$(261)]=i,n[$(520)]($(467))[$(261)]=a;let o=n?.[$(520)]($(547));o[$(259)]($(426),x),o.disabled=!1,o[$(428)]="";let d=this[$(460)][$(460)].querySelector($(405));d[$(354)].add($(232)),d[$(411)]=this[$(581)]})}),document[$(521)]("#fg-gift-items .btn-add-to-cart")[$(524)](x=>x[$(246)]("click",async function(){let x=$,e=this.getAttribute(x(426))-0,t=this[x(457)]("data-offer");try{await c(e,1,t);let i=document[x(520)](x(267));i&&i[x(354)][x(326)](a),window[x(444)][x(151)][x(297)](x(418))?location.reload():typeof Shopify?.getCart===x(469)&&await Shopify?.[x(331)](0===FGSECOMAPP[x(210)][x(361)]?function(){}:FGSECOMAPP.fgCallback[0])}catch(_){console[x(604)](_)}}))},X=($,x)=>{let e=_0xd2710e;if($){let t=new Date,a=t[e(175)](),i=new Date($)[e(175)]();if(!x)return a>=i;{let _=new Date(x)[e(175)]();return a>=i&&a<=_}}return!1},W=$=>{let x=_0xd2710e;if(FGSECOMAPP[x(584)]?.[x(397)])for(let e of FGSECOMAPP.cartItems)n(e)&&($=$[x(443)]($=>$[x(432)]!==e[x(162)]));if(FGSECOMAPP[x(584)]?.[x(494)])for(let t of FGSECOMAPP[x(155)])$=$.filter($=>$[x(388)]!==t[x(162)]);if(FGSECOMAPP[x(584)]?.[x(559)])for(let a of FGSECOMAPP[x(155)])$=$[x(443)]($=>{let e=x,t=$[e(356)][0][e(282)];return FGSECOMAPP[e(584)]?.[e(559)]===e(153)&&(t=$.variants[0][e(434)]),t<=a[e(439)]/100});$&&$[x(361)]>0&&(s(),D($)),U(),FGSECOMAPP[x(412)](),FGSECOMAPP[x(427)](FGSECOMAPP[x(561)]),V=[]},Y=async $=>{let x=_0xd2710e;V=[];let e=window[x(444)][x(151)],a=await t(e,{method:"GET"});await a[x(549)]().then($=>{let e=x,t=new DOMParser,a=t[e(154)]($,e(570)),i=e(252)+h(e(330)),_=e(345)+h(e(571)),r=document[e(520)](i);r||(r=document.querySelector("#CartDrawer .drawer__inner"));let c=!1;r&&(c=!0,r[e(411)]=a[e(520)](i)?.innerHTML??a[e(520)](e(464))?.[e(411)]??r[e(411)]);let n=document[e(520)](_);n||(n=document[e(520)]("#shopify-section-header #cart-icon-bubble, .shopify-section.section-header #cart-icon-bubble")),n&&(c=!0,n[e(411)]=a[e(520)](_)?.innerHTML??a[e(520)](e(512))?.[e(411)]??n[e(411)]),c||console.log(e(228))}),typeof FGSECOMAPP?.[x(536)]===x(469)&&await FGSECOMAPP[x(536)](),setTimeout(function(){W($)},800)},J=async()=>{let $=_0xd2710e;try{await t(SECOMAPP.freegiftProxy,{method:$(346),headers:{"Content-Type":"application/liquid"}})[$(184)](async x=>{let e=$,t=await x[e(166)]();FGSECOMAPP.cartItems=t?.cart?.[e(446)]($=>{let x=e;return{...FGSECOMAPP[x(155)]?.[x(202)](x=>x.id===$.id),...$[x(503)],collections:$[x(333)],tags:$[x(555)]}})??[],FGSECOMAPP[e(543)]=t?.[e(334)]??{}})[$(381)](async x=>{let e=$;console[e(604)](e(532)+x[e(478)]);let a=await t(e(278),{method:e(346),headers:{Accept:"application/json","Content-Type":e(205)}}),i=await a[e(166)](),_=i[e(270)];FGSECOMAPP[e(543)]=i,FGSECOMAPP[e(155)]=_?.map($=>{let x=e;return{...FGSECOMAPP.cartItems?.[x(202)](x=>x.id===$.id),...$}})??[]})}catch(x){console[$(604)]($(580),x.message);let e=await t("/cart.js",{method:$(346),headers:{Accept:$(205),"Content-Type":$(205)}}),a=(await e[$(166)]()).items;FGSECOMAPP[$(155)]=a?.[$(446)](x=>{let e=$;return{...FGSECOMAPP[e(155)]?.[e(202)]($=>$.id===x.id),...x}})??[]}},V=[],Z=async $=>{let x=_0xd2710e;try{$===x(278)?V.push("/cart/change.js"):V.push($[0]),await J();let e=await M(FGSECOMAPP[x(155)],FGSECOMAPP[x(561)]);FGSECOMAPP[x(427)](FGSECOMAPP.offers);let a=!1;$[0][x(519)](x(579))&&JSON[x(596)]($[1][x(214)]??[])[x(297)]("sca_add_gift")?(console[x(316)]("event add gift to cart from popup",[...V]),await Y(e),a=!0):$[0][x(519)](x(347))&&JSON.stringify($[1][x(214)]??[])[x(297)](x(296))&&(V[x(297)]("/cart/add")||1===V[x(361)])?(console[x(316)]("event auto process gifts with cart",[...V]),await Y(e),a=!0):(console[x(316)]("this is others",[...V]),W(e)),a&&(window[x(444)][x(151)][x(297)]("/cart")||"fg-checkout"===document.querySelector(x(306))?.[x(457)](x(283)))&&(V=[],location[x(413)]());let i=await t(x(278),{method:"GET",headers:{Accept:"application/json","Content-Type":x(205)}});return await i[x(166)]().then($=>{let e=x;FGSECOMAPP[e(155)]=$.items?.[e(446)]($=>{let x=e;return{...FGSECOMAPP[x(155)]?.[x(202)](x=>x.id===$.id),...$}})}),FGSECOMAPP[x(155)]}catch(_){console.error(_)}},K=()=>{let $=_0xd2710e,x=document[$(520)]($(463));if(!x)return;x[$(411)]="";let e=Shopify?.[$(148)]??$(165),t=document[$(448)]("li");t[$(488)]=$(484),t.innerHTML=$(453)+e+'\n