Files
roi24/European, Middle Eastern & African Stocks - Bloomberg - Bloomberg Markets_files/3934-ff427ed9511030ea_05Q6.js
T
neo 932ec3ac8f KPI cards: Bloomberg stock ticker style
- Redesign KPI cards to look like stock tickers
- Add ticker ID (e.g. ВЫРУЧК:KPI, AOV:KPI)
- Arrow up/down SVG indicators for change direction
- Mini trend-line (50px) inside each card
- Change color: green (#16a34a) for up, red (#e21d1d) for down
- Remove sparkline background area, keep only line
- Fix duplicate arrowUp variable naming (bArrowUp/bArrowDown/bArrowNeutral)
2026-06-21 18:14:08 +05:00

1 line
8.6 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3934],{33934:function(e,t,r){let s;r.d(t,{a:function(){return x}});var i=r(66474),n=r(27037),u=r(56888),a=r(7506),h=r(13820),c=r(24139),o=class extends a.l{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,h.O)(),this.bindMethods(),this.setOptions(t)}#e;#s=void 0;#i=void 0;#n=void 0;#u;#a;#r;#t;#h;#c;#o;#l;#d;#p;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),l(this.#s,this.options)?this.#y():this.updateResult(),this.#R())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#Q(),this.#s.removeObserver(this)}setOptions(e){let t=this.options,r=this.#s;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,c.Nc)(this.options.enabled,this.#s))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#s.setOptions(this.options),t._defaulted&&!(0,c.VS)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});let s=this.hasListeners();s&&p(this.#s,r,this.options,t)&&this.#y(),this.updateResult(),s&&(this.#s!==r||(0,c.Nc)(this.options.enabled,this.#s)!==(0,c.Nc)(t.enabled,this.#s)||(0,c.KC)(this.options.staleTime,this.#s)!==(0,c.KC)(t.staleTime,this.#s))&&this.#m();let i=this.#g();s&&(this.#s!==r||(0,c.Nc)(this.options.enabled,this.#s)!==(0,c.Nc)(t.enabled,this.#s)||i!==this.#p)&&this.#I(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return(0,c.VS)(this.getCurrentResult(),r)||(this.#n=r,this.#a=this.options,this.#u=this.#s.state),r}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"!==r||this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(e,r))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#s}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#y({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#y(e){this.#v();let t=this.#s.fetch(this.options,e);return e?.throwOnError||(t=t.catch(c.ZT)),t}#m(){this.#b();let e=(0,c.KC)(this.options.staleTime,this.#s);if(c.sk||this.#n.isStale||!(0,c.PN)(e))return;let t=(0,c.Kp)(this.#n.dataUpdatedAt,e);this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},t+1)}#g(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#I(e){this.#Q(),this.#p=e,!c.sk&&!1!==(0,c.Nc)(this.options.enabled,this.#s)&&(0,c.PN)(this.#p)&&0!==this.#p&&(this.#d=setInterval(()=>{(this.options.refetchIntervalInBackground||i.j.isFocused())&&this.#y()},this.#p))}#R(){this.#m(),this.#I(this.#g())}#b(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#Q(){this.#d&&(clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let r;let s=this.#s,i=this.options,n=this.#n,a=this.#u,o=this.#a,d=e!==s?e.state:this.#i,{state:y}=e,R={...y},b=!1;if(t._optimisticResults){let r=this.hasListeners(),n=!r&&l(e,t),a=r&&p(e,s,t,i);(n||a)&&(R={...R,...(0,u.z)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(R.fetchStatus="idle")}let{error:Q,errorUpdatedAt:v,status:m}=R;r=R.data;let g=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===m){let e;n?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=n.data,g=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#o?.state.data,this.#o):t.placeholderData,void 0!==e&&(m="success",r=(0,c.oE)(n?.data,e,t),b=!0)}if(t.select&&void 0!==r&&!g){if(n&&r===a?.data&&t.select===this.#h)r=this.#c;else try{this.#h=t.select,r=t.select(r),r=(0,c.oE)(n?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}}this.#t&&(Q=this.#t,r=this.#c,v=Date.now(),m="error");let I="fetching"===R.fetchStatus,C="pending"===m,O="error"===m,T=C&&I,S=void 0!==r,E={status:m,fetchStatus:R.fetchStatus,isPending:C,isSuccess:"success"===m,isError:O,isInitialLoading:T,isLoading:T,data:r,dataUpdatedAt:R.dataUpdatedAt,error:Q,errorUpdatedAt:v,failureCount:R.fetchFailureCount,failureReason:R.fetchFailureReason,errorUpdateCount:R.errorUpdateCount,isFetched:R.dataUpdateCount>0||R.errorUpdateCount>0,isFetchedAfterMount:R.dataUpdateCount>d.dataUpdateCount||R.errorUpdateCount>d.errorUpdateCount,isFetching:I,isRefetching:I&&!C,isLoadingError:O&&!S,isPaused:"paused"===R.fetchStatus,isPlaceholderData:b,isRefetchError:O&&S,isStale:f(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,c.Nc)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===E.status?e.reject(E.error):void 0!==E.data&&e.resolve(E.data)},r=()=>{t(this.#r=E.promise=(0,h.O)())},i=this.#r;switch(i.status){case"pending":e.queryHash===s.queryHash&&t(i);break;case"fulfilled":("error"===E.status||E.data!==i.value)&&r();break;case"rejected":("error"!==E.status||E.error!==i.reason)&&r()}}return E}updateResult(){let e=this.#n,t=this.createResult(this.#s,this.options);this.#u=this.#s.state,this.#a=this.options,void 0!==this.#u.data&&(this.#o=this.#s),(0,c.VS)(t,e)||(this.#n=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#f.size)return!0;let s=new Set(r??this.#f);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&s.has(t))})()}))}#v(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#s)return;let t=this.#s;this.#s=e,this.#i=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#R()}#C(e){n.Vr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function l(e,t){return!1!==(0,c.Nc)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,c.Nc)(t.enabled,e)&&"static"!==(0,c.KC)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&f(e,t)}return!1}function p(e,t,r,s){return(e!==t||!1===(0,c.Nc)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&f(e,r)}function f(e,t){return!1!==(0,c.Nc)(t.enabled,e)&&e.isStaleByTime((0,c.KC)(t.staleTime,e))}var y=r(67294),R=r(30202);r(85893);var b=y.createContext((s=!1,{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s})),Q=()=>y.useContext(b),v=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOnMount=!1)},m=e=>{y.useEffect(()=>{e.clearReset()},[e])},g=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&void 0===e.data||(0,c.L3)(r,[e.error,s])),I=y.createContext(!1),C=()=>y.useContext(I);I.Provider;var O=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},T=(e,t)=>e.isLoading&&e.isFetching&&!t,S=(e,t)=>e?.suspense&&t.isPending,E=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function x(e,t){return function(e,t,r){let s=C(),i=Q(),u=(0,R.NL)(r),a=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=s?"isRestoring":"optimistic",O(a),v(a,i),m(i);let h=!u.getQueryCache().get(a.queryHash),[o]=y.useState(()=>new t(u,a)),l=o.getOptimisticResult(a),d=!s&&!1!==e.subscribed;if(y.useSyncExternalStore(y.useCallback(e=>{let t=d?o.subscribe(n.Vr.batchCalls(e)):c.ZT;return o.updateResult(),t},[o,d]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),y.useEffect(()=>{o.setOptions(a)},[a,o]),S(a,l))throw E(a,o,i);if(g({result:l,errorResetBoundary:i,throwOnError:a.throwOnError,query:u.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if(u.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!c.sk&&T(l,s)){let e=h?E(a,o,i):u.getQueryCache().get(a.queryHash)?.promise;e?.catch(c.ZT).finally(()=>{o.updateResult()})}return a.notifyOnChangeProps?l:o.trackResult(l)}(e,o,t)}}}]);