'use strict';(function(){const f={conf:{api:"https://checkout.radio357.pl"},go:(b,c,d)=>{b=f.conf.api+"/"+c+"/"+b+"/";"string"==typeof d&&(b+=d);window.location.href=b},call:(b,c,d,a=null)=>{const e=new XMLHttpRequest;b=f.conf.api+"/"+c+"/"+b+"/";"string"==typeof a&&(b+=a);e.open("GET",b,!0);e.onreadystatechange=function(g){4===this.readyState&&200==this.status&&(g=this.response,"string"==typeof g&&""!=g&&JSON.parse(g))};e.setRequestHeader("x-viewer",d);e.send()},init:()=>{const b=window.location.href.match(/(&|\?)checkout=([^&]+)/); if(b&&"undefined"!=typeof b[2]){document.documentElement.classList.add("r357checkout_"+b[2]);const c=decodeURIComponent((document.cookie.match(/(^|\s+|;)r357_pid=([^;]*)/i)||[""]).pop()),d=window.location.href.match(/(&|\?)_c=([^&]+)/),a=window.location.href.match(/(&|\?)_p=([^&]+)/);d&&"undefined"!=typeof d[2]&&a&&"undefined"!=typeof a[2]&&f.call(d[2],"patronite",c,"callback/?_r="+b[2]+"&_p="+a[2])}document.addEventListener("click",c=>{var d=c||window.event;c=d.target||d.srcElement;3===c.nodeType&& (c=c.parentNode);var a=c.closest("a");if(a&&(c=a.getAttribute("data-r357checkout"))&&"locked"!=a.getAttribute("data-r357state")){d.preventDefault();d=a.getAttribute("data-r357checkout-operator")||"patronite";a=[];var e=document.querySelector("input[data-r357checkout-quantity]");e&&"undefined"!=typeof e.value&&a.push("r357q="+e.value);(e=document.body.getAttribute("data-r357checkout-config"))&&a.push("r357c="+e);a=0