!function(){var t,n={352:function(t,n,e){"use strict";var r=window.wp.blocks;function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,n,e){return(n=function(t){var n=function(t){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var e=n.call(t,"string");if("object"!=o(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var a=e(395),u=e.n(a),c=window.wp.i18n,l=window.wp.element,f=window.wp.blockEditor,p=window.wp.components,s=window.ReactJSXRuntime;function y(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,r)}return e}function b(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?y(Object(e),!0).forEach(function(n){i(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):y(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}var v=JSON.parse('{"UU":"knit-pay/payment-button"}');(0,r.registerBlockType)(v.UU,{edit:function(t){var n,e=t.attributes,r=t.setAttributes,o=t.className,a=(t.isSelected,t.onReplace,t.mergeBlocks,(0,f.__experimentalUseColorProps)(e)),y=(0,l.useRef)(),v=e.textAlign,d=(e.linkTarget,e.placeholder,e.rel,e.style),g=e.text;return e.url,e.width,(0,s.jsxs)("div",b(b({},(0,f.useBlockProps)()),{},{children:[(0,s.jsx)(f.RichText,{ref:y,"aria-label":(0,c.__)("Button text"),placeholder:(0,c.__)("Add text"),value:g,onChange:function(t){r({text:t.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:u()(o,"wp-block-button__link",a.className,i(i({},"has-text-align-".concat(v),v),"no-border-radius",0===(null==d||null===(n=d.border)||void 0===n?void 0:n.radius)),(0,f.__experimentalGetElementClassName)("button")),identifier:"text"}),(0,s.jsxs)(f.InspectorControls,{children:[(0,s.jsx)(p.TextControl,{label:(0,c.__)("Payment Description","knit-pay-lang"),value:e.payment_description,onChange:function(t){return r({payment_description:t})},type:"text"}),(0,s.jsx)(p.TextControl,{label:(0,c.__)("Amount","knit-pay-lang"),value:e.amount,onChange:function(t){return r({amount:t})},type:"number"}),(0,s.jsx)(p.SelectControl,{label:(0,c.__)("Currency","knit-pay-lang"),onChange:function(t){return r({currency:t})},options:window.knit_pay.currencies,value:e.currency}),(0,s.jsx)(p.SelectControl,{label:(0,c.__)("Configuration","knit-pay-lang"),onChange:function(t){return r({config_id:t})},options:window.knit_pay.configs,value:e.config_id,help:'Configurations can be created in Knit Pay gateway configurations page at "Knit Pay >> Configurations"'})]})]}))}})},395:function(t,n){var e;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t="",n=0;n<arguments.length;n++){var e=arguments[n];e&&(t=a(t,i(e)))}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 n="";for(var e in t)r.call(t,e)&&t[e]&&(n=a(n,e));return n}function a(t,n){return n?t?t+" "+n:t+n:t}t.exports?(o.default=o,t.exports=o):void 0===(e=function(){return o}.apply(n,[]))||(t.exports=e)}()}},e={};function r(t){var o=e[t];if(void 0!==o)return o.exports;var i=e[t]={exports:{}};return n[t](i,i.exports,r),i.exports}r.m=n,t=[],r.O=function(n,e,o,i){if(!e){var a=1/0;for(f=0;f<t.length;f++){e=t[f][0],o=t[f][1],i=t[f][2];for(var u=!0,c=0;c<e.length;c++)(!1&i||a>=i)&&Object.keys(r.O).every(function(t){return r.O[t](e[c])})?e.splice(c--,1):(u=!1,i<a&&(a=i));if(u){t.splice(f--,1);var l=o();void 0!==l&&(n=l)}}return n}i=i||0;for(var f=t.length;f>0&&t[f-1][2]>i;f--)t[f]=t[f-1];t[f]=[e,o,i]},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,{a:n}),n},r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},function(){var t={57:0,350:0};r.O.j=function(n){return 0===t[n]};var n=function(n,e){var o,i,a=e[0],u=e[1],c=e[2],l=0;if(a.some(function(n){return 0!==t[n]})){for(o in u)r.o(u,o)&&(r.m[o]=u[o]);if(c)var f=c(r)}for(n&&n(e);l<a.length;l++)i=a[l],r.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return r.O(f)},e=self.webpackChunkknit_pay_payment_button=self.webpackChunkknit_pay_payment_button||[];e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))}();var o=r.O(void 0,[350],function(){return r(352)});o=r.O(o)}();