Build 533169stable
Module 775602
8,042 characters · in no known chunkDependencies
Required by (306)
18784103103681601919333211612157421653284952969736075372054128041431458375592663104660046732769217758258203892911943439483696304101928102119105220106236109638112753112847120120123653125248129185129800133266133343135834147025147905148355155940158265159218159495166005168675169909171593173971176031176228176563177366180798183802189244189628194241194267194867195898198525202315203480215050216409223352223938227273227542229289229374231911245068249584251494253292258024258836260762260821261056268473272053273875278115282357288048291224296838297524298305302487303136321565326180326337327247329449332408337953338932341645344904351966355205355971358731359094362205370968371648371731371741373054375499376310377108380450386404394388396533397274398828402385403528406975412484414872415441417454420706421116430580439053444792446514447453450373456459463042463930471107483270487401493819494573499369501007502229508160508480508983513265515038518491518620523084524628530971535646537174542678543428544028546350551309556525558394563014565057568602570763572211572855575293580424593284597551601659602853607123607470609405611635613306625846629199635071635157638635639289642733646764653145654107664111665346665450672341678891679970684492692798693661697138697865698718698779701663706787712209713081713457713517728713733188742860746793749401750112754736755588763582780042781696783569802790803203806677807098807905809115811611812136813156815082815280816395817176817533819265823016824994828100829444829861830126836261837163839727841985844526844581848295850730861672862933871751875022877156877695877923879472883662885041891734898280899682901319903403907495907745910692913423920437921066923917928039929400933378933639933917938191948607950072951707951727953963955572969488970812975189975616984742988436990208991275994763997579998986999235
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>W,_:()=>_});var r=n(311907),i=n(506774),s=n(582754),a=n(73153),o=n(253932),l=n(617617),u=n(353835),c=n(652215),d=n(381941),_=function(e){return e.DEFAULT="default",e.HIGH="high",e}({});let f={fontSize:c.hH7.FONT_SIZE_DEFAULT,zoom:c.hH7.ZOOM_DEFAULT,keyboardModeEnabled:!1,contrastMode:"default",colorblindMode:!1,lowContrastMode:!1,saturation:1,contrast:1,desaturateUserColors:!1,forcedColorsModalSeen:!1,keyboardNavigationExplainerModalSeen:!1,messageGroupSpacing:null,systemPrefersReducedMotion:"no-preference",systemPrefersCrossfades:!1,prefersReducedMotion:"auto",systemForcedColors:"none",syncForcedColors:!0,systemPrefersContrast:"no-preference",alwaysShowLinkDecorations:!1,roleStyle:"username",displayNameStylesEnabled:!0,submitButtonEnabled:!1,syncProfileThemeWithUserTheme:!1,enableCustomCursor:!0,switchIconsEnabled:!1},p=f,h={12:"font-size-12",14:"font-size-14",15:"font-size-15",16:"font-size-16",18:"font-size-18",20:"font-size-20",24:"font-size-24"};function m(e){return c.hH7.FONT_SIZES.indexOf(e)>=0?e:c.hH7.FONT_SIZE_DEFAULT}function E(e){let t=m(e.fontSize);if(t>c.hH7.FONT_SIZE_MAX||t<c.hH7.FONT_SIZE_MIN||p.fontSize===t)return!1;(p={...p}).fontSize=t}function g(e){if(e.zoom<c.hH7.ZOOM_MIN||e.zoom>c.hH7.ZOOM_MAX||p.zoom===e.zoom)return!1;(p={...p}).zoom=e.zoom,u.A.setZoomFactor(p.zoom)}function A(){let e=p.fontSize!==c.hH7.FONT_SIZE_DEFAULT,t=p.zoom!==c.hH7.ZOOM_DEFAULT;if(!e&&!t)return!1;(p={...p}).fontSize!==c.hH7.FONT_SIZE_DEFAULT&&(p.fontSize=c.hH7.FONT_SIZE_DEFAULT),p.zoom!==c.hH7.ZOOM_DEFAULT&&(p.zoom=c.hH7.ZOOM_DEFAULT,u.A.setZoomFactor(p.zoom))}function I(){if(p.keyboardModeEnabled)return!1;(p={...p}).keyboardModeEnabled=!0}function T(){if(!p.keyboardModeEnabled)return!1;(p={...p}).keyboardModeEnabled=!1}function S(){(p={...p}).colorblindMode=!p.colorblindMode}function y(){(p={...p}).lowContrastMode=!p.lowContrastMode}function v(e){p.syncForcedColors=e.syncForcedColors}function N(e){(p={...p}).saturation=e.saturation}function C(){(p={...p}).desaturateUserColors=!p.desaturateUserColors}function R(e){p.roleStyle=e.roleStyle}function O(e){p.displayNameStylesEnabled=e.enabled}function b(){(p={...p}).submitButtonEnabled=!p.submitButtonEnabled}function D(){(p={...p}).syncProfileThemeWithUserTheme=!p.syncProfileThemeWithUserTheme}function L(e){if(p.systemPrefersReducedMotion===e.systemPrefersReducedMotion)return!1;p={...p,systemPrefersReducedMotion:e.systemPrefersReducedMotion}}function w(e){if(p.systemPrefersCrossfades===e.systemPrefersCrossfades)return!1;p={...p,systemPrefersCrossfades:e.systemPrefersCrossfades}}function M(e){if(p.prefersReducedMotion===e.prefersReducedMotion)return!1;p={...p,prefersReducedMotion:e.prefersReducedMotion}}function P(e){if(p.systemPrefersContrast===e.systemPrefersContrast)return!1;p={...p,systemPrefersContrast:e.systemPrefersContrast}}function x(e){p={...p,alwaysShowLinkDecorations:e.alwaysShowLinkDecorations}}function k(e){p={...p,enableCustomCursor:e.enableCustomCursor}}function U(e){return p={...p,systemForcedColors:e.systemForcedColors??"none"},!0}function G(){p.forcedColorsModalSeen=!0}function F(){p={...p,keyboardNavigationExplainerModalSeen:!0}}function V(e){let{messageGroupSpacing:t}=e;p={...p,messageGroupSpacing:t}}function B(e){let{contrast:t}=e;p={...p,contrast:t}}function H(e){let{contrastMode:t}=e;p={...p,contrastMode:t}}function j(e){p={...p,switchIconsEnabled:e.switchIconsEnabled}}class Y extends r.Ay.DeviceSettingsStore{static displayName="AccessibilityStore";static persistKey="AccessibilityStore";static migrations=[()=>{let e="a11yFontScale",t="a11yZoom",n="a11yColorblindMode",r=i.w.get(e)||100,s=i.w.get(t)||c.hH7.ZOOM_DEFAULT,a=i.w.get(n)||!1;return i.w.remove(e),i.w.remove(t),i.w.remove(n),{fontScale:r,zoom:s,colorblindMode:a,keyboardModeEnabled:!1}},e=>{let{fontScale:t,...n}=e,r=16;switch(t){case 82:r=12;break;case 92:r=15;break;case 100:r=16;break;case 110:r=18;break;case 125:r=20;break;case 150:r=24}return{...n,fontSize:r}},e=>({...e,darkSidebar:!1}),e=>({...e,messageGroupSpacing:null}),e=>({...e,systemPrefersReducedMotion:"no-preference",prefersReducedMotion:"auto"}),e=>({...e,alwaysShowLinkDecorations:e.saturation<=s.yv}),e=>({...e,disableVoiceBackgrounds:!1}),e=>{try{delete e.disableVoiceBackgrounds}catch(e){}return e},e=>{try{delete e.hideGuildTags}catch(e){}return e},e=>({...e,enableCustomCursor:!0})];initialize(e){this.waitFor(l.A),isNaN((p={...f,...e??null}).fontSize)&&(p.fontSize=c.hH7.FONT_SIZE_DEFAULT),0>d.qh.indexOf(null!=p.messageGroupSpacing?p.messageGroupSpacing:-1)&&(p.messageGroupSpacing=null)}get fontScale(){return p.fontSize/c.hH7.FONT_SIZE_DEFAULT*100}get fontSize(){return p.fontSize}get isFontScaledUp(){return p.fontSize>c.hH7.FONT_SIZE_DEFAULT}get isFontScaledDown(){return p.fontSize<c.hH7.FONT_SIZE_DEFAULT}get fontScaleClass(){let e=h[this.fontSize]??"";return this.isFontScaledUp?`a11y-font-scaled-up ${e}`:this.isFontScaledDown?`a11y-font-scaled-down ${e}`:`${e}`}get zoom(){return p.zoom}get isZoomedIn(){return p.zoom>c.hH7.ZOOM_DEFAULT}get isZoomedOut(){return p.zoom<c.hH7.ZOOM_DEFAULT}get keyboardModeEnabled(){return p.keyboardModeEnabled}get colorblindMode(){return p.colorblindMode}get lowContrastMode(){return p.lowContrastMode}get saturation(){return p.saturation}get contrast(){return p.contrast}get desaturateUserColors(){return p.desaturateUserColors}get forcedColorsModalSeen(){return p.forcedColorsModalSeen}get keyboardNavigationExplainerModalSeen(){return p.keyboardNavigationExplainerModalSeen}get messageGroupSpacing(){return null!=p.messageGroupSpacing?p.messageGroupSpacing:o.hH.getSetting()?d.y5:d.ES}get isMessageGroupSpacingIncreased(){let e=o.hH.getSetting()?d.y5:d.ES;return this.messageGroupSpacing>e}get isMessageGroupSpacingDecreased(){let e=o.hH.getSetting()?d.y5:d.ES;return this.messageGroupSpacing<e}get isSubmitButtonEnabled(){return p.submitButtonEnabled}get syncProfileThemeWithUserTheme(){return p.syncProfileThemeWithUserTheme}get systemPrefersReducedMotion(){return p.systemPrefersReducedMotion}get rawPrefersReducedMotion(){return p.prefersReducedMotion}get useReducedMotion(){switch(p.prefersReducedMotion){case"no-preference":return!1;case"reduce":return!0;default:return"reduce"===p.systemPrefersReducedMotion}}get systemForcedColors(){return p.systemForcedColors}get syncForcedColors(){return p.syncForcedColors}get useForcedColors(){return!!p.syncForcedColors&&"active"===p.systemForcedColors}get systemPrefersContrast(){return p.systemPrefersContrast}get systemPrefersCrossfades(){return p.systemPrefersCrossfades}get alwaysShowLinkDecorations(){return p.alwaysShowLinkDecorations}get enableCustomCursor(){return p.enableCustomCursor}get roleStyle(){return p.roleStyle}get displayNameStylesEnabled(){return p.displayNameStylesEnabled}get isHighContrastModeEnabled(){return"high"===p.contrastMode}get isSwitchIconsEnabled(){return p.switchIconsEnabled}getUserAgnosticState(){return p}}let W=new Y(a.h,{ACCESSIBILITY_SET_FONT_SIZE:E,ACCESSIBILITY_SET_ZOOM:g,ACCESSIBILITY_RESET_TO_DEFAULT:A,ACCESSIBILITY_KEYBOARD_MODE_ENABLE:I,ACCESSIBILITY_KEYBOARD_MODE_DISABLE:T,ACCESSIBILITY_COLORBLIND_TOGGLE:S,ACCESSIBILITY_LOW_CONTRAST_TOGGLE:y,ACCESSIBILITY_SET_SATURATION:N,ACCESSIBILITY_DESATURATE_ROLES_TOGGLE:C,ACCESSIBILITY_SYSTEM_COLOR_PREFERENCES_CHANGED:U,ACCESSIBILITY_SYSTEM_PREFERS_CONTRAST_CHANGED:P,ACCESSIBILITY_SYSTEM_PREFERS_REDUCED_MOTION_CHANGED:L,ACCESSIBILITY_SYSTEM_PREFERS_CROSSFADES_CHANGED:w,ACCESSIBILITY_SET_PREFERS_REDUCED_MOTION:M,ACCESSIBILITY_SET_SYNC_FORCED_COLORS:v,ACCESSIBILITY_SET_ALWAYS_SHOW_LINK_DECORATIONS:x,ACCESSIBILITY_SET_ENABLE_CUSTOM_CURSOR:k,ACCESSIBILITY_SET_ROLE_STYLE:R,ACCESSIBILITY_SET_DISPLAY_NAME_STYLES_ENABLED:O,ACCESSIBILITY_FORCED_COLORS_MODAL_SEEN:G,KEYBOARD_NAVIGATION_EXPLAINER_MODAL_SEEN:F,ACCESSIBILITY_SET_MESSAGE_GROUP_SPACING:V,ACCESSIBILITY_SUBMIT_BUTTON_TOGGLE:b,ACCESSIBILITY_SYNC_PROFILE_THEME_WITH_USER_THEME_TOGGLE:D,ACCESSIBILITY_SET_CONTRAST:B,ACCESSIBILITY_SET_CONTRAST_MODE:H,ACCESSIBILITY_SET_SWITCH_ICONS_ENABLED:j})}