<!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if IE 9 ]><html class="ie9 no-js"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head>

  <!-- Basic page needs ================================================== -->
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  
  <link rel="icon" href="https://cdn.store-assets.com/s/257904/f/1515211.png" />
  

  <!-- Title and description ================================================== -->
  <title>
  InsBeaute D&#39;Esthetique
  </title>

  
  <meta name="description" content="SunShield SPF 25 SunShield Protector SPF 50 InsB Derma Oxy Mist View product View product View product">
  

  <!-- Social meta ================================================== -->
  

  <meta property="og:type" content="website">
  <meta property="og:title" content="InsBeaute D&#39;Esthetique">
  <meta property="og:url" content="https://www.insbeaute.com">
  
  
  <meta property="og:image" content="https://cdn.store-assets.com/s/257904/f/1515211.png?width=350">
  <meta property="og:image:secure_url" content="https://cdn.store-assets.com/s/257904/f/1515211.png?width=350">
  
  


<meta property="og:description" content="SunShield SPF 25 SunShield Protector SPF 50 InsB Derma Oxy Mist View product View product View product">
<meta property="og:site_name" content="InsBeaute D&#39;Esthetique">



  <meta name="twitter:card" content="summary">




  <meta name="twitter:title" content="InsBeaute D&#39;Esthetique">
  
    <meta name="twitter:description" content="">
  
  




  <!-- Helpers ================================================== -->
  <link rel="canonical" href="https://www.insbeaute.com">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="theme-color" content="">

  <!-- CSS ================================================== -->
  <link href="https://store-themes.easystore.co/257904/themes/1592/assets/timber.css?t=1778173240" rel="stylesheet" type="text/css" media="screen" />
  <link href="https://store-themes.easystore.co/257904/themes/1592/assets/theme.css?t=1778173240" rel="stylesheet" type="text/css" media="screen" />

  




  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" type="text/javascript" ></script>
  <!-- Header hook for plugins ================================================== -->
  
<!-- ScriptTags -->
<script>window.__st={p: "index",cid: null,cem: null,cph: null,cfn: null,cln: null,cge: null,cdb: null,ccc: null};</script><script src='/assets/events.js'></script><script>(function(){function asyncLoad(){var urls=['/assets/traffic.js?v=1','https://apps.easystore.co/google-analytics-4/script.js?shop=insbeaute.easy.co&t=1641868869'];for(var i=0;i<urls.length;i++){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=urls[i];var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);}}window.attachEvent ? window.attachEvent('onload', asyncLoad) : window.addEventListener('load', asyncLoad, false);})();</script>
<!-- /ScriptTags -->


  
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js" type="text/javascript" ></script>
<script src="https://store-themes.easystore.co/257904/themes/1592/assets/respond.min.js?t=1778173240" type="text/javascript" ></script>
<link href="https://store-themes.easystore.co/257904/themes/1592/assets/respond-proxy.html" id="respond-proxy" rel="respond-proxy" />
<link href="//www.insbeaute.com/search?q=a3da7587d4c17d5b6d3ba5e29f166f88" id="respond-redirect" rel="respond-redirect" />
<script src="//www.insbeaute.com/search?q=a3da7587d4c17d5b6d3ba5e29f166f88" type="text/javascript"></script>
<![endif]-->



  <script src="https://store-themes.easystore.co/257904/themes/1592/assets/modernizr.min.js?t=1778173240" type="text/javascript" ></script>

  
  
  <script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', '', 'auto','myTracker');
  ga('myTracker.send', 'pageview');

  </script>
  
</head>

<body id="insbeaute-d-esthetique" class="template-index" >

  <ul id="MobileNav" class="mobile-nav large--hide">

  
  
  <li class="mobile-nav__link" aria-haspopup="true">
    
    <a href="/" >
      Home
    </a>
    
  </li>
  
  
  <li class="mobile-nav__link" aria-haspopup="true">
    
    
    <a href="/collections/all" class="mobile-nav__parent-link">
      All Products
    </a>
    <span class="mobile-nav__sublist-trigger">
      <span class="icon-fallback-text mobile-nav__sublist-expand">
  <span class="icon icon-plus" aria-hidden="true"></span>
  <span class="fallback-text">+</span>
</span>
<span class="icon-fallback-text mobile-nav__sublist-contract">
  <span class="icon icon-minus" aria-hidden="true"></span>
  <span class="fallback-text">-</span>
</span>

    </span>
    <ul class="mobile-nav__sublist">
      
      
      <li class="mobile-nav__sublist-link" aria-haspopup="true">
        
        <a href="/collections/daily-care" >
          Derma Daily Care
        </a>
        
      </li>
      
      
      <li class="mobile-nav__sublist-link" aria-haspopup="true">
        
        <a href="/collections/intensive-care" >
          Derma Weekly Care
        </a>
        
      </li>
      
      
      <li class="mobile-nav__sublist-link" aria-haspopup="true">
        
        <a href="/collections/treatment" >
          Pack Deal
        </a>
        
      </li>
      
      
      <li class="mobile-nav__sublist-link" aria-haspopup="true">
        
        <a href="/collections/oily-problematic-sensitive-dermacare" >
          Oily, Problematic, Sensitive DermaCare
        </a>
        
      </li>
      
      
      <li class="mobile-nav__sublist-link" aria-haspopup="true">
        
        <a href="/collections/male-collection" >
          Collection For Male
        </a>
        
      </li>
      
    </ul>
    
  </li>
  
  
  <li class="mobile-nav__link" aria-haspopup="true">
    
    <a href="/pages/shipping-information" >
      Shipping Information
    </a>
    
  </li>
  
  
  <li class="mobile-nav__link" aria-haspopup="true">
    
    <a href="/pages/payment-information" >
      Payment Information
    </a>
    
  </li>
  
  
  <li class="mobile-nav__link" aria-haspopup="true">
    
    <a href="/pages/terms-of-service" >
      Terms of Service
    </a>
    
  </li>
  
  
  <li class="mobile-nav__link" aria-haspopup="true">
    
    <a href="/blogs/blog" >
      Article
    </a>
    
  </li>
  
  
  <li class="mobile-nav__link" aria-haspopup="true">
    
    <a href="/a/contact-form"  target="_blank" >
      Contact Us
    </a>
    
  </li>
  

  

  
  
  
  <li class="mobile-nav__link">
    <a href="/account/register">Create account</a>
  </li>
  
  <li class="mobile-nav__link">
    <a href="/account/login">Log in</a>
  </li>
  
  
  
  
  
    <li class="mobile-nav__link">
      






    </li>
  
  
  <li class="mobile-nav__link header-bar__search-wrapper">
    
    <div class="header-bar__module header-bar__search">
      
  <a class="popup-with-form medium-down--hide" href="#test-form">
    <span class="icon icon-search" aria-hidden="true"></span>
  </a>
  <form action="/search" method="get" class="header-bar__search-form clearfix large--hide" role="search">
    
    <button type="submit" class="btn icon-fallback-text header-bar__search-submit">
      <span class="icon icon-search" aria-hidden="true"></span>
      <span class="fallback-text">Search</span>
    </button>
    <input type="search" name="q" value="" aria-label="Search" class="header-bar__search-input" placeholder="Search" autocomplete="off">
    <div class="dropdown" id="searchDropdown"></div>
    <input type="hidden" name="search_history" id="search_history">
  </form>



<!-- form itself -->
<div id="test-form" class="white-popup-block mfp-hide popup-search">
  <div class="popup-search-content">
    <form action="/search" method="get" class="input-group search-bar" role="search">
      
      <input type="search" name="q" value="" placeholder="Search" class="input-group-field" aria-label="Search" placeholder="Search" autocomplete="off">
      <div class="dropdown" id="searchDropdown"></div>
      <input type="hidden" name="search_history" id="search_history">
      <span class="input-group-btn">
        <button type="submit" class="btn icon-fallback-text">
          <span class="icon icon-search" aria-hidden="true"></span>
          <span class="fallback-text">Search</span>
        </button>
      </span>
    </form>
  </div>
</div>

<script src="https://store-themes.easystore.co/257904/themes/1592/assets/magnific-popup.min.js?t=1778173240" type="text/javascript" ></script>
<script>
$(document).ready(function() {
	$('.popup-with-form').magnificPopup({
		type: 'inline',
		preloader: false,
		focus: '#name',
      	mainClass: 'popup-search-bg-wrapper',

		// When elemened is focused, some mobile browsers in some cases zoom in
		// It looks not nice, so we disable it:
		callbacks: {
			beforeOpen: function() {
				if($(window).width() < 700) {
					this.st.focus = false;
				} else {
					this.st.focus = '#name';
				}
			}
		}
	});
});
</script>


