(()=>{"use strict";var e={20(e,o,t){var n=t(609),r=Symbol.for("react.element"),c=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(e,o,t){var n,s={},p=null,a=null;for(n in void 0!==t&&(p=""+t),void 0!==o.key&&(p=""+o.key),void 0!==o.ref&&(a=o.ref),o)c.call(o,n)&&!i.hasOwnProperty(n)&&(s[n]=o[n]);if(e&&e.defaultProps)for(n in o=e.defaultProps)void 0===s[n]&&(s[n]=o[n]);return{$$typeof:r,type:e,key:p,ref:a,props:s,_owner:u.current}}o.jsx=s,o.jsxs=s},609(e){e.exports=window.React},848(e,o,t){e.exports=t(20)}},o={};const t=window.wp.plugins,n=window.wp.element,r=window.wp.data,c=window.wc.wcBlocksData;var u=function t(n){var r=o[n];if(void 0!==r)return r.exports;var c=o[n]={exports:{}};return e[n](c,c.exports,t),c.exports}(848);(0,t.registerPlugin)("checkout-banner",{render:()=>{const[e,o]=(0,n.useState)(!1),t=(0,n.useRef)(null),i=(0,n.useRef)(null),[s,p]=(0,n.useState)(!0),[a,l]=(0,n.useState)(!1),d=(0,n.useRef)(null),f=(e="component")=>{if(s&&"component"===e)return void p(!1);const t=document.querySelector("#koin-popup-about");t&&(t.parentElement.style.display="block",o(!0))},k=()=>{const e=document.querySelector("#koin-popup-about");e&&(e.parentElement.style.display="none",o(!1))},w=(0,r.useSelect)(e=>e(c.PAYMENT_STORE_KEY).getActivePaymentMethod());return(0,n.useEffect)(()=>{document.addEventListener("koinOpenPopup",async()=>{f("click")})},[]),(0,n.useEffect)(()=>{if(!a)return d.current=w,void l(!0);"wc-koin-billet"===w&&"wc-koin-billet"!==d.current&&f(),d.current=w},[w,a]),(0,n.useEffect)(()=>{const e=e=>{"koin-popup-about"===e.target.id&&k()},o=document.querySelector("#koin-popup-about");return o&&o.addEventListener("click",e),()=>{o&&o.removeEventListener("click",e)}},[]),(0,u.jsx)("div",{ref:t,id:"koin-popup-about",className:"koin-popup-about "+(e?"koin-popup-about-active":""),children:(0,u.jsxs)("div",{ref:i,className:"koin-popup-about-content",children:[(0,u.jsx)("i",{id:"koin-close-popup",className:"close",onClick:k,children:"×"}),(0,u.jsx)("koin-checkout-banner",{})]})})},scope:"woocommerce-checkout"})})();