PageSourceSearch

https://www.brother-usa.com/mobify/bundle/1020/nav-bar-vertical-nav-bar.js

js brother-usa.com collected 2026-09-24 08:32:57 UTC 4,390 bytes, 1 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[6097],{88990:(e,t,n)=>{n.r(t),n.d(t,{default:()=>f});var l=n(59714),r=n(10551),o=n(59146),i=n(77810),c=n(60946),a=n(29370),u=n(63391),d=n(67234),s=n(40795),v=n(78041);const f=({content:e,topNavHeight:t=0})=>{var n,f;const m=(null==e?void 0:e.navItems)??[],[g,p]=(0,i.useState)({}),[b,E]=(0,i.useState)(null),h=(0,i.useRef)(!1),x=(0,i.useRef)(),R=(0,i.useRef)(null),y=null==g||null===(n=g.contentReference)||void 0===n?void 0:n.id;(0,i.useEffect)((()=>{(null==m?void 0:m.length)>0&&p(null==m?void 0:m[0])}),[m]),(0,i.useEffect)((()=>{var n;if(null==e||null===(n=e.navItems)||void 0===n||!n.length)return;const l={root:null,rootMargin:`-${t}px 0px -20% 0px`,threshold:[0,.2,.5,.8,1]},r=new Map,o=new IntersectionObserver((n=>{var l;if(h.current)return;n.forEach((e=>{r.set(e.target.id,{isIntersecting:e.isIntersecting,ratio:e.intersectionRatio,top:e.boundingClientRect.top,bottom:e.boundingClientRect.bottom})}));const o=e.navItems.map((e=>{var t;const n=r.get(null==e||null===(t=e.contentReference)||void 0===t?void 0:t.id);return n&&n.isIntersecting?{item:e,visibility:n}:null})).filter(Boolean);if(0===o.length){const e=r.get(y);return void(e&&e.isIntersecting&&e.ratio)}o.sort(((e,n)=>Math.abs(e.visibility.top-t)-Math.abs(n.visibility.top-t)));const i=o[0].item;(null==i||null===(l=i.contentReference)||void 0===l?void 0:l.id)!==y&&p(i)}),l);return e.navItems.forEach((e=>{var t;const n=document.getElementById(null==e||null===(t=e.contentReference)||void 0===t?void 0:t.id);n&&o.observe(n)})),()=>{o.disconnect()}}),[m,t,y]);const w=(n,l=0,r=-t)=>{const o=document.getElementById(n);if(!o)return;const i=e.navItems.find((e=>{var t;return(null==e||null===(t=e.contentReference)||void 0===t?void 0:t.id)===n}));i&&p(i),h.current=!0,R.current&&clearTimeout(R.current);const c=o.getBoundingClientRect().top+window.pageYOffset+r-l,a=()=>{E(null),R.current=setTimeout((()=>{h.current=!1}),500),window.removeEventListener("scrollend",a)};R.current=setTimeout((()=>{h.current=!1}),1500),window.addEventListener("scrollend",a,{once:!0}),window.scrollTo({top:c,behavior:"smooth"})},I=()=>{x.current};return(0,i.useEffect)((()=>{const e=x.current;if(e)return I(),e.addEventListener("scroll",I),()=>e.removeEventListener("scroll",I)}),[]),(0,i.useEffect)((()=>()=>{R.current&&clearTimeout(R.current)}),[]),i.createElement(i.Fragment,null,i.createElement(l.qX,{display:{base:"none",xl:"block"}},i.createElement(r.T,{align:"flex-start",spacing:4,py:10,paddingLeft:20,paddingRight:10},null==e||null===(f=e.navItems)||void 0===f?void 0:f.map((e=>{var t,n,l,r;return i.createElement(o.a,{as:"button",onClick:()=>{var t;w(null==e||null===(t=e.contentReference)||void 0===t?void 0:t.id)},key:null==e||null===(t=e.contentReference)||void 0===t?void 0:t.id,textStyle:(null==e||null===(n=e.contentReference)||void 0===n?void 0:n.id)===y?"ctaLarge":"body2",width:"auto",color:(null==e||null===(l=e.contentReference)||void 0===l?void 0:l.id)===y?"brand.brotherBlue":"brand.gray600black",whiteSpace:"nowrap",textAlign:"left",textDecoration:(null==e||null===(r=e.contentReference)||void 0===r?void 0:r.id)===y?"underline":"none"},e.label)})))),i.createElement(l.cD,{display:{base:"block",xl:"none"}},i.createElement(c.n,{index:b,onChange:e=>E(e===b?null:e),allowToggle:!0},i.createElement(a.A,{borderColor:"brand.gray200"},(({isExpanded:t})=>{var n,l;return i.createElement(i.Fragment,null,i.createElement(u.J,{px:6,py:"14px",ref:x},i.createElement(d.s,{flex:1,gap:2,alignItems:"center"},i.createElement(v.ZL,{width:"20px",height:"20px"}),i.createElement(o.a,{as:"button",textStyle:"ctaSmall",flex:"1",textAlign:"left",color:"brand.gray600black"},null==g?void 0:g.label)),i.createElement(v.D3,{width:"20px",height:"20px"})),i.createElement(s.v,{px:6,py:"14px"},i.createElement(r.T,{align:"flex-start",spacing:2},null==e||null===(n=e.navItems)||void 0===n||null===(l=n.filter((e=>{var t;return(null==e||null===(t=e.contentReference)||void 0===t?void 0:t.id)!==y})))||void 0===l?void 0:l.map((e=>{var t;return i.createElement(o.a,{as:"button",onClick:()=>{var t;w(null==e||null===(t=e.contentReference)||void 0===t?void 0:t.id,48)},key:null==e||null===(t=e.contentReference)||void 0===t?void 0:t.id,textStyle:"ctaSmall",width:"auto",color:"brand.gray600black",whiteSpace:"nowrap",textAlign:"left"},e.label)})))))})))))}}}]);

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.