PageSourceSearch

https://www.agritempo.gov.br/_next/static/chunks/app/%5Blang%5D/pr…/page-f675e90ccd7f46fa.js

js agritempo.gov.br collected 2026-10-02 10:54:18 UTC 14,609 bytes, 6 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8233],{92317:function(e,t,r){Promise.resolve().then(r.bind(r,46274)),Promise.resolve().then(r.bind(r,4892))},43175:function(e,t){"use strict";/*!
2 * cookie
3 * Copyright(c) 2012-2014 Roman Shtylman
4 * Copyright(c) 2015 Douglas Christopher Wilson
5 * MIT Licensed
6 */t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var r={},n=(t||{}).decode||o,i=0;i<e.length;){var a=e.indexOf("=",i);if(-1===a)break;var c=e.indexOf(";",i);if(-1===c)c=e.length;else if(c<a){i=e.lastIndexOf(";",a-1)+1;continue}var s=e.slice(i,a).trim();if(void 0===r[s]){var u=e.slice(a+1,c).trim();34===u.charCodeAt(0)&&(u=u.slice(1,-1)),r[s]=function(e,t){try{return t(e)}catch(t){return e}}(u,n)}i=c+1}return r},t.serialize=function(e,t,o){var a=o||{},c=a.encode||i;if("function"!=typeof c)throw TypeError("option encode is invalid");if(!n.test(e))throw TypeError("argument name is invalid");var s=c(t);if(s&&!n.test(s))throw TypeError("argument val is invalid");var u=e+"="+s;if(null!=a.maxAge){var l=a.maxAge-0;if(isNaN(l)||!isFinite(l))throw TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(l)}if(a.domain){if(!n.test(a.domain))throw TypeError("option domain is invalid");u+="; Domain="+a.domain}if(a.path){if(!n.test(a.path))throw TypeError("option path is invalid");u+="; Path="+a.path}if(a.expires){var d=a.expires;if("[object Date]"!==r.call(d)&&!(d instanceof Date)||isNaN(d.valueOf()))throw TypeError("option expires is invali
6d");u+="; Expires="+d.toUTCString()}if(a.httpOnly&&(u+="; HttpOnly"),a.secure&&(u+="; Secure"),a.partitioned&&(u+="; Partitioned"),a.priority)switch("string"==typeof a.priority?a.priority.toLowerCase():a.priority){case"low":u+="; Priority=Low";break;case"medium":u+="; Priority=Medium";break;case"high":u+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(a.sameSite)switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:case"strict":u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"none":u+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return u};var r=Object.prototype.toString,n=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function o(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}function i(e){return encodeURIComponent(e)}},34870:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCookie=t.deleteCookie=t.setCookie=t.getCookie=t.getCookies=void 0;var i=r(43175),a=function(){return"undefined"!=typeof window},c=function(e){return!!e&&"getAll"in e&&"set"in e&&"function"==typeof e.getAll&&"function"==typeof e.set},s=function(e){return!!(null==e?void 0:e.req)&&"cookies"in e.req&&c(null==e?void 0:e.req.cookies)||!!(null==e?void 0:e.res)&&"cookies"in e.res&&c(null==e?void 0:e.res.cookies)||!!(null==e?void 0:e.cookies)&&c(e.cookies())},u=function(e){var t={};return e.getAll().forEach(function(e){var r=e.name,n=e.value;t[r]=n}),t},l=function(e){void 0===e&&(e="");try{var t=JSON.stringify(e);return/^[\{\[]/.test(t)?t:e}catch(t){return e}};t.getCookies=function(e){if(s(e)){if(null==e?void 0:e.req)return u(e.req.cookies);if(null==e?void 0:e.cookies)return u(e.cookies())}if(e&&(t=e.req),!a())return t&&t.cookies?t.cookies:t&&t.headers.cookie?(0,i.parse)(t.headers.cookie):{};for(var t,r={},n=document.cookie?document.cookie.split("; "):[],o=0,c=n.length;o<c;o++){var l=n[o].split("="),d=l.slice(1).join("=");r[l[0]]=d}return r},t.getCookie=function(e,r){var n=(0,t.getCookies)(r)[e];if(void 0!==n)return n?n.replace(/(%[0-9A-Z]{2}
6)+/g,decodeURIComponent):n},t.setCookie=function(e,t,r){if(s(r)){var c,u,d,f=r.req,p=r.res,h=r.cookies,y=o(r,["req","res","cookies"]),m=n({name:e,value:t},y);f&&f.cookies.set(m),p&&p.cookies.set(m),h&&h().set(m);return}if(r){var f=r.req,p=r.res,g=o(r,["req","res"]);u=f,d=p,c=g}var v=(0,i.serialize)(e,l(t),n({path:"/"},c));if(a())document.cookie=v;else if(d&&u){var b=d.getHeader("Set-Cookie");if(Array.isArray(b)||(b=b?[String(b)]:[]),d.setHeader("Set-Cookie",b.concat(v)),u&&u.cookies){var k=u.cookies;""===t?delete k[e]:k[e]=l(t)}if(u&&u.headers&&u.headers.cookie){var k=(0,i.parse)(u.headers.cookie);""===t?delete k[e]:k[e]=l(t),u.headers.cookie=Object.entries(k).reduce(function(e,t){return e.concat("".concat(t[0],"=").concat(t[1],";"))},"")}}},t.deleteCookie=function(e,r){return(0,t.setCookie)(e,"",n(n({},r),{maxAge:-1}))},t.hasCookie=function(e,r){return!!e&&(0,t.getCookies)(r).hasOwnProperty(e)}},49079:function(e,t,r){"use strict";var n,o;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(o=r.g.process)?void 0:o.env)?r.g.process:r(13127)},13472:function(e,t,r){"use strict";Object.defineProperty(t,"$",{enumerable:!0,get:function(){return o}});let n=r(15355);function o(e){let{createServerReference:t}=r(6671);return t(e,n.callServer)}},13127:function(e){!function(){var t={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function c(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s=[],u=!1,l=-1;function d(){u&&n&&(u=!1,n.length?s=n.concat(s):l=-1,s.length&&f())}function f(){if(!u){var e=c(d);u=!0;for(var t=s.length;t;){for(n=s,s=[];++l<t;)n&&n[l].run();l=-1,t=s.length}n=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new p(e,t)),1!==s.length||u||c(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},a=!0;try{t[e](i,i.exports,n),a=!1}finally{a&&delete r[e]}return i.exports}n.ab="//";var o=n(229);e.exports=o}()},4892:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return b}});var n=r(57437),o=r(54285),i=r(27895),a=r(2265),c=r(81154),s=r(83441),u=r.n(s),l=r(58873);r(42413),r(63385);var d=r(22169),f=e=>{let{value:t,handler:r,locale:o,months:i,lang:a}=e;return(0,n.jsx)(u(),{selected:t,onChange:r,dateFormat:"en-US"===o.code?"MM/dd":"dd/MM",wrapperClassName:"probabilidade-de-chuva-date-picker",className:"date-picker",showIcon:!0,formatWeekDay:e=>(0,d.jS)(e,a),renderCustomHeader:e=>{let{date:t,changeMonth:r,decreaseMonth:o,increaseMonth:a,prevMonthButtonDisabled:c,nextMonthButtonDisabled:s}=e;return(0,n.jsxs)("div",{style:{margin:10,display:"flex",justifyContent:"center"},children:[(0,n.jsx)("button",{onClick:o,disabled:c,style:{paddingRight:"8px"},children:(0,n.jsx)(l.pjk,{})}),(0,n.jsx)("select",{value:i[t.getMonth()],onChange:e=>{let{target:{value:t}}=e;return r(i.indexOf(t))},style:{width:"100%",textAlign:"center",border:"1px solid gray",borderRadius:"8px",cursor:"pointer",outline:"none"},children:i.map(e=>(0,n.jsx)("option",{value:e,children:e},e))}),(0,n.jsx)("button",{onClick:a,disabled:s,style:{paddingLeft:"8px"},children:(0,n.jsx)(l.fmn,{})})]})}})},p=r(37336),h=r(99698),y=r(78455),m=r(48633);function g(){return(0,n.jsx)(o.k,{w:"100%",minH:{xs:"200px",sm:"350px",md:"500px"},minW:{xl:"1000"},justify:"center",align:"center",children:(0,n.jsx)(m.$,{size:"xl"})})}var v=r(22416);function b(e){let{lang:t,currentDay:r}
6=e,{comum:s,meses:u}=(0,v.F)(t),[l,d]=(0,a.useState)(r),[m,b]=(0,a.useState)(!1),[k,w]=(0,a.useState)(new Date),x="en"===t?p.Z:"es"===t?h.Z:"br"===t?y.Z:p.Z;return(0,n.jsxs)(o.k,{align:"center",direction:"column",margin:"0 20px",children:[(0,n.jsxs)(o.k,{width:"100%",maxW:{md:"1000px"},direction:"column",backgroundColor:"white",padding:"20px",borderRadius:"8px",boxShadow:"0 5px 50px -30px",marginTop:"-135px",zIndex:"999",children:[(0,n.jsxs)(i.x,{marginBottom:"8px",children:[s.selecione," ",s.umadata]}),(0,n.jsx)(o.k,{border:"1px",borderColor:"#E2E8F0",rounded:"md",justify:"start",alignItems:"center",children:(0,n.jsx)(f,{value:k,locale:x,handler:e=>{if(!k)return;w(e);let t=e.getDate().toString(),r=(e.getMonth()+1).toString();!async function(){b(!0);let e=await c.YR;try{await e.get("/chuva/probabilidade/nacional/".concat(r,"/").concat(t),{responseType:"arraybuffer"}).then(e=>{let t=btoa(new Uint8Array(e.data).reduce((e,t)=>e+String.fromCharCode(t),""));d("data:image/png;base64,".concat(t)),b(!1)})}catch(e){console.error("Erro ao buscar a imagem:",e)}}()},months:u,lang:t})})]}),(0,n.jsxs)(o.k,{margin:"50px 0",direction:"column",align:"center",children:[m?(0,n.jsx)(g,{}):r&&(0,n.jsx)("img",{src:l,alt:"Probabilidade de Chuva"}),(0,n.jsx)(i.x,{fontSize:"md",lineHeight:"6",textAlign:"center",children:"Probabilidade calculada a partir dos dados hist\xf3ricos"})]})]})}},81154:function(e,t,r){"use strict";r.d(t,{kJ:function(){return d},$S:function(){return l},YR:function(){return u}});var n=r(7908);let o=async()=>{try{let e=await n.Z.post("https://api.cnptia.embrapa.br/token?grant_type=client_credentials",{},{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic ZFE5TGZDMXl1NFVFY1F0WjNQTkJrZTBFSjN3YTpkbDk4M3BUWEg4WUl1UHdMODNmS1RhUk11UUFh"}});return await e.data}catch(e){console.log("Erro ao gerar token - ".concat(e.message))}};var i=r(34870),a=r(49079);let c=async e=>{try{let e=(0,i.getCookie)("token");if(!e){let e=a.env.GET_TOKEN_URL;if(!e){let e=a.env.FALLBACK_TOKEN;if(!e){console.error("Token de manuten\xe7\xe3o n\xe3o encontrado");return}return e}return(await n.Z.post(e)).data.access_token}return e}catch(e){return console.error("Erro ao gerar token - ".concat(e.message)),e}},s=async(e,t)=>{if(t)return n.Z.create({baseURL:e,headers:{Authorization:"Bearer b5876a54-6a44-3986-85f7-03f380448469","Access-Control-Allow-Origin":"*"}});if(!(0,i.getCookie)("token")){if(!await c()){let e=await fetch("/api/token",{method:"POST"});await e.json()}return n.Z.create({baseURL:e,headers:{Authorization:"Bearer b5876a54-6a44-3986-85f7-03f380448469","Access-Control-Allow-Origin":"*"}})}return n.Z.create({baseURL:e,headers:{Authorization:"Bearer b5876a54-6a44-3986-85f7-03f380448469","Access-Control-Allow-Origin":"https://www.agritempo.gov.br/"}})},u=(async()=>{if(!(0,i.getCookie)("token")){let e=await o();return await s("https://api.cnptia.embrapa.br/agritempo-mapas/v1/",null==e?void 0:e.access_token)}return await s("https://api.cnptia.embrapa.br/agritempo-mapas/v1/")})(),l=s("https://api.cnptia.embrapa.br/agritempo-dados/v1/"),d=s("https://api.cnptia.embrapa.br/agritempo-boletins/v1/");s("https://api.cnptia.embrapa.br/token?grant_type=client_credentials")},22169:function(e,t,r){"use strict";r.d(t,{J3:function(){return l},_Q:function(){return d},jS:function(){return p},lD:function(){return u},rK:function(){return h},ye:function(){return f},yh:function(){return y}});var n=r(81154),o=r(12247),i=r(68947),a=r(37336),c=r(99698),s=r(78455);async function u(e){let t=await n.kJ;try{let r=await t.get("/regionais/".concat(e),{responseType:"arraybuffer"}),n=new Blob([r.data],{type:"application/pdf"}),o=URL.createObjectURL(n);window.open(o,"_blank")}catch(e){}}function l(e,t){if(!e)return;let r="en"===t?a.Z:"es"===t?c.Z:"br"===t?s.Z:a.Z,n=(0,o.default)(e,"yyyy-MM-dd",new Date);return(0,i.default)(n,"P",{locale:r})}async function d(e,t,r){if(!e||!t)return;let n="en"===r?a.Z:"es"===r?c.Z:"br"===r?s.Z:a.Z,o=()=>"en"===r?"MM/dd/yyyy":"dd/MM/yyyy";return{data_inicio:(0,i.default)(e,o(),{locale:n}),data_fim:(0,i.default)(t,o(),{locale:n})}}async function f(e,t,r,n,o){if(e&&r&&n){if("en"===o){let e=new Date(r),o=new Date(n);return await t.filter(t=>{let r=new Date(t.data_inicial),n=new Date(t.data_final);return r>=e&&n<=o})}{let t=new Date(i(r)),o=new Date(i(n));return await e.filter(e=>{let r=new Date(i(e.data_inicial)),n=new Date(i(e.data_final));return r>=t&&n<=o})}}function i(e){let t=e.split("/");return"".concat(t[1],"/").concat(t[0],"/").concat(t[2])}}function p(e,t){let r={en:{Monday:"Mon",Tuesday:"Tue",Wednesday:"Wed",Thursday:"Thu",Friday:"Fri",Saturday:"Sat",Sunday:"Sun"},br:{Monday:"Seg",Tuesday:"Ter",Wednesday:"Qua",Thursday:"Qui",Friday:"Sex",S
6aturday:"S\xe1b",Sunday:"Dom"},es:{Monday:"Lun",Tuesday:"Mar",Wednesday:"Mi\xe9",Thursday:"Jue",Friday:"Vie",Saturday:"S\xe1b",Sunday:"Dom"}};return r[t]?r[t][e]:(console.warn("Locale '".concat(t,"' n\xe3o suportado. Retornando o dia em ingl\xeas.")),r.en[e])}function h(e){let t={en:["January","February","March","April","May","June","July","August","September","October","November","December"],br:["Janeiro","Fevereiro","Mar\xe7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],es:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]};return t[e]?t[e]:(console.warn("Locale '".concat(e,"' n\xe3o suportado. Retornando os meses em portugu\xeas.")),t.br)}function y(){let e=new Date().getFullYear(),t=[];for(let r=1890;r<=e;r++)t.push(r);return t.reverse()}},42413:function(){},63385:function(){}},function(e){e.O(0,[3190,2400,9982,9929,6115,3033,8447,499,802,2428,7065,8763,8866,6974,6060,8792,9375,7908,3441,559,2416,6274,2971,364,1744],function(){return e(e.s=92317)}),_N_E=e.O()}]);

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.