"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[14],{77:function(e,t,o){var n=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function c(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,c)}l((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var o,n,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(r){return function(c){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.useCollectionView=t.useViewContent=t.usePageViewAnalytics=void 0;var n=o(2),i=o(48),r=o(107),a=o(77),c=o(13);t.usePageViewAnalytics=function(){var e=(0,n.useState)(),t=e[0],o=e[1];(0,n.useEffect)((function(){(0,a.logPageView)(t),o((0,c.uuid)())}),[])},t.useViewContent=function(e,t){(0,n.useEffect)((function(){e&&t&&(0,a.logViewContent)(e,t)}),[null==e?void 0:e.id,null==t?void 0:t.id])},t.useCollectionView=function(e,t){(0,n.useEffect)((function(){var o=(0,c.uuid)();(0,r.logPinterestCollectionView)(e,t,o),(0,i.logGoogleCollectionView)(e,t,o)}),[e,t])}},60:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadScriptWithDelay=t.loadScript=t.logAddToCart=t.logPageView=t.logViewContent=t.loadShopifyAccount=t.useCollectionView=t.useViewContent=t.usePageViewAnalytics=t.useOutsmartlyErrorReporting=t.logOutsmartlyError=t.loadImapactRadius=t.loadAttn=t.loadIntellipse=t.loadKlaviyoSubscribe=t.loadKlaviyo=t.loadLoyaltyLion=t.loadSnapchat=t.loadPinterest=t.loadGoogleAnalytics=void 0;var n=o(48);Object.defineProperty(t,"loadGoogleAnalytics",{enumerable:!0,get:function(){return n.loadGoogleAnalytics}});var i=o(107);Object.defineProperty(t,"loadPinterest",{enumerable:!0,get:function(){return i.loadPinterest}});var r=o(259);Object.defineProperty(t,"loadSnapchat",{enumerable:!0,get:function(){return r.loadSnapchat}});var a=o(341);Object.defineProperty(t,"loadLoyaltyLion",{enumerable:!0,get:function(){return a.loadLoyaltyLion}});var c=o(260);Object.defineProperty(t,"loadKlaviyo",{enumerable:!0,get:function(){return c.loadKlaviyo}}),Object.defineProperty(t,"loadKlaviyoSubscribe",{enumerable:!0,get:function(){return c.loadKlaviyoSubscribe}});var l=o(343);Object.defineProperty(t,"loadIntellipse",{enumerable:!0,get:function(){return l.loadIntellipse}});var d=o(344);Object.defineProperty(t,"loadAttn",{enumerable:!0,get:function(){return d.loadAttn}});var u=o(345);Object.defineProperty(t,"loadImapactRadius",{enumerable:!0,get:function(){return u.loadImapactRadius}});var s=o(92);Object.defineProperty(t,"logOutsmartlyError",{enumerable:!0,get:function(){return s.logOutsmartlyError}}),Object.defineProperty(t,"useOutsmartlyErrorReporting",{enumerable:!0,get:function(){return s.useOutsmartlyErrorReporting}});var _=o(346);Object.defineProperty(t,"usePageViewAnalytics",{enumerable:!0,get:function(){return _.usePageViewAnalytics}}),Object.defineProperty(t,"useViewContent",{enumerable:!0,get:function(){return _.useViewContent}}),Object.defineProperty(t,"useCollectionView",{enumerable:!0,get:function(){return _.useCollectionView}});var w=o(77);Object.defineProperty(t,"loadShopifyAccount",{enumerable:!0,get:function(){return w.loadShopifyAccount}}),Object.defineProperty(t,"logViewContent",{enumerable:!0,get:function(){return w.logViewContent}}),Object.defineProperty(t,"logPageView",{enumerable:!0,get:function(){return w.logPageView}}),Object.defineProperty(t,"logAddToCart",{enumerable:!0,get:function(){return w.logAddToCart}});var v=o(13);Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return v.loadScript}}),Object.defineProperty(t,"loadScriptWithDelay",{enumerable:!0,get:function(){return v.loadScriptWithDelay}})},344:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadAttn=void 0;var n=o(13);t.loadAttn=function(){var e;if(window.__APP_CONFIG__){var t=null===(e=window.__APP_CONFIG__)||void 0===e?void 0:e.ANALYTICS,o=t.ATTN_ID,i=t.ATTN_DELAY,r=void 0===i?10:i;if(o){var a={src:"//cdn.attn.tv/".concat(o,"/dtag.js"),id:"attn-script",timeout:1e3*r,anonymous:!1};(0,n.loadScriptWithDelay)(a)}}}},132:function(e,t,o){var n=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function c(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,c)}l((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var o,n,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(r){return function(c){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.loadImapactRadius=void 0;var n=o(13);t.loadImapactRadius=function(){var e;if(window.__APP_CONFIG__){var t=null===(e=window.__APP_CONFIG__)||void 0===e?void 0:e.ANALYTICS,o=t.IMPACTRADIUS_ENABLED,i=void 0!==o&&o,r=t.IMPACTRADIUS_DELAY;if(i){var a={src:"//d.impactradius-event.com/A2248058-8d0a-428f-b528-d1484c8157851.js",id:"impact-radius-script",timeout:1e3*(void 0===r?5:r),anonymous:!1};(0,n.loadScriptWithDelay)(a)}}}},343:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadIntellipse=void 0;var n=o(13);t.loadIntellipse=function(){if(window.__APP_CONFIG__){var e=window.__APP_CONFIG__,t=e.ANALYTICS,o=t.INTELLIPSE_ENABLED,i=void 0!==o&&o,r=t.INTELLIPSE_DELAY,a=void 0===r?10:r,c=e.SHOP_NAME;if(i){var l={src:"https://bootstrap.production.intellipse.com/bootstrap.js?shop=".concat(c,".myshopify.com"),id:"intellipse-script",timeout:1e3*a,anonymous:!1};(0,n.loadScriptWithDelay)(l)}}}},260:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadKlaviyoSubscribe=t.logAddToCartKlaviyo=t.logKlaviyoViewedProduct=t.loadKlaviyo=void 0;var n=o(13);function i(e,t){if(window.__APP_CONFIG__&&window.__APP_CONFIG__.ANALYTICS.KLAVIYO_ID){var o=function(e){var t,o="".concat(document.location.pathname).concat(document.location.search);return{Name:e.title,ProductID:e.id,Categories:e.tags,ImageURL:e.image,URL:o,Brand:e.vendor,Price:e.price,CompareAtPrice:null!==(t=e.compareAtPrice)&&void 0!==t?t:void 0}}(e);return window._learnq=window._learnq||[],window._learnq.push(["track",t,o]),o}}t.loadKlaviyo=function(){if(window.__APP_CONFIG__){var e=window.__APP_CONFIG__,t=e.ANALYTICS,o=t.KLAVIYO_ID,i=t.KLAVIYO_DELAY,r=void 0===i?2:i,a=e.SHOP_NAME;if(o){var c={src:"//static.klaviyo.com/onsite/js/klaviyo.js?company_id=".concat(o,"&shop=").concat(a,".myshopify.com"),id:"klaviyo-script",timeout:1e3*r,anonymous:!1};(0,n.loadScriptWithDelay)(c)}}},t.logKlaviyoViewedProduct=function(e){var t=i(e,"Viewed Product");if(t){var o={Title:t.Name,ItemId:t.ProductID,Categories:t.Categories,ImageUrl:t.ImageURL,Url:t.URL,Metadata:{Brand:t.Brand,Price:t.Price,CompareAtPrice:t.CompareAtPrice}};window._learnq.push(["trackViewedItem",o]),window.geq&&window.geq.event("Viewed Product Reclaim",o)}},t.logAddToCartKlaviyo=function(e){var t=i(e,"Added to Cart");window.geq&&window.geq.addToCart(t)},t.loadKlaviyoSubscribe=function(){if(window.__APP_CONFIG__){var e=window.__APP_CONFIG__.ANALYTICS.KLAVIYO_DELAY,t={src:"//www.klaviyo.com/media/js/public/klaviyo_subscribe.js",id:"klaviyo-subscribe-script",timeout:1e3*(void 0===e?0:e),anonymous:!1};(0,n.loadScriptWithDelay)(t,(function(){window.KlaviyoSubscribe&&window.KlaviyoSubscribe.attachToForms("#footer_email_signup",{hide_form_on_success:!0})}))}}},348:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadFacebookSdk=void 0,t.loadFacebookSdk=function(){var e,t,o,n,i,r;e=window,t=document,o="script",e.fbq||(n=e.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)},e._fbq||(e._fbq=n),n.push=n,n.loaded=!0,n.version="2.0",n.queue=[],(i=t.createElement(o)).async=!0,i.src="https://connect.facebook.net/en_US/fbevents.js",(r=t.getElementsByTagName(o)[0]).parentNode.insertBefore(i,r))}},349:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadTikTokScript=void 0,t.loadTikTokScript=function(e){!function(t,o,n){t.TiktokAnalyticsObject=n;var i=t[n]=t[n]||[];i.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],i.setAndDefer=function(e,t){e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}};for(var r=0;r{Object.defineProperty(t,"__esModule",{value:!0}),t.loadLoyaltyLion=void 0;var n=o(342);function i(e,t,o){var i,r,a,c=e.loggedIn,l=e.id,d=e.email,u=e.first_name,s=e.last_name,_=e.loyaltylion_has_account,w=e.loyaltylion_token,v=e.rechargeHash,p=e.loyaltylion_auth_token,f=e.date;try{(0,n.loadScript)(),_&&c&&d?null===(i=window.loyaltylion)||void 0===i||i.init({token:w,customer:{id:l,email:d,name:"".concat(u," ").concat(s),rechargeHash:v},auth:{date:f,token:p}}):null===(r=window.loyaltylion)||void 0===r||r.init({token:w}),null===(a=window.loyaltylion)||void 0===a||a.on("ready",(function(){setTimeout((function(){t()}),0)}))}catch(e){console.error("Could not load LoyaltyLion: ".concat(e)),o(e)}}t.loadLoyaltyLion=function(e){return new Promise((function(t,o){var n,r;if(window.loyaltylion&&(window.loyaltylion=window.lion=void 0,function(){for(var e=0,t=Array.from(document.querySelectorAll("[data-lion-react-container]"));e{Object.defineProperty(t,"__esModule",{value:!0}),t.loadScript=void 0,t.loadScript=function(){!function(e,t){function o(t){var o=e.getElementsByTagName("script")[0],n=e.createElement("script");n.src=t,n.crossOrigin="",n.onload=function(e){e.target.parentNode.removeChild(e.target)},o.parentNode.insertBefore(n,o)}if(!t.isLoyaltyLion){window.loyaltylion=t,void 0===window.lion&&(window.lion=t),t.version=2,t.isLoyaltyLion=!0;var n=new Date,i=n.getFullYear().toString()+n.getMonth().toString()+n.getDate().toString();o("https://sdk.loyaltylion.net/static/2/loader.js?t="+i);var r=!1;t.init=function(e){if(r)throw new Error("Cannot call lion.init more than once");r=!0;var a=t._token=e.token;if(!a)throw new Error("Token must be supplied to lion.init");for(var c=[],l="_push configure bootstrap shutdown on removeListener authenticateCustomer".split(" "),d=0;d{Object.defineProperty(t,"__esModule",{value:!0}),t.logPinterestCollectionView=t.logAddToCartPinterest=t.logPinterestPageView=t.loadPinterest=void 0;var n=o(340);t.loadPinterest=function(){var e;if(window.__APP_CONFIG__){var t=(null===(e=window.__APP_CONFIG__)||void 0===e?void 0:e.ANALYTICS).PINTEREST_ID;if(t)try{(0,n.loadScript)(t),(new Image).src="https://ct.pinterest.com/v3/?tid=".concat(t,"&noscript=1")}catch(e){console.error(e)}}},t.logPinterestPageView=function(e,t){var o;if(window.__APP_CONFIG__){var n=(null===(o=window.__APP_CONFIG__)||void 0===o?void 0:o.ANALYTICS).PINTEREST_ID;if(n)if(t)(new Image).src=["https://ct.pinterest.com/v3/?event=PageVisit","&tid=".concat(n),(null==t?void 0:t.loggedIn)&&(null==t?void 0:t.hashedEmail)?"&pd[em]=".concat(t.hashedEmail):""].join("");else try{window.pintrk("track","checkout"),(new Image).src="https://ct.pinterest.com/v3/?tid=".concat(n,"&event=pageview&noscript=1")}catch(e){console.error(e)}}},t.logAddToCartPinterest=function(e,t){var o;if(window.__APP_CONFIG__){var n=(null===(o=window.__APP_CONFIG__)||void 0===o?void 0:o.ANALYTICS).PINTEREST_ID;n&&((new Image).src=["https://ct.pinterest.com/v3/?event=AddToCart","&tid=".concat(n),"&ed[line_items][0][product_id]=".concat(e.id),"&ed[line_items][0][product_variant_id]=".concat(t.id),"&ed[line_items][0][product_price]=".concat(t.price),"&ed[line_items][0][product_quantity]=1","&ed[line_items][0][product_name]=".concat(window.encodeURIComponent("".concat(e.title," - ").concat(t.title)))].join(""))}},t.logPinterestCollectionView=function(){var e;if(window.__APP_CONFIG__){var t=(null===(e=window.__APP_CONFIG__)||void 0===e?void 0:e.ANALYTICS).PINTEREST_ID;t&&((new Image).src=["https://ct.pinterest.com/v3/?event=ViewCategory","&tid=".concat(t)].join(""))}}},340:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadScript=void 0,t.loadScript=function(e){!function(e){if(!window.pintrk){window.pintrk=function(){window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var t=window.pintrk;t.queue=[],t.version="3.0";var o=document.createElement("script");o.async=!0,o.src="https://s.pinimg.com/ct/core.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(o,n)}}(),window.pintrk("load",e),window.pintrk("page")}},347:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.logShopifyPageView=t.logShopifyViewContent=t.logAddToCartShopify=void 0;var n=o(13),i="";function r(e){fetch("https://monorail-edge.shopifysvc.com/unstable/produce_batch",{headers:{"content-type":"text/plain"},referrerPolicy:"strict-origin-when-cross-origin",body:JSON.stringify(e),method:"POST",mode:"cors",credentials:"omit"})}function a(e,t,o){var r=function(e,t,o){var r,a,c,l,d=null===(c=null===(a=null===(r=window.__APP_CONFIG__)||void 0===r?void 0:r.ANALYTICS)||void 0===a?void 0:a.FB_ID)||void 0===c?void 0:c.toString();if(d){var u=(0,n.readCookie)("_shopify_y"),s=(new Date).getTime(),_=null!==(l=window.__APP_CONFIG__)&&void 0!==l?l:{},w=_.SHOP_ID,v=_.STORE_URL,p=document.location.pathname,f=document.location.search,y="".concat(v).concat(p).concat(f),g=o?[JSON.stringify(o)]:void 0;return{schema_id:"storefront_customer_tracking/2.2",payload:{test_event_code:(0,n.readCookie)("test_event_code"),event_id:t,event_name:e,products:g,total_value:o?o.price:void 0,currency:o?"USD":void 0,shop_id:w,facebook_pixel_id:d,facebook_capi_enabled:!0,event_time:s,event_source_url:y,unique_token:u,page_id:i,source:"trekkie",ccpa_enforced:!1,gdpr_enforced:!1,s2s_event_id:null,expect_s2s_event_id:!1,expect_s2s_emit:!1,s2s_event_id_source:null},metadata:{event_created_at_ms:s}}}}(e,t,o);return{metadata:{event_sent_at_ms:(new Date).getTime()},events:r?[r]:[]}}function c(e,t){var o="".concat(e.title," - ").concat(t.title);return{variant_id:t.id,product_id:e.id,product_gid:"gid://shopify/Product/".concat(e.id),name:o,price:parseFloat(t.price),sku:t.sku,brand:t.brand,variant:o,category:"",quantity:1}}t.logAddToCartShopify=function(e,t,o){var n=a("Added Product",o,c(e,t));0!==n.events.length&&r(n)},t.logShopifyViewContent=function(e,t,o){var n=a("Viewed Product",o,c(e,t));0!==n.events.length&&r(n)},t.logShopifyPageView=function(e,t){if(t&&window.__APP_CONFIG__){var o=t.loggedIn?parseInt(t.id):void 0,c=(0,n.readCookie)("_shopify_y"),l=(0,n.readCookie)("_shopify_s"),d=(0,n.readCookie)("_shopify_fs"),u=(new Date).getTime(),s=document.location.pathname,_=document.location.search,w=window.__APP_CONFIG__,v=w.SHOP_ID,p=w.STORE_URL,f="".concat(p).concat(s).concat(_);i=(0,n.uuid)();var y=a("Page View",e),g=s.includes("/products/")?"product":s.includes("/collections/")?"collection":"home",h={schema_id:"trekkie_storefront_page_view/1.2",payload:{name:null,referrer:"",path:s,search:_,url:f,properties:{},eventId:e,pageType:g,shopId:v,isMerchantRequest:null,contentLanguage:"en",currency:"USD",customerId:o,appName:"storefront",uniqToken:c,visitToken:l,microSessionId:(0,n.uuid)(),microSessionCount:1,firstSeen:d,isPersistentCookie:!0,eventType:"page"},metadata:{event_created_at_ms:u}};y.events.push(h),r(y)}}},259:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.logAddToCartSnapchat=t.logSnapchatViewContent=t.logSnapchatPageView=t.loadSnapchat=void 0;var n=o(13);t.loadSnapchat=function(e){if(window.__APP_CONFIG__){var t=window.__APP_CONFIG__.ANALYTICS,o=t.SNAPCHAT_ID,i=t.SNAPCHAT_DELAY,r=void 0===i?0:i;if(o){if(!window.snaptr){var a=function(){for(var e=[],t=0;t0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]>>0}catch(t){e=(new Date).getTime()>>>0}try{t=performance.now()>>>0}catch(e){t=0}var o=Math.abs(e+t).toString(16).toLowerCase();return"00000000".substring(0,8-o.length)+o}()+"-"+e},t.cancellableFetch=function(e,t){void 0===t&&(t={});var n=new AbortController,i=n.signal;return{response:fetch(e,o(o({},t),{signal:i})),cancel:function(){return n.abort()}}},t.sha256=function(e){return n(this,void 0,void 0,(function(){var t,o;return i(this,(function(n){switch(n.label){case 0:return t=(new TextEncoder).encode(e),[4,crypto.subtle.digest("SHA-256",t)];case 1:return o=n.sent(),[2,Array.from(new Uint8Array(o)).map((function(e){return e.toString(16).padStart(2,"0")})).join("")]}}))}))},t.imagePixel=function(e){return n(this,void 0,void 0,(function(){var t;return i(this,(function(o){return(t=new Image).height=1,t.width=1,t.setAttribute("style","display:none;"),t.src=e,document.body.append(t),[2]}))}))},t.ccpa_dns=function(){return/__ccpa_dns=true/.test(document.cookie)}}}]);