Module 71855

2,049 characters · in no known chunk
Dependencies
Required by (4)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{LI:()=>g,cq:()=>S,m2:()=>m,v5:()=>N});var i=n(627968),r=n(64700),s=n(503698),a=n.n(s),o=n(939249),l=n(793322),u=n(174768),d=n(908031),c=n(155545),_=n(561155),h=n(723702),f=n(19575),E=n(375708),p=n(666044);function m(e){let{isPopoutWindow:t}=e;return t?"refresh-title-bar-small":void 0}function g(e){let{isPopoutWindow:t}=e;return t?16:24}function A(e){return f.Ay.maximize(e)}function I(e){e.stopPropagation()}function T(e){let{windowKey:t,showDivider:n}=e,r=(0,i.jsx)(o.D,{className:a()(p.R6,p.d1),onClick:()=>f.Ay.close(t),"aria-label":E.intl.string(E.t.ZdNUj2),tabIndex:-1,children:(0,i.jsx)(d.A,{})}),s=(0,i.jsx)(o.D,{className:a()(p.R6,p.T0),onClick:()=>A(t),"aria-label":E.intl.string(E.t.G1u0hK),tabIndex:-1,children:(0,i.jsx)(c.A,{})}),l=(0,i.jsx)(o.D,{className:a()(p.R6,p.T0),onClick:()=>f.Ay.minimize(t),"aria-label":E.intl.string(E.t.CxOC4U),tabIndex:-1,children:(0,i.jsx)(_.A,{})});return(0,i.jsxs)("div",{className:a()(p.kU,{[p.Fx]:n}),children:[l,s,r]})}function S(e){let{leading:t,title:n,trailing:s,windowKey:o,className:l}=e,u=(0,h.getPlatform)(),d=r.useCallback(()=>A(o),[o]),c=u===h.PlatformTypes.WINDOWS||u===h.PlatformTypes.LINUX;return(0,i.jsxs)("div",{className:a()(p.M0,l),onDoubleClick:d,"data-window-chrome":"true",children:[(0,i.jsx)("div",{className:p.R4,onDoubleClick:I,children:t}),(0,i.jsx)("div",{className:p.DD,children:n}),(0,i.jsxs)("div",{className:p.ZY,onDoubleClick:I,children:[s,c&&(0,i.jsx)(T,{windowKey:o,showDivider:null!=s})]})]})}function N(e){let{fixed:t=!1,show:n,windowKey:s,isLayerOpen:o}=e,d=(0,h.getPlatform)(),c=r.useCallback(()=>{u.A.isOpen()&&(0,l.jD)()},[]),_=r.useCallback(()=>{let e=u.A.getLastShowTimestamp();null!=e&&Date.now()-e<1e3||A(s)},[s]),f=d===h.PlatformTypes.WINDOWS;if(d===h.PlatformTypes.WEB)return null;let E=f||d===h.PlatformTypes.LINUX;return(0,i.jsx)("div",{className:a()(p.M0,p.bN,{[p.Zu]:t,[p.WU]:n,[p.dS]:o}),onClick:c,onDoubleClick:_,children:E&&(0,i.jsx)("div",{className:p.ZY,onDoubleClick:I,children:(0,i.jsx)(T,{windowKey:s})})})}}