(()=>{"use strict";var e={20:(e,t,n)=>{var o=n(609),r=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var o,c={},d=null,l=null;for(o in void 0!==n&&(d=""+n),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(l=t.ref),t)i.call(t,o)&&!s.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:r,type:e,key:d,ref:l,props:c,_owner:a.current}}t.jsx=c,t.jsxs=c},609:e=>{e.exports=window.React},848:(e,t,n)=>{e.exports=n(20)}},t={};const n=window.wc.wcBlocksRegistry,o=window.wp.htmlEntities,r=window.wc.wcSettings;var i=function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(848);const a=(0,r.getSetting)("conekta_pay_by_bank_data",{}),s=(0,o.decodeEntities)(a.title),c=()=>(0,o.decodeEntities)(a.description),d=e=>{const{PaymentMethodLabel:t}=e.components,n=()=>(0,i.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,i.jsx)("img",{src:"https://assets.conekta.com/cpanel/statics/assets/brands/logos/bbva.svg",alt:"bank",style:{marginLeft:"8px",width:"32px",height:"auto"}})});return(0,i.jsxs)("div",{style:{display:"flex",width:"99%",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsx)(t,{text:s}),(0,i.jsx)(n,{})]})},l={name:a.name,label:(0,i.jsx)(d,{}),content:(0,i.jsx)(c,{}),edit:(0,i.jsx)(c,{}),canMakePayment:()=>a.is_enabled||!1,ariaLabel:s,supports:{},icons:[]};if((0,n.registerPaymentMethod)(l),"undefined"!=typeof window){const p=["/order-received/","/checkout/order-received/","/thank-you/"],u=["bankapp://","intent://"];function f(e){try{if(/^[a-zA-Z][a-zA-Z0-9+\-.]*:/.test(e)){for(const t of u)if(e.startsWith(t))return!0;const t=new URL(e,window.location.origin);return("https:"===t.protocol||"http:"===t.protocol)&&t.origin===window.location.origin&&p.some((e=>t.pathname.startsWith(e)))}return p.some((t=>e.startsWith(t)))}catch(e){return!1}}const w=()=>{const e=new URLSearchParams(window.location.search),t=e.get("redirect_url"),n=e.get("deep_link"),o=e.get("auto_redirect");if((t||n)&&"1"===o){const o=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),r=o?n:t;if(r){const t=decodeURIComponent(r);if(!f(t))return void console.warn("Blocked untrusted redirect URL:",t);if(o)try{const e=window.open(t,"_blank");if(!e||e.closed||void 0===e.closed){const e=document.createElement("a");e.href=t,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}}catch(e){const n=document.createElement("a");n.href=t,n.target="_blank",n.rel="noopener noreferrer",document.body.appendChild(n),n.click(),document.body.removeChild(n)}else window.open(t,"_blank","noopener,noreferrer");["redirect_url","deep_link","auto_redirect"].forEach((t=>e.delete(t)));const n=`${window.location.pathname}${e.toString()?`?${e.toString()}`:""}`;window.history.replaceState({},document.title,n)}}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",w):w()}})();