!function(){"use strict";document.querySelectorAll(".wlop-saved-card-button button").forEach((function(e){e.addEventListener("click",(function(){var o=e.dataset.token;if(o){var t=document.querySelector("form.woocommerce-checkout, form#order_review");if(t){var n=t.querySelector("#payment_method_cawl-for-woocommerce");n&&(n.checked=!0,t.insertAdjacentHTML("beforeend",'<input type="hidden" name="wlop_token" value="'.concat(o,'">')),setTimeout((function(){t.querySelectorAll('input[name="wlop_token"]').forEach((function(e){return e.remove()}))}),0))}}}))})),jQuery(document.body).on("updated_checkout",(function(){var e=document.querySelector(".wlop-saved-card-buttons-wrapper");if(e){var o=null!==document.querySelector("#payment_method_cawl-for-woocommerce");e.style.display=o?"":"none"}}))}();