1"use strict";(globalThis.webpackChunkv2||=[]).push([[1107],{941107(t,e,a){var r=a(951609),o=a(114541),i=a(941089),l=a(213070),s=a(810790);a.d(e,["default",0,t=>{const[e,a]=(0,r.useState)(),n={autoWidth:!0,drag:"free",wheel:!0,releaseWheel:!0,arrows:!1,pagination:!1,gap:12,breakpoints:{640:{gap:12,isMobile:!0}}};return(0,r.useEffect)(()=>{(async()=>{if(!t.symbols?.length)return void a([]);const e={symbols:t.symbols};i.K.getIntradayLastQuote(e).then(t=>{if(t&&Array.isArray(t.result)){const e=t.result.map(t=>({title:t.symbol,linkUrl:`${window.location.origin}/${t.symbol.toUpperCase()}`,badgeTicker:{text:(0,l.l9)(t.change),type:0!==t.change?t.change>0?"rise":"fall":"neutral"}}));a(e)}else a([])})})().catch(t=>{console.error("Error fetching mentioned ticker data: ",t)})},[t.symbols]),(0,s.jsx)(s.Fragment,{children:e&&0!==e.length?(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[t.title&&(0,s.jsx)("h3",{className:"im-mob-core-bold-paragraph lg:im-web-core-bold-paragraph-1 text-content-one",children:t.title}),e&&(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(o.CarouselV2,{options:n,children:e.map((t,e)=>(0,s.jsx)("div",{className:"w-max shrink-0 pb-2",children:(0,s.jsx)(o.BoxTicker,{size:"sm",...t})},`${t.title}-${e}`))})})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[t.title&&(0,s.jsx)("h3",{className:"im-mob-core-bold-paragraph lg:im-web-core-bold-paragraph-1 text-content-one",children:t.title}),t.symbols&&(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(o.CarouselV2,{options:n,children:t.symbols.map((t,e)=>(0,s.jsx)("div",{className:"shrink-0 rounded-lg h-7 w-32 bg-surface-card-four animate-fade animate-infinite animate-ease-in animate-alternate animate-fill-forwards animate-duration-500"},e))})})]})})}])},75116(t,e,a){a.d(e,["A",0,class{static getConfig(){return{url:window.InfoMoneyPage?.api_marketdata.base_api_marketdata||"",subscriptionKey:window.InfoMoneyPage?.api_marketdata.ocp_apim_subscription_key||"",tickerBlobUrl:window.InfoMoneyPage?.api_marketdata.ticker_blob_url||"",highLowBlobUrl:window.InfoMoneyPage?.api_marketdata.high_low_blob_url||"",criptoBlobUrl:window.InfoMoneyPage?.api_marketdata.cripto_blob_url||"",currencyBlobUrl:window.InfoMoneyPage?.api_marketdata.currency_blob_url||"",ibovBlobUrl:window.InfoMoneyPage?.api_marketdata.ibov_blob_url||"",hostName:window.InfoMoneyPage?.host_name||""}}static getCacheConfig(){const t={enabled:!1,duration:3e5},e=window.InfoMoneyPage?.api_marketdata?.cache;return e?{enabled:void 0!==e.enabled?e.enabled:t.enabled,duration:void 0!==e.duration?e.duration:t.duration}:t}static getParams(t){return new URLSearchParams(Object.entries(t).filter(([t,e])=>void 0!==e).reduce((t,[e,a])=>(Array.isArray(a)?t[e]=a.join(","):t[e]=String(a),t),{})).toString()}}])},307531(t,e,a){a.d(e,{_:()=>r});class r{static CACHE_PREFIX="infomoney_market_data_";static _localStorageAvailable=null;static generateCacheKey(t,e){const a=e?JSON.stringify(e):"";return`${this.CACHE_PREFIX}${t}_${btoa(a)}`}static isLocalStorageAvailable(){if(null!==this._localStorageAvailable)return this._localStorageAvailable;try{const t="__localStorage_test__";return localStorage.setItem(t,t),localStorage.removeItem(t),this._localStorageAvailable=!0,!0}catch{return this._localStorageAvailable=!1,!1}}static recheckLocalStorageAvailability(){return this._localStorageAvailable=null,this.isLocalStorageAvailable()}static get(t,e){if(!this.isLocalStorageAvailable())return null;try{const a=this.generateCacheKey(t,e),r=localStorage.getItem(a);if(!r)return null;const o=JSON.parse(r);return Date.now()>o.expiresAt?(this.remove(t,e),null):o.data}catch(t){return console.warn("CacheService.get: Error reading from cache:",t),!0===this._localStorageAvailable&&this.recheckLocalStorageAvailability(),null}}static set(t,e,a,r){if(this.isLocalStorageAvailable())try{const o=this.generateCacheKey(t,r),i=Date.now(),l={data:e,timestamp:i,expiresAt:i+a};localStorage.setItem(o,JSON.stringify(l))}catch(t){console.warn("CacheService.set: Error writing to cache:",t),!0===this._localStorageAvailable&&this.recheckLocalStorageAvailability(),this.clearExpired()}}static remove(t,e){if(this.isLocalStorageAvailable())try{const a=this.generateCacheKey(t,e);localStorage.removeItem(a)}catch(t){console.warn("CacheService.remove: Error removing from cache:",t),!0===this._localStorageAvailable&&this.recheckLocalStorageAvailability()}}static clearExpired(){if(this.isLocalStorageAvailable())try{const t=Date.now(),e=[];for(let a=0;a<localStorage.length;a++){const r=localStorage.key(a);if(r&&r.startsWith(this.CACHE_PREFIX))try{const a=localStorage.getItem(r);a&&t>JSON.parse(a).expiresAt&&e.push(r)}catch{e.push(r)}}e.forEach(t=>localStorage.removeItem(t))}catch(t){console.warn("CacheService.clearExpired: Error clearing expired cache:",t),!0===this._localStorageAvailable&&this.recheckLocalStorageAvailability()}}static clearAll(){if(this.isLocalStorageAvailable())try{const t=[];for(let e=0;e<localStorage.length;e++){const a=localStorage.key(e);a&&a.startsWith(this.CACHE_PREFIX)&&t.push(a)}for(let e=0;e<t.length;e++)localStorage.removeItem(t[e])}catch(t){console.warn("CacheService.clearAll: Error clearing cache:",t),!0===this._localStorageAvailable&&this.recheckLocalStorageAvailability()}}static getStats(){if(!this.isLocalStorageAvailable())return{totalItems:0,expiredItems:0,totalSize:0};let t=0,e=0,a=0;const r=Date.now();try{for(let o=0;o<localStorage.length;o++){const i=localStorage.key(o);if(i&&i.startsWith(this.CACHE_PREFIX)){t++;const o=localStorage.getItem(i);if(o){a+=o.length;try{r>JSON.parse(o).expiresAt&&e++}catch{e++}}}}}catch(t){console.warn("CacheService.getStats: Error getting cache stats:",t),!0===this._localStorageAvailable&&this.recheckLocalStorageAvailability()}return{totalItems:t,expiredItems:e,totalSize:a}}static forceRecheckLocalStorage(){return this.recheckLocalStorageAvailability()}static getLocalStorageStatus(){return{available:this._localStorageAvailable,checked:null!==this._localStorageAvailable}}}},941089(t,e,a){a.d(e,{K:()=>i});var r=a(75116),o=a(307531);
1class i{static config=r.A.getConfig();static async getDaily(t,e,a){const l=`b3/quotes/daily/${t}`,s={symbol:t,...e};if(a?.enabled){const t=o._.get(l,s);if(t)return t}try{const t=r.A.getParams(e),n=`${i.config.url}${l}?${t}`,c=await fetch(n,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":i.config.subscriptionKey}});if(!c.ok)throw new Error("Response was not ok. Status: "+c.status);const h=200!==c.status?null:await c.json();return a?.enabled&&h&&o._.set(l,h,a.duration,s),h}catch(t){return console.error("QuoteService.getDaily: Error in fetching data:",t),null}}static async getIntraday(t,e,a){const l=`b3/quotes/intraday/${t}`,s={symbol:t,...e};if(a?.enabled){const t=o._.get(l,s);if(t)return t}try{const t=r.A.getParams(e),n=`${i.config.url}${l}?${t}`,c=await fetch(n,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":i.config.subscriptionKey}});if(!c.ok)throw new Error("Response was not ok. Status: "+c.status);const h=200!==c.status?null:await c.json();return a?.enabled&&h&&o._.set(l,h,a.duration,s),h}catch(t){return console.error("QuoteService.getIntraday: Error in fetching data:",t),null}}static async getIntradayLeaderboard(t,e){const a="b3/quotes/intraday/leaderboard",l={...t};if(e?.enabled){const t=o._.get(a,l);if(t)return t}try{const s=r.A.getParams(t),n=`${i.config.url}${a}?${s}`,c=await fetch(n,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":i.config.subscriptionKey}});if(!c.ok)throw new Error("Response was not ok. Status: "+c.status);const h=200!==c.status?null:await c.json();return e?.enabled&&h&&o._.set(a,h,e.duration,l),h}catch(t){return console.error("QuoteService.getIntradayLeaderboard: Error in fetching data:",t),null}}static async getIntradayLastQuote(t,e){const a="b3/quotes/intraday/last",r={symbols:[...t.symbols].sort()};if(e?.enabled){const t=o._.get(a,r);if(t)return t}try{const l=`${i.config.url}${a}?symbols=${t.symbols.join(",")}`,s=await fetch(l,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":i.config.subscriptionKey}});if(!s.ok)throw new Error("Response was not ok. Status: "+s.status);const n=200!==s.status?null:await s.json();return e?.enabled&&n&&o._.set(a,n,e.duration,r),n}catch(t){return console.error("QuoteService.getIntradayLastQuote: Error in fetching data:",t),null}}static async getIntradayChart(t,e){const a=`b3/quotes/intraday/chart/${t}`,r={symbol:t};if(e?.enabled){const t=o._.get(a,r);if(t)return t}try{const t=`${i.config.url}${a}`,l=await fetch(t,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","Ocp-Apim-Subscription-Key":i.config.subscriptionKey}});if(!l.ok)throw new Error("Response was not ok. Status: "+l.status);const s=200!==l.status?null:await l.json();return e?.enabled&&s&&o._.set(a,s,e.duration,r),s}catch(t){return console.error("QuoteService.getIntradayChart: Error in fetching data:",t),null}}static clearCache(){o._.clearAll()}static clearExpiredCache(){o._.clearExpired()}static getCacheStats(){return o._.getStats()}}},213070(t,e,a){a.d(e,["Xf",0,t=>(t=Math.abs(t)).toLocaleString("pt-BR",{minimumFractionDigits:0,maximumFractionDigits:0}),"l9",0,(t,e=!0)=>(t<0?"-":"")+(t=Math.abs(t)).toFixed(2).replace(".",",")+(e?"%":""),"sz",0,t=>{const e=t<0;return(t=Math.abs(t))>=1e12?(e?"-":"")+(t/1e12).toFixed(2).replace(".",",")+" T":t>=1e9?(e?"-":"")+(t/1e9).toFixed(2).replace(".",",")+" B":t>=1e6?(e?"-":"")+(t/1e6).toFixed(2).replace(".",",")+" M":t>=1e3?(e?"-":"")+(t/1e3).toFixed(2).replace(".",",")+" K":(e?"-":"")+t.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})},"vv",0,(t,e)=>(t=Math.abs(t)).toLocaleString("pt-BR",{minimumFractionDigits:void 0!==e?e:2,maximumFractionDigits:void 0!==e?e:2})])}}]);
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.