import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
import { localizeWithPath } from '../../../../nls.js';
import { Extensions as Extensions$1 } from '../../../../platform/configuration/common/configurationRegistry.js';
import { Registry } from '../../../../platform/registry/common/platform.js';
import { RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
import { Extensions, workbenchConfigurationNodeBase } from '../../../common/configuration.js';
import { AccessibilitySignal } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';
import { SPEECH_LANGUAGES } from '../../speech/common/speechService.js';
import { ISpeechService } from '../../speech/common/speechService.service.js';
import { Disposable } from '../../../../base/common/lifecycle.js';
import { Event } from '../../../../base/common/event.js';
import { soundFeatureBase } from '../../accessibilitySignals/browser/accessibilitySignal.contribution.js';
const _moduleId = "vs/workbench/contrib/accessibility/browser/accessibilityConfiguration";
const accessibilityHelpIsShown = ( (new RawContextKey('accessibilityHelpIsShown', false, true)));
const accessibleViewIsShown = ( (new RawContextKey('accessibleViewIsShown', false, true)));
const accessibleViewSupportsNavigation = ( (new RawContextKey('accessibleViewSupportsNavigation', false, true)));
const accessibleViewVerbosityEnabled = ( (new RawContextKey('accessibleViewVerbosityEnabled', false, true)));
const accessibleViewGoToSymbolSupported = ( (new RawContextKey('accessibleViewGoToSymbolSupported', false, true)));
const accessibleViewOnLastLine = ( (new RawContextKey('accessibleViewOnLastLine', false, true)));
const accessibleViewCurrentProviderId = ( (new RawContextKey('accessibleViewCurrentProviderId', undefined, undefined)));
const accessibleViewInCodeBlock = ( (new RawContextKey('accessibleViewInCodeBlock', undefined, undefined)));
const accessibleViewContainsCodeBlocks = ( (new RawContextKey('accessibleViewContainsCodeBlocks', undefined, undefined)));
const baseVerbosityProperty = {
    type: 'boolean',
    default: true,
    tags: ['accessibility']
};
const markdownDeprecationMessage = ( localizeWithPath(
    _moduleId,
    0,
    "This setting is deprecated. Use the `signals` settings instead."
));
const baseAlertProperty = {
    type: 'boolean',
    default: true,
    tags: ['accessibility'],
    markdownDeprecationMessage
};
const accessibilityConfigurationNodeBase = ( (Object.freeze({
    id: 'accessibility',
    title: ( localizeWithPath(_moduleId, 1, "Accessibility")),
    type: 'object'
})));
const signalFeatureBase = {
    'type': 'object',
    'tags': ['accessibility'],
    additionalProperties: false,
    default: {
        sound: 'auto',
        announcement: 'auto'
    }
};
const announcementFeatureBase = {
    'type': 'string',
    'enum': ['auto', 'off'],
    'default': 'auto',
    'enumDescriptions': [
        ( localizeWithPath(
            _moduleId,
            2,
            "Enable announcement, will only play when in screen reader optimized mode."
        )),
        ( localizeWithPath(_moduleId, 3, "Disable announcement."))
    ],
    tags: ['accessibility'],
};
const defaultNoAnnouncement = {
    'type': 'object',
    'tags': ['accessibility'],
    additionalProperties: false,
    'default': {
        'sound': 'auto',
    }
};
const configuration = {
    ...accessibilityConfigurationNodeBase,
    properties: {
        ["accessibility.verbosity.terminal" ]: {
            description: ( localizeWithPath(
                _moduleId,
                4,
                'Provide information about how to access the terminal accessibility help menu when the terminal is focused.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.diffEditor" ]: {
            description: ( localizeWithPath(
                _moduleId,
                5,
                'Provide information about how to navigate changes in the diff editor when it is focused.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.panelChat" ]: {
            description: ( localizeWithPath(
                _moduleId,
                6,
                'Provide information about how to access the chat help menu when the chat input is focused.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.inlineChat" ]: {
            description: ( localizeWithPath(
                _moduleId,
                7,
                'Provide information about how to access the inline editor chat accessibility help menu and alert with hints that describe how to use the feature when the input is focused.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.inlineCompletions" ]: {
            description: ( localizeWithPath(
                _moduleId,
                8,
                'Provide information about how to access the inline completions hover and Accessible View.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.keybindingsEditor" ]: {
            description: ( localizeWithPath(
                _moduleId,
                9,
                'Provide information about how to change a keybinding in the keybindings editor when a row is focused.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.notebook" ]: {
            description: ( localizeWithPath(
                _moduleId,
                10,
                'Provide information about how to focus the cell container or inner editor when a notebook cell is focused.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.hover" ]: {
            description: ( localizeWithPath(
                _moduleId,
                11,
                'Provide information about how to open the hover in an Accessible View.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.notification" ]: {
            description: ( localizeWithPath(
                _moduleId,
                12,
                'Provide information about how to open the notification in an Accessible View.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.emptyEditorHint" ]: {
            description: ( localizeWithPath(
                _moduleId,
                13,
                'Provide information about relevant actions in an empty text editor.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.comments" ]: {
            description: ( localizeWithPath(
                _moduleId,
                14,
                'Provide information about actions that can be taken in the comment widget or in a file which contains comments.'
            )),
            ...baseVerbosityProperty
        },
        ["accessibility.verbosity.diffEditorActive" ]: {
            description: ( localizeWithPath(_moduleId, 15, 'Indicate when a diff editor becomes the active editor.')),
            ...baseVerbosityProperty
        },
        ["accessibility.alert.save" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                16,
                "Indicates when a file is saved. Also see {0}.",
                '`#audioCues.save#`'
            )),
            'enum': ['userGesture', 'always', 'never'],
            'default': 'always',
            'enumDescriptions': [
                ( localizeWithPath(_moduleId, 17, "Indicates when a file is saved via user gesture.")),
                ( localizeWithPath(
                    _moduleId,
                    18,
                    "Indicates whenever is a file is saved, including auto save."
                )),
                ( localizeWithPath(_moduleId, 19, "Never alerts."))
            ],
            tags: ['accessibility'],
            markdownDeprecationMessage
        },
        ["accessibility.alert.clear" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                20,
                "Indicates when a feature is cleared (for example, the terminal, Debug Console, or Output channel). Also see {0}.",
                '`#audioCues.clear#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.format" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                21,
                "Indicates when a file or notebook cell is formatted. Also see {0}.",
                '`#audioCues.format#`'
            )),
            'type': 'string',
            'enum': ['userGesture', 'always', 'never'],
            'default': 'always',
            'enumDescriptions': [
                ( localizeWithPath(_moduleId, 22, "Indicates when a file is formatted via user gesture.")),
                ( localizeWithPath(
                    _moduleId,
                    23,
                    "Indicates whenever is a file is formatted, including auto save, on cell execution, and more."
                )),
                ( localizeWithPath(_moduleId, 24, "Never alerts."))
            ],
            tags: ['accessibility'],
            markdownDeprecationMessage
        },
        ["accessibility.alert.breakpoint" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                25,
                "Indicates when the debugger breaks. Also see {0}.",
                '`#audioCues.onDebugBreak#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.error" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                26,
                "Indicates when the active line has an error. Also see {0}.",
                '`#audioCues.lineHasError#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.warning" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                27,
                "Indicates when the active line has a warning. Also see {0}.",
                '`#audioCues.lineHasWarning#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.foldedArea" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                28,
                "Indicates when the active line has a folded area that can be unfolded. Also see {0}.",
                '`#audioCues.lineHasFoldedArea#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.terminalQuickFix" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                29,
                "Indicates when there is an available terminal quick fix. Also see {0}.",
                '`#audioCues.terminalQuickFix#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.terminalBell" ]: {
            'markdownDescription': ( localizeWithPath(_moduleId, 30, "Indicates when the terminal bell is activated.")),
            ...baseAlertProperty
        },
        ["accessibility.alert.terminalCommandFailed" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                31,
                "Indicates when a terminal command fails (non-zero exit code). Also see {0}.",
                '`#audioCues.terminalCommandFailed#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.taskFailed" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                32,
                "Indicates when a task fails (non-zero exit code). Also see {0}.",
                '`#audioCues.taskFailed#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.taskCompleted" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                33,
                "Indicates when a task completes successfully (zero exit code). Also see {0}.",
                '`#audioCues.taskCompleted#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.chatRequestSent" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                34,
                "Indicates when a chat request is sent. Also see {0}.",
                '`#audioCues.chatRequestSent#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.chatResponsePending" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                35,
                "Indicates when a chat response is pending. Also see {0}.",
                '`#audioCues.chatResponsePending#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.noInlayHints" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                36,
                "Indicates when there are no inlay hints. Also see {0}.",
                '`#audioCues.noInlayHints#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.lineHasBreakpoint" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                37,
                "Indicates when on a line with a breakpoint. Also see {0}.",
                '`#audioCues.lineHasBreakpoint#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.notebookCellCompleted" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                38,
                "Indicates when a notebook cell completes successfully. Also see {0}.",
                '`#audioCues.notebookCellCompleted#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.notebookCellFailed" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                39,
                "Indicates when a notebook cell fails. Also see {0}.",
                '`#audioCues.notebookCellFailed#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.alert.onDebugBreak" ]: {
            'markdownDescription': ( localizeWithPath(
                _moduleId,
                40,
                "Indicates when the debugger breaks. Also see {0}.",
                '`#audioCues.onDebugBreak#`'
            )),
            ...baseAlertProperty
        },
        ["accessibility.accessibleView.closeOnKeyPress" ]: {
            markdownDescription: ( localizeWithPath(
                _moduleId,
                41,
                "On keypress, close the Accessible View and focus the element from which it was invoked."
            )),
            type: 'boolean',
            default: true
        },
        'accessibility.signals.sounds.volume': {
            'description': ( localizeWithPath(_moduleId, 42, "The volume of the sounds in percent (0-100).")),
            'type': 'number',
            'minimum': 0,
            'maximum': 100,
            'default': 70,
            tags: ['accessibility']
        },
        'accessibility.signals.debouncePositionChanges': {
            'description': ( localizeWithPath(_moduleId, 43, "Whether or not position changes should be debounced")),
            'type': 'boolean',
            'default': false,
            tags: ['accessibility']
        },
        'accessibility.signals.lineHasBreakpoint': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 44, "Plays a signal when the active line has a breakpoint.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 45, "Plays a sound when the active line has a breakpoint.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 46, "Indicates when the active line has a breakpoint.")),
                    ...announcementFeatureBase
                },
            },
        },
        'accessibility.signals.lineHasInlineSuggestion': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(_moduleId, 47, "Indicates when the active line has an inline suggestion.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        48,
                        "Plays a sound when the active line has an inline suggestion."
                    )),
                    ...soundFeatureBase,
                    'default': 'off'
                }
            }
        },
        'accessibility.signals.lineHasError': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 49, "Indicates when the active line has an error.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 50, "Plays a sound when the active line has an error.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 51, "Indicates when the active line has an error.")),
                    ...announcementFeatureBase,
                    default: 'off'
                },
            },
        },
        'accessibility.signals.lineHasFoldedArea': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                52,
                "Indicates when the active line has a folded area that can be unfolded."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        53,
                        "Plays a sound when the active line has a folded area that can be unfolded."
                    )),
                    ...soundFeatureBase,
                    default: 'off'
                },
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        54,
                        "Indicates when the active line has a folded area that can be unfolded."
                    )),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.lineHasWarning': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 55, "Plays a signal when the active line has a warning.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 56, "Plays a sound when the active line has a warning.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 57, "Indicates when the active line has a warning.")),
                    ...announcementFeatureBase,
                    default: 'off'
                },
            },
        },
        'accessibility.signals.onDebugBreak': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 58, "Plays a signal when the debugger stopped on a breakpoint.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 59, "Plays a sound when the debugger stopped on a breakpoint.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 60, "Indicates when the debugger stopped on a breakpoint.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.noInlayHints': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                61,
                "Plays a signal when trying to read a line with inlay hints that has no inlay hints."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        62,
                        "Plays a sound when trying to read a line with inlay hints that has no inlay hints."
                    )),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        63,
                        "Indicates when trying to read a line with inlay hints that has no inlay hints."
                    )),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.taskCompleted': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 64, "Plays a signal when a task is completed.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 65, "Plays a sound when a task is completed.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 66, "Indicates when a task is completed.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.taskFailed': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 67, "Plays a signal when a task fails (non-zero exit code).")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 68, "Plays a sound when a task fails (non-zero exit code).")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 69, "Indicates when a task fails (non-zero exit code).")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.terminalCommandFailed': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                70,
                "Plays a signal when a terminal command fails (non-zero exit code)."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        71,
                        "Plays a sound when a terminal command fails (non-zero exit code)."
                    )),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        72,
                        "Indicates when a terminal command fails (non-zero exit code)."
                    )),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.terminalQuickFix': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 73, "Plays a signal when terminal Quick Fixes are available.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 74, "Plays a sound when terminal Quick Fixes are available.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 75, "Indicates when terminal Quick Fixes are available.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.terminalBell': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 76, "Plays a signal when the terminal bell is ringing.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 77, "Plays a sound when the terminal bell is ringing.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 78, "Indicates when the terminal bell is ringing.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.diffLineInserted': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(
                _moduleId,
                79,
                "Indicates when the focus moves to an inserted line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        80,
                        "Plays a sound when the focus moves to an inserted line in Accessible Diff Viewer mode or to the next/previous change."
                    )),
                    ...soundFeatureBase
                }
            }
        },
        'accessibility.signals.diffLineModified': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(
                _moduleId,
                81,
                "Indicates when the focus moves to an modified line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        82,
                        "Plays a sound when the focus moves to a modified line in Accessible Diff Viewer mode or to the next/previous change."
                    )),
                    ...soundFeatureBase
                }
            }
        },
        'accessibility.signals.diffLineDeleted': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(
                _moduleId,
                83,
                "Indicates when the focus moves to an deleted line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        84,
                        "Plays a sound when the focus moves to an deleted line in Accessible Diff Viewer mode or to the next/previous change."
                    )),
                    ...soundFeatureBase
                }
            }
        },
        'accessibility.signals.notebookCellCompleted': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                85,
                "Plays a signal when a notebook cell execution is successfully completed."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        86,
                        "Plays a sound when a notebook cell execution is successfully completed."
                    )),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        87,
                        "Indicates when a notebook cell execution is successfully completed."
                    )),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.notebookCellFailed': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 88, "Plays a signal when a notebook cell execution fails.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 89, "Plays a sound when a notebook cell execution fails.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 90, "Indicates when a notebook cell execution fails.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.chatRequestSent': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 91, "Plays a signal when a chat request is made.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 92, "Plays a sound when a chat request is made.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 93, "Indicates when a chat request is made.")),
                    ...announcementFeatureBase
                },
            }
        },
        'accessibility.signals.chatResponsePending': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(_moduleId, 94, "Plays a signal on loop while the response is pending.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 95, "Plays a sound on loop while the response is pending.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 96, "Alerts on loop while the response is pending.")),
                    ...announcementFeatureBase
                },
            },
        },
        'accessibility.signals.chatResponseReceived': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(_moduleId, 97, "Indicates when the response has been received.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(
                        _moduleId,
                        98,
                        "Plays a sound on loop while the response has been received."
                    )),
                    ...soundFeatureBase
                },
            }
        },
        'accessibility.signals.voiceRecordingStarted': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(_moduleId, 99, "Indicates when the voice recording has started.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 100, "Plays a sound when the voice recording has started.")),
                    ...soundFeatureBase,
                },
            },
            'default': {
                'sound': 'on'
            }
        },
        'accessibility.signals.voiceRecordingStopped': {
            ...defaultNoAnnouncement,
            'description': ( localizeWithPath(_moduleId, 101, "Indicates when the voice recording has stopped.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 102, "Plays a sound when the voice recording has stopped.")),
                    ...soundFeatureBase,
                    default: 'off'
                },
            }
        },
        'accessibility.signals.clear': {
            ...signalFeatureBase,
            'description': ( localizeWithPath(
                _moduleId,
                103,
                "Plays a signal when a feature is cleared (for example, the terminal, Debug Console, or Output channel)."
            )),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 104, "Plays a sound when a feature is cleared.")),
                    ...soundFeatureBase
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 105, "Indicates when a feature is cleared.")),
                    ...announcementFeatureBase
                },
            },
        },
        'accessibility.signals.save': {
            'type': 'object',
            'tags': ['accessibility'],
            additionalProperties: false,
            'markdownDescription': ( localizeWithPath(_moduleId, 106, "Plays a signal when a file is saved.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 107, "Plays a sound when a file is saved.")),
                    'type': 'string',
                    'enum': ['userGesture', 'always', 'never'],
                    'default': 'never',
                    'enumDescriptions': [
                        ( localizeWithPath(_moduleId, 108, "Plays the audio cue when a user explicitly saves a file.")),
                        ( localizeWithPath(
                            _moduleId,
                            109,
                            "Plays the audio cue whenever a file is saved, including auto save."
                        )),
                        ( localizeWithPath(_moduleId, 110, "Never plays the audio cue."))
                    ],
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 111, "Indicates when a file is saved.")),
                    'type': 'string',
                    'enum': ['userGesture', 'always', 'never'],
                    'default': 'never',
                    'enumDescriptions': [
                        ( localizeWithPath(_moduleId, 112, "Announces when a user explicitly saves a file.")),
                        ( localizeWithPath(_moduleId, 113, "Announces whenever a file is saved, including auto save.")),
                        ( localizeWithPath(_moduleId, 114, "Never plays the audio cue."))
                    ],
                },
            },
            default: {
                'sound': 'never',
                'announcement': 'never'
            }
        },
        'accessibility.signals.format': {
            'type': 'object',
            'tags': ['accessibility'],
            additionalProperties: false,
            'markdownDescription': ( localizeWithPath(_moduleId, 115, "Plays a signal when a file or notebook is formatted.")),
            'properties': {
                'sound': {
                    'description': ( localizeWithPath(_moduleId, 116, "Plays a sound when a file or notebook is formatted.")),
                    'type': 'string',
                    'enum': ['userGesture', 'always', 'never'],
                    'default': 'never',
                    'enumDescriptions': [
                        ( localizeWithPath(
                            _moduleId,
                            117,
                            "Plays the audio cue when a user explicitly formats a file."
                        )),
                        ( localizeWithPath(
                            _moduleId,
                            118,
                            "Plays the audio cue whenever a file is formatted, including if it is set to format on save, type, or, paste, or run of a cell."
                        )),
                        ( localizeWithPath(_moduleId, 119, "Never plays the audio cue."))
                    ],
                },
                'announcement': {
                    'description': ( localizeWithPath(_moduleId, 120, "Indicates when a file or notebook is formatted.")),
                    'type': 'string',
                    'enum': ['userGesture', 'always', 'never'],
                    'default': 'never',
                    'enumDescriptions': [
                        ( localizeWithPath(_moduleId, 121, "Announceswhen a user explicitly formats a file.")),
                        ( localizeWithPath(
                            _moduleId,
                            122,
                            "Announces whenever a file is formatted, including if it is set to format on save, type, or, paste, or run of a cell."
                        )),
                        ( localizeWithPath(_moduleId, 123, "Never announces."))
                    ],
                },
            },
            default: {
                'sound': 'never',
                'announcement': 'never'
            }
        },
    }
};
function registerAccessibilityConfiguration() {
    const registry = ( (Registry.as(Extensions$1.Configuration)));
    registry.registerConfiguration(configuration);
    registry.registerConfiguration({
        ...workbenchConfigurationNodeBase,
        properties: {
            ["accessibility.dimUnfocused.enabled" ]: {
                description: ( localizeWithPath(
                    _moduleId,
                    124,
                    'Whether to dim unfocused editors and terminals, which makes it more clear where typed input will go to. This works with the majority of editors with the notable exceptions of those that utilize iframes like notebooks and extension webview editors.'
                )),
                type: 'boolean',
                default: false,
                tags: ['accessibility'],
                scope: 1 ,
            },
            ["accessibility.dimUnfocused.opacity" ]: {
                markdownDescription: ( localizeWithPath(
                    _moduleId,
                    125,
                    'The opacity fraction (0.2 to 1.0) to use for unfocused editors and terminals. This will only take effect when {0} is enabled.',
                    `\`#${"accessibility.dimUnfocused.enabled" }#\``
                )),
                type: 'number',
                minimum: 0.2 ,
                maximum: 1 ,
                default: 0.75 ,
                tags: ['accessibility'],
                scope: 1 ,
            },
            ["accessibility.hideAccessibleView" ]: {
                description: ( localizeWithPath(_moduleId, 126, "Controls whether the Accessible View is hidden.")),
                type: 'boolean',
                default: false,
                tags: ['accessibility']
            }
        }
    });
}
const SpeechTimeoutDefault = 1200;
let DynamicSpeechAccessibilityConfiguration = class DynamicSpeechAccessibilityConfiguration extends Disposable {
    static { this.ID = 'workbench.contrib.dynamicSpeechAccessibilityConfiguration'; }
    constructor(speechService) {
        super();
        this.speechService = speechService;
        this._register(Event.runAndSubscribe(speechService.onDidChangeHasSpeechProvider, () => this.updateConfiguration()));
    }
    updateConfiguration() {
        if (!this.speechService.hasSpeechProvider) {
            return;
        }
        const languages = this.getLanguages();
        const languagesSorted = ( (Object.keys(languages))).sort((langA, langB) => {
            return languages[langA].name.localeCompare(languages[langB].name);
        });
        const registry = ( (Registry.as(Extensions$1.Configuration)));
        registry.registerConfiguration({
            ...accessibilityConfigurationNodeBase,
            properties: {
                ["accessibility.voice.speechTimeout" ]: {
                    'markdownDescription': ( localizeWithPath(
                        _moduleId,
                        127,
                        "The duration in milliseconds that voice speech recognition remains active after you stop speaking. For example in a chat session, the transcribed text is submitted automatically after the timeout is met. Set to `0` to disable this feature."
                    )),
                    'type': 'number',
                    'default': SpeechTimeoutDefault,
                    'minimum': 0,
                    'tags': ['accessibility']
                },
                ["accessibility.voice.speechLanguage" ]: {
                    'markdownDescription': ( localizeWithPath(
                        _moduleId,
                        128,
                        "The language that voice speech recognition should recognize. Select `auto` to use the configured display language if possible. Note that not all display languages maybe supported by speech recognition"
                    )),
                    'type': 'string',
                    'enum': languagesSorted,
                    'default': 'auto',
                    'tags': ['accessibility'],
                    'enumDescriptions': ( (languagesSorted.map(key => languages[key].name))),
                    'enumItemLabels': ( (languagesSorted.map(key => languages[key].name)))
                }
            }
        });
    }
    getLanguages() {
        return {
            ['auto']: {
                name: ( localizeWithPath(_moduleId, 129, "Auto (Use Display Language)"))
            },
            ...SPEECH_LANGUAGES
        };
    }
};
DynamicSpeechAccessibilityConfiguration = ( (__decorate([
    ( (__param(0, ISpeechService)))
], DynamicSpeechAccessibilityConfiguration)));
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations([{
        key: 'audioCues.volume',
        migrateFn: (value, accessor) => {
            return [
                ['accessibility.signals.sounds.volume', { value }],
                ['audioCues.volume', { value: undefined }]
            ];
        }
    }]);
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations([{
        key: 'audioCues.debouncePositionChanges',
        migrateFn: (value, accessor) => {
            return [
                ['accessibility.signals.debouncePositionChanges', { value }],
                ['audioCues.debouncePositionChanges', { value: undefined }]
            ];
        }
    }]);
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations(( (AccessibilitySignal.allAccessibilitySignals.map(item => ({
    key: item.legacySoundSettingsKey,
    migrateFn: (sound, accessor) => {
        const configurationKeyValuePairs = [];
        const legacyAnnouncementSettingsKey = item.legacyAnnouncementSettingsKey;
        let announcement;
        if (legacyAnnouncementSettingsKey) {
            announcement = accessor(legacyAnnouncementSettingsKey) ?? undefined;
            if (announcement !== undefined && typeof announcement !== 'string') {
                announcement = announcement ? 'auto' : 'off';
            }
        }
        configurationKeyValuePairs.push([`${item.legacySoundSettingsKey}`, { value: undefined }]);
        configurationKeyValuePairs.push([`${item.settingsKey}`, { value: announcement !== undefined ? { announcement, sound } : { sound } }]);
        return configurationKeyValuePairs;
    }
})))));
( (Registry.as(Extensions.ConfigurationMigration)))
    .registerConfigurationMigrations(( (AccessibilitySignal.allAccessibilitySignals.filter(i => !!i.legacyAnnouncementSettingsKey).map(item => ({
    key: item.legacyAnnouncementSettingsKey,
    migrateFn: (announcement, accessor) => {
        const configurationKeyValuePairs = [];
        const sound = accessor(item.settingsKey)?.sound || accessor(item.legacySoundSettingsKey);
        if (announcement !== undefined && typeof announcement !== 'string') {
            announcement = announcement ? 'auto' : 'off';
        }
        configurationKeyValuePairs.push([`${item.settingsKey}`, { value: announcement !== undefined ? { announcement, sound } : { sound } }]);
        configurationKeyValuePairs.push([`${item.legacyAnnouncementSettingsKey}`, { value: undefined }]);
        configurationKeyValuePairs.push([`${item.legacySoundSettingsKey}`, { value: undefined }]);
        return configurationKeyValuePairs;
    }
})))));
export { DynamicSpeechAccessibilityConfiguration, SpeechTimeoutDefault, accessibilityConfigurationNodeBase, accessibilityHelpIsShown, accessibleViewContainsCodeBlocks, accessibleViewCurrentProviderId, accessibleViewGoToSymbolSupported, accessibleViewInCodeBlock, accessibleViewIsShown, accessibleViewOnLastLine, accessibleViewSupportsNavigation, accessibleViewVerbosityEnabled, announcementFeatureBase, registerAccessibilityConfiguration };