<script>
  var _search_history_listings = ""
  if(_search_history_listings != "") localStorage.setItem('searchHistory', JSON.stringify(_search_history_listings));

  function clearAll() {
    localStorage.removeItem('searchHistory');
  
    var customer = "";
    if(customer) {
      // Your logic to clear all data or call an endpoint
      fetch('/account/search_histories', {
          method: 'DELETE',
          headers: {
            "Content-Type": "application/json",
            "X-Requested-With": "XMLHttpRequest"
          },
          body: JSON.stringify({
            _token: "tfTx4twPbw6OqdeihIT4YlLmLNYqQV356zD3v31c"
          }),
      })
      .then(response => response.json())
    }
  }
  // End - store view history in local storage
  
  // search history dropdown  
  var searchInputs = document.querySelectorAll('input[type=search]');
  
  if(searchInputs.length > 0) {
    
    searchInputs.forEach((searchInput)=>{
    
      searchInput.addEventListener('focus', function() {
        var searchDropdown = searchInput.closest('form').querySelector('#searchDropdown');
        searchDropdown.innerHTML = ''; // Clear existing items
  
        // retrieve data from local storage
        var searchHistoryData = JSON.parse(localStorage.getItem('searchHistory')) || [];
  
        // Convert JSON to string
        var search_history_json = JSON.stringify(searchHistoryData);
  
        // Set the value of the hidden input
        searchInput.closest('form').querySelector("#search_history").value = search_history_json;
  
        // create dropdown items
        var clearAllItem = document.createElement('div');
        clearAllItem.className = 'dropdown-item clear-all';
        clearAllItem.textContent = 'Clear';
        clearAllItem.addEventListener('click', function() {
            clearAll();
            searchDropdown.style.display = 'none';
            searchInput.classList.remove('is-focus');
        });
        searchDropdown.appendChild(clearAllItem);
  
        // create dropdown items
        searchHistoryData.forEach(function(item) {
          var dropdownItem = document.createElement('div');
          dropdownItem.className = 'dropdown-item';
          dropdownItem.textContent = item.term;
          dropdownItem.addEventListener('click', function() {
            searchInput.value = item.term;
            searchDropdown.style.display = 'none';
          });
          searchDropdown.appendChild(dropdownItem);
        });
  
        if(searchHistoryData.length > 0){
          // display the dropdown
          searchInput.classList.add('is-focus');
          document.body.classList.add('search-input-focus');
          searchDropdown.style.display = 'block';
        }
      });
  
      searchInput.addEventListener("focusout", (event) => {
        var searchDropdown = searchInput.closest('form').querySelector('#searchDropdown');
        searchInput.classList.remove('is-focus');
        searchDropdown.classList.add('transparent');
        setTimeout(()=>{
          searchDropdown.style.display = 'none';
          searchDropdown.classList.remove('transparent');
          document.body.classList.remove('search-input-focus');
        }, 400);
      });
    })
  }
  // End - search history dropdown
</script>
    </div>
    
  </li>
  
  
</ul>
<div id="MobileNavOutside" class="mobile-nav-outside"></div>


<div id="PageContainer" class="page-container">
  
<!-- Snippet:global/body_start: Console Extension -->
<div id='es_console' style='display: none;'>257904</div>
<!-- /Snippet -->

  
    <style>
  .search-modal__form{
    position: relative;
  }
  
  .dropdown-wrapper {
    position: relative;
  }
  
  .dropdown-wrapper:hover .dropdown {
    display: block;
  }
  
  .header-icon-nav .dropdown {
    left: -80px;
  }
  
  .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0px;
    width: 100%;
    padding: 8px;
    background-color: #fff;
    z-index: 1000;
    border-radius: 5px;
    border: 1px solid rgba(var(--color-foreground), 1);
    border-top: none;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 350px;
    min-width: 150px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
  }
    
  .dropdown a{
    text-decoration: none;
    color: #000 !important;
  }
  
  .dropdown-item {
    padding: 0.4rem 2rem;
    cursor: pointer;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .dropdown-item:hover{
    background-color: #f3f3f3;
  }
  
  .search__input.is-focus{
    border-radius: 15px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border: 1px solid rgba(var(--color-foreground), 1);
    border-bottom: none;
    box-shadow: none;
  }
  
  .clear-all {
    text-align: right;
    padding: 0 2rem 0.2rem;
    line-height: 1;
    font-size: 70%;
    margin-bottom: -2px;
  }
  
  .clear-all:hover{
    background-color: #fff;
  }
  
  .referral-notification {
    position: absolute;
    top: 100%;
    right: -12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 280px;
    z-index: 1000;
    padding: 16px;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
  }
  
  .referral-notification::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
  }
  
  .referral-notification::after {
    content: '';
    position: absolute;
    top: -9px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #e0e0e0;
  }
  
  .referral-notification h4 {
    margin: 0 0 8px 0;
    color: #2196F3;
    font-size: 16px;
    font-weight: 600;
  }
  
  .referral-notification p {
    margin: 0 0 12px 0;
    color: #666;
  }
  
  .referral-notification .referral-code {
    background: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    text-align: center;
    margin: 8px 0;
    border: 1px solid #ddd;
  }
  
  .referral-notification .close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 1;
  }
  
  .referral-notification .close-btn:hover {
    color: #333;
  }
  
  .referral-notification .action-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 8px;
    margin-top: 8px;
  }
  
  .referral-notification .action-btn:hover {
    background: #1976D2;
  }
  
  .referral-notification .dismiss-btn {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 8px;
  }
  
  .referral-notification .dismiss-btn:hover {
    background: #f5f5f5;
  }
  .referral-modal__dialog {
    transform: translate(-50%, 0);
    transition: transform var(--duration-default) ease, visibility 0s;
    z-index: 10000;
    position: fixed;
    top: 20vh;
    left: 50%;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    background-color: #fff;
    color: #000;
    padding: 20px;
    text-align: center;
  }
  .modal-overlay.referral-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2001;
    display: block;
    opacity: 1;
    transition: opacity var(--duration-default) ease, visibility 0s;
  }
</style>

<header class="header-bar">
  <div class="header-wrapper wrapper">

    <!--  Mobile hamburger  -->
    <div class="large--hide">
      <button type="button" class="mobile-nav-trigger" id="MobileNavTrigger">
        <span class="icon icon-hamburger" aria-hidden="true"></span>
      </button>
    </div>
    
    <div class="logo-header" role="banner">

            
              <h1 class="site-header__logo" itemscope itemtype="http://schema.org/Organization">
            
                  
                    
                    
                      <a href="/" class="logo-wrapper" itemprop="url">
                        <img src="https://cdn.store-assets.com/s/257904/f/1515211.png?width=350" alt="InsBeaute D&#39;Esthetique" itemprop="logo">
                      </a>
                    
                    
                  
            
              </h1>
            
        
    </div>
    
    <div class="desktop-header-nav medium-down--hide">
      
      <div class="header-nav-bar">
          
<ul class="site-nav" id="AccessibleNav">
  
    
    
      <li >
        <a href="/"  class="site-nav__link">Home</a>
      </li>
    
  
    
    
      
      <li class="site-nav--has-dropdown" aria-haspopup="true">
        <a href="/collections/all"  class="site-nav__link">
          All Products
          <span class="icon-fallback-text">
            <span class="icon icon-arrow-down" aria-hidden="true"></span>
          </span>
        </a>
        <ul class="site-nav__dropdown">
          
            
            
              <li >
                <a href="/collections/daily-care"  class="site-nav__link">Derma Daily Care</a>
              </li>
            
          
            
            
              <li >
                <a href="/collections/intensive-care"  class="site-nav__link">Derma Weekly Care</a>
              </li>
            
          
            
            
              <li >
                <a href="/collections/treatment"  class="site-nav__link">Pack Deal</a>
              </li>
            
          
            
            
              <li >
                <a href="/collections/oily-problematic-sensitive-dermacare"  class="site-nav__link">Oily, Problematic, Sensitive DermaCare</a>
              </li>
            
          
            
            
              <li >
                <a href="/collections/male-collection"  class="site-nav__link">Collection For Male</a>
              </li>
            
          
        </ul>
      </li>
    
  
    
    
      <li >
        <a href="/pages/shipping-information"  class="site-nav__link">Shipping Information</a>
      </li>
    
  
    
    
      <li >
        <a href="/pages/payment-information"  class="site-nav__link">Payment Information</a>
      </li>
    
  
    
    
      <li >
        <a href="/pages/terms-of-service"  class="site-nav__link">Terms of Service</a>
      </li>
    
  
    
    
      <li >
        <a href="/blogs/blog"  class="site-nav__link">Article</a>
      </li>
    
  
    
    
      <li >
        <a href="/a/contact-form"  target="_blank"  class="site-nav__link">Contact Us</a>
      </li>
    
  
  
  
      
        
          
        
          
        
      
  
  
  
</ul>

      </div>

      <div class="header-subnav">
        






        
        
        <div class="header-icon-nav">
        
              
        
              
            
              
              
                
                  <div class="header-bar__module">
                    
  <a class="popup-with-form medium-down--hide" href="#test-form">
    <span class="icon icon-search" aria-hidden="true"></span>
  </a>
  <form action="/search" method="get" class="header-bar__search-form clearfix large--hide" role="search">
    
    <button type="submit" class="btn icon-fallback-text header-bar__search-submit">
      <span class="icon icon-search" aria-hidden="true"></span>
      <span class="fallback-text">Search</span>
    </button>
    <input type="search" name="q" value="" aria-label="Search" class="header-bar__search-input" placeholder="Search" autocomplete="off">
    <div class="dropdown" id="searchDropdown"></div>
    <input type="hidden" name="search_history" id="search_history">
  </form>



<!-- form itself -->
<div id="test-form" class="white-popup-block mfp-hide popup-search">
  <div class="popup-search-content">
    <form action="/search" method="get" class="input-group search-bar" role="search">
      
      <input type="search" name="q" value="" placeholder="Search" class="input-group-field" aria-label="Search" placeholder="Search" autocomplete="off">
      <div class="dropdown" id="searchDropdown"></div>
      <input type="hidden" name="search_history" id="search_history">
      <span class="input-group-btn">
        <button type="submit" class="btn icon-fallback-text">
          <span class="icon icon-search" aria-hidden="true"></span>
          <span class="fallback-text">Search</span>
        </button>
      </span>
    </form>
  </div>
</div>

