PageSourceSearch

https://www.clearviewestate.co.nz/cart

html clearviewestate.co.nz collected 2026-09-26 14:59:47 UTC 150,901 bytes, 2,735 lines download raw bytes

1<!DOCTYPE html>
2<html lang="en">
3  <head>
4    <meta charset="utf-8">
5    <meta http-equiv="cleartype" content="on">
6    <meta name="robots" content="index,follow">
7
8    
9    <title>Your Shopping Cart - Clearview Estate</title>
10
11    
12
13    
14
15<meta name="author" content="Clearview Estate">
16<meta property="og:url" content="https://www.clearviewestate.co.nz/cart">
17<meta property="og:site_name" content="Clearview Estate">
18
19
20  <meta property="og:type" content="website">
21  <meta property="og:title" content="Your Shopping Cart">
22
23
24
25
26
27<meta name="twitter:card" content="summary">
28
29
30
31    
32    
33
34    <!-- Mobile Specific Metas -->
35    <meta name="HandheldFriendly" content="True">
36    <meta name="MobileOptimized" content="320">
37    <meta name="viewport" content="width=device-width,initial-scale=1">
38    <meta name="theme-color" content="#f9f7f0">
39
40    <!-- Stylesheets for Mobilia 5.5.9 -->
41    <link href="//www.clearviewestate.co.nz/cdn/shop/t/26/assets/styles.scss.css?v=93489109848287449251781668313" rel="stylesheet" type="text/css" media="all" />
42
43    <!-- Icons -->
44    
45      <link rel="shortcut icon" type="image/png" href="//www.clearviewestate.co.nz/cdn/shop/files/CEW_Koru_Black_32x32.png?v=1613679700">
46      <link rel="icon" type="image/png" sizes="192x192" href="//www.clearviewestate.co.nz/cdn/shop/files/CEW_Koru_Black_192x192.png?v=1613679700">
47      <link rel="apple-touch-icon" sizes="180x180" href="//www.clearviewestate.co.nz/cdn/shop/files/CEW_Koru_Black_180x180.png?v=1613679700">
48      <link rel="icon" type="image/png" sizes="32x32" href="//www.clearviewestate.co.nz/cdn/shop/files/CEW_Koru_Black_32x32.png?v=1613679700">
49      <link rel="icon" type="image/png" sizes="16x16" href="//www.clearviewestate.co.nz/cdn/shop/files/CEW_Koru_Black_16x16.png?v=1613679700">
50    
51
52    <link rel="canonical" href="https://www.clearviewestate.co.nz/cart" />
53
54    
55
56    
56<script src="//www.clearviewestate.co.nz/cdn/shop/t/26/assets/app.js?v=125903741229031384021747885910" type="text/javascript"></script>
56
57    
57<script>window.performance && window.performance.mark && window.performance.mark('shopify.content_for_header.start');</script>
57<meta id="shopify-digital-wallet" name="shopify-digital-wallet" content="/3674538084/digital_wallets/dialog">
58<link rel="ucp" href="/.well-known/ucp" version="2026-08-25">
58<script async="async" src="/checkouts/internal/preloads.js?locale=en-NZ"></script>
58
59<link rel="preconnect" href="https://shop.app" crossorigin="anonymous">
60<script async="async" src="https://shop.app/checkouts/internal/preloads.js?locale=en-NZ&shop_id=3674538084" crossorigin="anonymous"></script>
vendor: 1 bytes, line 60
60
61<script id="shopify-features" type="application/json">{"accessToken":"98742d47e5f6a0ee6fe80dee8876a905","betas":["rich-media-storefront-analytics"],"domain":"www.clearviewestate.co.nz","predictiveSearch":true,"shopId":3674538084,"locale":"en"}</script>
vendor: 1 bytes, line 61
61
62<script>var Shopify = Shopify || {};
63Shopify.shop = "cve1.myshopify.com";
64Shopify.locale = "en";
65Shopify.currency = {"active":"NZD","rate":"1.0"};
66Shopify.country = "NZ";
67Shopify.theme = {"name":"Backup Current site theme | Bundles | May 2025","id":145439588530,"schema_name":"Mobilia","schema_version":"5.5.9","theme_store_id":464,"role":"main"};
68Shopify.theme.handle = "null";
69Shopify.theme.style = {"id":null,"handle":null};
70Shopify.cdnHost = "www.clearviewestate.co.nz/cdn";
71Shopify.routes = Shopify.routes || {};
72Shopify.routes.root = "/";
73Shopify.shopJsCdnBaseUrl = "https://cdn.shopify.com/shopifycloud/shop-js";
74Shopify.SignInWithShop = Shopify.SignInWithShop || {};
75Shopify.SignInWithShop.User = Shopify.SignInWithShop.User || {};
76Shopify.SignInWithShop.User.recognized = false;</script>
vendor: 1 bytes, line 76
76
77<script type="module">!function(o){(o.Shopify=o.Shopify||{}).modules=!0}(window);</script>
vendor: 1 bytes, line 77
77
78<script>!function(o){function n(){var o=[];function n(){o.push(Array.prototype.slice.apply(arguments))}return n.q=o,n}var t=o.Shopify=o.Shopify||{};t.loadFeatures=n(),t.autoloadFeatures=n()}(window);</script>
vendor: 1 bytes, line 78
78
79<script>
80  window.ShopifyPay = window.ShopifyPay || {};
81  window.ShopifyPay.apiHost = "shop.app\/pay";
82  window.ShopifyPay.redirectState = null;
83</script>
vendor: 1 bytes, line 83
83
84<script>
85  window.Shopify = window.Shopify || {};
86  window.Shopify.SignInWithShop = window.Shopify.SignInWithShop || {};
87  window.Shopify.SignInWithShop.assetMetrics = { sampleRate: 0.25 };
88  window.Shopify.SignInWithShop.eligible = true;
89</script>
vendor: 1 bytes, line 89
89
90<script id="shop-js-analytics" type="application/json">{"pageType":"cart"}</script>
vendor: 1 bytes, line 90
90
91<script defer="defer" async type="module" src="https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-shop-cart-sync.en.esm.js"></script>
vendor: 1 bytes, line 91
91
92<script type="module">
93  await import("https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-shop-cart-sync.en.esm.js");
94
95  window.Shopify.SignInWithShop?.initShopCartSync?.({"fedCMEnabled":true,"windoidEnabled":true});
96
97</script>
vendor: 1 bytes, line 97
97
98<script>
99  window.Shopify = window.Shopify || {};
100  if (!window.Shopify.featureAssets) window.Shopify.featureAssets = {};
101  window.Shopify.featureAssets['shop-js'] = {"avatar":["modules/v2/loader.avatar.en.esm.js"],"checkout-modal":["modules/v2/loader.checkout-modal.en.esm.js"],"init-customer-accounts-sign-up":["modules/v2/loader.init-customer-accounts-sign-up.en.esm.js"],"init-customer-accounts":["modules/v2/loader.init-customer-accounts.en.esm.js"],"init-fed-cm":["modules/v2/loader.init-fed-cm.en.esm.js"],"init-shop-cart-sync":["modules/v2/loader.init-shop-cart-sync.en.esm.js"],"init-shop-email-lookup-coordinator":["modules/v2/loader.init-shop-email-lookup-coordinator.en.esm.js"],"init-shop-for-new-customer-accounts":["modules/v2/loader.init-shop-for-new-customer-accounts.en.esm.js"],"init-shop-user-recognition":["modules/v2/loader.init-shop-user-recognition.en.esm.js"],"init-windoid":["modules/v2/loader.init-windoid.en.esm.js"],"lead-capture":["modules/v2/loader.lead-capture.en.esm.js"],"listener":["modules/v2/loader.listener.en.esm.js"],"pay-button":["modules/v2/loader.pay-button.en.esm.js"],"payment-terms":["modules/v2/loader.payment-terms.en.esm.js"],"shop-button":["modules/v2/loader.shop-button.en.esm.js"],"shop-cart-sync":["modules/v2/loader.shop-cart-sync.en.esm.js"],"shop-cash-offers":["modules/v2/loader.shop-cash-offers.en.esm.js"],"shop-follow-button":["modules/v2/loader.shop-follow-button.en.esm.js"],"shop-login-button":["modules/v2/loader.shop-login-button.en.esm.js"],"shop-login":["modules/v2/loader.shop-login.en.esm.js"],"shop-toast-manager":["modules/v2/loader.shop-toast-manager.en.esm.js"],"shop-user-recognition":["modules/v2/loader.shop-user-recognition.en.esm.js"]};
102</script>
vendor: 1 bytes, line 102
102
103<script>(function() {
104  var isLoaded = false;
105  function asyncLoad() {
106    if (isLoaded) return;
107    isLoaded = true;
108    var urls = ["\/\/www.powr.io\/powr.js?powr-token=cve1.myshopify.com\u0026external-type=shopify\u0026shop=cve1.myshopify.com","https:\/\/client.lifteragecheck.com\/js\/age.js?shop=cve1.myshopify.com","https:\/\/shy.elfsight.com\/p\/platform.js?shop=cve1.myshopify.com","\/\/cdn.secomapp.com\/promotionpopup\/cdn\/allshops\/cve1\/1587868282.js?shop=cve1.myshopify.com","https:\/\/chimpstatic.com\/mcjs-connected\/js\/users\/2b65ae76ff8ddcc0e71f01f44\/b52f68580a48b991069e4b112.js?shop=cve1.myshopify.com"];
109    for (var i = 0; i < urls.length; i++) {
110      var s = document.createElement('script');
111      s.type = 'text/javascript';
112      s.async = true;
113      s.src = urls[i];
114      var x = document.getElementsByTagName('script')[0];
115      x.parentNode.insertBefore(s, x);
116    }
117  };
118  if(window.attachEvent) {
119    window.attachEvent('onload', asyncLoad);
120  } else {
121    window.addEventListener('load', asyncLoad, false);
122  }
123})();</script>
vendor: 1 bytes, line 123
123
124<script id="__st">var __st={"a":3674538084,"offset":46800,"reqid":"69c9b894-947f-4bc5-8323-2265300e243c-1790434787","pageurl":"www.clearviewestate.co.nz\/cart","u":"1eb564611433","p":"cart"};</script>
vendor: 1 bytes, line 124
124
125<script>window.ShopifyPaypalV4VisibilityTracking = true;</script>
vendor: 1 bytes, line 125
125
126<script id="captcha-bootstrap">!function(){'use strict';const t='contact',e='account',n='new_comment',o=[[t,t],['blogs',n],['comments',n],[t,'customer']],c=[[e,'customer_login'],[e,'guest_login'],[e,'recover_customer_password'],[e,'create_customer']],r=t=>t.map((([t,e])=>`form[action*='/${t}']:not([data-nocaptcha='true']) input[name='form_type'][value='${e}']`)).join(','),a=t=>()=>t?[...document.querySelectorAll(t)].map((t=>t.form)):[];function s(){const t=[...o],e=r(t);return a(e)}const i='password',u='form_key',d=['recaptcha-v3-token','g-recaptcha-response','h-captcha-response',i],f=()=>{try{return window.sessionStorage}catch{return}},m='__shopify_v',_=t=>t.elements[u];function p(t,e,n=!1){try{const o=window.sessionStorage,c=JSON.parse(o.getItem(e)),{data:r}=function(t){const{data:e,action:n}=t;return t[m]||n?{data:e,action:n}:{data:t,action:n}}(c);for(const[e,n]of Object.entries(r))t.elements[e]&&(t.elements[e].value=n);n&&o.removeItem(e)}catch(o){console.error('form repopulation failed',{error:o})}}const l='form_type',E='cptcha';function T(t){t.dataset[E]=!0}const w=window,h=w.document,L='Shopify',v='ce_forms',y='captcha';let A=!1;((t,e)=>{const n=(g='f06e6c50-85a8-45c8-87d0-21a2b65856fe',I='https://cdn.shopify.com/shopifycloud/storefront-forms-hcaptcha/ce_storefront_forms_captcha_hcaptcha.v1.5.3.iife.js',D={infoText:'Protected by hCaptcha',privacyText:'Privacy',termsText:'Terms'},(t,e,n)=>{const o=w[L][v],c=o.bindForm;if(c)return c(t,g,e,D).then(n);var r;o.q.push([[t,g,e,D],n]),r=I,A||(h.body.append(Object.assign(h.createElement('script'),{id:'captcha-provider',async:!0,src:r})),A=!0)});var g,I,D;w[L]=w[L]||{},w[L][v]=w[L][v]||{},w[L][v].q=[],w[L][y]=w[L][y]||{},w[L][y].protect=function(t,e){n(t,void 0,e),T(t)},Object.freeze(w[L][y]),function(t,e,n,w,h,L){const[v,y,A,g]=function(t,e,n){const i=e?o:[],u=t?c:[],d=[...i,...u],f=r(d),m=r(i),_=r(d.filter((([t,e])=>n.includes(e))));return[a(f),a(m),a(_),s()]}(w,h,L),I=t=>{const e=t.target;return e instanceof HTMLFormElement?e:e&&e.form},D=t=>v().includes(t);t.addEventListener('submit',(t=>{const e=I(t);if(!e)return;const n=D(e)&&!e.dataset.hcaptchaBound&&!e.dataset.recaptchaBound,o=_(e),c=g().includes(e)&&(!o||!o.value);(n||c)&&t.preventDefault(),c&&!n&&(function(t){try{if(!f())return;!function(t){const e=f();if(!e)return;const n=_(t);if(!n)return;const o=n.value;o&&e.removeItem(o)}(t);const e=Array.from(Array(32),(()=>Math.random().toString(36)[2])).join('');!function(t,e){_(t)||t.append(Object.assign(document.createElement('input'),{type:'hidden',name:u})),t.elements[u].value=e}(t,e),function(t,e){const n=f();if(!n)return;const o=[...t.querySelectorAll(`input[type='${i}']`)].map((({name:t})=>t)),c=[...d,...o],r={};for(const[a,s]of new FormData(t).entries())c.includes(a)||(r[a]=s);n.setItem(e,JSON.stringify({[m]:1,action:t.action,data:r}))}(t,e)}catch(e){console.error('failed to persist form',e)}}(e),e.submit())}));const S=(t,e)=>{t&&!t.dataset[E]&&(n(t,e.some((e=>e===t))),T(t))};for(const o of['focusin','change'])t.addEventListener(o,(t=>{const e=I(t);D(e)&&S(e,y())}));const B=e.get('form_key'),M=e.get(l),P=B&&M;t.addEventListener('DOMContentLoaded',(()=>{const t=y();if(P)for(const e of t)e.elements[l].value===M&&p(e,B);[...new Set([...A(),...v().filter((t=>'true'===t.dataset.shopifyCaptcha))])].forEach((e=>S(e,t)))}))}(h,new URLSearchParams(w.location.search),n,t,e,['guest_login'])})(!0,!0)}();</script>
vendor: 1 bytes, line 126
126
127<script integrity="sha256-JjoPp5ZfB1sSAs5SQaol1x1GgvveM+BgmRzyDexInEQ=" data-source-attribution="shopify.loadfeatures" defer="defer" src="//www.clearviewestate.co.nz/cdn/shopifycloud/storefront/assets/storefront/load_feature-1bd60354.js" crossorigin="anonymous"></script>
vendor: 1 bytes, line 127
127
128<script>(function () {var userAgent = navigator.userAgent;var platform = navigator.platform;var maxTouchPoints = navigator.maxTouchPoints || 0;var isIOS = /iPad|iPhone|iPod/.test(platform) || (platform === 'MacIntel' && maxTouchPoints > 1);var isMacSafari = platform.indexOf('Mac') === 0 && /Safari/.test(userAgent) && !/Chrome|Chromium|CriOS|FxiOS|Edg|OPR|Android/.test(userAgent);var isAppleSafari = isIOS || isMacSafari;if (isAppleSafari) {fetch('/sf_private_access_tokens' + location.search).catch(function () {});}function browserMajorVersion(pattern) {var match = userAgent.match(pattern);return match ? parseInt(match[1], 10) : null;}function shouldLoadAutosizesPolyfill() {if (!window.PerformanceObserver?.supportedEntryTypes?.includes('paint')) {return false;}var chromeVersion = browserMajorVersion(/Chrome\/(\d+)/);if (chromeVersion !== null) {return chromeVersion < 126;}var firefoxVersion = browserMajorVersion(/Firefox\/(\d+)/);if (firefoxVersion !== null) {return firefoxVersion < 150;}var safariVersion = isAppleSafari ? browserMajorVersion(/Version\/(\d+).*Safari\//) : null;if (safariVersion !== null) {return safariVersion < 27;}return true;}if (shouldLoadAutosizesPolyfill()) {var autosizesScript = document.createElement('script');autosizesScript.async = true;autosizesScript.crossOrigin = 'anonymous';autosizesScript.src = "//www.clearviewestate.co.nz/cdn/shopifycloud/storefront/assets/storefront/autosizes-84416378.js";(document.head || document.documentElement).appendChild(autosizesScript);}window.ShopifyAnalytics = window.ShopifyAnalytics || {};window.ShopifyAnalytics.performance = window.ShopifyAnalytics.performance || {};(function () {var LONG_FRAME_THRESHOLD = 50;var longAnimationFrames = [];var activeRafId = null;function collectLongFrames() {var previousTime = null;function rafMonitor(now) {if (activeRafId === null) {return;}var delta = now - previousTime;if (delta > LONG_FRAME_THRESHOLD) {longAnimationFrames.push({startTime: previousTime,endTime: now,});}previousTime = now;activeRafId = requestAnimationFrame(rafMonitor);}previousTime = performance.now();activeRafId = requestAnimationFrame(rafMonitor);}if (!window.PerformanceObserver?.supportedEntryTypes?.includes('long-animation-frame')) {collectLongFrames();var timeoutId = setTimeout(function () {cancelAnimationFrame(activeRafId);}, 10000);window.ShopifyAnalytics.performance.getLongAnimationFrames = function (stopCollection) {if (stopCollection === undefined) {stopCollection = false;}if (stopCollection) {clearTimeout(timeoutId);cancelAnimationFrame(activeRafId);}return longAnimationFrames;};}})();})();</script>
128<script crossorigin="anonymous" defer="defer" src="//www.clearviewestate.co.nz/cdn/shopifycloud/storefront/assets/shopify_pay/storefront-616277c7.js?v=20250812"></script>
vendor: 1 bytes, line 128
128
129<script id="shopify-origin-trials" async="async" integrity="sha256-qJbe/jEZBHtr5W/BlA2cKAz3vkXu6vJQyLjgvgCC86g=" src="//cdn.shopify.com/shopifycloud/storefront/assets/storefront/origin_trials-318ab40a.js" crossorigin="anonymous" onload="window.__shopifyOriginTrialsDone = true" onerror="window.__shopifyOriginTrialsDone = true"></script>
vendor: 1 bytes, line 129
129
130<script>
131  window.Shopify = window.Shopify || {};
132  window.Shopify.MCP = window.Shopify.MCP || {};
133  window.Shopify.MCP.enabled = true;
134  window.Shopify.MCP.shop = "cve1.myshopify.com";
135  window.Shopify.MCP.mcpEndpoint = "https:\/\/www.clearviewestate.co.nz\/api\/mcp";
136  window.Shopify.MCP.tools = [{"name":"search_shop_policies_and_faqs","description":"Used to get facts about the stores policies, products, or services.\nSome examples of questions you can ask are:\n  - What is your return policy?\n  - What is your shipping policy?\n  - What is your phone number?\n  - What are your hours of operation?\"\n","inputSchema":{"$schema":"https:\/\/json-schema.org\/draft\/2020-12\/schema","type":"object","properties":{"query":{"type":"string","description":"A natural language query."},"context":{"type":"string","description":"Additional information about the request such as user demographics, mood, location, or other relevant details that could help in tailoring the response appropriately."}},"required":["query"]}}];
137</script>
vendor: 1 bytes, line 137
137
138<script>(()=>{var d="shopify:webmcp_adapter_loaded",n=Symbol.for("shopify.webmcp_adapter_loading");function s(c,a,{win:r=window,doc:o=document}={}){function p(){try{return r.localStorage.getItem(d)==="true"}catch{return!1}}function l(){try{r.localStorage.setItem(d,"true")}catch{}}function u(){return typeof(o.modelContext||r.navigator?.modelContext)?.registerTool=="function"}function f(){if(r[n]||!u())return;let t=o.head||o.getElementsByTagName("head")[0];if(!t)return;let e=o.createElement("script");e.type="module",e.crossOrigin="anonymous",a&&(e.integrity=a),e.src=c,e.addEventListener("load",l,{once:!0}),e.addEventListener("error",()=>{r[n]=!1},{once:!0}),t.appendChild(e),r[n]=!0}function _(t){let e=o.getElementById("shopify-origin-trials");if(!e||r.__shopifyOriginTrialsDone){t();return}e.addEventListener("load",t,{once:!0}),e.addEventListener("error",t,{once:!0})}function i(){_(()=>r.setTimeout(f,0))}function m(){o.addEventListener("DOMContentLoaded",i,{once:!0})}p()?i():m()}s("\/\/www.clearviewestate.co.nz\/cdn\/shopifycloud\/storefront\/assets\/storefront\/webmcp-c6b62ece.js","sha256-ke4DDuBjdvea3vxLWxHc9E9nq8zihuG4IfYEGbb77ys=");})();
139</script>
vendor: 1 bytes, line 139
139
140<script data-source-attribution="shopify.dynamic_checkout.dynamic.init">var Shopify=Shopify||{};Shopify.PaymentButton=Shopify.PaymentButton||{isStorefrontPortableWallets:!0,init:function(){window.Shopify.PaymentButton.init=function(){};var t=document.createElement("script");t.src="https://www.clearviewestate.co.nz/cdn/shopifycloud/portable-wallets/latest/portable-wallets.en.js",t.type="module",document.head.appendChild(t)}};
141</script>
vendor: 1 bytes, line 141
141
142<script data-source-attribution="shopify.dynamic_checkout.buyer_consent">
143  function portableWalletsHideBuyerConsent(e){var t=document.getElementById("shopify-buyer-consent"),n=document.getElementById("shopify-subscription-policy-button");t&&n&&(t.classList.add("hidden"),t.setAttribute("aria-hidden","true"),n.removeEventListener("click",e))}function portableWalletsShowBuyerConsent(e){var t=document.getElementById("shopify-buyer-consent"),n=document.getElementById("shopify-subscription-policy-button");t&&n&&(t.classList.remove("hidden"),t.removeAttribute("aria-hidden"),n.addEventListener("click",e))}window.Shopify?.PaymentButton&&(window.Shopify.PaymentButton.hideBuyerConsent=portableWalletsHideBuyerConsent,window.Shopify.PaymentButton.showBuyerConsent=portableWalletsShowBuyerConsent);
144</script>
vendor: 1 bytes, line 144
144
145<script data-source-attribution="shopify.dynamic_checkout.cart.bootstrap">document.addEventListener("DOMContentLoaded",(function(){function t(){return document.querySelector("shopify-accelerated-checkout-cart, shopify-accelerated-checkout")}if(t())Shopify.PaymentButton.init();else{new MutationObserver((function(e,n){t()&&(Shopify.PaymentButton.init(),n.disconnect())})).observe(document.body,{childList:!0,subtree:!0})}}));
146</script>
146
147<link id="shopify-accelerated-checkout-styles" rel="stylesheet" media="screen" href="https://www.clearviewestate.co.nz/cdn/shopifycloud/portable-wallets/latest/accelerated-checkout-backwards-compat.css" crossorigin="anonymous">
148<style id="shopify-accelerated-checkout-cart">
149        #shopify-buyer-consent {
150  margin-top: 1em;
151  display: inline-block;
152  width: 100%;
153}
154
155#shopify-buyer-consent.hidden {
156  display: none;
157}
158
159#shopify-subscription-policy-button {
160  background: none;
161  border: none;
162  padding: 0;
163  text-decoration: underline;
164  font-size: inherit;
165  cursor: pointer;
166}
167
168#shopify-subscription-policy-button::before {
169  box-shadow: none;
170}
171
172      </style>
173
174<script id="shopify-cfh-end">window.performance && window.performance.mark && window.performance.mark('shopify.content_for_header.end');</script>
174
175
176    
176<script src="//www.clearviewestate.co.nz/cdn/shop/t/26/assets/bsub.js?v=158520562351594542841747885910" type="text/javascript"></script>
176
177<link href="//www.clearviewestate.co.nz/cdn/shop/t/26/assets/bsub.scss.css?v=95412381906123361661754090612" rel="stylesheet" type="text/css" media="all" />
178<noscript>
179      <style>
180        .image__fallback {
181          width: 100vw;
182          display: block !important;
183          max-width: 100vw !important;
184          margin-bottom: 0;
185        }
186        .no-js-only {
187          display: inherit !important;
188        }
189        .icon-cart.cart-button {
190          display: none;
191        }
192        .lazyload {
193          opacity: 1;
194          -webkit-filter: blur(0);
195          filter: blur(0);
196        }
197        .animate_right,
198        .animate_left,
199        .animate_up,
200        .animate_down {
201          opacity: 1;
202        }
203        .flexslider .slides>li {
204          display: block;
205        }
206        .product_section .product_form {
207          opacity: 1;
208        }
209        .multi_select,
210        form .select {
211          display: block !important;
212        }
213        .swatch_options {
214          display: none;
215        }
216      </style>
217    </noscript>
218  <link rel="stylesheet" href="//www.clearviewestate.co.nz/cdn/shop/t/26/assets/sca-pp.css?v=26248894406678077071747885910">
219 
219<script>
220  
221	SCAPPLive = {};
222  
223  SCAPPShop = {};
224    
225  </script>
vendor: 1 bytes, line 225
225
226<script src="//www.clearviewestate.co.nz/cdn/shop/t/26/assets/sca-pp-initial.js?v=101181655315549539551747885910" type="text/javascript"></script>
226
227   
227<script>
228    // empty script tag to work around a platform issue where attributes of first script in file are scrubbed
229</script>
229
230
231<script id="bold-subscriptions-script" type="text/javascript">
232    window.BOLD = window.BOLD || {};
233    window.BOLD.subscriptions = window.BOLD.subscriptions || {};
234    window.BOLD.subscriptions.classes = window.BOLD.subscriptions.classes || {};
235    window.BOLD.subscriptions.patches = window.BOLD.subscriptions.patches || {};
236    window.BOLD.subscriptions.patches.maxCheckoutRetries = window.BOLD.subscriptions.patches.maxCheckoutRetries || 200;
237    window.BOLD.subscriptions.patches.currentCheckoutRetries = window.BOLD.subscriptions.patches.currentCheckoutRetries || 0;
238    window.BOLD.subscriptions.patches.maxCashierPatchAttempts = window.BOLD.subscriptions.patches.maxCashierPatchAttempts || 200;
239    window.BOLD.subscriptions.patches.currentCashierPatchAttempts = window.BOLD.subscriptions.patches.currentCashierPatchAttempts || 0;
240    window.BOLD.subscriptions.config = window.BOLD.subscriptions.config || {};
241    window.BOLD.subscriptions.config.platform = 'shopify';
242    window.BOLD.subscriptions.config.shopDomain = 'cve1.myshopify.com';
243    window.BOLD.subscriptions.config.customDomain = 'www.clearviewestate.co.nz';
244    window.BOLD.subscriptions.config.shopIdentifier = '3674538084';
245        window.BOLD.subscriptions.config.appUrl = 'https://sub.boldapps.net';
246    window.BOLD.subscriptions.config.currencyCode = 'NZD';
247    window.BOLD.subscriptions.config.checkoutType = 'shopify';
248    window.BOLD.subscriptions.config.currencyFormat = "$\u0026#123;\u0026#123;amount}}";
249    window.BOLD.subscriptions.config.shopCurrencies = [{"id":2739,"currency":"NZD","currency_format":"$\u0026#123;\u0026#123;amount}}","created_at":"2021-06-08 22:33:18","updated_at":"2021-06-08 22:33:18"}];
250    window.BOLD.subscriptions.config.shopSettings = {"allow_msp_cancellation":true,"allow_msp_prepaid_renewal":true,"customer_can_pause_subscription":true,"customer_can_change_next_order_date":false,"customer_can_change_order_frequency":false,"customer_can_create_an_additional_order":false,"customer_can_use_passwordless_login":false,"customer_can_add_products_to_existing_subscriptions":false,"show_currency_code":true,"stored_payment_method_policy":"required"};
251    window.BOLD.subscriptions.config.customerLoginPath = null;
252
253    // TODO: Remove the isset with BS2-4659_improve_large_group_selection
254            window.BOLD.subscriptions.config.cashierPluginOnlyMode = window.BOLD.subscriptions.config.cashierPluginOnlyMode || false;
255    if (window.BOLD.subscriptions.config.waitForCheckoutLoader === undefined) {
256        window.BOLD.subscriptions.config.waitForCheckoutLoader = true;
257    }
258
259    window.BOLD.subscriptions.config.addToCartFormSelectors = window.BOLD.subscriptions.config.addToCartFormSelectors || [];
260    window.BOLD.subscriptions.config.addToCartButtonSelectors = window.BOLD.subscriptions.config.addToCartButtonSelectors || [];
261    window.BOLD.subscriptions.config.widgetInsertBeforeSelectors = window.BOLD.subscriptions.config.widgetInsertBeforeSelectors || [];
262    window.BOLD.subscriptions.config.quickAddToCartButtonSelectors = window.BOLD.subscriptions.config.quickAddToCartButtonSelectors || [];
263    window.BOLD.subscriptions.config.cartElementSelectors = window.BOLD.subscriptions.config.cartElementSelectors || [];
264    window.BOLD.subscriptions.config.cartTotalElementSelectors = window.BOLD.subscriptions.config.cartTotalElementSelectors || [];
265    window.BOLD.subscriptions.config.lineItemSelectors = window.BOLD.subscriptions.config.lineItemSelectors || [];
266    window.BOLD.subscriptions.config.lineItemNameSelectors = window.BOLD.subscriptions.config.lineItemNameSelectors || [];
267    window.BOLD.subscriptions.config.checkoutButtonSelectors = window.BOLD.subscriptions.config.checkoutButtonSelectors || [];
268
269    window.BOLD.subscriptions.config.featureFlags = window.BOLD.subscriptions.config.featureFlags || ["BS2-4293-skip-tx-fee-eq-zero","BE-1069-subscription-currency","BE-1070-add-multi-currency-items","BE-1139-add-email-to-bulk-price-update-report","BE-1142-Email-Impersonation-Security-Issue","BE-1143-restrict-boldapps-domain-email-setting"];
270    window.BOLD.subscriptions.config.subscriptionProcessingFrequency = '60';
271    window.BOLD.subscriptions.config.requireMSPInitialLoadingMessage = true;
272    window.BOLD.subscriptions.data = window.BOLD.subscriptions.data || {};
273
274    // Interval text markup template
275    window.BOLD.subscriptions.config.lineItemPropertyListSelectors = window.BOLD.subscriptions.config.lineItemPropertyListSelectors || [];
276    window.BOLD.subscriptions.config.lineItemPropertyListSelectors.push('dl.definitionList');
277    window.BOLD.subscriptions.config.lineItemPropertyListTemplate = window.BOLD.subscriptions.config.lineItemPropertyListTemplate || '<dl class="definitionList"></dl>';
278    window.BOLD.subscriptions.config.lineItemPropertyTemplate = window.BOLD.subscriptions.config.lineItemPropertyTemplate || '<dt class="definitionList-key">\:</dt><dd class="definitionList-value">\</dd>';
279
280    // Discount text markup template
281    window.BOLD.subscriptions.config.discountItemTemplate = window.BOLD.subscriptions.config.discountItemTemplate || '<div class="bold-subscriptions-discount"><div class="bold-subscriptions-discount__details">\</div><div class="bold-subscriptions-discount__total">\</div></div>';
282
283
284    // Constants in XMLHttpRequest are not reliable, so we will create our own
285    // reference: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState
286    window.BOLD.subscriptions.config.XMLHttpRequest = {
287        UNSENT:0,            // Client has been created. open() not called yet.
288        OPENED: 1,           // open() has been called.
289        HEADERS_RECEIVED: 2, // send() has been called, and headers and status are available.
290        LOADING: 3,          // Downloading; responseText holds partial data.
291        DONE: 4              // The operation is complete.
292    };
293
294    window.BOLD.subscriptions.config.assetBaseUrl = 'https://sub.boldapps.net';
295    if (window.localStorage && window.localStorage.getItem('boldSubscriptionsAssetBaseUrl')) {
296        window.BOLD.subscriptions.config.assetBaseUrl = window.localStorage.getItem('boldSubscriptionsAssetBaseUrl')
297    }
298
299    window.BOLD.subscriptions.data.subscriptionGroups = [];
300    if (localStorage && localStorage.getItem('boldSubscriptionsSubscriptionGroups')) {
301        window.BOLD.subscriptions.data.subscriptionGroups = JSON.parse(localStorage.getItem('boldSubscriptionsSubscriptionGroups'));
302    } else {
303        window.BOLD.subscriptions.data.subscriptionGroups = [{"id":16296,"billing_rules":[{"id":34096,"subscription_group_id":16296,"interval_name":"Quarterly","billing_rule":"FREQ=MONTHLY;INTERVAL=3","custom_billing_rule":""}],"is_subscription_only":false,"allow_prepaid":false,"is_prepaid_only":false,"should_continue_prepaid":true,"continue_prepaid_type":"as_prepaid","prepaid_durations":[{"id":16143,"subscription_group_id":16296,"total_duration":1,"discount_type":"percentage","discount_value":0}],"selection_options":[{"platform_entity_id":"3318597877860"},{"platform_entity_id":"3318613835876"},{"platform_entity_id":"3318623076452"}],"discount_type":"no_discount","percent_discount":0,"fixed_discount":0,"can_add_to_cart":true}];
304    }
305
306    window.BOLD.subscriptions.isFeatureFlagEnabled = function (featureFlag) {
307        for (var i = 0; i < window.BOLD.subscriptions.config.featureFlags.length; i++) {
308            if (window.BOLD.subscriptions.config.featureFlags[i] === featureFlag){
309                return true;
310            }
311        }
312        return false;
313    }
314
315    window.BOLD.subscriptions.logger = {
316        tag: "bold_subscriptions",
317        // the bold subscriptions log level
318        // 0 - errors (default)
319        // 1 - warnings + errors
320        // 2 - info + warnings + errors
321        // use window.localStorage.setItem('boldSubscriptionsLogLevel', x) to set the log level
322        levels: {
323            ERROR: 0,
324            WARN: 1,
325            INFO: 2,
326        },
327        level: parseInt((window.localStorage && window.localStorage.getItem('boldSubscriptionsLogLevel')) || "0", 10),
328        _log: function(callArgs, level) {
329            if (!window.console) {
330                return null;
331            }
332
333            if (window.BOLD.subscriptions.logger.level < level) {
334                return;
335            }
336
337            var params = Array.prototype.slice.call(callArgs);
338            params.unshift(window.BOLD.subscriptions.logger.tag);
339
340            switch (level) {
341                case window.BOLD.subscriptions.logger.levels.INFO:
342                    console.info.apply(null, params);
343                    return;
344                case window.BOLD.subscriptions.logger.levels.WARN:
345                    console.warn.apply(null, params);
346                    return;
347                case window.BOLD.subscriptions.logger.levels.ERROR:
348                    console.error.apply(null, params);
349                    return;
350                default:
351                    console.log.apply(null, params);
352                    return;
353            }
354        },
355        info: function() {
356            window.BOLD.subscriptions.logger._log(arguments, window.BOLD.subscriptions.logger.levels.INFO);
357        },
358        warn: function() {
359            window.BOLD.subscriptions.logger._log(arguments, window.BOLD.subscriptions.logger.levels.WARN);
360        },
361        error: function() {
362            window.BOLD.subscriptions.logger._log(arguments, window.BOLD.subscriptions.logger.levels.ERROR);
363        }
364    }
365
366    window.BOLD.subscriptions.shouldLoadSubscriptionGroupFromAPI = function() {
367        return window.BOLD.subscriptions.config.loadSubscriptionGroupFrom === window.BOLD.subscriptions.config.loadSubscriptionGroupFromTypes['BSUB_API'];
368    }
369
370    window.BOLD.subscriptions.getSubscriptionGroupFromProductId = function (productId) {
371        var data = window.BOLD.subscriptions.data;
372        var foundGroup = null;
373        for (var i = 0; i < data.subscriptionGroups.length; i += 1) {
374            var subscriptionGroup = data.subscriptionGroups[i];
375            for (var j = 0; j < subscriptionGroup.selection_options.length; j += 1) {
376                var selectionOption = subscriptionGroup.selection_options[j];
377                if (selectionOption.platform_entity_id === productId.toString()) {
378                    foundGroup = subscriptionGroup;
379                    break;
380                }
381            }
382            if (foundGroup) {
383                break;
384            }
385        }
386        return foundGroup;
387    };
388
389    window.BOLD.subscriptions.getSubscriptionGroupById = function(subGroupId) {
390        var subscriptionGroups = window.BOLD.subscriptions.data.subscriptionGroups;
391
392        for (var i = 0; i < subscriptionGroups.length; i += 1) {
393            var subGroup = subscriptionGroups[i];
394            if (subGroup.id === subGroupId) {
395                return subGroup;
396            }
397        }
398
399        return null;
400    };
401
402    window.BOLD.subscriptions.addSubscriptionGroup = function (subscriptionGroup) {
403        if(!window.BOLD.subscriptions.getSubscriptionGroupById(subscriptionGroup.id))
404        {
405            window.BOLD.subscriptions.data.subscriptionGroups.push(subscriptionGroup);
406        }
407    }
408
409    window.BOLD.subscriptions.getSubscriptionGroupPrepaidDurationById = function(subscriptionGroupId, prepaidDurationId) {
410        var subscriptionGroup = window.BOLD.subscriptions.getSubscriptionGroupById(subscriptionGroupId);
411
412        if (
413            !subscriptionGroup
414            || !subscriptionGroup.prepaid_durations
415            || !subscriptionGroup.prepaid_durations.length
416        ) {
417            return null;
418        }
419
420        for (var i = 0; i < subscriptionGroup.prepaid_durations.length; i++) {
421            var prepaidDuration = subscriptionGroup.prepaid_durations[i];
422            if (prepaidDuration.id === prepaidDurationId) {
423                return prepaidDuration;
424            }
425        }
426
427        return null;
428    }
429
430    window.BOLD.subscriptions.getSubscriptionGroupBillingRuleById = function(subGroup, billingRuleId) {
431        for (var i = 0; i < subGroup.billing_rules.length; i += 1) {
432            var billingRule = subGroup.billing_rules[i];
433            if (billingRule.id === billingRuleId) {
434                return billingRule;
435            }
436        }
437
438        return null;
439    };
440
441    window.BOLD.subscriptions.toggleDisabledAddToCartButtons = function(d) {
442        var addToCartForms = document.querySelectorAll(window.BOLD.subscriptions.config.addToCartFormSelectors.join(','));
443        var disable = !!d;
444        for (var i = 0; i < addToCartForms.length; i++) {
445            var addToCartForm = addToCartForms[i];
446            var productId = window.BOLD.subscriptions.getProductIdFromAddToCartForm(
446addToCartForm);
447            var subscriptionGroup = window.BOLD.subscriptions.getSubscriptionGroupFromProductId(productId);
448
449            if(window.BOLD.subscriptions.isFeatureFlagEnabled('BS2-4659_improve_large_group_selection') ) {
450                if (subscriptionGroup || window.BOLD.subscriptions.shouldLoadSubscriptionGroupFromAPI()) {
451                    var addToCartButtons = addToCartForm.querySelectorAll(window.BOLD.subscriptions.config.addToCartButtonSelectors.join(','));
452                    for (var j = 0; j < addToCartButtons.length; j++) {
453                        var addToCartButton = addToCartButtons[j];
454                        var toggleAction = disable ?  addToCartButton.setAttribute : addToCartButton.removeAttribute;
455
456                        addToCartButton.disabled = disable;
457                        toggleAction.call(addToCartButton, 'data-disabled-by-subscriptions', disable);
458                    }
459                }
460            } else {
461                if (subscriptionGroup) {
462                    var addToCartButtons = addToCartForm.querySelectorAll(window.BOLD.subscriptions.config.addToCartButtonSelectors.join(','));
463                    for (var j = 0; j < addToCartButtons.length; j++) {
464                        var addToCartButton = addToCartButtons[j];
465                        var toggleAction = disable ?  addToCartButton.setAttribute : addToCartButton.removeAttribute;
466
467                        addToCartButton.disabled = disable;
468                        toggleAction.call(addToCartButton, 'data-disabled-by-subscriptions', disable);
469                    }
470                }
471            }
472
473        }
474    };
475
476    window.BOLD.subscriptions.disableAddToCartButtons = function () {
477        // only disable the add to cart buttons if the app isn't loaded yet
478        if (!window.BOLD.subscriptions.app) {
479            window.BOLD.subscriptions.toggleDisabledAddToCartButtons(true);
480        } else {
481            window.BOLD.subscriptions.enableAddToCartButtons();
482        }
483    };
484
485    window.BOLD.subscriptions.enableAddToCartButtons = function () {
486        document.removeEventListener('click', window.BOLD.subscriptions.preventSubscriptionAddToCart);
487        window.BOLD.subscriptions.toggleDisabledAddToCartButtons(false);
488    };
489
490    window.BOLD.subscriptions.toggleDisabledCheckoutButtons = function(d) {
491        var checkoutButtons = document.querySelectorAll(window.BOLD.subscriptions.config.checkoutButtonSelectors.join(','));
492        var disable = !!d;
493        for (var i = 0; i < checkoutButtons.length; i++) {
494            var checkoutButton = checkoutButtons[i];
495            var toggleAction = disable ? checkoutButton.setAttribute : checkoutButton.removeAttribute;
496
497            checkoutButton.disabled = disable;
498            toggleAction.call(checkoutButton, 'data-disabled-by-subscriptions', disable);
499        }
500    }
501
502    window.BOLD.subscriptions.disableCheckoutButtons = function() {
503        // only disable the checkout buttons if the app isn't loaded yet
504        if (!window.BOLD.subscriptions.app) {
505            window.BOLD.subscriptions.toggleDisabledCheckoutButtons(true);
506        } else {
507            window.BOLD.subscriptions.enableCheckoutButtons();
508        }
509    }
510
511    window.BOLD.subscriptions.enableCheckoutButtons = function() {
512        document.removeEventListener('click', window.BOLD.subscriptions.preventCheckout);
513        window.BOLD.subscriptions.toggleDisabledCheckoutButtons(false);
514    }
515
516    window.BOLD.subscriptions.hasSuccessfulAddToCarts = function() {
517        if (typeof(Storage) !== "undefined") {
518            var successfulAddToCarts = JSON.parse(
519                window.localStorage.getItem('boldSubscriptionsSuccessfulAddToCarts') || '[]'
520            );
521            if (successfulAddToCarts.length > 0) {
522                return true;
523            }
524        }
525
526        return false;
527    }
528
529    window.BOLD.subscriptions.hasPendingAddToCarts = function() {
530        if (typeof(Storage) !== "undefined") {
531            var pendingAddToCarts = JSON.parse(
532                window.localStorage.getItem('boldSubscriptionsPendingAddToCarts') || '[]'
533            );
534            if (pendingAddToCarts.length > 0) {
535                return true;
536            }
537        }
538
539        return false;
540    }
541
542    window.BOLD.subscriptions.addJSAsset = function(src, deferred) {
543        var scriptTag = document.getElementById('bold-subscriptions-script');
544        var jsElement = document.createElement('script');
545        jsElement.type = 'text/javascript';
546        jsElement.src = src;
547        if (deferred) {
548           jsElement.defer = true;
549        }
550        scriptTag.parentNode.insertBefore(jsElement, scriptTag);
551    };
552
553    window.BOLD.subscriptions.addCSSAsset = function(href) {
554        var scriptTag = document.getElementById('bold-subscriptions-script');
555        var cssElement = document.createElement('link');
556        cssElement.href = href;
557        cssElement.rel = 'stylesheet';
558        scriptTag.parentNode.insertBefore(cssElement, scriptTag);
559    };
560
561    window.BOLD.subscriptions.loadStorefrontAssets = function loadStorefrontAssets() {
562        var assets = window.BOLD.subscriptions.config.assets;
563        window.BOLD.subscriptions.addCSSAsset(window.BOLD.subscriptions.config.assetBaseUrl + '/static/' + assets['storefront.css']);
564        window.BOLD.subscriptions.addJSAsset(window.BOLD.subscriptions.config.assetBaseUrl + '/static/' + assets['storefront.js'], false);
565    };
566
567    window.BOLD.subscriptions.loadCustomerPortalAssets = function loadCustomerPortalAssets() {
568        var assets = window.BOLD.subscriptions.config.assets;
569        window.BOLD.subscriptions.addCSSAsset(window.BOLD.subscriptions.config.assetBaseUrl + '/static/' + assets['customer_portal.css']);
570        window.BOLD.subscriptions.addJSAsset(window.BOLD.subscriptions.config.assetBaseUrl + '/static/' + assets['customer_portal.js'], true);
571    };
572
573    window.BOLD.subscriptions.processManifest = function() {
574        if (!window.BOLD.subscriptions.processedManifest) {
575            window.BOLD.subscriptions.processedManifest = true;
576            window.BOLD.subscriptions.config.assets = JSON.parse(this.responseText);
577
578                        window.BOLD.subscriptions.loadCustomerPortalAssets();
579        }
580    };
581
582    window.BOLD.subscriptions.addInitialLoadingMessage = function() {
583        var customerPortalNode = document.getElementById('customer-portal-root');
584        if (customerPortalNode && window.BOLD.subscriptions.config.requireMSPInitialLoadingMessage) {
585            customerPortalNode.innerHTML = '<div class="bold-subscriptions-loader-container"><div class="bold-subscriptions-loader"></div></div>';
586        }
587    }
588
589    window.BOLD.subscriptions.contentLoaded = function() {
590        window.BOLD.subscriptions.data.contentLoadedEventTriggered = true;
591        window.BOLD.subscriptions.addInitialLoadingMessage();
592            };
593
594    window.BOLD.subscriptions.preventSubscriptionAddToCart = function(e) {
595        if (e.target.matches(window.BOLD.subscriptions.config.addToCartButtonSelectors.join(',')) && e.target.form) {
596            var productId = window.BOLD.subscriptions.getProductIdFromAddToCartForm(e.target.form);
597            var subscriptionGroup = window.BOLD.subscriptions.getSubscriptionGroupFromProductId(productId);
598            if(window.BOLD.subscriptions.isFeatureFlagEnabled('BS2-4659_improve_large_group_selection'))
599            {
600                if (subscriptionGroup || window.BOLD.subscriptions.shouldLoadSubscriptionGroupFromAPI()) {
601                    // This code prevents products in subscription groups from being added to the cart before the
602                    // Subscriptions app fully loads. Once the subscriptions app loads it will re-enable the
603                    // buttons. Use window.BOLD.subscriptions.enableAddToCartButtons enable them manually.
604                    e.preventDefault();
605                    return false;
606                }
607            } else {
608                if (subscriptionGroup) {
609                    // This code prevents products in subscription groups from being added to the cart before the
610                    // Subscriptions app fully loads. Once the subscriptions app loads it will re-enable the
611                    // buttons. Use window.BOLD.subscriptions.enableAddToCartButtons enable them manually.
612                    e.preventDefault();
613                    return false;
614                }
615            }
616
617        }
618    };
619
620    window.BOLD.subscriptions.preventCheckout = function(e) {
621        if (
622            e.target.matches(window.BOLD.subscriptions.config.checkoutButtonSelectors.join(','))
623            && (window.BOLD.subscriptions.hasSuccessfulAddToCarts() || window.BOLD.subscriptions.hasPendingAddToCarts())
624        ) {
625            // This code prevents checkouts on the shop until the Subscriptions app fully loads.
626            // When the Subscriptions app is ready it will enable the checkout buttons itself.
627            // Use window.BOLD.subscriptions.enableCheckoutButtons to enable them manually.
628            e.preventDefault();
629            return false;
630        }
631    }
632
633        document.addEventListener('DOMContentLoaded', window.BOLD.subscriptions.contentLoaded);
634
635    if (!Element.prototype.matches) {
636        Element.prototype.matches =
637            Element.prototype.matchesSelector ||
638            Element.prototype.mozMatchesSelector ||
639            Element.prototype.msMatchesSelector ||
640            Element.prototype.oMatchesSelector ||
641            Element.prototype.webkitMatchesSelector ||
642            function(s) {
643                var matches = (this.document || this.ownerDocument).querySelectorAll(s),
644                    i = matches.length;
645                while (--i >= 0 && matches.item(i) !== this) {}
646                return i > -1;
647            };
648    }
649
650    if (!Element.prototype.closest) {
651        Element.prototype.closest = function(s) {
652            var el = this;
653
654            do {
655                if (Element.prototype.matches.call(el, s)) return el;
656                el = el.parentElement || el.parentNode;
657            } while (el !== null && el.nodeType === 1);
658            return null;
659        };
660    }
661
662    window.BOLD.subscriptions.setVisibilityOfAdditionalCheckoutButtons = function (isVisible) {
663        if (window.BOLD.subscriptions.config.additionalCheckoutSelectors === undefined) {
664            return;
665        }
666
667        var selectors = window.BOLD.subscriptions.config.additionalCheckoutSelectors;
668
669        for (var i = 0; i < selectors.length; i++) {
670            var elements = document.querySelectorAll(selectors[i]);
671
672            for (var j = 0; j < elements.length; j++) {
673                elements[j].style.display = isVisible ? 'block' : 'none';
674            }
675        }
676    }
677
678    window.BOLD.subscriptions.hideAdditionalCheckoutButtons = function() {
679        window.BOLD.subscriptions.setVisibilityOfAdditionalCheckoutButtons(false);
680    };
681
682    window.BOLD.subscriptions.showAdditionalCheckoutButtons = function() {
683        window.BOLD.subscriptions.setVisibilityOfAdditionalCheckoutButtons(true);
684    };
685
686    window.BOLD.subscriptions.enhanceMspUrls = function(data) {
687        var mspUrl = 'https://sub.boldapps.net/shop/9054/customer_portal';
688        var elements = document.querySelectorAll("a[href='"+mspUrl+"']");
689
690        if(!elements.length || !data.success) {
691            return;
692        }
693
694        for (var i = 0; i < elements.length; i++) {
695            elements[i].href = elements[i].href + "?jwt="+data.value.jwt+"&customerId="+data.value.customerId;
696        }
697    };
698
699    window.addEventListener('load', function () {
700        window.BOLD.subscriptions.getJWT(window.BOLD.subscriptions.enhanceMspUrls);
701    });
702
703    // This will be called immediately
704    // Use this anonymous function to avoid polluting the global namespace
705    (function() {
706        var xhr = new XMLHttpRequest();
707        xhr.addEventListener('load', window.BOLD.subscriptions.processManifest);
708        xhr.open('GET', window.BOLD.subscriptions.config.assetBaseUrl + '/static/manifest.json?t=' + (new Date()).getTime());
709        xhr.send();
710    })()
711
712    window.BOLD.subscriptions.patches.patchCashier = function() {
713        if (window.BOLD && window.BOLD.checkout) {
714            window.BOLD.checkout.disable();
715            window.BOLD.checkout.listenerFn = window.BOLD.subscriptions.patches.cashierListenerFn;
716            window.BOLD.checkout.enable();
717        } else if (window.BOLD.subscriptions.patches.currentCashierPatchAttempts < window.BOLD.subscriptions.patches.maxCashierPatchAttempts) {
718            window.BOLD.subscriptions.patches.currentCashierPatchAttempts++;
719            setTimeout(window.BOLD.subscriptions.patches.patchCashier, 100);
720        }
721    };
722
723    window.BOLD.subscriptions.patches.finishCheckout = function(event, form, cart) {
724        window.BOLD.subscriptions.patches.currentCheckoutRetries++;
725
726        if (!window.BOLD.subscriptions.app
727            && window.BOLD.subscriptions.patches.currentCheckoutRetries < window.BOLD.subscriptions.patches.maxCheckoutRetries
728        ) {
729            setTimeout(function () { window.BOLD.subscriptions.patches.finishCheckout(event, form, cart); }, 100);
730            return;
731        } else if (window.BOLD.subscriptions.app) {
732            window.BOLD.subscriptions.patches.currentCheckoutRetries = 0;
733            window.BOLD.subscriptions.app.addCartParams(form, cart);
734        }
735
736        var noSubscriptions = false;
737        if ((window.BOLD.subscriptions.app && window.BOLD.subscriptions.app.successfulAddToCarts.length === 0)
738            || !window.BOLD.subscriptions.app
739        ) {
740            noSubscriptions = true;
741            event.target.dataset.cashierConfirmedNoPlugins = true;
742
743            if (window.BOLD.subscriptions.setCashierFeatureToken) {
744                window.BOLD.subscriptions.setCashierFeatureToken(false);
745            }
746        }
747
748        if ((noSubscriptions && window.BOLD.subscriptions.config.cashierPluginOnlyMode)
749            || (typeof BOLD.checkout.isFeatureRequired === 'function' && !BOLD.checkout.isFeatureRequired())
750        ) {
751            // send them to the original checkout when in plugin only mode
752            // and either BSUB is there but there are no subscription products
753            // or BSUB isn't there at all
754            if (form.dataset.old_form_action) {
755                form.action = form.dataset.old_form_action;
756            }
757            event.target.click();
758        } else {
759            // sends them to Cashier since BSUB got a chance to add it's stuff
760            // and plugin only mode is not enabled
761            form.submit();
762        }
763    };
764</script>
764
765
766<script id="bold-subscriptions-platform-script" type="text/javascript">
767    window.BOLD.subscriptions.config.shopPlatformId = '3674538084';
768    window.BOLD.subscriptions.config.appSlug = 'subscriptions';
769
770    window.BOLD = window.BOLD || {};
771    window.BOLD.subscriptions = window.BOLD.subscriptions || {};
772    window.BOLD.subscriptions.data = window.BOLD.subscriptions.data || {};
773    window.BOLD.subscriptions.data.platform = window.BOLD.subscriptions.data.platform || {};
774    window.BOLD.subscriptions.data.platform.customer = { id: '' };
775    window.BOLD.subscriptions.data.platform.product = null;
776    window.BOLD.subscriptions.data.platform.products = [];
777    window.BOLD.subscriptions.data.platform.variantProductMap = {};
778
779    window.BOLD.subscriptions.addCachedProductData = function(products) {
780        // ignore [], null, and undefined
781        if (!products) {
782            return
783        }
784
785        if (!Array.isArray(products)) {
786            window.BOLD.subscriptions.logger.warn('products must be an array')
787            return
788        }
789
790        window.BOLD.subscriptions.data.platform.products.concat(products)
791
792        for (var i = 0; i < products.length; i++) {
793            var product = products[i];
794            for (var j = 0; j < product.variants.length; j++) {
795                var variant = product.variants[j];
796                window.BOLD.subscriptions.data.platform.variantProductMap[variant.id] = product;
797            }
798        }
799    }
800
801    
802    
803    
804
805    window.BOLD.subscriptions.config.addToCartFormSelectors.push(
806        '.product-form.product-form-product-template:not(.bold-subscriptions-no-widget)'
807        ,'.product-form.product-form--payment-button:not(.bold-subscriptions-no-widget)'
808    );
809    window.BOLD.subscriptions.config.addToCartButtonSelectors.push('[type="submit"]');
810    window.BOLD.subscriptions.config.quickAddToCartButtonSelectors.push('a[data-event-type="product-click"]');
811    window.BOLD.subscriptions.config.widgetInsertBeforeSelectors.push('[type="submit"]');
812    window.BOLD.subscriptions.config.cartElementSelectors.push('form[action="/cart"]');
813    window.BOLD.subscriptions.config.cartTotalElementSelectors.push('[data-cart-subtotal]', '.text-right .ajaxcart__subtotal');
814    window.BOLD.subscriptions.config.checkoutButtonSelectors.push(
815        '[name="checkout"]',
816        '[href*="checkout"]:not([href*="tools/checkout"])',
817        '[onclick*="checkout"]:not([onclick*="tools/checkout"])',
818    );
819
820    // Discount text markup template
821    // NOTE: @ on double curly, so blade doesn't interpret, and `raw` liquid tags so liquid doesn't interpret.
822    
823    window.BOLD.subscriptions.config.discountItemTemplate = '<div class="bold-subscriptions-discount"><div class="bold-subscriptions-discount__details">{{details}}</div><div class="bold-subscriptions-discount__total">{{total}}</div></div>';
824    
825
826    window.BOLD.subscriptions.getProductIdFromAddToCartForm = function(addToCartForm) {
827        var idInput = addToCartForm.querySelector('[name="id"]');
828        if (idInput === null) {
829            window.BOLD.subscriptions.logger.error('could not get variant id input from add to cart form — make sure your form has an input with [name="id"]')
830            return null;
831        }
832
833        var variantId = parseInt(idInput.value, 10);
834        if (isNaN(variantId)) {
835            window.BOLD.subscriptions.logger.error('could not parse variant id from [name="id"] input')
836            return null;
837        }
838
839        var product = window.BOLD.subscriptions.data.platform.variantProductMap[variantId];
840
841        if (product === undefined) {
842            window.BOLD.subscriptions.logger.error('could not map variant id to cached product data — call window.BOLD.subscriptions.addCachedProductData(products) to add the product to the cache')
843            return null;
844        }
845
846        return product.id;
847    };
848
849    window.BOLD.subscriptions.getAddToCartForms = function() {
850        var forms = [];
851        var idInputs = document.querySelectorAll('[name="id"]');
852
853        for (var i = 0; i < idInputs.length; i++) {
854            var idInput = idInputs[i];
855            var form = idInput.closest('form:not(.bold-subscriptions-no-widget)');
856            if (form) {
857                forms.push(form);
858            }
859        }
860
861        return forms;
862    };
863
864    window.BOLD.subscriptions.getJWT = function (callback) {
865        if(window.BOLD.subscriptions.data.platform.customer.id !== '') {
866            var shopPlatformId = '3674538084';
867            var appSlug = 'subscriptions';
868            var customerPlatformId = window.BOLD.subscriptions.data.platform.customer.id;
869            var proxyPath = '/apps/app-proxy/customers/v1/shops/'+shopPlatformId+'/apps/'+appSlug+'/customers/pid/'+customerPlatformId+'/jwt';
870
871            var xmlhttp = new XMLHttpRequest();
872
873            xmlhttp.onreadystatechange = function() {
874                if (xmlhttp.readyState === window.BOLD.subscriptions.config.XMLHttpRequest.DONE) {
875                    if (xmlhttp.status === 200) {
876                        var data = JSON.parse(xmlhttp.responseText);
877                        callback({
878                            success: true,
879                            value: {
880                                jwt: data.bold_platform_jwt,
881                                customerId: window.BOLD.subscriptions.data.platform.customer.id,
882                            },
883                        });
884                    } else if (xmlhttp.status === 404) {
885                        callback({
886                            success: false,
887                            error: 'not_logged_in',
888                        });
889                    } else {
890                        callback({
891                            success: false,
892                            error: 'unknown',
893                        });
894                    }
895                }
896            };
897
898            xmlhttp.open("GET", proxyPath, true);
899            xmlhttp.setRequestHeader('Accept', 'application/liquid');
900            xmlhttp.send();
901        } else {
902            callback({
903                success: false,
904                error: 'not_logged_in',
905            });
906        }
907    };
908
909    window.BOLD.subscriptions.setCashierFeatureToken = function(value) {
910        if (window.BOLD.checkout_features_defaults && window.BOLD.subscriptions.config.cashierApplicationUUID) {
911            window.BOLD.checkout_features_defaults.forEach(function(item) {
912                if (item.id === window.BOLD.subscriptions.config.cashierApplicationUUID) {
913                    item.require = value;
914                }
915            });
916        }
917    };
918
919    // Cashier patches
920    window.BOLD.subscriptions.patches.cashierListenerFn = function(event) {
921        if (window.BOLD.checkout.isCheckoutButton(event.target) && window.BOLD.checkout.isEnabled()) {
922            window.BOLD.subscriptions.patches.pushToCashier(event);
923        } else if(window.BOLD.checkout.isCheckoutButton(event.target) && typeof window.cashier_installed_on_site === 'undefined') {
924            var request = new XMLHttpRequest();
925            request.open('HEAD', '/apps/checkout/isInstalled', false);
926            request.send(null);
927
928            if(request.status >= 200 && request.status < 400) {
929                window.BOLD.subscriptions.patches.pushToCashier(event);
930            } else {
931                window.cashier_installed_on_site = false;
932            }
933        }
934    };
935
936    window.BOLD.subscriptions.localTime = function() {
937        var localDate = new Date();
938        return localDate.getTime();
939    };
940
941
942    window.BOLD.subscriptions.patches.pushToCashier = function(event) {
943        event.preventDefault();
944        var form = window.BOLD.checkout.getForm(event.target);
945        var formData = new FormData(form);
946        var request = new XMLHttpRequest();
947        request.open('POST', '/cart/update.js?tmp=' + Date.now(), true);
948        request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
949
950        request.onload = function() {
951            if (request.status >= 200 && request.status < 400) {
952                // Success!
953                var cart = JSON.parse(request.responseText);
954
955                // If items are empty redirect back to the cart
956                if (cart.items.length === 0) {
957                    return window.location.href = '/cart';
958                }
959
960                cart.items.forEach(function(element) {
961                    delete element.product_description;
962                });
963
964                if (document.getElementById('CartSpecialInstructions')) {
965                    // If the cart note exists, grab its value
966                    cart.note = document.getElementById('CartSpecialInstructions').value;
967                }
968
969                var cartObj = JSON.stringify(cart);
970
971                var form = window.BOLD.checkout.getForm(event.target);
972                form.dataset.old_form_action = form.action;
973                form.action = '/apps/checkout/begin-checkout' + googleAnalyticsGetParamString({});
974                var cartCookie = window.BOLD.checkout.getCookie('cart');
975                var element = document.createElement('INPUT');
976                element.type = 'HIDDEN';
977                element.name = 'cart_id';
978                element.value = cartCookie;
979                form.appendChild(element);
980
981                var dateElement = document.createElement('INPUT');
982                dateElement.type = 'HIDDEN';
983                dateElement.name = 'checkout_local_time';
984                dateElement.value = window.BOLD.subscriptions.localTime();
985                form.appendChild(dateElement);
986
987                var cartElement = document.createElement('INPUT');
988                cartElement.type = 'HIDDEN';
989                cartElement.name = 'cart';
990                cartElement.value = cartObj;
991                form.appendChild(cartElement);
992                form.method = 'POST';
993
994                if(window.BOLD && window.BOLD.checkout && typeof window.BOLD.checkout.languageIsoCode === 'string') {
995                    var langInput = document.createElement('INPUT');
996                    langInput.type = 'HIDDEN';
997                    langInput.name = 'language_iso';
998                    langInput.value = window.BOLD.checkout.languageIsoCode;
999                    form.appendChild(langInput);
1000                }
1001
1002                if (window.BOLD && window.BOLD.common && typeof window.BOLD.common.eventEmitter === 'object' && typeof window.BOLDCURRENCY !== 'undefined') {
1003                    window.BOLD.common.eventEmitter.emit('BOLD_CASHIER_checkout', {target: form});
1004                }
1005
1006                window.BOLD.subscriptions.patches.finishCheckout(event, form, cart);
1007            }
1008        };
1009
1010        request.send(formData);
1011    };
1012
1013    </script>
1013
1014
1015<!-- BEGIN app block: shopify://apps/bold-subscriptions/blocks/bsub-embed/9ceb49f0-5fe5-4b5e-943d-f8af8985167d -->
1016<script id="bold-subscriptions-app-embed-script" type="text/javascript" defer>
1017    
1018        
1019            if (window.location.href.includes('pages/manage-subscriptions')) {
1020                const queryParams = new URLSearchParams(window.location.search);
1021                if(queryParams.has('deep_link') && queryParams.get('deep_link') === 'upsell' &&
1022                    queryParams.has('type') && queryParams.get('type') === 'upcoming-order-email'
1023                ) {
1024                    window.location.href=`/account/login?${queryParams.toString()}&from_msp=true`;
1025                }
1026            } else if (window.location.href.includes('/account/login')) {
1027                document.addEventListener('DOMContentLoaded', function() {
1028                    const queryParams = new URLSearchParams(window.location.search);
1029                    if(queryParams.has('from_msp')) {
1030                        queryParams.delete('from_msp');
1031
1032                        let form = document.querySelector("#customer_login");
1033
1034                        if(form) {
1035                            let input = document.createElement('input');
1036                            input.type = 'hidden';
1037                            input.name = 'return_to';
1038                            input.value = `https://www.clearviewestate.co.nz/pages/manage-subscriptions?${queryParams.toString()}`;
1039
1040                            form.appendChild(input);
1041                        }
1042                    }
1043                });
1044            }
1045        
1046    
1047
1048    window.BOLD = window.BOLD || {};
1049    window.BOLD.subscriptions = window.BOLD.subscriptions || {};
1050    window.BOLD.subscriptions.config = window.BOLD.subscriptions.config || {};
1051    window.BOLD.subscriptions.config.isAppEmbedEnabled = true;
1052    window.BOLD.subscriptions.classes = window.BOLD.subscriptions.classes || {};
1053    window.BOLD.subscriptions.patches = window.BOLD.subscriptions.patches || {};
1054    window.BOLD.subscriptions.patches.maxCheckoutRetries = window.BOLD.subscriptions.patches.maxCheckoutRetries || 200;
1055    window.BOLD.subscriptions.patches.currentCheckoutRetries = window.BOLD.subscriptions.patches.currentCheckoutRetries || 0;
1056    window.BOLD.subscriptions.patches.maxCashierPatchAttempts = window.BOLD.subscriptions.patches.maxCashierPatchAttempts || 200;
1057    window.BOLD.subscriptions.patches.currentCashierPatchAttempts = window.BOLD.subscriptions.patches.currentCashierPatchAttempts || 0;
1058    window.BOLD.subscriptions.config.platform = 'shopify';
1059    window.BOLD.subscriptions.config.shopDomain = 'cve1.myshopify.com';
1060    window.BOLD.subscriptions.config.customDomain = 'www.clearviewestate.co.nz';
1061    window.BOLD.subscriptions.config.shopIdentifier = '3674538084';
1062    window.BOLD.subscriptions.config.cashierUrl = 'https://cashier.boldcommerce.com';
1063    window.BOLD.subscriptions.config.boldAPIBase = 'https://app-api.boldapps.net/';
1064    window.BOLD.subscriptions.config.cashierApplicationUUID = '2e6a2bbc-b12b-4255-abdf-a02af85c0d4e';
1065    window.BOLD.subscriptions.config.appUrl = 'https://sub.boldapps.net';
1066    window.BOLD.subscriptions.config.currencyCode = 'NZD';
1067    window.BOLD.subscriptions.config.checkoutType = 'shopify';
1068    window.BOLD.subscriptions.config.currencyFormat = "$\u0026#123;\u0026#123;amount}}";
1069    window.BOLD.subscriptions.config.shopCurrencies = [{"id":2739,"currency":"NZD","currency_format":"$\u0026#123;\u0026#123;amount}}","created_at":"2021-06-08 22:33:18","updated_at":"2021-06-08 22:33:18"}];
1070    window.BOLD.subscriptions.config.shopSettings = {"allow_msp_cancellation":true,"allow_msp_prepaid_renewal":true,"customer_can_pause_subscription":true,"customer_can_change_next_order_date":false,"customer_can_change_order_frequency":false,"customer_can_create_an_additional_order":false,"customer_can_use_passwordless_login":false,"customer_passwordless_login_redirect":false,"customer_can_add_products_to_existing_subscriptions":false,"show_currency_code":true,"stored_payment_method_policy":"required","customer_portal_path":"pages\/manage-subscriptions","display_only_subscription_products":false};
1071    window.BOLD.subscriptions.config.customerLoginPath = null;
1072    window.BOLD.subscriptions.config.isPrepaidEnabled = window.BOLD.subscriptions.config.isPrepaidEnabled || true;
1073    window.BOLD.subscriptions.config.loadSubscriptionGroupFrom = 'default';
1074    window.BOLD.subscriptions.config.loadSubscriptionGroupFromTypes = "default";
1075    window.BOLD.subscriptions.config.cashierPluginOnlyMode = window.BOLD.subscriptions.config.cashierPluginOnlyMode || false;
1076    if (window.BOLD.subscriptions.config.waitForCheckoutLoader === undefined) {
1077        window.BOLD.subscriptions.config.waitForCheckoutLoader = true;
1078    }
1079
1080    window.BOLD.subscriptions.config.addToCartFormSelectors = window.BOLD.subscriptions.config.addToCartFormSelectors || [];
1081    window.BOLD.subscriptions.config.addToCartButtonSelectors = window.BOLD.subscriptions.config.addToCartButtonSelectors || [];
1082    window.BOLD.subscriptions.config.widgetInsertBeforeSelectors = window.BOLD.subscriptions.config.widgetInsertBeforeSelectors || [];
1083    window.BOLD.subscriptions.config.quickAddToCartButtonSelectors = window.BOLD.subscriptions.config.quickAddToCartButtonSelectors || [];
1084    window.BOLD.subscriptions.config.cartElementSelectors = window.BOLD.subscriptions.config.cartElementSelectors || [];
1085    window.BOLD.subscriptions.config.cartTotalElementSelectors = window.BOLD.subscriptions.config.cartTotalElementSelectors || [];
1086    window.BOLD.subscriptions.config.lineItemSelectors = window.BOLD.subscriptions.config.lineItemSelectors || [];
1087    window.BOLD.subscriptions.config.lineItemNameSelectors = window.BOLD.subscriptions.config.lineItemNameSelectors || [];
1088    window.BOLD.subscriptions.config.checkoutButtonSelectors = window.BOLD.subscriptions.config.checkoutButtonSelectors || [];
1089
1090    window.BOLD.subscriptions.config.featureFlags = window.BOLD.subscriptions.config.featureFlagOverrides || ["BE-2298-Support-Variant-Selections-In-Sub-Groups","BE-6178-Control-Oversell-Rules-For-Recurrences","BE-6741-RESTFUL-discount-codes","BE-6925-remove-bold-error-code-from-error-message","BE-8664-default-address-source-bold","BE-9259-csp-p
1090ostmvp","BE-9502-add-logs-to-investigate-infinite-loop","BE-9515-fix-embedded-billing","BE-9152-Mantle-Engagement","BE-9759-No-Deep-Link-Caching-On-Dashboard","BE-9838-Frequency-Updates-SellingPlan-Details","BE-9731-bulk-csp-sync"];
1091    window.BOLD.subscriptions.config.subscriptionProcessingFrequency = '60';
1092    window.BOLD.subscriptions.config.requireMSPInitialLoadingMessage = true;
1093    window.BOLD.subscriptions.data = window.BOLD.subscriptions.data || {};
1094
1095    // Interval text markup template
1096    window.BOLD.subscriptions.config.lineItemPropertyListSelectors = window.BOLD.subscriptions.config.lineItemPropertyListSelectors || [];
1097    window.BOLD.subscriptions.config.lineItemPropertyListSelectors.push('dl.definitionList');
1098    window.BOLD.subscriptions.config.lineItemPropertyListTemplate = window.BOLD.subscriptions.config.lineItemPropertyListTemplate || '<dl class="definitionList"></dl>';
1099    window.BOLD.subscriptions.config.lineItemPropertyTemplate = window.BOLD.subscriptions.config.lineItemPropertyTemplate || '<dt class="definitionList-key">{{key}}:</dt><dd class="definitionList-value">{{value}}</dd>';
1100
1101    // Discount text markup template
1102    window.BOLD.subscriptions.config.discountItemTemplate = window.BOLD.subscriptions.config.discountItemTemplate || '<div class="bold-subscriptions-discount"><div class="bold-subscriptions-discount__details">{{details}}</div><div class="bold-subscriptions-discount__total">{{total}}</div></div>';
1103
1104
1105    // Constants in XMLHttpRequest are not reliable, so we will create our own
1106    // reference: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState
1107    window.BOLD.subscriptions.config.XMLHttpRequest = {
1108        UNSENT:0,            // Client has been created. open() not called yet.
1109        OPENED: 1,           // open() has been called.
1110        HEADERS_RECEIVED: 2, // send() has been called, and headers and status are available.
1111        LOADING: 3,          // Downloading; responseText holds partial data.
1112        DONE: 4              // The operation is complete.
1113    };
1114
1115    window.BOLD.subscriptions.config.assetBaseUrl = 'https://sub.boldapps.net';
1116    if (window.localStorage && window.localStorage.getItem('boldSubscriptionsAssetBaseUrl')) {
1117        window.BOLD.subscriptions.config.assetBaseUrl = window.localStorage.getItem('boldSubscriptionsAssetBaseUrl')
1118    }
1119
1120    window.BOLD.subscriptions.data.subscriptionGroups = [];
1121    if (localStorage && localStorage.getItem('boldSubscriptionsSubscriptionGroups')) {
1122        window.BOLD.subscriptions.data.subscriptionGroups = JSON.parse(localStorage.getItem('boldSubscriptionsSubscriptionGroups'));
1123    } else {
1124        window.BOLD.subscriptions.data.subscriptionGroups = [{"id":16296,"billing_rules":[{"id":34096,"subscription_group_id":16296,"interval_name":"Quarterly","billing_rule":"FREQ=MONTHLY;INTERVAL=3","custom_billing_rule":""}],"is_subscription_only":false,"allow_prepaid":false,"allow_dynamic_discount":false,"is_prepaid_only":false,"should_continue_prepaid":true,"continue_prepaid_type":"as_prepaid","prepaid_durations":[{"id":16143,"subscription_group_id":16296,"total_duration":1,"discount_type":"percentage","discount_value":0}],"dynamic_discounts":[],"selection_options":[{"platform_entity_id":"3318597877860"},{"platform_entity_id":"3318613835876"},{"platform_entity_id":"3318623076452"}],"discount_type":"no_discount","percent_discount":0,"fixed_discount":0,"can_add_to_cart":true}];
1125    }
1126
1127    window.BOLD.subscriptions.isFeatureFlagEnabled = function (featureFlag) {
1128        for (var i = 0; i < window.BOLD.subscriptions.config.featureFlags.length; i++) {
1129            if (window.BOLD.subscriptions.config.featureFlags[i] === featureFlag){
1130                return true;
1131            }
1132        }
1133        return false;
1134    }
1135
1136    window.BOLD.subscriptions.logger = {
1137        tag: "bold_subscriptions",
1138        // the bold subscriptions log level
1139        // 0 - errors (default)
1140        // 1 - warnings + errors
1141        // 2 - info + warnings + errors
1142        // use window.localStorage.setItem('boldSubscriptionsLogLevel', x) to set the log level
1143        levels: {
1144            ERROR: 0,
1145            WARN: 1,
1146            INFO: 2,
1147        },
1148        level: parseInt((window.localStorage && window.localStorage.getItem('boldSubscriptionsLogLevel')) || "0", 10),
1149        _log: function(callArgs, level) {
1150            if (!window.console) {
1151                return null;
1152            }
1153
1154            if (window.BOLD.subscriptions.logger.level < level) {
1155                return;
1156            }
1157
1158            var params = Array.prototype.slice.call(callArgs);
1159            params.unshift(window.BOLD.subscriptions.logger.tag);
1160
1161            switch (level) {
1162                case window.BOLD.subscriptions.logger.levels.INFO:
1163                    console.info.apply(null, params);
1164                    return;
1165                case window.BOLD.subscriptions.logger.levels.WARN:
1166                    console.warn.apply(null, params);
1167                    return;
1168                case window.BOLD.subscriptions.logger.levels.ERROR:
1169                    console.error.apply(null, params);
1170                    return;
1171                default:
1172                    console.log.apply(null, params);
1173                    return;
1174            }
1175        },
1176        info: function() {
1177            window.BOLD.subscriptions.logger._log(arguments, window.BOLD.subscriptions.logger.levels.INFO);
1178        },
1179        warn: function() {
1180            window.BOLD.subscriptions.logger._log(arguments, window.BOLD.subscriptions.logger.levels.WARN);
1181        },
1182        error: function() {
1183            window.BOLD.subscriptions.logger._log(arguments, window.BOLD.subscriptions.logger.levels.ERROR);
1184        }
1185    }
1186
1187    window.BOLD.subscriptions.shouldLoadSubscriptionGroupFromAPI = function() {
1188        return window.BOLD.subscriptions.config.loadSubscriptionGroupFrom === window.BOLD.subscriptions.config.loadSubscriptionGroupFromTypes['BSUB_API'];
1189    }
1190
1191    window.BOLD.subscriptions.getSubscriptionGroupFromProductId = function (productId) {
1192        var data = window.BOLD.subscriptions.data;
1193        var foundGroup = null;
1194        for (var i = 0; i < data.subscriptionGroups.length; i += 1) {
1195            var subscriptionGroup = data.subscriptionGroups[i];
1196            for (var j = 0; j < subscriptionGroup.selection_options.length; j += 1) {
1197                var selectionOption = subscriptionGroup.selection_options[j];
1198                if (selectionOption.platform_entity_id === productId.toString()) {
1199                    foundGroup = subscriptionGroup;
1200                    break;
1201                }
1202            }
1203            if (foundGroup) {
1204                break;
1205            }
1206        }
1207        return foundGroup;
1208    };
1209
1210    window.BOLD.subscriptions.getSubscriptionGroupById = function(subGroupId) {
1211        var subscriptionGroups = window.BOLD.subscriptions.data.subscriptionGroups;
1212
1213        for (var i = 0; i < subscriptionGroups.length; i += 1) {
1214            var subGroup = subscriptionGroups[i];
1215            if (subGroup.id === subGroupId) {
1216                return subGroup;
1217            }
1218        }
1219
1220        return null;
1221    };
1222
1223    window.BOLD.subscriptions.addSubscriptionGroup = function (subscriptionGroup) {
1224        if(!window.BOLD.subscriptions.getSubscriptionGroupById(subscriptionGroup.id))
1225        {
1226            window.BOLD.subscriptions.data.subscriptionGroups.push(subscriptionGroup);
1227        }
1228    }
1229
1230    window.BOLD.subscriptions.getSubscriptionGroupPrepaidDurationById = function(subscriptionGroupId, prepaidDurationId) {
1231        var subscriptionGroup = window.BOLD.subscriptions.getSubscriptionGroupById(subscriptionGroupId);
1232
1233        if (
1234            !subscriptionGroup
1235            || !subscriptionGroup.prepaid_durations
1236            || !subscriptionGroup.prepaid_durations.length
1237        ) {
1238            return null;
1239        }
1240
1241        for (var i = 0; i < subscriptionGroup.prepaid_durations.length; i++) {
1242            var prepaidDuration = subscriptionGroup.prepaid_durations[i];
1243            if (prepaidDuration.id === prepaidDurationId) {
1244                return prepaidDuration;
1245            }
1246        }
1247
1248        return null;
1249    }
1250
1251    window.BOLD.subscriptions.getSubscriptionGroupBillingRuleById = function(subGroup, billingRuleId) {
1252        for (var i = 0; i < subGroup.billing_rules.length; i += 1) {
1253            var billingRule = subGroup.billing_rules[i];
1254            if (billingRule.id === billingRuleId) {
1255                return billingRule;
1256            }
1257        }
1258
1259        return null;
1260    };
1261
1262    window.BOLD.subscriptions.toggleDisabledAddToCartButtons = function(d) {
1263        var addToCartForms = document.querySelectorAll(window.BOLD.subscriptions.config.addToCartFormSelectors.join(','));
1264        var disable = !!d;
1265        for (var i = 0; i < addToCartForms.length; i++) {
1266            var addToCartForm = addToCartForms[i];
1267            var productId = window.BOLD.subscriptions.getProductIdFromAddToCartForm(
1267addToCartForm);
1268            var subscriptionGroup = window.BOLD.subscriptions.getSubscriptionGroupFromProductId(productId);
1269
1270            if(window.BOLD.subscriptions.isFeatureFlagEnabled('BS2-4659_improve_large_group_selection') ) {
1271                if (subscriptionGroup || window.BOLD.subscriptions.shouldLoadSubscriptionGroupFromAPI()) {
1272                    var addToCartButtons = addToCartForm.querySelectorAll(window.BOLD.subscriptions.config.addToCartButtonSelectors.join(','));
1273                    for (var j = 0; j < addToCartButtons.length; j++) {
1274                        var addToCartButton = addToCartButtons[j];
1275                        var toggleAction = disable ?  addToCartButton.setAttribute : addToCartButton.removeAttribute;
1276
1277                        addToCartButton.disabled = disable;
1278                        toggleAction.call(addToCartButton, 'data-disabled-by-subscriptions', disable);
1279                    }
1280                }
1281            } else {
1282                if (subscriptionGroup) {
1283                    var addToCartButtons = addToCartForm.querySelectorAll(window.BOLD.subscriptions.config.addToCartButtonSelectors.join(','));
1284                    for (var j = 0; j < addToCartButtons.length; j++) {
1285                        var addToCartButton = addToCartButtons[j];
1286                        var toggleAction = disable ?  addToCartButton.setAttribute : addToCartButton.removeAttribute;
1287
1288                        addToCartButton.disabled = disable;
1289                        toggleAction.call(addToCartButton, 'data-disabled-by-subscriptions', disable);
1290                    }
1291                }
1292            }
1293
1294        }
1295    };
1296
1297    window.BOLD.subscriptions.disableAddToCartButtons = function () {
1298        // only disable the add to cart buttons if the app isn't loaded yet
1299        if (!window.BOLD.subscriptions.app) {
1300            window.BOLD.subscriptions.toggleDisabledAddToCartButtons(true);
1301        } else {
1302            window.BOLD.subscriptions.enableAddToCartButtons();
1303        }
1304    };
1305
1306    window.BOLD.subscriptions.enableAddToCartButtons = function () {
1307        document.removeEventListener('click', window.BOLD.subscriptions.preventSubscriptionAddToCart);
1308        window.BOLD.subscriptions.toggleDisabledAddToCartButtons(false);
1309    };
1310
1311    window.BOLD.subscriptions.toggleDisabledCheckoutButtons = function(d) {
1312        var checkoutButtons = document.querySelectorAll(window.BOLD.subscriptions.config.checkoutButtonSelectors.join(','));
1313        var disable = !!d;
1314        for (var i = 0; i < checkoutButtons.length; i++) {
1315            var checkoutButton = checkoutButtons[i];
1316            var toggleAction = disable ? checkoutButton.setAttribute : checkoutButton.removeAttribute;
1317
1318            checkoutButton.disabled = disable;
1319            toggleAction.call(checkoutButton, 'data-disabled-by-subscriptions', disable);
1320        }
1321    }
1322
1323    window.BOLD.subscriptions.disableCheckoutButtons = function() {
1324        // only disable the checkout buttons if the app isn't loaded yet
1325        if (!window.BOLD.subscriptions.app) {
1326            window.BOLD.subscriptions.toggleDisabledCheckoutButtons(true);
1327        } else {
1328            window.BOLD.subscriptions.enableCheckoutButtons();
1329        }
1330    }
1331
1332    window.BOLD.subscriptions.enableCheckoutButtons = function() {
1333        document.removeEventListener('click', window.BOLD.subscriptions.preventCheckout);
1334        window.BOLD.subscriptions.toggleDisabledCheckoutButtons(false);
1335    }
1336
1337    window.BOLD.subscriptions.hasSuccessfulAddToCarts = function() {
1338        if (typeof(Storage) !== "undefined") {
1339            var successfulAddToCarts = JSON.parse(
1340                window.localStorage.getItem('boldSubscriptionsSuccessfulAddToCarts') || '[]'
1341            );
1342            if (successfulAddToCarts.length > 0) {
1343                return true;
1344            }
1345        }
1346
1347        return false;
1348    }
1349
1350    window.BOLD.subscriptions.hasPendingAddToCarts = function() {
1351        if (typeof(Storage) !== "undefined") {
1352            var pendingAddToCarts = JSON.parse(
1353                window.localStorage.getItem('boldSubscriptionsPendingAddToCarts') || '[]'
1354            );
1355            if (pendingAddToCarts.length > 0) {
1356                return true;
1357            }
1358        }
1359
1360        return false;
1361    }
1362
1363    window.BOLD.subscriptions.addJSAsset = function(src, deferred) {
1364        var scriptTag = document.getElementById('bold-subscriptions-app-embed-script');
1365        var jsElement = document.createElement('script');
1366        jsElement.type = 'text/javascript';
1367        jsElement.src = src;
1368        if (deferred) {
1369           jsElement.defer = true;
1370        }
1371        scriptTag.parentNode.insertBefore(jsElement, scriptTag);
1372    };
1373
1374    window.BOLD.subscriptions.addCSSAsset = function(href) {
1375        var scriptTag = document.getElementById('bold-subscriptions-app-embed-script');
1376        var cssElement = document.createElement('link');
1377        cssElement.href = href;
1378        cssElement.rel = 'stylesheet';
1379        scriptTag.parentNode.insertBefore(cssElement, scriptTag);
1380    };
1381
1382    window.BOLD.subscriptions.loadStorefrontAssets = function loadStorefrontAssets() {
1383        var assets = window.BOLD.subscriptions.config.assets;
1384        window.BOLD.subscriptions.addCSSAsset(window.BOLD.subscriptions.config.assetBaseUrl + '/static/' + assets['storefront.css']);
1385        window.BOLD.subscriptions.addJSAsset(window.BOLD.subscriptions.config.assetBaseUrl + '/static/' + assets['storefront.js'], false);
1386    };
1387
1388    window.BOLD.subscriptions.loadCustomerPortalAssets = function loadCustomerPortalAssets() {
1389      if (document.getElementById('customer-portal-root') || document.getElementsByClassName('bsub-express-add-ons-widget')) {
1390        var assets = window.BOLD.subscriptions.config.assets;
1391        window.BOLD.subscriptions.addCSSAsset(window.BOLD.subscriptions.config.assetBaseUrl + '/static/' + assets['customer_portal.css']);
1392        window.BOLD.subscriptions.addJSAsset(window.BOLD.subscriptions.config.assetBaseUrl + '/static/' + assets['customer_portal.js'], true);
1393      }
1394    };
1395
1396    window.BOLD.subscriptions.processManifest = function() {
1397        if (!window.BOLD.subscriptions.processedManifest) {
1398            window.BOLD.subscriptions.processedManifest = true;
1399            window.BOLD.subscriptions.config.assets = JSON.parse(this.responseText);
1400
1401            
1402            window.BOLD.subscriptions.loadCustomerPortalAssets();
1403        }
1404    };
1405
1406    window.BOLD.subscriptions.addInitialLoadingMessage = function() {
1407        var customerPortalNode = document.getElementById('customer-portal-root');
1408        if (customerPortalNode && window.BOLD.subscriptions.config.requireMSPInitialLoadingMessage) {
1409            customerPortalNode.innerHTML = '<div class="bold-subscriptions-loader-container"><div class="bold-subscriptions-loader"></div></div>';
1410        }
1411    }
1412
1413    window.BOLD.subscriptions.contentLoaded = function() {
1414        window.BOLD.subscriptions.data.contentLoadedEventTriggered = true;
1415        window.BOLD.subscriptions.addInitialLoadingMessage();
1416        
1417    };
1418
1419    window.BOLD.subscriptions.preventSubscriptionAddToCart = function(e) {
1420        if (e.target.matches(window.BOLD.subscriptions.config.addToCartButtonSelectors.join(',')) && e.target.form) {
1421            var productId = window.BOLD.subscriptions.getProductIdFromAddToCartForm(e.target.form);
1422            var subscriptionGroup = window.BOLD.subscriptions.getSubscriptionGroupFromProductId(productId);
1423            if(window.BOLD.subscriptions.isFeatureFlagEnabled('BS2-4659_improve_large_group_selection'))
1424            {
1425                if (subscriptionGroup || window.BOLD.subscriptions.shouldLoadSubscriptionGroupFromAPI()) {
1426                    // This code prevents products in subscription groups from being added to the cart before the
1427                    // Subscriptions app fully loads. Once the subscriptions app loads it will re-enable the
1428                    // buttons. Use window.BOLD.subscriptions.enableAddToCartButtons enable them manually.
1429                    e.preventDefault();
1430                    return false;
1431                }
1432            } else {
1433                if (subscriptionGroup) {
1434                    // This code prevents products in subscription groups from being added to the cart before the
1435                    // Subscriptions app fully loads. Once the subscriptions app loads it will re-enable the
1436                    // buttons. Use window.BOLD.subscriptions.enableAddToCartButtons enable them manually.
1437                    e.preventDefault();
1438                    return false;
1439                }
1440            }
1441
1442        }
1443    };
1444
1445    window.BOLD.subscriptions.preventCheckout = function(e) {
1446        if (
1447            e.target.matches(window.BOLD.subscriptions.config.checkoutButtonSelectors.join(','))
1448            && (window.BOLD.subscriptions.hasSuccessfulAddToCarts() || window.BOLD.subscriptions.hasPendingAddToCarts())
1449        ) {
1450            // This code prevents checkouts on the shop until the Subscriptions app fully loads.
1451            // When the Subscriptions app is ready it will enable the checkout buttons itself.
1452            // Use window.BOLD.subscriptions.enableCheckoutButtons to enable them manually.
1453            e.preventDefault();
1454            return false;
1455        }
1456    }
1457
1458    if (!window.BOLD.subscriptions.config.legacyAssetsLoaded) {
1459        
1460        document.addEventListener('DOMContentLoaded', window.BOLD.subscriptions.contentLoaded);
1461    }
1462
1463    if (!Element.prototype.matches) {
1464        Element.prototype.matches =
1465            Element.prototype.matchesSelector ||
1466            Element.prototype.mozMatchesSelector ||
1467            Element.prototype.msMatchesSelector ||
1468            Element.prototype.oMatchesSelector ||
1469            Element.prototype.webkitMatchesSelector ||
1470            function(s) {
1471                var matches = (this.document || this.ownerDocument).querySelectorAll(s),
1472                    i = matches.length;
1473                while (--i >= 0 && matches.item(i) !== this) {}
1474                return i > -1;
1475            };
1476    }
1477
1478    if (!Element.prototype.closest) {
1479        Element.prototype.closest = function(s) {
1480            var el = this;
1481
1482            do {
1483                if (Element.prototype.matches.call(el, s)) return el;
1484                el = el.parentElement || el.parentNode;
1485            } while (el !== null && el.nodeType === 1);
1486            return null;
1487        };
1488    }
1489
1490    window.BOLD.subscriptions.setVisibilityOfAdditionalCheckoutButtons = function (isVisible) {
1491        if (window.BOLD.subscriptions.config.additionalCheckoutSelectors === undefined) {
1492            return;
1493        }
1494
1495        var selectors = window.BOLD.subscriptions.config.additionalCheckoutSelectors;
1496
1497        for (var i = 0; i < selectors.length; i++) {
1498            var elements = document.querySelectorAll(selectors[i]);
1499
1500            for (var j = 0; j < elements.length; j++) {
1501                elements[j].style.display = isVisible ? 'block' : 'none';
1502            }
1503        }
1504    }
1505
1506    window.BOLD.subscriptions.hideAdditionalCheckoutButtons = function() {
1507        window.BOLD.subscriptions.setVisibilityOfAdditionalCheckoutButtons(false);
1508    };
1509
1510    window.BOLD.subscriptions.showAdditionalCheckoutButtons = function() {
1511        window.BOLD.subscriptions.setVisibilityOfAdditionalCheckoutButtons(true);
1512    };
1513
1514    window.BOLD.subscriptions.enhanceMspUrls = function(data) {
1515        var mspUrl = 'https://sub.boldapps.net/shop/9054/customer_portal';
1516        var elements = document.querySelectorAll("a[href='"+mspUrl+"']");
1517
1518        if(!elements.length || !data.success) {
1519            return;
1520        }
1521
1522        for (var i = 0; i < elements.length; i++) {
1523            elements[i].href = elements[i].href + "?jwt="+data.value.jwt+"&customerId="+data.value.customerId;
1524        }
1525    };
1526
1527    if (!window.BOLD.subscriptions.config.legacyAssetsLoaded) {
1528        window.addEventListener('load', function () {
1529          if (document.getElementById('customer-portal-root')) {
1530            window.BOLD.subscriptions.getJWT(window.BOLD.subscriptions.enhanceMspUrls);
1531          }
1532        });
1533
1534        // This will be called immediately
1535        // Use this anonymous function to avoid polluting the global namespace
1536        (function() {
1537            var xhr = new XMLHttpRequest();
1538            xhr.addEventListener('load', window.BOLD.subscriptions.processManifest);
1539            xhr.open('GET', window.BOLD.subscriptions.config.assetBaseUrl + '/static/manifest.json?t=' + (new Date()).getTime());
1540            xhr.send();
1541        })()
1542    }
1543
1544    window.BOLD.subscriptions.patches.patchCashier = function() {
1545        if (window.BOLD && window.BOLD.checkout) {
1546            window.BOLD.checkout.disable();
1547            window.BOLD.checkout.listenerFn = window.BOLD.subscriptions.patches.cashierListenerFn;
1548            window.BOLD.checkout.enable();
1549        } else if (window.BOLD.subscriptions.patches.currentCashierPatchAttempts < window.BOLD.subscriptions.patches.maxCashierPatchAttempts) {
1550            window.BOLD.subscriptions.patches.currentCashierPatchAttempts++;
1551            setTimeout(window.BOLD.subscriptions.patches.patchCashier, 100);
1552        }
1553    };
1554
1555    window.BOLD.subscriptions.patches.finishCheckout = function(event, form, cart) {
1556        window.BOLD.subscriptions.patches.currentCheckoutRetries++;
1557
1558        if (!window.BOLD.subscriptions.app
1559            && window.BOLD.subscriptions.patches.currentCheckoutRetries < window.BOLD.subscriptions.patches.maxCheckoutRetries
1560        ) {
1561            setTimeout(function () { window.BOLD.subscriptions.patches.finishCheckout(event, form, cart); }, 100);
1562            return;
1563        } else if (window.BOLD.subscriptions.app) {
1564            window.BOLD.subscriptions.patches.currentCheckoutRetries = 0;
1565            window.BOLD.subscriptions.app.addCartParams(form, cart);
1566        }
1567
1568        var noSubscriptions = false;
1569        if ((window.BOLD.subscriptions.app && window.BOLD.subscriptions.app.successfulAddToCarts.length === 0)
1570            || !window.BOLD.subscriptions.app
1571        ) {
1572            noSubscriptions = true;
1573            event.target.dataset.cashierConfirmedNoPlugins = true;
1574
1575            if (window.BOLD.subscriptions.setCashierFeatureToken) {
1576                window.BOLD.subscriptions.setCashierFeatureToken(false);
1577            }
1578        }
1579
1580        if ((noSubscriptions && window.BOLD.subscriptions.config.cashierPluginOnlyMode)
1581            || (typeof BOLD.checkout.isFeatureRequired === 'function' && !BOLD.checkout.isFeatureRequired())
1582        ) {
1583            // send them to the original checkout when in plugin only mode
1584            // and either BSUB is there but there are no subscription products
1585            // or BSUB isn't there at all
1586            if (form.dataset.old_form_action) {
1587                form.action = form.dataset.old_form_action;
1588            }
1589            event.target.click();
1590        } else {
1591            // sends them to Cashier since BSUB got a chance to add it's stuff
1592            // and plugin only mode is not enabled
1593            form.submit();
1594        }
1595    };
1596</script>
vendor: 1 bytes, line 1596
1596
1597<script id="bold-subscriptions-app-embed-platform-script" type="text/javascript" defer>
1598    window.BOLD.subscriptions.config.shopPlatformId = '3674538084';
1599    window.BOLD.subscriptions.config.appSlug = 'subscriptions';
1600
1601    window.BOLD = window.BOLD || {};
1602    window.BOLD.subscriptions = window.BOLD.subscriptions || {};
1603    window.BOLD.subscriptions.data = window.BOLD.subscriptions.data || {};
1604    window.BOLD.subscriptions.data.platform = window.BOLD.subscriptions.data.platform || {};
1605    window.BOLD.subscriptions.data.platform.customer = { id: '' };
1606    window.BOLD.subscriptions.data.platform.product = null;
1607    window.BOLD.subscriptions.data.platform.products = [];
1608    window.BOLD.subscriptions.data.platform.variantProductMap = {};
1609
1610    window.BOLD.subscriptions.getProductByVariantId = function(variantId) {
1611        if (window.BOLD.subscriptions.data.platform.product && 
1612            window.BOLD.subscriptions.data.platform.product.variants) {
1613            for (var i = 0; i < window.BOLD.subscriptions.data.platform.product.variants.length; i++) {
1614                if (window.BOLD.subscriptions.data.platform.product.variants[i].id === variantId) {
1615                    return window.BOLD.subscriptions.data.platform.product;
1616                }
1617            }
1618        }
1619
1620        if (window.BOLD.subscriptions.data.platform.variantProductMap[variantId]) {
1621            return window.BOLD.subscriptions.data.platform.variantProductMap[variantId];
1622        }
1623
1624        var productElements = document.querySelectorAll('[data-product-id]');
1625        for (var i = 0; i < productElements.length; i++) {
1626            var productJsonElement = productElements[i].querySelector('[data-product-json]');
1627            
1628            if (productJsonElement) {
1629                try {
1630                    var productData = JSON.parse(productJsonElement.textContent);
1631                    if (productData && productData.variants) {
1632                        for (var j = 0; j < productData.variants.length; j++) {
1633                            if (productData.variants[j].id === variantId) {
1634                                return productData;
1635                            }
1636                        }
1637                    }
1638                } catch (e) {
1639                    // Continue if parsing fails
1640                }
1641            }
1642        }
1643
1644        return null;
1645    }
1646
1647    window.BOLD.subscriptions.config.addToCartFormSelectors.push(
1648        '.product-form.product-form-product-template:not(.bold-subscriptions-no-widget)'
1649        ,'.product-form.product-form--payment-button:not(.bold-subscriptions-no-widget)'
1650    );
1651    window.BOLD.subscriptions.config.addToCartButtonSelectors.push('[type="submit"]');
1652    window.BOLD.subscriptions.config.quickAddToCartButtonSelectors.push('a[data-event-type="product-click"]');
1653    window.BOLD.subscriptions.config.widgetInsertBeforeSelectors.push('[type="submit"]');
1654    window.BOLD.subscriptions.config.cartElementSelectors.push('form[action="/cart"]');
1655    window.BOLD.subscriptions.config.cartTotalElementSelectors.push('[data-cart-subtotal]', '.text-right .ajaxcart__subtotal');
1656    window.BOLD.subscriptions.config.checkoutButtonSelectors.push(
1657        '[name="checkout"]',
1658        '[href*="checkout"]:not([href*="tools/checkout"])',
1659        '[onclick*="checkout"]:not([onclick*="tools/checkout"])',
1660    );
1661
1662    // Discount text markup template
1663    
1664    window.BOLD.subscriptions.config.discountItemTemplate = '<div class="bold-subscriptions-discount"><div class="bold-subscriptions-discount__details">{{details}}</div><div class="bold-subscriptions-discount__total">{{total}}</div></div>';
1665    
1666
1667    window.BOLD.subscriptions.getProductIdFromAddToCartForm = function(addToCartForm) {
1668        var idInput = addToCartForm.querySelector('[name="id"]');
1669        if (idInput === null) {
1670            window.BOLD.subscriptions.logger.error('could not get variant id input from add to cart form — make sure your form has an input with [name="id"]')
1671            return null;
1672        }
1673
1674        var variantId = parseInt(idInput.value, 10);
1675        if (isNaN(variantId)) {
1676            window.BOLD.subscriptions.logger.error('could not parse variant id from [name="id"] input')
1677            return null;
1678        }
1679
1680        var product = window.BOLD.subscriptions.getProductByVariantId(variantId);
1681
1682        if (product === undefined || product === null) {
1683            window.BOLD.subscriptions.logger.error('could not find product data for variant id ' + variantId + ' — product data may not be available on this page')
1684            return null;
1685        }
1686
1687        return product.id;
1688    };
1689
1690    window.BOLD.subscriptions.getAddToCartForms = function() {
1691        var forms = [];
1692        var idInputs = document.querySelectorAll('[name="id"]');
1693
1694        for (var i = 0; i < idInputs.length; i++) {
1695            var idInput = idInputs[i];
1696            var form = idInput.closest('form:not(.bold-subscriptions-no-widget)');
1697            if (form) {
1698                forms.push(form);
1699            }
1700        }
1701
1702        return forms;
1703    };
1704
1705    window.BOLD.subscriptions.getJWT = function (callback) {
1706        if(window.BOLD.subscriptions.data.platform.customer.id !== '') {
1707            var shopPlatformId = '3674538084';
1708            var appSlug = 'subscriptions';
1709            var customerPlatformId = window.BOLD.subscriptions.data.platform.customer.id;
1710            var proxyPath = '/apps/app-proxy/customers/v1/shops/'+shopPlatformId+'/apps/'+appSlug+'/customers/pid/'+customerPlatformId+'/jwt';
1711
1712            var xmlhttp = new XMLHttpRequest();
1713
1714            xmlhttp.onreadystatechange = function() {
1715                if (xmlhttp.readyState === window.BOLD.subscriptions.config.XMLHttpRequest.DONE) {
1716                    if (xmlhttp.status === 200) {
1717                        var data = JSON.parse(xmlhttp.responseText);
1718                        callback({
1719                            success: true,
1720                            value: {
1721                                jwt: data.bold_platform_jwt,
1722                                customerId: window.BOLD.subscriptions.data.platform.customer.id,
1723                            },
1724                        });
1725                    } else if (xmlhttp.status === 404) {
1726                        callback({
1727                            success: false,
1728                            error: 'not_logged_in',
1729                        });
1730                    } else {
1731                        callback({
1732                            success: false,
1733                            error: 'unknown',
1734                        });
1735                    }
1736                }
1737            };
1738
1739            xmlhttp.open("GET", proxyPath, true);
1740            xmlhttp.setRequestHeader('Accept', 'application/liquid');
1741            xmlhttp.send();
1742        } else {
1743            callback({
1744                success: false,
1745                error: 'not_logged_in',
1746            });
1747        }
1748    };
1749
1750    window.BOLD.subscriptions.setCashierFeatureToken = function(value) {
1751        if (window.BOLD.checkout_features_defaults && window.BOLD.subscriptions.config.cashierApplicationUUID) {
1752            window.BOLD.checkout_features_defaults.forEach(function(item) {
1753                if (item.id === window.BOLD.subscriptions.config.cashierApplicationUUID) {
1754                    item.require = value;
1755                }
1756            });
1757        }
1758    };
1759
1760    // Cashier patches
1761    window.BOLD.subscriptions.patches.cashierListenerFn = function(event) {
1762        if (window.BOLD.checkout.isCheckoutButton(event.target) && window.BOLD.checkout.isEnabled()) {
1763            window.BOLD.subscriptions.patches.pushToCashier(event);
1764        } else if(window.BOLD.checkout.isCheckoutButton(event.target) && typeof window.cashier_installed_on_site === 'undefined') {
1765            var request = new XMLHttpRequest();
1766            request.open('HEAD', '/apps/checkout/isInstalled', false);
1767            request.send(null);
1768
1769            if(request.status >= 200 && request.status < 400) {
1770                window.BOLD.subscriptions.patches.pushToCashier(event);
1771            } else {
1772                window.cashier_installed_on_site = false;
1773            }
1774        }
1775    };
1776
1777    window.BOLD.subscriptions.localTime = function() {
1778        var localDate = new Date();
1779        return localDate.getTime();
1780    };
1781
1782
1783    window.BOLD.subscriptions.patches.pushToCashier = function(event) {
1784        event.preventDefault();
1785        var form = window.BOLD.checkout.getForm(event.target);
1786        var formData = new FormData(form);
1787        var request = new XMLHttpRequest();
1788        request.open('POST', '/cart/update.js?tmp=' + Date.now(), true);
1789        request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
1790
1791        request.onload = function() {
1792            if (request.status >= 200 && request.status < 400) {
1793                // Success!
1794                var cart = JSON.parse(request.responseText);
1795
1796                // If items are empty redirect back to the cart
1797                if (cart.items.length === 0) {
1798                    return window.location.href = '/cart';
1799                }
1800
1801                cart.items.forEach(function(element) {
1802                    delete element.product_description;
1803                });
1804
1805                if (document.getElementById('CartSpecialInstructions')) {
1806                    // If the cart note exists, grab its value
1807                    cart.note = document.getElementById('CartSpecialInstructions').value;
1808                }
1809
1810                var cartObj = JSON.stringify(cart);
1811
1812                var form = window.BOLD.checkout.getForm(event.target);
1813                form.dataset.old_form_action = form.action;
1814                form.action = '/apps/checkout/begin-checkout' + googleAnalyticsGetParamString({});
1815                var cartCookie = window.BOLD.checkout.getCookie('cart');
1816                var element = document.createElement('INPUT');
1817                element.type = 'HIDDEN';
1818                element.name = 'cart_id';
1819                element.value = cartCookie;
1820                form.appendChild(element);
1821
1822                var dateElement = document.createElement('INPUT');
1823                dateElement.type = 'HIDDEN';
1824                dateElement.name = 'checkout_local_time';
1825                dateElement.value = window.BOLD.subscriptions.localTime();
1826                form.appendChild(dateElement);
1827
1828                var cartElement = document.createElement('INPUT');
1829                cartElement.type = 'HIDDEN';
1830                cartElement.name = 'cart';
1831                cartElement.value = cartObj;
1832                form.appendChild(cartElement);
1833                form.method = 'POST';
1834
1835                if(window.BOLD && window.BOLD.checkout && typeof window.BOLD.checkout.languageIsoCode === 'string') {
1836                    var langInput = document.createElement('INPUT');
1837                    langInput.type = 'HIDDEN';
1838                    langInput.name = 'language_iso';
1839                    langInput.value = window.BOLD.checkout.languageIsoCode;
1840                    form.appendChild(langInput);
1841                }
1842
1843                if (window.BOLD && window.BOLD.common && typeof window.BOLD.common.eventEmitter === 'object' && typeof window.BOLDCURRENCY !== 'undefined') {
1844                    window.BOLD.common.eventEmitter.emit('BOLD_CASHIER_checkout', {target: form});
1845                }
1846
1847                window.BOLD.subscriptions.patches.finishCheckout(event, form, cart);
1848            }
1849        };
1850
1851        request.send(formData);
1852    };
1853
1854    
1855</script>
1855
1856
1857
1858<!-- END app block --><meta property="og:image" content="https://cdn.shopify.com/s/files/1/0036/7453/8084/files/CEW_Winery_Company_Blue.jpg?height=628&pad_color=fff&v=1613679073&width=1200" />
1859<meta property="og:image:secure_url" content="https://cdn.shopify.com/s/files/1/0036/7453/8084/files/CEW_Winery_Company_Blue.jpg?height=628&pad_color=fff&v=1613679073&width=1200" />
1860<meta property="og:image:width" content="1200" />
1861<meta property="og:image:height" content="628" />
1862<link href="https://monorail-edge.shopifysvc.com" rel="dns-prefetch">
1863<script>(function(){if ("sendBeacon" in navigator && "performance" in window) {try {var session_token_from_headers = performance.getEntriesByType('navigation')[0].serverTiming.find(x => x.name == '_s').description;} catch {var session_token_from_headers = undefined;}var session_cookie_matches = document.cookie.match(/_shopify_s=([^;]*)/);var session_token_from_cookie = session_cookie_matches && session_cookie_matches.length === 2 ? session_cookie_matches[1] : "";var session_token = session_token_from_headers || session_token_from_cookie || "";function handle_abandonment_event(e) {var entries = performance.getEntries().filter(function(entry) {return /monorail-edge.shopifysvc.com/.test(entry.name);});if (!window.abandonment_tracked && entries.length === 0) {window.abandonment_tracked = true;var currentMs = Date.now();var navigation_start = performance.timing.navigationStart;var payload = {shop_id: 3674538084,url: window.location.href,navigation_start,duration: currentMs - navigation_start,session_token,page_type: "cart"};window.navigator.sendBeacon("https://monorail-edge.shopifysvc.com/v1/produce", JSON.stringify({schema_id: "online_store_buyer_site_abandonment/1.1",payload: payload,metadata: {event_created_at_ms: currentMs,event_sent_at_ms: currentMs}}));}}window.addEventListener('pagehide', handle_abandonment_event);}}());</script>
vendor: 1 bytes, line 1863
1863
1864<script>
1865  window.__TREKKIE_SHIM_QUEUE = window.__TREKKIE_SHIM_QUEUE || [];
1866</script>
vendor: 1 bytes, line 1866
1866
1867<script>(function(){var wpmLoader=function(){"use strict";var e=/Googlebot|Storebot-Google|bingbot|Baiduspider|YandexBot|DuckDuckBot|Slurp|facebookexternalhit|Twitterbot|LinkedInBot|Applebot|AdsBot-Google|Mediapartners-Google|APIs-Google|PetalBot|SemrushBot|AhrefsBot|MJ12bot|DotBot|Acunetix|PerplexityBot|Perplexity-User/i,t=/bytedance/i;function i(){try{var e=document.cookie;if(!e||"string"!=typeof e)return;for(var t=0,i=e.split(";");t<i.length;t++){var n=i[t],r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r).trim();if(o){var a=void 0;try{a=decodeURIComponent(o)}catch(e){a=o}if("_shopify_s"===a){var d=n.slice(r+1).trim();try{return decodeURIComponent(d)}catch(e){return d}}}}}return}catch(e){return}}function n(e){try{"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e)}catch(e){}}function r(e,t){return"string"==typeof e&&e.length>0&&e.length<=t?e:void 0}function o(e){var t;switch(null==(t=null==e?void 0:e.navigation)?void 0:t.type){case 0:return"navigate";case 1:return"reload";case 2:return"back_forward";default:return}}function a(){var e,t,i;try{var n=null==(i=null==(t=null==(e=self.ShopifyAnalytics)?void 0:e.lib)?void 0:t.trekkie)?void 0:i.state;return"awaiting-consent"===n||"initialized"===n?n:void 0}catch(e){return}}return function(d,s,u,l){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};try{var p=c.trekkieShim;!0!==p&&"true"!==p||null!=window.__TREKKIE_SHIM_QUEUE||(window.__TREKKIE_SHIM_QUEUE=[])}catch(e){}var f,v,h,y,g=(v=(f={modern:/Edge?\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9{2}|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.\d+|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(9{2}|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]\d+|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Android.+Firefox\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|SamsungBrowser\/([2-9]\d|\d{3,})\.\d+/,legacy:/Edge?\/(1[6-9]|[2-9]\d|\d{3,})\.\d+(\.\d+|)|Firefox\/(5[4-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(5[1-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))|(Maci|X1{2}).+ Version\/(10\.\d+|(1[1-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(3[89]|[4-9]\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(10[._]\d+|(1[1-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(5\.\d+|([6-9]|\d{2,})\.\d+)|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(3\.\d+|([4-9]|\d{2,})\.\d+)(\.\d+|)/}).modern,h=f.legacy,(y=navigator.userAgent).match(e)?"bot":y.match(v)?"modern":y.match(h)?"legacy":y.match(t)?"bot":"unknown"),m=function(e){var t,i,n=r(e,128);try{var a=window.performance,d=null==(t=null==a?void 0:a.getEntriesByType)?void 0:t.call(a,"navigation")[0];if(!d)return{requestId:n,navigationType:o(a)};var s="type"in d?r(d.type,64):void 0,u="serverTiming"in d&&Array.isArray(d.serverTiming)?d.serverTiming:[];return{requestId:null!=n?n:r(null==(i=u.find(function(e){return"requestID"===e.name}))?void 0:i.description,128),navigationType:s}}catch(e){return{requestId:n}}}(c.requestId),w=function(e){var t=e.version,r=e.browserTarget,o=e.surface,a=e.shopId,d=e.monorailEndpoint,s=window.location.href;return{emit:function(e){var u=e.status,l=e.errorMsg,c=e.failureReason,p=e.useKeepaliveFallback,f=void 0!==p&&p,v=e.navigationType,h=e.pagehidePersisted,y=e.requestId,g=e.trekkieState;if(d){var m,w;try{var b=(new Date).getTime();m=JSON.stringify({metadata:{event_sent_at_ms:b},events:[{schema_id:"web_pixels_manager_load/3.3",payload:{version:t,bundle_target:r,page_url:s,status:u,surface:o,error_msg:l,failure_reason:c,navigation_type:v,pagehide_persisted:h,request_id:y,trekkie_state:g,shop_id:a,visit_token:i()},metadata:{event_created_at_ms:b}}]})}catch(e){return}try{if("function"==typeof window.navigator.sendBeacon&&-1===(w=window.navigator.userAgent).indexOf("iPhone; CPU iPhone OS 12_")&&-1===w.indexOf("iPad; CPU OS 12_")&&-1===w.indexOf("iPod touch; CPU iPhone OS 12_")&&window.navigator.sendBeacon.bind(window.navigator)(d,m))return}catch(e){}if(f)try{"function"==typeof window.fetch&&window.fetch(d,{method:"POST",headers:{"Content-Type":"text/plain"},body:m,keepalive:!0}
1867).catch(function(){})}catch(e){}else try{var _=new XMLHttpRequest;_.open("POST",d,!0),_.setRequestHeader("Content-Type","text/plain"),_.send(m)}catch(e){n("[Web Pixels Manager] Got an unhandled error while logging to Monorail.")}}else n("[Web Pixels Manager] No Monorail endpoint provided, skipping logging.")}}}({version:u,browserTarget:g,surface:d.surface,shopId:d.shopId,monorailEndpoint:d.monorailEndpoint});if(Boolean(null==(_=null==(b=window.Shopify)?void 0:b.analytics)?void 0:_.replayQueue))w.emit({status:"setup-skipped",errorMsg:"replay queue already initialized."});else{var b,_;w.emit({status:"setup-started"}),window.Shopify=window.Shopify||{};var S=window.Shopify;S.analytics=S.analytics||{};var P=S.analytics;P.replayQueue=[],P.publish=function(e,t,i){return P.replayQueue.push([e,t,i]),!0};try{self.performance.mark("wpm:start")}catch(e){}var k,C="modern"===g?"modern":"legacy",E=(null!=l?l:{modern:"",legacy:""})[C],I=[(k={baseUrl:s,hashVersion:u,buildTarget:C}).baseUrl,"/wpm","/b",k.hashVersion,"modern"===k.buildTarget?"m":"l",".js"].join(""),O=!1,T=!1;try{c.browserTarget=g,function(){O=!0;try{window.addEventListener("pagehide",M)}catch(e){O=!1}}(),R(function(){try{R(x)}catch(e){D(e)}}),w.emit({status:"loading",requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()})}catch(e){D(e)}}function U(){var e;if(q(),!function(){var e,t;return Boolean(null==(t=null==(e=window.Shopify)?void 0:e.analytics)?void 0:t.initialized)}()){var t,i,n;try{if("function"!=typeof(null==(e=window.webPixelsManager)?void 0:e.init))return void A();if(!(null!==(n=i=t=window.webPixelsManager.init(d))&&"function"!=typeof n&&Object(n)===n&&"publish"in i&&"function"==typeof i.publish&&"publishCustomEvent"in i&&"function"==typeof i.publishCustomEvent&&"visitor"in i&&"function"==typeof i.visitor))return void A()}catch(e){return void A(e)}var r=window.Shopify.analytics;r.replayQueue.forEach(function(e){var i=e[0],n=e[1],r=e[2];t.publishCustomEvent(i,n,r)}),r.replayQueue=[],r.publish=t.publishCustomEvent,r.visitor=t.visitor,r.initialized=!0}}function A(e){B("manager_api_unavailable",void 0===e?void 0:Q(e))}function x(){B("script_load_failed","".concat(I," has failed to load"))}function B(e,t){T||(T=!0,q(),w.emit({status:"failed",errorMsg:t,failureReason:e,requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()}))}function M(e){O&&(q(),w.emit({status:"pagehide-while-loading",useKeepaliveFallback:!0,pagehidePersisted:e.persisted,requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()}))}function q(){O=!1;try{window.removeEventListener("pagehide",M)}catch(e){}}function R(e){var t;!function(e){var t=e.src,i=e.async,n=void 0===i||i,r=e.onload,o=e.onerror,a=e.sri,d=e.scriptDataAttributes,s=void 0===d?{}:d,u=document.createElement("script"),l=document.querySelector("head"),c=document.querySelector("body");if(u.async=n,u.src=t,a&&(u.integrity=a,u.crossOrigin="anonymous"),s)for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))try{u.dataset[p]=String(s[p])}catch(e){}if(r&&u.addEventListener("load",r),o&&u.addEventListener("error",o),l)l.appendChild(u);else{if(!c)throw new Error("Did not find a head or body element to append the script");c.appendChild(u)}}({src:I,async:!0,onload:U,onerror:e,sri:(t=E,"string"==typeof t&&/^sha384-[A-Za-z0-9+/=]+$/.test(t)?E:""),scriptDataAttributes:c})}function D(e){B("script_append_failed",Q(e))}function Q(e){return e instanceof Error?e.message:"Unknown error"}}}();wpmLoader({shopId: 3674538084,storefrontBaseUrl: "https://www.clearviewestate.co.nz",extensionsBaseUrl: "https://extensions.shopifycdn.com/cdn/shopifycloud/web-pixels-manager",monorailEndpoint: "https://www.clearviewestate.co.nz/.well-known/shopify/monorail/unstable/produce_batch",surface: "storefront-renderer",enabledBetaFlags: ["16072cab","8450a54b","7ee89bf1"],webPixelsConfigList: [{"id":"2009202866","configuration":"{\"mailchimp_store_id\":\"store_mmwol8z61jdjc1iwee5x\", \"mailchimp_user_id\":\"48861905\",\"mailchimp_list_id\":\"3670a15554\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"e357a49eadeb6216a959d63fa3fb8f55","type":"APP","apiClientId":2585307,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"shopify-app-pixel","configuration":"{}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"0530","apiClientId":"shopify-pixel","type":"APP","privacyPurposes":["ANALYTICS","MARKETING"]},{"id":"shopify-custom-pixel","eventPayloadVersion":"v1","runtimeContext":"LAX","scriptVersion":"0530","apiClientId":"shopify-pixel","type":"CUSTOM","privacyPurposes":["ANALYTICS","MARKETING"]}],isMerchantRequest: false,initData: {"shop":{"name":"Clearview Estate","paymentSettings":{"currencyCode":"NZD"},"myshopifyDomain":"cve1.myshopify.com","countryCode":"NZ","storefrontUrl":"https:\/\/www.clearviewestate.co.nz"},"customer":null,"cart":null,"checkout":null,"productVariants":[],"products":[],"purchasingCompany":null},},"https://www.clearviewestate.co.nz/cdn","c8540278we853e1abpb62b2c4amde256306",{"modern":"","legacy":""},{"trekkieShim":true,"agentContext":true,"apiClientId":"580111","facebookCapiEnabled":"false","themeId":"145439588530","themeStoreId":"464","themePublished":"true","eventMetadataId":"0df81efb-4066-4004-8f96-e9de2af3f139","pageType":"cart","shopId":"3674538
1867084","storefrontBaseUrl":"https:\/\/www.clearviewestate.co.nz","extensionBaseUrl":"https:\/\/extensions.shopifycdn.com\/cdn\/shopifycloud\/web-pixels-manager","surface":"storefront-renderer","enabledBetaFlags":"[\"16072cab\", \"8450a54b\", \"7ee89bf1\"]","isMerchantRequest":"false","hashVersion":"c8540278we853e1abpb62b2c4amde256306","publish":"custom","events":"[[\"page_viewed\",{}]]"});})();</script>
1867<script>
1868  window.ShopifyAnalytics = window.ShopifyAnalytics || {};
1869  window.ShopifyAnalytics.meta = window.ShopifyAnalytics.meta || {};
1870  window.ShopifyAnalytics.meta.currency = 'NZD';
1871  var meta = {"page":{"pageType":"cart","requestId":"69c9b894-947f-4bc5-8323-2265300e243c-1790434787"}};
1872  for (var attr in meta) {
1873    window.ShopifyAnalytics.meta[attr] = meta[attr];
1874  }
1875</script>
vendor: 1 bytes, line 1875
1875
1876<script class="analytics">
1877  (function () {
1878    var customDocumentWrite = function(content) {
1879      var jquery = null;
1880
1881      if (window.jQuery) {
1882        jquery = window.jQuery;
1883      } else if (window.Checkout && window.Checkout.$) {
1884        jquery = window.Checkout.$;
1885      }
1886
1887      if (jquery) {
1888        jquery('body').append(content);
1889      }
1890    };
1891
1892    var hasLoggedConversion = function(token) {
1893      if (token) {
1894        return document.cookie.indexOf('loggedConversion=' + token) !== -1;
1895      }
1896      return false;
1897    }
1898
1899    var setCookieIfConversion = function(token) {
1900      if (token) {
1901        var twoMonthsFromNow = new Date(Date.now());
1902        twoMonthsFromNow.setMonth(twoMonthsFromNow.getMonth() + 2);
1903
1904        document.cookie = 'loggedConversion=' + token + '; expires=' + twoMonthsFromNow;
1905      }
1906    }
1907
1908    var trekkie = window.ShopifyAnalytics.lib = window.trekkie = window.trekkie || [];
1909    window.ShopifyAnalytics.lib.trekkie = window.trekkie;
1910    if (trekkie.integrations) {
1911      return;
1912    }
1913    trekkie.methods = [
1914      'identify',
1915      'page',
1916      'ready',
1917      'track',
1918      'trackForm',
1919      'trackLink'
1920    ];
1921    trekkie.factory = function(method) {
1922      return function() {
1923        var args = Array.prototype.slice.call(arguments);
1924        args.unshift(method);
1925        trekkie.push(args);
1926        if (method == 'track' || method == 'page') {
1927          var pageUrl;
1928          try {
1929            pageUrl = window.location.href;
1930          } catch (e) {}
1931          var pageReferrer;
1932          try {
1933            pageReferrer = document.referrer;
1934          } catch (e) {}
1935          try {
1936            if (window.__TREKKIE_SHIM_QUEUE == null) {
1937              window.__TREKKIE_SHIM_QUEUE = [];
1938            }
1939            window.__TREKKIE_SHIM_QUEUE.push({
1940              from: 'trekkie-stub',
1941              method: method,
1942              args: args.slice(1),
1943              pageContext: {
1944                url: pageUrl,
1945                referrer: pageReferrer
1946              }
1947            });
1948          } catch (e) {
1949            // no-op
1950          }
1951        }
1952        return trekkie;
1953      };
1954    };
1955    for (var i = 0; i < trekkie.methods.length; i++) {
1956      var key = trekkie.methods[i];
1957      trekkie[key] = trekkie.factory(key);
1958    }
1959    trekkie.load = function(config) {
1960      trekkie.config = config || {};
1961      trekkie.config.initialDocumentCookie = document.cookie;
1962      var first = document.getElementsByTagName('script')[0];
1963var script = document.createElement('script');
1964script.type = 'text/javascript';
1965script.onerror = function(e) {
1966  var scriptFallback = document.createElement('script');
1967  scriptFallback.type = 'text/javascript';
1968  scriptFallback.onerror = function(error) {
1969          var Monorail = {
1970      produce: function produce(monorailDomain, schemaId, payload) {
1971        var currentMs = new Date().getTime();
1972        var event = {
1973          schema_id: schemaId,
1974          payload: payload,
1975          metadata: {
1976            event_created_at_ms: currentMs,
1977            event_sent_at_ms: currentMs
1978          }
1979        };
1980        return Monorail.sendRequest("https://" + monorailDomain + "/v1/produce", JSON.stringify(event));
1981      },
1982      sendRequest: function sendRequest(endpointUrl, payload) {
1983        // Try the sendBeacon API
1984        if (window && window.navigator && typeof window.navigator.sendBeacon === 'function' && typeof window.Blob === 'function' && !Monorail.isIos12()) {
1985          var blobData = new window.Blob([payload], {
1986            type: 'text/plain'
1987          });
1988
1989          if (window.navigator.sendBeacon(endpointUrl, blobData)) {
1990            return true;
1991          } // sendBeacon was not successful
1992
1993        } // XHR beacon
1994
1995        var xhr = new XMLHttpRequest();
1996
1997        try {
1998          xhr.open('POST', endpointUrl);
1999          xhr.setRequestHeader('Content-Type', 'text/plain');
2000          xhr.send(payload);
2001        } catch (e) {
2002          console.log(e);
2003        }
2004
2005        return false;
2006      },
2007      isIos12: function isIos12() {
2008        return window.navigator.userAgent.lastIndexOf('iPhone; CPU iPhone OS 12_') !== -1 || window.navigator.userAgent.lastIndexOf('iPad; CPU OS 12_') !== -1;
2009      }
2010    };
2011    Monorail.produce('monorail-edge.shopifysvc.com',
2012      'trekkie_storefront_load_errors/1.1',
2013      {shop_id: 3674538084,
2014      theme_id: 145439588530,
2015      app_name: "storefront",
2016      context_url: window.location.href,
2017      source_url: "//www.clearviewestate.co.nz/cdn/s/trekkie.storefront.f1ba865b3fecd812ad617f74ac079261075e9edb.min.js"});
2018
2019  };
2020  scriptFallback.async = true;
2021  scriptFallback.src = '//www.clearviewestate.co.nz/cdn/s/trekkie.storefront.f1ba865b3fecd812ad617f74ac079261075e9edb.min.js';
2022  first.parentNode.insertBefore(scriptFallback, first);
2023};
2024script.async = true;
2025script.src = '//www.clearviewestate.co.nz/cdn/s/trekkie.storefront.f1ba865b3fecd812ad617f74ac079261075e9edb.min.js';
2026first.parentNode.insertBefore(script, first);
2027
2028    };
2029    trekkie.load(
2030      {"Trekkie":{"appName":"storefront","development":false,"defaultAttributes":{"shopId":3674538084,"isMerchantRequest":null,"themeId":145439588530,"themeCityHash":"16033474212455614878","contentLanguage":"en","currency":"NZD","eventMetadataId":"0df81efb-4066-4004-8f96-e9de2af3f139"},"isServerSideCookieWritingEnabled":true,"monorailRegion":"shop_domain","enabledBetaFlags":["764d78cb","8450a54b","7ee89bf1"]},"Session Attribution":{},"S2S":{"facebookCapiEnabled":false,"source":"trekkie-storefront-renderer","apiClientId":580111}}
2031    );
2032
2033    var loaded = false;
2034    trekkie.ready(function() {
2035      if (loaded) return;
2036      loaded = true;
2037
2038      window.ShopifyAnalytics.lib = window.trekkie;
2039
2040      var originalDocumentWrite = document.write;
2041      document.write = customDocumentWrite;
2042      try { window.ShopifyAnalytics.merchantGoogleAnalytics.call(this); } catch(error) {};
2043      document.write = originalDocumentWrite;
2044
2045      var match = window.location.pathname.match(/checkouts\/(.+)\/(thank_you|post_purchase)/)
2046      var token = match? match[1]: undefined;
2047      if (!hasLoggedConversion(token)) {
2048        setCookieIfConversion(token);
2049        
2050      }
2051    });
2052
2053    window.ShopifyAnalytics.lib.page(null,{"pageType":"cart","requestId":"69c9b894-947f-4bc5-8323-2265300e243c-1790434787","shopifyEmitted":true});
2054
2055    var eventsListenerScript = document.createElement('script');
2056    eventsListenerScript.async = true;
2057    eventsListenerScript.src = "//www.clearviewestate.co.nz/cdn/shopifycloud/storefront/assets/shop_events_listener-4e26a9ce.js";
2058    document.getElementsByTagName('head')[0].appendChild(eventsListenerScript);
2059})();</script>
vendor: 1 bytes, line 2059
2059
2060<script
2061  defer
2062  src="https://www.clearviewestate.co.nz/cdn/shopifycloud/perf-kit/shopify-perf-kit-3.9.4.min.js"
2063  data-application="storefront-renderer"
2064  data-shop-id="3674538084"
2065  data-render-region="gcp-us-central1"
2066  data-page-type="cart"
2067  data-theme-instance-id="145439588530"
2068  data-theme-name="Mobilia"
2069  data-theme-version="5.5.9"
2070  data-monorail-region="shop_domain"
2071  data-resource-timing-sampling-rate="10"
2072  data-shs="true"
2073  data-shs-beacon="true"
2074  data-shs-export-with-fetch="true"
2075  data-shs-logs-sample-rate="1"
2076  data-shs-beacon-endpoint="https://www.clearviewestate.co.nz/api/collect"
2077></script>
2077
2078<meta name="shopify-y" content="67acff84-2d82-4314-9815-c220da5a573c" data-expiration="1821992387000"><meta name="shopify-s" content="2c912e84-1fe1-45fc-8523-4f68a2142155" data-expiration="1790436587000"><meta name="new-cookie-storage-activated" content="t">
2079</head>
2080  <body class="cart"
2081    data-money-format="${{amount}}">
2082
2083    <div id="shopify-section-header" class="shopify-section header-section">
2084            
2085            
2086              <section class="an_preloader" id="an_preloader" style="display:block; position:fixed;width:100%;height:100%;background-color:#fff;z-index:9999">
2087	<div class="an_preloader_inner" style="position:relative;width:100%;height:100%;">
2088		<img src="https://tabme.anvanto.com/storage/anvanto/product_tabs/standard.gif" style="position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);">
2089	</div>
2090	
2090<script>
2091        var fade = {
2092            fade_in_from: 0,
2093            fade_out_from: 10
2094        }
2095
2096        var fadeOut = function(element) {
2097            var target = document.getElementById(element);
2098            var newSetting = fade.fade_out_from / 10;
2099            target.style.opacity = newSetting;
2100            fade.fade_out_from--;
2101            if (fade.fade_out_from == 0) {
2102                target.style.opacity = 0;
2103                target.style.display = "none";
2104
2105                clearTimeout(loopTimer);
2106
2107                fade.fade_out_from = 10;
2108                return false;
2109            }
2110
2111            var loopTimer = setTimeout('fadeOut(\''+element+'\')', 50);
2112        }
2113        window.onload = function() {
2114            var scriptTags = document.getElementsByTagName("script"),
2115                script,
2116                idx,
2117				script_found = false;
2118
2119            for (idx = 0; idx < scriptTags.length; idx++) {
2120                script = scriptTags.item(idx);
2121                if (script.src && script.src.match(/anvanto\/product-tabs\/front\/js\/product-tabs\.js/)) {
2122                    script_found = true;
2123                }
2124            }
2125
2126            if(!script_found){
2127                console.log('product-tabs.js not found, please reinstall Product tabs app or delete snippets/an_preloader.liquid')
2128                fadeOut('an_preloader');
2129            }
2130        };
2131	</script>
2131
2132</section>
2133
2134            
2135
2136
2137<div class="header header_border">
2138  <div class="container content">
2139    <div class="sixteen columns">
2140    <div class="four columns logo header-logo alpha">
2141      <a href="https://www.clearviewestate.co.nz" title="Clearview Estate">
2142        
2143          <img src="//www.clearviewestate.co.nz/cdn/shop/files/Webp.net-resizeimage_523cf65c-1c3c-4de4-85f9-ca3794bdd482_280x@2x.png?v=1613679200" alt="Clearview Estate" />
2144        
2145      </a>
2146    </div>
2147
2148    <div class="twelve nav omega">
2149      <div class="mobile_hidden mobile_menu_container" role="navigation">
2150        <ul class="top_menu search_nav">
2151          
2152          
2153          
2154            
2155            
2156              <li>
2157                <a href="/pages/wine-club">Join the Wine Club</a>
2158              </li>
2159              
2160            
2161              <li>
2162                <a href="https://giftcards.nowbookit.com/cards?accountid=943992f9-b7fe-470f-b352-a56fef0631ec&venueid=12245&theme=light&accent=0,0,0">Gift Cards</a>
2163              </li>
2164              
2165            
2166          
2167          
2168            
2169              <li>
2170                <a href="/account/login" id="customer_login_link">Sign in</a>
2171              </li>
2172            
2173          
2174          
2175          
2176        </ul>
2177        <ul class="main menu">
2178          
2179          
2180            
2181              <li>
2182                <a href="/collections/wine-shop" >WINE SHOP</a>
2183              </li>
2184            
2185          
2186            
2187              <li class="dropdown sub-menu" aria-haspopup="true" aria-expanded="false">
2188
2189                <a 
2190                    class="" 
2191                  >
2192                  ORIGINS <span class="icon-arrow-down"></span>
2193                </a>
2194
2195                <ul class="animated fadeInUp">
2196                  
2197                    
2198                      <li><a href="/pages/history">History</a></li>
2199                    
2200                  
2201                    
2202                      <li><a href="/pages/winemaking">Winemaking</a></li>
2203                    
2204                  
2205                    
2206                      <li><a href="/pages/sustainability">Sustainability</a></li>
2207                    
2208                  
2209                </ul>
2210              </li>
2211            
2212          
2213            
2214              <li>
2215                <a href="/pages/restaurant" >Restaurant</a>
2216              </li>
2217            
2218          
2219            
2220              <li class="dropdown sub-menu" aria-haspopup="true" aria-expanded="false">
2221
2222                <a 
2223                    class="" 
2224                  >
2225                  VISIT <span class="icon-arrow-down"></span>
2226                </a>
2227
2228                <ul class="animated fadeInUp">
2229                  
2230                    
2231                      <li><a href="/pages/cellar-door">CELLAR DOOR</a></li>
2232                    
2233                  
2234                    
2235                      <li><a href="/pages/accommodation">Accommodation</a></li>
2236                    
2237                  
2238                    
2239                      <li><a href="/pages/functions">FUNCTIONS</a></li>
2240                    
2241                  
2242                    
2243                      <li><a href="/pages/weddings">WEDDINGS</a></li>
2244                    
2245                  
2246                </ul>
2247              </li>
2248            
2249          
2250            
2251              <li>
2252                <a href="/pages/contact" >CONTACT</a>
2253              </li>
2254            
2255          
2256        </ul>
2257      </div>
2258      <ul class="nav_buttons menu">
2259        <li class="navicon_button">
2260          <a href="#" class="navicon" title="Menu" aria-haspopup="true" aria-label="Menu"><span class="icon-menu"></span><span class="button_label">Menu</span></a>
2261        </li>
2262        <li>
2263          <a href="/cart" class="cart_button " title="Cart"><span class="icon-cart"></span><span class="button_label">Cart</span></a>
2264        </li>
2265      </ul>
2266    </div>
2267  </div>
2268</div>
2269</div>
2270
2271<div class="nav">
2272  <ul class="mobile_menu toggle_menu">
2273    
2274    
2275      
2276        <li >
2277          <a href="/collections/wine-shop">WINE SHOP</a>
2278        </li>
2279      
2280    
2281      
2282        <li class="sub-menu ">
2283          
2284            <a href class="text_link">ORIGINS</a>
2285          
2286          <span aria-haspopup="true" aria-expanded="false">+</span>
2287          <ul>
2288            
2289              
2290                <li >
2291                  <a href="/pages/history">History</a>
2292                </li>
2293              
2294            
2295              
2296                <li >
2297                  <a href="/pages/winemaking">Winemaking</a>
2298                </li>
2299              
2300            
2301              
2302                <li >
2303                  <a href="/pages/sustainability">Sustainability</a>
2304                </li>
2305              
2306            
2307          </ul>
2308        </li>
2309      
2310    
2311      
2312        <li >
2313          <a href="/pages/restaurant">Restaurant</a>
2314        </li>
2315      
2316    
2317      
2318        <li class="sub-menu ">
2319          
2320            <a href class="text_link">VISIT</a>
2321          
2322          <span aria-haspopup="true" aria-expanded="false">+</span>
2323          <ul>
2324            
2325              
2326                <li >
2327                  <a href="/pages/cellar-door">CELLAR DOOR</a>
2328                </li>
2329              
2330            
2331              
2332                <li >
2333                  <a href="/pages/accommodation">Accommodation</a>
2334                </li>
2335              
2336            
2337              
2338                <li >
2339                  <a href="/pages/functions">FUNCTIONS</a>
2340                </li>
2341              
2342            
2343              
2344                <li >
2345                  <a href="/pages/weddings">WEDDINGS</a>
2346                </li>
2347              
2348            
2349          </ul>
2350        </li>
2351      
2352    
2353      
2354        <li >
2355          <a href="/pages/contact">CONTACT</a>
2356        </li>
2357      
2358    
2359    
2360      
2361        <li>
2362          <a href="/pages/wine-club" title="Join the Wine Club">Join the Wine Club</a>
2363        </li>
2364      
2365        <li>
2366          <a href="https://giftcards.nowbookit.com/cards?accountid=943992f9-b7fe-470f-b352-a56fef0631ec&venueid=12245&theme=light&accent=0,0,0" title="Gift Cards">Gift Cards</a>
2367        </li>
2368      
2369    
2370    
2371      
2372        <li>
2373          <a href="/account/login" id="customer_login_link">Sign in</a>
2374        </li>
2375      
2376    
2377    
2378    <li class="currency-container">
2379      
2380    </li>
2381  </ul>
2382</div>
2383<div class="fixed_header"></div>
2384
2385<style>
2386  .header-logo.logo a {
2387    max-width: 180px;
2388    padding-top: 0px;
2389  }
2390
2391  ul.top_menu {
2392    padding-top: 0px;
2393  }
2394
2395  div.promo_banner {
2396    background-color: #5c0218;
2397    
2398  }
2399
2400  
2401
2402  div.promo_banner a,
2403  div.promo_banner p,
2404  .promo_banner-close {
2405    color: #ffffff;
2406  }
2407
2408</style>
2409
2410
2411</div>
2412	<div class="content-wraper">
2413      <div class="container">
2414          
2415<!-- spurit_sri-added -->
2416
2417
2418<script>
2419    if(typeof(Spurit) === 'undefined'){
2420        var Spurit = {};
2421    }
2422    if(!Spurit.recurringInvoices){
2423        Spurit.recurringInvoices = {};
2424    }
2425    if(!Spurit.recurringInvoices.snippet){
2426        Spurit.recurringInvoices.snippet = {};
2427    }
2428    Spurit.recurringInvoices.snippet.cart = {"note":null,"attributes":{},"original_total_price":0,"total_price":0,"total_discount":0,"total_weight":0.0,"item_count":0,"items":[],"requires_shipping":false,"currency":"NZD","items_subtotal_price":0,"cart_level_discount_applications":[],"checkout_charge_amount":0};
2429</script>
2429
2430<!-- /spurit_sri-added -->
2431
2432
2433<div id="shopify-section-cart-template" class="shopify-section cart-section"><div class="sixteen columns clearfix collection_nav">
2434  <h1 class="collection_title">Shopping Cart</h1>
2435</div>
2436
2437<div class="sixteen columns">
2438  <div class="clearfix breadcrumb">
2439    
2440  </div>
2441</div>
2442
2443
2444  <div class="sixteen columns">
2445    <div class="section clearfix">
2446      <p class="quote">There are no items in your cart. <a href="/collections/all">Continue Shopping <span class="icon-arrow-right"></span></a></p>
2447      <br class="clear" />
2448      <br class="clear" />
2449    </div>
2450  </div>
2451
2452
2453
2454
2455</div>
2456
2457 
2458
2459
2460  
2461<script type="text/javascript">
2462  ;(function(){ 
2463    window.Station = window.Station || {};
2464    window.Station.Apps = window.Station.Apps || {};
2465    window.Station.Apps.Tabs = { 
2466      version: '2.8.5',
2467      order: [], 
2468      settings: {"dev_mode":false,"product_autosplit":true,"product_autosplit_heading":"h4","product_description_tab":true,"product_description_tab_title":"Description","force_full":false,"force_wrap":false,"full_open":false,"full_single_active":true,"clean_content":true,"deep_links":true},
2469      template: 'cart',
2470      events: {},
2471      on: function(e, cb) {
2472        if (e === 'ready' && this.isReady) return cb.call(this);
2473        var callbacks = this.events[e] || [];
2474        callbacks.push(cb);
2475        this.events[e] = callbacks;
2476      }
2477    }; 
2478  })();
2479
2480  
2481
2482  !function(){var L="station-tabs",d="mod-full-width",s="mod-hide-focus",f="is-active",a="aria-selected",h="aria-hidden",o="aria-labelledby",l="tabindex",_=L+"-link",C=L+"-content",S=L+"-content-inner",c="."+L+"-data-item",B="role",u="false",p="true",q=window.Station.Apps.Tabs,E=q.settings,I=q.order,e=null,g=null;q.trigger=function(t,e){var n=this.events[t];!n||n.length<1||n.forEach(function(t){t.call(q,e)})};function n(){return window.innerWidth||document.documentElement.clientWidth||document.getElementsByTagName("body")[0].clientWidth}function v(t,e){if(t)for(var n=t,i=0;i<n.length;i++)n[i].style.height=e||n[i].scrollHeight+"px"}function m(t){t=t||{};for(var e=1;e<arguments.length;e++)if(arguments[e])for(var n in arguments[e])arguments[e].hasOwnProperty(n)&&(t[n]=arguments[e][n]);return t}function N(t){return t.toLowerCase().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function T(t,e,n){return(t||"tab-"+(e+1))+"_"+n+"-"+e}function b(t){var e=t.lastIndexOf("_"),n=t.substring(0,e),i=t.substring(e+1).split("-"),r=0<parseInt(i[0],10)?"_"+i[0]:"";return{vanityId:n,scope:parseInt(i[0],10),index:parseInt(i[1],10),suffix:r}}function x(t){var e=document.createElement("div");return e.className=C,e.innerHTML='<div class="'+S+'"></div>',t&&(e.id=t,e.setAttribute(o,"st-link-"+t)),e}function y(t,e){for(var n=t.length-1;0<=n;n--)t[n].setAttribute(l,"-1"),t[n].setAttribute(a,u);e.setAttribute(l,"0"),e.setAttribute(a,p)}function A(t,e,n){if(t&&e){for(var i=t.length-1;0<=i;
2482i--)"st-link-"+n!==t[i].id&&t[i].classList.remove(f);for(i=e.length-1;0<=i;i--)"st-"+n!==e[i].id&&(e[i].classList.remove(f),e[i].setAttribute(h,p))}}function k(t,e,n,i){if(n){var r=m({animate:!0,deepLink:!0},i),s=n.getAttribute("href").substr(1),a=t.querySelector("#st-"+s);if(a){var o=t.classList.contains(d),l=t.querySelectorAll("."+_+"."+f),c=t.querySelectorAll("."+C+"."+f);if(r.scrollIntoView&&n.scrollIntoView({behavior:"smooth",block:"center"}),n.classList.contains(f))o&&!r.preventClose?(r.animate&&v([a]),setTimeout(function(){A([n],[a])},20),history.replaceState(null,null,window.location.pathname+window.location.search)):A(l,c,s);else{if(o?E.full_single_active&&(r.animate&&(v(c),r.scrollIntoView||(function(n,i){cancelAnimationFrame(g),g=requestAnimationFrame(function t(){var e=i.getBoundingClientRect().top-n;e<0&&window.scrollBy(null,e),g=requestAnimationFrame(t)})}(n.getBoundingClientRect().top,n),setTimeout(function(){cancelAnimationFrame(g)},400))),A(l,c)):A(l,c),y(e,n),!E.force_wrap&&r.animate&&o&&v([a]),n.classList.add(f),a.classList.add(f),a.setAttribute(h,p),r.deepLink&&E.deep_links){var u=b(s);history.replaceState(null,null,"#"+u.vanityId+u.suffix)}r.skipCallback||q.trigger("open",{instance:t,link:n,content:a})}}}}function w(t,e,n,i){if(e.length){var r=t.id===L+"-0"?"_":"-",s=window.location.hash.substr(1),a=s?t.querySelector("."+_+'[href^="#'+s+r+'"]'):null;!a&&i||k(t,e,a||e[0],{deepLink:!1,animate:!1,skipCallback:!0})}}function D(t,e,n,i,r){if(e){var s=t.querySelectorAll("."+_),a=e.querySelector("."+_),o=e.querySelector("."+C),l=a.cloneNode(!0),c=o.cloneNode(!0);l.id="st-link-"+T(a.id.substr(8),n,i),l.href="#"+T(a.getAttribute("href").substr(1),n,i),c.id="st-"+T(o.id.substr(3),n,i);var u=s[r-1];r&&u?(t.insertBefore(l,u),t.insertBefore(c,u)):(t.appendChild(l),t.appendChild(c))}}function F(t,e){var n=document.createElement("div"),s=e,i=t.getAttribute("data-tabs-type"),r=[];if(n.id=L+"-"+s,n.className=L+" is-loading",E.product_autosplit&&E.clean_content)for(var a=t.getElementsByTagName("div"),o=a.length-1;0<=o;o--){var l=a[o];if(!l.attributes.length){for(var c=l.parentNode;l.firstChild;)c.insertBefore(l.firstChild,l);c.removeChild(l)}}function u(t,e,n){var i=T(N(e),n,s);t.querySelector("."+C).id="st-"+i;var r=function(t,e){var n=document.createElement("a");return n.href="#"+e,n.id="st-link-"+e,n.className=_,n.innerHTML="<span>"+t+"</span>",n}(e,i);t.insertBefore(r,t.firstChild)}var d=t.childNodes;if(E.product_autosplit)for(o=d.length-1;0<=o;o--){var f=d[o];if(f.nodeName===E.product_autosplit_heading.toUpperCase())f.textContent.trim().length&&r.push(f)}E.product_description_tab&&"product"===q.template&&r.push(E.product_description_tab_title||"Description");var h=r.length;if(r.length&&(!i||"specific"===i)){var p=t.childNodes;n.insertBefore(x(),n.firstChild);for(o=p.length-1;0<=o;o--){var g=p[o];if(g===r[0]){if(r.shift(),u(n,g.textContent.trim(),r.length),g.parentNode.removeChild(g),!r.length)break;n.insertBefore(x(),n.firstChild)}else{var v=n.querySelector("."+S);v.insertBefore(g,v.firstChild)}}"string"==typeof r[0]&&u(n,r[0],0)}if(n.setAttribute(B,"tablist"),t.appendChild(n),!i||"general"===i){var m={},b=[],y=h;for(o=0;o<I.length;o++){var A=I[o],k=document.getElementById(L+"-data-"+A);if(k){var w=parseInt(k.getAttribute("data-position"),10);0<w&&!m[w]?(m[w]=k,b.push(w)):(D(n,k,y,s),y++)}}b.sort(function(t,e){return t-e});for(o=0;o<b.length;o++)D(n,m[b[o]],y,s,b[o]),y++}return n}function P(t,e,n,i,r){var s=r.which;if(-1!==[13,32,35,36,37,38,39,40].indexOf(s)){var a,o;r.preventDefault(),r.stopPropagation();for(var l=e[0],c=e[e.length-1],u=e.length-1;0<=u;u--)if(e[u].id===i.id){a=e[u+1],o=e[u-1];break}switch(s){case 37:case 38:o?o.focus():c.focus();break;case 39:case 40:a?a.focus():l.focus();break;case 36:l.focus();break;case 35:c.focus();break;case 13:case 32:k(t,e,i)}}}function R(n){for(var e=n.querySelectorAll("."+_),t=n.querySelectorAll("."+C),i=e.length-1;0<=i;i--){var r=e[i].getAttribute("href").substr(1);e[i].setAttribute(B,"tab"),e[i].setAttribute("aria-controls","st-"+r),e[i].setAttribute(a,u),e[i].setAttribute(l,"-1"),e[i].addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),k(n,e,this),n.classList.contains(s)||n.classList.add(s)}),e[i].addEventListener("keydown",function(t){P(n,e,0,this,t)}),e[i].addEventListener("focus",function(t){n.classList.remove(s),y(e,this)})}for(i=t.length-1;0<=i;i--)t[i].setAttribute(B,"tabpanel"),t[i].setAttribute(o,t[i].id.substr(0,3)+"link-"+t[i].id.substr(3)),t[i].setAttribute(h,p),t[i].addEventListener("transitionend",function(t){this.style.removeProperty("height"),cancelAnimationFrame(g);var e=document.getElementById(this.id.substring(0,3)+"link-"+this.id.substring(3));q.trigger("transitionEnd",{instance:n,link:e,content:this})});return{i:n,l:e,p:t}}function H(t,e,n){if(e.length){var i=document.querySelectorAll("."+_+"."+f);t.classList.remove(d);var r=e[0].offsetHeight/2,s=e[0].getBoundingClientRect();if(e[e.length-1].getBoundingClientRect().top-s.top>r){t.classList.add(d),A(e,n);for(var a=0;a<i.length;a++)k(t,e,i[a],{deepLink:!1,animate:!1,skipCallback:!0});return!0}return w(t,e),!1}}var i=n();q.init=function(){var t=document.querySelectorAll("div[data-"+L+"-app]");if(t.length&&"classList"in t[0]){tabsets=[];for(var e=0;e<t.length;e++)if(!t[e].classList.contains("is-initialized")){t[e].classList.add("is-initialized");var n=F(t[e],e),i=R(n);
2482tabsets.push(i)}if(!this.settings.keepSourceData)for(var r=document.getElementsByClassName(c.slice(1));0<r.length;)r[0].parentNode.removeChild(r[0]);setTimeout(function(){for(var t=0;t<tabsets.length;t++)e=tabsets[t],E.force_full&&e.i.classList.add(d),E.force_full||E.force_wrap?w(e.i,e.l,e.p,!E.full_open&&!E.force_wrap):(w(e.i,e.l,e.p,!E.full_open),H(e.i,e.l,e.p)),tabsets[t].i.classList.remove("is-loading"),tabsets[t].i.classList.add("is-ready");var e;q.isReady=!0,q.trigger("ready")},0)}},q.init(),window.addEventListener("resize",function(t){e&&clearTimeout(e),e=setTimeout(function(){i!==n()&&(function(){for(var t=document.querySelectorAll("."+L),e=0;e<t.length;e++)for(var n=t[e].querySelectorAll("."+_),i=t[e].querySelectorAll("."+C),r=0;r<i.length;r++)i[r].style.removeProperty("height"),E.force_full||E.force_wrap||H(t[e],n,i)}(),i=n())},300)},!1),q.open=function(t,e){var n="Tab with ID "+t+" is not found.",i=t.replace(/^#/,""),r=b(i),s=document.getElementById("station-tabs-"+r.scope);if(!s)return console.warn(n),!1;var a=s.querySelectorAll(".station-tabs"),o=document.getElementById("st-link-"+i),l=document.getElementById("st-"+i);return o&&l?(k(s,a,o,m({preventClose:!0},e||{})),{instance:s,link:o,content:l}):(console.warn(n),!1)},q.openByTitle=function(t,e){for(var n=N(t),i=document.querySelectorAll('[id^="st-link-'+n+'_"]'),r=null,s=0;s<i.length;s++){var a=i[s].getAttribute("href").substr(1);if(b(a).vanityId===n){r=a;break}}return r?q.open(r,e):(console.warn("Could not find tab with title: "+t),!1)}}();
2483</script>
2483
2484
2485<style>
2486  div[data-station-tabs-app]{clear:both}.station-tabs{border:0 solid currentColor;clear:both;display:flex;flex-wrap:wrap;margin:2em 0}.station-tabs:empty{display:none}.station-tabs.mod-hide-focus .station-tabs-link:focus{outline:0}.station-tabs .station-tabs-link{border:0 solid currentColor;box-sizing:border-box;display:inline-block;position:relative;text-decoration:none !important;white-space:nowrap;width:initial;z-index:1}.station-tabs .station-tabs-link:hover,.station-tabs .station-tabs-link:active{outline:0}.station-tabs .station-tabs-link:hover,.station-tabs .station-tabs-link:focus{opacity:1}.station-tabs .station-tabs-link.is-active{color:inherit}.station-tabs .station-tabs-link:after{border-width:0 !important}.station-tabs .station-tabs-link:first-child.is-active+.station-tabs-content{border-top-left-radius:0}.station-tabs .station-tabs-link span{color:inherit !important}.station-tabs .station-tabs-content{box-sizing:border-box;height:0;order:1;overflow:hidden;width:100%}.station-tabs .station-tabs-content:not(.is-active){height:0 !important}.station-tabs .station-tabs-content.is-active{border:0 solid currentColor;height:auto}.station-tabs .station-tabs-content iframe,.station-tabs .station-tabs-content img,.station-tabs .station-tabs-content video{max-width:100%}.station-tabs .station-tabs-content img{height:auto}.station-tabs .station-tabs-content-inner{border:0 solid currentColor;box-sizing:border-box;width:100%}.station-tabs .station-tabs-content-inner>p:last-child,.station-tabs .station-tabs-content-inner>ol:last-child,.station-tabs .station-tabs-content-inner>ul:last-child{margin-bottom:0}.station-tabs .station-tabs-content-inner:before,.station-tabs .station-tabs-content-inner:after{content:'';display:table}.station-tabs .station-tabs-content-inner:after{clear:both}.station-tabs.mod-full-width{display:block}.station-tabs.mod-full-width:empty{display:none}.station-tabs.mod-full-width .station-tabs-link{display:block;white-space:normal;width:auto}.station-tabs.mod-full-width .station-tabs-content{transition:height 300ms}.station-tabs.mod-full-width .station-tabs-content:last-child .station-tabs-content-inner{margin-bottom:0;padding-bottom:0}
2487 
2488  .station-tabs.mod-full-width .station-tabs-link{align-items:center;display:flex;justify-content:space-between}.station-tabs.mod-full-width .station-tabs-link span{flex-grow:1}.station-tabs.mod-full-width .station-tabs-link:after{border-color:currentColor;content:'';display:block;flex-shrink:0;font-weight:normal;margin-left:20px;position:static !important;width:auto !important;border-bottom:1px solid !important;border-right:1px solid !important;margin-right:3px;margin-top:-3px;transform:rotate(45deg);height:6px !important;width:6px !important}.station-tabs.mod-full-width .station-tabs-link.is-active:after{margin-top:3px;transform:rotate(-135deg)}.station-tabs.mod-full-width.mod-ie9 .station-tabs-link:after{float:right}
2489 
2490  .station-tabs .station-tabs-link.is-active{font-weight:600 !important;}.station-tabs .station-tabs-link{border-width:0 0 2px !important;padding:0 0 6px !important;margin:0 26px 0 0 !important;}.station-tabs.mod-full-width .station-tabs-link{padding:14px 0 !important;margin:0 !important;}.station-tabs .station-tabs-content-inner{margin:24px 0 0 !important;}.station-tabs.mod-full-width .station-tabs-content-inner{margin:24px 0 10px !important;} 
2491</style>
2492
2493      </div> <!-- end container -->
2494    </div>
2495    
2496    <div id="shopify-section-footer" class="shopify-section footer-section"><div class="footer">
2497  <div class="container">
2498    <div class="seven columns">
2499      
2500        <h6>Sign up for our Newsletter</h6>
2501        
2502          <p>New releases, special deals, limited releases. The best way not to miss out!</p>
2503        
2504        
2505
2506
2507
2508<div class="newsletter ">
2509  <p class="message"></p>
2510
2511  <form method="post" action="/contact#contact_form" id="contact_form" accept-charset="UTF-8" class="contact-form"><input type="hidden" name="form_type" value="customer" /><input type="hidden" name="utf8" value="✓" />
2512    
2513
2514    
2515      <input type="hidden" name="contact[tags]" value="newsletter" />
2516    
2517
2518    <div class="input-row">
2519      
2520      
2521
2522      
2523
2524      <input type="hidden" name="challenge" value="false" />
2525      <input type="email" class="contact_email" name="contact[email]" required placeholder="Email address" autocorrect="off" autocapitalize="off" />
2526      <input type='submit' class="action_button sign_up" value="Sign Up" />
2527    </div>
2528  </form>
2529</div>
2530
2531      
2532    </div>
2533
2534    <div class="three columns">
2535      <h6>Explore</h6>
2536      <ul class="footer_menu">
2537        
2538          <li>
2539            <a href="/">Home</a>
2540          </li>
2541          
2542        
2543          <li>
2544            <a href="/pages/history">Roots</a>
2545          </li>
2546          
2547        
2548          <li>
2549            <a href="/pages/restaurant">Visit</a>
2550          </li>
2551          
2552        
2553          <li>
2554            <a href="/pages/functions">Events</a>
2555          </li>
2556          
2557        
2558          <li>
2559            <a href="/pages/wine-club">Wine Club</a>
2560          </li>
2561          
2562        
2563          <li>
2564            <a href="/pages/contact">Contact</a>
2565          </li>
2566          
2567        
2568          <li>
2569            <a href="/pages/wine">Shop</a>
2570          </li>
2571          
2572        
2573      </ul>
2574    </div>
2575
2576    <div class="three columns">
2577      <h6>Purchase</h6>
2578      <ul class="footer_menu">
2579        
2580          <li>
2581            <a href="/account">Wine Club Sign In</a>
2582          </li>
2583          
2584        
2585          <li>
2586            <a href="/pages/wine-club">Join The Wine Club</a>
2587          </li>
2588          
2589        
2590          <li>
2591            <a href="/policies/refund-policy">Refund Policy</a>
2592          </li>
2593          
2594        
2595          <li>
2596            <a href="/policies/privacy-policy">Privacy Policy</a>
2597          </li>
2598          
2599        
2600      </ul>
2601    </div>
2602
2603    <div class="three columns">
2604      
2605        <h6 class="social">Social</h6>
2606        <ul class="social_icons">
2607  
2608
2609  
2610    <li class="facebook"><a href="https://www.facebook.com/clearviewestate/?eid=ARBSLf2qIgeh6fQNNQWq115qTidiD3hOUHmPhriWe-jt_MIS6qtDwKV2VX7KfonnobD2RFLvRbMWcAM0" title="Clearview Estate on Facebook" rel="me" target="_blank"><span class="icon-facebook"></span></a></li>
2611  
2612
2613  
2614
2615  
2616
2617  
2618
2619  
2620
2621  
2622
2623  
2624    <li class="instagram"><a href="https://www.instagram.com/clearviewestate/" title="Clearview Estate on Instagram" rel="me" target="_blank"><span class="icon-instagram"></span></a></li>
2625  
2626
2627  
2628
2629  
2630
2631  
2632    <li class="email"><a href="mailto:[email protected]" title="Email Clearview Estate" rel="me" target="_blank"><span class="icon-email"></span></a></li>
2633  
2634</ul>
2635      
2636    </div>
2637
2638    <div class="sixteen columns">
2639      
2640
2641      <hr />
2642    </div>
2643
2644    <div class="six columns">
2645      <p class="credits">
2646        &copy; 2026 <a href="/" title="">Clearview Estate</a>.
2647        
2648      </p>
2649    </div>
2650
2651    <div class="ten columns credits_right">
2652      <p class="credits">
2653        
2654        <a target="_blank" rel="nofollow" href="https://www.shopify.com?utm_campaign=p
2654oweredby&amp;utm_medium=shopify&amp;utm_source=onlinestore"> </a>
2655      </p>
2656
2657      
2658    </div>
2659  </div>
2660
2661</div> <!-- end footer -->
2662
2663
2664
2665
2666</div>
2667
2668    
2669
2670    
2671
2672    
2673    
2674    
2674<script>
2675      $( document ).ready(function() {
2676          window.onscroll = function() {myFunction()};
2677          var header = document.getElementById("shopify-section-header");
2678          var sticky = header.offsetTop;
2679          function myFunction() {
2680            if (window.pageYOffset > sticky) {
2681              header.classList.add("sticky");
2682            } else {
2683              header.classList.remove("sticky");
2684            }
2685          }
2686      });      
2687    </script>
2687    
2688  
2689
2690<!-- spurit_sri-added -->
2691<script>
2692    if(typeof(Spurit) === 'undefined'){
2693        var Spurit = {};
2694    }
2695    if(!Spurit.recurringInvoices){
2696        Spurit.recurringInvoices = {};
2697    }
2698    if(!Spurit.recurringInvoices.snippet){
2699        Spurit.recurringInvoices.snippet = {};
2700    }
2701    Spurit.recurringInvoices.snippet.appId = '46';
2702    Spurit.recurringInvoices.snippet.shopHash = 'b18e4fd92be2bf127a32f584773718dd';
2703    Spurit.recurringInvoices.snippet.shopDomain = 'cve1.myshopify.com';
2704    Spurit.recurringInvoices.snippet.folderStore = 'https://cdn-spurit.com/shopify-apps/recurring-invoices/store/';
2705    Spurit.recurringInvoices.snippet.folderCss = 'https://cdn-spurit.com/shopify-apps/recurring-invoices/';
2706    Spurit.recurringInvoices.snippet.cdnHostPath = 'https://cdn-spurit.com/';
2707    Spurit.recurringInvoices.snippet.cdnJsLibsPath = 'https://cdn-spurit.com/all-apps/';
2708    Spurit.recurringInvoices.snippet.moneyFormat = '${{amount}}';
2709
2710    if(typeof(Spurit.globalSnippet) === 'undefined'){
2711        Spurit.globalSnippet = {
2712            shop_currency: 'NZD',
2713            money_format: '${{amount}}',
2714            cart: {"note":null,"attributes":{},"original_total_price":0,"total_price":0,"total_discount":0,"total_weight":0.0,"item_count":0,"items":[],"requires_shipping":false,"currency":"NZD","items_subtotal_price":0,"cart_level_discount_applications":[],"checkout_charge_amount":0},
2715            customer_id: ''
2716        };
2717    }
2718
2719    if(typeof(Spurit.recurringInvoices.translation) === 'undefined'){
2720        Spurit.recurringInvoices.translation = {
2721            select_periodicity: 'Select frequency:',
2722            weeks: 'Weeks',
2723            months: 'Months',
2724            weekly: 'Weekly',
2725            monthly: 'Monthly',
2726            custom: 'Custom'
2727        };
2728    }
2729</script>
vendor: 1 bytes, line 2729
2729
2730<script src="https://cdn-spurit.com/shopify-apps/recurring-invoices/common.js"></script>
2730
2731<!-- /spurit_sri-added -->
2732
2733<script src="https://cdn.shopify.com/storefront/standard-actions.js" type="module" data-source-attribution="shopify.standard_actions"></script>
2733
2734</body>
2735</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.