!function(){var e={3373:function(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,a(r)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=i(t,r));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.blocks,t=r(3373),n=r.n(t),o=window.wp.i18n,a=window.wp.element,i=window.wp.blockEditor,l=window.wp.keycodes,s=window.wp.components,u=(window.wp.data,window.wp.coreData,window.wp.htmlEntities,window.wp.compose);function c(e){let{attributes:t,setAttributes:r,context:n}=e;const{width:a}=t,i=(0,u.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}};return React.createElement(s.__experimentalToolsPanel,{label:(0,o.__)("Display","surecart"),resetAll:()=>r({width:void 0}),dropdownMenuProps:i},React.createElement(s.__experimentalToolsPanelItem,{label:(0,o.__)("Width","surecart"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>r({width:void 0}),__nextHasNoMarginBottom:!0},React.createElement(s.__experimentalToggleGroupControl,{label:(0,o.__)("Width","surecart"),value:a,onChange:e=>r({width:e}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0},[25,50,75,100].map((e=>React.createElement(s.__experimentalToggleGroupControlOption,{key:e,value:e,label:(0,o.sprintf)(/* translators: Percentage value. */ /* translators: Percentage value. */
(0,o.__)("%d%%","surecart"),e)}))))))}function p(){return p=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},p.apply(null,arguments)}var d=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"surecart/product-review-form-submit-button","title":"Review Form Submit Button","description":"Provide a submit button for the product review form.","version":"1.0.0","icon":"button","category":"surecart-product-page","example":{},"ancestor":["surecart/product-review-form"],"attributes":{"text":{"type":"string"},"width":{"type":"number","default":100}},"supports":{"interactivity":true,"anchor":true,"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"margin":["top","bottom"]},"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalSelector":".wp-block-button .wp-block-button__link","typography":{"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true},"reusable":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalStyle":{"variations":{"outline":{"border":{"color":"currentColor","width":"2px","style":"solid"},"color":{"text":"currentColor","gradient":"transparent none"}}}}},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"textdomain":"surecart","render":"file:./view.php","editorScript":"file:./index.js","editorStyle":["surecart-wp-button"],"style":["surecart-wp-buttons","surecart-wp-button","wp-block-button","surecart-spinner"],"viewScriptModule":["@surecart/product-review-form"]}');(0,e.registerBlockType)(d,{edit:e=>{let{attributes:t,setAttributes:r,className:s,context:u}=e;const{style:d,text:m,width:_}=t,w=(0,i.__experimentalUseBorderProps)(t),f=(0,i.__experimentalUseColorProps)(t),b=(0,i.__experimentalGetSpacingClassesAndStyles)(t),x=(0,i.__experimentalGetShadowClassesAndStyles)(t),y=(0,a.useRef)(),v=(0,a.useRef)(),h=(0,i.useBlockProps)({ref:y,onKeyDown:function(e){l.isKeyboardEvent.primary(e,"k")?startEditing(e):l.isKeyboardEvent.primaryShift(e,"k")&&(unlink(),v.current?.focus())}});return React.createElement(React.Fragment,null,React.createElement(i.InspectorControls,null,React.createElement(c,{attributes:t,setAttributes:r,context:u})),React.createElement("div",p({},h,{className:n()(h.className,{"wp-block-button":!0,"sc-block-button":!0,[`has-custom-width sc-block-button__width-${_}`]:_,"has-custom-font-size":h.style.fontSize})}),React.createElement(i.RichText,{"aria-label":(0,o.__)("Button text","surecart"),placeholder:(0,o.__)("Add text…","surecart"),ref:v,className:n()(s,"wp-block-button__link","sc-block-button__link",f.className,w.className,b.className,x.className,{"no-border-radius":0===d?.border?.radius},(0,i.__experimentalGetElementClassName)("button")),style:{...w.style,...b.style,...x.style,...f.style},value:m,onChange:e=>r({text:e}),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"]})))}})}()}();