<script src="https://store-themes.easystore.co/257904/themes/1592/assets/magnific-popup.min.js?t=1778173240" type="text/javascript" ></script>
<script>
$(document).ready(function() {
	$('.popup-with-form').magnificPopup({
		type: 'inline',
		preloader: false,
		focus: '#name',
      	mainClass: 'popup-search-bg-wrapper',

		// When elemened is focused, some mobile browsers in some cases zoom in
		// It looks not nice, so we disable it:
		callbacks: {
			beforeOpen: function() {
				if($(window).width() < 700) {
					this.st.focus = false;
				} else {
					this.st.focus = '#name';
				}
			}
		}
	});
});
</script>


<script>
  var _search_history_listings = ""
  if(_search_history_listings != "") localStorage.setItem('searchHistory', JSON.stringify(_search_history_listings));

  function clearAll() {
    localStorage.removeItem('searchHistory');
  
    var customer = "";
    if(customer) {
      // Your logic to clear all data or call an endpoint
      fetch('/account/search_histories', {
          method: 'DELETE',
          headers: {
            "Content-Type": "application/json",
            "X-Requested-With": "XMLHttpRequest"
          },
          body: JSON.stringify({
            _token: "tfTx4twPbw6OqdeihIT4YlLmLNYqQV356zD3v31c"
          }),
      })
      .then(response => response.json())
    }
  }
  // End - store view history in local storage
  
  // search history dropdown  
  var searchInputs = document.querySelectorAll('input[type=search]');
  
  if(searchInputs.length > 0) {
    
    searchInputs.forEach((searchInput)=>{
    
      searchInput.addEventListener('focus', function() {
        var searchDropdown = searchInput.closest('form').querySelector('#searchDropdown');
        searchDropdown.innerHTML = ''; // Clear existing items
  
        // retrieve data from local storage
        var searchHistoryData = JSON.parse(localStorage.getItem('searchHistory')) || [];
  
        // Convert JSON to string
        var search_history_json = JSON.stringify(searchHistoryData);
  
        // Set the value of the hidden input
        searchInput.closest('form').querySelector("#search_history").value = search_history_json;
  
        // create dropdown items
        var clearAllItem = document.createElement('div');
        clearAllItem.className = 'dropdown-item clear-all';
        clearAllItem.textContent = 'Clear';
        clearAllItem.addEventListener('click', function() {
            clearAll();
            searchDropdown.style.display = 'none';
            searchInput.classList.remove('is-focus');
        });
        searchDropdown.appendChild(clearAllItem);
  
        // create dropdown items
        searchHistoryData.forEach(function(item) {
          var dropdownItem = document.createElement('div');
          dropdownItem.className = 'dropdown-item';
          dropdownItem.textContent = item.term;
          dropdownItem.addEventListener('click', function() {
            searchInput.value = item.term;
            searchDropdown.style.display = 'none';
          });
          searchDropdown.appendChild(dropdownItem);
        });
  
        if(searchHistoryData.length > 0){
          // display the dropdown
          searchInput.classList.add('is-focus');
          document.body.classList.add('search-input-focus');
          searchDropdown.style.display = 'block';
        }
      });
  
      searchInput.addEventListener("focusout", (event) => {
        var searchDropdown = searchInput.closest('form').querySelector('#searchDropdown');
        searchInput.classList.remove('is-focus');
        searchDropdown.classList.add('transparent');
        setTimeout(()=>{
          searchDropdown.style.display = 'none';
          searchDropdown.classList.remove('transparent');
          document.body.classList.remove('search-input-focus');
        }, 400);
      });
    })
  }
  // End - search history dropdown
</script>
                  </div>
                
              
              
              
                <div class="header-bar__module dropdown-wrapper">
                  
                    <a href="/account/login">



    <svg class="svg-icon" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><title>icon-profile</title><path d="M50,51.8A24.4,24.4,0,1,0,25.6,27.4,24.43,24.43,0,0,0,50,51.8ZM50,10A17.4,17.4,0,1,1,32.6,27.4,17.43,17.43,0,0,1,50,10Z"/><path d="M62.66,57.66H37.34a30.54,30.54,0,0,0-30.5,30.5V93.5a3.5,3.5,0,0,0,3.5,3.5H89.66a3.5,3.5,0,0,0,3.5-3.5V88.16A30.54,30.54,0,0,0,62.66,57.66ZM86.16,90H13.84V88.16a23.53,23.53,0,0,1,23.5-23.5H62.66a23.53,23.53,0,0,1,23.5,23.5Z"/></svg>

  
</a>
                  

                  <!-- Referral Notification Popup for Desktop -->
                  <div id="referralNotification" class="referral-notification" style="display: none;">
                    <button class="close-btn" onclick="dismissReferralNotification()">&times;</button>
                    <div style="text-align: center; margin-bottom: 16px;">
                      <div style="width: 100px; height: 100px; margin: 0 auto;">
                        <img src="https://resources.easystore.co/storefront/icons/channels/vector_referral_program.svg">
                      </div>
                    </div>
                    <p id="referralSignupMessage" style="text-align: center; font-size: 14px; color: #666; margin: 0 0 20px 0;">
                      Your friend gifted you   credit! Sign up now to redeem.
                    </p>
                    <div style="text-align: center;">
                      <button class="btn" onclick="goToSignupPage()" style="width: 100%; color: #fff;">
                        Sign Up
                      </button>
                    </div>
                  </div>
                </div>
              
              
              <div class="header-bar__module cart-page-link-wrapper">
                <span class="header-bar__sep" aria-hidden="true"></span>
                <a href="/cart" class="cart-page-link">
                  <span class="icon icon-cart header-bar__cart-icon" aria-hidden="true"></span>
                  <span class="cart-count header-bar__cart-count hidden-count">0</span>
                </a>
              </div>
        
        
              
                
              
        
          
        </div>
      </div>

      
      
    </div>
    
    

    <!--  Mobile cart  -->
    <div class="large--hide">
      <a href="/cart" class="cart-page-link mobile-cart-page-link">
        <span class="icon icon-cart header-bar__cart-icon" aria-hidden="true"></span>
        <span class="cart-count  hidden-count">0</span>
      </a>
    </div>
    
  </div>
  
  
  
</header>




    
    
<div class="flexslider">
  <ul class="slides">
    
      
      
      
      
      
      
      
        
    
      
      
      
      
      
      
      
        
          <li>
            <div class="slide-item">
              <div class="slide-img" style="background-image:url('https://cdn.store-assets.com/s/257904/f/2545141.jpeg?width=1500')">
                <img class="hide" src="https://cdn.store-assets.com/s/257904/f/2545141.jpeg?width=1500" alt="InsBeaute D&#39;Esthetique | Welcome  To InsBeaute D'Esthetique"/>
              </div>
              <div class="slide-item-content">
                <div class="slide-item-animation">
                  
                      <h4 class="slide-subtitle">To a Beautiful and Healthier Life. It is a well known fact that making the correct Beauty and Health Wellness decisions would make a significant impact on our Health and Longevity in the long run!</h4>
                  

                  
                      <h1 class="slide-title">Welcome  To InsBeaute D'Esthetique</h1>
                  

                  
                  <a href="/collections/all" class="slide-btn btn">
                    View All Products
                  </a> 
                  
                </div>
              </div>
            </div>
          </li>
        
    
      
      
      
      
      
      
      
        
    
      
      
      
      
      
      
      
        
    
      
      
      
      
      
      
      
        
    
      
      
      
      
      
      
      
        
    
  </ul>
