!function(){"use strict";var e,t={7005:function(e,t,r){var n=r(1609),o=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var n,i={},l=null,u=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,n)&&!c.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:u,props:i,_owner:s.current}}},9255:function(e,t,r){e.exports=r(7005)},6895:function(e,t,r){var n=window.wp.blocks,o=window.wp.primitives,a=r(9255),s=(0,a.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(o.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})}),c=window.wp.blockEditor,i=window.wp.i18n,l=r(1609),u=r.n(l);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(null,arguments)}function p(e){let{name:t,...r}=e;const[n,o]=(0,l.useState)(null),a=window?.scData?.plugin_url+"/dist/icon-assets",s=/^[a-zA-Z0-9_-]+$/.test(t);if((0,l.useEffect)((()=>{s&&fetch(`${a}/${t}.svg`).then((e=>e.text())).then((e=>{const t=(new DOMParser).parseFromString(e,"image/svg+xml"),r=t?.documentElement;"svg"===r?.tagName?.toLowerCase()&&o(r)})).catch(console.error)}),[t,s]),!n)return null;const c=n.cloneNode(!0),i={fill:"fill",stroke:"stroke",strokeWidth:"stroke-width",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeOpacity:"stroke-opacity",strokeMiterlimit:"stroke-miterlimit",fillOpacity:"fill-opacity",fillRule:"fill-rule"},p={},m={};Object.entries(r).forEach((e=>{let[t,r]=e;i[t]?p[i[t]]=r:m[t]=r})),Object.keys(p).length>0&&c.querySelectorAll("path, circle, rect, ellipse, line, polyline, polygon").forEach((e=>{Object.entries(p).forEach((t=>{let[r,n]=t;null!=n&&e.setAttribute(r,n)}))})),Object.entries(p).forEach((e=>{let[t,r]=e;null!=r&&c.setAttribute(t,r)})),Object.entries(m).forEach((e=>{let[t,r]=e;if(null!=r){const e="className"===t?"class":t;c.setAttribute(e,r)}}));const d={};for(const e of c.attributes)d["class"===e.name?"className":e.name]=e.value;return u().createElement("svg",f({},d,{dangerouslySetInnerHTML:{__html:c.innerHTML}}))}var m=JSON.parse('{"UU":"surecart/cart-line-item-quantity"}');(0,n.registerBlockType)(m.UU,{edit:e=>{let{context:{editable:t=!0}}=e;const r=(0,c.useBlockProps)({className:t?"sc-input-group sc-quantity-selector sc-input-group-sm":null});return t?React.createElement("div",r,React.createElement("div",{className:"sc-input-group-text sc-quantity-selector__decrease",role:"button",tabIndex:0,"aria-label":(0,i.__)("Decrease quantity by one.","surecart")},React.createElement(p,{name:"minus"})),React.createElement("input",{type:"number",className:"sc-form-control sc-quantity-selector__control",value:1,step:"1",autoComplete:"off",role:"spinbutton",readOnly:!0}),React.createElement("div",{className:"sc-input-group-text sc-quantity-selector__increase",role:"button",tabIndex:0,"aria-label":(0,i.__)("Increase quantity by one.","surecart")},React.createElement(p,{name:"plus"}))):React.createElement("div",r,(0,i.sprintf)((0,i.__)("Qty: %d","surecart"),1))},icon:s})},1609:function(e){e.exports=window.React}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=function(t,r,o,a){if(!r){var s=1/0;for(u=0;u<e.length;u++){r=e[u][0],o=e[u][1],a=e[u][2];for(var c=!0,i=0;i<r.length;i++)(!1&a||s>=a)&&Object.keys(n.O).every((function(e){return n.O[e](r[i])}))?r.splice(i--,1):(c=!1,a<s&&(s=a));if(c){e.splice(u--,1);var l=o();void 0!==l&&(t=l)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[r,o,a]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={9782:0,9786:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var o,a,s=r[0],c=r[1],i=r[2],l=0;if(s.some((function(t){return 0!==e[t]}))){for(o in c)n.o(c,o)&&(n.m[o]=c[o]);if(i)var u=i(n)}for(t&&t(r);l<s.length;l++)a=s[l],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(u)},r=self.webpackChunk_surecart_blocks_next=self.webpackChunk_surecart_blocks_next||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var o=n.O(void 0,[9786],(function(){return n(6895)}));o=n.O(o)}();