var _a;
import { DEFAULT_SETTINGS } from './appSettings';
// override default options with query parameters if any
const urlSearchParams = new URLSearchParams(window.location.search);
for (const param of Object.keys(DEFAULT_SETTINGS)) {
    if (urlSearchParams.has(param)) {
        try {
            const value = JSON.parse((_a = urlSearchParams.get(param)) !== null && _a !== void 0 ? _a : 'true');
            DEFAULT_SETTINGS[param] = Boolean(value);
        }
        catch (error) {
            console.warn(`Unable to parse query parameter "${param}"`);
        }
    }
}
if (DEFAULT_SETTINGS.disableBeforeInput) {
    // @ts-expect-error
    delete window.InputEvent.prototype.getTargetRanges;
}
//# sourceMappingURL=setupEnv.js.map