"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[4],{6:(t,e,n)=>{n.d(e,{a:()=>i,b:()=>r});var o=n(39);function r(t,e,n){return(t=(0,o.getFastImage)(t,e,n)).replace("/fl_progressive:steep/","/")}function i(t){var e,n,o;if(t)return"type"in t?"image"===t.type&&t.url?Object.assign(Object.assign({},t),{url:r(t.url),altText:null!==(e=t.altText)&&void 0!==e?e:""}):void 0:"__typename"in t&&"MediaImage"===t.__typename&&(null===(n=t.image)||void 0===n?void 0:n.url)?{url:r(null===(o=t.image)||void 0===o?void 0:o.url),altText:"",height:void 0,width:void 0}:void 0}(0,o.setConfig)([{folder:"bare",template:"https://cdn.shopify.com/s/files/1/0576/5120/0113/"},{folder:"stamped",template:"https://cdn.stamped.io/uploads/photos/"},{folder:"comfrt",template:"https://cdn.shopify.com/s/files/1/0569/4029/8284/"},{folder:"3bn",template:"https://cdn.shopify.com/s/files/1/0179/2309/"}])},44:(t,e,n)=>{n.d(e,{a:()=>r});var o=n(1);function r(){const[t,e]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{e(!0)}),[]),t}},5:(t,e,n)=>{n.d(e,{a:()=>c,b:()=>p,c:()=>d,d:()=>l,e:()=>u,f:()=>m,g:()=>y,h:()=>v,i:()=>h,j:()=>f,k:()=>s,l:()=>g});var o=n(2),r=n(1),i=n(44),a=function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{c(o.next(t))}catch(t){i(t)}}function l(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}c((o=o.apply(t,e||[])).next())}))};const l=t=>{const e=t.split("/"),n=e[e.length-1];if(!n)return;const o=parseInt(n,10);return isNaN(o)?void 0:o};function c(t){return a(this,void 0,void 0,(function*(){const e=t.cookies.get("outsmartly_token");return!!e&&200===(yield fetch("https://console.outsmartly.com/api/check-auth-state",{headers:{cookie:`outsmartly_token=${e}`}})).status}))}function u(t){return null!=t}function s(t){var e,n,o,r;const i=new URL(t);if("/search"===i.pathname||"/search/"===i.pathname)return{productHandle:"",collectionHandle:"__search",tagHandle:""};const a=null!==(n=null===(e=i.pathname.match(/\/products\/([^/?]+)/))||void 0===e?void 0:e[1])&&void 0!==n?n:"",l=null===(o=i.pathname.match(/\/collections\/([^/?]+)/))||void 0===o?void 0:o[1],c=null===(r=i.pathname.match(/\/collections\/[^/?]+\/([^/?]+)$/))||void 0===r?void 0:r[1];return{productHandle:a,collectionHandle:l,tagHandles:c?decodeURIComponent(c).split("+").map((t=>t.toLowerCase())):void 0}}function d({selectedVariant:t,getHexForOptionColor:e,colorOption:n}){const o=null==t?void 0:t.selectedOptions.Color,r=o?null==e?void 0:e(o,n).hexColor:"#000",i=p(r);return(null==t?void 0:t.oos)?{hexColor:"#666",color:"#999",hexColorPdp:r,colorPdp:i}:{hexColor:r,color:i,hexColorPdp:r,colorPdp:i}}function p(t){const{r:e,g:n,b:o}=function(t){let e=0,n=0,o=0;return 4==t.length?(e=parseInt("0x"+t[1]+t[1],16),n=parseInt("0x"+t[2]+t[2],16),o=parseInt("0x"+t[3]+t[3],16)):7==t.length&&(e=parseInt("0x"+t[1]+t[2],16),n=parseInt("0x"+t[3]+t[4],16),o=parseInt("0x"+t[5]+t[6],16)),{r:e,g:n,b:o}}(t);return(299*e+587*n+114*o)/1e3>=128?"black":"white"}const h=(...t)=>{try{return parseInt(...t)}catch(t){return}};function f(t){return a(this,void 0,void 0,(function*(){try{return yield t}catch(t){return}}))}function v(t){return t.replace(/(\.[0-9]*?)0*$/,"$1").replace(/\.$/,"")}function m(){return"undefined"!=typeof navigator&&(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)}function g(t,e="default",n){const a=(0,i.a)();return(0,r.useCallback)((()=>{if(!a)return null!=n?n:e;const r=(0,o.getAssignment)(t);return r&&"FEATURE_NOT_FOUND"!==r?r:e}),[a])}function y(t){var e;return"US"===t.country&&"US"===(null!==(e=t.cookies.get("localization"))&&void 0!==e?e:"US")}}}]);