{"id":20,"date":"2025-02-03T21:52:58","date_gmt":"2025-02-03T21:52:58","guid":{"rendered":"https:\/\/lukosvision.cl\/?page_id=20"},"modified":"2025-04-11T13:49:48","modified_gmt":"2025-04-11T13:49:48","slug":"regiones","status":"publish","type":"page","link":"https:\/\/agorechi.cl\/index.php\/regiones\/","title":{"rendered":"REGIONES"},"content":{"rendered":"\n<div class=\"wp-block-uagb-container uagb-block-18b7bffe alignfull uagb-is-root-container\"><div class=\"uagb-container-inner-blocks-wrap\">\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-50ced779 wp-block-group-is-layout-flex\" style=\"margin-top:0;margin-bottom:0\">\n<div class=\"wp-block-uagb-advanced-heading uagb-block-47785e45\"><h2 class=\"uagb-heading-text\">Nuestros gobiernos regionales en Chile<\/h2><\/div>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Revisa los gobiernos regionales de Chile. Presiona la regi\u00f3n o pasa el mouse sobre la regi\u00f3n para obtener la informaci\u00f3n del gobierno regional.<\/p>\n<\/div>\n\n\n\n<div id=\"map-container\" style=\"position: relative;width: 100%;display:flex;justify-content:center;\"\n  onclick=\"hideTooltip(this)\">\n  <svg id=\"map\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"1200\" height=\"830\" viewBox=\"0 0 283 830\" fill=\"none\">\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de Arica y Parinacota\"\n      cx=\"183\" cy=\"14\" r=\"14\" fill=\"#8E805F\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de Tarapac\u00e1\" cx=\"192\"\n      cy=\"75\" r=\"18\" fill=\"#D2815B\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de Antofagasta\"\n      cx=\"229\" cy=\"126\" r=\"24\" fill=\"#E0A449\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de Atacama\" cx=\"184\"\n      cy=\"163\" r=\"18\" fill=\"#A96025\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de Coquimbo\"\n      cx=\"187.5\" cy=\"219\" r=\"14.5\" fill=\"#595331\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de Valpara\u00edso\"\n      cx=\"8.5\" cy=\"291.5\" r=\"8.5\" fill=\"#FFB43F\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\"\n      id=\"Gobierno Regional Metropolitano de Santiago\" cx=\"201\" cy=\"261.5\" r=\"13\" fill=\"#68A5A3\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de O'Higgins\"\n      cx=\"185.5\" cy=\"304\" r=\"13\" fill=\"#6C7E21\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional del Maule\" cx=\"185.5\"\n      cy=\"363\" r=\"24\" fill=\"#93A21F\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de \u00d1uble\" cx=\"187.5\"\n      cy=\"430.5\" r=\"18.5\" fill=\"#697020\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional del Biob\u00edo\" cx=\"194\"\n      cy=\"487.5\" r=\"11\" fill=\"#34645C\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de La Araucan\u00eda\"\n      cx=\"134.5\" cy=\"520.5\" r=\"20.5\" fill=\"#335B24\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de Los R\u00edos\" cx=\"188\"\n      cy=\"550\" r=\"18\" fill=\"#7474A5\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de Los Lagos\" cx=\"190\"\n      cy=\"628.5\" r=\"17.5\" fill=\"#749AAB\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\" id=\"Gobierno Regional de Ays\u00e9n\" cx=\"174.5\"\n      cy=\"699.5\" r=\"17.5\" fill=\"#14759B\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\"\n      id=\"Gobierno Regional de Magallanes y de la Ant\u00e1rtica Chilena\" cx=\"193\" cy=\"764\" r=\"24\" fill=\"#2B8095\" \/>\n    <circle onmouseover=\"showTooltip(this)\" onmouseout=\"changeStroke(this)\"\n      id=\"Gobierno Regional de Magallanes y de la Ant\u00e1rtica Chilena\" cx=\"252.5\" cy=\"799\" r=\"30.5\" fill=\"#76B9FF\" \/>\n  <\/svg>\n  <div id=\"tooltip-container\" class=\"tooltip-container\" style=\"display: none;\">\n    <div class=\"header\">\n      <button onclick=\"hideTooltip(this)\">\n        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n          stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n          class=\"lucide lucide-x-icon lucide-x\">\n          <path d=\"M18 6 6 18\" \/>\n          <path d=\"m6 6 12 12\" \/>\n        <\/svg>\n      <\/button>\n    <\/div>\n    <div class=\"content\">\n    <\/div>\n  <\/div>\n  <script>\n    function errorImage(target) {\n      target.style.display = \"none\"\n    }\n\n    async function showTooltip(event) {\n      var windowsSize = window.innerWidth;\n      var title = event.getAttribute(\"id\")\n        .toLowerCase()\n        .replaceAll(\" \", \"-\").replace(\/\u00e1\/g, 'a')\n        .replace(\/\u00e9\/g, 'e')\n        .replace(\/\u00ed\/g, 'i')\n        .replace(\/\u00f3\/g, 'o')\n        .replace(\/\u00fa\/g, 'u')\n        .replace(\/\u00c1\/g, 'A')\n        .replace(\/\u00c9\/g, 'E')\n        .replace(\/\u00cd\/g, 'I')\n        .replace(\/\u00d3\/g, 'O')\n        .replace(\/\u00da\/g, 'U')\n        .replace(\/\u00fc\/g, 'u')\n        .replace(\/\u00dc\/g, 'U')\n        .replace(\/\u00f1\/g, 'n')\n        .replace(\/\u00d1\/g, 'N');\n\n      var tooltip = document.getElementById(\"tooltip-container\");\n      var tooltipContent = tooltip.querySelector(\".content\");\n      var c = event;\n\n      try {\n        var text = document.querySelector(\"text[id='\" + c.id + \"']\");\n        text.setAttributeNS(null, \"stroke\", \"#673ab77a\");\n      } catch (error) {\n        \n      }\n\n      c.setAttributeNS(null, \"stroke-width\", \"2px\");\n      c.setAttributeNS(null, \"stroke\", \"#673ab77a\");\n\n      tooltip.style.display = \"flex\"\n      tooltipContent.innerHTML = \"<div style='padding:20px 30px'><p>Cargando...<\/p><\/div>\"\n\n      tooltip.style.top = (parseInt(event.getAttribute(\"cy\")) - 100) + \"px\";\n\n\n      var data = await fetch(\"https:\/\/agorechi.cl\/index.php\/wp-json\/wp\/v2\/pages?slug=\" + title);\n      var response = await data.json();\n\n      if (windowsSize < 768) {\n        \/\/ Mobile view - center the tooltip\n        tooltip.style.left = (windowsSize \/ 2 - 150) + \"px\";\n      } else {\n        if ((Math.floor(Math.random() * 4)) % 2 === 0) {\n          tooltip.style.left = \"calc(0px + 2%)\";\n          tooltip.style.right = \"auto\";\n        } else {\n          tooltip.style.right = \"calc(0px + 2%)\";\n          tooltip.style.left = \"auto\";\n        }\n      }\n\n      if (response[0]) {\n        var dataPage = response[0].content.rendered;\n\n        tooltipContent.innerHTML = dataPage\n        tooltip.style.display = \"flex\"\n      } else {\n        tooltip.style.display = \"none\"\n      }\n    }\n\n    function hideTooltip(event) {\n      var tooltip = document.getElementById(\"tooltip-container\");\n      tooltip.style.display = \"none\";\n      \n      var cs = document.querySelectorAll(\"circle\");\n      cs.forEach(c => c.setAttributeNS(null, \"stroke\", \"none\"));\n\n      var texts = document.querySelectorAll(\"#map-container text\");\n      texts.forEach(c => c.setAttributeNS(null, \"stroke\", \"#737373\"));\n    }\n\n    function changeStroke(event) {\n      var c = event;\n      c.setAttributeNS(null, \"stroke\", \"none\");\n    }\n\n    function generateNames() {\n      const circles = document.querySelectorAll(\"circle\");\n      const svgMap = document.querySelector(\"svg#map\");\n\n      circles.forEach((c, index) => {\n        const newText = document.createElementNS('http:\/\/www.w3.org\/2000\/svg', \"text\");\n\n        \/\/ Posicionamiento\n        let x = (index + 1) % 2 === 0 ? c.getAttribute(\"cx\") * 1.5 : -c.getAttribute(\"cx\");\n        if (c.id === \"Gobierno Regional de Valpara\u00edso\") x = -260;\n        if (c.id === \"Gobierno Regional Metropolitano de Santiago\") x = c.getAttribute(\"cx\") * 1.2;\n\n        newText.setAttributeNS(null, \"x\", x);\n        newText.setAttributeNS(null, \"y\", c.getAttribute(\"cy\"));\n        newText.setAttributeNS(null, \"fill\", \"#737373\");\n        newText.setAttributeNS(null, \"stroke\", \"#737373\");\n        newText.setAttribute(\"id\", c.id);\n\n        const textNode = document.createTextNode(c.id);\n        newText.appendChild(textNode);\n        svgMap.appendChild(newText);\n\n        \/\/ Aqu\u00ed est\u00e1 la magia: delegamos el mouseover al c\u00edrculo\n        newText.addEventListener(\"mouseover\", () => {\n          newText.setAttributeNS(null, \"stroke\", \"#673ab77a\");\n\n          \/\/ const mouseOverEvent = new Event(\"mouseover\", { bubbles: true });\n          \/\/ c.dispatchEvent(mouseOverEvent);\n        });\n\n        newText.addEventListener(\"mouseleave\", () => {\n          newText.setAttributeNS(null, \"stroke\", \"#737373\");\n        })\n      });\n    }\n\n    document.addEventListener(\"DOMContentLoaded\", function (event) {\n      generateNames()\n    });\n  <\/script>\n<\/div>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nuestros gobiernos regionales en Chile Revisa los gobiernos regionales de Chile. Presiona la regi\u00f3n o pasa el mouse sobre la regi\u00f3n para obtener la informaci\u00f3n del gobierno regional.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"class_list":["post-20","page","type-page","status-publish","hentry"],"acf":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/agorechi.cl\/index.php\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"Nuestros gobiernos regionales en Chile Revisa los gobiernos regionales de Chile. Presiona la regi\u00f3n o pasa el mouse sobre la regi\u00f3n para obtener la informaci\u00f3n del gobierno regional.","_links":{"self":[{"href":"https:\/\/agorechi.cl\/index.php\/wp-json\/wp\/v2\/pages\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agorechi.cl\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/agorechi.cl\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/agorechi.cl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agorechi.cl\/index.php\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":108,"href":"https:\/\/agorechi.cl\/index.php\/wp-json\/wp\/v2\/pages\/20\/revisions"}],"predecessor-version":[{"id":996,"href":"https:\/\/agorechi.cl\/index.php\/wp-json\/wp\/v2\/pages\/20\/revisions\/996"}],"wp:attachment":[{"href":"https:\/\/agorechi.cl\/index.php\/wp-json\/wp\/v2\/media?parent=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}