</div>

    
    <main class="wrapper main-content" role="main">
      <div class="grid">
          <div class="grid__item">
            
  
            


  <hr class="hr--small hr--clear">
  
  
  <div class="home-content-wrapper wrapper"> 
    <div class="rte">
      <link href='/assets/css/froala_style.min.css' rel='stylesheet' type='text/css'/><div class='fr-view'><table style="width: 100%; text-align: center;"><thead><tr><th><div data-empty="true" style="text-align: center;"><br></div></th><th style="width: 32.7088%;"><div style="text-align: center;"><span style="color: rgb(209, 72, 65);">InsB Derma Care</span></div></th><th style="width: 33.3176%;"><div data-empty="true" style="text-align: center;"><br></div></th></tr></thead><tbody><tr><td class="fr-borderless" style="width: 33.9074%; vertical-align: top;"><div data-empty="true" style="text-align: center;"><br></div></td><td class="fr-borderless fr-thick" style="width: 32.7088%; vertical-align: top; text-align: right;"><div data-empty="true" style="text-align: center;"><br></div></td><td class="fr-borderless" style="width: 33.3176%;"><div data-empty="true" style="text-align: center;"><br></div></td></tr><tr><td style="width: 33.9074%; vertical-align: top;"><div class="fr-img-space-wrap"><div class="fr-img-space-wrap"><div class="fr-img-space-wrap" style="text-align: center;"><span class="fr-img-caption fr-draggable" contenteditable="false" draggable="false" style="width: 260px;"><span class="fr-img-wrap"><a href="https://www.insbeaute.com/products/duo-set-glow-1" rel="noopener noreferrer" target="_blank"><img src="https://cdn.store-assets.com/s/257904/i/33505117.jpg" alt="Duo set Glow Essence and Refine Serum 4.3.jpg" class="img-link-caption" style="width: 260px;"><span class="fr-inner" contenteditable="true"></span></a></span></span></div></div></div><div data-empty="true" style="text-align: center;"><br></div><div style="text-align: center;"><a class="fr-strong fr-green" href="https://www.insbeaute.com/products/duo-set-glow-1" rel="noopener noreferrer" target="_blank">Duo Set - Glow</a></div></td><td class="fr-thick" style="width: 32.7088%; vertical-align: middle; text-align: center;"><p><br></p><div class="fr-img-space-wrap"><div class="fr-img-space-wrap"><a href="https://www.insbeaute.com/products/complete-one-6-pcs--1" rel="noopener noreferrer" target="_blank"><img src="https://cdn.store-assets.com/s/257904/i/33275651.jpg" alt="null" style="width: 271px;"></a></div></div><br><p><a class="fr-strong" href="https://www.insbeaute.com/products/complete-one-6-pcs--1" rel="noopener noreferrer" target="_blank">Complete One - 6 pcs</a></p></td><td class="fr-thick" style="width: 33.3176%; vertical-align: top;"><div class="fr-img-space-wrap"><span class="fr-img-caption fr-draggable" contenteditable="false" draggable="false" style="width: 260px; display: inline-block; vertical-align: bottom; margin-right: 5px; margin-left: 5px; max-width: calc(100% - 10px); text-align: center;"><span class="fr-img-wrap"><a class="fr-green fr-strong" href="https://www.insbeaute.com/products/duo-set-restorer-1" rel="noopener noreferrer" target="_blank"><img src="https://cdn.store-assets.com/s/257904/i/33275719.jpg" alt="null" style="width: 260px;"><span class="fr-inner" contenteditable="true"><br>Duo Set - Restorer</span></a></span></span></div></td></tr><tr><td style="width: 33.9074%; text-align: center; vertical-align: top;"><div class="fr-img-space-wrap"><div class="fr-img-space-wrap"><div class="fr-img-space-wrap"><div class="fr-img-space-wrap"><div class="fr-img-space-wrap"><a href="https://www.insbeaute.com/products/vita-cream-1" rel="noopener noreferrer" target="_blank"><img src="https://cdn.store-assets.com/s/257904/i/33275385.jpg" alt="null" style="width: 264px;"></a></div></div></div></div></div><a class="fr-green fr-strong" href="https://www.insbeaute.com/products/vita-cream-1" id="isPasted" rel="noopener noreferrer" target="_blank">Vita Cream</a><br></td><td style="width: 32.7088%; text-align: center; vertical-align: top;"><div class="fr-img-space-wrap"><a href="https://www.insbeaute.com/products/insbmask-1" rel="noopener noreferrer" target="_blank"><img src="https://cdn.store-assets.com/s/257904/i/33504220.jpg" alt="Gel Mask .jpg" style="width: 255px;"></a></div><a class="fr-green fr-strong" href="https://www.insbeaute.com/products/insbmask-1" rel="noopener noreferrer" target="_blank">Gel Mask</a><br></td><td style="width: 33.3176%; text-align: center; vertical-align: top;"><div class="fr-img-space-wrap"><a href="https://www.insbeaute.com/products/insb-derma-sunshield-protector-spf-50-new--1" rel="noopener noreferrer" target="_blank"><img src="https://cdn.store-assets.com/s/257904/i/33275190.jpg" alt="null" style="width: 259px;"></a></div><a class="fr-green fr-strong" href="https://www.insbeaute.com/products/insb-derma-sunshield-protector-spf-50-new--1" rel="noopener noreferrer" target="_blank">SunShield SPF 50</a><br></td></tr></tbody></table><p><br></p>
    <script type="text/javascript">
      $("img[data-type=youtube]").click(function(){
        var this_parent = $(this).closest("div.Grid-cell--wrapper");
        var height = $(this_parent).height();
        var youtube_player = document.createElement("iframe");
        youtube_player.setAttribute("style", "width:100%;  height:"+height+"px;");
        youtube_player.setAttribute("allowfullscreen","");
        youtube_player.setAttribute("src","https://www.youtube.com/embed/"+$(this).data("youtube-id")+"?autoplay=1&fs=1");
        this_parent.html(youtube_player);
      });
    </script></div>
    </div>
    

  </div>














  
            
          </div>
      </div>
  
    </main>
  
    <footer class="site-footer small--text-center" role="contentinfo">
  
      <div class="wrapper">
  
        <div class="grid-uniform">
  
          
          
          
          
            
          
          
          
          
          
  
          
              
            
  
          
  
          
            <div class="grid__item text-center">
              
              <ul class="site-footer__links inline-list">
                
                  <li><a href="/" >Home</a></li>
                
                  <li><a href="/pages/shipping-information" >Shipping Information</a></li>
                
                  <li><a href="/pages/payment-information" >Payment Information</a></li>
                
                  <li><a href="/pages/terms-of-service" >Terms of Service</a></li>
                
                
              </ul>
            </div>
          
  
          
        </div>
  
        <hr class="hr--small hr--clear">
  
        
  
         <div class="grid">
           <div class="grid__item text-center">
             <p class="site-footer__links">Copyright © InsBeaute D'Esthetique 2026 All rights reserved</p>
             
           </div>
         </div>
  
      </div>
    </footer>
  
    
      <script src="https://store-themes.easystore.co/257904/themes/1592/assets/jquery.flexslider.min.js?t=1778173240" type="text/javascript" ></script>
  
  
      <!-- Testing slick slider -->
      <!-- <script type="text/javascript" src="//cdn.jsdelivr.net/jquery.slick/1.5.9/slick.min.js"></script> -->
  
      <script type="text/javascript">
        // $(document).ready(function(){
        //   $('.flexslider .slides').slick({
        //     dots: true
        //   });
        // });
  
        window.timberSlider = window.timberSlider || {};
  
        timberSlider.cacheSelectors = function () {
          timberSlider.cache = {
            // Home Page
            $slider: $('.flexslider')
          }
        };
  
        timberSlider.init = function () {
          timberSlider.cacheSelectors();
          timberSlider.sliders();
        };
  
        timberSlider.sliders = function () {
          var $slider = timberSlider.cache.$slider,
              sliderArgs = {
                animation: 'fade',
                animationSpeed: 500,
                pauseOnHover: true,
                keyboard: false,
                slideshow: 0,
                slideshowSpeed: 4000,
                controlNav: 0,
                smoothHeight: false,
                touch: true,
              };
  
          if ($slider.length) {
  
            if ($slider.find('li').length === 1) {
              sliderArgs.slideshow = false;
              sliderArgs.slideshowSpeed = 0;
              sliderArgs.controlNav = false;
              sliderArgs.directionNav = false;
            }
  
            $slider.flexslider(sliderArgs);
          }
        };
  
        // Initialize slider on docready
        $( document ).ready(function() {
          timberSlider.init();
        });
  
      </script>
    
  
    <script src="https://store-themes.easystore.co/257904/themes/1592/assets/fastclick.min.js?t=1778173240" type="text/javascript" ></script>
    <script src="https://store-themes.easystore.co/257904/themes/1592/assets/timber.js?t=1778173240" type="text/javascript" ></script>
    <script src="https://store-themes.easystore.co/257904/themes/1592/assets/theme.js?t=1778173240" type="text/javascript" ></script>
  
    
  
    
  
    

<script src="/assets/currencies.js" type="text/javascript" ></script>
<script src="/assets/jquery.currencies.min.js" type="text/javascript" ></script>
<script src="/assets/currencies_format.js" type="text/javascript" ></script>

<script>
Currency.format = "money_with_currency_format";
var shopCurrency = 'SGD';
var selectedCurrency = '';


  Currency.convert = function(amount, from, to) {
    return amount;
  };

  
if( $.cookie("currency") == null ){
  
  if( selectedCurrency != false ) {

  Currency.convertAll(shopCurrency, selectedCurrency);
  jQuery('.selected-currency').text(Currency.currentCurrency);  

  }

}

/* Sometimes merchants change their shop currency, let's tell our JavaScript file */
// Currency.moneyFormats[shopCurrency].money_with_currency_format = "";
// Currency.moneyFormats[shopCurrency].money_format = "S$ {{amount}} ";
  
/* Default currency */
var defaultCurrency = 'SGD';
  
/* Cookie currency */
var cookieCurrency = Currency.cookie.read();

  cookieCurrency = shopCurrency;

