!function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,r){return(n=function(t){var n=function(t){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var o=window.React,a=window.wp.i18n,i=window.wc.wcBlocksRegistry,c=window.wp.htmlEntities,l=window.wc.wcSettings,u=window.wp.hooks;function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?f(Object(r),!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}worldlineGateways.forEach((function(e){var t=(0,l.getSetting)("".concat(e,"_data"),{}),n="".concat(e,"_checkout_fields"),f="".concat(e,"_saved_token_fields"),y="".concat(e,"_payment_method_icons"),m=(0,a.__)("Worldline Payment Gateway","worldline-payment-gateway"),p=(0,c.decodeEntities)(t.title)||m,b=function(e){var a=r((0,o.useState)([]),2),i=a[0],l=a[1];return(0,o.useEffect)((function(){l(u.defaultHooks.applyFilters(n,[]))}),[]),Array.isArray(i)&&i.length?(0,o.createElement)(o.Fragment,null,i.map((function(t){return(0,o.createElement)(t,s({},e))}))):(0,o.createElement)((function(){return(0,c.decodeEntities)(t.description||"")}),null)},d={name:e,label:(0,o.createElement)((function(e){var n=e.components,r=n.PaymentMethodLabel,a=n.PaymentMethodIcons;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(r,{text:p}),(0,o.createElement)(a,{icons:u.defaultHooks.applyFilters(y,t.icons)}))}),null),content:(0,o.createElement)(b,null),edit:(0,o.createElement)(b,null),savedTokenComponent:(0,o.createElement)((function(e){var t=r((0,o.useState)([]),2),n=t[0],a=t[1];return(0,o.useEffect)((function(){a(u.defaultHooks.applyFilters(f,[]))}),[]),Array.isArray(n)&&n.length?(0,o.createElement)(o.Fragment,null,n.map((function(t){return(0,o.createElement)(t,s({},e))}))):null}),null),icons:t.icons,canMakePayment:function(){return!0},ariaLabel:p,supports:{features:t.supports}};t.placeOrderButtonLabel&&(d.placeOrderButtonLabel=t.placeOrderButtonLabel),(0,i.registerPaymentMethod)(d)}))}();