PageSourceSearch

https://www.carbonarc.co/assets/ScrollingBanner-B2_Mvpwf.js

js carbonarc.co collected 2026-09-29 16:02:12 UTC 11,914 bytes, 6 lines download raw bytes

vendor: 5,370 bytes, lines 1-6
1import{r as m,j as i}from"./vendor-react-CF2OuAXi.js";import{T as L}from"./useActiveTickers-DCW8E6sI.js";import{M as U}from"./index-DM0mLPnK.js";import{c as G,e as X,a as _,b as Z,x as $}from"./index-CQwFLP6K.js";import{j as K}from"./vendor-flowbite-BOOFXkYC.js";import{l as Y}from"./index-BGEK4vbP.js";import{u as J}from"./usePrefersReducedMotion-DbirlVE7.js";import{I as Q}from"./info-CxKaq-GJ.js";import{C as ee}from"./circle-alert-DZfmeYyY.js";import{S as te}from"./star-C6GU8_qu.js";import{C as re}from"./circle-check-big-CQCXwlO4.js";import{C as ne}from"./chevron-right-nK9qNL-G.js";import{p as oe,s as C,k as se,v as ce,l as le}from"./index-C2nmEbhP.js";import"./dayjs.min-CcXI944o.js";import"./vendor-query-Dru8Ryjt.js";import"./vendor-okta-DqkOGBPB.js";import"./vendor-router-1lxCfBys.js";import"./vendor-datadog-tM0hMiRH.js";import"./vendor-i18n-D8V0Brmg.js";/**
2 * @license lucide-react v0.556.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ie=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],ae=G("video",ie),j=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],M={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...j,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...j],h2:[["className","sr-only"]],img:[...j,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...j,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...j],table:[...j],ul:[...j,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},w={}.hasOwnProperty;function fe(e,t){let r={type:"root",children:[]};const n={schema:t?{...M,...t}:M,stack:[]},s=F(n,e);return s&&(Array.isArray(s)?s.length===1?r=s[0]:r.children=s:r=s),r}function F(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return ue(e,r);case"doctype":return pe(e,r);case"element":return de(e,r);case"root":return me(e,r);case"text":return he(e,r)}}}function ue(e,t){if(e.schema.allowComments){const r=typeof t.value=="string"?t.value:"",n=r.indexOf("-->"),o={type:"comment",value:n<0?r:r.slice(0,n)};return A(o,t),o}}function pe(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return A(r,t),r}}function de(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const n=q(e,t.children),s=ge(e,t.properties);e.stack.pop();let o=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(o=!0,e.schema.ancestors&&w.call(e.schema.ancestors,r))){const h=e.schema.ancestors[r];let a=-1;for(o=!1;++a<h.length;)e.stack.includes(h[a])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;const l={type:"element",tagName:r,properties:s,children:n};return A(l,t),l}function me(e,t){const n={type:"root",children:q(e,t.children)};return A(n,t),n}function he(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return A(n,t),n}function q(e,t){const r=[];if(Array.isArray(t)){const n=t;let s=-1;for(;++s<n.length;){const o=F(e,n[s]);o&&(Array.isArray(o)?r.push(...o):r.push(o))}}return r}function ge(e,t){const r=e.stack[e.stack.length-1],n=e.schema.attributes,s=e.schema.required,o=n&&w.call(n,r)?n[r]:void 0,l=n&&w.call(n,"*")?n["*"]:void 0,h=t&&typeof t=="object"?t:{},a={};let c;for(c in h)if(w.call(h,c)){const u=h[c];let p=B(e,D(o,c),c,u);p==null&&(p=B(e,D(l,c),c,u)),p!=null&&(a[c]=p)}if(s&&w.call(s,r)){const u=s[r];for(c in u)w.call(u,c)&&!w.call(a,c)&&(a[c]=u[c])}return a}function B(e,t,r,n){return t?Array.isArray(n)?be(e,t,r,n):V(e,t,r,n):void 0}function be(e,t,r,n){let s=-1;const o=[];for(;++s<n.length;){const l=V(e,t,r,n[s]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function V(e,t,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="str
6ing")&&ye(e,r,n)){if(typeof t=="object"&&t.length>1){let s=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(n))){s=!0;break}}else if(l===n){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+n:n}}function ye(e,t,r){const n=e.schema.protocols&&w.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||n.length===0)return!0;const s=String(r),o=s.indexOf(":"),l=s.indexOf("?"),h=s.indexOf("#"),a=s.indexOf("/");if(o<0||a>-1&&o>a||l>-1&&o>l||h>-1&&o>h)return!0;let c=-1;for(;++c<n.length;){const u=n[c];if(o===u.length&&s.slice(0,u.length)===u)return!0}return!1}function A(e,t){const r=oe(t);t.data&&(e.data=C(t.data)),r&&(e.position=r)}function D(e,t){let r,n=-1;if(e)for(;++n<e.length;){const s=e[n],o=typeof s=="string"?s:s[0];if(o===t)return s;o==="data*"&&(r=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return r}function xe(e){return function(t){return fe(t,e)}}const ve=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,we=/^[a-zA-Z]:\\/;function Ne(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return we.test(e)?!1:ve.test(e)}const ke=["http","https"],Se=["nofollow"],je={};function Le(e){const t=e||je,r=t.protocols||ke,n=se(t.test);return function(s){ce(s,"element",function(o,l,h){if(o.tagName==="a"&&typeof o.properties.href=="string"&&n(o,l,h)){const a=o.properties.href;if(Ne(a)?r.includes(a.slice(0,a.indexOf(":"))):a.startsWith("//")){const c=E(t.content,o),u=c&&!Array.isArray(c)?[c]:c,p=E(t.rel,o)||Se,N=typeof p=="string"?le(p):p,k=E(t.target,o),b=E(t.properties,o);if(b&&Object.assign(o.properties,C(b)),N.length>0&&(o.properties.rel=[...N]),k&&(o.properties.target=k),u){const R=E(t.contentProperties,o)||{};o.children.push({type:"element",tagName:"span",properties:C(R),children:C(u)})}}}})}}function E(e,t){return typeof e=="function"?e(t):e}const Ge=({activeTickers:e,hasActiveTickers:t,isLoading:r,isError:n})=>{const s=J(),{resolvedTheme:o}=X(),[l,h]=m.useState(!1),[a,c]=m.useState(!1),[u,p]=m.useState(!1),N=m.useRef(null),k=m.useRef(null),b=m.useRef(null),R=m.useRef(null),T=m.useRef(0),S=m.useRef(!1),W=m.useRef(s),H=m.useMemo(()=>({[L.Info]:{color:"bannerInfo",icon:i.jsx(Q,{size:12}),label:"INFO"},[L.Warning]:{color:"bannerWarning",icon:i.jsx(Y,{size:12}),label:"WARNING"},[L.Alert]:{color:"bannerAlert",icon:i.jsx(ee,{size:12}),label:"ALERT"},[L.Live]:{color:"bannerLive",icon:i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx("span",{className:_("relative inline-flex h-1 w-1 rounded-full bg-fuchsia-300 shadow-fuchsia-600",{"animate-pulse":!s})}),i.jsx(ae,{size:12})]}),label:"LIVE"},[L.New]:{color:"bannerNew",icon:i.jsx(te,{size:12}),label:"NEW"},[L.Success]:{color:"bannerSuccess",icon:i.jsx(re,{size:12}),label:"COMPLETED"}}),[s]),O=t&&!r&&!n;m.useEffect(()=>{S.current=u},[u]),m.useEffect(()=>{W.current=s},[s]),m.useEffect(()=>{const d=(Z.tickerSpeed||30)*.8/60;return R.current=setInterval(()=>{if(S.current||W.current)return;const f=N.current,x=k.current;if(!f||!x)return;const v=x.scrollWidth/2;if(v<=0||f.clientWidth===0)return;T.current+=d;const g=Math.floor(T.current);g!==0&&(T.current-=g,f.scrollLeft+=g,f.scrollLeft>=v&&(f.scrollLeft=f.scrollLeft-v))},16),()=>{R.current&&clearInterval(R.current)}},[]),m.useEffect(()=>{const y=N.current;if(!y)return;const d=f=>{const x=k.current;if(!x)return;const v=f.deltaX||(f.shiftKey?f.deltaY:0);if(v!==0){f.preventDefault(),f.stopPropagation();const g=x.scrollWidth/2;if(g<=0)return;p(!0),S.current=!0;let P=y.scrollLeft+v;P=(P%g+g)%g,y.scrollLeft=P,b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{p(!1),S.current=!1},1e3)}};return y.addEventListener("wheel",d,{passive:!1}),()=>{y.removeEventListener("wheel",d),b.current&&clearTimeout(b.current),p(!1),S.current=!1}},[O]);const z=y=>{const d=N.current,f=k.current;if(!d||!f)return;const x=f.scrollWidth/2;if(x<=0)return;p(!0),S.current=!0;const v=y==="left"?-150:150;let g=d.scrollLeft+v;g=(g%x+x)%x,d.scrollLeft=g,b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{p(!1),S.current=!1},1e3)},I=y=>e.map(d=>{const f=d!=null&&d.type?H[d.type]:null;return i.jsxs("div",{className:"flex items-center justify-center gap-2 py-2 px-10 text-xs shrink-0 whitespace-nowrap mx-auto",children:[f&&i.jsx(K,{className:"rounded-xl text-xs py-1",color:f.color,children:i.jsxs("span",{className:"flex items-center gap-1 text-xs font-semibold",children:[f.icon,f.label]})}),i.jsx(U,{className:"inline !text-xs !bg-transparent [&_a]:text-ca-signalOrange [&_a:hover]:text-ca-signalOrange/80",wrapperElement:{"data-color-mode":o},source:d.message,rehypePlugins:[xe,[Le,{target:"_blank",rel:["noopener","noreferrer","nofollow"]}]]})]},`${d.id}-${y}`)});return O?i.jsxs("div",{className:_("backdrop-blur-xl border-b border-border/50 flex items-center h-11 relative group",{"bg-[linear-gradient(90deg,_#141414_0%,_rgba(249,115,22,0.1)_50%,_#141414_100%)]":o==="dark","bg-[linear-gradient(90deg,_#ffffff_0%,_rgba(249,115,22,0.1)_50%,_#ffffff_100%)]":o!=="dark"}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[i.jsx("button",{type:"button",className:_("absolute left-0 z-10 h-full px-2 flex items-center justify-center","bg-gradient-to-r from-background/90 to-transparent","transition-opacity duration-200","hover:from-background","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",{"opacity-100":l||a,"opacity-0 pointer-events-none":!l&&!a}),onClick:()=>z("left"),onFocus:()=>c(!0),onBlur:()=>c(!1),"aria-label":"Scroll left",children:i.jsx($,{size:20,className:"text-foreground
6/70 hover:text-foreground transition-colors"})}),i.jsx("button",{type:"button",className:_("absolute right-0 z-10 h-full px-2 flex items-center justify-center","bg-gradient-to-l from-background/90 to-transparent","transition-opacity duration-200","hover:from-background","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",{"opacity-100":l||a,"opacity-0 pointer-events-none":!l&&!a}),onClick:()=>z("right"),onFocus:()=>c(!0),onBlur:()=>c(!1),"aria-label":"Scroll right",children:i.jsx(ne,{size:20,className:"text-foreground/70 hover:text-foreground transition-colors"})}),i.jsx("div",{ref:N,className:"overflow-x-hidden w-full",children:i.jsxs("div",{ref:k,className:"flex flex-nowrap",children:[i.jsx("div",{className:"flex flex-nowrap min-w-full shrink-0",children:I("first")}),i.jsx("div",{className:"flex flex-nowrap min-w-full shrink-0",children:I("second")})]})})]}):null};export{Ge as default};

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.