$("input[name=current_currency]").val(cookieCurrency);
if(cookieCurrency == null){
  cookieCurrency = shopCurrency;
  Currency.cookie.write(shopCurrency);
}
/* Fix for customer account pages */
jQuery('span.money span.money').each(function() {
  jQuery(this).parents('span.money').removeClass('money');
});
/* Saving the current price */
jQuery('span.money').each(function() {
  jQuery(this).attr('data-currency-SGD', jQuery(this).html());
});
// If there's no cookie.
if (cookieCurrency == null) {
  if (shopCurrency !== defaultCurrency) {
    Currency.convertAll(shopCurrency, defaultCurrency);
  }
  else {
    Currency.currentCurrency = defaultCurrency;
  }
}
// If the cookie value does not correspond to any value in the currency dropdown.
else if (jQuery('[name=currencies]').size() && jQuery('[name=currencies] option[value=' + cookieCurrency + ']').size() === 0) {
  Currency.currentCurrency = shopCurrency;
  Currency.cookie.write(shopCurrency);
}
else if (cookieCurrency === shopCurrency) {
  Currency.currentCurrency = shopCurrency;
  Currency.convertAll(shopCurrency, cookieCurrency);
}
else {
  Currency.convertAll(shopCurrency, cookieCurrency);
}
jQuery('[name=currencies]').val(Currency.currentCurrency).change(function() {
  var newCurrency = jQuery(this).val();
  
  
    Currency.cookie.write(newCurrency)
    if ('index' == 'cart') {
      const params = new URLSearchParams(window.location.search);
      params.set('delete_cache', 1);
      window.location.search = params;
    } else {
      window.location.reload();
    }
  
});
var original_selectCallback = window.selectCallback;
var selectCallback = function(variant, selector) {
  var currencies = null;
  original_selectCallback(variant, selector);
  if(typeof jQuery('[name=currencies]').val() == "undefined"){
    currencies = shopCurrency;
  }
  else{
    currencies = jQuery('[name=currencies]').val();
  }
  Currency.convertAll(shopCurrency, currencies);
  jQuery('.selected-currency').text(Currency.currentCurrency);
};
$('body').on('ajaxCart.afterCartLoad', function(cart) {
  Currency.convertAll(shopCurrency, jQuery('[name=currencies]').val());
  jQuery('.selected-currency').text(Currency.currentCurrency);  
});
jQuery('.selected-currency').text(Currency.currentCurrency);
</script>


  
<!-- Snippet:global/body_end: Product Description Tabs -->

				<style>
				.product-description-tabs{
					color: #120101;
				}
				.prod-desc-tab-container {
					padding: 15px;
					margin-right: auto;
					margin-left: auto;
					background-color: #ffffff;
				}
				/* Style the list */
				.prod-desc-tab {
					list-style-type: none;
					margin: 0;
					padding: 0;
					 border-bottom: solid 1px #ddd;
					/*overflow: hidden;
					border: 1px solid #e6e6e6;
					background-color: #fefefe;
					border-bottom: 1px solid #ddd;*/
				}

				/* Float the list items side by side */
				li.tablinks {
					display: inline-block;
					border-top: 3px solid transparent;
					border-left: 1px solid transparent;
					border-right: 1px solid transparent;
					margin-bottom: -1px;
					margin-right: 3px;
					border-radius: 4px 4px 0 0;
					background-color: rgba(212,212,212,0.3);
				}

				/* Style the links inside the list items */
				li.tablinks a {
				color: #120101;
				cursor: pointer;
				margin-right: 2px;
				line-height: 1.42857143;
				display: block;
				padding: 10px 15px;
				}

				/* Change background color of links on hover */
				li.tablinks:hover {
					background-color: #ffffff;
					border-bottom-color: transparent;
					border-top: 3px solid #ddd;
					border-left: 1px solid #ddd;
					border-right: 1px solid #ddd;
				} /*rgba(212,212,212,0.3)*/

				/* Create an active/current tablink class */
				li.tablinks a:focus, li.tablinks.active{
					border-top: 3px solid #ddd;
					border-left: 1px solid #ddd;
					border-right: 1px solid #ddd;
					background-color: #ffffff;
				}

				/* Style the tab content */
				.prod-desc-tab-content {
					display: none;
					padding: 15px 15px;
					/*border: 1px solid #ccc;*/
					border-top: none;
					clear: both;
					-webkit-animation: fadeEffect 1s;
					animation: fadeEffect 1s; /* Fading effect takes 1 second */
				}
				.prod-desc-tab-content ul{
					list-style-type: disc;
				}

				/* if user select is_show_title is true, the title will be displayed; if not, hide the title*/
				.prod-desc-tab-content > h2{
					display:none;
				}

				@-webkit-keyframes fadeEffect {
					from {opacity: 0;}
					to {opacity: 1;}
				}

				@keyframes fadeEffect {
					from {opacity: 0;}
					to {opacity: 1;}
				}

				.tab_drawer_heading { display: none; }

			@media screen and (max-width: 480px) {
				.prod-desc-tab {
					display: none;
				}


				.tab_drawer_heading {
					background-color: transparent;
					color: #120101;
					border-bottom: 1px solid #ddd;
					margin: 0;
					padding: 6px 12px;
					display: block;
					cursor: pointer;
					-webkit-touch-callout: none;
					-webkit-user-select: none;
					-khtml-user-select: none;
					-moz-user-select: none;
					-ms-user-select: none;
					user-select: none;
					position: relative;
				}
				.tab_drawer_heading:after {
					content: '';
					top: 50%;
					right: 40px;
					position: absolute;
					border: solid black;
					border-width: 0 3px 3px 0;
					display: inline-block;
					width: 10px;
					height: 10px;
					margin-top: -5px;
					transform: rotate(45deg);
					-webkit-transform: rotate(45deg);
					-webkit-transition: all 200ms linear;
					   -moz-transition: all 200ms linear;
					    -ms-transition: all 200ms linear;
					     -o-transition: all 200ms linear;
					        transition: all 200ms linear;
				}
				.d_active {
					background-color: rgba(212,212,212,0.3);
				}
				.d_active.tab_drawer_heading:after{
					margin-top: -3px;
					transform: rotate(-135deg);
					-webkit-transform: rotate(-135deg);
				}
			}
				</style>

			<script type="text/javascript">

			// If the page has no jquery
			// if(typeof jQuery == 'undefined'){
			// 	console.log(456);
			// 	var script = document.createElement('script');
			// 	script.type = "text/javascript";
			// 	script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js";
			// 	console.log(script);
			// 	document.getElementsByTagName('head')[0].appendChild(script);
			// }


			  /* if in tab mode */
			   $("body").on("click", ".tablinks", function(){
				var id = $(this).data("prod-desc-id");

					// Get all elements with class="prod-desc-tab-content" and hide them
					$(".prod-desc-tab-content").hide();

					// Get all elements with class="tablinks" and remove the class "active"
					$(".tablinks").removeClass("active");

					// Show the current tab, and add an "active" class to the link that opened the tab
					$("#"+id+"_desc_tab_content").show();
					$(this).addClass("active");

				//make mobile view(drawer mode) also in same tab
				  $(".tab_drawer_heading").removeClass("d_active");
				  $(".tab_drawer_heading[data-prod-desc-id='"+id+"']").addClass("d_active");

				});
				/* if in drawer mode */
				$("body").on("click", ".tab_drawer_heading", function() {
					var id = $(this).data("prod-desc-id"),
							active = $(this).hasClass("d_active")

					$(".prod-desc-tab-content").hide();
					$(".tab_drawer_heading").removeClass("d_active");

					if(!active){
						$("#"+id+"_desc_tab_content").show();
						$(this).addClass("d_active");
						window.scroll({
							top: $(this).offset().top - 120,
							left: 0,
							behavior: 'smooth'
						});
					}

				   $(".tablinks").removeClass("active");
				  $(".tablinks[data-prod-desc-id='"+id+"']").addClass("active");
				});

				$(function(){
					var x = $(".product-description").find("h1, h2, h3, h4, h5, h6");
					var title = null;
					var body = null;

					if(x.length > 1){
						$(".product-description").after("<link href='/assets/css/froala_style.min.css' rel='stylesheet' type='text/css'/><div class='product-description-tabs fr-view'><ul class='prod-desc-tab'></ul><div class='prod-desc-tab-container'></div></div>");
						$(x).each(function(k, v){
							title = $(v).text();

							if(k == 0){
								body = $(x[0]).nextUntil(x[1]).clone();
								$(".prod-desc-tab").append('<li class="tablinks active" data-prod-desc-id="'+k+'"><a>'+title+'</a></li>');
								$(".prod-desc-tab-container").append('<h3 class="tab_drawer_heading d_active" data-prod-desc-id="'+k+'">'+title+'</h3><div id="'+k+'_desc_tab_content" class="prod-desc-tab-content" style="display:block"><h2>'+title+'</h2></div>');
								$("#"+k+"_desc_tab_content h2").after(body);
							}
							else if(k == x.length){
								body = $(x[k]).nextAll().clone();
								$(".prod-desc-tab").append('<li class="tablinks" data-prod-desc-id="'+k+'"><a>'+title+'</a></li>');
								$(".prod-desc-tab-container").append('<h3 class="tab_drawer_heading" data-prod-desc-id="'+k+'">'+title+'</h3><div id="'+k+'_desc_tab_content" class="prod-desc-tab-content" style="display:none"><h2>'+title+'</h2></div>');
								$("#"+k+"_desc_tab_content h2").after(body);
							}
							else{
								body = $(x[k]).nextUntil(x[k+1]).clone();
								$(".prod-desc-tab").append('<li class="tablinks" data-prod-desc-id="'+k+'"><a>'+title+'</a></li>');
								$(".prod-desc-tab-container").append('<h3 class="tab_drawer_heading" data-prod-desc-id="'+k+'">'+title+'</h3><div id="'+k+'_desc_tab_content" class="prod-desc-tab-content" style="display:none"><h2>'+title+'</h2></div>');
								$("#"+k+"_desc_tab_content h2").after(body);
							}
						});
						$(".product-description").hide();
					}

				});
			</script>

<!-- /Snippet -->

