(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[83,77],{20:function(t,o,n){"use strict";n.d(o,"a",(function(){return c})),n.d(o,"b",(function(){return r}));var e=n(38);const c=t=>!Object(e.a)(t)&&t instanceof Object&&t.constructor===Object;function r(t,o){return c(t)&&o in t}},286:function(t,o,n){"use strict";n.d(o,"a",(function(){return e}));var e=function(){return e=Object.assign||function(t){for(var o,n=1,e=arguments.length;n<e;n++)for(var c in o=arguments[n])Object.prototype.hasOwnProperty.call(o,c)&&(t[c]=o[c]);return t},e.apply(this,arguments)};Object.create,Object.create},287:function(t,o,n){"use strict";function e(t){return t.toLowerCase()}n.d(o,"a",(function(){return i}));var c=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],r=/[^A-Z0-9]+/gi;function i(t,o){void 0===o&&(o={});for(var n=o.splitRegexp,i=void 0===n?c:n,s=o.stripRegexp,a=void 0===s?r:s,u=o.transform,d=void 0===u?e:u,f=o.delimiter,b=void 0===f?" ":f,k=l(l(t,i,"$1\0$2"),a,"\0"),p=0,v=k.length;"\0"===k.charAt(p);)p++;for(;"\0"===k.charAt(v-1);)v--;return k.slice(p,v).split("\0").map(d).join(b)}function l(t,o,n){return o instanceof RegExp?t.replace(o,n):o.reduce((function(t,o){return t.replace(o,n)}),t)}},29:function(t,o,n){"use strict";n.d(o,"a",(function(){return e}));const e=t=>"string"==typeof t},290:function(t,o,n){"use strict";n.d(o,"a",(function(){return r}));var e=n(286),c=n(287);function r(t,o){return void 0===o&&(o={}),function(t,o){return void 0===o&&(o={}),Object(c.a)(t,Object(e.a)({delimiter:"."},o))}(t,Object(e.a)({delimiter:"-"},o))}},291:function(t,o,n){"use strict";n.d(o,"a",(function(){return d}));var e=n(4),c=n.n(e),r=n(20),i=n(29),l=n(290),s=n(132);function a(t={}){const o={};return Object(s.getCSSRules)(t,{selector:""}).forEach((t=>{o[t.key]=t.value})),o}function u(t,o){return t&&o?`has-${Object(l.a)(o)}-${t}`:""}const d=t=>{const o=(t=>{const o=Object(r.a)(t)?t:{style:{}};let n=o.style;return Object(i.a)(n)&&(n=JSON.parse(n)||{}),Object(r.a)(n)||(n={}),{...o,style:n}})(t),n=function(t){var o,n,e,i,l,s,d;const{backgroundColor:f,textColor:b,gradient:k,style:p}=t,v=u("background-color",f),g=u("color",b),m=function(t){if(t)return`has-${t}-gradient-background`}(k),y=m||(null==p||null===(o=p.color)||void 0===o?void 0:o.gradient);return{className:c()(g,m,{[v]:!y&&!!v,"has-text-color":b||(null==p||null===(n=p.color)||void 0===n?void 0:n.text),"has-background":f||(null==p||null===(e=p.color)||void 0===e?void 0:e.background)||k||(null==p||null===(i=p.color)||void 0===i?void 0:i.gradient),"has-link-color":Object(r.a)(null==p||null===(l=p.elements)||void 0===l?void 0:l.link)?null==p||null===(s=p.elements)||void 0===s||null===(d=s.link)||void 0===d?void 0:d.color:void 0}),style:a({color:(null==p?void 0:p.color)||{}})}}(o),e=function(t){var o;const n=(null===(o=t.style)||void 0===o?void 0:o.border)||{};return{className:function(t){var o;const{borderColor:n,style:e}=t,r=n?u("border-color",n):"";return c()({"has-border-color":!!n||!(null==e||null===(o=e.border)||void 0===o||!o.color),[r]:!!r})}(t),style:a({border:n})}}(o),l=function(t){var o;return{className:void 0,style:a({spacing:(null===(o=t.style)||void 0===o?void 0:o.spacing)||{}})}}(o),s=(t=>{const o=Object(r.a)(t.style.typography)?t.style.typography:{},n=Object(i.a)(o.fontFamily)?o.fontFamily:"";return{className:t.fontFamily?`has-${t.fontFamily}-font-family`:n,style:{fontSize:t.fontSize?`var(--wp--preset--font-size--${t.fontSize})`:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight,letterSpacing:o.letterSpacing,lineHeight:o.lineHeight,textDecoration:o.textDecoration,textTransform:o.textTransform}}})(o);return{className:c()(s.className,n.className,e.className,l.className),style:{...s.style,...n.style,...e.style,...l.style}}}},38:function(t,o,n){"use strict";n.d(o,"a",(function(){return e}));const e=t=>null===t},430:function(t,o){},470:function(t,o,n){"use strict";n.r(o),n.d(o,"Block",(function(){return u}));var e=n(0),c=n(1),r=n(4),i=n.n(r),l=n(60),s=n(291),a=n(145);n(430);const u=t=>{const{className:o}=t,n=Object(s.a)(t),{parentClassName:r}=Object(l.useInnerBlockLayoutContext)(),{product:a}=Object(l.useProductDataContext)();if(!a.id)return null;const u=!!a.is_in_stock,d=a.low_stock_remaining,f=a.is_on_backorder;return Object(e.createElement)("div",{className:i()(o,{[`${r}__stock-indicator`]:r,"wc-block-components-product-stock-indicator--in-stock":u,"wc-block-components-product-stock-indicator--out-of-stock":!u,"wc-block-components-product-stock-indicator--low-stock":!!d,"wc-block-components-product-stock-indicator--available-on-backorder":!!f,...t.isDescendantOfAllProducts&&{[n.className]:n.className,"wc-block-components-product-stock-indicator wp-block-woocommerce-product-stock-indicator":!0}}),...t.isDescendantOfAllProducts&&{style:n.style}},(({isInStock:t=!1,isLowStock:o=!1,lowStockAmount:n=null,isOnBackorder:e=!1})=>o&&null!==n?Object(c.sprintf)(/* translators: %d stock amount (number of items in stock for product) */
Object(c.__)("%d left in stock","woocommerce"),n):e?Object(c.__)("Available on backorder","woocommerce"):t?Object(c.__)("In stock","woocommerce"):Object(c.__)("Out of stock","woocommerce"))({isInStock:u,isLowStock:!!d,lowStockAmount:d,isOnBackorder:f}))};o.default=Object(a.withProductDataContext)(u)}}]);