1"use strict";(self.webpackChunk_overleaf_web=self.webpackChunk_overleaf_web||[]).push([[7001],{76431(e,n,t){t.d(n,{A:()=>l});var s=t(44273),i=t(25500),r=t(67785);function l(e){let{children:n}=e;const{isInfrastructureInitialized:t}=(0,r.D)();return t?(0,s.jsx)("div",{className:"writefull",children:(0,s.jsx)(i.Ht,{children:n})}):null}},53879(e,n,t){t.r(n),t.d(n,{default:()=>p});var s=t(44273),i=t(66485),r=t(25500),l=t(94667),o=t(74463),u=(t(54573),t(68063)),a=t(53568),c=t(54834),d=t(21443),f=t(76431),A=t(11042);function g(){const e=(0,r.rt)(o.M),n=(0,i.useRef)(null),t=(0,i.useCallback)(()=>{e.scrollSelectionIntoView().then(()=>{requestAnimationFrame(()=>{const e=n.current?.getBoundingClientRect();e&&(0,l.$)({x:e.right+40,y:e.bottom},"editor")})})},[e]);return(0,s.jsx)(A.A,{id:"editor-floating-menu-ai",description:(0,d.A)("writing-tools"),overlayProps:{placement:"right"},children:(0,s.jsx)("button",{ref:n,type:"button",className:"editor-floating-menu-button",onClick:t,"aria-label":(0,d.A)("writing-tools"),children:(0,s.jsx)(a.A,{sizePx:20})})})}function p(){return(0,u.Ay)(e=>!!e.session?.user)?(0,s.jsx)(f.A,{children:(0,s.jsx)(c.A,{children:(0,s.jsx)(g,{})})}):null}},54573(e,n,t){t.d(n,{A:()=>u});var s=t(44273),i=t(66485),r=t(13947),l=t(39439),o=t(90072);
1function u(e){let{configuration:n,scrollContainer:t,onOpen:u,onClose:a}=e;const c=(0,i.useRef)(null),d=(0,i.useRef)(a),f=r.Ay.use.position(),A=r.Ay.use.isOpen(),g=r.Ay.use.draggableArea(),p=r.Ay.use.resizableArea(),x=r.Ay.use.triggerSelector(),b=(0,r.Ay)(e=>!!e.pinData?.on),h=r.Ay.use.pinData(),y=r.Ay.use.close(),m=r.Ay.use.pin(),C=r.Ay.use.unpin(),j=(0,i.useMemo)(()=>({mainAxis:0,crossAxis:-40}),[]),k=(0,i.useCallback)(e=>{e||y()},[y]),v=(0,i.useCallback)(()=>{if(b)C();else{const{x:e,y:n}=c.current.getBoundingClientRect(),{width:t,height:s}=p.getBoundingClientRect();m(t,s,e+40,n)}},[b,p,m,C]);return(0,i.useEffect)(()=>{d.current=a},[a]),(0,i.useEffect)(()=>{A||d.current()},[A]),f?(0,s.jsx)(l.A,{open:A,setOpen:k,x:h?.position.x??f?.x,y:h?.position.y??f?.y,offsetPx:j,placement:"bottom-start",className:"pointer-events-none",scrollInContainer:t,onScrollInContainerEnd:u,disableFlip:!0,usesPortal:!1,outsidePressExcludedElements:x?[x]:[],draggable:{area:g,enabled:!b},children:(0,s.jsx)("div",{ref:c,children:(0,s.jsx)(o.A,{configuration:n,onPinClick:v})})}):null}}}]);
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.