<!-- Snippet:global/body_end: Product Label -->
<link href='https://apps.easystore.co/assets/css/product-label/main.css?v2.3' rel='stylesheet' type='text/css' media='screen' /><script src='https://apps.easystore.co/product-labels/productlabelv2.js?shop=insbeaute.easy.co' type='text/javascript'></script>
<!-- /Snippet -->
<script>

  /*

    ------
    Events
    ------

    pages/viewed

    customers/signup

    customers/login

    products/searched

    collections/viewed

    products/viewed

    products/shared

    wishlists/item_added

    carts/items_added

    carts/viewed

    carts/item_removed

    checkouts/initiated

    checkouts/shipping_info_added

    checkouts/payment_info_added

    checkouts/completed

    orders/placed

    orders/purchased

    payments/captured

    payments/failed

  */

  window.__latest_cart = window.__latest_cart || null;

  const _selector = document.querySelector.bind(document),
        _selectorAll = document.querySelectorAll.bind(document)

  document.addEventListener('DOMContentLoaded', (event) => {

    const default_currency = getCookie("currency")
    const customer_id = window.__st.cid
    const template    = window.__st.p

    onPageView()

    //-----------------------//
    //        Configs        //
    //-----------------------//

    window.dataLayer = window.dataLayer || []

    Array.prototype.last = Array.prototype.last || function() {
      return this[this.length - 1] || null
    }

    Array.prototype.first = Array.prototype.first || function() {
      return this[0] || null
    }

    //----------------------//
    //       Triggers       //
    //----------------------//

    const XHR = window.XMLHttpRequest

    function xhr() {

      const xhr = new XHR()

      xhr.addEventListener("readystatechange", function() {

        if(xhr.readyState != 4) return

        try {

          const response_url = xhr.responseURL

          if (response_url.includes("cart/add")) {

            window.__latest_cart = JSON.parse(xhr.response)

            onCartItemsAdded() // ok

          }

          if (response_url.includes("cart/remove_item_quantity")) {

            window.__latest_cart = JSON.parse(xhr.response)

            onCartItemRemoved() // ok

          }

          if (response_url.includes("new_cart?retrieve=true")) {

            result = JSON.parse(xhr.response)

            if (result.cart) {
              window.__latest_cart = result.cart
            }

          }

        } catch(e) {

          console.error(e)

        }

      }, false);

      return xhr

    }

    window.XMLHttpRequest = xhr

    switch(template) {

      case 'cart': onCartView() // ok
      break
      case 'product': onProductView() // ok
      break
      case 'collection': onCollectionView() // ok
      break
      case 'blog': onBlogView()
      break
      case 'article': onArticleView()
      break
      case 'payment_completed': onOrderPlace()
      break
      case 'payment_fail': onPaymentFail()
      break

    }

    // _selector('form[action="/checkout/payments"]').addEventListener("submit", onPaymentInfoAdded(_selector('form[action="/checkout/payments"]')))
    if (_selector('form[action="/checkout/detail"]'))                            _selector('form[action="/checkout/detail"]').addEventListener("submit", ()=>{onShippingInfoAdded(_selector('form[action="/checkout/detail"]'))})  // ok
    if (_selector('form[action="/checkout/shipping"]'))                          _selector('form[action="/checkout/shipping"]').addEventListener("submit", ()=>{onShippingInfoAdded(_selector('form[action="/checkout/shipping"]'))})  // ok
    if (_selector('form[action="/account/register"]'))                           _selector('form[action="/account/register"]').addEventListener("submit", onSignUp)  // ok
    if (_selector('form[action="/account/login"]'))                              _selector('form[action="/account/login"]').addEventListener("submit", onLogin)  // ok
    if (_selector('form[action="/search"]'))                                     _selector('form[action="/search"]').addEventListener("submit", onProductSearch()) // ok
    if (_selector('#line-login-btn'))                                            _selector('#line-login-btn').addEventListener('click', onLineLogin) // ok
    if (_selector('#PlaceOrder'))                                                _selector('#PlaceOrder').addEventListener("click", ()=>{onCheckoutComplete(_selector('form[action="/checkout/payments"]'))});  // ok
    if (_selector('#add_wishlist'))                                              _selector('#add_wishlist').addEventListener("click", onWishlistItemAdded) // ok
    if (_selectorAll('a[href="/account/logout"]'))                               _selectorAll('a[href="/account/logout"]').forEach(logoutButton => logoutButton.addEventListener("click", onLogout)) // ok
    if (_selector('.CartDrawerTrigger.cart-page-link'))                          _selector('.CartDrawerTrigger.cart-page-link').addEventListener("click", onCartView) // ok
    if (_selector('.CartDrawerTrigger.cart-page-link.mobile-cart-page-link'))    _selector('.CartDrawerTrigger.cart-page-link.mobile-cart-page-link').addEventListener("click", onCartView) // ok
    if (_selectorAll('a[class^="share-"]'))                                      _selectorAll('a[class^="share-"]').forEach(shareButton => shareButton.addEventListener("click", ()=>{onProductShare(shareButton)}) ) // ok
    if (_selectorAll('[name$="checkout"]'))                                      _selectorAll('[name$="checkout"]').forEach(checkoutButton => checkoutButton.addEventListener("click", onCheckoutInitiate))

    // For append elements
    const bodyMutationObserver = new MutationObserver(() => {
      if (_selector('#form__spc #PlaceOrder'))             _selector('#form__spc #PlaceOrder').addEventListener("click", onSinglePageCheckout) // ok
      if (_selectorAll('[name$="checkout"]'))              _selectorAll('[name$="checkout"]').forEach(checkoutButton => checkoutButton.addEventListener("click", onCheckoutInitiate))
    });
    bodyMutationObserver.observe(_selector("body"), {subtree: true, childList: true});

    //------------------------------//
    //        Event handlers        //
    //------------------------------//

    function onPageView() {

      EasyStore.Event.dispatch('pages/viewed', {
        page: {
          type: template,
          title: document.title,
          description: _selector('meta[name=description]') ? _selector('meta[name=description]').getAttribute('content') : null,
          url: location.href,
        }
      })

    }

    function onSignUp() {

      const email_regex = new RegExp(/^[a-zA-Z0-9.!#$%&"*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/)
      const phone_regex = new RegExp(/^(\+?6?01)[0-46-9]-*[0-9]{7,8}$/)

      const email_or_phone = _selector(`input[name="customer[email_or_phone]"]`).value.replace("+", "").replace(/\s+/, "")

      let data = {}

      if (email_regex.test(email_or_phone)) {
        data.method = 'email'
        data.email = email_or_phone
      }

      if (phone_regex.test(email_or_phone)) {
        data.method = "phone"
        data.phone = email_or_phone
      }

      if (!data.method) return

      EasyStore.Event.dispatch('customers/signup', data)

    }

    function onLogin() {

      const email_regex = new RegExp(/^[a-zA-Z0-9.!#$%&"*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/)
      const phone_regex = new RegExp(/^(\+?6?01)[0-46-9]-*[0-9]{7,8}$/)

      const email_or_phone = _selector(`input[name="customer[email_or_phone]"]`).value.replace("+", "").replace(/\s+/, "")

      let data = {}

      if (email_regex.test(email_or_phone)) {
        data.method = 'email'
        data.email = email_or_phone
      }

      if (phone_regex.test(email_or_phone)) {
        data.method = "phone"
        data.phone = email_or_phone
      }

      if (!data.method) return

      EasyStore.Event.dispatch('customers/login', data)

    }

    function onLineLogin() {

      EasyStore.Event.dispatch('customers/login', { method: 'line' })

    }

    function onLogout() {

      EasyStore.Event.dispatch('customers/logout', { customer_id })

    }

    function onBlogView() {

      const blog = ""

      EasyStore.Event.dispatch('blogs/viewed', { blog })

    }

    function onArticleView() {

      const article = ""

      EasyStore.Event.dispatch('articles/viewed', { article })

    }

    function onProductSearch() {

      const query = _selector('input[name=q]').value

      if (!query) return

      EasyStore.Event.dispatch('products/searched', { query })

    }

    function onCollectionView() {

      const collection = {"id":410184,"handle":"feature-on-homepage","name":"Feature on homepage","title":"Feature on homepage","url":"\/collections\/feature-on-homepage","description":"","content":"","featured_image":{"src":null},"products":[{"id":5889678,"handle":"complete-one-6-pcs--1","name":"Complete One (6 Pcs)","title":"Complete One (6 Pcs)","url":"\/products\/complete-one-6-pcs--1","share_url":"https:\/\/www.insbeaute.com\/products\/complete-one-6-pcs--1","price":535,"price_min":"535.0","price_max":"535.0","price_varies":false,"compare_at_price":540,"compare_at_price_min":"540.0","compare_at_price_max":"540.0","compare_at_price_varies":false,"available":true,"options_with_values":[],"options_by_name":[],"options":["Title"],"has_only_default_variant":true,"sole_variant_id":26297202,"variants":[{"id":26297202,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":5,"featured_image":{"id":33275650,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","height":1391,"width":1738,"position":1,"type":"Images"},"price":53500,"compare_at_price":54000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null}],"selected_variant":{"id":26297202,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":5,"featured_image":{"id":33275650,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","height":1391,"width":1738,"position":1,"type":"Images"},"price":53500,"compare_at_price":54000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"first_available_variant":{"id":26297202,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":5,"featured_image":{"id":33275650,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","height":1391,"width":1738,"position":1,"type":"Images"},"price":53500,"compare_at_price":54000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"selected_or_first_available_variant":{"id":26297202,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":5,"featured_image":{"id":33275650,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","height":1391,"width":1738,"position":1,"type":"Images"},"price":53500,"compare_at_price":54000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","featured_image":{"id":33275650,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","height":1391,"width":1738,"position":1,"type":"Images"},"secondary_image":{"id":33275651,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275651.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275651.jpg","height":821,"width":1327,"position":2,"type":"Images"},"images":[{"id":33275650,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","height":1391,"width":1738,"position":1,"type":"Images"},{"id":33275651,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275651.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275651.jpg","height":821,"width":1327,"position":2,"type":"Images"}],"media":[{"id":33275650,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","height":1391,"width":1738,"position":1,"type":"Images"},{"id":33275651,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275651.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275651.jpg","height":821,"width":1327,"position":2,"type":"Images"}],"featured_media":{"id":33275650,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275650.png","height":1391,"width":1738,"position":1,"type":"Images"},"metafields":{"productlabel":{"type":"style","value":"Pack Deal","style":"background-color:rgb(245, 111, 0);color:rgb(255, 255, 255);font-size:12px;","class":"prodlabelv2-ribbon prodlabelv2-top_right"}},"expires":null,"published_at":"2023-07-04T19:09:00.000+08:00","created_at":"2021-08-09T17:59:51.000+08:00","is_wishlisted":null,"highlight":{"data":null,"state":null,"is_auto_generation_required":false},"common_questions":{"data":null,"state":null,"is_auto_generation_required":false}},{"id":5889685,"handle":"duo-set-glow-1","name":"Duo Set Glow (Refine Serum + Glow Essence)","title":"Duo Set Glow (Refine Serum + Glow Essence)","url":"\/products\/duo-set-glow-1","share_url":"https:\/\/www.insbeaute.com\/products\/duo-set-glow-1","price":178,"price_min":"178.0","price_max":"178.0","price_varies":false,"compare_at_price":180,"compare_at_price_min":"180.0","compare_at_price_max":"180.0","compare_at_price_varies":false,"available":true,"options_with_values":[],"options_by_name":[],"options":["Title"],"has_only_default_variant":true,"sole_variant_id":26297209,"variants":[{"id":26297209,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":10,"featured_image":{"id":33505117,"alt":"Duo set Glow Essence and Refine Serum 4.3.jpg","img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","height":1017,"width":762,"position":1,"type":"Images"},"price":17800,"compare_at_price":18000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null}],"selected_variant":{"id":26297209,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":10,"featured_image":{"id":33505117,"alt":"Duo set Glow Essence and Refine Serum 4.3.jpg","img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","height":1017,"width":762,"position":1,"type":"Images"},"price":17800,"compare_at_price":18000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"first_available_variant":{"id":26297209,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":10,"featured_image":{"id":33505117,"alt":"Duo set Glow Essence and Refine Serum 4.3.jpg","img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","height":1017,"width":762,"position":1,"type":"Images"},"price":17800,"compare_at_price":18000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"selected_or_first_available_variant":{"id":26297209,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":10,"featured_image":{"id":33505117,"alt":"Duo set Glow Essence and Refine Serum 4.3.jpg","img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","height":1017,"width":762,"position":1,"type":"Images"},"price":17800,"compare_at_price":18000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","featured_image":{"id":33505117,"alt":"Duo set Glow Essence and Refine Serum 4.3.jpg","img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","height":1017,"width":762,"position":1,"type":"Images"},"secondary_image":{"alt":"","img_url":"","src":"","type":""},"images":[{"id":33505117,"alt":"Duo set Glow Essence and Refine Serum 4.3.jpg","img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","height":1017,"width":762,"position":1,"type":"Images"}],"media":[{"id":33505117,"alt":"Duo set Glow Essence and Refine Serum 4.3.jpg","img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","height":1017,"width":762,"position":1,"type":"Images"}],"featured_media":{"id":33505117,"alt":"Duo set Glow Essence and Refine Serum 4.3.jpg","img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33505117.jpg","height":1017,"width":762,"position":1,"type":"Images"},"metafields":{"productlabel":{"type":"style","value":" Special Deal DUO SET","style":"background-color:rgb(67, 189, 32);color:rgb(255, 255, 255);font-size:12px;","class":"prodlabelv2-circle prodlabelv2-top_right"}},"expires":null,"published_at":"2023-06-14T22:59:00.000+08:00","created_at":"2021-08-09T18:01:08.000+08:00","is_wishlisted":null,"highlight":{"data":null,"state":null,"is_auto_generation_required":false},"common_questions":{"data":null,"state":null,"is_auto_generation_required":false}},{"id":5889689,"handle":"duo-set-restorer-1","name":"Duo Set Restorer (Refine Serum + Restorer Essence)","title":"Duo Set Restorer (Refine Serum + Restorer Essence)","url":"\/products\/duo-set-restorer-1","share_url":"https:\/\/www.insbeaute.com\/products\/duo-set-restorer-1","price":178,"price_min":"178.0","price_max":"178.0","price_varies":false,"compare_at_price":180,"compare_at_price_min":"180.0","compare_at_price_max":"180.0","compare_at_price_varies":false,"available":true,"options_with_values":[],"options_by_name":[],"options":["Title"],"has_only_default_variant":true,"sole_variant_id":26297239,"variants":[{"id":26297239,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":8,"featured_image":{"id":33275719,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","height":1207,"width":904,"position":1,"type":"Images"},"price":17800,"compare_at_price":18000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null}],"selected_variant":{"id":26297239,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":8,"featured_image":{"id":33275719,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","height":1207,"width":904,"position":1,"type":"Images"},"price":17800,"compare_at_price":18000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"first_available_variant":{"id":26297239,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":8,"featured_image":{"id":33275719,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","height":1207,"width":904,"position":1,"type":"Images"},"price":17800,"compare_at_price":18000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"selected_or_first_available_variant":{"id":26297239,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":8,"featured_image":{"id":33275719,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","height":1207,"width":904,"position":1,"type":"Images"},"price":17800,"compare_at_price":18000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","featured_image":{"id":33275719,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","height":1207,"width":904,"position":1,"type":"Images"},"secondary_image":{"alt":"","img_url":"","src":"","type":""},"images":[{"id":33275719,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","height":1207,"width":904,"position":1,"type":"Images"}],"media":[{"id":33275719,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","height":1207,"width":904,"position":1,"type":"Images"}],"featured_media":{"id":33275719,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33275719.jpg","height":1207,"width":904,"position":1,"type":"Images"},"metafields":{"productlabel":{"type":"style","value":" Special Deal DUO SET","style":"background-color:rgb(67, 189, 32);color:rgb(255, 255, 255);font-size:12px;","class":"prodlabelv2-circle prodlabelv2-top_right"}},"expires":null,"published_at":"2023-09-19T17:35:00.000+08:00","created_at":"2021-08-09T18:02:03.000+08:00","is_wishlisted":null,"highlight":{"data":null,"state":null,"is_auto_generation_required":false},"common_questions":{"data":null,"state":null,"is_auto_generation_required":false}},{"id":5888660,"handle":"insb-derma-cleanser-1","name":"InsB Derma Cleanser 150ml","title":"InsB Derma Cleanser 150ml","url":"\/products\/insb-derma-cleanser-1","share_url":"https:\/\/www.insbeaute.com\/products\/insb-derma-cleanser-1","price":90,"price_min":"90.0","price_max":"90.0","price_varies":false,"compare_at_price":90,"compare_at_price_min":"90.0","compare_at_price_max":"90.0","compare_at_price_varies":false,"available":true,"options_with_values":[],"options_by_name":[],"options":["Title"],"has_only_default_variant":true,"sole_variant_id":26292370,"variants":[{"id":26292370,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":12,"featured_image":{"id":33270361,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","height":1280,"width":959,"position":1,"type":"Images"},"price":9000,"compare_at_price":9000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null}],"selected_variant":{"id":26292370,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":12,"featured_image":{"id":33270361,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","height":1280,"width":959,"position":1,"type":"Images"},"price":9000,"compare_at_price":9000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"first_available_variant":{"id":26292370,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":12,"featured_image":{"id":33270361,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","height":1280,"width":959,"position":1,"type":"Images"},"price":9000,"compare_at_price":9000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"selected_or_first_available_variant":{"id":26292370,"title":"Default Title","sku":"","taxable":false,"barcode":"","available":true,"inventory_quantity":12,"featured_image":{"id":33270361,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","height":1280,"width":959,"position":1,"type":"Images"},"price":9000,"compare_at_price":9000,"is_enabled":true,"options":["Default Title"],"option1":"Default Title","option2":null,"option3":null},"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","featured_image":{"id":33270361,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","height":1280,"width":959,"position":1,"type":"Images"},"secondary_image":{"alt":"","img_url":"","src":"","type":""},"images":[{"id":33270361,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","height":1280,"width":959,"position":1,"type":"Images"}],"media":[{"id":33270361,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","height":1280,"width":959,"position":1,"type":"Images"}],"featured_media":{"id":33270361,"alt":null,"img_url":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","src":"https:\/\/cdn.store-assets.com\/s\/257904\/i\/33270361.jpg","height":1280,"width":959,"position":1,"type":"Images"},"metafields":[],"expires":null,"published_at":"2023-06-14T23:06:29.000+08:00","created_at":"2021-08-09T15:58:14.000+08:00","is_wishlisted":null,"highlight":{"data":null,"state":null,"is_auto_generation_required":false},"common_questions":{"data":null,"state":null,"is_auto_generation_required":false}}],"sort_by":"featured","product_count":4}

      EasyStore.Event.dispatch('collections/viewed', { collection })

    }

    function onProductView() {

      const product = ""

      EasyStore.Event.dispatch("products/viewed", { product })

    }

    function onProductShare(el) {

      const product = ""

      const channel = el.getAttribute("class").split("-").last()

      EasyStore.Event.dispatch('products/shared', { product, channel })

    }

    function onWishlistItemAdded() {

      let product  = ""
      const quantity = _selector("#Quantity").value

      EasyStore.Event.dispatch('wishlists/item_added', { product })

    }

    async function onCartItemsAdded() {

      const cart = await getCart()

      if(cart && cart.items != undefined && cart.items.length > 0) {

        EasyStore.Event.dispatch('carts/item_added', { cart })

      }

    }

    async function onCartView() {

      const cart = await getCart()

      EasyStore.Event.dispatch('carts/viewed', { cart })

    }

    async function onCartItemRemoved() {

      const cart = await getCart()

      cart.items = []

      if(cart) {

        EasyStore.Event.dispatch('carts/item_removed', { cart })

      }

    }

    async function onCheckoutInitiate() {

      const cart = await getCart()

      EasyStore.Event.dispatch('checkouts/initiated', { cart })

    }

    async function onShippingInfoAdded(form) {
      let checkout = getCheckout()

      let form_data = {}
      new FormData(form).forEach((value, key) => form_data[key] = value)

      let shipping_tier = null

      if (form_data.type && form_data.type.startsWith("r_pickup")) {
        shipping_tier = `Pickup - ${form_data.pick_location}`
      }

      if (form_data.s_id) {
        shipping_tier = _selector(`input[id='`+form_data.s_id+`']`).getAttribute("data-shipping-name")
      }

      if (!shipping_tier) return

      EasyStore.Event.dispatch('checkouts/shipping_info_added', { checkout, shipping_tier })

    }

    async function onPaymentInfoAdded(form) {

      let checkout = getCheckout()

      let payment_type = new FormData(form).get('payment_method')

      EasyStore.Event.dispatch("checkouts/payment_info_added", { checkout, payment_type })

    }

    async function onOrderPlace() {

      let cart_token  = getCookie("cart_js")
      let previous_cart_token = getCookie("previous_cart_ga4_js")

      if (previous_cart_token && previous_cart_token == cart_token) {
        // Prevent duplicate purchase tracking
        return
      }

      let order = getOrder()

      EasyStore.Event.dispatch('orders/placed', { order })

      if(order.is_manual_payment) {

        EasyStore.Event.dispatch('orders/purchased', { order })

      }

      const last_transaction = order.transactions.last()

      if (last_transaction.status) {

        EasyStore.Event.dispatch('orders/purchased', { order })
        EasyStore.Event.dispatch('payments/captured', { order })

      }

    }

    async function onPaymentFail() {

      const order = getOrder()

      EasyStore.Event.dispatch('payments/failed', { order })

    }

    async function onCheckoutComplete(form) {

      onPaymentInfoAdded(form)

      const checkout = getCheckout()

      EasyStore.Event.dispatch('checkouts/completed', { checkout })

    }

    async function onSinglePageCheckout() {

      // let checkout = $("[data-app-checkout]").data("app-checkout")

      let checkout = getCheckout()

      // const payment_type = _selector("#app_spc_payment_method").find(`[class*="label-content"]`).first().find("b").first().text()
      const payment_type = _selector("#app_spc_payment_method").getElementsByClassName('label-content')[0].getElementsByTagName('b')[0].innerHTML

      const shipping_method = _selector("#delivery_method").value

      let shipping_tier = null
      let app_spc_customer_info_label = _selector("#app_spc_customer_info").getElementsByClassName('label-content')
      if (shipping_method == "shipping") {
        shipping_tier = app_spc_customer_info_label[app_spc_customer_info_label.length - 1].getElementsByTagName('b')[0].innerHTML
      }

      if (shipping_method == "pickup") {
        shipping_tier = app_spc_customer_info_label[0].innerHTML
      }

      if (shipping_tier) {

        EasyStore.Event.dispatch('checkouts/shipping_info_added', {
          checkout,
          shipping_tier,
        })

      }

      if (payment_type) {

        EasyStore.Event.dispatch('checkouts/payment_info_added', {
          checkout,
          payment_type,
        })

      }

      EasyStore.Event.dispatch('checkouts/completed', { checkout })

    }

  })


  //-----------------------//
  //       Functions       //
  //-----------------------//

  function getCookie(name) {

    name += "="

    decodedCookie = decodeURIComponent(document.cookie)

    ca = decodedCookie.split(";")

    for(i = 0; i < ca.length; i++) {
      c = ca[i]
      while (c.charAt(0) == " ") {
        c = c.substring(1)
      }
      if (c.indexOf(name) == 0) {
        return c.substring(name.length, c.length)
      }
    }

    return ""

  }

  const parsePrice = price => {
    if(typeof price === 'string') {
      return parseFloat(price.split(',').join(''))
    }

    return price
  }

  const requestCart = async (method, data) => {

  let response = await fetch('/cart.json', {method: 'GET',headers: {'Content-Type': 'application/json'}})
    result = await response.json()

    return result.cart

  }
  const getCart = async (latest = false) => {

    let cart = window.__latest_cart

    const cart_invalid = !cart || !cart.items || (cart.total_price > 0 && !cart.items.length)

    if(latest || cart_invalid) {
      cart = await requestCart()
    }

    cart.items = cart.items || []

    return mapCart(cart)

  }

  const getCheckout = async () => {
    mapCheckout(window.__latest_cart || await requestCart())
  }

  const getOrder = async () => {
    mapOrder(window.__latest_cart || await requestCart())
  }

  //-----------------------//
  //        Mappers        //
  //-----------------------//

  const fallbackAttribute = (object, attribute) => {

    if(!Array.isArray(attribute)) {
      attribute = [attribute]
    }

    let final_value = null

    do {

      final_value = object[attribute.shift()]

    } while(!final_value && attribute.length)

    return final_value

  }

  const map = (object, mapper) => {

    const newObject = {}

    for(const key in mapper) {

      // Handle different keys between new and old format
      newObject[key] = fallbackAttribute(object, mapper[key])

      // Cast price to float
      if(newObject[key] && ['price', 'amount', 'discount', 'discounts'].some(x => key.endsWith(x))) {
        newObject[key] = parsePrice(newObject[key])
      }

      if(newObject[key] === undefined) {
        delete newObject[key]
      }

    }

    return newObject

  }

  const mapCart = cart => {

    const oldCart = cart

    const mapper = {
      id: 'id',
      currency: 'currency',
      item_count: 'item_count',
      items: 'items',
      total_price: 'total_price',
      latest_items: 'latest_items'
    }

    cart = map(cart, mapper)

    const discounts = (oldCart.storewide_discounts || []).concat((oldCart.voucher_discounts || []))

    cart.discount_applications = discounts.map(discount => ({
      title: discount.voucher_code || null,
      value: parsePrice(discount.amount),
    }))

    cart.original_total_price = cart.items.length
    ? cart.items
      .map(item => item.original_price)
      .reduce((sum, price) => sum + price)
    : 0

    cart.total_discount = cart.discount_applications.length
    ? cart.discount_applications
      .map(discount => parsePrice(discount.value))
      .reduce((sum, value) => sum + value)
    : 0

    cart.items = cart.items.map(item => mapLineItem(item))

    return cart

  }

  const mapCheckout = checkout => {

    const mapper = {
      note: 'note',
      attributes: 'note_attributes',
      billing_address: 'billing_address',
      currency: 'currency',
      customer_id: 'customer_id',
      discounts_amount: 'total_discount',
      id: 'id',
      line_items: 'order_item',
      order_number: 'order_number',
      shipping_address: 'shipping_address',
      shipping_price: 'shipping_tax',
      shipping_method: 'shipping_method_name',
      tax_price: 'total_tax',
    }

    checkout = map(checkout, mapper)

    checkout.requires_shipping = checkout.line_items.some(item => item.shipping_required)

    checkout.line_items = checkout.line_items.map(item => mapLineItem(item))

    return checkout

  }

  const mapOrder = order => {

    const mapper = {
      attributes: 'note_attributes',
      billing_address: 'billing_address',
      cancelled: 'is_cancelled',
      cancelled_at: 'cancelled_at',
      created_at: 'created_at',
      customer_id: 'customer_id',
      // discount_applications: 'discount_applications',
      email: 'email',
      financial_status: 'financial_status',
      fulfillment_status: 'fulfillment_status',
      line_items: 'order_item',
      note: 'note',
      order_number: 'order_number',
      phone: 'phone',
      shipping_address: 'shipping_address',
      shipping_methods: 'shipping_methods',
      shipping_price: 'total_shipping',
      subtotal_price: 'subtotal_price',
      // tax_lines: 'tax_lines',
      tax_price: 'total_tax',
      total_discounts: 'total_discount',
      total_net_amount: 'total_amount_include_transaction',
      total_price: 'total_price',
      transactions: 'transaction_records',
      is_manual_payment: 'is_manual_payment',
    }

    order.email = order.billing_address.email
    order.phone = order.billing_address.phone
    order.shipping_method = order.shipping_method_name

    order = map(order, mapper)

    order.line_items = order.line_items.map(item => mapLineItem(item))
    order.transactions = order.transactions.map(transaction => mapTransaction(transaction))

    return order

  }

  const mapLineItem = line_item => {

    const old_line_item = line_item

    const mapper = {
      final_price: 'price',
      image: 'img_url',
      message: 'message',
      original_line_price: 'original_line_price',
      original_price: 'original_price',
      properties: 'properties',
      quantity: 'quantity',
      requires_shipping: 'shipping_required',
      sku: 'sku',
      taxable: 'taxable',
      title: 'product_name',
      product_name: 'product_name',
      url: 'url',
      product_id: 'product_id',
      variant_id: 'variant_id',
      id: ['id', 'i_id'],
    }

    line_item = map(line_item, mapper)

    line_item.product_id = line_item.product_id || (old_line_item.product && old_line_item.product.id) || null
    line_item.variant_id = line_item.variant_id || (old_line_item.variant && old_line_item.variant.id) || null
    line_item.image      = line_item.image || (old_line_item.image && old_line_item.image.url) || null

    return line_item

  }

  const mapTransaction = transaction => {

    const mapper = {
      amount: 'amount',
      created_at: 'created_at',
      gateway: 'gateway_type',
      id: 'id',
      status: 'status',
    }

    transaction = map(transaction, mapper)

    return transaction

  }


</script>

</div>
</body>
</html>
