1"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["ProductCustomTemplate-public","ProductTitle-public","ProductDescription-public","Link-public"],{
1"./npm-packages/@shopwp/components/src/link/index.jsx":(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var n=s("./npm-packages/@shopwp/components/src/products/product/_state/hooks.jsx");const o=function(e){let t=e.children;const s=(0,n.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 r=s("./npm-packages/@shopwp/common/src/settings/index.js"),p=s("./npm-packages/@shopwp/components/src/items/_state/payload/hooks.jsx");const a=function(e){let t=e.type,s=e.linkTo,n=e.manualLink,o=e.target,a=e.classNames,c=e.children,i=e.payload,l=void 0!==i&&i;l=l||(0,p.Z)();const m="swp-link wps-"+t+"-link "+a;var d=wp.hooks.applyFilters("misc.linkHref",n?encodeURI(n):(0,r.es)(l,t,s),s,l);return React.createElement("a",{href:d,className:m,target:wp.hooks.applyFilters("misc.linkTarget",function(e){return e||"_blank"}(o),t,l)},c)},c=function(e){let t=e.type,s=e.classNames,n=void 0===s?"":s,r=e.target,p=e.from,c=void 0!==p&&p,i=e.children,l=e.linkTo,m=void 0===l?shopwp.general.productsLinkTo:l,d=e.manualLink,u=e.disableLink,w=e.payload,g=void 0!==w&&w;return u||shopwp.misc.isAdmin||"wordpress"!==shopwp.general.productsLinkTo&&"cart"===c?i:"none"!==m||d?"modal"===m?React.createElement(o,null,i):React.createElement(a,{type:t,linkTo:m,manualLink:d,target:r,classNames:n,payload:g},i):i}},
1"./npm-packages/@shopwp/components/src/products/product/description/index.jsx":(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});var n=s("./npm-packages/@shopwp/components/node_modules/@emotion/react/dist/emotion-react.browser.esm.js"),o=s("./npm-packages/@shopwp/hooks/src/index.js"),r=s("./npm-packages/@shopwp/components/src/products/product/_state/hooks.jsx"),p=s("./npm-packages/@shopwp/components/src/items/_state/settings/hooks.jsx");const a=wp.element.memo((function(){const e=(0,p.s)(),t=(0,r.k)();return(0,o.WP)((0,n.Y)("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)}))},
1"./npm-packages/@shopwp/components/src/products/product/pricing/index.jsx":(e,t,s)=>{s.r(t),s.d(t,{default:()=>w});var n=s("./npm-packages/@shopwp/components/src/products/product/_state/hooks.jsx"),o=s("./npm-packages/@shopwp/components/src/shop/_state/hooks.js"),r=s("./npm-packages/@shopwp/components/src/products/product/pricing/price/index.jsx"),p=s("./npm-packages/@shopwp/common/src/utils/index.jsx"),a=s("./npm-packages/@shopwp/components/src/items/_state/settings/hooks.jsx"),c=s("./npm-packages/@shopwp/components/node_modules/lodash-es/min.js"),i=s("./npm-packages/@shopwp/components/node_modules/lodash-es/max.js");const 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(){const e=(0,a.s)(),t=(0,n.k)(),s=(0,o.T)(),d=wp.element.Suspense;function u(t){return!!e.showPriceRange&&t.regPrices.length>1}function w(){if(!e.showCompareAt)return!1;if(t.selectedVariant){if(t.selectedVariant.node.compareAtPrice&&t.selectedVariant.node.compareAtPrice.amount)return"0"!==t.selectedVariant.node.compareAtPrice.amount&&"0.0"!==t.selectedVariant.node.compareAtPrice.amount&&"0.00"!==t.selectedVariant.node.compareAtPrice.amount}else if(!t.hasManyVariants&&t.payload.variants.edges.length&&t.payload.variants.edges[0].node.compareAtPrice)return!0;return!1}const g=(0,p.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(g),"data-is-selected":!!t.selectedVariant,"data-show-sale-pricing":w(),"aria-label":"Product Pricing",itemScope:!0,itemProp:"offers",itemType:"https://schema.org/Offer"},u(g)?React.createElement(React.Fragment,null,React.createElement("meta",{itemProp:"minPrice",content:(0,c.A)(g.regPrices)}),React.createElement("meta",{itemProp:"maxPrice",content:(0,i.A)(g.regPrices)})):null,React.createElement("meta",{itemProp:"availability",href:"https://schema.org/InStock",content:t.payload.availableForSale?"In stock":"Out of stock"}),React.createElement("meta",{itemProp:"price",content:g.regPrices[0]}),React.createElement("meta",{itemProp:"priceCurrency",content:s.buyerIdentity.currency}),React.createElement(p.W,{name:"before.productPricing",args:[t]}),t.selectedSubscriptionInfo&&t.selectedVariant?React.createElement(m,{subscriptionInfo:t.selectedSubscriptionInfo,selectedVariant:t.selectedVariant,settings:e,shouldShowCompareAt:w()}):w()?React.createElement(d,{fallback:!1},React.createElement(l,{selectedVariant:t.selectedVariant,compareAt:e.showCompareAt,productState:t,prices:g,settings:e})):React.createElement(r.A,{selectedVariant:t.selectedVariant,compareAt:!1,showPriceRange:u(g),prices:g}),React.createElement(p.W,{name:"after.productPricing",args:[t]}))}var u=s("./npm-packages/@shopwp/hooks/src/index.js");const w=function(){const e=(0,a.s)();return(0,u.WP)(React.createElement(d,null),e.dropzoneProductPricing)}},
1"./npm-packages/@shopwp/components/src/products/product/pricing/price/index.jsx":(e,t,s)=>{s.d(t,{A:()=>v});var n=s("./npm-packages/@shopwp/components/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),o=s("./npm-packages/@shopwp/components/node_modules/@emotion/react/dist/emotion-react.browser.esm.js"),r=s("./npm-packages/@shopwp/components/node_modules/lodash-es/isEmpty.js"),p=s("./npm-packages/@shopwp/components/node_modules/lodash-es/last.js"),a=s("./npm-packages/@shopwp/components/node_modules/lodash-es/min.js"),c=s("./npm-packages/@shopwp/components/node_modules/lodash-es/max.js"),i=s("./npm-packages/@shopwp/components/src/products/product/pricing/single/index.jsx");const l=wp.element.memo((function(e){let t=e.firstPrice,s=e.compareAt,n=e.showPriceRange,o=e.pricingColor,r=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(i.A,{price:t,compareAt:s,showPriceRange:n,pricingColor:o,settings:r}))})),m=function(e){let t=e.firstPrice,s=e.lastPrice,n=e.isFirstAndLastSame,r=e.compareAt,p=e.showPriceRange,a=e.pricingColor,c=e.settings;const m=(0,o.AH)("margin-top:0;position:",p&&r?"relative":"static",";display:flex;align-items:baseline;height:100%;line-height:1;align-items:center;;label:showPriceRangeStyles;");return(0,o.Y)("span",{className:"wps-pricing-range-wrapper",css:m},n?(0,o.Y)(i.A,{showPriceRange:p,price:t,compareAt:r,pricingColor:a,settings:c}):(0,o.Y)(l,{firstPrice:t,lastPrice:s,compareAt:r,showPriceRange:p,pricingColor:a,settings:c}))};var d=s("./npm-packages/@shopwp/common/src/utils/index.jsx"),u=s("./npm-packages/@shopwp/components/src/items/_state/settings/hooks.jsx");const w=wp.element,g=w.useEffect,h=w.useRef,k=w.useState;function f(e,t){return(0,r.A)(e)?0:(0,p.A)(e[t])}const v=function(e){let t=e.prices,s=e.compareAt,p=e.showPriceRange,l=e.selectedVariant;const w=(0,u.s)(),v=h(),x=k((function(){return j()})),y=(0,n.A)(x,2),b=y[0],P=y[1],E=k((function(){return(0,d._k)(t)})),R=(0,n.A)(E,2),S=R[0],A=R[1];function j(){return s?p?(0,a.A)(t.compareAtPrices):(0,d._k)(t):p?(0,a.A)(t.regPrices):function(e){return(0,r.A)(e)?0:e.regPrices[0]}(t)}function _(){return s?p?(0,c.A)(t.compareAtPrices):function(e){return f(e,"compareAtPrices")}(t):p?(0,c.A)(t.regPrices):function(e){return f(e,"regPrices")}(t)}g((function(){l?(l.node.compareAtPrice?A(l.node.compareAtPrice.amount):A(!1),P(l.node.price.amount)):(A((0,d._k)(t)),P(j()))}),[l]);const T=(0,o.AH)(";label:priceWrapperCSS;");return(0,o.Y)("span",{className:"swp-product-price wps-products-price wps-product-pricing wps-products-price-one",css:T},p&&!l?(0,o.Y)(m,{firstPrice:j(),lastPrice:_(),isFirstAndLastSame:j()===_(),compareAt:s,showPriceRange:p,pricingColor:w.pricingColor,settings:w}):(0,o.Y)(i.A,{ref:v,price:s?S:b,compareAt:s,showPriceRange:p,pricingColor:w.pricingColor,settings:w}))}},
1"./npm-packages/@shopwp/components/src/products/product/pricing/single/index.jsx":(e,t,s)=>{s.d(t,{A:()=>p});var n=s("./npm-packages/@shopwp/components/node_modules/@emotion/react/dist/emotion-react.browser.esm.js"),o=s("./npm-packages/@shopwp/components/src/price/index.jsx");const r=wp.element.forwardRef((function(e,t){const s=(0,n.AH)("font-size:",e.compareAt?e.settings.pricingCompareAtTypeFontSize:e.settings.pricingTypeFontSize,";color:",e.compareAt?e.settings.pricingCompareAtTypeFontColor:e.settings.pricingColor,";text-decoration:",e.compareAt?"line-through":"none",";font-weight:",e.compareAt?"normal":"bold",";;label:priceCSS;");return!1!==e.price||null!==e.price?(0,n.Y)("span",{ref:t,className:"swp-price wps-product-individual-price",css:s,"data-price":e.price},(0,n.Y)(o.A,{price:e.price})):null})),p=wp.element.memo(r)},
1"./npm-packages/@shopwp/components/src/products/product/template/index.jsx":(e,t,s)=>{s.r(t),s.d(t,{default:()=>u});var n=s("./npm-packages/@shopwp/components/node_modules/react-jsx-parser/dist/umd/react-jsx-parser.min.js"),o=s.n(n),r=s("./npm-packages/@shopwp/components/src/products/product/buy-button/index.jsx"),p=s("./npm-packages/@shopwp/components/src/products/product/title/index.jsx"),a=s("./npm-packages/@shopwp/components/src/products/product/pricing/index.jsx"),c=s("./npm-packages/@shopwp/components/src/products/product/description/index.jsx"),i=s("./npm-packages/@shopwp/components/src/products/product/images/index.jsx"),l=s("./npm-packages/@shopwp/components/src/reviews/index.jsx"),m=s("./npm-packages/@shopwp/components/node_modules/react-error-boundary/dist/react-error-boundary.module.js"),d=s("./npm-packages/@shopwp/components/src/error-fallback/index.jsx");const u=wp.element.memo((function(e){let t=e.htmlTemplateData,s=e.payload,n=e.settings;return React.createElement(m.tH,{FallbackComponent:d.A},React.createElement(o(),{components:{Reviews:l.default,ProductBuyButton:r.default,ProductTitle:p.default,ProductPricing:a.default,ProductDescription:c.default,ProductImages:i.default},bindings:{payload:s,settings:n},renderInWrapper:!1,showWarnings:!0,jsx:t,blacklistedTags:["script"]}))}))},
1"./npm-packages/@shopwp/components/src/products/product/title/index.jsx":(e,t,s)=>{s.r(t),s.d(t,{default:()=>m});var n=s("./npm-packages/@shopwp/components/node_modules/@emotion/react/dist/emotion-react.browser.esm.js"),o=s("./npm-packages/@shopwp/hooks/src/index.js"),r=s("./npm-packages/@shopwp/common/src/utils/index.jsx"),p=s("./npm-packages/@shopwp/common/src/settings/index.js"),a=s("./npm-packages/@shopwp/components/src/items/_state/settings/hooks.jsx"),c=s("./npm-packages/@shopwp/components/src/products/product/_state/hooks.jsx"),i=s("./npm-packages/@shopwp/components/src/link/index.jsx");function l(e){let t=e.classList;const s=(0,c.k)(),o="h".concat(shopwp.misc.isSingularProducts?"1":"2"),p=wp.hooks.applyFilters("product.titleText",s.payload.title,s.payload);return(0,n.Y)(React.Fragment,null,(0,n.Y)(r.W,{name:"before.productTitle",args:[s]}),(0,n.Y)(r.W,{name:"product.titleHtml",args:[s]},(0,n.Y)(o,{itemProp:"name",content:p,className:t},p)),(0,n.Y)(r.W,{name:"after.productTitle",args:[s]}))}const m=function(){const e=(0,a.s)(),t=(0,c.k)(),s=(0,n.AH)(";label:titleStylesWrapper;");return(0,o.WP)((0,n.Y)("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,css:s},(0,p.p5)(e)?(0,n.Y)(i.default,{type:"products",target:e.linkTarget,linkTo:e.linkTo,payload:t.payload},(0,n.Y)(l,{classList:"swp-product-title "+e.titleClassName})):(0,n.Y)(l,{classList:"swp-product-title "+e.titleClassName})),e.dropzoneProductTitle)}},
1"./npm-packages/@shopwp/components/src/reviews/_state/hooks.jsx":(e,t,s)=>{s.d(t,{M:()=>r,v:()=>o});var n=s("./npm-packages/@shopwp/components/src/reviews/_state/context.js");function o(){const e=wp.element.useContext(n.D);if(!e)throw new Error("useProductReviewsState must be used within the ProductReviewsProvider");return e}function r(){const e=wp.element.useContext(n.k);if(!e)throw new Error("useProductReviewsDispatch must be used within the ProductReviewsProvider");return e}},
1"./npm-packages/@shopwp/components/src/reviews/index.jsx":(e,t,s)=>{s.r(t),s.d(t,{default:()=>R});var n=s("./npm-packages/@shopwp/components/node_modules/@babel/runtime/helpers/esm/extends.js"),o=s("./npm-packages/@shopwp/components/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),r=s("./npm-packages/@shopwp/common/src/utils/index.jsx");const p=function(e,t){switch(t.type){case"SET_REVIEWS":return(0,r.vM)("reviews",t,e);case"SET_REVIEWS_TRUNCATED":return(0,r.vM)("reviewsTruncated",t,e);case"SET_REVIEWS_SHOWN":return(0,r.vM)("reviewsShown",t,e);case"SET_REVIEWS_BOTTOM_LINE":return(0,r.vM)("reviewsBottomLine",t,e);case"SET_PRODUCTS":return(0,r.vM)("products",t,e);case"SET_NOTICE":return(0,r.vM)("notice",t,e);case"SET_IS_WRITING_REVIEW":return(0,r.vM)("isWritingReview",t,e);case"SET_REVIEWS_PAYLOAD":return(0,r.vM)("payload",t,e);default:(0,r.O6)(t,"ProductReviews")}};var a=s("./npm-packages/@shopwp/components/src/reviews/_state/context.js");const c=function(e){const t=wp.element.useReducer(p,function(e){var t,s;const n=""!==shopwp.general.yotpoApiKey&&""!==shopwp.general.yotpoApiSecretKey&&""!==shopwp.general.yotpoUtoken,o=!n&&{type:"info",message:e.shopState.t.l.addApiKeys};return{reviews:!1,reviewsBottomLine:!1,reviewsTruncated:!1,reviewsShown:null!==(t=e.settings)&&void 0!==t&&t.reviewsShown?e.settings.reviewsShown:10,reviewsShownIncrement:null!==(s=e.settings)&&void 0!==s&&s.reviewsShownIncrement?e.settings.reviewsShownIncrement:10,settings:!(null==e||!e.settings)&&e.settings,element:!(null==e||!e.element)&&e.element,id:!(null==e||!e.id)&&e.id,payload:!!e.payload&&e.payload,notice:o,hasApiConnection:n,products:!1,isWritingReview:!1}}(e)),s=(0,o.A)(t,2),n=s[0],r=s[1];return React.createElement(a.D.Provider,{value:n},React.createElement(a.k.Provider,{value:r},e.children))};var i,l=s("./npm-packages/@shopwp/components/node_modules/@babel/runtime/regenerator/index.js"),m=s.n(l),d=s("./npm-packages/@shopwp/components/node_modules/@emotion/react/dist/emotion-react.browser.esm.js"),u=s("./npm-packages/@shopwp/api/src/internal/reviews/index.js"),w=s("./npm-packages/@shopwp/api/src/errors/index.js"),g=s("./npm-packages/@shopwp/components/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js"),h={name:"1b3s0nb-ReviewsSkeletonCSS",styles:"display:flex;flex-direction:column;max-width:300px;margin-top:-5px;margin-bottom:5px;label:ReviewsSkeletonCSS;"};const k=function(){const e=(0,d.i7)(i||(i=(0,g.A)(["\n 0% {\n opacity: 0.5;\n }\n \n 100% {\n opacity: 1;\n }\n "]))),t=h,s=(0,d.AH)("height:24px;border-radius:10px;animation:",e," 0.4s ease-out 0s alternate infinite none running;background:#eee;margin-bottom:15px;;label:ReviewsSkeletonCtaCSS;");return(0,d.Y)("div",{css:t},(0,d.Y)("div",{css:s}))};var f=s("./npm-packages/@shopwp/components/src/reviews/_state/hooks.jsx"),v=s("./npm-packages/@shopwp/hooks/src/index.js"),x=s("./npm-packages/@shopwp/components/src/notice/index.jsx");const y=function(e){let t=e.children;const s=wp.element,n=s.useEffect,p=(0,s.useState)(!0),a=(0,o.A)(p,2),c=a[0],i=a[1],l=(0,f.M)(),g=(0,f.v)(),h=(0,v.y3)("on.itemsLoad");function y(e){l({type:"SET_REVIEWS_TRUNCATED",payload:e.slice(0,g.reviewsShown)})}return n((function(){if(h){var e=h.filter((function(e){return e.node.id.includes(g.settings.productId.toString())}));e.length&&l({type:"SET_REVIEWS_PAYLOAD",payload:e[0].node})}}),[h]),n((function(){g.reviews&&y(g.reviews)}),[g.reviewsShown]),n((function(){var e,t,s,n;g.hasApiConnection&&shopwp.misc.hasYotpo?g.settings.productId?m().async((function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,m().awrap((0,r.to)((0,u.SF)({productId:g.settings.productId})));case 2:if(e=p.sent,t=(0,o.A)(e,2),s=t[0],n=t[1],!(0,w.FL)(s,n)){p.next=10;break}return i(!1),p.abrupt("return");case 10:if(!n.data.status||!n.data.status.error_type){p.next=14;break}return i(!1),l({type:"SET_NOTICE",payload:{type:"error",message:n.data.status.error_type+": "+n.data.status.message}}),p.abrupt("return");case 14:n.data.response&&(l({type:"SET_REVIEWS",payload:n.data.response.reviews}),l({type:"SET_REVIEWS_BOTTOM_LINE",payload:n.data.response.bottomline}),l({type:"SET_PRODUCTS",payload:n.data.response.products}),y(n.data.response.reviews)),i(!1);case 16:case"end":return p.stop()}}),null,null,null,Promise):function(){var e,t,s,n;m().async((function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,m().awrap((0,r.to)((0,u.hk)()));case 2:if(e=p.sent,t=(0,o.A)(e,2),s=t[0],n=t[1],!(0,w.FL)(s,n)){p.next=10;break}return i(!1),p.abrupt("return");case 10:if(!n.data.status||!n.data.status.error_type){p.next=14;break}return i(!1),l({type:"SET_NOTICE",payload:{type:"error",message:n.data.status.error_type+": "+n.data.status.message}}),p.abrupt("return");case 14:n.data.reviews&&(l({type:"SET_REVIEWS",payload:n.data.reviews}),y(n.data.reviews)),i(!1);case 16:case"end":return p.stop()}}),null,null,null,Promise)}():i(!1)}),[]),(0,d.Y)(React.Fragment,null,c?(0,d.Y)(k,null):g.notice?(0,d.Y)(x.default,{status:g.notice.type},g.notice.message):(0,d.Y)("div",{className:"shopwp-reviews-wrapper"},t))};var b=s("./npm-packages/@shopwp/components/src/shop/_state/hooks.js");const P=wp.element.lazy((function(){return s.e("ReviewsRating-public").then(s.bind(s,"./npm-packages/@shopwp/components/src/reviews/rating/index.jsx"))})),E=wp.element.lazy((function(){return s.e("ReviewsList-public").then(s.bind(s,"./npm-packages/@shopwp/components/src/reviews/list/index.jsx"))})),R=function(e){const t=(0,b.T)(),s=wp.element.Suspense;return React.createElement(c,(0,n.A)({shopState:t},e),React.createElement(y,null,React.createElement(s,{fallback:"Loading reviews ..."},shopwp.misc.hasYotpo&&e.settings.showReviews?(0,v.WP)(React.createElement(React.Fragment,null,e.settings.showRating?React.createElement(P,null):null,e.settings.showListing?React.createElement(E,null):null),e.element):null)))}},
1"./npm-packages/@shopwp/api/src/internal/reviews/index.js":(e,t,s)=>{s.d(t,{KP:()=>o,SF:()=>c,Vv:()=>r,hk:()=>p,yN:()=>a});var n=s("./npm-packages/@shopwp/api/src/internal/request.js");function o(e){return(0,n.bE)("yotpo/api",e)}function r(e){return(0,n.yH)("yotpo/api",e)}function p(){return(0,n.Jt)("yotpo/reviews")}function a(e){return(0,n.bE)("yotpo/reviews",e)}function c(e){return(0,n.bE)("yotpo/reviews/product",e)}},
1"./npm-packages/@shopwp/components/src/reviews/_state/context.js":(e,t,s)=>{s.d(t,{D:()=>n,k:()=>o});const n=wp.element.createContext(),o=wp.element.createContext()}
1}]);
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.