"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[9],{8:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_PREORDER_DAYS=void 0,e.hasValidPreOrderVariant=function(r){return!!(null==r?void 0:r.preorderVariant)&&(!r.availableForSale||parseFloat(r.preorderVariant.price)parseFloat(r.preorderVariant.price)?t:void 0,addToCartProperties:r.preorderVariant.addToCartProperties})},e.formatPreorderBundleDate=n,e.getFallbackDateString=function(r=75){const e=new Date;return e.setDate(e.getDate()+r),e.toISOString().substring(0,10)},e.formatPreorderDate=o,e.convertShippingPropertyValueToDisplayValue=function({properties:r}={properties:{}}){var e,t;const a=r.Shipping;try{if("string"==typeof a&&s.test(a))return o(parseInt(null!==(t=null===(e=a.match(s))||void 0===e?void 0:e[1])&&void 0!==t?t:"")).displayValue}catch(r){console.error(r)}return a},e.getPreorderAssignment=function(r,e){if(!e.every((r=>null==r?void 0:r.variants.some((r=>r.preorderVariant)))))return{showPreorderButtons:!1,preorderTreatment:"default"};const t=e.length>1&&"enabled"===r.getAssignment("showBundlePreorderButtons")||"enabled"===r.getAssignment("showPreorderButtons"),a=r.getAssignment("preorderTreatment");return{showPreorderButtons:t,preorderTreatment:"shipDateOnAddToCart"===a?a:"default"}},e.isPreOrderVariant=d,e.getPreOrderMessage=function(...r){const e=r.filter(d);if(0===e.length)return;const{displayValue:t,propertyValue:a}=n(e);return{displayValue:`Pre-order: ${t}`,propertyValue:`Pre-order: ${a}`}};const a=t(5);function n(r,t){const n=r.map((r=>r.preorderVariant)).filter(a.isDefined).map((r=>{var t;return null!==(t=r.days)&&void 0!==t?t:e.DEFAULT_PREORDER_DAYS})).sort(((r,e)=>r-e));if(n.length