1"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["Link-public","ProductCustomTemplate-public","ProductDescription-public","ProductTitle-public"],{"./npm-packages/@shopwp/components/src/link/index.jsx"(e,t,s){s.r(t),s.d(t,{default:()=>p});var r=s("./npm-packages/@shopwp/components/src/products/product/_state/hooks.jsx");const a=function(e){var t=e.children,s=(0,r.F)();return React.createElement("a",{href:"#!",onClick:function(){s({type:"TOGGLE_MODAL",payload:!0})},className:"swp-link wps-link-modal","aria-label":"Link to modal window"},t)};var c=s("./npm-packages/@shopwp/common/src/settings/index.js"),n=s("./npm-packages/@shopwp/components/src/items/_state/payload/hooks.jsx");const o=function(e){var t=e.type,s=e.linkTo,r=e.manualLink,a=e.target,o=e.classNames,p=e.children,i=e.payload,l=void 0!==i&&i;l=l||(0,n.Z)();var m="swp-link wps-"+t+"-link "+o,d=wp.hooks.applyFilters("misc.linkHref",r?encodeURI(r):(0,c.es)(l,t,s),s,l),u=wp.hooks.applyFilters("misc.linkTarget",function(e){return e||"_blank"}(a),t,l);return React.createElement("a",{href:d,className:m,target:u},p)},p=function(e){var t=e.type,s=e.classNames,r=void 0===s?"":s,c=e.target,n=e.from,p=void 0!==n&&n,i=e.children,l=e.linkTo,m=void 0===l?shopwp.general.productsLinkTo:l,d=e.manualLink,u=e.disableLink,g=e.payload,w=void 0!==g&&g;return u||shopwp.misc.isAdmin||"wordpress"!==shopwp.general.productsLinkTo&&"cart"===p?i:"none"!==m||d?"modal"===m?React.createElement(a,null,i):React.createElement(o,{type:t,linkTo:m,manualLink:d,target:c,classNames:r,payload:w},i):i}},"./npm-packages/@shopwp/components/src/products/product/description/index.jsx"(e,t,s){s.r(t),s.d(t,{default:()=>n});var r=s("./npm-packages/@shopwp/hooks/src/index.js"),a=s("./npm-packages/@shopwp/components/src/products/product/_state/hooks.jsx"),c=s("./npm-packages/@shopwp/components/src/items/_state/settings/hooks.jsx");const n=wp.element.memo((function(){var e=(0,c.s)(),t=(0,a.k)();return(0,r.WP)(React.createElement("div",{className:"swp-mb20 swp-product-description "+e.descriptionClassName,"aria-label":"Product Description",itemProp:"description",dangerouslySetInnerHTML:{__html:e.descriptionLength?t.payload.descriptionHtml.substring(0,e.descriptionLength)+" ...":t.payload.descriptionHtml}}),e.dropzoneProductDescription)}))},"./npm-packages/@shopwp/components/src/products/product/pricing/index.jsx"(e,t,s){s.r(t),s.d(t,{default:()=>g});var r=s("./npm-packages/@shopwp/components/src/products/product/_state/hooks.jsx"),a=s("./npm-packages/@shopwp/components/src/shop/_state/hooks.js"),c=s("./npm-packages/@shopwp/components/src/products/product/pricing/price/index.jsx"),n=s("./npm-packages/@shopwp/common/src/utils/index.jsx"),o=s("./npm-packages/@shopwp/components/src/items/_state/settings/hooks.jsx"),p=s("./node_modules/lodash-es/min.js"),i=s("./node_modules/lodash-es/max.js"),l=wp.element.lazy((function(){return s.e("ProductPricesCompareAt-public").then(s.bind(s,"./npm-packages/@shopwp/components/src/products/product/pricing/compare-at/index.jsx"))})),m=wp.element.lazy((function(){return s.e("ProductPricesSubscription-public").then(s.bind(s,"./npm-packages/@shopwp/components/src/products/product/pricing/subscription/index.jsx"))}));function d(){var e=(0,o.s)(),t=(0,r.k)(),s=(0,a.T)(),d=wp.element.Suspense;function u(t){return!!e.showPriceRange&&t.regPrices.length>1}function g(){if(!e.showCompareAt)return!1;if(t.selectedVariant){if(t.selectedVariant.compareAtPrice&&t.selectedVariant.compareAtPrice.amount)return"0"!==t.selectedVariant.compareAtPrice.amount&&"0.0"!==t.selectedVariant.compareAtPrice.amount&&"0.00"!==t.selectedVariant.compareAtPrice.amount}else if(!t.hasManyVariants&&t.payload.variants.edges.length&&t.payload.variants.edges[0].node.compareAtPrice)return!0;return!1}var w=(0,n.r3)(t.payload);return React.createElement("div",{className:"swp-mb20 swp-l-col swp-l-baseline swp-l-rel100 swp-product-pricing "+e.pricingClassName,"data-show-price-range":u(w),"data-is-selected":!!t.selectedVariant,"data-show-sale-pricing":g(),"aria-label":"Product Pricing",itemScope:!0,itemProp:"offers",itemType:"https://schema.org/Offer"},u(w)?React.createElement(React.Fragment,null,React.createElement("meta",{itemProp:"minPrice",content:(0,p.A)(w.regPrices)}),React.createElement("meta",{itemProp:"maxPrice",content:(0,i.A)(w.regPrices)})):null,React.createElement("meta",{itemProp:"availability",href:"https://schema.org/".concat(t.payload.availableForSale?"InStock":"OutOfStock"),content:t.payload.availableForSale?"In stock":"Out of stock"}),React.createElement("meta",{itemProp:"price",content:w.regPrices[0]}),React.createElement("meta",{itemProp:"priceCurrency",content:s.currency}),React.createElement(n.W,{name:"before.productPricing",args:[t]}),t.subscriptionPricing?React.createElement("div",{className:"swp-l-row swp-l-baseline swp-m-l-row"},React.createElement(m,{productState:t,subType:t.activeSellingGroup,insideSubscriptionsWidget:!1})):g()?React.createElement(d,{fallback:!1},React.createElement(l,{selectedVariant:t.selectedVariant,compareAt:e.showCompareAt,productState:t,prices:w,settings:e})):React.createElement(c.A,{selectedVariant:t.selectedVariant,compareAt:!1,showPriceRange:u(w),prices:w}),React.createElement(n.W,{name:"after.productPricing",args:[t]}))}var u=s("./npm-packages/@shopwp/hooks/src/index.js");const g=function(){var e=(0,o.s)();return(0,u.WP)(React.createElement(d,null),e.dropzoneProductPricing)}},"./npm-packages/@shopwp/components/src/products/product/pricing/price/index.jsx"(e,t,s){s.d(t,{A:()=>R});var r=s("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=s("./node_modules/lodash-es/isEmpty.js"),
1c=s("./node_modules/lodash-es/last.js"),n=s("./node_modules/lodash-es/min.js"),o=s("./node_modules/lodash-es/max.js"),p=s("./node_modules/@emotion/react/dist/emotion-react.browser.esm.js"),i=s("./npm-packages/@shopwp/components/src/price/index.jsx"),l=wp.element.forwardRef((function(e,t){return!1!==e.price||null!==e.price?React.createElement("span",{ref:t,className:"swp-price swp-product-price wps-product-individual-price","data-price":e.price,"data-is-compare-at":e.compareAt},React.createElement(i.A,{price:e.price})):null}));const m=wp.element.memo(l),d=wp.element.memo((function(e){var t=e.firstPrice,s=e.compareAt,r=e.showPriceRange,a=e.pricingColor,c=e.settings;return React.createElement("p",{className:"swp-l-row swp-l-baseline swp-m-l-row swp-0"},React.createElement("span",{className:"swp-price-label"},"From"),React.createElement(m,{price:t,compareAt:s,showPriceRange:r,pricingColor:a,settings:c}))})),u=function(e){var t=e.firstPrice,s=e.lastPrice,r=e.isFirstAndLastSame,a=e.compareAt,c=e.showPriceRange,n=e.pricingColor,o=e.settings,i=(0,p.AH)("margin-top:0;position:",c&&a?"relative":"static",";display:flex;align-items:baseline;height:100%;line-height:1;align-items:center;;label:showPriceRangeStyles;");return(0,p.Y)("span",{className:"wps-pricing-range-wrapper",css:i},r?(0,p.Y)(m,{showPriceRange:c,price:t,compareAt:a,pricingColor:n,settings:o}):(0,p.Y)(d,{firstPrice:t,lastPrice:s,compareAt:a,showPriceRange:c,pricingColor:n,settings:o}))};var g=s("./npm-packages/@shopwp/common/src/utils/index.jsx"),w=s("./npm-packages/@shopwp/components/src/items/_state/settings/hooks.jsx"),h=wp.element,k=h.useEffect,f=h.useRef,P=h.useState;function x(e,t){return(0,a.A)(e)?0:(0,c.A)(e[t])}const R=function(e){var t=e.prices,s=e.compareAt,c=e.showPriceRange,p=e.selectedVariant,i=(0,w.s)(),l=f(),d=P((function(){return E()})),h=(0,r.A)(d,2),R=h[0],j=h[1],b=P((function(){return(0,g._k)(t)})),A=(0,r.A)(b,2),y=A[0],v=A[1];function E(){return s?c?(0,n.A)(t.compareAtPrices):(0,g._k)(t):c?(0,n.A)(t.regPrices):function(e){return(0,a.A)(e)?0:e.regPrices[0]}(t)}function _(){return s?c?(0,o.A)(t.compareAtPrices):function(e){return x(e,"compareAtPrices")}(t):c?(0,o.A)(t.regPrices):function(e){return x(e,"regPrices")}(t)}return k((function(){p?(p.compareAtPrice?v(p.compareAtPrice.amount):v(!1),j(p.price.amount)):(v((0,g._k)(t)),j(E()))}),[p]),React.createElement("span",{className:"swp-product-price wps-products-price wps-product-pricing wps-products-price-one"},c&&!p?React.createElement(u,{firstPrice:E(),lastPrice:_(),isFirstAndLastSame:E()===_(),compareAt:s,showPriceRange:c,pricingColor:i.pricingColor,settings:i}):React.createElement(m,{ref:l,price:s?y:R,compareAt:s,showPriceRange:c,pricingColor:i.pricingColor,settings:i}))}},"./npm-packages/@shopwp/components/src/products/product/template/index.jsx"(e,t,s){s.r(t),s.d(t,{default:()=>d});var r=s("./node_modules/react-jsx-parser/dist/react-jsx-parser.min.js"),a=s("./npm-packages/@shopwp/components/src/products/product/buy-button/index.jsx"),c=s("./npm-packages/@shopwp/components/src/products/product/title/index.jsx"),n=s("./npm-packages/@shopwp/components/src/products/product/pricing/index.jsx"),o=s("./npm-packages/@shopwp/components/src/products/product/description/index.jsx"),p=s("./npm-packages/@shopwp/components/src/products/product/images/index.jsx"),i=s("./npm-packages/@shopwp/components/src/reviews/index.jsx"),l=s("./node_modules/react-error-boundary/dist/react-error-boundary.js"),m=s("./npm-packages/@shopwp/components/src/error-fallback/index.jsx");const d=wp.element.memo((function(e){var t=e.htmlTemplateData,s=e.payload,d=e.settings;return React.createElement(l.tH,{FallbackComponent:m.A},React.createElement(r.A,{components:{Reviews:i.default,ProductBuyButton:a.default,ProductTitle:c.default,ProductPricing:n.default,ProductDescription:o.default,ProductImages:p.default},bindings:{payload:s,settings:d},renderInWrapper:!1,showWarnings:!0,jsx:t,blacklistedTags:["script"]}))}))},"./npm-packages/@shopwp/components/src/products/product/title/index.jsx"(e,t,s){s.r(t),s.d(t,{default:()=>l});var r=s("./npm-packages/@shopwp/hooks/src/index.js"),a=s("./npm-packages/@shopwp/common/src/utils/index.jsx"),c=s("./npm-packages/@shopwp/common/src/settings/index.js"),n=s("./npm-packages/@shopwp/components/src/items/_state/settings/hooks.jsx"),o=s("./npm-packages/@shopwp/components/src/products/product/_state/hooks.jsx"),p=s("./npm-packages/@shopwp/components/src/link/index.jsx");
1function i(e){var t=e.classList,s=(0,o.k)(),r=wp.hooks.applyFilters("product.titleHeadingTag","h".concat(shopwp.misc.isSingularProducts?"1":"2"),s.payload),c=wp.hooks.applyFilters("product.titleText",s.payload.title,s.payload);return React.createElement(React.Fragment,null,React.createElement(a.W,{name:"before.productTitle",args:[s]}),React.createElement(a.W,{name:"product.titleHtml",args:[s]},React.createElement(r,{itemProp:"name",content:c,className:t},c)),React.createElement(a.W,{name:"after.productTitle",args:[s]}))}const l=function(){var e=(0,n.s)(),t=(0,o.k)();return(0,r.WP)(React.createElement("div",{className:e.isSingleComponent?"swp-mb20 ":"swp-component wps-component wps-component-products-title","aria-label":t.payload.title+" product title","data-wps-component-order":"0","data-is-single-component":e.isSingleComponent},(0,c.p5)(e)?React.createElement(p.default,{type:"products",target:e.linkTarget,linkTo:e.linkTo,manualLink:e.linkToUrl,payload:t.payload},React.createElement(i,{classList:"swp-product-title "+e.titleClassName})):React.createElement(i,{classList:"swp-product-title "+e.titleClassName})),e.dropzoneProductTitle)}}}]);
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.