PageSourceSearch

https://cdn.eltiempo.es/dist/js/modules-forecastmap-Index.4a0dbc05b5a47e1b.js

js eltiempo.es collected 2026-09-24 08:37:42 UTC 17,921 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkeltiempo=self.webpackChunkeltiempo||[]).push([[6805],{5763(t,e,a){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function o(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}a.r(e),a.d(e,{Forecastmap:()=>r});var r=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"Init",value:function(t,e){var a=function(){var t=document.mapConf,e=null,a=null;jQuery.ajax({type:"GET",url:t.route,dataType:"script",cache:!0,success:function(n,i,o){function r(t,e,a,n,i,o,r){var p="http://www.w3.org/2000/svg",u=n.split(" "),m=document.createElementNS(p,"tspan"),c=l(e),s=document.createTextNode(u[0]),f=parseFloat(c.attr("x")),d=parseFloat(c.attr("y"));m.setAttributeNS(null,"x",f),m.setAttributeNS(null,"y",d),m.setAttributeNS(null,"class","et-tooltip"),null!=c.attr("orig-temp")&&m.setAttributeNS(null,"data-temperature",c.attr("orig-temp")),m.appendChild(s),a.appendChild(m);for(var h=!0,y=0,v=1;v<u.length;v++){var g,w=m.firstChild.data.length;m.firstChild.data+=" "+u[v],m.getComputedTextLength()>o&&(m.firstChild.data=m.firstChild.data.slice(0,w),f+(g=m.getComputedTextLength())>
1r&&(f-=f+g-r,1==h&&(y+=15),m.setAttributeNS(null,"x",f),m.setAttributeNS(null,"y",d+y)),d+=12,(m=document.createElementNS(p,"tspan")).setAttributeNS(null,"x",f),m.setAttributeNS(null,"y",d+y),m.setAttributeNS(null,"class","et-tooltip"),null!=c.attr("orig-temp")&&m.setAttributeNS(null,"data-temperature",c.attr("orig-temp")),s=document.createTextNode(u[v]),m.appendChild(s),a.appendChild(m),h=!1)}1==h&&f+(g=m.getComputedTextLength())>r&&(f-=f+g-r,y+=15,m.setAttributeNS(null,"x",f),m.setAttributeNS(null,"y",d+y))}jvm.Map.prototype.addTooltipGroup=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","g");this.toolTipGroup=l(t),this.toolTipGroup.attr("id","toolTipGroup"),this.container.find("svg").append(this.toolTipGroup)},jvm.Map.prototype.addTemperatureGroup=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","g");this.toolTipGroup=l(t),this.toolTipGroup.attr("id","temperaturelTipGroup"),this.container.find("svg").append(this.toolTipGroup)},jvm.Map.prototype.xoffset=-20,jvm.Map.prototype.yoffset=24,jvm.Map.prototype.xtempoffset=16,jvm.Map.prototype.ytempoffset=12,jvm.Map.prototype.saveCities=function(t){this.cities=t},jvm.Map.prototype.sendAjax=function(a,n,i){"now"==n&&(n=null,a=null),l.getJSON(t.ajaxRoute,{principal:t.principal,navigator:i,day:a,hour:n},function(t){e.removeAllMarkers(),l(".temp-tooltip").remove(),e.addMarkers(t,[]),e.series.markers[0].setValues(t.map(function(t){return t.status})),!isMobile.phone&&window.innerWidth>=768&&(e.saveCities(t),e.setTemperatureTooltips())})},jvm.Map.prototype.changeMapToList=function(t,e){if(void 0!==t){var a="";"regiao-autonoma-dos-acores"!=t&&"regiao-autonoma-da-madeira"!=t&&(l("[data-states]").show(),l("body").addClass("curtain_lightbox_active")),l("[data-states]").find(".table_tooltip_close").on("click",function(){l("[data-states]").hide().fadeOut(),l("body").removeClass("curtain_lightbox_active")}),"us"==e?l.each(EEUU_STATES[t],function(t,e){a+="<li><a href="+e+">"+t+"</a></li>"}):"ar"==e?l.each(ARGENTINA[t],function(t,e){a+="<li><a href="+e+">"+t+"</a></li>"}):"mx"==e?l.each(MEXICO[t],function(t,e){a+="<li><a href="+e+">"+t+"</a></li>"}):"br"==e?l.each(BRASIL[t],function(t,e){a+="<li><a href="+e+">"+t+"</a></li>"}):"co"==e?l.each(COLOMBIA[t],function(t,e){a+="<li><a href="+e+">"+t+"</a></li>"}):"cl"==e?l.each(CHILE[t],function(t,e){a+="<li><a href="+e+">"+t+"</a></li>"}):"pe"==e?l.each(PERU[t],function(t,e){a+="<li><a href="+e+">"+t+"</a></li>"}):"pt"==e&&l.each(PORTUGAL[t],function(t,e){"regiao-autonoma-da-madeira"==e||"regiao-autonoma-dos-acores"==e?window.location.href="/"+e:a+="<li><a href="+e+">"+t+"</a></li>"}),l("[data-states-list]").html(a)}},jvm.Map.prototype.displayDrawings=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","g"),a=l(e);a.attr("id","drawingsLayer"),l.each(t,function(t,e){if(void 0===e.x||void 0===e.y){var n=map.latLngToPoint(e.lat,e.lng);e.x=n.x,e.y=n.y}var i=document.createElementNS("http://www.w3.org/2000/svg","image");i.setAttributeNS("http://www.w3.org/1999/xlink","href",e.image),i.setAttributeNS(null,"height",e.h),i.setAttributeNS(null,"width",e.w),i.setAttributeNS(null,"x",e.x),i.setAttributeNS(null,"y",e.y),i.setAttributeNS(null,"visibility","visible"),a.append(i)}),this.container.find("svg").prepend(a)},jvm.Map.prototype.updateCityTooltips=function(){var e=this.container.width(),a=this.cities,n=this;void 0!==a&&l.each(a,function(a,i){if("province"==t.type||1==parseInt(i.text)){var o=l(".et-tooltip-"+a),r=n.getMarkerPosition({name:i.name,latLng:i.latLng});if(!1!==r){var p=r.x+n.xoffset,u=r.y+n.yoffset;o.attr("x",p),o.attr("y",u);var m=o.children().children(),c=!0,s=0;l.each(m,function(t,a){var n=a.getComputedTextLength();p+n>e&&p<e&&(p-=p+n-e,1==c&&(s+=15)),a.setAttributeNS(null,"x",p),a.setAttributeNS(null,"y",u+s),u+=12,c=!1})}}})},jvm.Map.prototype.setCityTooltips=function(){var e=this.container.width(),a=this.cities;this.addTooltipGroup();var n=this;this.cities=a,l.each(a,function(a,i){if("province"==t.type||1==parseInt(i.text)){var o=document.createElementNS("http://www.w3.org/2000/svg","text"),p=l(o),u=n.getMarkerPosition({name:i.name,latLng:i.latLng});if(!1!==u){"Bilbao"===i.name&&(u.x+=-24,u.y+=-30),p.attr("x",u.x+n.xoffset),p.attr("y",u.y+n.yoffset),p.attr("class","et-tooltip-"+a);var m=document.createElementNS("http://www.w3.org/2000/svg","a");"country"==t.type?"us"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/estados-unidos/"+i.community):"ar"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/argentina/"+i.community):"mx"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/mexico/"+i.community):"br"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href",i.community):"co"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/colombia/"+i.community):"cl"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/chile/"+i.community):"pe"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/peru/"+i.community):m.setAttributeNS("http://www.w3.org/1999/xlink","href","/"+i.community):"community"==t.type?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/"+i.province):"province"==t.type&&m.setAttributeNS("http://www.w3.org/1999/xlink","href","/"+i.URL+".html"),p.append(l(m)),n.toolTipGroup.append(p),r(n.container.find("svg")[0],o,m,i.name,0,80,e)}}})},jvm.Map.prototype.updateTemperatureTooltips=function(){var t=this.container.width(),e=this.cities,a=this;void 0!==e&&l.each(e,function(e,n){var i=l(".temp-tooltip-"+e),o=a.getMarkerPosition({name:n.name,latLng:n.latLng});if(!1!==o){var r=o.x+a.xtempoffset,p=o.y+a.ytempoffset;i.attr("x",r),i.attr("y",p);var u=i.children().children(),m=!0,c=0;l.each(u,function(e,a){var n=a.getComputedTextLength();r+n>t&&r<t&&(r-=r+n-t,1==m&&(c+=15)),a.setAttributeNS(null,"x",r),a.setAttributeNS(null,"y",p+c),p+=12,m=!1})}})},jvm.Map.prototype.setTemperatureTooltips=function(){var e=this.container.width(),a=this.cities;this.addTooltipGroup();var n=this;this.cities=a,l.each(a,function(a,i){var o=document.createElementNS("http://www.w3.org/2000/svg","text"),p=l(o),u=n.getMarkerPosition({name:i.name,latLng:i.latLng});if(!1!==u){p.attr("x",u.x+n.xtempoffset),p.attr("y",u.y+n.ytempoffset),p.attr("class","temp-tooltip temp-tooltip-"+a),p.attr("orig-temp",i.temperature_orig);var m=document.createElementNS("http://www.w3.org/2000/svg","a");"country"==t.type?"us"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/estados-unidos/"+i.community):"ar"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/argentina/"+i.community):"mx"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/mexico/"+i.community):"br"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href",i.community):"co"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/colombia/"+i.community):"cl"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/chile/"+i.community):"pe"==t.map?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/peru/"+i.community):m.setAttributeNS("http://www.w3.org/1999/xlink","href","/"+i.community):"community"==t.type?m.setAttributeNS("http://www.w3.org/1999/xlink","href","/"+i.province):"province"==t.type&&m.setAttributeNS("http://www.w3.org/1999/xlink","href","/"+i.URL+".html"),p.append(l(m)),n.toolTipGroup.append(p),r(n.container.find("svg")[0],o,m,"err"!==i.status?i.temperature:"",0,80,e)}})};var p=/(iPad|iPhone|iPod)/g.test(navigator.userAgent),u=t.regions,l=jQuery;if(isMobile.phone||window.innerWidth<768)var m="mobile";else m="desktop";var c,s,f=t.day,d=t.hour,h="https://statics.".concat((c=window.location.hostname,(s=c.split(".")).length>2?s.slice(1).join("."):c)),y={};["d000","d100","d501","d502","d200","d210","d211","d212","d220","d221","d222","d240","d457","d459","d460","n457","n459","d300","d310","d311","d312","d320","d321","d322","d340","d400","d503","d504","d505","d506","n503","n504","n505","n506","d410","d411","d412","d420","d458","n458","d421","d422","d448","d449","n448","n449","d430","d431","d445","d446","d447","d451","d452","d453","d454","d455","d456","n445","n446","n447","n451","n452","n453","n454","n455","n456","d432","d450","d500","n450","n500","d440","d441","d442","d443","d507","n441","n442","n443","n507","n000","n100","n200","n210","n211","n212","n220","n221","n222","n240","n300","n310","n311","n312","n320","n321","n322","n340","n400","n410","n411","
1n412","n420","n421","n422","n430","n431","n432","n440","d999","err","error"].forEach(function(t){return y[t]="".concat(h).concat("/images/weather/v20241016/svg/34/").concat(t,".svg")}),l.getJSON(t.ajaxRoute,{principal:t.principal,navigator:m,day:f,hour:d},function(n){if(e=new jvm.Map({container:l("#map"),zoomOnScroll:!1,zoomButtons:!1,zoomMin:1,zoomMax:1,map:t.map,backgroundColor:"#fff",markers:n,regionStyle:{initial:{fill:"#F7FFE9","fill-opacity":1,stroke:"#505F79","stroke-width":.5,"stroke-opacity":1,cursor:"pointer"}},markerStyle:{initial:{fill:"grey",stroke:"#505050","fill-opacity":1,"stroke-width":1,"stroke-opacity":1,r:5},hover:{stroke:"#505050","stroke-width":1,cursor:"default"},selected:{fill:"blue"},selectedHover:{}},series:{markers:[{attribute:"image",scale:y,values:n.map(function(t){return t.status})}]},onRegionLabelShow:function(i,o,r){if("country"==t.type){if(p)"us"==t.map?(i.preventDefault(),a="estados-unidos/"+n[r].community,e.changeMapToList(a,t.map)):"ar"==t.map?(i.preventDefault(),a="argentina/"+n[r].community,e.changeMapToList(a,t.map)):"mx"==t.map?(i.preventDefault(),a="mexico/"+n[r].community,e.changeMapToList(a,t.map)):"br"==t.map?(i.preventDefault(),a=n[r].community,e.changeMapToList(a,t.map)):"co"==t.map?(i.preventDefault(),a="colombia/"+n[r].community,e.changeMapToList(a,t.map)):"cl"==t.map?(i.preventDefault(),a="chile/"+n[r].community,e.changeMapToList(a,t.map)):"pe"==t.map?(i.preventDefault(),a="peru/"+n[r].community,e.changeMapToList(a,t.map)):"pt"==t.map?(i.preventDefault(),a=n[r].community,e.changeMapToList(a,t.map)):(i.preventDefault(),location.href="/"+n[r].community);else if(-1!=MAP_REGIONS_DISABLED.indexOf(r))return!1}else if("community"==t.type){var u=n[r].province.URL;p&&(i.preventDefault(),location.href="/"+u)}},onRegionTipShow:function(e,a,n,i){if("country"==t.type)-1!=MAP_REGIONS_DISABLED.indexOf(n)&&e.preventDefault();else if("community"==t.type){var o=u[n];o=o.replace(/\s+/g,"-"),p&&(e.preventDefault(),location.href="/en-provincia-"+o)}},onMarkerOver:function(t,e){t.preventDefault()},onMarkerOut:function(t,e){t.preventDefault()},onRegionOver:function(t,e){t.preventDefault()},onRegionOut:function(t,e){t.preventDefault()},onMarkerTipShow:function(i,o,r){if("country"==t.type)return p&&("us"==t.map?(i.preventDefault(),a="estados-unidos/"+n[r].community,e.changeMapToList(a,t.map)):"ar"==t.map?(i.preventDefault(),a="argentina/"+n[r].community,e.changeMapToList(a,t.map)):"mx"==t.map?(i.preventDefault(),a="mexico/"+n[r].community,e.changeMapToList(a,t.map)):"br"==t.map?(i.preventDefault(),a=n[r].community,e.changeMapToList(a,t.map)):"co"==t.map?(i.preventDefault(),a="colombia/"+n[r].community,e.changeMapToList(a,t.map)):"cl"==t.map?(i.preventDefault(),a="chile/"+n[r].community,e.changeMapToList(a,t.map)):"pe"==t.map?(i.preventDefault(),a="peru/"+n[r].community,e.changeMapToList(a,t.map)):"pt"==t.map?(i.preventDefault(),"regiao-autonoma-da-madeira"!=(a=n[r].community)&&"regiao-autonoma-dos-acores"!=a?e.changeMapToList(a,t.map):location.href="/"+a):(i.preventDefault(),location.href="/"+n[r].community)),!1;if("community"==t.type){var u=n[r].URL;return p&&(i.preventDefault(),location.href="/en-provincia-"+u),!1}},onMarkerLabelShow:function(i,o,r){if("country"==t.type)return p&&("us"==t.map?(i.preventDefault(),a="estados-unidos/"+n[r].community,e.changeMapToList(a,t.map)):"ar"==t.map?(i.preventDefault(),a="argentina/"+n[r].community,e.changeMapToList(a,t.map)):"mx"==t.map?(i.preventDefault(),a="mexico/"+n[r].community,e.changeMapToList(a,t.map)):"br"==t.map?(i.preventDefault(),a=n[r].community,e.changeMapToList(a,t.map)):"co"==t.map?(i.preventDefault(),a="colombia/"+n[r].community,e.changeMapToList(a,t.map)):"cl"==t.map?(i.preventDefault(),a="chile/"+n[r].community,e.changeMapToList(a,t.map)):"pe"==t.map?(i.preventDefault(),a="peru/"+n[r].community,e.changeMapToList(a,t.map)):"pt"==t.map?(i.preventDefault(),"regiao-autonoma-da-madeira"!=(a=n[r].community)&&"regiao-autonoma-dos-acores"!=a?e.changeMapToList(a,t.map):location.href="/"+a):(i.preventDefault(),location.href="/"+n[r].community)),!1;if("community"==t.type){var u=n[r].URL;return p&&(i.preventDefault(),location.href="/en-provincia-"+u),!1}},onRegionClick:function(a,n){if("country"==t.type)!isMobile.any||"us"!=t.map&&"ar"!=t.map&&"mx"!=t.map&&"br"!=t.map&&"co"!=t.map&&"cl"!=t.map&&"pe"!=t.map&&"pt"!=t.map?-1==MAP_REGIONS_DISABLED.indexOf(n)&&(a.preventDefault(),dataLayer.push({event:"map-home"}),location.href="/"+u[n]):(a.preventDefault(),e.changeMapToList(u[n],t.map));else if("community"==t.type){var i=u[n];dataLayer.push({event:"map-home"}),a.preventDefault(),location.href="/en-provincia-"+i}},onMarkerClick:function(i,o){if("country"==t.type)isMobile.any&&"us"==t.map?(i.preventDefault(),a="estados-unidos/"+n[o].community,e.changeMapToList(a,t.map)):isMobile.any&&"ar"==t.map?(i.preventDefault(),a="argentina/"+n[o].community,e.changeMapToList(a,t.map)):isMobile.any&&"mx"==t.map?(i.preventDefault(),a="mexico/"+n[o].community,e.changeMapToList(a,t.map)):isMobile.any&&"br"==t.map?(i.preventDefault(),a=n[o].community,e.changeMapToList(a,t.map)):isMobile.any&&"co"==t.map?(i.preventDefault(),a="colombia/"+n[o].community,e.changeMapToList(a,t.map)):isMobile.any&&"cl"==t.map?(i.preventDefault(),a="chile/"+n[o].community,e.changeMapToList(a,t.map)):isMobile.any&&"pe"==t.map?(i.preventDefault(),a="peru/"+n[o].community,e.changeMapToList(a,t.map)):isMobile.any&&"pt"==t.map?(i.preventDefault(),a=n[o].community,e.changeMapToList(a,t.map)):"us"==t.map?(i.preventDefault(),location.href="/estados-unidos/"+n[o].community):"ar"==t.map?(i.preventDefault(),location.href="/argentina/"+n[o].community):"mx"==t.map?(i.preventDefault(),location.href="/mexico/"+n[o].community):"br"==t.map?(i.preventDefault(),location.href=n[o].community):"co"==t.map?(i.preventDefault(),location.href="/colombia/"+n[o].community):"cl"==t.map?(i.preventDefault(),location.href="/chile/"+n[o].community):"pe"==t.map?(i.preventDefault(),location.href="/peru/"+n[o].community):"pt"==t.map?(i.preventDefault(),location.href=n[o].community):(i.preventDefault(),location.href="/"+n[o].community);else if("community"==t.type){var r=n[o].province;i.preventDefault(),location.href="/en-provincia-"+r}else if("province"==t.type){var p=n[o].URL;i.preventDefault(),location.href="/"+p+".html"}}}),"country"==t.type){if((!isMobile.phone&&window.innerWidth>=768||isMobile.apple.tablet)&&(e.saveCities(n),e.setCityTooltips(),e.setTemperatureTooltips(),void 0!==t.principal&&"pt"===t.principal)){var i="undefined"!=typeof cdn_url?cdn_url:"";e.displayDrawings([{w:168,h:104,x:118,y:7,image:"".concat(i,"/images/portugal-acores-island-separator.png")},{w:139,h:109,x:113,y:155,image:"".concat(i,"/images/portugal-madeira-island-separator.png")}])}}else"community"!=t.type&&"province"!=t.type||(e.saveCities(n),e.setCityTooltips(),!isMobile.phone&&window.innerWidth>=768&&e.setTemperatureTooltips());e.container.bind("viewportChange",function(t,a){e.updateCityTooltips(),e.updateTemperatureTooltips()}
1),l(".slider-week__hour, .slider-week-mobile__hour").click(function(){if(!isMobile.any&&window.innerWidth>=768||isMobile.apple.tablet)var t=l(this).closest(".slider-week__day").attr("data-id"),a=l(this).attr("data-hour");else t=l(".slider-week-mobile__day--active").attr("data-id"),a=l(this).attr("data-hour");e.sendAjax(t,a,m)}),document.addEventListener("slider-week:change",function(t){e.sendAjax(t.detail.day,t.detail.hour,m)})})}})};if("undefined"!=typeof jQuery)a();else var n=setInterval(function(){"undefined"!=typeof jQuery&&(clearInterval(n),a())},100)}}],e&&i(t.prototype,e),a&&i(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,a}()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.