!function(){var t={1513:function(t){"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,o){for(var i,s,a=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))r.call(i,u)&&(a[u]=i[u]);if(e){s=e(i);for(var l=0;l<s.length;l++)n.call(i,s[l])&&(a[s[l]]=i[s[l]])}}return a}},3335:function(t,e,r){"use strict";r(1513);var n=r(1609),o=60103;if("function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};e.jsx=function(t,e,r){var n,i={},u=null,l=null;for(n in void 0!==r&&(u=""+r),void 0!==e.key&&(u=""+e.key),void 0!==e.ref&&(l=e.ref),e)a.call(e,n)&&!c.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===i[n]&&(i[n]=e[n]);return{$$typeof:o,type:t,key:u,ref:l,props:i,_owner:s.current}}},1085:function(t,e,r){"use strict";t.exports=r(3335)},1609:function(t){"use strict";t.exports=window.React},3373:function(t,e){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t="",e=0;e<arguments.length;e++){var r=arguments[e];r&&(t=s(t,i(r)))}return t}function i(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return o.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var r in t)n.call(t,r)&&t[r]&&(e=s(e,r));return e}function s(t,e){return e?t?t+" "+e:t+e:t}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t=window.wp.blocks,e=window.wp.primitives,n=r(1085),o=(0,n.jsx)(e.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(e.Path,{d:"M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z"})}),i=r(3373),s=r.n(i),a=window.wp.blockEditor,c=window.wp.data,u=window.wp.i18n;const l="surecart/product-buy-button",f=[l,"surecart/product-selected-price-ad-hoc-amount"];var p=JSON.parse('{"UU":"surecart/product-buy-buttons"}');(0,t.registerBlockType)(p.UU,{edit:t=>{let{attributes:e,className:r}=t;const{fontSize:n,layout:o,style:i}=e,p=(0,a.useBlockProps)({className:s()(r,{"wp-block-buttons":!0,"has-custom-font-size":n||i?.typography?.fontSize})}),y=(0,c.useSelect)((t=>{const e=t(a.store).getSettings().__experimentalPreferredStyleVariations;return e?.value?.[l]}),[]),d=(0,a.useInnerBlocksProps)(p,{allowedBlocks:f,template:[[l,{className:y&&`is-style-${y}`,text:(0,u.__)("Add To Cart","surecart"),add_to_cart:!0,width:100}],[l,{className:y?`is-style-${y}`:"is-style-outline",text:(0,u.__)("Buy Now","surecart"),add_to_cart:!1,width:100,style:"outline"}]],templateInsertUpdatesSelection:!0,orientation:o?.orientation??"horizontal"});return React.createElement("div",d)},save:function(t){let{attributes:e,className:r}=t;const{fontSize:n,style:o,contentJustification:i,orientation:c}=e,u=a.useBlockProps.save({className:s()(r,{"wp-block-buttons":!0,"sc-block-buttons":!0,"is-layout-flex":!0,"has-custom-font-size":n||o?.typography?.fontSize,[`is-content-justification-${i}`]:i,"is-vertical":"vertical"===c})}),l=a.useInnerBlocksProps.save(u);return React.createElement("div",l)},icon:o})}()}();