Build 574548stable
Module 597619
2,112 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{xb:()=>m,fs:()=>g});var i=n(627968),r=n(64700),s=n(503698),a=n.n(s),o=n(607399),l=n(17928),u=n(112834),c=n(964486),d=n(775602),_=n(723702),h=n(354328),f=n(742023),E=n(19575);let p=r.createContext({lang:"",style:"",className:"",focused:!1});function m(){let e=r.useContext(p);if(void 0===e)throw Error("useRootElementContext must be used within a RootElementContextProvider");return e}function g(e){let t,{rootClassName:n,lang:s,theme:m,density:g,focused:A,fontScale:I,fontScaleClass:T,mouseMode:S,keyboardModeEnabled:N,saturation:C,desaturateUserColors:y,useForcedColors:O,systemForcedColors:R,useReducedMotion:v,alwaysShowLinkDecorations:b,hardwareAccelerationEnabled:L,highContrastMode:D,isPopoutWindow:w,children:P}=e,M=window.CSS.supports("selector(::-webkit-scrollbar)"),x=(0,l.bG)([d.Ay],()=>d.Ay.zoom),U=w?"":`--custom-zoom: ${x};`,k=(0,h.A)("highlight_mana_buttons"),G=(0,h.A)("highlight_mana_components"),V=(0,h.A)("highlight_mana_text"),F=(0,h.A)("highlight_void_toggleables"),B=(0,h.A)("highlight_void_buttons"),H=(0,l.bG)([f.Ay],()=>f.Ay.hdrDynamicRange),j=`font-size: ${I}%; --saturation-factor: ${C}; dynamic-range-limit: ${H}; ${U}`,W=a()((t="",(0,_.isWindows)()?t="platform-win":(0,_.isMac)()?t="platform-osx":(0,_.isLinux)()?t="platform-linux":(0,_.isWeb)()&&(t="platform-web"),__OVERLAY__?`${t} platform-overlay`:t),(0,u.m)(m),`density-${g}`,T,{"low-saturation":C<=.4,"keyboard-mode":N,"decorate-links":b,"no-webkit-scrollbar":!M,"has-webkit-scrollbar":M,"mouse-mode":S,"reduce-motion":v,"full-motion":!v,"is-mobile":o.Fr,"app-focused":A,"desaturate-user-colors":y,"disable-forced-colors":!O&&"active"===R,"enable-forced-colors":O,"visual-refresh":!0,"hardware-acceleration-disabled":!L,"visual-refresh-chat-input":!1,"highlight-mana-buttons":k,"highlight-mana-components":G,"highlight-mana-text":V,"highlight-void-toggleables":F,"highlight-void-buttons":B,"high-contrast-mode":D},n),Y=r.useMemo(()=>({lang:s,style:j,className:W,focused:A}),[s,j,W,A]);return(0,c.Ay)(()=>{E.Ay.setTrafficLightPosition({x:9,y:9})}),(0,i.jsx)(p.Provider,{value:Y,children:P})}}