@100mslive/roomkit-react 0.3.14-alpha.8 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -109,7 +109,7 @@ var __async = (__this, __arguments, generator) => {
109
109
  var define_process_env_default;
110
110
  var init_define_process_env = __esm({
111
111
  "<define:process.env>"() {
112
- define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_27575a21-5737-454e-8e27-786155458b41", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.4-alpha.8", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.3 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.14-alpha.8", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_27575a21-5737-454e-8e27-786155458b41", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.14-alpha.8", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", npm_package_dependencies__radix_ui_react_tooltip: "1.0.6", npm_package_dependencies__radix_ui_react_popover: "1.0.6", npm_package_dependencies__100mslive_types_prebuilt: "0.12.9", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.8", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "593", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.11/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240616.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.4/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:16135", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.14-alpha.8", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9613734740", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "16a110b525265ba74c72960c828e6ce933df52cf", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "b1fde51e3dfa43537b62c313ed425931ffc6c01ee0651880125bf51b6a28d58c", npm_package_exports___import: "./dist/index.js", STATS_BLT: "true", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1718973604964-0.10726757358908445:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718973604770-0.33744061216691046:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718973579202-0.226299014918115:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718973579021-0.0699281435738186:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_7ad3cca2-cc6f-4b07-8c13-cddbd3cd61ad", INVOCATION_ID: "19e1902fb66a4b0faa182d54d9c9486b", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "585", GITHUB_TRIGGERING_ACTOR: "github-actions[bot]", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 374", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "publish-alpha", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.14-alpha.8", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.14-alpha.8", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "16a110b525265ba74c72960c828e6ce933df52cf", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/publish-alpha", GITHUB_ACTOR: "github-actions[bot]", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_27575a21-5737-454e-8e27-786155458b41", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "41898282", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_27575a21-5737-454e-8e27-786155458b41", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_27575a21-5737-454e-8e27-786155458b41" };
112
+ define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_adf1cb44-4add-420a-8726-a8aa368ea6c1", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.4", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.3 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.14", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_adf1cb44-4add-420a-8726-a8aa368ea6c1", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.14", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", npm_package_dependencies__radix_ui_react_tooltip: "1.0.6", npm_package_dependencies__radix_ui_react_popover: "1.0.6", npm_package_dependencies__100mslive_types_prebuilt: "0.12.9", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.8", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "590", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.11/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240616.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.4/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:17356", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.14", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9661682152", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "0e76f9d5dee8b4eec991bda145a3157c5a45593c", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "47454ed0ee5d58c3391b12a9b53aeb874ce6bb5490bc16eb310b06e384f5e05e", npm_package_exports___import: "./dist/index.js", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/main", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1719315399128-0.44404788583932464:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719315398936-0.3483133545131931:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719315373455-0.3101961994568032:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719315373276-0.05068429302590238:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_773c3b95-d96e-4a9e-b282-40e69d50cd6e", INVOCATION_ID: "16e7598366e54b1c8e6d3f822ca83364", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "589", GITHUB_TRIGGERING_ACTOR: "eswarclynn", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 362", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "main", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.14", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.14", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "0e76f9d5dee8b4eec991bda145a3157c5a45593c", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/main", GITHUB_ACTOR: "eswarclynn", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_adf1cb44-4add-420a-8726-a8aa368ea6c1", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "64120992", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_adf1cb44-4add-420a-8726-a8aa368ea6c1", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_adf1cb44-4add-420a-8726-a8aa368ea6c1" };
113
113
  }
114
114
  });
115
115
 
@@ -2790,12 +2790,12 @@ var init_formatBytes = __esm({
2790
2790
  if (!bytes) {
2791
2791
  return "-";
2792
2792
  }
2793
- const k2 = 1024;
2793
+ const k3 = 1024;
2794
2794
  const dm2 = decimals < 0 ? 0 : decimals;
2795
2795
  const sizes = ["", "K", "M", "G", "T", "P", "E", "Z", "Y"].map((size) => size + unit);
2796
- let i2 = Math.floor(Math.log(bytes) / Math.log(k2));
2796
+ let i2 = Math.floor(Math.log(bytes) / Math.log(k3));
2797
2797
  i2 === 0 && i2++;
2798
- return `${parseFloat((bytes / Math.pow(k2, i2)).toFixed(dm2))} ${sizes[i2]}`;
2798
+ return `${parseFloat((bytes / Math.pow(k3, i2)).toFixed(dm2))} ${sizes[i2]}`;
2799
2799
  };
2800
2800
  }
2801
2801
  });
@@ -12637,8 +12637,8 @@ var init_PIPManager = __esm({
12637
12637
  /**
12638
12638
  * @private {boolean} on - whether pip is on/off
12639
12639
  */
12640
- this.callListeners = (on3) => {
12641
- this.listeners.forEach((listener) => listener == null ? void 0 : listener(on3));
12640
+ this.callListeners = (on2) => {
12641
+ this.listeners.forEach((listener) => listener == null ? void 0 : listener(on2));
12642
12642
  };
12643
12643
  this.reset();
12644
12644
  }
@@ -14519,10 +14519,10 @@ var require_ua_parser = __commonJS({
14519
14519
  }
14520
14520
  };
14521
14521
  var rgxMapper = function(ua2, arrays) {
14522
- var i2 = 0, j3, k2, p2, q3, matches, match18;
14522
+ var i2 = 0, j3, k3, p2, q3, matches, match18;
14523
14523
  while (i2 < arrays.length && !matches) {
14524
14524
  var regex = arrays[i2], props = arrays[i2 + 1];
14525
- j3 = k2 = 0;
14525
+ j3 = k3 = 0;
14526
14526
  while (j3 < regex.length && !matches) {
14527
14527
  if (!regex[j3]) {
14528
14528
  break;
@@ -14530,7 +14530,7 @@ var require_ua_parser = __commonJS({
14530
14530
  matches = regex[j3++].exec(ua2);
14531
14531
  if (!!matches) {
14532
14532
  for (p2 = 0; p2 < props.length; p2++) {
14533
- match18 = matches[++k2];
14533
+ match18 = matches[++k3];
14534
14534
  q3 = props[p2];
14535
14535
  if (typeof q3 === OBJ_TYPE && q3.length > 0) {
14536
14536
  if (q3.length === 2) {
@@ -16876,11 +16876,11 @@ function shimOnTrack(window2) {
16876
16876
  get() {
16877
16877
  return this._ontrack;
16878
16878
  },
16879
- set(f2) {
16879
+ set(f3) {
16880
16880
  if (this._ontrack) {
16881
16881
  this.removeEventListener("track", this._ontrack);
16882
16882
  }
16883
- this.addEventListener("track", this._ontrack = f2);
16883
+ this.addEventListener("track", this._ontrack = f3);
16884
16884
  },
16885
16885
  enumerable: true,
16886
16886
  configurable: true
@@ -17888,12 +17888,12 @@ function shimRemoteStreamsAPI(window2) {
17888
17888
  get() {
17889
17889
  return this._onaddstream;
17890
17890
  },
17891
- set(f2) {
17891
+ set(f3) {
17892
17892
  if (this._onaddstream) {
17893
17893
  this.removeEventListener("addstream", this._onaddstream);
17894
17894
  this.removeEventListener("track", this._onaddstreampoly);
17895
17895
  }
17896
- this.addEventListener("addstream", this._onaddstream = f2);
17896
+ this.addEventListener("addstream", this._onaddstream = f3);
17897
17897
  this.addEventListener("track", this._onaddstreampoly = (e) => {
17898
17898
  e.streams.forEach((stream) => {
17899
17899
  if (!this._remoteStreams) {
@@ -19343,14 +19343,14 @@ function M(n2, r2, t2) {
19343
19343
  }
19344
19344
  return e.o;
19345
19345
  }
19346
- function A(e, i2, o2, a11, c3, s2, v3) {
19346
+ function A(e, i2, o2, a11, c3, s2, v2) {
19347
19347
  if ("production" !== define_process_env_default.NODE_ENV && c3 === o2 && n(5), r(c3)) {
19348
19348
  var p2 = M(e, c3, s2 && i2 && 3 !== i2.i && !u(i2.R, a11) ? s2.concat(a11) : void 0);
19349
19349
  if (f(o2, a11, p2), !r(p2))
19350
19350
  return;
19351
19351
  e.m = false;
19352
19352
  } else
19353
- v3 && o2.add(c3);
19353
+ v2 && o2.add(c3);
19354
19354
  if (t(c3) && !y(c3)) {
19355
19355
  if (!e.h.D && e._ < 1)
19356
19356
  return;
@@ -19383,8 +19383,8 @@ function N(n2, r2, t2) {
19383
19383
  var e = s(r2) ? b("MapSet").F(r2, t2) : v(r2) ? b("MapSet").T(r2, t2) : n2.O ? function(n3, r3) {
19384
19384
  var t3 = Array.isArray(n3), e2 = { i: t3 ? 1 : 0, A: r3 ? r3.A : _(), P: false, I: false, R: {}, l: r3, t: n3, k: null, o: null, j: null, C: false }, i2 = e2, o2 = en;
19385
19385
  t3 && (i2 = [e2], o2 = on);
19386
- var u2 = Proxy.revocable(i2, o2), a11 = u2.revoke, f2 = u2.proxy;
19387
- return e2.k = f2, e2.j = a11, f2;
19386
+ var u2 = Proxy.revocable(i2, o2), a11 = u2.revoke, f3 = u2.proxy;
19387
+ return e2.k = f3, e2.j = a11, f3;
19388
19388
  }(r2, t2) : b("ES5").J(r2, t2);
19389
19389
  return (t2 ? t2.A : _()).p.push(e), e;
19390
19390
  }
@@ -19519,26 +19519,26 @@ var init_immer_esm = __esm({
19519
19519
  });
19520
19520
  };
19521
19521
  }
19522
- var f2;
19522
+ var f3;
19523
19523
  if ("function" != typeof i3 && n(6), void 0 !== o2 && "function" != typeof o2 && n(7), t(r3)) {
19524
- var c3 = w(e2), s2 = N(e2, r3, void 0), v3 = true;
19524
+ var c3 = w(e2), s2 = N(e2, r3, void 0), v2 = true;
19525
19525
  try {
19526
- f2 = i3(s2), v3 = false;
19526
+ f3 = i3(s2), v2 = false;
19527
19527
  } finally {
19528
- v3 ? g(c3) : O(c3);
19528
+ v2 ? g(c3) : O(c3);
19529
19529
  }
19530
- return "undefined" != typeof Promise && f2 instanceof Promise ? f2.then(function(n2) {
19530
+ return "undefined" != typeof Promise && f3 instanceof Promise ? f3.then(function(n2) {
19531
19531
  return j(c3, o2), P3(n2, c3);
19532
19532
  }, function(n2) {
19533
19533
  throw g(c3), n2;
19534
- }) : (j(c3, o2), P3(f2, c3));
19534
+ }) : (j(c3, o2), P3(f3, c3));
19535
19535
  }
19536
19536
  if (!r3 || "object" != typeof r3) {
19537
- if (void 0 === (f2 = i3(r3)) && (f2 = r3), f2 === H && (f2 = void 0), e2.D && d(f2, true), o2) {
19537
+ if (void 0 === (f3 = i3(r3)) && (f3 = r3), f3 === H && (f3 = void 0), e2.D && d(f3, true), o2) {
19538
19538
  var p2 = [], l2 = [];
19539
- b("Patches").M(r3, f2, p2, l2), o2(p2, l2);
19539
+ b("Patches").M(r3, f3, p2, l2), o2(p2, l2);
19540
19540
  }
19541
- return f2;
19541
+ return f3;
19542
19542
  }
19543
19543
  n(21, r3);
19544
19544
  }, this.produceWithPatches = function(n2, r3) {
@@ -20144,8 +20144,8 @@ var require_grammar = __commonJS({
20144
20144
  var require_parser = __commonJS({
20145
20145
  "../../node_modules/sdp-transform/lib/parser.js"(exports) {
20146
20146
  init_define_process_env();
20147
- var toIntIfInt = function(v3) {
20148
- return String(Number(v3)) === v3 ? Number(v3) : v3;
20147
+ var toIntIfInt = function(v2) {
20148
+ return String(Number(v2)) === v2 ? Number(v2) : v2;
20149
20149
  };
20150
20150
  var attachProperties = function(match18, location, names, rawName) {
20151
20151
  if (rawName && !names) {
@@ -20373,28 +20373,28 @@ var require_lib = __commonJS({
20373
20373
  });
20374
20374
 
20375
20375
  // ../hms-video-store/dist/index.js
20376
- function Ue(a11, e) {
20376
+ function xe(a11, e) {
20377
20377
  let t2, i2;
20378
20378
  if (e)
20379
20379
  for (let r2 of e.auxiliaryTracks) {
20380
20380
  let s2 = a11[r2];
20381
- Za(s2) && (i2 = pt(s2) ? s2 : i2, t2 = ht(s2) ? s2 : t2);
20381
+ eo(s2) && (i2 = ut(s2) ? s2 : i2, t2 = pt(s2) ? s2 : t2);
20382
20382
  }
20383
20383
  return { video: t2, audio: i2 };
20384
20384
  }
20385
- function pt(a11) {
20385
+ function ut(a11) {
20386
20386
  return a11 && a11.type === "audio";
20387
20387
  }
20388
- function ht(a11) {
20388
+ function pt(a11) {
20389
20389
  return a11 && a11.type === "video";
20390
20390
  }
20391
- function Za(a11) {
20391
+ function eo(a11) {
20392
20392
  return a11 && a11.source === "screen";
20393
20393
  }
20394
- function ri(a11) {
20394
+ function ii(a11) {
20395
20395
  return a11 && a11.source === "audioplaylist";
20396
20396
  }
20397
- function mt(a11) {
20397
+ function ht(a11) {
20398
20398
  return a11 && a11.source === "videoplaylist";
20399
20399
  }
20400
20400
  function os(a11) {
@@ -20406,12 +20406,12 @@ function je(a11, e) {
20406
20406
  function ns(a11, e) {
20407
20407
  return e && a11.tracks[e] ? a11.tracks[e].displayEnabled : false;
20408
20408
  }
20409
- function St(a11) {
20409
+ function mt(a11) {
20410
20410
  var r2;
20411
20411
  let e = false, t2 = false, i2 = false;
20412
20412
  return (r2 = a11 == null ? void 0 : a11.publishParams) != null && r2.allowed && (e = a11.publishParams.allowed.includes("video"), t2 = a11.publishParams.allowed.includes("audio"), i2 = a11.publishParams.allowed.includes("screen")), { video: e, audio: t2, screen: i2 };
20413
20413
  }
20414
- function ro() {
20414
+ function so() {
20415
20415
  if (O2 && window) {
20416
20416
  let a11 = window.location.hostname;
20417
20417
  return a11 === "localhost" || a11 === "127.0.0.1" ? "LOCAL" : a11.includes("app.100ms.live") ? "HMS" : "CUSTOM";
@@ -20435,9 +20435,9 @@ function fr(a11) {
20435
20435
  function oe(a11) {
20436
20436
  return a11 != null;
20437
20437
  }
20438
- function ft(a11 = "prod", e) {
20438
+ function Tt(a11 = "prod", e) {
20439
20439
  let t2 = "web", i2 = Qe !== "LOCAL" && a11 === "prod" ? "prod" : "debug";
20440
- if (Be)
20440
+ if (Ue)
20441
20441
  return vs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: fs, env: i2, domain: Qe, is_prebuilt: !!(e != null && e.isPrebuilt), framework: "node", framework_version: process.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
20442
20442
  let r2 = ge.getOS(), s2 = ge.getDevice(), o2 = ge.getBrowser(), n2 = yr(`web_${r2.name}`), l2 = r2.version || "", u2 = yr(`${o2.name}_${o2.version}`), p2 = u2;
20443
20443
  return s2.type && (p2 = `${yr(`${s2.vendor}_${s2.type}`)}/${u2}`), vs({ os: n2, os_version: l2, sdk: t2, sdk_version: fs, device_model: p2, env: i2, domain: Qe, is_prebuilt: !!(e != null && e.isPrebuilt), framework: e == null ? void 0 : e.type, framework_version: e == null ? void 0 : e.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
@@ -20445,11 +20445,11 @@ function ft(a11 = "prod", e) {
20445
20445
  function yr(a11) {
20446
20446
  return a11.replace(/ /g, "_");
20447
20447
  }
20448
- function uo(a11, e) {
20448
+ function po(a11, e) {
20449
20449
  let t2 = a11.toLowerCase();
20450
20450
  return t2.includes("device not found") ? S2.TracksErrors.DeviceNotAvailable("TRACK", e, a11) : t2.includes("permission denied") ? S2.TracksErrors.CantAccessCaptureDevice("TRACK", e, a11) : S2.TracksErrors.GenericTrack("TRACK", a11);
20451
20451
  }
20452
- function po(a11, e = "") {
20452
+ function ho(a11, e = "") {
20453
20453
  if (adapter_core_default.browserDetails.browser === "chrome" && a11.name === "NotAllowedError" && a11.message.includes("denied by system"))
20454
20454
  return S2.TracksErrors.SystemDeniedPermission("TRACK", e, a11.message);
20455
20455
  if (adapter_core_default.browserDetails.browser === "firefox" && a11.name === "NotFoundError") {
@@ -20468,11 +20468,11 @@ function po(a11, e = "") {
20468
20468
  case "TypeError":
20469
20469
  return S2.TracksErrors.NothingToReturn("TRACK", a11.message);
20470
20470
  default:
20471
- return uo(a11.message, e);
20471
+ return po(a11.message, e);
20472
20472
  }
20473
20473
  }
20474
20474
  function Ae(a11, e) {
20475
- let t2 = po(a11, e);
20475
+ let t2 = ho(a11, e);
20476
20476
  return t2.addNativeError(a11), t2;
20477
20477
  }
20478
20478
  function ys(a11) {
@@ -20525,7 +20525,7 @@ function Es() {
20525
20525
  };
20526
20526
  })) };
20527
20527
  }
20528
- function oi(a11, e = 300) {
20528
+ function ai(a11, e = 300) {
20529
20529
  let t2;
20530
20530
  return function(...i2) {
20531
20531
  clearTimeout(t2), t2 = void 0;
@@ -20535,12 +20535,12 @@ function oi(a11, e = 300) {
20535
20535
  }, e);
20536
20536
  };
20537
20537
  }
20538
- function Ds(a11, e) {
20538
+ function ws(a11, e) {
20539
20539
  return function(i2) {
20540
20540
  return !(0, import_lodash3.default)(a11[i2], e[i2]);
20541
20541
  };
20542
20542
  }
20543
- function xs(a11, e) {
20543
+ function Us(a11, e) {
20544
20544
  return function(i2) {
20545
20545
  return !(0, import_lodash4.default)(a11[i2], e[i2]);
20546
20546
  };
@@ -20548,32 +20548,18 @@ function xs(a11, e) {
20548
20548
  function A2(a11) {
20549
20549
  return (e) => (t2) => a11(t2, e);
20550
20550
  }
20551
- function xm(a11) {
20551
+ function Bm(a11) {
20552
20552
  return (e) => {
20553
20553
  if (e.sessionStore)
20554
20554
  return a11 ? e.sessionStore[a11] : e.sessionStore;
20555
20555
  };
20556
20556
  }
20557
- function Pa(a11) {
20557
+ function Ea(a11) {
20558
20558
  return a11 instanceof se || a11 instanceof U2;
20559
20559
  }
20560
- function nt(a11) {
20561
- if (!a11 || a11.length === 0)
20562
- throw S2.APIErrors.InvalidTokenFormat("INIT", "Token cannot be an empty string or undefined or null");
20563
- let e = a11.split(".");
20564
- if (e.length !== 3)
20565
- throw S2.APIErrors.InvalidTokenFormat("INIT", "Expected 3 '.' separate fields - header, payload and signature respectively");
20566
- let t2 = atob(e[1]);
20567
- try {
20568
- let i2 = JSON.parse(t2);
20569
- return { roomId: i2.room_id, userId: i2.user_id, role: i2.role };
20570
- } catch (i2) {
20571
- throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
20572
- }
20573
- }
20574
- function Na(a11, e) {
20560
+ function Oa(a11, e) {
20575
20561
  var r2;
20576
- let t2 = Kt.parse(a11.sdp);
20562
+ let t2 = $t.parse(a11.sdp);
20577
20563
  if (!((r2 = t2.origin) != null && r2.username.startsWith("mozilla")))
20578
20564
  return a11;
20579
20565
  let i2 = e ? Array.from(e.values()) : [];
@@ -20581,32 +20567,46 @@ function Na(a11, e) {
20581
20567
  var l2, u2, p2;
20582
20568
  let o2 = (l2 = s2.msid) == null ? void 0 : l2.split(" ")[0], n2 = (u2 = i2.find((h2) => h2.type === s2.type && h2.stream_id === o2)) == null ? void 0 : u2.track_id;
20583
20569
  n2 && (s2.msid = (p2 = s2.msid) == null ? void 0 : p2.replace(/\s(.+)/, ` ${n2}`));
20584
- }), { type: a11.type, sdp: Kt.write(t2) };
20570
+ }), { type: a11.type, sdp: $t.write(t2) };
20585
20571
  }
20586
- function Oa(a11, e) {
20572
+ function xa(a11, e) {
20587
20573
  var s2;
20588
20574
  if (!(a11 != null && a11.sdp) || !e)
20589
20575
  return;
20590
- let i2 = Kt.parse(a11.sdp).media.find((o2) => oe(o2.mid) && parseInt(o2.mid) === parseInt(e));
20576
+ let i2 = $t.parse(a11.sdp).media.find((o2) => oe(o2.mid) && parseInt(o2.mid) === parseInt(e));
20591
20577
  return (s2 = i2 == null ? void 0 : i2.msid) == null ? void 0 : s2.split(" ")[1];
20592
20578
  }
20593
- function xa(a11) {
20579
+ function Ua(a11) {
20594
20580
  return a11.sdp.includes("usedtx=1") ? a11 : { type: a11.type, sdp: a11.sdp.replace("useinbandfec=1", "useinbandfec=1;usedtx=1") };
20595
20581
  }
20596
- function ln2(a11, e, t2, i2) {
20582
+ function un2(a11, e, t2, i2) {
20597
20583
  try {
20598
20584
  let r2 = new URL("/init", a11);
20599
20585
  return i2 && i2.trim().length > 0 && r2.searchParams.set("region", i2.trim()), r2.searchParams.set("peer_id", e), r2.searchParams.set("user_agent_v2", t2), r2.toString();
20600
20586
  } catch (r2) {
20601
20587
  let s2 = r2;
20602
- throw d2.e(pr, s2.name, s2.message), s2;
20588
+ throw d2.e(ur, s2.name, s2.message), s2;
20603
20589
  }
20604
20590
  }
20605
- function un2(a11, e) {
20591
+ function pn2(a11, e) {
20606
20592
  var t2;
20607
- return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: Ua((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
20593
+ return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: Ba((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
20608
20594
  }
20609
- var import_ua_parser_js, import_lodash3, import_uuid3, import_uuid4, import_lodash4, import_uuid5, import_uuid6, import_uuid7, import_eventemitter2, import_eventemitter22, import_uuid8, import_eventemitter23, Kt, import_eventemitter24, import_uuid9, import_uuid10, qa, ja, Ja, ei, Qa, is, rs, za, ts, m, M2, mr, Ya, J, c2, Mr, Sr, ti, ii, Xa, ss, gr, as, cs, eo, d2, Je, ge, O2, ds, Be, io, tc, Te, ps, Tr, ls, us, hs, si, Re, Ie, ms, Qe, E2, v2, so, S2, vr, Ss, le, gs, Ts, gt, Tt, fs, vs, H2, y2, kr, Q2, Pr, Er, ne, ai, co, lo, vt, He, Ce, Ps, mo, So, ni, br, bs, Rs, Is, As, Hs, Ve, Cs, ee, Fe, z2, Ge, De, ze, ce, se, Ye, Mt, To, ws, Rr, _s, Ir, Ns, Xe, Ar, Hr, yt, Ze, Os, vo, Mo, kt, ci, yo, di, Cr, pe, li, ve, F, et, ui, tt, Us, Bs, Pt, G2, Vs, Fs, Me, Dr, wr, Gs, Ws, U2, _r, We, fe, $s, Ks, Eo, Or, bo, qs, js, Et, Nr, xr, pi, hi, it, rt, $e, bt, he, mi, st, we, Si, gi, Ti, Rt, B2, Ao, Wh, $h, K, fi, Js, N2, Qs, Ur, Ho, _e, jh, Co, me, Lo, te, ye, Jh, Qh, ae, Y2, Do, zs, zh, Yh, Br, Ys, Vr, wo, Zh, em, tm, im, rm, sm, am, om, It, _o, nm, ie, Xs, cm, dm, Se, lm, at, No, Zs, um, ea, pm, hm, mm, Sm, gm, Tm, fm, vm, Mm, ta, Em, Oo, bm, ra, Fr, sa, aa, oa, na, ca, da, la, ua, At, b2, Gr, Ht, pa, xo, Uo, q2, Wr, Bo, Vo, Fo, Go, Wo, X2, Om, Bm, Vm, vi, ha, Fm, Gm, Wm, $o, Ko, Km, ma, qm, qo, jm, Jm, Qm, zm, Ym, Xm, Sa, ga, eS, tS, Ta, iS, rS, fa, sS, aS, oS, va, Ma, jo, Jo, Qo, nS, cS, dS, lS, uS, ya, PS, zo, ES, bS, RS, Xo, Zo, yi, Ct, ki, ka, $r, Pi, Ei, Ea, ba, Ra, Kr, Ia, qr, Ke, jr, bi, re, Lt, _2, Dt, Ri, Ii, Aa, Ha, ot, Ca, Ai, tn2, de, Ne, Hi, rn2, La, Da, Ci, Oe, Li, wt, Di, wi, _i, _t, Jr, Pe, Nt, Ot, Ni, Oi, wa, xt, xi, Ut, Ui, V, Bt, Bi, Vi, Fi, ct, Gi, Wi, C, $i, Ki, Vt, qi, Ft, ji, Ji, Qi, zi, Yi, Xi, Zi, er, tr, j2, _a7, ir, rr, sr, ar, or, nr, dt, lt, cr, dr, Gt, Wt, zr, $t, Xr, ur, Ee, qe, qt, jt, Jt, Ua, pr, Qt, zt, Ba, I2, Yt, Fa, hr, ut, Wa, Ga, vn2, Mn, yn, Xt, kn, Pn, En, bn, $a, Rn, Ka, Zr, be, In, An, Hn, Cn, Ln, Dn, wn, _n, Nn, On, es, xn, Un, Bn, Vn, Fn, Gn;
20595
+ function pr(a11) {
20596
+ if (!a11 || a11.length === 0)
20597
+ throw S2.APIErrors.InvalidTokenFormat("INIT", "Token cannot be an empty string or undefined or null");
20598
+ let e = a11.split(".");
20599
+ if (e.length !== 3)
20600
+ throw S2.APIErrors.InvalidTokenFormat("INIT", "Expected 3 '.' separate fields - header, payload and signature respectively");
20601
+ let t2 = atob(e[1]);
20602
+ try {
20603
+ let i2 = JSON.parse(t2);
20604
+ return { roomId: i2.room_id, userId: i2.user_id, role: i2.role };
20605
+ } catch (i2) {
20606
+ throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
20607
+ }
20608
+ }
20609
+ var import_ua_parser_js, import_lodash3, import_uuid3, import_uuid4, import_lodash4, import_uuid5, import_uuid6, import_uuid7, import_eventemitter2, import_eventemitter22, import_uuid8, import_eventemitter23, $t, import_eventemitter24, import_uuid9, import_uuid10, ja, Ja, Qa, Zt, za, is, rs, Ya, ts, m, M2, mr, Xa, J, c2, Mr, Sr, ei, ti, Za, ss, gr, as, cs, to, d2, Je, ge, O2, ds, Ue, ro, ic, Te, ps, Tr, ls, us, hs, ri, Re, Ie, ms, Qe, k2, f2, ao, S2, vr, Ss, le, gs, Ts, St, gt, fs, vs, H2, y2, kr, Q2, Pr, Er, ne, si, lo, uo, ft, He, Ce, Ps, So, go, oi, br, bs, Rs, Is, As, Hs, Be, Cs, Ls, ee, Ve, z2, Fe, De, ze, ce, se, Ye, vt, fo, _s, Rr, Ns, Ir, Os, Xe, Ar, Hr, Mt, Ze, xs, Mo, yo, yt, ni, ko, ci, Cr, pe, di, ve, F, et, li, tt, Bs, Vs, kt, G2, Fs, Gs, Me, Dr, wr, Ws, $s, U2, _r, Ge, fe, Ks, qs, bo, Or, Ro, js, Js, Pt, Nr, xr, ui, pi, it, rt, We, Et, he, hi, st, we, mi, Si, gi, bt, B2, Ho, Kh, qh, K, Ti, Qs, N2, zs, Ur, Co, _e, Qh, Lo, me, Do, te, ye, zh, Yh, ae, Y2, wo, Ys, Xh, Zh, Br, Xs, Vr, _o, tm, im, rm, sm, am, om, nm, cm, Rt, No, dm, ie, Zs, lm, um, Se, pm, at, Oo, ea, hm, ta, mm, Sm, gm, Tm, fm, vm, Mm, ym, km, ia, Rm, xo, Im, sa, Fr, aa, oa, na, ca, da, la, ua, pa, It, b2, Gr, At, ha, Uo, Bo, q2, Wr, Vo, Fo, Go, Wo, $o, X2, Um, Fm, Gm, fi, ma, Wm, $m, Km, Ko, qo, jm, Sa, Jm, jo, Qm, zm, Ym, Xm, Zm, eS, ga, Ta, iS, rS, fa, sS, aS, va, oS, nS, cS, Ma, ya, Jo, Qo, zo, dS, lS, uS, pS, hS, ka, bS, Yo, RS, IS, AS, Zo, en2, Mi, Ht, yi, Pa, $r, ki, Pi, ba, Ra, Ia, Kr, Aa, qr, $e, jr, Ei, re, Ct, _2, Lt, bi, Ri, Ha, Ca, ot, La, Ii, rn2, de, Ne, Ai, sn2, Da, wa, Hi, Ke, Ci, Dt, Li, Di, wi, wt, Jr, Pe, _t, Nt, _i, Ni, _a7, Ot, Oi, xt, xi, V, Ut, Ui, Bi, Vi, nt, Fi, Gi, C, Wi, $i, Bt, Ki, Vt, qi, ji, Ji, Qi, zi, Yi, Xi, Zi, er, j2, Na, tr, ir, rr, sr, ar, or, ct, dt, nr, cr, Ft, Gt, zr, Wt, Xr, lr, Ee, qe, Kt, qt, jt, Ba, ur, Jt, Qt, Va, I2, zt, Ga, hr, lt, $a, Wa, Mn, yn, kn, Yt, Pn, En, bn, Rn, Ka, In, qa, Zr, be, An, Hn, Cn, Ln, Dn, wn, _n, Nn, On, xn, es, Un, Bn, Vn, Fn, Gn, Wn;
20610
20610
  var init_dist = __esm({
20611
20611
  "../hms-video-store/dist/index.js"() {
20612
20612
  "use strict";
@@ -20632,40 +20632,40 @@ var init_dist = __esm({
20632
20632
  import_eventemitter22 = require("eventemitter2");
20633
20633
  import_uuid8 = require("uuid");
20634
20634
  import_eventemitter23 = require("eventemitter2");
20635
- Kt = __toESM(require_lib());
20635
+ $t = __toESM(require_lib());
20636
20636
  import_eventemitter24 = __toESM(require("eventemitter2"));
20637
20637
  import_uuid9 = require("uuid");
20638
20638
  import_uuid10 = require("uuid");
20639
20639
  init_es();
20640
- qa = Object.defineProperty;
20641
- ja = Object.defineProperties;
20642
- Ja = Object.getOwnPropertyDescriptors;
20643
- ei = Object.getOwnPropertySymbols;
20644
- Qa = Object.getPrototypeOf;
20640
+ ja = Object.defineProperty;
20641
+ Ja = Object.defineProperties;
20642
+ Qa = Object.getOwnPropertyDescriptors;
20643
+ Zt = Object.getOwnPropertySymbols;
20644
+ za = Object.getPrototypeOf;
20645
20645
  is = Object.prototype.hasOwnProperty;
20646
20646
  rs = Object.prototype.propertyIsEnumerable;
20647
- za = Reflect.get;
20648
- ts = (a11, e, t2) => e in a11 ? qa(a11, e, { enumerable: true, configurable: true, writable: true, value: t2 }) : a11[e] = t2;
20647
+ Ya = Reflect.get;
20648
+ ts = (a11, e, t2) => e in a11 ? ja(a11, e, { enumerable: true, configurable: true, writable: true, value: t2 }) : a11[e] = t2;
20649
20649
  m = (a11, e) => {
20650
20650
  for (var t2 in e || (e = {}))
20651
20651
  is.call(e, t2) && ts(a11, t2, e[t2]);
20652
- if (ei)
20653
- for (var t2 of ei(e))
20652
+ if (Zt)
20653
+ for (var t2 of Zt(e))
20654
20654
  rs.call(e, t2) && ts(a11, t2, e[t2]);
20655
20655
  return a11;
20656
20656
  };
20657
- M2 = (a11, e) => ja(a11, Ja(e));
20657
+ M2 = (a11, e) => Ja(a11, Qa(e));
20658
20658
  mr = (a11, e) => {
20659
20659
  var t2 = {};
20660
20660
  for (var i2 in a11)
20661
20661
  is.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
20662
- if (a11 != null && ei)
20663
- for (var i2 of ei(a11))
20662
+ if (a11 != null && Zt)
20663
+ for (var i2 of Zt(a11))
20664
20664
  e.indexOf(i2) < 0 && rs.call(a11, i2) && (t2[i2] = a11[i2]);
20665
20665
  return t2;
20666
20666
  };
20667
- Ya = (a11, e) => () => (e || a11((e = { exports: {} }).exports, e), e.exports);
20668
- J = (a11, e, t2) => za(Qa(a11), t2, e);
20667
+ Xa = (a11, e) => () => (e || a11((e = { exports: {} }).exports, e), e.exports);
20668
+ J = (a11, e, t2) => Ya(za(a11), t2, e);
20669
20669
  c2 = (a11, e, t2) => new Promise((i2, r2) => {
20670
20670
  var s2 = (l2) => {
20671
20671
  try {
@@ -20682,18 +20682,18 @@ var init_dist = __esm({
20682
20682
  }, n2 = (l2) => l2.done ? i2(l2.value) : Promise.resolve(l2.value).then(s2, o2);
20683
20683
  n2((t2 = t2.apply(a11, e)).next());
20684
20684
  });
20685
- Mr = Ya((Vc, oo) => {
20686
- oo.exports = { version: "0.12.14-alpha.8", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
20685
+ Mr = Xa((Fc, no) => {
20686
+ no.exports = { version: "0.12.14", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
20687
20687
  });
20688
20688
  Sr = ((n2) => (n2.Disconnected = "Disconnected", n2.Preview = "Preview", n2.Connecting = "Connecting", n2.Connected = "Connected", n2.Reconnecting = "Reconnecting", n2.Disconnecting = "Disconnecting", n2.Failed = "Failed", n2))(Sr || {});
20689
- ti = () => ({ room: { id: "", isConnected: false, name: "", peers: [], localPeer: "", roomState: "Disconnected", recording: { browser: { running: false }, server: { running: false }, hls: { running: false } }, rtmp: { running: false }, hls: { running: false, variants: [] }, sessionId: "" }, peers: {}, tracks: {}, playlist: { audio: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 }, video: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 } }, messages: { byID: {}, allIDs: [] }, speakers: {}, connectionQualities: {}, settings: { audioInputDeviceId: "", audioOutputDeviceId: "", videoInputDeviceId: "" }, devices: { audioInput: [], audioOutput: [], videoInput: [] }, roles: {}, roleChangeRequests: [], errors: [], sessionStore: {}, templateAppData: {}, polls: {}, whiteboards: {}, hideLocalPeer: false });
20690
- ii = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
20691
- Xa = ((e) => (e.CHAT = "chat", e))(Xa || {});
20689
+ ei = () => ({ room: { id: "", isConnected: false, name: "", peers: [], localPeer: "", roomState: "Disconnected", recording: { browser: { running: false }, server: { running: false }, hls: { running: false } }, rtmp: { running: false }, hls: { running: false, variants: [] }, sessionId: "" }, peers: {}, tracks: {}, playlist: { audio: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 }, video: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 } }, messages: { byID: {}, allIDs: [] }, speakers: {}, connectionQualities: {}, settings: { audioInputDeviceId: "", audioOutputDeviceId: "", videoInputDeviceId: "" }, devices: { audioInput: [], audioOutput: [], videoInput: [] }, roles: {}, roleChangeRequests: [], errors: [], sessionStore: {}, templateAppData: {}, polls: {}, whiteboards: {}, hideLocalPeer: false });
20690
+ ti = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
20691
+ Za = ((e) => (e.CHAT = "chat", e))(Za || {});
20692
20692
  ss = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(ss || {});
20693
20693
  gr = ((D2) => (D2.PEER_JOINED = "PEER_JOINED", D2.PEER_LEFT = "PEER_LEFT", D2.PEER_LIST = "PEER_LIST", D2.NEW_MESSAGE = "NEW_MESSAGE", D2.ERROR = "ERROR", D2.RECONNECTING = "RECONNECTING", D2.RECONNECTED = "RECONNECTED", D2.TRACK_ADDED = "TRACK_ADDED", D2.TRACK_REMOVED = "TRACK_REMOVED", D2.TRACK_MUTED = "TRACK_MUTED", D2.TRACK_UNMUTED = "TRACK_UNMUTED", D2.TRACK_DEGRADED = "TRACK_DEGRADED", D2.TRACK_RESTORED = "TRACK_RESTORED", D2.TRACK_DESCRIPTION_CHANGED = "TRACK_DESCRIPTION_CHANGED", D2.ROLE_UPDATED = "ROLE_UPDATED", D2.CHANGE_TRACK_STATE_REQUEST = "CHANGE_TRACK_STATE_REQUEST", D2.CHANGE_MULTI_TRACK_STATE_REQUEST = "CHANGE_MULTI_TRACK_STATE_REQUEST", D2.ROOM_ENDED = "ROOM_ENDED", D2.REMOVED_FROM_ROOM = "REMOVED_FROM_ROOM", D2.DEVICE_CHANGE_UPDATE = "DEVICE_CHANGE_UPDATE", D2.PLAYLIST_TRACK_ENDED = "PLAYLIST_TRACK_ENDED", D2.NAME_UPDATED = "NAME_UPDATED", D2.METADATA_UPDATED = "METADATA_UPDATED", D2.POLL_CREATED = "POLL_CREATED", D2.POLL_STARTED = "POLL_STARTED", D2.POLL_STOPPED = "POLL_STOPPED", D2.POLL_VOTES_UPDATED = "POLL_VOTES_UPDATED", D2.POLLS_LIST = "POLLS_LIST", D2.HAND_RAISE_CHANGED = "HAND_RAISE_CHANGED", D2.TRANSCRIPTION_STATE_UPDATED = "TRANSCRIPTION_STATE_UPDATED", D2))(gr || {});
20694
20694
  as = ((t2) => (t2.audio = "audio", t2.video = "video", t2))(as || {});
20695
20695
  cs = ((l2) => (l2[l2.VERBOSE = 0] = "VERBOSE", l2[l2.DEBUG = 1] = "DEBUG", l2[l2.INFO = 2] = "INFO", l2[l2.WARN = 3] = "WARN", l2[l2.TIME = 4] = "TIME", l2[l2.TIMEEND = 5] = "TIMEEND", l2[l2.ERROR = 6] = "ERROR", l2[l2.NONE = 7] = "NONE", l2))(cs || {});
20696
- eo = typeof window != "undefined" && typeof window.expect != "undefined";
20696
+ to = typeof window != "undefined" && typeof window.expect != "undefined";
20697
20697
  d2 = class {
20698
20698
  static v(e, ...t2) {
20699
20699
  this.log(0, e, ...t2);
@@ -20759,7 +20759,7 @@ var init_dist = __esm({
20759
20759
  }
20760
20760
  }
20761
20761
  };
20762
- d2.level = eo ? 7 : 0;
20762
+ d2.level = to ? 7 : 0;
20763
20763
  Je = class {
20764
20764
  constructor(e) {
20765
20765
  this.tracks = new Array();
@@ -20771,9 +20771,9 @@ var init_dist = __esm({
20771
20771
  };
20772
20772
  ge = new import_ua_parser_js.UAParser();
20773
20773
  O2 = typeof window != "undefined";
20774
- Be = typeof window == "undefined" && !((ds = ge.getBrowser().name) != null && ds.toLowerCase().includes("electron"));
20775
- io = () => !Be;
20776
- tc = io();
20774
+ Ue = typeof window == "undefined" && !((ds = ge.getBrowser().name) != null && ds.toLowerCase().includes("electron"));
20775
+ ro = () => !Ue;
20776
+ ic = ro();
20777
20777
  Te = () => ge.getDevice().type === "mobile";
20778
20778
  ps = () => typeof document != "undefined" && document.hidden;
20779
20779
  Tr = () => {
@@ -20781,7 +20781,7 @@ var init_dist = __esm({
20781
20781
  return ((a11 = ge.getOS().name) == null ? void 0 : a11.toLowerCase()) === "ios";
20782
20782
  };
20783
20783
  hs = ((us = (ls = ge.getBrowser()) == null ? void 0 : ls.name) == null ? void 0 : us.toLowerCase()) === "firefox";
20784
- si = (a11) => a11 ? `{
20784
+ ri = (a11) => a11 ? `{
20785
20785
  trackId: ${a11.id};
20786
20786
  kind: ${a11.kind};
20787
20787
  enabled: ${a11.enabled};
@@ -20827,7 +20827,7 @@ var init_dist = __esm({
20827
20827
  logIdentifier: ${this.logIdentifier};
20828
20828
  source: ${this.source};
20829
20829
  enabled: ${this.enabled};
20830
- nativeTrack: ${si(this.nativeTrack)};
20830
+ nativeTrack: ${ri(this.nativeTrack)};
20831
20831
  }`;
20832
20832
  }
20833
20833
  };
@@ -20886,9 +20886,9 @@ var init_dist = __esm({
20886
20886
  }
20887
20887
  };
20888
20888
  ms = ((i2) => (i2.CUSTOM = "CUSTOM", i2.LOCAL = "LOCAL", i2.HMS = "HMS", i2))(ms || {});
20889
- Qe = ro();
20890
- E2 = { WebSocketConnectionErrors: { FAILED_TO_CONNECT: 1e3, WEBSOCKET_CONNECTION_LOST: 1003, ABNORMAL_CLOSE: 1006 }, APIErrors: { SERVER_ERRORS: 2e3, INIT_CONFIG_NOT_AVAILABLE: 2002, ENDPOINT_UNREACHABLE: 2003, INVALID_TOKEN_FORMAT: 2004 }, TracksErrors: { GENERIC_TRACK: 3e3, CANT_ACCESS_CAPTURE_DEVICE: 3001, DEVICE_NOT_AVAILABLE: 3002, DEVICE_IN_USE: 3003, DEVICE_LOST_MIDWAY: 3004, NOTHING_TO_RETURN: 3005, INVALID_VIDEO_SETTINGS: 3006, CODEC_CHANGE_NOT_PERMITTED: 3007, AUTOPLAY_ERROR: 3008, OVER_CONSTRAINED: 3009, NO_AUDIO_DETECTED: 3010, SYSTEM_DENIED_PERMISSION: 3011, CURRENT_TAB_NOT_SHARED: 3012, AUDIO_PLAYBACK_ERROR: 3013, SELECTED_DEVICE_MISSING: 3014 }, WebrtcErrors: { CREATE_OFFER_FAILED: 4001, CREATE_ANSWER_FAILED: 4002, SET_LOCAL_DESCRIPTION_FAILED: 4003, SET_REMOTE_DESCRIPTION_FAILED: 4004, ICE_FAILURE: 4005, ICE_DISCONNECTED: 4006, STATS_FAILED: 4007 }, WebsocketMethodErrors: { SERVER_ERRORS: 5e3, ALREADY_JOINED: 5001, CANNOT_JOIN_PREVIEW_IN_PROGRESS: 5002 }, GenericErrors: { NOT_CONNECTED: 6e3, SIGNALLING: 6001, UNKNOWN: 6002, NOT_READY: 6003, JSON_PARSING_FAILED: 6004, TRACK_METADATA_MISSING: 6005, RTC_TRACK_MISSING: 6006, PEER_METADATA_MISSING: 6007, INVALID_ROLE: 6008, PREVIEW_IN_PROGRESS: 6009, MISSING_MEDIADEVICES: 6010, MISSING_RTCPEERCONNECTION: 6011, LOCAL_STORAGE_ACCESS_DENIED: 6012, VALIDATION_FAILED: 6013 }, PlaylistErrors: { NO_ENTRY_TO_PLAY: 8001, NO_ENTRY_IS_PLAYING: 8002 } };
20891
- v2 = class a2 extends Error {
20889
+ Qe = so();
20890
+ k2 = { WebSocketConnectionErrors: { FAILED_TO_CONNECT: 1e3, WEBSOCKET_CONNECTION_LOST: 1003, ABNORMAL_CLOSE: 1006 }, APIErrors: { SERVER_ERRORS: 2e3, INIT_CONFIG_NOT_AVAILABLE: 2002, ENDPOINT_UNREACHABLE: 2003, INVALID_TOKEN_FORMAT: 2004 }, TracksErrors: { GENERIC_TRACK: 3e3, CANT_ACCESS_CAPTURE_DEVICE: 3001, DEVICE_NOT_AVAILABLE: 3002, DEVICE_IN_USE: 3003, DEVICE_LOST_MIDWAY: 3004, NOTHING_TO_RETURN: 3005, INVALID_VIDEO_SETTINGS: 3006, CODEC_CHANGE_NOT_PERMITTED: 3007, AUTOPLAY_ERROR: 3008, OVER_CONSTRAINED: 3009, NO_AUDIO_DETECTED: 3010, SYSTEM_DENIED_PERMISSION: 3011, CURRENT_TAB_NOT_SHARED: 3012, AUDIO_PLAYBACK_ERROR: 3013, SELECTED_DEVICE_MISSING: 3014 }, WebrtcErrors: { CREATE_OFFER_FAILED: 4001, CREATE_ANSWER_FAILED: 4002, SET_LOCAL_DESCRIPTION_FAILED: 4003, SET_REMOTE_DESCRIPTION_FAILED: 4004, ICE_FAILURE: 4005, ICE_DISCONNECTED: 4006, STATS_FAILED: 4007 }, WebsocketMethodErrors: { SERVER_ERRORS: 5e3, ALREADY_JOINED: 5001, CANNOT_JOIN_PREVIEW_IN_PROGRESS: 5002 }, GenericErrors: { NOT_CONNECTED: 6e3, SIGNALLING: 6001, UNKNOWN: 6002, NOT_READY: 6003, JSON_PARSING_FAILED: 6004, TRACK_METADATA_MISSING: 6005, RTC_TRACK_MISSING: 6006, PEER_METADATA_MISSING: 6007, INVALID_ROLE: 6008, PREVIEW_IN_PROGRESS: 6009, MISSING_MEDIADEVICES: 6010, MISSING_RTCPEERCONNECTION: 6011, LOCAL_STORAGE_ACCESS_DENIED: 6012, VALIDATION_FAILED: 6013 }, PlaylistErrors: { NO_ENTRY_TO_PLAY: 8001, NO_ENTRY_IS_PLAYING: 8002 } };
20891
+ f2 = class a2 extends Error {
20892
20892
  constructor(t2, i2, r2, s2, o2, n2 = false) {
20893
20893
  super(s2);
20894
20894
  this.code = t2;
@@ -20917,113 +20917,113 @@ var init_dist = __esm({
20917
20917
  }`;
20918
20918
  }
20919
20919
  };
20920
- so = ["join", "offer", "answer", "trickle", "on-error", "JOIN"];
20920
+ ao = ["join", "offer", "answer", "trickle", "on-error", "JOIN"];
20921
20921
  S2 = { WebSocketConnectionErrors: { FailedToConnect(a11, e = "") {
20922
- return new v2(E2.WebSocketConnectionErrors.FAILED_TO_CONNECT, "WebsocketFailedToConnect", a11, `[WS]: ${e}`, `[WS]: ${e}`);
20922
+ return new f2(k2.WebSocketConnectionErrors.FAILED_TO_CONNECT, "WebsocketFailedToConnect", a11, `[WS]: ${e}`, `[WS]: ${e}`);
20923
20923
  }, WebSocketConnectionLost(a11, e = "") {
20924
- return new v2(E2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, "WebSocketConnectionLost", a11, "Network connection lost", e);
20924
+ return new f2(k2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, "WebSocketConnectionLost", a11, "Network connection lost", e);
20925
20925
  }, AbnormalClose(a11, e = "") {
20926
- return new v2(E2.WebSocketConnectionErrors.ABNORMAL_CLOSE, "WebSocketAbnormalClose", a11, "Websocket closed abnormally", e);
20926
+ return new f2(k2.WebSocketConnectionErrors.ABNORMAL_CLOSE, "WebSocketAbnormalClose", a11, "Websocket closed abnormally", e);
20927
20927
  } }, APIErrors: { ServerErrors(a11, e, t2 = "", i2 = true) {
20928
- return new v2(a11, "ServerErrors", e, `[${e}]: Server error ${t2}`, t2, i2);
20928
+ return new f2(a11, "ServerErrors", e, `[${e}]: Server error ${t2}`, t2, i2);
20929
20929
  }, EndpointUnreachable(a11, e = "") {
20930
- return new v2(E2.APIErrors.ENDPOINT_UNREACHABLE, "EndpointUnreachable", a11, `Endpoint is not reachable - ${e}`, e);
20930
+ return new f2(k2.APIErrors.ENDPOINT_UNREACHABLE, "EndpointUnreachable", a11, `Endpoint is not reachable - ${e}`, e);
20931
20931
  }, InvalidTokenFormat(a11, e = "") {
20932
- return new v2(E2.APIErrors.INVALID_TOKEN_FORMAT, "InvalidTokenFormat", a11, `Token is not in proper JWT format - ${e}`, e, true);
20932
+ return new f2(k2.APIErrors.INVALID_TOKEN_FORMAT, "InvalidTokenFormat", a11, `Token is not in proper JWT format - ${e}`, e, true);
20933
20933
  }, InitConfigNotAvailable(a11, e = "") {
20934
- return new v2(E2.APIErrors.INIT_CONFIG_NOT_AVAILABLE, "InitError", a11, `[INIT]: ${e}`, `[INIT]: ${e}`);
20934
+ return new f2(k2.APIErrors.INIT_CONFIG_NOT_AVAILABLE, "InitError", a11, `[INIT]: ${e}`, `[INIT]: ${e}`);
20935
20935
  } }, TracksErrors: { GenericTrack(a11, e = "") {
20936
- return new v2(E2.TracksErrors.GENERIC_TRACK, "GenericTrack", a11, `[TRACK]: ${e}`, `[TRACK]: ${e}`);
20936
+ return new f2(k2.TracksErrors.GENERIC_TRACK, "GenericTrack", a11, `[TRACK]: ${e}`, `[TRACK]: ${e}`);
20937
20937
  }, CantAccessCaptureDevice(a11, e, t2 = "") {
20938
- return new v2(E2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, "CantAccessCaptureDevice", a11, `User denied permission to access capture device - ${e}`, t2);
20938
+ return new f2(k2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, "CantAccessCaptureDevice", a11, `User denied permission to access capture device - ${e}`, t2);
20939
20939
  }, DeviceNotAvailable(a11, e, t2 = "") {
20940
- return new v2(E2.TracksErrors.DEVICE_NOT_AVAILABLE, "DeviceNotAvailable", a11, `[TRACK]: Capture device is no longer available - ${e}`, t2);
20940
+ return new f2(k2.TracksErrors.DEVICE_NOT_AVAILABLE, "DeviceNotAvailable", a11, `[TRACK]: Capture device is no longer available - ${e}`, t2);
20941
20941
  }, DeviceInUse(a11, e, t2 = "") {
20942
- return new v2(E2.TracksErrors.DEVICE_IN_USE, "DeviceInUse", a11, `[TRACK]: Capture device is in use by another application - ${e}`, t2);
20942
+ return new f2(k2.TracksErrors.DEVICE_IN_USE, "DeviceInUse", a11, `[TRACK]: Capture device is in use by another application - ${e}`, t2);
20943
20943
  }, DeviceLostMidway(a11, e, t2 = "") {
20944
- return new v2(E2.TracksErrors.DEVICE_LOST_MIDWAY, "DeviceLostMidway", a11, `Lost access to capture device midway - ${e}`, t2);
20944
+ return new f2(k2.TracksErrors.DEVICE_LOST_MIDWAY, "DeviceLostMidway", a11, `Lost access to capture device midway - ${e}`, t2);
20945
20945
  }, NothingToReturn(a11, e = "", t2 = "There is no media to return. Please select either video or audio or both.") {
20946
- return new v2(E2.TracksErrors.NOTHING_TO_RETURN, "NothingToReturn", a11, t2, e);
20946
+ return new f2(k2.TracksErrors.NOTHING_TO_RETURN, "NothingToReturn", a11, t2, e);
20947
20947
  }, InvalidVideoSettings(a11, e = "") {
20948
- return new v2(E2.TracksErrors.INVALID_VIDEO_SETTINGS, "InvalidVideoSettings", a11, "Cannot enable simulcast when no video settings are provided", e);
20948
+ return new f2(k2.TracksErrors.INVALID_VIDEO_SETTINGS, "InvalidVideoSettings", a11, "Cannot enable simulcast when no video settings are provided", e);
20949
20949
  }, AutoplayBlocked(a11, e = "") {
20950
- return new v2(E2.TracksErrors.AUTOPLAY_ERROR, "AutoplayBlocked", a11, "Autoplay blocked because the user didn't interact with the document first", e);
20950
+ return new f2(k2.TracksErrors.AUTOPLAY_ERROR, "AutoplayBlocked", a11, "Autoplay blocked because the user didn't interact with the document first", e);
20951
20951
  }, CodecChangeNotPermitted(a11, e = "") {
20952
- return new v2(E2.TracksErrors.CODEC_CHANGE_NOT_PERMITTED, "CodecChangeNotPermitted", a11, "Codec can't be changed mid call.", e);
20952
+ return new f2(k2.TracksErrors.CODEC_CHANGE_NOT_PERMITTED, "CodecChangeNotPermitted", a11, "Codec can't be changed mid call.", e);
20953
20953
  }, OverConstrained(a11, e, t2 = "") {
20954
- return new v2(E2.TracksErrors.OVER_CONSTRAINED, "OverConstrained", a11, `[TRACK]: Requested constraints cannot be satisfied with the device hardware - ${e}`, t2);
20954
+ return new f2(k2.TracksErrors.OVER_CONSTRAINED, "OverConstrained", a11, `[TRACK]: Requested constraints cannot be satisfied with the device hardware - ${e}`, t2);
20955
20955
  }, NoAudioDetected(a11, e = "Please check the mic or use another audio input") {
20956
- return new v2(E2.TracksErrors.NO_AUDIO_DETECTED, "NoAudioDetected", a11, "No audio input detected from microphone", e);
20956
+ return new f2(k2.TracksErrors.NO_AUDIO_DETECTED, "NoAudioDetected", a11, "No audio input detected from microphone", e);
20957
20957
  }, SystemDeniedPermission(a11, e, t2 = "") {
20958
- return new v2(E2.TracksErrors.SYSTEM_DENIED_PERMISSION, "SystemDeniedPermission", a11, `Operating System denied permission to access capture device - ${e}`, t2);
20958
+ return new f2(k2.TracksErrors.SYSTEM_DENIED_PERMISSION, "SystemDeniedPermission", a11, `Operating System denied permission to access capture device - ${e}`, t2);
20959
20959
  }, CurrentTabNotShared() {
20960
- return new v2(E2.TracksErrors.CURRENT_TAB_NOT_SHARED, "CurrentTabNotShared", "TRACK", "The app requires you to share the current tab", "You must screen share the current tab in order to proceed");
20960
+ return new f2(k2.TracksErrors.CURRENT_TAB_NOT_SHARED, "CurrentTabNotShared", "TRACK", "The app requires you to share the current tab", "You must screen share the current tab in order to proceed");
20961
20961
  }, AudioPlaybackError(a11) {
20962
- return new v2(E2.TracksErrors.AUDIO_PLAYBACK_ERROR, "Audio playback error", "TRACK", a11, a11);
20962
+ return new f2(k2.TracksErrors.AUDIO_PLAYBACK_ERROR, "Audio playback error", "TRACK", a11, a11);
20963
20963
  }, SelectedDeviceMissing(a11) {
20964
- return new v2(E2.TracksErrors.SELECTED_DEVICE_MISSING, "SelectedDeviceMissing", "TRACK", `Could not detect selected ${a11} device`, `Please check connection to the ${a11} device`, false);
20964
+ return new f2(k2.TracksErrors.SELECTED_DEVICE_MISSING, "SelectedDeviceMissing", "TRACK", `Could not detect selected ${a11} device`, `Please check connection to the ${a11} device`, false);
20965
20965
  } }, WebrtcErrors: { CreateOfferFailed(a11, e = "") {
20966
- return new v2(E2.WebrtcErrors.CREATE_OFFER_FAILED, "CreateOfferFailed", a11, `[${a11.toString()}]: Failed to create offer. `, e);
20966
+ return new f2(k2.WebrtcErrors.CREATE_OFFER_FAILED, "CreateOfferFailed", a11, `[${a11.toString()}]: Failed to create offer. `, e);
20967
20967
  }, CreateAnswerFailed(a11, e = "") {
20968
- return new v2(E2.WebrtcErrors.CREATE_ANSWER_FAILED, "CreateAnswerFailed", a11, `[${a11.toString()}]: Failed to create answer. `, e);
20968
+ return new f2(k2.WebrtcErrors.CREATE_ANSWER_FAILED, "CreateAnswerFailed", a11, `[${a11.toString()}]: Failed to create answer. `, e);
20969
20969
  }, SetLocalDescriptionFailed(a11, e = "") {
20970
- return new v2(E2.WebrtcErrors.SET_LOCAL_DESCRIPTION_FAILED, "SetLocalDescriptionFailed", a11, `[${a11.toString()}]: Failed to set offer. `, e);
20970
+ return new f2(k2.WebrtcErrors.SET_LOCAL_DESCRIPTION_FAILED, "SetLocalDescriptionFailed", a11, `[${a11.toString()}]: Failed to set offer. `, e);
20971
20971
  }, SetRemoteDescriptionFailed(a11, e = "") {
20972
- return new v2(E2.WebrtcErrors.SET_REMOTE_DESCRIPTION_FAILED, "SetRemoteDescriptionFailed", a11, `[${a11.toString()}]: Failed to set answer. `, e, true);
20972
+ return new f2(k2.WebrtcErrors.SET_REMOTE_DESCRIPTION_FAILED, "SetRemoteDescriptionFailed", a11, `[${a11.toString()}]: Failed to set answer. `, e, true);
20973
20973
  }, ICEFailure(a11, e = "", t2 = false) {
20974
- return new v2(E2.WebrtcErrors.ICE_FAILURE, "ICEFailure", a11, `[${a11.toString()}]: Ice connection state FAILED`, e, t2);
20974
+ return new f2(k2.WebrtcErrors.ICE_FAILURE, "ICEFailure", a11, `[${a11.toString()}]: Ice connection state FAILED`, e, t2);
20975
20975
  }, ICEDisconnected(a11, e = "") {
20976
- return new v2(E2.WebrtcErrors.ICE_DISCONNECTED, "ICEDisconnected", a11, `[${a11.toString()}]: Ice connection state DISCONNECTED`, e);
20976
+ return new f2(k2.WebrtcErrors.ICE_DISCONNECTED, "ICEDisconnected", a11, `[${a11.toString()}]: Ice connection state DISCONNECTED`, e);
20977
20977
  }, StatsFailed(a11, e = "") {
20978
- return new v2(E2.WebrtcErrors.STATS_FAILED, "StatsFailed", a11, `Failed to WebRTC get stats - ${e}`, e);
20978
+ return new f2(k2.WebrtcErrors.STATS_FAILED, "StatsFailed", a11, `Failed to WebRTC get stats - ${e}`, e);
20979
20979
  } }, WebsocketMethodErrors: { ServerErrors(a11, e, t2) {
20980
- return new v2(a11, "ServerErrors", e, t2, t2, so.includes(e));
20980
+ return new f2(a11, "ServerErrors", e, t2, t2, ao.includes(e));
20981
20981
  }, AlreadyJoined(a11, e = "") {
20982
- return new v2(E2.WebsocketMethodErrors.ALREADY_JOINED, "AlreadyJoined", a11, "[JOIN]: You have already joined this room.", e);
20982
+ return new f2(k2.WebsocketMethodErrors.ALREADY_JOINED, "AlreadyJoined", a11, "[JOIN]: You have already joined this room.", e);
20983
20983
  }, CannotJoinPreviewInProgress(a11, e = "") {
20984
- return new v2(E2.WebsocketMethodErrors.CANNOT_JOIN_PREVIEW_IN_PROGRESS, "CannotJoinPreviewInProgress", a11, "[JOIN]: Cannot join if preview is in progress", e);
20984
+ return new f2(k2.WebsocketMethodErrors.CANNOT_JOIN_PREVIEW_IN_PROGRESS, "CannotJoinPreviewInProgress", a11, "[JOIN]: Cannot join if preview is in progress", e);
20985
20985
  } }, GenericErrors: { NotConnected(a11, e = "") {
20986
- return new v2(E2.GenericErrors.NOT_CONNECTED, "NotConnected", a11, "Client is not connected", e);
20986
+ return new f2(k2.GenericErrors.NOT_CONNECTED, "NotConnected", a11, "Client is not connected", e);
20987
20987
  }, Signalling(a11, e) {
20988
- return new v2(E2.GenericErrors.SIGNALLING, "Signalling", a11, `Unknown signalling error: ${a11.toString()} ${e} `, e);
20988
+ return new f2(k2.GenericErrors.SIGNALLING, "Signalling", a11, `Unknown signalling error: ${a11.toString()} ${e} `, e);
20989
20989
  }, Unknown(a11, e) {
20990
- return new v2(E2.GenericErrors.UNKNOWN, "Unknown", a11, `Unknown exception: ${e}`, e);
20990
+ return new f2(k2.GenericErrors.UNKNOWN, "Unknown", a11, `Unknown exception: ${e}`, e);
20991
20991
  }, NotReady(a11, e = "") {
20992
- return new v2(E2.GenericErrors.NOT_READY, "NotReady", a11, e, e);
20992
+ return new f2(k2.GenericErrors.NOT_READY, "NotReady", a11, e, e);
20993
20993
  }, JsonParsingFailed(a11, e, t2 = "") {
20994
- return new v2(E2.GenericErrors.JSON_PARSING_FAILED, "JsonParsingFailed", a11, `Failed to parse JSON message - ${e}`, t2);
20994
+ return new f2(k2.GenericErrors.JSON_PARSING_FAILED, "JsonParsingFailed", a11, `Failed to parse JSON message - ${e}`, t2);
20995
20995
  }, TrackMetadataMissing(a11, e = "") {
20996
- return new v2(E2.GenericErrors.TRACK_METADATA_MISSING, "TrackMetadataMissing", a11, "Track Metadata Missing", e);
20996
+ return new f2(k2.GenericErrors.TRACK_METADATA_MISSING, "TrackMetadataMissing", a11, "Track Metadata Missing", e);
20997
20997
  }, RTCTrackMissing(a11, e = "") {
20998
- return new v2(E2.GenericErrors.RTC_TRACK_MISSING, "RTCTrackMissing", a11, "RTC Track missing", e);
20998
+ return new f2(k2.GenericErrors.RTC_TRACK_MISSING, "RTCTrackMissing", a11, "RTC Track missing", e);
20999
20999
  }, PeerMetadataMissing(a11, e = "") {
21000
- return new v2(E2.GenericErrors.PEER_METADATA_MISSING, "PeerMetadataMissing", a11, "Peer Metadata Missing", e);
21000
+ return new f2(k2.GenericErrors.PEER_METADATA_MISSING, "PeerMetadataMissing", a11, "Peer Metadata Missing", e);
21001
21001
  }, ValidationFailed(a11, e) {
21002
- return new v2(E2.GenericErrors.VALIDATION_FAILED, "ValidationFailed", "VALIDATION", a11, e ? JSON.stringify(e) : "");
21002
+ return new f2(k2.GenericErrors.VALIDATION_FAILED, "ValidationFailed", "VALIDATION", a11, e ? JSON.stringify(e) : "");
21003
21003
  }, InvalidRole(a11, e) {
21004
- return new v2(E2.GenericErrors.INVALID_ROLE, "InvalidRole", a11, "Invalid role. Join with valid role", e, true);
21004
+ return new f2(k2.GenericErrors.INVALID_ROLE, "InvalidRole", a11, "Invalid role. Join with valid role", e, true);
21005
21005
  }, PreviewAlreadyInProgress(a11, e = "") {
21006
- return new v2(E2.GenericErrors.PREVIEW_IN_PROGRESS, "PreviewAlreadyInProgress", a11, "[Preview]: Cannot join if preview is in progress", e);
21006
+ return new f2(k2.GenericErrors.PREVIEW_IN_PROGRESS, "PreviewAlreadyInProgress", a11, "[Preview]: Cannot join if preview is in progress", e);
21007
21007
  }, LocalStorageAccessDenied(a11 = "Access to localStorage has been denied") {
21008
- return new v2(E2.GenericErrors.LOCAL_STORAGE_ACCESS_DENIED, "LocalStorageAccessDenied", "NONE", "LocalStorageAccessDenied", a11);
21008
+ return new f2(k2.GenericErrors.LOCAL_STORAGE_ACCESS_DENIED, "LocalStorageAccessDenied", "NONE", "LocalStorageAccessDenied", a11);
21009
21009
  }, MissingMediaDevices() {
21010
- return new v2(E2.GenericErrors.MISSING_MEDIADEVICES, "MissingMediaDevices", "JOIN", "navigator.mediaDevices is undefined. 100ms SDK won't work on this website as WebRTC is not supported on HTTP endpoints(missing navigator.mediaDevices). Please ensure you're using the SDK either on localhost or a valid HTTPS endpoint.", "", true);
21010
+ return new f2(k2.GenericErrors.MISSING_MEDIADEVICES, "MissingMediaDevices", "JOIN", "navigator.mediaDevices is undefined. 100ms SDK won't work on this website as WebRTC is not supported on HTTP endpoints(missing navigator.mediaDevices). Please ensure you're using the SDK either on localhost or a valid HTTPS endpoint.", "", true);
21011
21011
  }, MissingRTCPeerConnection() {
21012
- return new v2(E2.GenericErrors.MISSING_RTCPEERCONNECTION, "MissingRTCPeerConnection", "JOIN", "RTCPeerConnection which is a core requirement for WebRTC call was not found, this could be due to an unsupported browser or browser extensions blocking WebRTC", "", true);
21012
+ return new f2(k2.GenericErrors.MISSING_RTCPEERCONNECTION, "MissingRTCPeerConnection", "JOIN", "RTCPeerConnection which is a core requirement for WebRTC call was not found, this could be due to an unsupported browser or browser extensions blocking WebRTC", "", true);
21013
21013
  } }, MediaPluginErrors: { PlatformNotSupported(a11, e = "") {
21014
- return new v2(7001, "PlatformNotSupported", a11, "Check HMS Docs to see the list of supported platforms", e);
21014
+ return new f2(7001, "PlatformNotSupported", a11, "Check HMS Docs to see the list of supported platforms", e);
21015
21015
  }, InitFailed(a11, e = "") {
21016
- return new v2(7002, "InitFailed", a11, "Plugin init failed", e);
21016
+ return new f2(7002, "InitFailed", a11, "Plugin init failed", e);
21017
21017
  }, ProcessingFailed(a11, e = "") {
21018
- return new v2(7003, "ProcessingFailed", a11, "Plugin processing failed", e);
21018
+ return new f2(7003, "ProcessingFailed", a11, "Plugin processing failed", e);
21019
21019
  }, AddAlreadyInProgress(a11, e = "") {
21020
- return new v2(7004, "AddAlreadyInProgress", a11, "Plugin add already in progress", e);
21020
+ return new f2(7004, "AddAlreadyInProgress", a11, "Plugin add already in progress", e);
21021
21021
  }, DeviceNotSupported(a11, e = "") {
21022
- return new v2(7005, "DeviceNotSupported", a11, "Check HMS Docs to see the list of supported devices", e);
21022
+ return new f2(7005, "DeviceNotSupported", a11, "Check HMS Docs to see the list of supported devices", e);
21023
21023
  } }, PlaylistErrors: { NoEntryToPlay(a11, e) {
21024
- return new v2(E2.PlaylistErrors.NO_ENTRY_TO_PLAY, "NoEntryToPlay", a11, "Reached end of playlist", e);
21024
+ return new f2(k2.PlaylistErrors.NO_ENTRY_TO_PLAY, "NoEntryToPlay", a11, "Reached end of playlist", e);
21025
21025
  }, NoEntryPlaying(a11, e) {
21026
- return new v2(E2.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
21026
+ return new f2(k2.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
21027
21027
  } } };
21028
21028
  vr = class {
21029
21029
  constructor() {
@@ -21089,13 +21089,13 @@ var init_dist = __esm({
21089
21089
  return t2 ? a11 = t2 : (a11 = (0, import_uuid4.v4)(), e.set(a11)), a11;
21090
21090
  };
21091
21091
  Ts = "[VALIDATIONS]";
21092
- gt = () => {
21092
+ St = () => {
21093
21093
  if (!oe(RTCPeerConnection)) {
21094
21094
  let a11 = S2.GenericErrors.MissingRTCPeerConnection();
21095
21095
  throw d2.e(Ts, a11), a11;
21096
21096
  }
21097
21097
  };
21098
- Tt = () => {
21098
+ gt = () => {
21099
21099
  if (!oe(navigator.mediaDevices)) {
21100
21100
  let a11 = S2.GenericErrors.MissingMediaDevices();
21101
21101
  throw d2.e(Ts, a11), a11;
@@ -21105,7 +21105,7 @@ var init_dist = __esm({
21105
21105
  vs = (a11, e = ",") => Object.keys(a11).filter((t2) => oe(a11[t2])).map((t2) => `${t2}:${a11[t2]}`).join(e);
21106
21106
  H2 = class {
21107
21107
  constructor({ name: e, level: t2, properties: i2, includesPII: r2, timestamp: s2 }) {
21108
- this.metadata = { peer: {}, userAgent: ft() };
21108
+ this.metadata = { peer: {}, userAgent: Tt() };
21109
21109
  this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = (0, import_uuid3.v4)(), this.device_id = gs();
21110
21110
  }
21111
21111
  toSignalParams() {
@@ -21205,7 +21205,7 @@ var init_dist = __esm({
21205
21205
  return e = m(m({}, i2), e), e;
21206
21206
  }
21207
21207
  static getErrorProperties(e) {
21208
- return e ? e instanceof v2 ? e.toAnalyticsProperties() : { error_name: e.name, error_message: e.message, error_description: e.cause } : {};
21208
+ return e ? e instanceof f2 ? e.toAnalyticsProperties() : { error_name: e.name, error_message: e.message, error_description: e.cause } : {};
21209
21209
  }
21210
21210
  };
21211
21211
  y2.KEY_REQUESTED_AT = "requested_at", y2.KEY_RESPONDED_AT = "responded_at";
@@ -21268,7 +21268,7 @@ var init_dist = __esm({
21268
21268
  return new H2({ name: l2, level: u2, properties: p2 });
21269
21269
  }
21270
21270
  };
21271
- ai = class {
21271
+ si = class {
21272
21272
  constructor(e) {
21273
21273
  this.eventBus = e;
21274
21274
  this.TAG = "[AudioPluginsAnalytics]";
@@ -21312,14 +21312,14 @@ var init_dist = __esm({
21312
21312
  delete this.addedTimestamps[e], delete this.initTime[e], delete this.pluginAdded[e], delete this.pluginSampleRate[e];
21313
21313
  }
21314
21314
  };
21315
- co = 48e3;
21316
- lo = () => navigator.userAgent.indexOf("Firefox") !== -1;
21317
- vt = class {
21315
+ lo = 48e3;
21316
+ uo = () => navigator.userAgent.indexOf("Firefox") !== -1;
21317
+ ft = class {
21318
21318
  constructor(e, t2, i2) {
21319
21319
  this.eventBus = t2;
21320
21320
  this.TAG = "[AudioPluginsManager]";
21321
21321
  this.pluginAddInProgress = false;
21322
- this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new ai(t2), this.createAudioContext(), this.room = i2;
21322
+ this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new si(t2), this.createAudioContext(), this.room = i2;
21323
21323
  }
21324
21324
  getPlugins() {
21325
21325
  return Array.from(this.pluginsMap.keys());
@@ -21478,7 +21478,7 @@ var init_dist = __esm({
21478
21478
  });
21479
21479
  }
21480
21480
  createAudioContext() {
21481
- this.audioContext || (lo() ? this.audioContext = new AudioContext() : this.audioContext = new AudioContext({ sampleRate: co }));
21481
+ this.audioContext || (uo() ? this.audioContext = new AudioContext() : this.audioContext = new AudioContext({ sampleRate: lo }));
21482
21482
  }
21483
21483
  };
21484
21484
  He = { audioContext: null, getAudioContext() {
@@ -21528,9 +21528,9 @@ var init_dist = __esm({
21528
21528
  }
21529
21529
  };
21530
21530
  })()`;
21531
- mo = 35;
21532
- So = 5;
21533
- ni = class {
21531
+ So = 35;
21532
+ go = 5;
21533
+ oi = class {
21534
21534
  constructor(e, t2, i2) {
21535
21535
  this.track = e;
21536
21536
  this.audioLevelEvent = t2;
@@ -21579,7 +21579,7 @@ var init_dist = __esm({
21579
21579
  });
21580
21580
  }
21581
21581
  sendAudioLevel(e = 0) {
21582
- if (e = e > mo ? e : 0, Math.abs(this.audioLevel - e) > So) {
21582
+ if (e = e > So ? e : 0, Math.abs(this.audioLevel - e) > go) {
21583
21583
  this.audioLevel = e;
21584
21584
  let i2 = { track: this.track, audioLevel: this.audioLevel };
21585
21585
  this.audioLevelEvent.publish(i2);
@@ -21625,8 +21625,9 @@ var init_dist = __esm({
21625
21625
  Is = ((i2) => (i2.REGULAR = "regular", i2.SCREEN = "screen", i2.COMPOSITE = "composite", i2))(Is || {});
21626
21626
  As = ((r2) => (r2.INITIALISED = "initialised", r2.STARTED = "started", r2.STOPPED = "stopped", r2.FAILED = "failed", r2))(As || {});
21627
21627
  Hs = ((e) => (e.CAPTION = "caption", e))(Hs || {});
21628
- Ve = { f: "high", h: "medium", q: "low" };
21629
- Cs = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Cs || {});
21628
+ Be = { f: "high", h: "medium", q: "low" };
21629
+ Cs = ((t2) => (t2.VOICE = "voice", t2.MUSIC = "music", t2))(Cs || {});
21630
+ Ls = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Ls || {});
21630
21631
  ee = class {
21631
21632
  constructor() {
21632
21633
  this._volume = 1;
@@ -21653,18 +21654,18 @@ var init_dist = __esm({
21653
21654
  return this._deviceId = e, this;
21654
21655
  }
21655
21656
  audioMode(e = "voice") {
21656
- return this._audioMode = e, this._audioMode === "music" && (this._maxBitrate = 320), this;
21657
+ return this._audioMode = e, this._audioMode === "music" ? this._maxBitrate = 320 : this._maxBitrate = 32, this;
21657
21658
  }
21658
21659
  advanced(e) {
21659
21660
  return this._advanced = e, this;
21660
21661
  }
21661
21662
  build() {
21662
- return new Fe(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced, this._audioMode);
21663
+ return new Ve(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced, this._audioMode);
21663
21664
  }
21664
21665
  };
21665
- Fe = class {
21666
+ Ve = class {
21666
21667
  constructor(e, t2, i2, r2, s2, o2) {
21667
- this.volume = e, this.codec = t2, this.maxBitrate = i2, this.deviceId = r2, this.advanced = s2, this.audioMode = o2, this.audioMode === "music" && (this.maxBitrate = 320);
21668
+ this.volume = e, this.codec = t2, this.maxBitrate = i2, this.deviceId = r2, this.advanced = s2, this.audioMode = o2, this.audioMode === "music" ? this.maxBitrate = 320 : this.maxBitrate = 32;
21668
21669
  }
21669
21670
  toConstraints() {
21670
21671
  return { deviceId: this.deviceId, advanced: this.audioMode === "music" ? [] : this.advanced };
@@ -21711,10 +21712,10 @@ var init_dist = __esm({
21711
21712
  return this._facingMode = e, this;
21712
21713
  }
21713
21714
  build() {
21714
- return new Ge(this._width, this._height, this._codec, this._maxFramerate, this._deviceId, this._advanced, this._maxBitrate, this._facingMode);
21715
+ return new Fe(this._width, this._height, this._codec, this._maxFramerate, this._deviceId, this._advanced, this._maxBitrate, this._facingMode);
21715
21716
  }
21716
21717
  };
21717
- Ge = class {
21718
+ Fe = class {
21718
21719
  constructor(e, t2, i2, r2, s2, o2, n2, l2) {
21719
21720
  this.width = e, this.height = t2, this.codec = i2, this.maxFramerate = r2, this.maxBitrate = n2, this.deviceId = s2, this.advanced = o2, this.facingMode = l2;
21720
21721
  }
@@ -21784,17 +21785,17 @@ var init_dist = __esm({
21784
21785
  yield this.transceiver.sender.replaceTrack(this.processedTrack || this.nativeTrack);
21785
21786
  });
21786
21787
  this.handleSettingsChange = (t3) => c2(this, null, function* () {
21787
- let i3 = this.stream, r3 = Ds(t3, this.settings);
21788
+ let i3 = this.stream, r3 = ws(t3, this.settings);
21788
21789
  (r3("maxBitrate") || r3("audioMode")) && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this, t3)), (r3("advanced") || r3("audioMode")) && (yield this.replaceTrackWith(t3));
21789
21790
  });
21790
21791
  this.handleDeviceChange = (t3, i3 = false) => c2(this, null, function* () {
21791
- if (Ds(t3, this.settings)("deviceId")) {
21792
+ if (ws(t3, this.settings)("deviceId")) {
21792
21793
  this.manuallySelectedDeviceId = i3 ? this.manuallySelectedDeviceId : t3.deviceId, d2.d(this.TAG, "device change", "manual selection:", this.manuallySelectedDeviceId, "new device:", t3.deviceId), yield this.replaceTrackWith(t3);
21793
21794
  let s3 = this.nativeTrack.getSettings().groupId;
21794
21795
  !i3 && t3.deviceId && (Q2.updateSelection("audioInput", { deviceId: t3.deviceId, groupId: s3 }), this.eventBus.deviceChange.publish({ isUserSelection: true, type: "audioInput", selection: { deviceId: t3.deviceId, groupId: s3 } }));
21795
21796
  }
21796
21797
  });
21797
- t2.tracks.push(this), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && !ue(i2) && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new vt(this, s2, n2), this.setFirstTrackId(i2.id), Tr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
21798
+ t2.tracks.push(this), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && !ue(i2) && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new ft(this, s2, n2), this.setFirstTrackId(i2.id), Tr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
21798
21799
  }
21799
21800
  getManuallySelectedDeviceId() {
21800
21801
  return this.manuallySelectedDeviceId;
@@ -21860,7 +21861,7 @@ var init_dist = __esm({
21860
21861
  });
21861
21862
  }
21862
21863
  initAudioLevelMonitor() {
21863
- this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new ni(this, this.eventBus.trackAudioLevelUpdate, this.eventBus.localAudioSilence), this.audioLevelMonitor.start(), this.audioLevelMonitor.detectSilence();
21864
+ this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new oi(this, this.eventBus.trackAudioLevelUpdate, this.eventBus.localAudioSilence), this.audioLevelMonitor.start(), this.audioLevelMonitor.detectSilence();
21864
21865
  }
21865
21866
  destroyAudioLevelMonitor() {
21866
21867
  var t2;
@@ -21880,7 +21881,7 @@ var init_dist = __esm({
21880
21881
  }
21881
21882
  buildNewSettings(t2) {
21882
21883
  let { volume: i2, codec: r2, maxBitrate: s2, deviceId: o2, advanced: n2, audioMode: l2 } = m(m({}, this.settings), t2);
21883
- return new Fe(i2, r2, s2, o2, n2, l2);
21884
+ return new Ve(i2, r2, s2, o2, n2, l2);
21884
21885
  }
21885
21886
  };
21886
21887
  se = class a4 extends Ie {
@@ -21948,10 +21949,10 @@ var init_dist = __esm({
21948
21949
  this.sinkCount > 0 && this.sinkCount--;
21949
21950
  }
21950
21951
  };
21951
- Mt = { none: -1, low: 0, medium: 1, high: 2 };
21952
- To = 0.5;
21953
- ws = (a11, e) => {
21954
- let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) => Mt[o2.layer] - Mt[n2.layer]), s2 = e[i2] * ((window == null ? void 0 : window.devicePixelRatio) || 1);
21952
+ vt = { none: -1, low: 0, medium: 1, high: 2 };
21953
+ fo = 0.5;
21954
+ _s = (a11, e) => {
21955
+ let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) => vt[o2.layer] - vt[n2.layer]), s2 = e[i2] * ((window == null ? void 0 : window.devicePixelRatio) || 1);
21955
21956
  for (let o2 = 0; o2 < r2.length; o2++) {
21956
21957
  let { resolution: n2, layer: l2 } = r2[o2], u2 = n2[i2];
21957
21958
  if (s2 <= u2) {
@@ -21959,7 +21960,7 @@ var init_dist = __esm({
21959
21960
  break;
21960
21961
  } else {
21961
21962
  let p2 = r2[o2 + 1], h2 = p2 ? p2.resolution[i2] : Number.POSITIVE_INFINITY;
21962
- if ((s2 - u2) / (h2 - u2) < To) {
21963
+ if ((s2 - u2) / (h2 - u2) < fo) {
21963
21964
  t2 = l2;
21964
21965
  break;
21965
21966
  }
@@ -21994,7 +21995,7 @@ var init_dist = __esm({
21994
21995
  return e || d2.w(this.TAG, "IntersectionObserver is not supported, fallback will be used instead"), e;
21995
21996
  }
21996
21997
  };
21997
- _s = new Rr();
21998
+ Ns = new Rr();
21998
21999
  Ir = class {
21999
22000
  constructor() {
22000
22001
  this.TAG = "[HMSResizeObserverWrapper]";
@@ -22008,7 +22009,7 @@ var init_dist = __esm({
22008
22009
  (t2 = this.resizeObserver) == null || t2.unobserve(e), this.listeners.delete(e);
22009
22010
  };
22010
22011
  this.createObserver = () => {
22011
- this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(oi(this.handleResize, 300)));
22012
+ this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(ai(this.handleResize, 300)));
22012
22013
  };
22013
22014
  this.handleResize = (e) => {
22014
22015
  var t2;
@@ -22022,7 +22023,7 @@ var init_dist = __esm({
22022
22023
  return e || d2.w(this.TAG, "Resize Observer is not supported"), e;
22023
22024
  }
22024
22025
  };
22025
- Ns = new Ir();
22026
+ Os = new Ir();
22026
22027
  Xe = class {
22027
22028
  constructor(e) {
22028
22029
  this.track = e;
@@ -22066,7 +22067,7 @@ var init_dist = __esm({
22066
22067
  return Array.from(this.videoElements);
22067
22068
  }
22068
22069
  init() {
22069
- O2 && (this.resizeObserver = Ns, this.intersectionObserver = _s);
22070
+ O2 && (this.resizeObserver = Os, this.intersectionObserver = Ns);
22070
22071
  }
22071
22072
  isElementInViewport(e) {
22072
22073
  let t2 = e.offsetTop, i2 = e.offsetLeft, r2 = e.offsetWidth, s2 = e.offsetHeight, { hidden: o2 } = e, { opacity: n2, display: l2 } = getComputedStyle(e);
@@ -22086,8 +22087,8 @@ var init_dist = __esm({
22086
22087
  let { width: r2, height: s2 } = i2;
22087
22088
  if (r2 === 0 || s2 === 0)
22088
22089
  continue;
22089
- let o2 = ws(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
22090
- e ? e = Mt[o2] > Mt[e] ? o2 : e : e = o2;
22090
+ let o2 = _s(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
22091
+ e ? e = vt[o2] > vt[e] ? o2 : e : e = o2;
22091
22092
  }
22092
22093
  e && (d2.d(this.TAG, `selecting max layer ${e} for the track`, `${this.track}`), yield this.track.setPreferredLayer(e));
22093
22094
  });
@@ -22095,7 +22096,7 @@ var init_dist = __esm({
22095
22096
  };
22096
22097
  Ar = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Ar || {});
22097
22098
  Hr = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Hr || {});
22098
- yt = class {
22099
+ Mt = class {
22099
22100
  constructor() {
22100
22101
  this.total = 0;
22101
22102
  this.count = 0;
@@ -22114,10 +22115,10 @@ var init_dist = __esm({
22114
22115
  constructor(e) {
22115
22116
  this.eventBus = e;
22116
22117
  this.TAG = "[VideoPluginsAnalytics]";
22117
- this.initTime = {}, this.preProcessingAvgs = new yt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
22118
+ this.initTime = {}, this.preProcessingAvgs = new Mt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
22118
22119
  }
22119
22120
  added(e, t2, i2) {
22120
- this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new yt(), t2 && (this.pluginInputFrameRate[e] = t2, this.pluginFrameRate[e] = i2 || t2), this.eventBus.analytics.publish(ne.added(e, this.addedTimestamps[e]));
22121
+ this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new Mt(), t2 && (this.pluginInputFrameRate[e] = t2, this.pluginFrameRate[e] = i2 || t2), this.eventBus.analytics.publish(ne.added(e, this.addedTimestamps[e]));
22121
22122
  }
22122
22123
  removed(e) {
22123
22124
  var t2;
@@ -22174,10 +22175,10 @@ var init_dist = __esm({
22174
22175
  delete this.addedTimestamps[e], delete this.initTime[e], delete this.processingAvgs[e], delete this.pluginAdded[e], delete this.pluginInputFrameRate[e], delete this.pluginFrameRate[e];
22175
22176
  }
22176
22177
  };
22177
- Os = 24;
22178
- vo = 320;
22179
- Mo = 240;
22180
- kt = class {
22178
+ xs = 24;
22179
+ Mo = 320;
22180
+ yo = 240;
22181
+ yt = class {
22181
22182
  constructor(e, t2) {
22182
22183
  this.TAG = "[VideoPluginsManager]";
22183
22184
  this.pluginsLoopRunning = false;
@@ -22221,7 +22222,7 @@ var init_dist = __esm({
22221
22222
  d2.w(this.TAG, `plugin - ${e.getName()} already added.`);
22222
22223
  return;
22223
22224
  }
22224
- let r2 = this.hmsTrack.getMediaTrackSettings().frameRate || Os, s2 = 0;
22225
+ let r2 = this.hmsTrack.getMediaTrackSettings().frameRate || xs, s2 = 0;
22225
22226
  t2 && t2 > 0 ? (d2.i(this.TAG, `adding plugin ${e.getName()} with framerate ${t2}`), t2 < r2 && (s2 = Math.ceil(r2 / t2) - 1), this.analytics.added(i2, r2, t2)) : (d2.i(this.TAG, `adding plugin ${e.getName()}`), this.analytics.added(i2, r2)), d2.i(this.TAG, "numFrames to skip processing", s2), this.pluginNumFramesToSkip[i2] = s2, this.pluginNumFramesSkipped[i2] = s2, this.validateAndThrow(i2, e);
22226
22227
  try {
22227
22228
  if (yield this.analytics.initWithTime(i2, () => c2(this, null, function* () {
@@ -22309,7 +22310,7 @@ var init_dist = __esm({
22309
22310
  pluginsLoop() {
22310
22311
  return c2(this, null, function* () {
22311
22312
  for (; this.pluginsLoopRunning; ) {
22312
- let e = this.hmsTrack.getMediaTrackSettings().frameRate || Os, t2 = Math.floor(1e3 / e);
22313
+ let e = this.hmsTrack.getMediaTrackSettings().frameRate || xs, t2 = Math.floor(1e3 / e);
22313
22314
  if (!this.hmsTrack.enabled || this.hmsTrack.nativeTrack.readyState === "ended") {
22314
22315
  this.pluginsLoopState === "running" && this.resetCanvases(), this.pluginsLoopState = "paused", yield this.reusableWorker.sleep(t2);
22315
22316
  continue;
@@ -22385,7 +22386,7 @@ var init_dist = __esm({
22385
22386
  return c2(this, null, function* () {
22386
22387
  if (!this.inputCanvas || !this.inputVideo)
22387
22388
  return;
22388
- let { width: e = vo, height: t2 = Mo } = this.hmsTrack.getMediaTrackSettings();
22389
+ let { width: e = Mo, height: t2 = yo } = this.hmsTrack.getMediaTrackSettings();
22389
22390
  this.inputCanvas.height !== t2 && (this.inputCanvas.height = t2), this.inputCanvas.width !== e && (this.inputCanvas.width = e), this.inputCanvas.getContext("2d").drawImage(this.inputVideo, 0, 0, e, t2);
22390
22391
  });
22391
22392
  }
@@ -22400,7 +22401,7 @@ var init_dist = __esm({
22400
22401
  return this.pluginNumFramesSkipped[e] < this.pluginNumFramesToSkip[e] ? (this.pluginNumFramesSkipped[e]++, t2 = true) : (t2 = false, this.pluginNumFramesSkipped[e] = 0), t2;
22401
22402
  }
22402
22403
  };
22403
- ci = class {
22404
+ ni = class {
22404
22405
  constructor(e, t2) {
22405
22406
  this.TAG = "[MediaStreamPluginsManager]";
22406
22407
  this.plugins = /* @__PURE__ */ new Set(), this.analytics = new Ze(e), this.room = t2;
@@ -22444,8 +22445,8 @@ var init_dist = __esm({
22444
22445
  return Array.from(this.plugins).map((e) => e.getName());
22445
22446
  }
22446
22447
  };
22447
- yo = ["init_response_time", "ws_connect_time", "on_policy_change_time", "local_audio_track_time", "local_video_track_time", "peer_list_time", "room_state_time", "join_response_time"];
22448
- di = class {
22448
+ ko = ["init_response_time", "ws_connect_time", "on_policy_change_time", "local_audio_track_time", "local_video_track_time", "peer_list_time", "room_state_time", "join_response_time"];
22449
+ ci = class {
22449
22450
  constructor() {
22450
22451
  this.eventPerformanceMeasures = {};
22451
22452
  }
@@ -22465,7 +22466,7 @@ var init_dist = __esm({
22465
22466
  return (t2 = this.eventPerformanceMeasures[e]) == null ? void 0 : t2.duration;
22466
22467
  }
22467
22468
  getTimes(...e) {
22468
- return [...yo, ...e].reduce((t2, i2) => M2(m({}, t2), { [i2]: this.getTimeTaken(i2) }), {});
22469
+ return [...ko, ...e].reduce((t2, i2) => M2(m({}, t2), { [i2]: this.getTimeTaken(i2) }), {});
22469
22470
  }
22470
22471
  cleanup() {
22471
22472
  this.eventPerformanceMeasures = {};
@@ -22484,7 +22485,6 @@ var init_dist = __esm({
22484
22485
  }
22485
22486
  getTracksToPublish() {
22486
22487
  return c2(this, arguments, function* (e = Cr) {
22487
- var T, g2, f2, P8;
22488
22488
  let t2 = this.getAVTrackSettings(e);
22489
22489
  if (!t2)
22490
22490
  return [];
@@ -22492,13 +22492,13 @@ var init_dist = __esm({
22492
22492
  if (u2 && p2)
22493
22493
  return [];
22494
22494
  let h2 = { audio: i2 && !n2 && (e.isAudioMuted ? "empty" : true), video: r2 && !o2 && (e.isVideoMuted ? "empty" : true) };
22495
- h2.audio && ((T = this.analyticsTimer) == null || T.start("local_audio_track_time")), h2.video && ((g2 = this.analyticsTimer) == null || g2.start("local_video_track_time"));
22495
+ h2.audio && this.analyticsTimer.start("local_audio_track_time"), h2.video && this.analyticsTimer.start("local_video_track_time");
22496
22496
  try {
22497
22497
  d2.d(this.TAG, "Init Local Tracks", { fetchTrackOptions: h2 }), s2 = yield this.getLocalTracks(h2, t2, l2);
22498
- } catch (k2) {
22499
- s2 = yield this.retryGetLocalTracks(k2, t2, h2, l2);
22498
+ } catch (T) {
22499
+ s2 = yield this.retryGetLocalTracks(T, t2, h2, l2);
22500
22500
  }
22501
- return h2.audio && ((f2 = this.analyticsTimer) == null || f2.end("local_audio_track_time")), h2.video && ((P8 = this.analyticsTimer) == null || P8.end("local_video_track_time")), o2 && r2 && !u2 && s2.push(o2), n2 && i2 && !p2 && s2.push(n2), s2;
22501
+ return h2.audio && this.analyticsTimer.end("local_audio_track_time"), h2.video && this.analyticsTimer.end("local_video_track_time"), o2 && r2 && !u2 && s2.push(o2), n2 && i2 && !p2 && s2.push(n2), s2;
22502
22502
  });
22503
22503
  }
22504
22504
  getLocalTracks() {
@@ -22529,8 +22529,8 @@ var init_dist = __esm({
22529
22529
  r2.srcObject = e, r2.addEventListener("loadedmetadata", () => c2(this, null, function* () {
22530
22530
  let { videoWidth: l2, videoHeight: u2 } = r2, p2 = i2.screen, h2 = p2.width * p2.height, T = l2 / u2, g2 = p2.width / p2.height;
22531
22531
  if (T > g2) {
22532
- let f2 = t2.video, P8 = T / g2, k2 = Math.sqrt(P8);
22533
- l2 * u2 > h2 ? (f2.width = l2 / k2, f2.height = u2 / k2) : (f2.height = u2 * k2, f2.width = l2 * k2), yield e.getVideoTracks()[0].applyConstraints(f2);
22532
+ let v2 = t2.video, E2 = T / g2, P8 = Math.sqrt(E2);
22533
+ l2 * u2 > h2 ? (v2.width = l2 / P8, v2.height = u2 / P8) : (v2.height = u2 * P8, v2.width = l2 * P8), yield e.getVideoTracks()[0].applyConstraints(v2);
22534
22534
  }
22535
22535
  }));
22536
22536
  });
@@ -22548,16 +22548,16 @@ var init_dist = __esm({
22548
22548
  d2.d("retrieving screenshare with ", { config: i2 }, { constraints: s2 }), o2 = yield navigator.mediaDevices.getDisplayMedia(s2), t2 && (yield this.optimizeScreenShareConstraint(o2, s2));
22549
22549
  } catch (g2) {
22550
22550
  d2.w(this.TAG, "error in getting screenshare - ", g2);
22551
- let f2 = Ae(g2, "screen");
22552
- throw this.eventBus.analytics.publish(y2.publish({ error: f2, devices: this.deviceManager.getDevices(), settings: new ze(r2 == null ? void 0 : r2.video, r2 == null ? void 0 : r2.audio, false) })), f2;
22551
+ let v2 = Ae(g2, "screen");
22552
+ throw this.eventBus.analytics.publish(y2.publish({ error: v2, devices: this.deviceManager.getDevices(), settings: new ze(r2 == null ? void 0 : r2.video, r2 == null ? void 0 : r2.audio, false) })), v2;
22553
22553
  }
22554
- let n2 = [], l2 = new We(o2), u2 = o2.getVideoTracks()[0], p2 = new F(l2, u2, "screen", this.eventBus, r2 == null ? void 0 : r2.video, this.store.getRoom());
22554
+ let n2 = [], l2 = new Ge(o2), u2 = o2.getVideoTracks()[0], p2 = new F(l2, u2, "screen", this.eventBus, r2 == null ? void 0 : r2.video, this.store.getRoom());
22555
22555
  p2.setSimulcastDefinitons(this.store.getSimulcastDefinitionsForPeer(this.store.getLocalPeer(), "screen"));
22556
22556
  try {
22557
22557
  let g2 = this.validateCurrentTabCapture(p2, i2.forceCurrentTab);
22558
22558
  p2.isCurrentTab = g2, yield p2.cropTo(i2.cropTarget);
22559
22559
  } catch (g2) {
22560
- throw o2.getTracks().forEach((f2) => f2.stop()), g2;
22560
+ throw o2.getTracks().forEach((v2) => v2.stop()), g2;
22561
22561
  }
22562
22562
  n2.push(p2);
22563
22563
  let h2 = o2.getAudioTracks()[0];
@@ -22590,7 +22590,7 @@ var init_dist = __esm({
22590
22590
  static getEmptyVideoTrack(e) {
22591
22591
  var n2, l2, u2;
22592
22592
  let t2 = ((n2 = e == null ? void 0 : e.getSettings()) == null ? void 0 : n2.width) || 320, i2 = ((l2 = e == null ? void 0 : e.getSettings()) == null ? void 0 : l2.height) || 240, r2 = 1;
22593
- pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)), li || (li = setInterval(() => {
22593
+ pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)), di || (di = setInterval(() => {
22594
22594
  let p2 = pe == null ? void 0 : pe.getContext("2d");
22595
22595
  p2 && p2.fillRect(0, 0, 1, 1);
22596
22596
  }, 1e3 / r2));
@@ -22604,7 +22604,7 @@ var init_dist = __esm({
22604
22604
  return r2.enabled = false, r2;
22605
22605
  }
22606
22606
  static cleanup() {
22607
- clearInterval(li), li = void 0, pe = void 0;
22607
+ clearInterval(di), di = void 0, pe = void 0;
22608
22608
  }
22609
22609
  getAVTracks(e) {
22610
22610
  return c2(this, null, function* () {
@@ -22631,16 +22631,16 @@ var init_dist = __esm({
22631
22631
  }
22632
22632
  retryGetLocalTracks(e, t2, i2, r2) {
22633
22633
  return c2(this, null, function* () {
22634
- if (e instanceof v2 && e.action === "TRACK") {
22634
+ if (e instanceof f2 && e.action === "TRACK") {
22635
22635
  this.observer.onFailure(e);
22636
- let s2 = e.code === E2.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
22636
+ let s2 = e.code === k2.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
22637
22637
  if (s2) {
22638
- let l2 = new De().video(new Ge()).audio(new Fe()).build();
22638
+ let l2 = new De().video(new Fe()).audio(new Ve()).build();
22639
22639
  d2.w(this.TAG, "Fetch AV Tracks failed with overconstrained error", { fetchTrackOptions: i2 }, { error: e });
22640
22640
  try {
22641
22641
  return yield this.getLocalTracks(i2, l2, r2);
22642
22642
  } catch (u2) {
22643
- let p2 = u2 instanceof v2 ? u2.nativeError : u2, h2 = u2;
22643
+ let p2 = u2 instanceof f2 ? u2.nativeError : u2, h2 = u2;
22644
22644
  if ((p2 == null ? void 0 : p2.name) === "OverconstrainedError") {
22645
22645
  let T = S2.TracksErrors.GenericTrack("TRACK", "Overconstrained error after dropping all constraints");
22646
22646
  T.addNativeError(p2), h2 = T;
@@ -22706,7 +22706,7 @@ var init_dist = __esm({
22706
22706
  }
22707
22707
  createHMSLocalTracks(e, t2, i2) {
22708
22708
  let r2 = e.find((n2) => n2.kind === "video"), s2 = e.find((n2) => n2.kind === "audio");
22709
- i2 ? e.forEach((n2) => i2 == null ? void 0 : i2.nativeStream.addTrack(n2)) : i2 = new We(new MediaStream(e));
22709
+ i2 ? e.forEach((n2) => i2 == null ? void 0 : i2.nativeStream.addTrack(n2)) : i2 = new Ge(new MediaStream(e));
22710
22710
  let o2 = [];
22711
22711
  if (s2 && (t2 != null && t2.audio)) {
22712
22712
  let n2 = new ce(i2, s2, "regular", this.eventBus, t2.audio, this.store.getRoom());
@@ -22737,10 +22737,10 @@ var init_dist = __esm({
22737
22737
  });
22738
22738
  this.buildNewSettings = (t3) => {
22739
22739
  let { width: i3, height: r3, codec: s3, maxFramerate: o3, maxBitrate: n3, deviceId: l2, advanced: u2, facingMode: p2 } = m(m({}, this.settings), t3);
22740
- return new Ge(i3, r3, s3, o3, l2, u2, n3, p2);
22740
+ return new Fe(i3, r3, s3, o3, l2, u2, n3, p2);
22741
22741
  };
22742
22742
  this.handleSettingsChange = (t3) => c2(this, null, function* () {
22743
- let i3 = this.stream, r3 = xs(t3, this.settings);
22743
+ let i3 = this.stream, r3 = Us(t3, this.settings);
22744
22744
  if (r3("maxBitrate") && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this)), r3("width") || r3("height") || r3("advanced"))
22745
22745
  if (this.source === "video") {
22746
22746
  let s3 = yield this.replaceTrackWith(t3);
@@ -22749,7 +22749,7 @@ var init_dist = __esm({
22749
22749
  yield this.nativeTrack.applyConstraints(t3.toConstraints());
22750
22750
  });
22751
22751
  this.handleDeviceChange = (t3, i3 = false) => c2(this, null, function* () {
22752
- if (xs(t3, this.settings)("deviceId") && this.source === "regular") {
22752
+ if (Us(t3, this.settings)("deviceId") && this.source === "regular") {
22753
22753
  if (this.enabled) {
22754
22754
  delete t3.facingMode;
22755
22755
  let o3 = yield this.replaceTrackWith(t3);
@@ -22765,7 +22765,7 @@ var init_dist = __esm({
22765
22765
  this.handleVisibilityChange = () => c2(this, null, function* () {
22766
22766
  document.visibilityState === "hidden" && this.source === "regular" ? (this.enabledStateBeforeBackground = this.enabled, this.nativeTrack.enabled = false, this.replaceSenderTrack(this.nativeTrack)) : (this.nativeTrack.enabled = this.enabledStateBeforeBackground, this.replaceSenderTrack(this.processedTrack || this.nativeTrack)), this.eventBus.localVideoEnabled.publish({ enabled: this.nativeTrack.enabled, track: this });
22767
22767
  });
22768
- t2.tracks.push(this), this.setVideoHandler(new Xe(this)), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && i2.enabled && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new kt(this, s2), this.mediaStreamPluginsManager = new ci(s2, n2), this.setFirstTrackId(this.trackId), O2 && Te() && document.addEventListener("visibilitychange", this.handleVisibilityChange);
22768
+ t2.tracks.push(this), this.setVideoHandler(new Xe(this)), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && i2.enabled && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new yt(this, s2), this.mediaStreamPluginsManager = new ni(s2, n2), this.setFirstTrackId(this.trackId), O2 && Te() && document.addEventListener("visibilitychange", this.handleVisibilityChange);
22769
22769
  }
22770
22770
  setSimulcastDefinitons(t2) {
22771
22771
  this._layerDefinitions = t2;
@@ -22921,19 +22921,19 @@ var init_dist = __esm({
22921
22921
  }
22922
22922
  };
22923
22923
  et = "renegotiation-callback-id";
22924
- ui = "ion-sfu";
22924
+ li = "ion-sfu";
22925
22925
  tt = "SUBSCRIBE_ICE_CONNECTION_CALLBACK_ID";
22926
- Us = "https://event.100ms.live/v2/client/report";
22927
- Bs = "https://event-nonprod.100ms.live/v2/client/report";
22928
- Pt = Math.pow(2, 31) - 1;
22926
+ Bs = "https://event.100ms.live/v2/client/report";
22927
+ Vs = "https://event-nonprod.100ms.live/v2/client/report";
22928
+ kt = Math.pow(2, 31) - 1;
22929
22929
  G2 = { DEVICE_CHANGE: "device-change", LOCAL_AUDIO_ENABLED: "local-audio-enabled", LOCAL_VIDEO_ENABLED: "local-video-enabled", STATS_UPDATE: "stats-update", RTC_STATS_UPDATE: "rtc-stats-update", TRACK_DEGRADED: "track-degraded", TRACK_RESTORED: "track-restored", TRACK_AUDIO_LEVEL_UPDATE: "track-audio-level-update", LOCAL_AUDIO_SILENCE: "local-audio-silence", ANALYTICS: "analytics", AUDIO_PLUGIN_FAILED: "audio-plugin-failed", POLICY_CHANGE: "policy-change", LOCAL_ROLE_UPDATE: "local-role-update", AUDIO_TRACK_UPDATE: "audio-track-update", AUDIO_TRACK_ADDED: "audio-track-added", AUDIO_TRACK_REMOVED: "audio-track-removed", AUTOPLAY_ERROR: "autoplay-error", LEAVE: "leave" };
22930
- Vs = "2.5";
22931
- Fs = "20240521";
22930
+ Fs = "2.5";
22931
+ Gs = "20240521";
22932
22932
  Me = "_handraise";
22933
22933
  Dr = 1e3;
22934
22934
  wr = 64;
22935
- Gs = "https://whiteboard.100ms.live";
22936
- Ws = "https://whiteboard-qa.100ms.live";
22935
+ Ws = "https://whiteboard.100ms.live";
22936
+ $s = "https://whiteboard-qa.100ms.live";
22937
22937
  U2 = class a7 extends Ye {
22938
22938
  constructor(t2, i2, r2) {
22939
22939
  super(t2, i2, r2);
@@ -23062,7 +23062,7 @@ var init_dist = __esm({
23062
23062
  e.time = (/* @__PURE__ */ new Date()).toISOString().split("T")[1], this.history.push(e);
23063
23063
  }
23064
23064
  };
23065
- We = class extends Je {
23065
+ Ge = class extends Je {
23066
23066
  constructor() {
23067
23067
  super(...arguments);
23068
23068
  this.TAG = "[HMSLocalStream]";
@@ -23108,7 +23108,7 @@ var init_dist = __esm({
23108
23108
  d2.d(this.TAG, "Simulcast enabled with layers", i2), r2.push(...i2);
23109
23109
  else {
23110
23110
  let s2 = { active: this.nativeStream.active };
23111
- t2.settings.maxBitrate && !Be && (s2.maxBitrate = t2.settings.maxBitrate), r2.push(s2);
23111
+ t2.settings.maxBitrate && !Ue && (s2.maxBitrate = t2.settings.maxBitrate), r2.push(s2);
23112
23112
  }
23113
23113
  return r2;
23114
23114
  }
@@ -23150,7 +23150,7 @@ var init_dist = __esm({
23150
23150
  return this.audio;
23151
23151
  }
23152
23152
  };
23153
- $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
23153
+ Ks = (a11, e, t2, i2) => c2(void 0, null, function* () {
23154
23154
  var o2;
23155
23155
  let r2, s2 = {};
23156
23156
  if ((o2 = e.transceiver) != null && o2.sender.track) {
@@ -23172,11 +23172,11 @@ var init_dist = __esm({
23172
23172
  break;
23173
23173
  }
23174
23174
  }), Object.keys(m({}, l2)).forEach((p2) => {
23175
- var k2, w2;
23176
- let h2 = (k2 = l2[p2]) == null ? void 0 : k2.codecId, T = h2 ? n2[h2] : void 0, g2;
23175
+ var P8, w2;
23176
+ let h2 = (P8 = l2[p2]) == null ? void 0 : P8.codecId, T = h2 ? n2[h2] : void 0, g2;
23177
23177
  T && (g2 = T.substring(T.indexOf("/") + 1));
23178
- let f2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), P8 = u2[f2.ssrc];
23179
- s2[p2] = M2(m({}, f2), { bitrate: Et("bytesSent", f2, i2 == null ? void 0 : i2[p2]), packetsLost: P8 == null ? void 0 : P8.packetsLost, jitter: P8 == null ? void 0 : P8.jitter, roundTripTime: P8 == null ? void 0 : P8.roundTripTime, totalRoundTripTime: P8 == null ? void 0 : P8.totalRoundTripTime, peerName: t2, peerID: e.peerId, enabled: e.enabled, codec: g2 });
23178
+ let v2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), E2 = u2[v2.ssrc];
23179
+ s2[p2] = M2(m({}, v2), { bitrate: Pt("bytesSent", v2, i2 == null ? void 0 : i2[p2]), packetsLost: E2 == null ? void 0 : E2.packetsLost, jitter: E2 == null ? void 0 : E2.jitter, roundTripTime: E2 == null ? void 0 : E2.roundTripTime, totalRoundTripTime: E2 == null ? void 0 : E2.totalRoundTripTime, peerName: t2, peerID: e.peerId, enabled: e.enabled, codec: g2 });
23180
23180
  });
23181
23181
  } catch (n2) {
23182
23182
  a11.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("TRACK", `Error getting local track stats ${e.trackId} - ${n2.message}`))), d2.w("[HMSWebrtcStats]", "Error in getting local track stats", e, n2, n2.name);
@@ -23184,7 +23184,7 @@ var init_dist = __esm({
23184
23184
  return s2;
23185
23185
  }
23186
23186
  });
23187
- Ks = (a11, e, t2, i2) => c2(void 0, null, function* () {
23187
+ qs = (a11, e, t2, i2) => c2(void 0, null, function* () {
23188
23188
  var l2;
23189
23189
  let r2;
23190
23190
  try {
@@ -23192,10 +23192,10 @@ var init_dist = __esm({
23192
23192
  } catch (u2) {
23193
23193
  a11.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("TRACK", `Error getting remote track stats ${e.trackId} - ${u2.message}`))), d2.w("[HMSWebrtcStats]", "Error in getting remote track stats", e, u2);
23194
23194
  }
23195
- let s2 = Eo(r2), o2 = Et("bytesReceived", s2, i2), n2 = Nr("packetsLost", s2, i2);
23195
+ let s2 = bo(r2), o2 = Pt("bytesReceived", s2, i2), n2 = Nr("packetsLost", s2, i2);
23196
23196
  return s2 != null && s2.remote && Object.assign(s2.remote, { packetsLostRate: Nr("packetsLost", s2.remote, i2 == null ? void 0 : i2.remote) }), s2 && M2(m({}, s2), { bitrate: o2, packetsLostRate: n2, peerID: e.peerId, enabled: e.enabled, peerName: t2, codec: s2.codec });
23197
23197
  });
23198
- Eo = (a11) => {
23198
+ bo = (a11) => {
23199
23199
  let e, t2, i2 = {};
23200
23200
  a11 == null || a11.forEach((o2) => {
23201
23201
  switch (o2.type) {
@@ -23219,10 +23219,10 @@ var init_dist = __esm({
23219
23219
  return r2 && (s2 = r2.substring(r2.indexOf("/") + 1)), e && Object.assign(e, { remote: t2, codec: s2 });
23220
23220
  };
23221
23221
  Or = (a11, e, t2) => {
23222
- let i2 = bo(e), r2 = Et(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23222
+ let i2 = Ro(e), r2 = Pt(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23223
23223
  return i2 && Object.assign(i2, { bitrate: r2 });
23224
23224
  };
23225
- bo = (a11) => {
23225
+ Ro = (a11) => {
23226
23226
  let e;
23227
23227
  return a11 == null || a11.forEach((t2) => {
23228
23228
  t2.type === "transport" && (e = a11 == null ? void 0 : a11.get(t2.selectedCandidatePairId));
@@ -23230,20 +23230,20 @@ var init_dist = __esm({
23230
23230
  t2.type === "candidate-pair" && t2.selected && (e = t2);
23231
23231
  }), e;
23232
23232
  };
23233
- qs = (a11) => {
23233
+ js = (a11) => {
23234
23234
  let e = { packetsLost: 0, jitter: 0 };
23235
23235
  return a11 == null || a11.forEach((t2) => {
23236
23236
  t2.packetsLost && (e.packetsLost += t2.packetsLost), t2.jitter > e.jitter && (e.jitter = t2.jitter);
23237
23237
  }), e;
23238
23238
  };
23239
- js = (a11, e) => Array.from(new Set(a11.concat(e)));
23240
- Et = (a11, e, t2) => Nr(a11, e, t2) * 8;
23239
+ Js = (a11, e) => Array.from(new Set(a11.concat(e)));
23240
+ Pt = (a11, e, t2) => Nr(a11, e, t2) * 8;
23241
23241
  Nr = (a11, e, t2) => {
23242
23242
  let i2 = e && e[a11], r2 = t2 ? t2[a11] : null;
23243
23243
  return [e, t2, oe(i2), oe(r2)].every((o2) => !!o2) ? xr(i2, r2, e == null ? void 0 : e.timestamp, t2 == null ? void 0 : t2.timestamp) * 1e3 : 0;
23244
23244
  };
23245
23245
  xr = (a11, e, t2, i2) => oe(a11) && oe(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
23246
- pi = class {
23246
+ ui = class {
23247
23247
  constructor(e, t2, i2) {
23248
23248
  this.getStats = e;
23249
23249
  this.store = t2;
@@ -23260,20 +23260,20 @@ var init_dist = __esm({
23260
23260
  yield this.updateLocalPeerStats(), yield this.updateLocalTrackStats(), yield this.updateRemoteTrackStats();
23261
23261
  });
23262
23262
  this.updateLocalPeerStats = () => c2(this, null, function* () {
23263
- var p2, h2, T, g2, f2, P8;
23263
+ var p2, h2, T, g2, v2, E2;
23264
23264
  let e2 = this.getLocalPeerStats(), t3;
23265
23265
  try {
23266
23266
  t3 = yield (h2 = (p2 = this.getStats).publish) == null ? void 0 : h2.call(p2);
23267
- } catch (k2) {
23268
- this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("PUBLISH", k2.message))), d2.w(this.TAG, "Error in getting publish stats", k2);
23267
+ } catch (P8) {
23268
+ this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("PUBLISH", P8.message))), d2.w(this.TAG, "Error in getting publish stats", P8);
23269
23269
  }
23270
23270
  let i3 = t3 && Or("publish", t3, e2), r3;
23271
23271
  try {
23272
23272
  r3 = yield (g2 = (T = this.getStats).subscribe) == null ? void 0 : g2.call(T);
23273
- } catch (k2) {
23274
- this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("SUBSCRIBE", k2.message))), d2.w(this.TAG, "Error in getting subscribe stats", k2);
23273
+ } catch (P8) {
23274
+ this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("SUBSCRIBE", P8.message))), d2.w(this.TAG, "Error in getting subscribe stats", P8);
23275
23275
  }
23276
- let s2 = r3 && Or("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = qs(r3), l2 = xr(o2, (f2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : f2.packetsLost, s2 == null ? void 0 : s2.timestamp, (P8 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : P8.timestamp), u2 = s2 && Object.assign(s2, { packetsLostRate: l2, jitter: n2, packetsLost: o2 });
23276
+ let s2 = r3 && Or("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = js(r3), l2 = xr(o2, (v2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : v2.packetsLost, s2 == null ? void 0 : s2.timestamp, (E2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : E2.timestamp), u2 = s2 && Object.assign(s2, { packetsLostRate: l2, jitter: n2, packetsLost: o2 });
23277
23277
  this.peerStats[this.localPeerID] = { publish: i3, subscribe: u2 };
23278
23278
  });
23279
23279
  this.updateRemoteTrackStats = () => c2(this, null, function* () {
@@ -23283,17 +23283,17 @@ var init_dist = __esm({
23283
23283
  t3.includes(r3) || delete this.remoteTrackStats[r3];
23284
23284
  });
23285
23285
  for (let r3 of e2) {
23286
- let s2 = r3.peerId && ((i3 = this.store.getPeerById(r3.peerId)) == null ? void 0 : i3.name), o2 = this.getRemoteTrackStats(r3.trackId), n2 = yield Ks(this.eventBus, r3, s2, o2);
23286
+ let s2 = r3.peerId && ((i3 = this.store.getPeerById(r3.peerId)) == null ? void 0 : i3.name), o2 = this.getRemoteTrackStats(r3.trackId), n2 = yield qs(this.eventBus, r3, s2, o2);
23287
23287
  n2 && (this.remoteTrackStats[r3.trackId] = n2);
23288
23288
  }
23289
23289
  });
23290
23290
  this.updateLocalTrackStats = () => c2(this, null, function* () {
23291
23291
  var i3;
23292
- let e2 = this.store.getLocalPeerTracks().reduce((r3, s2) => (r3[s2.getTrackIDBeingSent()] = s2, r3), {}), t3 = js(Object.keys(this.localTrackStats), Object.keys(e2));
23292
+ let e2 = this.store.getLocalPeerTracks().reduce((r3, s2) => (r3[s2.getTrackIDBeingSent()] = s2, r3), {}), t3 = Js(Object.keys(this.localTrackStats), Object.keys(e2));
23293
23293
  for (let r3 of t3) {
23294
23294
  let s2 = e2[r3];
23295
23295
  if (s2) {
23296
- let o2 = (i3 = this.store.getLocalPeer()) == null ? void 0 : i3.name, n2 = yield $s(this.eventBus, s2, o2, this.localTrackStats[r3]);
23296
+ let o2 = (i3 = this.store.getLocalPeer()) == null ? void 0 : i3.name, n2 = yield Ks(this.eventBus, s2, o2, this.localTrackStats[r3]);
23297
23297
  n2 && (this.localTrackStats[r3] = n2);
23298
23298
  } else
23299
23299
  delete this.localTrackStats[r3];
@@ -23303,7 +23303,7 @@ var init_dist = __esm({
23303
23303
  this.localPeerID = (r2 = this.store.getLocalPeer()) == null ? void 0 : r2.peerId;
23304
23304
  }
23305
23305
  };
23306
- hi = class {
23306
+ pi = class {
23307
23307
  constructor(e, t2, i2, r2) {
23308
23308
  this.store = e;
23309
23309
  this.eventBus = t2;
@@ -23333,7 +23333,7 @@ var init_dist = __esm({
23333
23333
  }
23334
23334
  setPeerConnections({ publish: e, subscribe: t2 }) {
23335
23335
  var i2, r2;
23336
- this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new pi({ publish: (i2 = this.publishConnection) == null ? void 0 : i2.getStats.bind(this.publishConnection), subscribe: (r2 = this.subscribeConnection) == null ? void 0 : r2.getStats.bind(this.subscribeConnection) }, this.store, this.eventBus);
23336
+ this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new ui({ publish: (i2 = this.publishConnection) == null ? void 0 : i2.getStats.bind(this.publishConnection), subscribe: (r2 = this.subscribeConnection) == null ? void 0 : r2.getStats.bind(this.subscribeConnection) }, this.store, this.eventBus);
23337
23337
  }
23338
23338
  start() {
23339
23339
  return c2(this, null, function* () {
@@ -23401,7 +23401,7 @@ var init_dist = __esm({
23401
23401
  rt = class {
23402
23402
  };
23403
23403
  rt.makePeerId = () => (0, import_uuid7.v4)();
23404
- $e = class extends it {
23404
+ We = class extends it {
23405
23405
  constructor(t2) {
23406
23406
  super(M2(m({}, t2), { peerId: rt.makePeerId(), isLocal: true }));
23407
23407
  this.isLocal = true;
@@ -23424,7 +23424,7 @@ var init_dist = __esm({
23424
23424
  }`;
23425
23425
  }
23426
23426
  };
23427
- bt = class extends it {
23427
+ Et = class extends it {
23428
23428
  constructor(t2) {
23429
23429
  super(M2(m({}, t2), { isLocal: false }));
23430
23430
  this.isLocal = false;
@@ -23433,8 +23433,8 @@ var init_dist = __esm({
23433
23433
  this.fromRoomState = !!t2.fromRoomState;
23434
23434
  }
23435
23435
  };
23436
- he = (a11, e) => new bt({ peerId: a11.peer_id, name: a11.info.name, role: e.getPolicyForRole(a11.role), customerUserId: a11.info.user_id, metadata: a11.info.data, groups: a11.groups, type: a11.info.type });
23437
- mi = class {
23436
+ he = (a11, e) => new Et({ peerId: a11.peer_id, name: a11.info.name, role: e.getPolicyForRole(a11.role), customerUserId: a11.info.user_id, metadata: a11.info.data, groups: a11.groups, type: a11.info.type });
23437
+ hi = class {
23438
23438
  constructor(e, t2, i2) {
23439
23439
  this.transport = e;
23440
23440
  this.store = t2;
@@ -23514,7 +23514,7 @@ var init_dist = __esm({
23514
23514
  return super.listeners(e);
23515
23515
  }
23516
23516
  };
23517
- Si = class extends we {
23517
+ mi = class extends we {
23518
23518
  constructor() {
23519
23519
  super(...arguments);
23520
23520
  this.audioElement = null;
@@ -23566,7 +23566,7 @@ var init_dist = __esm({
23566
23566
  }), this.audioContextManager = new st(t2), t2;
23567
23567
  }
23568
23568
  };
23569
- gi = class extends we {
23569
+ Si = class extends we {
23570
23570
  constructor() {
23571
23571
  super(...arguments);
23572
23572
  this.TAG = "[PlaylistVideoManager]";
@@ -23640,13 +23640,13 @@ var init_dist = __esm({
23640
23640
  this.canvas || (this.canvas = document.createElement("canvas"), this.canvasContext = this.canvas.getContext("2d"));
23641
23641
  }
23642
23642
  };
23643
- Ti = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
23644
- Rt = class extends we {
23643
+ gi = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
23644
+ bt = class extends we {
23645
23645
  constructor(t2, i2) {
23646
23646
  super();
23647
23647
  this.sdk = t2;
23648
23648
  this.eventBus = i2;
23649
- this.state = { audio: m({}, Ti.audio), video: m({}, Ti.video) };
23649
+ this.state = { audio: m({}, gi.audio), video: m({}, gi.video) };
23650
23650
  this.TAG = "[PlaylistManager]";
23651
23651
  this.handlePausePlaylist = (r2) => c2(this, [r2], function* ({ enabled: t3, track: i3 }) {
23652
23652
  var o2;
@@ -23656,12 +23656,12 @@ var init_dist = __esm({
23656
23656
  i3.source === "audioplaylist" && (s2 = "audio"), i3.source === "videoplaylist" && (s2 = "video"), s2 && ((o2 = this.getElement(s2)) == null || o2.pause());
23657
23657
  });
23658
23658
  this.addTrack = (t3, i3) => c2(this, null, function* () {
23659
- yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added", si(t3));
23659
+ yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added", ri(t3));
23660
23660
  });
23661
23661
  this.removeTrack = (t3) => c2(this, null, function* () {
23662
23662
  yield this.sdk.removeTrack(t3, true), d2.d(this.TAG, "Playlist track removed", t3);
23663
23663
  });
23664
- this.audioManager = new Si(), this.videoManager = new gi(), this.addListeners();
23664
+ this.audioManager = new mi(), this.videoManager = new Si(), this.addListeners();
23665
23665
  }
23666
23666
  getList(t2 = "audio") {
23667
23667
  return this.state[t2].list;
@@ -23784,7 +23784,7 @@ var init_dist = __esm({
23784
23784
  });
23785
23785
  }
23786
23786
  cleanup() {
23787
- this.state = { audio: m({}, Ti.audio), video: m({}, Ti.video) }, this.eventBus.localAudioEnabled.unsubscribe(this.handlePausePlaylist), this.eventBus.localVideoEnabled.unsubscribe(this.handlePausePlaylist), this.audioManager.stop(), this.videoManager.stop();
23787
+ this.state = { audio: m({}, gi.audio), video: m({}, gi.video) }, this.eventBus.localAudioEnabled.unsubscribe(this.handlePausePlaylist), this.eventBus.localVideoEnabled.unsubscribe(this.handlePausePlaylist), this.audioManager.stop(), this.videoManager.stop();
23788
23788
  }
23789
23789
  onProgress(t2) {
23790
23790
  this.videoManager.on("progress", () => {
@@ -23862,34 +23862,34 @@ var init_dist = __esm({
23862
23862
  }
23863
23863
  };
23864
23864
  B2 = (a11) => a11.room;
23865
- Ao = (a11) => a11.errors;
23866
- Wh = createSelector(Ao, (a11) => a11.length === 0 ? null : a11.at(-1));
23867
- $h = createSelector(B2, (a11) => a11.id);
23865
+ Ho = (a11) => a11.errors;
23866
+ Kh = createSelector(Ho, (a11) => a11.length === 0 ? null : a11.at(-1));
23867
+ qh = createSelector(B2, (a11) => a11.id);
23868
23868
  K = (a11) => a11.peers;
23869
- fi = (a11) => a11.messages.byID;
23870
- Js = (a11) => a11.messages.allIDs;
23869
+ Ti = (a11) => a11.messages.byID;
23870
+ Qs = (a11) => a11.messages.allIDs;
23871
23871
  N2 = (a11) => a11.tracks;
23872
- Qs = (a11) => a11.settings;
23872
+ zs = (a11) => a11.settings;
23873
23873
  Ur = (a11) => a11.appData;
23874
- Ho = (a11) => a11.speakers;
23874
+ Co = (a11) => a11.speakers;
23875
23875
  _e = createSelector([B2], (a11) => a11 && a11.isConnected);
23876
- jh = createSelector([_e, B2], (a11, e) => a11 ? e.peerCount !== void 0 ? e.peerCount || 1 : e.peers.length : Math.max(e.peerCount !== void 0 ? e.peerCount : e.peers.length - 1, 0));
23877
- Co = (a11) => a11.hideLocalPeer;
23878
- me = createSelector([B2, K, Co], (a11, e, t2) => t2 ? a11.peers.filter((i2) => a11.localPeer !== i2).map((i2) => e[i2]) : a11.peers.map((i2) => e[i2]));
23879
- Lo = createSelector(N2, (a11) => Object.values(a11));
23876
+ Qh = createSelector([_e, B2], (a11, e) => a11 ? e.peerCount !== void 0 ? e.peerCount || 1 : e.peers.length : Math.max(e.peerCount !== void 0 ? e.peerCount : e.peers.length - 1, 0));
23877
+ Lo = (a11) => a11.hideLocalPeer;
23878
+ me = createSelector([B2, K, Lo], (a11, e, t2) => t2 ? a11.peers.filter((i2) => a11.localPeer !== i2).map((i2) => e[i2]) : a11.peers.map((i2) => e[i2]));
23879
+ Do = createSelector(N2, (a11) => Object.values(a11));
23880
23880
  te = createSelector(B2, K, (a11, e) => e[a11.localPeer]);
23881
23881
  ye = createSelector(B2, (a11) => a11.localPeer);
23882
- Jh = createSelector(te, (a11) => a11 == null ? void 0 : a11.name);
23883
- Qh = createSelector(te, (a11) => a11 == null ? void 0 : a11.roleName);
23882
+ zh = createSelector(te, (a11) => a11 == null ? void 0 : a11.name);
23883
+ Yh = createSelector(te, (a11) => a11 == null ? void 0 : a11.roleName);
23884
23884
  ae = createSelector(te, (a11) => a11 == null ? void 0 : a11.audioTrack);
23885
23885
  Y2 = createSelector(te, (a11) => a11 == null ? void 0 : a11.videoTrack);
23886
- Do = createSelector(te, (a11) => a11 == null ? void 0 : a11.auxiliaryTracks);
23887
- zs = createSelector([ae, Y2, Do], (a11, e, t2) => {
23886
+ wo = createSelector(te, (a11) => a11 == null ? void 0 : a11.auxiliaryTracks);
23887
+ Ys = createSelector([ae, Y2, wo], (a11, e, t2) => {
23888
23888
  let i2 = t2 ? [...t2] : [];
23889
23889
  return a11 && i2.unshift(a11), e && i2.unshift(e), i2;
23890
23890
  });
23891
- zh = createSelector(me, (a11) => a11.filter((e) => !e.isLocal));
23892
- Yh = createSelector(K, Ho, (a11, e) => {
23891
+ Xh = createSelector(me, (a11) => a11.filter((e) => !e.isLocal));
23892
+ Zh = createSelector(K, Co, (a11, e) => {
23893
23893
  let t2 = Object.entries(e).sort((i2, r2) => {
23894
23894
  var n2, l2;
23895
23895
  let s2 = ((n2 = i2[1]) == null ? void 0 : n2.audioLevel) || 0;
@@ -23906,112 +23906,112 @@ var init_dist = __esm({
23906
23906
  let e = te(a11);
23907
23907
  return je(a11, e == null ? void 0 : e.videoTrack);
23908
23908
  };
23909
- Ys = (a11) => {
23909
+ Xs = (a11) => {
23910
23910
  let e = te(a11);
23911
23911
  return ns(a11, e == null ? void 0 : e.videoTrack);
23912
23912
  };
23913
23913
  Vr = createSelector(te, N2, (a11, e) => {
23914
- let { video: t2, audio: i2 } = Ue(e, a11);
23914
+ let { video: t2, audio: i2 } = xe(e, a11);
23915
23915
  return !!(t2 || i2);
23916
23916
  });
23917
- wo = createSelector(K, N2, (a11, e) => {
23917
+ _o = createSelector(K, N2, (a11, e) => {
23918
23918
  let t2;
23919
23919
  for (let i2 in a11) {
23920
- let r2 = a11[i2], { video: s2, audio: o2 } = Ue(e, r2);
23920
+ let r2 = a11[i2], { video: s2, audio: o2 } = xe(e, r2);
23921
23921
  if (s2)
23922
23922
  return r2;
23923
23923
  o2 && !t2 && (t2 = r2);
23924
23924
  }
23925
23925
  return t2;
23926
23926
  });
23927
- Zh = createSelector(wo, (a11) => !!a11);
23928
- em = createSelector(K, N2, (a11, e) => {
23927
+ tm = createSelector(_o, (a11) => !!a11);
23928
+ im = createSelector(K, N2, (a11, e) => {
23929
23929
  for (let t2 in a11) {
23930
- let i2 = a11[t2], { audio: r2, video: s2 } = Ue(e, i2);
23930
+ let i2 = a11[t2], { audio: r2, video: s2 } = xe(e, i2);
23931
23931
  if (!s2 && r2)
23932
23932
  return i2;
23933
23933
  }
23934
23934
  });
23935
- tm = createSelector(K, N2, (a11, e) => {
23935
+ rm = createSelector(K, N2, (a11, e) => {
23936
23936
  let t2 = [], i2 = [];
23937
23937
  for (let r2 in a11) {
23938
- let s2 = a11[r2], { video: o2, audio: n2 } = Ue(e, s2);
23938
+ let s2 = a11[r2], { video: o2, audio: n2 } = xe(e, s2);
23939
23939
  o2 ? t2.push(s2) : n2 && i2.push(s2);
23940
23940
  }
23941
23941
  return t2.concat(i2);
23942
23942
  });
23943
- im = createSelector(K, N2, (a11, e) => {
23943
+ sm = createSelector(K, N2, (a11, e) => {
23944
23944
  for (let t2 in e) {
23945
23945
  let i2 = e[t2];
23946
- if (mt(i2) && ht(i2) && i2.peerId)
23946
+ if (ht(i2) && pt(i2) && i2.peerId)
23947
23947
  return a11[i2.peerId];
23948
23948
  }
23949
23949
  });
23950
- rm = createSelector(K, N2, (a11, e) => {
23950
+ am = createSelector(K, N2, (a11, e) => {
23951
23951
  for (let t2 in e) {
23952
23952
  let i2 = e[t2];
23953
- if (ri(i2) && i2.peerId)
23953
+ if (ii(i2) && i2.peerId)
23954
23954
  return a11[i2.peerId];
23955
23955
  }
23956
23956
  });
23957
- sm = createSelector(Lo, (a11) => a11.filter(os));
23958
- am = createSelector(Js, (a11) => a11.length);
23959
- om = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
23960
- It = createSelector(Js, fi, (a11, e) => {
23957
+ om = createSelector(Do, (a11) => a11.filter(os));
23958
+ nm = createSelector(Qs, (a11) => a11.length);
23959
+ cm = createSelector(Ti, (a11) => Object.values(a11).filter((e) => !e.read).length);
23960
+ Rt = createSelector(Qs, Ti, (a11, e) => {
23961
23961
  let t2 = [];
23962
23962
  return a11.forEach((i2) => {
23963
23963
  t2.push(e[i2]);
23964
23964
  }), t2;
23965
23965
  });
23966
- _o = createSelector(It, (a11) => a11.filter((e) => {
23966
+ No = createSelector(Rt, (a11) => a11.filter((e) => {
23967
23967
  var t2;
23968
23968
  return !e.recipientPeer && !(e.recipientRoles && ((t2 = e.recipientRoles) == null ? void 0 : t2.length) > 0);
23969
23969
  }));
23970
- nm = createSelector(_o, (a11) => a11.filter((e) => !e.read).length);
23970
+ dm = createSelector(No, (a11) => a11.filter((e) => !e.read).length);
23971
23971
  ie = createSelector([B2], (a11) => a11 && a11.roomState);
23972
- Xs = createSelector(ie, (a11) => a11 === "Preview");
23973
- cm = createSelector(B2, (a11) => a11.roomState !== "Disconnected");
23974
- dm = createSelector(B2, (a11) => !a11.transcriptions || a11.transcriptions.length <= 0 ? false : a11.transcriptions.some((e) => e.mode === "caption" && e.state === "started"));
23972
+ Zs = createSelector(ie, (a11) => a11 === "Preview");
23973
+ lm = createSelector(B2, (a11) => a11.roomState !== "Disconnected");
23974
+ um = createSelector(B2, (a11) => !a11.transcriptions || a11.transcriptions.length <= 0 ? false : a11.transcriptions.some((e) => e.mode === "caption" && e.state === "started"));
23975
23975
  Se = (a11) => a11.roles;
23976
- lm = createSelector([Se], (a11) => Object.keys(a11));
23976
+ pm = createSelector([Se], (a11) => Object.keys(a11));
23977
23977
  at = createSelector([te, Se], (a11, e) => a11 != null && a11.roleName ? e[a11.roleName] : null);
23978
- No = (a11) => {
23978
+ Oo = (a11) => {
23979
23979
  var e;
23980
23980
  return (e = a11.preview) == null ? void 0 : e.asRole;
23981
23981
  };
23982
- Zs = createSelector([No, Se], (a11, e) => a11 ? e[a11] : null);
23983
- um = createSelector([at], (a11) => {
23982
+ ea = createSelector([Oo, Se], (a11, e) => a11 ? e[a11] : null);
23983
+ hm = createSelector([at], (a11) => {
23984
23984
  var e;
23985
23985
  return (e = a11 == null ? void 0 : a11.subscribeParams) != null && e.subscribeToRoles ? a11.subscribeParams.subscribeToRoles.length > 0 : false;
23986
23986
  });
23987
- ea = createSelector(at, (a11) => a11 == null ? void 0 : a11.permissions);
23988
- pm = createSelector(B2, (a11) => a11.recording);
23989
- hm = createSelector(B2, (a11) => a11.rtmp);
23990
- mm = createSelector(B2, (a11) => a11.hls);
23991
- Sm = createSelector(B2, (a11) => a11.transcriptions);
23992
- gm = createSelector(B2, (a11) => a11.sessionId);
23993
- Tm = createSelector(B2, (a11) => a11.startedAt);
23994
- fm = createSelector(B2, (a11) => !!a11.isLargeRoom);
23995
- vm = createSelector(B2, (a11) => !!a11.isEffectsEnabled);
23996
- Mm = createSelector(B2, (a11) => a11.effectsKey);
23997
- ta = (a11) => a11.polls;
23998
- Em = createSelector(me, (a11) => a11.filter((e) => e.isHandRaised));
23999
- Oo = (a11) => a11.whiteboards;
24000
- bm = createSelector(Oo, (a11) => Object.values(a11)[0]);
24001
- ra = (a11 = "audio") => (e) => e.playlist[a11].list;
23987
+ ta = createSelector(at, (a11) => a11 == null ? void 0 : a11.permissions);
23988
+ mm = createSelector(B2, (a11) => a11.recording);
23989
+ Sm = createSelector(B2, (a11) => a11.rtmp);
23990
+ gm = createSelector(B2, (a11) => a11.hls);
23991
+ Tm = createSelector(B2, (a11) => a11.transcriptions);
23992
+ fm = createSelector(B2, (a11) => a11.sessionId);
23993
+ vm = createSelector(B2, (a11) => a11.startedAt);
23994
+ Mm = createSelector(B2, (a11) => !!a11.isLargeRoom);
23995
+ ym = createSelector(B2, (a11) => !!a11.isEffectsEnabled);
23996
+ km = createSelector(B2, (a11) => a11.effectsKey);
23997
+ ia = (a11) => a11.polls;
23998
+ Rm = createSelector(me, (a11) => a11.filter((e) => e.isHandRaised));
23999
+ xo = (a11) => a11.whiteboards;
24000
+ Im = createSelector(xo, (a11) => Object.values(a11)[0]);
24001
+ sa = (a11 = "audio") => (e) => e.playlist[a11].list;
24002
24002
  Fr = (a11 = "audio") => (e) => e.playlist[a11].selection;
24003
- sa = (a11 = "audio") => (e) => e.playlist[a11].progress;
24004
- aa = (a11 = "audio") => (e) => e.playlist[a11].currentTime;
24005
- oa = (a11 = "audio") => (e) => e.playlist[a11].playbackRate;
24006
- na = (a11 = "audio") => (e) => e.playlist[a11].volume;
24007
- ca = (a11 = "audio") => createSelector(ra(a11), (e) => Object.values(e));
24008
- da = (a11 = "audio") => createSelector(ra(a11), Fr(a11), (e, t2) => {
24003
+ aa = (a11 = "audio") => (e) => e.playlist[a11].progress;
24004
+ oa = (a11 = "audio") => (e) => e.playlist[a11].currentTime;
24005
+ na = (a11 = "audio") => (e) => e.playlist[a11].playbackRate;
24006
+ ca = (a11 = "audio") => (e) => e.playlist[a11].volume;
24007
+ da = (a11 = "audio") => createSelector(sa(a11), (e) => Object.values(e));
24008
+ la = (a11 = "audio") => createSelector(sa(a11), Fr(a11), (e, t2) => {
24009
24009
  if (t2.id)
24010
24010
  return e[t2.id];
24011
24011
  });
24012
- la = { selection: Fr("audio"), progress: sa("audio"), currentTime: aa("audio"), playbackRate: oa("audio"), volume: na("audio"), list: ca("audio"), selectedItem: da("audio") };
24013
- ua = { selection: Fr("video"), progress: sa("video"), currentTime: aa("video"), playbackRate: oa("video"), volume: na("video"), list: ca("video"), selectedItem: da("video") };
24014
- At = "HMS-Store:";
24012
+ ua = { selection: Fr("audio"), progress: aa("audio"), currentTime: oa("audio"), playbackRate: na("audio"), volume: ca("audio"), list: da("audio"), selectedItem: la("audio") };
24013
+ pa = { selection: Fr("video"), progress: aa("video"), currentTime: oa("video"), playbackRate: na("video"), volume: ca("video"), list: da("video"), selectedItem: la("video") };
24014
+ It = "HMS-Store:";
24015
24015
  b2 = class {
24016
24016
  static v(e, ...t2) {
24017
24017
  this.log(0, e, ...t2);
@@ -24041,23 +24041,23 @@ var init_dist = __esm({
24041
24041
  if (!(this.level.valueOf() > e.valueOf()))
24042
24042
  switch (e) {
24043
24043
  case 0: {
24044
- console.log(At, ...t2);
24044
+ console.log(It, ...t2);
24045
24045
  break;
24046
24046
  }
24047
24047
  case 1: {
24048
- console.debug(At, ...t2);
24048
+ console.debug(It, ...t2);
24049
24049
  break;
24050
24050
  }
24051
24051
  case 2: {
24052
- console.info(At, ...t2);
24052
+ console.info(It, ...t2);
24053
24053
  break;
24054
24054
  }
24055
24055
  case 3: {
24056
- console.warn(At, ...t2);
24056
+ console.warn(It, ...t2);
24057
24057
  break;
24058
24058
  }
24059
24059
  case 6: {
24060
- console.error(At, ...t2);
24060
+ console.error(It, ...t2);
24061
24061
  break;
24062
24062
  }
24063
24063
  case 4: {
@@ -24079,125 +24079,125 @@ var init_dist = __esm({
24079
24079
  };
24080
24080
  b2.level = 0;
24081
24081
  Gr = (a11, e) => e;
24082
- Ht = (a11, e) => e;
24083
- pa = (a11, e) => e;
24084
- xo = (a11, e) => e;
24082
+ At = (a11, e) => e;
24083
+ ha = (a11, e) => e;
24085
24084
  Uo = (a11, e) => e;
24085
+ Bo = (a11, e) => e;
24086
24086
  q2 = createSelector([K, Gr], (a11, e) => e ? a11[e] : null);
24087
- Wr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
24088
- Bo = createSelector([N2, Ht], (a11, e) => {
24087
+ Wr = createSelector([N2, At], (a11, e) => e ? a11[e] : null);
24088
+ Vo = createSelector([N2, At], (a11, e) => {
24089
24089
  if (!e)
24090
24090
  return null;
24091
24091
  let t2 = a11[e];
24092
24092
  return (t2 == null ? void 0 : t2.type) === "video" ? t2 : null;
24093
24093
  });
24094
- Vo = createSelector([N2, Ht], (a11, e) => {
24094
+ Fo = createSelector([N2, At], (a11, e) => {
24095
24095
  if (!e)
24096
24096
  return null;
24097
24097
  let t2 = a11[e];
24098
24098
  return (t2 == null ? void 0 : t2.type) === "audio" ? t2 : null;
24099
24099
  });
24100
- Fo = createSelector([N2, Ht], (a11, e) => {
24100
+ Go = createSelector([N2, At], (a11, e) => {
24101
24101
  if (!e)
24102
24102
  return null;
24103
24103
  let t2 = a11[e];
24104
24104
  return (t2 == null ? void 0 : t2.type) === "audio" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
24105
24105
  });
24106
- Go = createSelector([N2, Ht], (a11, e) => {
24106
+ Wo = createSelector([N2, At], (a11, e) => {
24107
24107
  if (!e)
24108
24108
  return null;
24109
24109
  let t2 = a11[e];
24110
24110
  return (t2 == null ? void 0 : t2.type) === "video" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
24111
24111
  });
24112
- Wo = createSelector([ta, Uo], (a11, e) => e ? a11[e] : null);
24112
+ $o = createSelector([ia, Bo], (a11, e) => e ? a11[e] : null);
24113
24113
  X2 = A2(q2);
24114
- Om = A2(createSelector([Ur, xo], (a11, e) => {
24114
+ Um = A2(createSelector([Ur, Uo], (a11, e) => {
24115
24115
  if (a11)
24116
24116
  return e ? a11[e] : a11;
24117
24117
  }));
24118
- Bm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.name));
24119
- Vm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.type));
24120
- vi = A2(Wr);
24121
- ha = A2(Bo);
24122
- Fm = A2(Vo);
24123
- Gm = A2(Fo);
24124
- Wm = A2(Go);
24125
- $o = A2((a11, e) => {
24118
+ Fm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.name));
24119
+ Gm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.type));
24120
+ fi = A2(Wr);
24121
+ ma = A2(Vo);
24122
+ Wm = A2(Fo);
24123
+ $m = A2(Go);
24124
+ Km = A2(Wo);
24125
+ Ko = A2((a11, e) => {
24126
24126
  let t2 = q2(a11, e);
24127
24127
  if (t2 && t2.videoTrack && t2.videoTrack !== "")
24128
24128
  return a11.tracks[t2.videoTrack];
24129
24129
  });
24130
- Ko = A2((a11, e) => {
24130
+ qo = A2((a11, e) => {
24131
24131
  let t2 = q2(a11, e);
24132
24132
  if (t2 && t2.audioTrack && t2.audioTrack !== "")
24133
24133
  return a11.tracks[t2.audioTrack];
24134
24134
  });
24135
- Km = A2((a11, e) => {
24135
+ jm = A2((a11, e) => {
24136
24136
  let t2 = q2(a11, e);
24137
24137
  return (t2 == null ? void 0 : t2.auxiliaryTracks.map((i2) => a11.tracks[i2])) || [];
24138
24138
  });
24139
- ma = (a11, e) => e ? a11.speakers[e] : null;
24140
- qm = A2(createSelector(ma, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24141
- qo = (a11, e) => {
24142
- let t2 = Ko(e)(a11);
24143
- return ma(a11, t2 == null ? void 0 : t2.id);
24144
- };
24145
- jm = A2(createSelector(qo, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24146
- Jm = A2((a11, e) => {
24139
+ Sa = (a11, e) => e ? a11.speakers[e] : null;
24140
+ Jm = A2(createSelector(Sa, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24141
+ jo = (a11, e) => {
24142
+ let t2 = qo(e)(a11);
24143
+ return Sa(a11, t2 == null ? void 0 : t2.id);
24144
+ };
24145
+ Qm = A2(createSelector(jo, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24146
+ zm = A2((a11, e) => {
24147
24147
  if (e)
24148
24148
  return a11.connectionQualities[e];
24149
24149
  });
24150
- Qm = A2((a11, e) => {
24150
+ Ym = A2((a11, e) => {
24151
24151
  let t2 = q2(a11, e);
24152
24152
  if (t2) {
24153
- let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => pt(a11.tracks[r2]));
24153
+ let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => ut(a11.tracks[r2]));
24154
24154
  return i2 ? a11.tracks[i2] : void 0;
24155
24155
  }
24156
24156
  });
24157
- zm = A2(createSelector(N2, q2, (a11, e) => {
24157
+ Xm = A2(createSelector(N2, q2, (a11, e) => {
24158
24158
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24159
24159
  let r2 = a11[i2];
24160
- return mt(r2) && ht(r2);
24160
+ return ht(r2) && pt(r2);
24161
24161
  });
24162
24162
  return t2 ? a11[t2] : void 0;
24163
24163
  }));
24164
- Ym = A2(createSelector(N2, q2, (a11, e) => {
24164
+ Zm = A2(createSelector(N2, q2, (a11, e) => {
24165
24165
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24166
24166
  let r2 = a11[i2];
24167
- return mt(r2) && pt(r2);
24167
+ return ht(r2) && ut(r2);
24168
24168
  });
24169
24169
  return t2 ? a11[t2] : void 0;
24170
24170
  }));
24171
- Xm = A2(createSelector(N2, q2, (a11, e) => {
24171
+ eS = A2(createSelector(N2, q2, (a11, e) => {
24172
24172
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24173
24173
  let r2 = a11[i2];
24174
- return ri(r2) && pt(r2);
24174
+ return ii(r2) && ut(r2);
24175
24175
  });
24176
24176
  return t2 ? a11[t2] : void 0;
24177
24177
  }));
24178
- Sa = A2(createSelector(N2, q2, (a11, e) => Ue(a11, e)));
24179
- ga = (a11) => createSelector(Sa(a11), (e) => e.audio);
24180
- eS = A2((a11, e) => {
24178
+ ga = A2(createSelector(N2, q2, (a11, e) => xe(a11, e)));
24179
+ Ta = (a11) => createSelector(ga(a11), (e) => e.audio);
24180
+ iS = A2((a11, e) => {
24181
24181
  let t2 = q2(a11, e);
24182
24182
  return je(a11, t2 == null ? void 0 : t2.audioTrack);
24183
24183
  });
24184
- tS = A2((a11, e) => {
24184
+ rS = A2((a11, e) => {
24185
24185
  let t2 = q2(a11, e);
24186
24186
  return je(a11, t2 == null ? void 0 : t2.videoTrack);
24187
24187
  });
24188
- Ta = A2((a11, e) => {
24188
+ fa = A2((a11, e) => {
24189
24189
  if (e && a11.tracks[e])
24190
24190
  return a11.tracks[e].volume === 0;
24191
24191
  });
24192
- iS = A2((a11, e) => {
24192
+ sS = A2((a11, e) => {
24193
24193
  let t2 = q2(a11, e);
24194
- return Ta(t2 == null ? void 0 : t2.audioTrack)(a11);
24194
+ return fa(t2 == null ? void 0 : t2.audioTrack)(a11);
24195
24195
  });
24196
- rS = A2((a11, e) => {
24197
- let t2 = ga(e)(a11);
24198
- return Ta(t2 == null ? void 0 : t2.id)(a11);
24196
+ aS = A2((a11, e) => {
24197
+ let t2 = Ta(e)(a11);
24198
+ return fa(t2 == null ? void 0 : t2.id)(a11);
24199
24199
  });
24200
- fa = A2((a11, e) => {
24200
+ va = A2((a11, e) => {
24201
24201
  let t2 = Wr(a11, e);
24202
24202
  if (t2) {
24203
24203
  if (t2.type !== "audio") {
@@ -24207,15 +24207,15 @@ var init_dist = __esm({
24207
24207
  return t2.volume;
24208
24208
  }
24209
24209
  });
24210
- sS = A2((a11, e) => {
24210
+ oS = A2((a11, e) => {
24211
24211
  let t2 = q2(a11, e);
24212
- return fa(t2 == null ? void 0 : t2.audioTrack)(a11);
24212
+ return va(t2 == null ? void 0 : t2.audioTrack)(a11);
24213
24213
  });
24214
- aS = A2((a11, e) => {
24215
- let t2 = ga(e)(a11);
24216
- return fa(t2 == null ? void 0 : t2.id)(a11);
24214
+ nS = A2((a11, e) => {
24215
+ let t2 = Ta(e)(a11);
24216
+ return va(t2 == null ? void 0 : t2.id)(a11);
24217
24217
  });
24218
- oS = A2((a11, e) => {
24218
+ cS = A2((a11, e) => {
24219
24219
  let t2 = Wr(a11, e);
24220
24220
  if (t2) {
24221
24221
  if (t2.type !== "video") {
@@ -24225,54 +24225,54 @@ var init_dist = __esm({
24225
24225
  return t2.layer;
24226
24226
  }
24227
24227
  });
24228
- va = createSelector([It, ye, Gr], (a11, e, t2) => {
24228
+ Ma = createSelector([Rt, ye, Gr], (a11, e, t2) => {
24229
24229
  if (t2)
24230
24230
  return a11.filter((i2) => {
24231
24231
  var r2;
24232
24232
  return !i2.recipientPeer && !((r2 = i2.recipientRoles) != null && r2.length) || i2.sender && ![e, t2].includes(i2.sender) ? false : [e, t2].includes(i2.recipientPeer);
24233
24233
  });
24234
24234
  });
24235
- Ma = createSelector([It, pa], (a11, e) => {
24235
+ ya = createSelector([Rt, ha], (a11, e) => {
24236
24236
  if (e)
24237
24237
  return a11.filter((t2) => {
24238
24238
  var i2, r2;
24239
24239
  return (i2 = t2.recipientRoles) != null && i2.length ? (r2 = t2.recipientRoles) == null ? void 0 : r2.includes(e) : false;
24240
24240
  });
24241
24241
  });
24242
- jo = createSelector(It, (a11) => a11.filter((e) => {
24242
+ Jo = createSelector(Rt, (a11) => a11.filter((e) => {
24243
24243
  var t2;
24244
24244
  return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
24245
24245
  }));
24246
- Jo = createSelector([Ma, pa], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24247
- Qo = createSelector([va, Gr], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24248
- nS = createSelector(jo, (a11) => a11.filter((e) => !e.read).length);
24249
- cS = A2(va);
24250
- dS = A2(Ma);
24251
- lS = A2(Jo);
24252
- uS = A2(Qo);
24253
- ya = A2(Wo);
24254
- PS = createSelector([K, N2], (a11, e) => Object.values(a11).map((i2) => {
24246
+ Qo = createSelector([ya, ha], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24247
+ zo = createSelector([Ma, Gr], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24248
+ dS = createSelector(Jo, (a11) => a11.filter((e) => !e.read).length);
24249
+ lS = A2(Ma);
24250
+ uS = A2(ya);
24251
+ pS = A2(Qo);
24252
+ hS = A2(zo);
24253
+ ka = A2($o);
24254
+ bS = createSelector([K, N2], (a11, e) => Object.values(a11).map((i2) => {
24255
24255
  var r2;
24256
24256
  return { peer: i2, isAudioEnabled: i2.audioTrack ? (r2 = e[i2.audioTrack]) == null ? void 0 : r2.enabled : false };
24257
24257
  }));
24258
- zo = (a11) => a11.roleChangeRequests[0] || null;
24259
- ES = createSelector([zo, K, Se], (a11, e, t2) => a11 ? { requestedBy: a11.requestedBy ? e[a11.requestedBy] : void 0, role: t2[a11.roleName], token: a11.token } : null);
24260
- bS = createSelector([at], (a11) => St(a11));
24261
- RS = createSelector([Zs], (a11) => St(a11));
24262
- Xo = createSelector([Y2, N2], (a11, e) => {
24258
+ Yo = (a11) => a11.roleChangeRequests[0] || null;
24259
+ RS = createSelector([Yo, K, Se], (a11, e, t2) => a11 ? { requestedBy: a11.requestedBy ? e[a11.requestedBy] : void 0, role: t2[a11.roleName], token: a11.token } : null);
24260
+ IS = createSelector([at], (a11) => mt(a11));
24261
+ AS = createSelector([ea], (a11) => mt(a11));
24262
+ Zo = createSelector([Y2, N2], (a11, e) => {
24263
24263
  let t2 = null;
24264
24264
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
24265
24265
  });
24266
- Zo = createSelector([ae, N2], (a11, e) => {
24266
+ en2 = createSelector([ae, N2], (a11, e) => {
24267
24267
  let t2 = null;
24268
24268
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
24269
24269
  });
24270
- yi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
24271
- Ct = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
24272
- ki = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
24273
- ka = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
24270
+ Mi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
24271
+ Ht = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
24272
+ yi = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
24273
+ Pa = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
24274
24274
  $r = "hmsNotification";
24275
- Pi = class {
24275
+ ki = class {
24276
24276
  constructor(e) {
24277
24277
  this.id = 0;
24278
24278
  this.onNotification = (e2, t2) => {
@@ -24311,14 +24311,14 @@ var init_dist = __esm({
24311
24311
  this.emitEvent(t2);
24312
24312
  }
24313
24313
  sendPeerUpdate(e, t2) {
24314
- let i2 = this.store.getState(X2(t2 == null ? void 0 : t2.id)) || t2, r2 = yi[e];
24314
+ let i2 = this.store.getState(X2(t2 == null ? void 0 : t2.id)) || t2, r2 = Mi[e];
24315
24315
  if (r2 && i2) {
24316
24316
  let s2 = this.createNotification(r2, i2, "info");
24317
24317
  this.emitEvent(s2);
24318
24318
  }
24319
24319
  }
24320
24320
  sendTrackUpdate(e, t2) {
24321
- let i2 = this.store.getState(vi(t2)), r2 = Ct[e];
24321
+ let i2 = this.store.getState(fi(t2)), r2 = Ht[e];
24322
24322
  if (r2) {
24323
24323
  let s2 = this.createNotification(r2, i2, "info");
24324
24324
  this.emitEvent(s2);
@@ -24349,14 +24349,14 @@ var init_dist = __esm({
24349
24349
  this.emitEvent(t2);
24350
24350
  }
24351
24351
  sendPollUpdate(e, t2) {
24352
- let i2 = ki[e], r2 = this.store.getState(ya(t2));
24352
+ let i2 = yi[e], r2 = this.store.getState(ka(t2));
24353
24353
  if (i2) {
24354
24354
  let s2 = this.createNotification(i2, r2, "info");
24355
24355
  this.emitEvent(s2);
24356
24356
  }
24357
24357
  }
24358
24358
  sendTranscriptionUpdate(e) {
24359
- let t2 = this.createNotification(ka.TRANSCRIPTION_STATE_UPDATED, e, "info");
24359
+ let t2 = this.createNotification(Pa.TRANSCRIPTION_STATE_UPDATED, e, "info");
24360
24360
  this.emitEvent(t2);
24361
24361
  }
24362
24362
  emitEvent(e) {
@@ -24366,7 +24366,7 @@ var init_dist = __esm({
24366
24366
  return this.id++, { id: this.id, type: e, message: r2, data: t2, severity: i2 };
24367
24367
  }
24368
24368
  };
24369
- Ei = class {
24369
+ Pi = class {
24370
24370
  constructor(e) {
24371
24371
  this.queuedUpdates = {};
24372
24372
  this.timers = {};
@@ -24393,36 +24393,36 @@ var init_dist = __esm({
24393
24393
  delete this.queuedUpdates[e], window && this.timers[e] && (window.clearTimeout(this.timers[e]), delete this.timers[e]);
24394
24394
  }
24395
24395
  };
24396
- Ea = (a11, e) => {
24397
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24396
+ ba = (a11, e) => {
24397
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24398
24398
  for (let i2 of t2) {
24399
24399
  let r2 = a11[i2], s2 = e[i2];
24400
- Ke(r2, s2) ? (re(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && re(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24400
+ $e(r2, s2) ? (re(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && re(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
24401
24401
  }
24402
24402
  };
24403
- ba = (a11, e) => {
24404
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24403
+ Ra = (a11, e) => {
24404
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24405
24405
  for (let i2 of t2) {
24406
24406
  let r2 = a11[i2], s2 = e[i2];
24407
- Ke(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24407
+ $e(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
24408
24408
  }
24409
24409
  };
24410
- Ra = (a11, e) => {
24411
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24410
+ Ia = (a11, e) => {
24411
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24412
24412
  for (let i2 of t2) {
24413
24413
  let r2 = a11[i2], s2 = e[i2];
24414
- Ke(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : bi(r2, s2) && (a11[i2] = s2);
24414
+ $e(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : Ei(r2, s2) && (a11[i2] = s2);
24415
24415
  }
24416
24416
  };
24417
24417
  Kr = (a11, e) => {
24418
- let t2 = Lt(Object.keys(a11), Object.keys(e));
24418
+ let t2 = Ct(Object.keys(a11), Object.keys(e));
24419
24419
  for (let i2 of t2) {
24420
24420
  let r2 = a11[i2], s2 = e[i2];
24421
- Ke(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24421
+ $e(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
24422
24422
  }
24423
24423
  };
24424
- Ia = (a11, e, t2) => {
24425
- let i2 = t2.reduce((s2, o2) => (s2[o2.firstTrackId] = Object.values(e[o2.getTrackIDBeingSent()] || {}).sort((n2, l2) => !n2.rid || !l2.rid ? 0 : n2.rid < l2.rid ? -1 : 1), s2), {}), r2 = Lt(Object.keys(a11), Object.keys(i2));
24424
+ Aa = (a11, e, t2) => {
24425
+ let i2 = t2.reduce((s2, o2) => (s2[o2.firstTrackId] = Object.values(e[o2.getTrackIDBeingSent()] || {}).sort((n2, l2) => !n2.rid || !l2.rid ? 0 : n2.rid < l2.rid ? -1 : 1), s2), {}), r2 = Ct(Object.keys(a11), Object.keys(i2));
24426
24426
  for (let s2 of r2) {
24427
24427
  if (!i2[s2]) {
24428
24428
  delete a11[s2];
@@ -24434,9 +24434,9 @@ var init_dist = __esm({
24434
24434
  qr = (a11, e) => {
24435
24435
  a11.plugins && re(a11.plugins, e.plugins) && (e.plugins = a11.plugins), a11.type === "video" && a11.layerDefinitions && re(a11.layerDefinitions, e.layerDefinitions) && (e.layerDefinitions = a11.layerDefinitions);
24436
24436
  };
24437
- Ke = (a11, e) => a11 && e;
24437
+ $e = (a11, e) => a11 && e;
24438
24438
  jr = (a11, e) => a11 && !e;
24439
- bi = (a11, e) => !a11 && e;
24439
+ Ei = (a11, e) => !a11 && e;
24440
24440
  re = (a11, e) => {
24441
24441
  if (a11 === e || a11.length === 0 && (e == null ? void 0 : e.length) === 0)
24442
24442
  return true;
@@ -24447,7 +24447,7 @@ var init_dist = __esm({
24447
24447
  return false;
24448
24448
  return true;
24449
24449
  };
24450
- Lt = (a11, e) => {
24450
+ Ct = (a11, e) => {
24451
24451
  let t2 = /* @__PURE__ */ new Set();
24452
24452
  for (let i2 of a11)
24453
24453
  t2.add(i2);
@@ -24532,7 +24532,7 @@ var init_dist = __esm({
24532
24532
  return { recording: { browser: m({ running: false }, e == null ? void 0 : e.browser), server: m({ running: false }, e == null ? void 0 : e.server), hls: m({ running: false }, e == null ? void 0 : e.hls) }, rtmp: m({ running: false }, t2), hls: { variants: ((s2 = i2 == null ? void 0 : i2.variants) == null ? void 0 : s2.map((o2) => o2)) || [], running: !!(i2 != null && i2.running), error: i2 == null ? void 0 : i2.error }, transcriptions: r2 || [] };
24533
24533
  }
24534
24534
  };
24535
- Dt = class {
24535
+ Lt = class {
24536
24536
  constructor(e, t2, i2, r2) {
24537
24537
  this.playlistManager = e;
24538
24538
  this.syncPlaylistState = i2;
@@ -24550,7 +24550,7 @@ var init_dist = __esm({
24550
24550
  }
24551
24551
  pause() {
24552
24552
  return c2(this, null, function* () {
24553
- let e = this.type === "audio" ? la : ua, t2 = this.store.getState(e.selection);
24553
+ let e = this.type === "audio" ? ua : pa, t2 = this.store.getState(e.selection);
24554
24554
  if (!t2.id) {
24555
24555
  b2.w("No item is currently playing to pause");
24556
24556
  return;
@@ -24603,7 +24603,7 @@ var init_dist = __esm({
24603
24603
  });
24604
24604
  }
24605
24605
  };
24606
- Ri = class {
24606
+ bi = class {
24607
24607
  constructor(e, t2) {
24608
24608
  this.sdk = e;
24609
24609
  this.setLocally = t2;
@@ -24630,7 +24630,7 @@ var init_dist = __esm({
24630
24630
  });
24631
24631
  }
24632
24632
  };
24633
- Ii = class {
24633
+ Ri = class {
24634
24634
  constructor(e, t2) {
24635
24635
  this.intervalMs = 100, this.shouldMonitor = false, this.hasStarted = false, this.unsubs = [], this.analysers = {}, this.store = e, this.actions = t2;
24636
24636
  }
@@ -24706,11 +24706,11 @@ var init_dist = __esm({
24706
24706
  return Math.ceil(Math.min(Math.max(s2 * 100, 0), 100));
24707
24707
  }
24708
24708
  };
24709
- Aa = 2e4;
24710
- Ha = 1e4;
24709
+ Ha = 2e4;
24710
+ Ca = 1e4;
24711
24711
  ot = { name: "diagnostics-role", priority: 1, publishParams: { allowed: ["audio", "video"], audio: { bitRate: 32, codec: "opus" }, video: { bitRate: 100, codec: "vp8", frameRate: 30, height: 720, width: 1280 }, screen: { bitRate: 100, codec: "vp8", frameRate: 10, height: 1080, width: 1920 } }, subscribeParams: { subscribeToRoles: [], maxSubsBitRate: 3200 }, permissions: { browserRecording: false, changeRole: false, endRoom: false, hlsStreaming: false, mute: false, pollRead: false, pollWrite: false, removeOthers: false, rtmpStreaming: false, unmute: false } };
24712
- Ca = "https://100ms.live/test-audio.wav";
24713
- Ai = class {
24712
+ La = "https://100ms.live/test-audio.wav";
24713
+ Ii = class {
24714
24714
  constructor() {
24715
24715
  this.networkScores = [];
24716
24716
  this.lastPushedAt = 0;
@@ -24730,13 +24730,13 @@ var init_dist = __esm({
24730
24730
  return this.networkScores.reduce((e, t2) => e + t2, 0) / this.networkScores.length;
24731
24731
  }
24732
24732
  };
24733
- tn2 = (a11) => !!a11 && !isNaN(a11);
24733
+ rn2 = (a11) => !!a11 && !isNaN(a11);
24734
24734
  de = (a11) => a11[a11.length - 1];
24735
24735
  Ne = (a11, e) => {
24736
- let t2 = a11.filter((i2) => tn2(e(i2)));
24736
+ let t2 = a11.filter((i2) => rn2(e(i2)));
24737
24737
  return t2.reduce((i2, r2) => i2 + (e(r2) || 0), 0) / t2.length;
24738
24738
  };
24739
- Hi = class {
24739
+ Ai = class {
24740
24740
  constructor(e) {
24741
24741
  this.sdk = e;
24742
24742
  this.peerStatsList = [];
@@ -24747,34 +24747,34 @@ var init_dist = __esm({
24747
24747
  }
24748
24748
  handleStatsUpdate(e) {
24749
24749
  return c2(this, null, function* () {
24750
- var n2, l2, u2, p2, h2, T, g2, f2;
24750
+ var n2, l2, u2, p2, h2, T, g2, v2;
24751
24751
  let t2 = e.getLocalPeerStats();
24752
24752
  t2 && this.peerStatsList.push(t2);
24753
24753
  let i2 = (u2 = (l2 = (n2 = this.sdk.getLocalPeer()) == null ? void 0 : n2.audioTrack) == null ? void 0 : l2.nativeTrack) == null ? void 0 : u2.id, r2 = (T = (h2 = (p2 = this.sdk.getLocalPeer()) == null ? void 0 : p2.videoTrack) == null ? void 0 : h2.nativeTrack) == null ? void 0 : T.id, s2 = e.getLocalTrackStats();
24754
24754
  s2 && (i2 && this.localAudioTrackStatsList.push(s2[i2]), r2 && this.localVideoTrackStatsList.push(s2[r2]));
24755
- let o2 = yield (f2 = (g2 = this.sdk.getWebrtcInternals()) == null ? void 0 : g2.getSubscribePeerConnection()) == null ? void 0 : f2.getStats();
24756
- o2 == null || o2.forEach((P8) => {
24757
- if (P8.type === "inbound-rtp") {
24758
- let k2 = P8.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Et("bytesReceived", P8, de(k2));
24759
- k2.push(M2(m({}, P8), { bitrate: w2 }));
24755
+ let o2 = yield (v2 = (g2 = this.sdk.getWebrtcInternals()) == null ? void 0 : g2.getSubscribePeerConnection()) == null ? void 0 : v2.getStats();
24756
+ o2 == null || o2.forEach((E2) => {
24757
+ if (E2.type === "inbound-rtp") {
24758
+ let P8 = E2.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Pt("bytesReceived", E2, de(P8));
24759
+ P8.push(M2(m({}, E2), { bitrate: w2 }));
24760
24760
  }
24761
24761
  });
24762
24762
  });
24763
24763
  }
24764
24764
  buildReport() {
24765
- var T, g2, f2, P8, k2, w2, xe, Zt;
24766
- let e = (T = de(this.peerStatsList)) == null ? void 0 : T.publish, t2 = (g2 = de(this.peerStatsList)) == null ? void 0 : g2.subscribe, i2 = e != null && e.responsesReceived ? ((e == null ? void 0 : e.totalRoundTripTime) || 0) / e.responsesReceived : 0, r2 = t2 != null && t2.responsesReceived ? ((t2 == null ? void 0 : t2.totalRoundTripTime) || 0) / t2.responsesReceived : 0, s2 = Number(((i2 + r2) / 2 * 1e3).toFixed(2)), o2 = ((f2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : f2.packetsReceived) || 0, n2 = ((P8 = de(this.remoteVideoTrackStatsList)) == null ? void 0 : P8.packetsReceived) || 0, l2 = this.localAudioTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), u2 = this.localVideoTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), p2 = de(this.localAudioTrackStatsList), h2 = de(this.localVideoTrackStatsList);
24765
+ var T, g2, v2, E2, P8, w2, Oe, Xt;
24766
+ let e = (T = de(this.peerStatsList)) == null ? void 0 : T.publish, t2 = (g2 = de(this.peerStatsList)) == null ? void 0 : g2.subscribe, i2 = e != null && e.responsesReceived ? ((e == null ? void 0 : e.totalRoundTripTime) || 0) / e.responsesReceived : 0, r2 = t2 != null && t2.responsesReceived ? ((t2 == null ? void 0 : t2.totalRoundTripTime) || 0) / t2.responsesReceived : 0, s2 = Number(((i2 + r2) / 2 * 1e3).toFixed(2)), o2 = ((v2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : v2.packetsReceived) || 0, n2 = ((E2 = de(this.remoteVideoTrackStatsList)) == null ? void 0 : E2.packetsReceived) || 0, l2 = this.localAudioTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), u2 = this.localVideoTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), p2 = de(this.localAudioTrackStatsList), h2 = de(this.localVideoTrackStatsList);
24767
24767
  return { combined: { roundTripTime: s2, packetsReceived: o2 + n2, packetsLost: (t2 == null ? void 0 : t2.packetsLost) || 0, bytesSent: (e == null ? void 0 : e.bytesSent) || 0, bytesReceived: (t2 == null ? void 0 : t2.bytesReceived) || 0, bitrateSent: Ne(this.peerStatsList, (x2) => {
24768
24768
  var $;
24769
24769
  return ($ = x2.publish) == null ? void 0 : $.bitrate;
24770
24770
  }), bitrateReceived: Ne(this.peerStatsList, (x2) => {
24771
24771
  var $;
24772
24772
  return ($ = x2.subscribe) == null ? void 0 : $.bitrate;
24773
- }) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((k2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : k2.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: Ne(l2, (x2) => x2), bitrateReceived: Ne(this.remoteAudioTrackStatsList, (x2) => x2.bitrate), bytesSent: p2 ? Object.values(p2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 }, video: { roundTripTime: s2, packetsLost: ((xe = de(this.remoteVideoTrackStatsList)) == null ? void 0 : xe.packetsLost) || 0, bytesReceived: ((Zt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Zt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: Ne(u2, (x2) => x2), bitrateReceived: Ne(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24773
+ }) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((P8 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : P8.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: Ne(l2, (x2) => x2), bitrateReceived: Ne(this.remoteAudioTrackStatsList, (x2) => x2.bitrate), bytesSent: p2 ? Object.values(p2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 }, video: { roundTripTime: s2, packetsLost: ((Oe = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Oe.packetsLost) || 0, bytesReceived: ((Xt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Xt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: Ne(u2, (x2) => x2), bitrateReceived: Ne(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24774
24774
  }
24775
24775
  };
24776
- rn2 = ((n2) => (n2[n2.STARTING = 0] = "STARTING", n2[n2.INIT_FETCHED = 1] = "INIT_FETCHED", n2[n2.SIGNAL_CONNECTED = 2] = "SIGNAL_CONNECTED", n2[n2.ICE_ESTABLISHED = 3] = "ICE_ESTABLISHED", n2[n2.MEDIA_CAPTURED = 4] = "MEDIA_CAPTURED", n2[n2.MEDIA_PUBLISHED = 5] = "MEDIA_PUBLISHED", n2[n2.COMPLETED = 6] = "COMPLETED", n2))(rn2 || {});
24777
- Ci = class {
24776
+ sn2 = ((n2) => (n2[n2.STARTING = 0] = "STARTING", n2[n2.INIT_FETCHED = 1] = "INIT_FETCHED", n2[n2.SIGNAL_CONNECTED = 2] = "SIGNAL_CONNECTED", n2[n2.ICE_ESTABLISHED = 3] = "ICE_ESTABLISHED", n2[n2.MEDIA_CAPTURED = 4] = "MEDIA_CAPTURED", n2[n2.MEDIA_PUBLISHED = 5] = "MEDIA_PUBLISHED", n2[n2.COMPLETED = 6] = "COMPLETED", n2))(sn2 || {});
24777
+ Hi = class {
24778
24778
  constructor(e, t2, i2, r2) {
24779
24779
  this.sdk = e;
24780
24780
  this.sdkListener = t2;
@@ -24791,7 +24791,7 @@ var init_dist = __esm({
24791
24791
  this.isVideoTrackCaptured = false;
24792
24792
  this.isAudioTrackPublished = false;
24793
24793
  this.isVideoTrackPublished = false;
24794
- this.cqsCalculator = new Ai();
24794
+ this.cqsCalculator = new Ii();
24795
24795
  this.timestamp = Date.now();
24796
24796
  this.onRoomUpdate = this.sdkListener.onRoomUpdate.bind(this.sdkListener);
24797
24797
  this.onPeerUpdate = this.sdkListener.onPeerUpdate.bind(this.sdkListener);
@@ -24802,9 +24802,9 @@ var init_dist = __esm({
24802
24802
  this.onChangeTrackStateRequest = this.sdkListener.onChangeTrackStateRequest.bind(this.sdkListener);
24803
24803
  this.onChangeMultiTrackStateRequest = this.sdkListener.onChangeMultiTrackStateRequest.bind(this.sdkListener);
24804
24804
  this.onRemovedFromRoom = this.sdkListener.onRemovedFromRoom.bind(this.sdkListener);
24805
- this.onNetworkQuality = (La = this.sdkListener.onNetworkQuality) == null ? void 0 : La.bind(this.sdkListener);
24805
+ this.onNetworkQuality = (Da = this.sdkListener.onNetworkQuality) == null ? void 0 : Da.bind(this.sdkListener);
24806
24806
  this.onPreview = this.sdkListener.onPreview.bind(this.sdkListener);
24807
- this.onDeviceChange = (Da = this.sdkListener.onDeviceChange) == null ? void 0 : Da.bind(this.sdkListener);
24807
+ this.onDeviceChange = (wa = this.sdkListener.onDeviceChange) == null ? void 0 : wa.bind(this.sdkListener);
24808
24808
  this.onSessionStoreUpdate = this.sdkListener.onSessionStoreUpdate.bind(this.sdkListener);
24809
24809
  this.onPollsUpdate = this.sdkListener.onPollsUpdate.bind(this.sdkListener);
24810
24810
  this.onWhiteboardUpdate = this.sdkListener.onWhiteboardUpdate.bind(this.sdkListener);
@@ -24815,7 +24815,7 @@ var init_dist = __esm({
24815
24815
  });
24816
24816
  this.cqsCalculator.pushScore(t3 == null ? void 0 : t3.downlinkQuality);
24817
24817
  };
24818
- this.statsCollector = new Hi(e), this.state = 0;
24818
+ this.statsCollector = new Ai(e), this.state = 0;
24819
24819
  }
24820
24820
  get state() {
24821
24821
  return this._state;
@@ -24856,7 +24856,7 @@ var init_dist = __esm({
24856
24856
  var t2, i2;
24857
24857
  this.sdkListener.onJoin(e), (t2 = this.sdk.getWebrtcInternals()) == null || t2.onStatsChange((r2) => this.statsCollector.handleStatsUpdate(r2)), (i2 = this.sdk.getWebrtcInternals()) == null || i2.start(), this.cleanupTimer = window.setTimeout(() => {
24858
24858
  this.cleanupAndReport();
24859
- }, Aa);
24859
+ }, Ha);
24860
24860
  }
24861
24861
  onError(e) {
24862
24862
  this.sdkListener.onError(e), this.errors.push(e), e != null && e.isTerminal && this.cleanupAndReport();
@@ -24881,7 +24881,7 @@ var init_dist = __esm({
24881
24881
  }
24882
24882
  cleanupAndReport() {
24883
24883
  var e;
24884
- clearTimeout(this.cleanupTimer), this.cleanupTimer = void 0, this.state === 5 && this.errors.length === 0 && (this.state = 6), (e = this.completionCallback) == null || e.call(this, this.buildReport()), this.sdk.leave();
24884
+ clearTimeout(this.cleanupTimer), this.cleanupTimer = void 0, this.state === 5 && (this.state = 6), (e = this.completionCallback) == null || e.call(this, this.buildReport()), this.sdk.leave();
24885
24885
  }
24886
24886
  buildReport() {
24887
24887
  this.cqsCalculator.addPendingCQSTillNow();
@@ -24889,7 +24889,7 @@ var init_dist = __esm({
24889
24889
  return { testTimestamp: this.timestamp, connectivityState: this.state, errors: this.errors, signallingReport: { isConnected: this.wsConnected, isInitConnected: this.initConnected, websocketUrl: this.websocketURL }, mediaServerReport: { stats: t2, connectionQualityScore: e, isPublishICEConnected: this.isPublishICEConnected, isSubscribeICEConnected: this.isSubscribeICEConnected, publishICECandidatePairSelected: this.selectedPublishICECandidate, subscribeICECandidatePairSelected: this.selectedSubscribeICECandidate, publishIceCandidatesGathered: this.gatheredPublishICECandidates, subscribeIceCandidatesGathered: this.gatheredSubscribeICECandidates } };
24890
24890
  }
24891
24891
  };
24892
- Oe = class {
24892
+ Ke = class {
24893
24893
  constructor(e) {
24894
24894
  this.recording = { server: { running: false }, browser: { running: false }, hls: { running: false } };
24895
24895
  this.rtmp = { running: false };
@@ -24898,7 +24898,7 @@ var init_dist = __esm({
24898
24898
  this.id = e;
24899
24899
  }
24900
24900
  };
24901
- Li = (a11, e, t2) => c2(void 0, null, function* () {
24901
+ Ci = (a11, e, t2) => c2(void 0, null, function* () {
24902
24902
  let r2 = Error("something went wrong during fetch");
24903
24903
  for (let s2 = 0; s2 < 4; s2++)
24904
24904
  try {
@@ -24911,19 +24911,19 @@ var init_dist = __esm({
24911
24911
  }
24912
24912
  throw ["Failed to fetch", "NetworkError"].some((s2) => r2.message.includes(s2)) ? S2.APIErrors.EndpointUnreachable("GET_TOKEN", r2.message) : r2;
24913
24913
  });
24914
- wt = class {
24914
+ Dt = class {
24915
24915
  constructor(e, t2) {
24916
24916
  this.sdk = e;
24917
24917
  this.sdkListener = t2;
24918
- this.recordedAudio = Ca;
24919
- this.initSdkWithLocalPeer();
24918
+ this.recordedAudio = La;
24919
+ this.sdk.setIsDiagnostics(true), this.initSdkWithLocalPeer();
24920
24920
  }
24921
24921
  get localPeer() {
24922
24922
  var e;
24923
24923
  return (e = this.sdk) == null ? void 0 : e.store.getLocalPeer();
24924
24924
  }
24925
24925
  checkBrowserSupport() {
24926
- Tt(), gt();
24926
+ gt(), St();
24927
24927
  }
24928
24928
  requestPermission(e) {
24929
24929
  return c2(this, null, function* () {
@@ -24952,7 +24952,7 @@ var init_dist = __esm({
24952
24952
  (t2 = (e = this.localPeer) == null ? void 0 : e.videoTrack) == null || t2.cleanup(), this.localPeer && (this.localPeer.videoTrack = void 0);
24953
24953
  }
24954
24954
  startMicCheck(s2) {
24955
- return c2(this, arguments, function* ({ inputDevice: e, onError: t2, onStop: i2, time: r2 = Ha }) {
24955
+ return c2(this, arguments, function* ({ inputDevice: e, onError: t2, onStop: i2, time: r2 = Ca }) {
24956
24956
  var u2, p2, h2, T;
24957
24957
  this.initSdkWithLocalPeer((g2) => {
24958
24958
  this.stopMicCheck(), t2 == null || t2(g2);
@@ -24967,9 +24967,9 @@ var init_dist = __esm({
24967
24967
  this.mediaRecorder.ondataavailable = function(g2) {
24968
24968
  n2.push(g2.data);
24969
24969
  }, this.mediaRecorder.onstop = () => {
24970
- var f2, P8;
24971
- let g2 = new Blob(n2, { type: (f2 = this.mediaRecorder) == null ? void 0 : f2.mimeType });
24972
- this.recordedAudio = URL.createObjectURL(g2), (P8 = this.onStopMicCheck) == null || P8.call(this);
24970
+ var v2, E2;
24971
+ let g2 = new Blob(n2, { type: (v2 = this.mediaRecorder) == null ? void 0 : v2.mimeType });
24972
+ this.recordedAudio = URL.createObjectURL(g2), (E2 = this.onStopMicCheck) == null || E2.call(this);
24973
24973
  }, this.mediaRecorder.start();
24974
24974
  let l2 = setTimeout(() => {
24975
24975
  this.stopMicCheck();
@@ -24988,14 +24988,13 @@ var init_dist = __esm({
24988
24988
  }
24989
24989
  startConnectivityCheck(e, t2, i2) {
24990
24990
  return c2(this, null, function* () {
24991
- var o2;
24992
24991
  if (!this.sdk)
24993
24992
  throw new Error("SDK not found");
24994
- this.connectivityCheck = new Ci(this.sdk, this.sdkListener, e, t2);
24995
- let r2 = yield this.getAuthToken(i2), { roomId: s2 } = nt(r2);
24996
- yield this.sdk.leave(), (o2 = this.sdk) == null || o2.store.setRoom(new Oe(s2)), yield this.sdk.join({ authToken: r2, userName: "diagonistic-test", initEndpoint: "https://qa-in2-ipv6.100ms.live/init" }, this.connectivityCheck), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: (n2) => {
24997
- var l2;
24998
- (l2 = this.connectivityCheck) == null || l2.handleConnectionQualityUpdate(n2);
24993
+ this.connectivityCheck = new Hi(this.sdk, this.sdkListener, e, t2);
24994
+ let r2 = yield this.getAuthToken(i2);
24995
+ yield this.sdk.leave(), yield this.sdk.join({ authToken: r2, userName: "diagnostics-test" }, this.connectivityCheck), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: (s2) => {
24996
+ var o2;
24997
+ (o2 = this.connectivityCheck) == null || o2.handleConnectionQualityUpdate(s2);
24999
24998
  } });
25000
24999
  });
25001
25000
  }
@@ -25010,16 +25009,16 @@ var init_dist = __esm({
25010
25009
  this.sdkListener && ((r2 = this.sdk) == null || r2.initStoreAndManagers(M2(m({}, this.sdkListener), { onError: (n2) => {
25011
25010
  e == null || e(n2), this.sdkListener.onError(n2);
25012
25011
  } })));
25013
- let t2 = new $e({ name: "diagnostics-peer", role: ot, type: "regular" });
25012
+ let t2 = new We({ name: "diagnostics-peer", role: ot, type: "regular" });
25014
25013
  (s2 = this.sdk) == null || s2.store.addPeer(t2);
25015
- let i2 = new Oe("diagnostics-room");
25014
+ let i2 = new Ke("diagnostics-room");
25016
25015
  this.sdk.store.setRoom(i2), this.sdkListener.onRoomUpdate("ROOM_PEER_COUNT_UPDATED", i2), (o2 = this.sdk) == null || o2.deviceManager.init(true);
25017
25016
  }
25018
25017
  getAuthToken(e) {
25019
25018
  return c2(this, null, function* () {
25020
- let t2 = new URL("https://api-nonprod.100ms.live/v2/diagnostics/token");
25019
+ let t2 = new URL("https://api.100ms.live/v2/diagnostics/token");
25021
25020
  e && t2.searchParams.append("region", e);
25022
- let i2 = yield Li(t2.toString(), { method: "GET" }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), r2 = yield i2.json();
25021
+ let i2 = yield Ci(t2.toString(), { method: "GET" }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), r2 = yield i2.json();
25023
25022
  if (!i2.ok)
25024
25023
  throw S2.APIErrors.ServerErrors(r2.code, "GET_TOKEN", r2.message, false);
25025
25024
  let { token: s2 } = r2;
@@ -25039,7 +25038,7 @@ var init_dist = __esm({
25039
25038
  });
25040
25039
  }
25041
25040
  };
25042
- Di = class {
25041
+ Li = class {
25043
25042
  constructor(e, t2, i2) {
25044
25043
  this.isRoomJoinCalled = false;
25045
25044
  this.ignoredMessageTypes = [];
@@ -25054,7 +25053,7 @@ var init_dist = __esm({
25054
25053
  }, e2);
25055
25054
  };
25056
25055
  this.sendPeerUpdateNotification = (e2, t3) => {
25057
- let i3 = this.store.getState(X2(t3.peerId)), r2 = yi[e2] || "peerUpdate";
25056
+ let i3 = this.store.getState(X2(t3.peerId)), r2 = Mi[e2] || "peerUpdate";
25058
25057
  if (e2 === 8)
25059
25058
  this.syncRoomState(r2), this.updateMidCallPreviewRoomState(e2, t3);
25060
25059
  else if ([0, 1].includes(e2))
@@ -25065,14 +25064,14 @@ var init_dist = __esm({
25065
25064
  let s2 = _2.convertPeer(t3);
25066
25065
  this.setState((o2) => {
25067
25066
  let n2 = o2.peers[s2.id];
25068
- Ke(n2, s2) && (re(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
25067
+ $e(n2, s2) && (re(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
25069
25068
  }, r2);
25070
25069
  }
25071
25070
  this.hmsNotifications.sendPeerUpdate(e2, i3);
25072
25071
  };
25073
25072
  this.getSDKHMSPeer = (e2) => this.sdk.getPeerMap()[e2];
25074
25073
  this.setState = (e2, t3) => this.store.namedSetState(e2, t3);
25075
- this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new Ri(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new Ei(e);
25074
+ this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new bi(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new Pi(e);
25076
25075
  }
25077
25076
  getLocalTrack(e) {
25078
25077
  return this.sdk.store.getLocalPeerTracks().find((t2) => t2.trackId === e);
@@ -25115,7 +25114,7 @@ var init_dist = __esm({
25115
25114
  b2.d("layer none will be ignored");
25116
25115
  return;
25117
25116
  }
25118
- if (((r2 = this.store.getState(ha(e))) == null ? void 0 : r2.preferredLayer) === t2) {
25117
+ if (((r2 = this.store.getState(ma(e))) == null ? void 0 : r2.preferredLayer) === t2) {
25119
25118
  b2.d(`preferred layer is already ${t2}`);
25120
25119
  return;
25121
25120
  }
@@ -25457,7 +25456,7 @@ var init_dist = __esm({
25457
25456
  }
25458
25457
  endRoom(e, t2) {
25459
25458
  return c2(this, null, function* () {
25460
- let i2 = this.store.getState(ea);
25459
+ let i2 = this.store.getState(ta);
25461
25460
  if (!(i2 != null && i2.endRoom)) {
25462
25461
  b2.w("You are not allowed to perform this action - endRoom");
25463
25462
  return;
@@ -25546,7 +25545,7 @@ var init_dist = __esm({
25546
25545
  return c2(this, null, function* () {
25547
25546
  if (typeof e == "string") {
25548
25547
  let i2 = this.getTrackById(e);
25549
- i2 && Pa(i2) ? yield this.sdk.changeTrackState(i2, t2) : this.logPossibleInconsistency(`No remote track with ID ${e} found for change track state`);
25548
+ i2 && Ea(i2) ? yield this.sdk.changeTrackState(i2, t2) : this.logPossibleInconsistency(`No remote track with ID ${e} found for change track state`);
25550
25549
  } else
25551
25550
  Array.isArray(e) && e.forEach((i2) => this.setRemoteTrackEnabled(i2, t2));
25552
25551
  });
@@ -25576,16 +25575,16 @@ var init_dist = __esm({
25576
25575
  }
25577
25576
  enableBeamSpeakerLabelsLogging() {
25578
25577
  return c2(this, null, function* () {
25579
- this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ii(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25578
+ this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ri(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25580
25579
  });
25581
25580
  }
25582
25581
  initDiagnostics() {
25583
- let e = new wt(this.sdk, { onJoin: this.onJoin.bind(this), onPreview: this.onPreview.bind(this), onRoomUpdate: this.onRoomUpdate.bind(this), onPeerUpdate: this.onPeerUpdate.bind(this), onTrackUpdate: this.onTrackUpdate.bind(this), onMessageReceived: this.onMessageReceived.bind(this), onError: this.onError.bind(this), onReconnected: this.onReconnected.bind(this), onReconnecting: this.onReconnecting.bind(this), onRoleChangeRequest: this.onRoleChangeRequest.bind(this), onRoleUpdate: this.onRoleUpdate.bind(this), onDeviceChange: this.onDeviceChange.bind(this), onChangeTrackStateRequest: this.onChangeTrackStateRequest.bind(this), onChangeMultiTrackStateRequest: this.onChangeMultiTrackStateRequest.bind(this), onRemovedFromRoom: this.onRemovedFromRoom.bind(this), onNetworkQuality: this.onNetworkQuality.bind(this), onSessionStoreUpdate: this.onSessionStoreUpdate.bind(this), onPollsUpdate: this.onPollsUpdate.bind(this), onWhiteboardUpdate: this.onWhiteboardUpdate.bind(this) });
25582
+ let e = new Dt(this.sdk, { onJoin: this.onJoin.bind(this), onPreview: this.onPreview.bind(this), onRoomUpdate: this.onRoomUpdate.bind(this), onPeerUpdate: this.onPeerUpdate.bind(this), onTrackUpdate: this.onTrackUpdate.bind(this), onMessageReceived: this.onMessageReceived.bind(this), onError: this.onError.bind(this), onReconnected: this.onReconnected.bind(this), onReconnecting: this.onReconnecting.bind(this), onRoleChangeRequest: this.onRoleChangeRequest.bind(this), onRoleUpdate: this.onRoleUpdate.bind(this), onDeviceChange: this.onDeviceChange.bind(this), onChangeTrackStateRequest: this.onChangeTrackStateRequest.bind(this), onChangeMultiTrackStateRequest: this.onChangeMultiTrackStateRequest.bind(this), onRemovedFromRoom: this.onRemovedFromRoom.bind(this), onNetworkQuality: this.onNetworkQuality.bind(this), onSessionStoreUpdate: this.onSessionStoreUpdate.bind(this), onPollsUpdate: this.onPollsUpdate.bind(this), onWhiteboardUpdate: this.onWhiteboardUpdate.bind(this) });
25584
25583
  return this.sdk.addAudioListener({ onAudioLevelUpdate: this.onAudioLevelUpdate.bind(this) }), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: this.onConnectionQualityUpdate.bind(this) }), e;
25585
25584
  }
25586
25585
  resetState(e = "resetState") {
25587
25586
  this.isRoomJoinCalled = false, b2.cleanup(), this.setState((t2) => {
25588
- Object.assign(t2, ti());
25587
+ Object.assign(t2, ei());
25589
25588
  }, e);
25590
25589
  }
25591
25590
  sdkJoinWithListeners(e) {
@@ -25630,7 +25629,7 @@ var init_dist = __esm({
25630
25629
  this.setSessionStoreValueLocally(e, "sessionStoreUpdate");
25631
25630
  }
25632
25631
  onPollsUpdate(e, t2) {
25633
- let i2 = ki[e];
25632
+ let i2 = yi[e];
25634
25633
  this.setState((r2) => {
25635
25634
  let s2 = t2.reduce((o2, n2) => {
25636
25635
  var l2;
@@ -25639,7 +25638,7 @@ var init_dist = __esm({
25639
25638
  return M2(m({}, u2), { answer: u2.answer ? m({}, u2.answer) : void 0, options: (p2 = u2.options) == null ? void 0 : p2.map((T) => m({}, T)), responses: (h2 = u2.responses) == null ? void 0 : h2.map((T) => m({}, T)) });
25640
25639
  }) }), o2;
25641
25640
  }, {});
25642
- Ra(r2.polls, s2);
25641
+ Ia(r2.polls, s2);
25643
25642
  }, i2), t2.forEach((r2) => this.hmsNotifications.sendPollUpdate(e, r2.id));
25644
25643
  }
25645
25644
  onWhiteboardUpdate(e) {
@@ -25667,26 +25666,26 @@ var init_dist = __esm({
25667
25666
  e = `${e}_fullSync`, b2.time(`store-sync-${e}`);
25668
25667
  let t2 = {}, i2 = [], r2 = {}, s2 = {}, o2 = {}, n2, l2 = this.sdk.getPeers();
25669
25668
  for (let g2 of l2) {
25670
- let f2 = _2.convertPeer(g2);
25671
- t2[f2.id] = f2, i2.push(f2.id), o2[f2.id] = { peerID: f2.id, downlinkQuality: g2.networkQuality || -1 };
25672
- let P8 = [g2.audioTrack, g2.videoTrack, ...g2.auxiliaryTracks];
25673
- for (let k2 of P8) {
25674
- if (!k2)
25669
+ let v2 = _2.convertPeer(g2);
25670
+ t2[v2.id] = v2, i2.push(v2.id), o2[v2.id] = { peerID: v2.id, downlinkQuality: g2.networkQuality || -1 };
25671
+ let E2 = [g2.audioTrack, g2.videoTrack, ...g2.auxiliaryTracks];
25672
+ for (let P8 of E2) {
25673
+ if (!P8)
25675
25674
  continue;
25676
- let w2 = _2.convertTrack(k2);
25675
+ let w2 = _2.convertTrack(P8);
25677
25676
  r2[w2.id] = w2;
25678
25677
  }
25679
25678
  if (g2.isLocal) {
25680
- let k2 = g2;
25681
- n2 = this.getPreviewFields(k2), Object.assign(s2, this.getMediaSettings(k2));
25679
+ let P8 = g2;
25680
+ n2 = this.getPreviewFields(P8), Object.assign(s2, this.getMediaSettings(P8));
25682
25681
  }
25683
25682
  }
25684
25683
  let u2 = this.sdk.getRecordingState(), p2 = this.sdk.getRTMPState(), h2 = this.sdk.getHLSState(), T = this.sdk.getTranscriptionState();
25685
25684
  this.setState((g2) => {
25686
- var k2;
25685
+ var P8;
25687
25686
  g2.room.peers = i2;
25688
- let f2 = g2.peers, P8 = g2.tracks;
25689
- Ea(f2, t2), ba(P8, r2), Object.assign(g2.settings, s2), g2.room.isConnected && Object.assign(g2.connectionQualities, o2), (k2 = g2.preview) != null && k2.localPeer && (n2 != null && n2.localPeer) ? Object.assign(g2.preview, n2) : g2.preview = n2, Object.assign(g2.roles, _2.convertRoles(this.sdk.getRoles())), Object.assign(g2.playlist, _2.convertPlaylist(this.sdk.getPlaylistManager())), Object.assign(g2.room, _2.convertRecordingStreamingState(u2, p2, h2, T)), Object.assign(g2.templateAppData, this.sdk.getTemplateAppData());
25687
+ let v2 = g2.peers, E2 = g2.tracks;
25688
+ ba(v2, t2), Ra(E2, r2), Object.assign(g2.settings, s2), g2.room.isConnected && Object.assign(g2.connectionQualities, o2), (P8 = g2.preview) != null && P8.localPeer && (n2 != null && n2.localPeer) ? Object.assign(g2.preview, n2) : g2.preview = n2, Object.assign(g2.roles, _2.convertRoles(this.sdk.getRoles())), Object.assign(g2.playlist, _2.convertPlaylist(this.sdk.getPlaylistManager())), Object.assign(g2.room, _2.convertRecordingStreamingState(u2, p2, h2, T)), Object.assign(g2.templateAppData, this.sdk.getTemplateAppData());
25690
25689
  }, e), b2.timeEnd(`store-sync-${e}`);
25691
25690
  }
25692
25691
  onPreview(e) {
@@ -25697,7 +25696,7 @@ var init_dist = __esm({
25697
25696
  }
25698
25697
  onJoin(e) {
25699
25698
  let t2 = this.sdk.getPlaylistManager();
25700
- this.audioPlaylist = new Dt(t2, "audio", this.syncPlaylistState.bind(this), this.store), this.videoPlaylist = new Dt(t2, "video", this.syncRoomState.bind(this), this.store), this.syncRoomState("joinSync"), this.setState((i2) => {
25699
+ this.audioPlaylist = new Lt(t2, "audio", this.syncPlaylistState.bind(this), this.store), this.videoPlaylist = new Lt(t2, "video", this.syncRoomState.bind(this), this.store), this.syncRoomState("joinSync"), this.setState((i2) => {
25701
25700
  var r2;
25702
25701
  Object.assign(i2.room, _2.convertRoom(e, (r2 = this.sdk.getLocalPeer()) == null ? void 0 : r2.peerId)), i2.room.isConnected = true, i2.room.roomState = "Connected";
25703
25702
  }, "joined"), t2.onProgress(this.setProgress), t2.onNewTrackStart((i2) => {
@@ -25739,13 +25738,13 @@ var init_dist = __esm({
25739
25738
  if (e === 1)
25740
25739
  this.hmsNotifications.sendTrackUpdate(e, t2.trackId), this.handleTrackRemove(t2, i2);
25741
25740
  else if ([0, 1].includes(e)) {
25742
- let r2 = Ct[e];
25741
+ let r2 = Ht[e];
25743
25742
  this.syncRoomState(r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
25744
25743
  } else {
25745
- let r2 = Ct[e] || "trackUpdate", s2 = _2.convertTrack(t2);
25744
+ let r2 = Ht[e] || "trackUpdate", s2 = _2.convertTrack(t2);
25746
25745
  this.setState((o2) => {
25747
25746
  let n2 = o2.tracks[s2.id];
25748
- Ke(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
25747
+ $e(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
25749
25748
  }, r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
25750
25749
  }
25751
25750
  }
@@ -25782,7 +25781,7 @@ var init_dist = __esm({
25782
25781
  }
25783
25782
  onChangeTrackStateRequest(e) {
25784
25783
  var s2;
25785
- let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(vi(i2));
25784
+ let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(fi(i2));
25786
25785
  if (!r2)
25787
25786
  return this.logPossibleInconsistency(`Not found track for which track state change was requested, ${e.track}`);
25788
25787
  e.enabled || this.syncRoomState("changeTrackStateRequest"), this.hmsNotifications.sendChangeTrackStateRequest({ requestedBy: t2 || void 0, track: r2, enabled: e.enabled });
@@ -25815,7 +25814,7 @@ var init_dist = __esm({
25815
25814
  i2.room.roomState = "Failed", i2.errors.push(t2);
25816
25815
  }, "errorTerminal")) : this.store.getState().errors.length < 50 && this.setState((r2) => {
25817
25816
  r2.errors.push(t2);
25818
- }, "error"), this.syncRoomState("errorSync"), this.hmsNotifications.sendError(t2), b2.e("received error from sdk", t2 instanceof v2 ? `${t2}` : t2);
25817
+ }, "error"), this.syncRoomState("errorSync"), this.hmsNotifications.sendError(t2), b2.e("received error from sdk", t2 instanceof f2 ? `${t2}` : t2);
25819
25818
  }
25820
25819
  handleTrackRemove(e, t2) {
25821
25820
  this.setState((i2) => {
@@ -25852,7 +25851,7 @@ var init_dist = __esm({
25852
25851
  }
25853
25852
  getMediaSettings(e) {
25854
25853
  var s2;
25855
- let t2 = this.store.getState(Qs), i2 = e.audioTrack, r2 = e.videoTrack;
25854
+ let t2 = this.store.getState(zs), i2 = e.audioTrack, r2 = e.videoTrack;
25856
25855
  return { audioInputDeviceId: (i2 == null ? void 0 : i2.settings.deviceId) || t2.audioInputDeviceId, videoInputDeviceId: (r2 == null ? void 0 : r2.settings.deviceId) || t2.videoInputDeviceId, audioOutputDeviceId: (s2 = this.sdk.getAudioOutput().getDevice()) == null ? void 0 : s2.deviceId };
25857
25856
  }
25858
25857
  getPreviewFields(e) {
@@ -25875,7 +25874,7 @@ var init_dist = __esm({
25875
25874
  let t2 = this.store.getState(te);
25876
25875
  if ((t2 == null ? void 0 : t2.videoTrack) !== e)
25877
25876
  return false;
25878
- let i2 = this.store.getState(Ys), r2 = this.store.getState(Br);
25877
+ let i2 = this.store.getState(Xs), r2 = this.store.getState(Br);
25879
25878
  return i2 && !r2;
25880
25879
  }
25881
25880
  logPossibleInconsistency(e) {
@@ -25935,13 +25934,13 @@ var init_dist = __esm({
25935
25934
  this.syncRoomState("roleUpdate");
25936
25935
  }
25937
25936
  getStoreLocalTrackIDfromSDKTrack(e) {
25938
- return this.store.getState(zs).find((i2) => {
25937
+ return this.store.getState(Ys).find((i2) => {
25939
25938
  var r2;
25940
25939
  return ((r2 = this.getTrackById(i2)) == null ? void 0 : r2.trackId) === e.trackId;
25941
25940
  });
25942
25941
  }
25943
25942
  updateMidCallPreviewRoomState(e, t2) {
25944
- t2.isLocal && e === 8 && this.store.getState(Xs) && this.setState((i2) => {
25943
+ t2.isLocal && e === 8 && this.store.getState(Zs) && this.setState((i2) => {
25945
25944
  i2.room.roomState = "Connected";
25946
25945
  }, "midCallPreviewCompleted");
25947
25946
  }
@@ -25954,8 +25953,8 @@ var init_dist = __esm({
25954
25953
  }, t2);
25955
25954
  }
25956
25955
  };
25957
- wi = (a11) => O2 ? `${a11} ${document.title}` : a11;
25958
- _i = class {
25956
+ Di = (a11) => O2 ? `${a11} ${document.title}` : a11;
25957
+ wi = class {
25959
25958
  constructor(e, t2) {
25960
25959
  this.eventBus = e;
25961
25960
  this.listener = t2;
@@ -25977,8 +25976,8 @@ var init_dist = __esm({
25977
25976
  try {
25978
25977
  let g2 = false;
25979
25978
  for (; !g2; ) {
25980
- let { value: f2, done: P8 } = yield h2.read();
25981
- g2 = P8, f2 && (n2 += f2.byteLength, this.sendScore({ scoreMap: r2, downloadedSize: n2, startTime: o2 }));
25979
+ let { value: v2, done: E2 } = yield h2.read();
25980
+ g2 = E2, v2 && (n2 += v2.byteLength, this.sendScore({ scoreMap: r2, downloadedSize: n2, startTime: o2 }));
25982
25981
  }
25983
25982
  } catch (g2) {
25984
25983
  g2.name !== "AbortError" && d2.d(this.TAG, g2);
@@ -26010,7 +26009,7 @@ var init_dist = __esm({
26010
26009
  e !== this.score && (this.score = e, (i2 = (t2 = this.listener) == null ? void 0 : t2.onNetworkQuality) == null || i2.call(t2, e));
26011
26010
  }
26012
26011
  };
26013
- _t = class {
26012
+ wt = class {
26014
26013
  constructor(e, t2, i2, r2, s2, o2) {
26015
26014
  this.store = e;
26016
26015
  this.transport = t2;
@@ -26024,8 +26023,8 @@ var init_dist = __esm({
26024
26023
  r3 && (yield this.diffRolesAndPublishTracks({ oldRole: e2, newRole: t3 }), (s3 = this.listener) == null || s3.onPeerUpdate(8, r3));
26025
26024
  });
26026
26025
  this.diffRolesAndPublishTracks = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
26027
- var g2, f2, P8, k2, w2, xe;
26028
- let r3 = new Set(e2.publishParams.allowed), s3 = new Set(t3.publishParams.allowed), o3 = this.removeTrack(r3, s3, "video"), n2 = this.removeTrack(r3, s3, "audio"), l2 = this.removeTrack(r3, s3, "screen"), u2 = this.hasSimulcastDifference((g2 = e2.publishParams.simulcast) == null ? void 0 : g2.video, (f2 = t3.publishParams.simulcast) == null ? void 0 : f2.video), p2 = this.hasSimulcastDifference((P8 = e2.publishParams.simulcast) == null ? void 0 : P8.screen, (k2 = t3.publishParams.simulcast) == null ? void 0 : k2.screen), h2 = (xe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : xe.enabled;
26026
+ var g2, v2, E2, P8, w2, Oe;
26027
+ let r3 = new Set(e2.publishParams.allowed), s3 = new Set(t3.publishParams.allowed), o3 = this.removeTrack(r3, s3, "video"), n2 = this.removeTrack(r3, s3, "audio"), l2 = this.removeTrack(r3, s3, "screen"), u2 = this.hasSimulcastDifference((g2 = e2.publishParams.simulcast) == null ? void 0 : g2.video, (v2 = t3.publishParams.simulcast) == null ? void 0 : v2.video), p2 = this.hasSimulcastDifference((E2 = e2.publishParams.simulcast) == null ? void 0 : E2.screen, (P8 = t3.publishParams.simulcast) == null ? void 0 : P8.screen), h2 = (Oe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : Oe.enabled;
26029
26028
  yield this.removeAudioTrack(n2), yield this.removeVideoTracks(o3 || u2), yield this.removeScreenTracks(l2 || p2);
26030
26029
  let T = this.getSettings();
26031
26030
  u2 && (T.isVideoMuted = !h2), yield this.publish(T), yield this.syncDevices(T, t3);
@@ -26105,7 +26104,7 @@ var init_dist = __esm({
26105
26104
  this.addEventToStorage(e);
26106
26105
  return;
26107
26106
  }
26108
- let t2 = { event: e.name, payload: e.properties, event_id: String(e.timestamp), peer: e.metadata.peer, timestamp: e.timestamp, device_id: e.device_id, cluster: { websocket_url: this.websocketURL } }, i2 = this.env === "prod" ? Us : Bs;
26107
+ let t2 = { event: e.name, payload: e.properties, event_id: String(e.timestamp), peer: e.metadata.peer, timestamp: e.timestamp, device_id: e.device_id, cluster: { websocket_url: this.websocketURL } }, i2 = this.env === "prod" ? Bs : Vs;
26109
26108
  fetch(i2, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${e.metadata.token}`, user_agent_v2: e.metadata.userAgent }, body: JSON.stringify(t2) }).then((r2) => {
26110
26109
  if (r2.status === 401) {
26111
26110
  this.removeFromStorage(e);
@@ -26132,12 +26131,12 @@ var init_dist = __esm({
26132
26131
  }
26133
26132
  };
26134
26133
  Pe = new Jr();
26135
- Nt = class {
26134
+ _t = class {
26136
26135
  constructor(e) {
26137
26136
  this.type = e.type, this.source = e.source || "regular", this.description = "", e instanceof Re ? (this.mute = !e.enabled, this.track_id = e.publishedTrackId, this.stream_id = e.stream.id) : (this.mute = e.mute, this.track_id = e.track_id, this.stream_id = e.stream_id);
26138
26137
  }
26139
26138
  };
26140
- Ot = class {
26139
+ Nt = class {
26141
26140
  constructor() {
26142
26141
  this.TAG = "[Store]:";
26143
26142
  this.knownRoles = {};
@@ -26148,7 +26147,7 @@ var init_dist = __esm({
26148
26147
  this.roleDetailsArrived = false;
26149
26148
  this.env = "prod";
26150
26149
  this.simulcastEnabled = false;
26151
- this.userAgent = ft(this.env);
26150
+ this.userAgent = Tt(this.env);
26152
26151
  this.polls = /* @__PURE__ */ new Map();
26153
26152
  this.whiteboards = /* @__PURE__ */ new Map();
26154
26153
  this.addPermissionToRole = (e, t2, i2, r2) => {
@@ -26268,7 +26267,7 @@ var init_dist = __esm({
26268
26267
  return this.userAgent;
26269
26268
  }
26270
26269
  createAndSetUserAgent(e) {
26271
- this.userAgent = ft(this.env, e);
26270
+ this.userAgent = Tt(this.env, e);
26272
26271
  }
26273
26272
  setRoom(e) {
26274
26273
  this.room = e;
@@ -26340,7 +26339,7 @@ var init_dist = __esm({
26340
26339
  return [];
26341
26340
  let i2 = this.getPolicyForRole(e.role.name).publishParams, r2, s2, o2;
26342
26341
  return t2 === "regular" ? (r2 = (n2 = i2.simulcast) == null ? void 0 : n2.video, s2 = i2.video.width, o2 = i2.video.height) : t2 === "screen" && (r2 = (l2 = i2.simulcast) == null ? void 0 : l2.screen, s2 = i2.screen.width, o2 = i2.screen.height), ((u2 = r2 == null ? void 0 : r2.layers) == null ? void 0 : u2.map((p2) => {
26343
- let h2 = Ve[p2.rid], T = { width: Math.floor(s2 / p2.scaleResolutionDownBy), height: Math.floor(o2 / p2.scaleResolutionDownBy) };
26342
+ let h2 = Be[p2.rid], T = { width: Math.floor(s2 / p2.scaleResolutionDownBy), height: Math.floor(o2 / p2.scaleResolutionDownBy) };
26344
26343
  return { layer: h2, resolution: T };
26345
26344
  })) || [];
26346
26345
  }
@@ -26408,7 +26407,7 @@ var init_dist = __esm({
26408
26407
  t2.startsWith("prod") ? i2 = "prod" : t2.startsWith("qa") ? i2 = "qa" : t2.startsWith("dev") && (i2 = "dev"), this.env = i2, Pe.setEnv(i2);
26409
26408
  }
26410
26409
  };
26411
- Ni = class {
26410
+ _i = class {
26412
26411
  constructor() {
26413
26412
  this.TAG = "[WakeLockManager]";
26414
26413
  this.wakeLock = null;
@@ -26442,7 +26441,7 @@ var init_dist = __esm({
26442
26441
  });
26443
26442
  }
26444
26443
  };
26445
- Oi = class {
26444
+ Ni = class {
26446
26445
  constructor(e) {
26447
26446
  this.store = e;
26448
26447
  this.bufferSize = 100;
@@ -26484,8 +26483,8 @@ var init_dist = __esm({
26484
26483
  e.metadata.token = (r2 = this.store.getConfig()) == null ? void 0 : r2.authToken, e.metadata.peer = { session_id: t2 == null ? void 0 : t2.sessionId, room_id: t2 == null ? void 0 : t2.id, room_name: t2 == null ? void 0 : t2.name, template_id: t2 == null ? void 0 : t2.templateId, joined_at: (s2 = t2 == null ? void 0 : t2.joinedAt) == null ? void 0 : s2.getTime(), session_started_at: (o2 = t2 == null ? void 0 : t2.startedAt) == null ? void 0 : o2.getTime(), role: (n2 = i2 == null ? void 0 : i2.role) == null ? void 0 : n2.name, user_name: i2 == null ? void 0 : i2.name, user_data: i2 == null ? void 0 : i2.metadata, peer_id: i2 == null ? void 0 : i2.peerId }, Pe.sendEvent(e);
26485
26484
  }
26486
26485
  };
26487
- wa = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
26488
- xt = class {
26486
+ _a7 = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
26487
+ Ot = class {
26489
26488
  constructor(e, t2, i2) {
26490
26489
  this.store = e;
26491
26490
  this.deviceManager = t2;
@@ -26493,7 +26492,7 @@ var init_dist = __esm({
26493
26492
  this.autoPausedTracks = /* @__PURE__ */ new Set();
26494
26493
  this.TAG = "[AudioSinkManager]:";
26495
26494
  this.volume = 100;
26496
- this.state = m({}, wa);
26495
+ this.state = m({}, _a7);
26497
26496
  this.timer = null;
26498
26497
  this.autoUnpauseTimer = null;
26499
26498
  this.earpieceSelected = false;
@@ -26600,7 +26599,7 @@ var init_dist = __esm({
26600
26599
  }
26601
26600
  cleanup() {
26602
26601
  var e;
26603
- (e = this.audioSink) == null || e.remove(), this.audioSink = void 0, this.timer && (clearInterval(this.timer), this.timer = null), this.autoUnpauseTimer && (clearInterval(this.autoUnpauseTimer), this.autoUnpauseTimer = null), this.eventBus.audioTrackAdded.unsubscribe(this.handleTrackAdd), this.eventBus.audioTrackRemoved.unsubscribe(this.handleTrackRemove), this.eventBus.audioTrackUpdate.unsubscribe(this.handleTrackUpdate), this.eventBus.deviceChange.unsubscribe(this.handleAudioDeviceChange), this.autoPausedTracks = /* @__PURE__ */ new Set(), this.state = m({}, wa);
26602
+ (e = this.audioSink) == null || e.remove(), this.audioSink = void 0, this.timer && (clearInterval(this.timer), this.timer = null), this.autoUnpauseTimer && (clearInterval(this.autoUnpauseTimer), this.autoUnpauseTimer = null), this.eventBus.audioTrackAdded.unsubscribe(this.handleTrackAdd), this.eventBus.audioTrackRemoved.unsubscribe(this.handleTrackRemove), this.eventBus.audioTrackUpdate.unsubscribe(this.handleTrackUpdate), this.eventBus.deviceChange.unsubscribe(this.handleAudioDeviceChange), this.autoPausedTracks = /* @__PURE__ */ new Set(), this.state = m({}, _a7);
26604
26603
  }
26605
26604
  playAudioFor(e) {
26606
26605
  return c2(this, null, function* () {
@@ -26623,7 +26622,7 @@ var init_dist = __esm({
26623
26622
  });
26624
26623
  }
26625
26624
  };
26626
- xi = class {
26625
+ Oi = class {
26627
26626
  constructor(e) {
26628
26627
  this.eventBus = e;
26629
26628
  this.pluginUsage = /* @__PURE__ */ new Map();
@@ -26662,7 +26661,7 @@ var init_dist = __esm({
26662
26661
  this.eventBus.analytics.subscribe((t2) => this.updatePluginUsageData(t2));
26663
26662
  }
26664
26663
  };
26665
- Ut = class {
26664
+ xt = class {
26666
26665
  constructor(e, t2) {
26667
26666
  this.store = e;
26668
26667
  this.eventBus = t2;
@@ -26700,7 +26699,7 @@ var init_dist = __esm({
26700
26699
  let e2 = this.store.getLocalPeer();
26701
26700
  !((s2 = (r2 = this.store.getConfig()) == null ? void 0 : r2.settings) == null ? void 0 : s2.videoDeviceId) && (e2 != null && e2.videoTrack) && (yield e2.videoTrack.setSettings({ deviceId: (o2 = this.videoInput[0]) == null ? void 0 : o2.deviceId }, true)), !((l2 = (n2 = this.store.getConfig()) == null ? void 0 : n2.settings) == null ? void 0 : l2.audioInputDeviceId) && (e2 != null && e2.audioTrack) && (yield e2.audioTrack.setSettings({ deviceId: (u2 = this.audioInput[0]) == null ? void 0 : u2.deviceId }, true));
26702
26701
  });
26703
- this.handleDeviceChange = oi(() => c2(this, null, function* () {
26702
+ this.handleDeviceChange = ai(() => c2(this, null, function* () {
26704
26703
  yield this.enumerateDevices(), this.logDevices("After Device Change");
26705
26704
  let e2 = this.store.getLocalPeer();
26706
26705
  yield this.setOutputDevice(true), yield this.handleAudioInputDeviceChange(e2 == null ? void 0 : e2.audioTrack), yield this.handleVideoInputDeviceChange(e2 == null ? void 0 : e2.videoTrack), this.eventBus.analytics.publish(y2.deviceChange({ selection: this.getCurrentSelection(), type: "change", devices: this.getDevices() }));
@@ -26806,7 +26805,7 @@ var init_dist = __esm({
26806
26805
  d2.d(this.TAG, e, JSON.stringify({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput], selected: this.getCurrentSelection() }, null, 4));
26807
26806
  }
26808
26807
  };
26809
- Ui = class {
26808
+ xi = class {
26810
26809
  constructor(e, t2) {
26811
26810
  this.deviceManager = e;
26812
26811
  this.audioSinkManager = t2;
@@ -26853,7 +26852,7 @@ var init_dist = __esm({
26853
26852
  };
26854
26853
  }
26855
26854
  };
26856
- Bt = class {
26855
+ Ut = class {
26857
26856
  constructor() {
26858
26857
  this.eventEmitter = new import_eventemitter23.EventEmitter2();
26859
26858
  this.analytics = new V(G2.ANALYTICS, this.eventEmitter);
@@ -26875,7 +26874,7 @@ var init_dist = __esm({
26875
26874
  this.leave = new V(G2.LEAVE, this.eventEmitter);
26876
26875
  }
26877
26876
  };
26878
- Bi = class {
26877
+ Ui = class {
26879
26878
  constructor(e, t2, i2) {
26880
26879
  this.store = e;
26881
26880
  this.listener = t2;
@@ -26893,7 +26892,7 @@ var init_dist = __esm({
26893
26892
  (n2 = this.listener) == null || n2.onPeerUpdate(5, null);
26894
26893
  }
26895
26894
  };
26896
- Vi = class {
26895
+ Bi = class {
26897
26896
  constructor(e) {
26898
26897
  this.listener = e;
26899
26898
  this.TAG = "[BroadcastManager]";
@@ -26906,7 +26905,7 @@ var init_dist = __esm({
26906
26905
  d2.d(this.TAG, `Received Message from sender=${(t2 = e == null ? void 0 : e.peer) == null ? void 0 : t2.peer_id}: ${e}`), (i2 = this.listener) == null || i2.onMessageReceived(e);
26907
26906
  }
26908
26907
  };
26909
- Fi = class {
26908
+ Vi = class {
26910
26909
  constructor(e, t2) {
26911
26910
  this.store = e;
26912
26911
  this.listener = t2;
@@ -26920,7 +26919,7 @@ var init_dist = __esm({
26920
26919
  (r2 = this.listener) == null || r2.onConnectionQualityUpdate(i2);
26921
26920
  }
26922
26921
  };
26923
- ct = class {
26922
+ nt = class {
26924
26923
  constructor(e, t2, i2) {
26925
26924
  this.store = e;
26926
26925
  this.eventBus = t2;
@@ -27052,7 +27051,7 @@ var init_dist = __esm({
27052
27051
  return t2.mute !== i2.mute ? (r2 = i2.mute ? 2 : 3, e.type === "audio" && this.eventBus.audioTrackUpdate.publish({ track: e, enabled: !i2.mute })) : t2.description !== i2.description && (r2 = 4), r2;
27053
27052
  }
27054
27053
  };
27055
- Gi = class extends ct {
27054
+ Fi = class extends nt {
27056
27055
  constructor(t2, i2, r2, s2) {
27057
27056
  super(t2, i2, s2);
27058
27057
  this.transport = r2;
@@ -27092,7 +27091,7 @@ var init_dist = __esm({
27092
27091
  return r2 && ((l2 = (o2 = (s2 = i2 == null ? void 0 : i2.role) == null ? void 0 : s2.subscribeParams) == null ? void 0 : o2.subscribeToRoles) == null ? void 0 : l2.includes((n2 = r2.role) == null ? void 0 : n2.name));
27093
27092
  }
27094
27093
  };
27095
- Wi = class {
27094
+ Gi = class {
27096
27095
  constructor(e, t2, i2, r2) {
27097
27096
  this.store = e;
27098
27097
  this.peerManager = t2;
@@ -27159,7 +27158,7 @@ var init_dist = __esm({
27159
27158
  }
27160
27159
  };
27161
27160
  C = (a11) => a11 ? new Date(a11) : void 0;
27162
- $i = class {
27161
+ Wi = class {
27163
27162
  constructor(e, t2, i2) {
27164
27163
  this.store = e;
27165
27164
  this.trackManager = t2;
@@ -27258,7 +27257,7 @@ var init_dist = __esm({
27258
27257
  });
27259
27258
  }
27260
27259
  };
27261
- Ki = class {
27260
+ $i = class {
27262
27261
  constructor(e, t2) {
27263
27262
  this.store = e;
27264
27263
  this.eventBus = t2;
@@ -27282,11 +27281,11 @@ var init_dist = __esm({
27282
27281
  }
27283
27282
  }
27284
27283
  };
27285
- Vt = (a11, e, t2) => {
27286
- let i2 = t2 === "qa" ? Ws : Gs, r2 = new URL(i2);
27284
+ Bt = (a11, e, t2) => {
27285
+ let i2 = t2 === "qa" ? $s : Ws, r2 = new URL(i2);
27287
27286
  return r2.searchParams.set("endpoint", `https://${e}`), r2.searchParams.set("token", a11), r2.toString();
27288
27287
  };
27289
- qi = class {
27288
+ Ki = class {
27290
27289
  constructor(e, t2, i2) {
27291
27290
  this.transport = e;
27292
27291
  this.store = t2;
@@ -27304,7 +27303,7 @@ var init_dist = __esm({
27304
27303
  let t2 = this.store.getWhiteboard(e == null ? void 0 : e.id), i2 = t2 == null ? void 0 : t2.id;
27305
27304
  if (t2 || (i2 = (yield this.transport.signal.createWhiteboard(this.getCreateOptionsWithDefaults(e))).id), !i2)
27306
27305
  throw new Error(`Whiteboard ID: ${i2} not found`);
27307
- let r2 = yield this.transport.signal.getWhiteboard({ id: i2 }), s2 = M2(m({}, t2), { title: e == null ? void 0 : e.title, attributes: e == null ? void 0 : e.attributes, id: r2.id, url: Vt(r2.token, r2.addr, this.store.getEnv()), token: r2.token, addr: r2.addr, owner: r2.owner, permissions: r2.permissions || [], open: true });
27306
+ let r2 = yield this.transport.signal.getWhiteboard({ id: i2 }), s2 = M2(m({}, t2), { title: e == null ? void 0 : e.title, attributes: e == null ? void 0 : e.attributes, id: r2.id, url: Bt(r2.token, r2.addr, this.store.getEnv()), token: r2.token, addr: r2.addr, owner: r2.owner, permissions: r2.permissions || [], open: true });
27308
27307
  this.store.setWhiteboard(s2), (o2 = this.listener) == null || o2.onWhiteboardUpdate(s2);
27309
27308
  });
27310
27309
  }
@@ -27329,7 +27328,7 @@ var init_dist = __esm({
27329
27328
  let e = this.store.getWhiteboards();
27330
27329
  for (let s2 of e.values())
27331
27330
  if (s2.url) {
27332
- let o2 = yield this.transport.signal.getWhiteboard({ id: s2.id }), n2 = this.store.getLocalPeer(), u2 = (n2 == null ? void 0 : n2.customerUserId) === o2.owner ? (i2 = (t2 = n2.role) == null ? void 0 : t2.permissions.whiteboard) == null ? void 0 : i2.includes("admin") : o2.permissions.length > 0, p2 = M2(m({}, s2), { id: o2.id, url: Vt(o2.token, o2.addr, this.store.getEnv()), token: o2.token, addr: o2.addr, owner: o2.owner, permissions: o2.permissions, open: u2 });
27331
+ let o2 = yield this.transport.signal.getWhiteboard({ id: s2.id }), n2 = this.store.getLocalPeer(), u2 = (n2 == null ? void 0 : n2.customerUserId) === o2.owner ? (i2 = (t2 = n2.role) == null ? void 0 : t2.permissions.whiteboard) == null ? void 0 : i2.includes("admin") : o2.permissions.length > 0, p2 = M2(m({}, s2), { id: o2.id, url: Bt(o2.token, o2.addr, this.store.getEnv()), token: o2.token, addr: o2.addr, owner: o2.owner, permissions: o2.permissions, open: u2 });
27333
27332
  this.store.setWhiteboard(p2), (r2 = this.listener) == null || r2.onWhiteboardUpdate(p2);
27334
27333
  }
27335
27334
  });
@@ -27343,12 +27342,12 @@ var init_dist = __esm({
27343
27342
  }), { title: (e == null ? void 0 : e.title) || `${(o2 = this.store.getRoom()) == null ? void 0 : o2.id} Whiteboard`, reader: (e == null ? void 0 : e.reader) || i2, writer: (e == null ? void 0 : e.writer) || r2, admin: (e == null ? void 0 : e.admin) || s2 };
27344
27343
  }
27345
27344
  };
27346
- Ft = class {
27345
+ Vt = class {
27347
27346
  constructor(e, t2, i2) {
27348
27347
  this.transport = e;
27349
27348
  this.store = t2;
27350
27349
  this.listener = i2;
27351
- this.whiteboard = new qi(e, t2, i2);
27350
+ this.whiteboard = new Ki(e, t2, i2);
27352
27351
  }
27353
27352
  setListener(e) {
27354
27353
  this.listener = e, this.whiteboard.setListener(e);
@@ -27358,7 +27357,7 @@ var init_dist = __esm({
27358
27357
  var o2, n2;
27359
27358
  let t2 = { customerID: "userid", peerID: "peerid", userName: "username" }, { poll_id: i2 } = yield this.transport.signal.setPollInfo(M2(m({}, e), { mode: e.mode ? t2[e.mode] : void 0, poll_id: e.id, vote: e.rolesThatCanVote, responses: e.rolesThatCanViewResponses }));
27360
27359
  e.id || (e.id = i2), Array.isArray(e.questions) && (yield this.addQuestionsToPoll(e.id, e.questions));
27361
- let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 = ji(M2(m({}, e), { poll_id: e.id, state: "created", created_by: (o2 = this.store.getLocalPeer()) == null ? void 0 : o2.peerId }));
27360
+ let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 = qi(M2(m({}, e), { poll_id: e.id, state: "created", created_by: (o2 = this.store.getLocalPeer()) == null ? void 0 : o2.peerId }));
27362
27361
  s2.questions = r2.questions.map(({ question: l2, options: u2, answer: p2 }) => M2(m({}, l2), { options: u2, answer: p2 })), (n2 = this.listener) == null || n2.onPollsUpdate(0, [s2]);
27363
27362
  });
27364
27363
  }
@@ -27411,8 +27410,8 @@ var init_dist = __esm({
27411
27410
  var h2, T;
27412
27411
  let p2 = (h2 = e == null ? void 0 : e.questions) == null ? void 0 : h2.find((g2) => g2.index === n2.question);
27413
27412
  if (p2) {
27414
- let g2 = { id: n2.response_id, questionIndex: n2.question, option: n2.option, options: n2.options, text: n2.text, responseFinal: u2, peer: { peerid: l2.peerid, userHash: l2.hash, userid: l2.userid, username: l2.username }, skipped: n2.skipped, type: n2.type, update: n2.update }, f2 = p2.responses && !t2 ? [...p2.responses] : [];
27415
- (T = r2.questions) != null && T[n2.question - 1] && (r2.questions[n2.question - 1].responses = [...f2, g2]);
27413
+ let g2 = { id: n2.response_id, questionIndex: n2.question, option: n2.option, options: n2.options, text: n2.text, responseFinal: u2, peer: { peerid: l2.peerid, userHash: l2.hash, userid: l2.userid, username: l2.username }, skipped: n2.skipped, type: n2.type, update: n2.update }, v2 = p2.responses && !t2 ? [...p2.responses] : [];
27414
+ (T = r2.questions) != null && T[n2.question - 1] && (r2.questions[n2.question - 1].responses = [...v2, g2]);
27416
27415
  }
27417
27416
  }), this.store.setPoll(r2), (o2 = this.listener) == null || o2.onPollsUpdate(4, [r2]);
27418
27417
  });
@@ -27426,10 +27425,10 @@ var init_dist = __esm({
27426
27425
  r2 = [...l2.polls, ...r2, ...u2.polls];
27427
27426
  }
27428
27427
  for (let l2 of r2) {
27429
- let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 = ji(l2), h2 = this.store.getPoll(l2.poll_id);
27430
- p2.questions = u2.questions.map(({ question: T, options: g2, answer: f2 }, P8) => {
27431
- var k2, w2;
27432
- return M2(m({}, T), { options: g2, answer: f2, responses: (w2 = (k2 = h2 == null ? void 0 : h2.questions) == null ? void 0 : k2[P8]) == null ? void 0 : w2.responses });
27428
+ let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 = qi(l2), h2 = this.store.getPoll(l2.poll_id);
27429
+ p2.questions = u2.questions.map(({ question: T, options: g2, answer: v2 }, E2) => {
27430
+ var P8, w2;
27431
+ return M2(m({}, T), { options: g2, answer: v2, responses: (w2 = (P8 = h2 == null ? void 0 : h2.questions) == null ? void 0 : P8[E2]) == null ? void 0 : w2.responses });
27433
27432
  }), t2.push(p2), this.store.setPoll(p2);
27434
27433
  }
27435
27434
  return (n2 = this.listener) == null || n2.onPollsUpdate(3, t2), t2;
@@ -27452,11 +27451,11 @@ var init_dist = __esm({
27452
27451
  return i2;
27453
27452
  }
27454
27453
  };
27455
- ji = (a11) => {
27454
+ qi = (a11) => {
27456
27455
  let e = { userid: "customerID", peerid: "peerID", username: "userName" };
27457
27456
  return { id: a11.poll_id, title: a11.title, startedBy: a11.started_by, createdBy: a11.created_by, anonymous: a11.anonymous, type: a11.type, duration: a11.duration, locked: a11.locked, mode: a11.mode ? e[a11.mode] : void 0, visibility: a11.visibility, rolesThatCanVote: a11.vote || [], rolesThatCanViewResponses: a11.responses || [], state: a11.state, stoppedBy: a11.stopped_by, startedAt: C(a11.started_at), stoppedAt: C(a11.stopped_at), createdAt: C(a11.created_at) };
27458
27457
  };
27459
- Ji = class {
27458
+ ji = class {
27460
27459
  constructor(e, t2, i2) {
27461
27460
  this.store = e;
27462
27461
  this.transport = t2;
@@ -27489,7 +27488,7 @@ var init_dist = __esm({
27489
27488
  (i2 = this.listener) == null || i2.onPollsUpdate(1, [o2]);
27490
27489
  return;
27491
27490
  }
27492
- let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = ji(s2);
27491
+ let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = qi(s2);
27493
27492
  l2.questions = n2.questions.map(({ question: u2, options: p2, answer: h2 }) => M2(m({}, u2), { options: p2, answer: h2 })), yield this.updatePollResponses(l2, true), t2.push(l2), this.store.setPoll(l2);
27494
27493
  }
27495
27494
  (r2 = this.listener) == null || r2.onPollsUpdate(1, t2);
@@ -27549,7 +27548,7 @@ var init_dist = __esm({
27549
27548
  });
27550
27549
  }
27551
27550
  };
27552
- Qi = class {
27551
+ Ji = class {
27553
27552
  constructor(e, t2) {
27554
27553
  this.store = e;
27555
27554
  this.listener = t2;
@@ -27610,7 +27609,7 @@ var init_dist = __esm({
27610
27609
  return e && (s2 = s2.filter((o2) => o2.type === e)), t2 && (s2 = s2.filter((o2) => o2.source === t2)), s2.filter((o2) => o2.enabled !== i2);
27611
27610
  }
27612
27611
  };
27613
- zi = class {
27612
+ Qi = class {
27614
27613
  constructor(e, t2) {
27615
27614
  this.store = e;
27616
27615
  this.listener = t2;
@@ -27763,11 +27762,11 @@ var init_dist = __esm({
27763
27762
  toSdkError(e) {
27764
27763
  if (!(e != null && e.code))
27765
27764
  return;
27766
- let t2 = e.message || "error in streaming/recording", i2 = new v2(e.code, "ServerErrors", "NONE", t2, t2);
27765
+ let t2 = e.message || "error in streaming/recording", i2 = new f2(e.code, "ServerErrors", "NONE", t2, t2);
27767
27766
  return d2.e(this.TAG, "error in streaming/recording", i2), i2;
27768
27767
  }
27769
27768
  };
27770
- Yi = class {
27769
+ zi = class {
27771
27770
  constructor(e, t2) {
27772
27771
  this.store = e;
27773
27772
  this.listener = t2;
@@ -27781,7 +27780,7 @@ var init_dist = __esm({
27781
27780
  (i2 = this.listener) == null || i2.onSessionStoreUpdate(t2);
27782
27781
  }
27783
27782
  };
27784
- Xi = class {
27783
+ Yi = class {
27785
27784
  constructor(e, t2, i2) {
27786
27785
  this.store = e;
27787
27786
  this.transport = t2;
@@ -27806,13 +27805,13 @@ var init_dist = __esm({
27806
27805
  o2.url = i2 == null ? void 0 : i2.url, o2.token = i2 == null ? void 0 : i2.token, o2.addr = i2 == null ? void 0 : i2.addr, o2.permissions = i2 == null ? void 0 : i2.permissions;
27807
27806
  else {
27808
27807
  let l2 = yield this.transport.signal.getWhiteboard({ id: e.id });
27809
- o2.url = Vt(l2.token, l2.addr, this.store.getEnv()), o2.token = l2.token, o2.addr = l2.addr, o2.permissions = l2.permissions, o2.open = l2.permissions.length > 0;
27808
+ o2.url = Bt(l2.token, l2.addr, this.store.getEnv()), o2.token = l2.token, o2.addr = l2.addr, o2.permissions = l2.permissions, o2.open = l2.permissions.length > 0;
27810
27809
  }
27811
27810
  this.store.setWhiteboard(o2), (n2 = this.listener) == null || n2.onWhiteboardUpdate(o2);
27812
27811
  });
27813
27812
  }
27814
27813
  };
27815
- Zi = class {
27814
+ Xi = class {
27816
27815
  constructor(e, t2, i2, r2, s2, o2) {
27817
27816
  this.store = e;
27818
27817
  this.transport = i2;
@@ -27839,7 +27838,7 @@ var init_dist = __esm({
27839
27838
  this.peerManager.handlePeerInfoUpdate({ peer: i3, name: e2, data: t3 });
27840
27839
  };
27841
27840
  let n2 = this.transport.isFlagEnabled("onDemandTracks");
27842
- this.trackManager = n2 ? new Gi(this.store, t2, this.transport, this.listener) : new ct(this.store, t2, this.listener), this.peerManager = new $i(this.store, this.trackManager, this.listener), this.peerListManager = new Wi(this.store, this.peerManager, this.trackManager, this.listener), this.broadcastManager = new Vi(this.listener), this.policyChangeManager = new Ki(this.store, t2), this.requestManager = new Qi(this.store, this.listener), this.activeSpeakerManager = new Bi(this.store, this.listener, this.audioListener), this.connectionQualityManager = new Fi(this.store, this.connectionQualityListener), this.roomUpdateManager = new zi(this.store, this.listener), this.sessionMetadataManager = new Yi(this.store, this.listener), this.pollsManager = new Ji(this.store, this.transport, this.listener), this.whiteboardManager = new Xi(this.store, this.transport, this.listener);
27841
+ this.trackManager = n2 ? new Fi(this.store, t2, this.transport, this.listener) : new nt(this.store, t2, this.listener), this.peerManager = new Wi(this.store, this.trackManager, this.listener), this.peerListManager = new Gi(this.store, this.peerManager, this.trackManager, this.listener), this.broadcastManager = new Bi(this.listener), this.policyChangeManager = new $i(this.store, t2), this.requestManager = new Ji(this.store, this.listener), this.activeSpeakerManager = new Ui(this.store, this.listener, this.audioListener), this.connectionQualityManager = new Vi(this.store, this.connectionQualityListener), this.roomUpdateManager = new Qi(this.store, this.listener), this.sessionMetadataManager = new zi(this.store, this.listener), this.pollsManager = new ji(this.store, this.transport, this.listener), this.whiteboardManager = new Yi(this.store, this.transport, this.listener);
27843
27842
  }
27844
27843
  setListener(e) {
27845
27844
  this.listener = e, this.trackManager.listener = e, this.peerManager.listener = e, this.peerListManager.listener = e, this.broadcastManager.listener = e, this.requestManager.listener = e, this.activeSpeakerManager.listener = e, this.roomUpdateManager.listener = e, this.sessionMetadataManager.listener = e, this.pollsManager.listener = e, this.whiteboardManager.listener = e;
@@ -27891,7 +27890,7 @@ var init_dist = __esm({
27891
27890
  }
27892
27891
  }
27893
27892
  };
27894
- er = class {
27893
+ Zi = class {
27895
27894
  constructor(e) {
27896
27895
  this.transport = e;
27897
27896
  this.observedKeys = /* @__PURE__ */ new Set();
@@ -27931,7 +27930,7 @@ var init_dist = __esm({
27931
27930
  });
27932
27931
  }
27933
27932
  };
27934
- tr = class {
27933
+ er = class {
27935
27934
  constructor(e, t2, i2 = "", r2 = "", s2 = "https://prod-init.100ms.live/init", o2 = false, n2) {
27936
27935
  this.authToken = e;
27937
27936
  this.peerId = t2;
@@ -27943,16 +27942,16 @@ var init_dist = __esm({
27943
27942
  }
27944
27943
  };
27945
27944
  j2 = ((s2) => (s2[s2.ConnectFailed = 0] = "ConnectFailed", s2[s2.SignalDisconnect = 1] = "SignalDisconnect", s2[s2.JoinWSMessageFailed = 2] = "JoinWSMessageFailed", s2[s2.PublishIceConnectionFailed = 3] = "PublishIceConnectionFailed", s2[s2.SubscribeIceConnectionFailed = 4] = "SubscribeIceConnectionFailed", s2))(j2 || {});
27946
- _a7 = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
27947
- ir = ((n2) => (n2.Disconnected = "Disconnected", n2.Connecting = "Connecting", n2.Joined = "Joined", n2.Preview = "Preview", n2.Failed = "Failed", n2.Reconnecting = "Reconnecting", n2.Leaving = "Leaving", n2))(ir || {});
27948
- rr = class {
27945
+ Na = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
27946
+ tr = ((n2) => (n2.Disconnected = "Disconnected", n2.Connecting = "Connecting", n2.Joined = "Joined", n2.Preview = "Preview", n2.Failed = "Failed", n2.Reconnecting = "Reconnecting", n2.Leaving = "Leaving", n2))(tr || {});
27947
+ ir = class {
27949
27948
  constructor(e) {
27950
27949
  this.promise = new Promise((t2, i2) => {
27951
27950
  this.resolve = t2, this.reject = i2, e(t2, i2);
27952
27951
  });
27953
27952
  }
27954
27953
  };
27955
- sr = class {
27954
+ rr = class {
27956
27955
  constructor(e, t2) {
27957
27956
  this.onStateChange = e;
27958
27957
  this.sendEvent = t2;
@@ -27979,18 +27978,18 @@ var init_dist = __esm({
27979
27978
  d2.d(this.TAG, `schedule: Already a task for ${j2[e]} scheduled, waiting for its completion`), yield g2.promise;
27980
27979
  return;
27981
27980
  }
27982
- let f2 = new rr((P8, k2) => {
27981
+ let v2 = new ir((E2, P8) => {
27983
27982
  });
27984
- this.inProgress.set(e, f2), this.sendEvent(t2, e);
27983
+ this.inProgress.set(e, v2), this.sendEvent(t2, e);
27985
27984
  }
27986
- let u2 = false, p2 = _a7[e];
27985
+ let u2 = false, p2 = Na[e];
27987
27986
  for (let g2 in p2) {
27988
- let f2 = p2[parseInt(g2)];
27987
+ let v2 = p2[parseInt(g2)];
27989
27988
  try {
27990
- let P8 = this.inProgress.get(f2);
27991
- P8 && (d2.d(this.TAG, `schedule: Suspending retry task of ${j2[e]}, waiting for ${j2[f2]} to recover`), yield P8.promise, d2.d(this.TAG, `schedule: Resuming retry task ${j2[e]} as it's dependency ${j2[f2]} is recovered`));
27992
- } catch (P8) {
27993
- d2.d(this.TAG, `schedule: Stopping retry task of ${j2[e]} as it's dependency ${j2[f2]} failed to recover`), u2 = true;
27989
+ let E2 = this.inProgress.get(v2);
27990
+ E2 && (d2.d(this.TAG, `schedule: Suspending retry task of ${j2[e]}, waiting for ${j2[v2]} to recover`), yield E2.promise, d2.d(this.TAG, `schedule: Resuming retry task ${j2[e]} as it's dependency ${j2[v2]} is recovered`));
27991
+ } catch (E2) {
27992
+ d2.d(this.TAG, `schedule: Stopping retry task of ${j2[e]} as it's dependency ${j2[v2]} failed to recover`), u2 = true;
27994
27993
  break;
27995
27994
  }
27996
27995
  }
@@ -28040,7 +28039,7 @@ var init_dist = __esm({
28040
28039
  });
28041
28040
  }
28042
28041
  };
28043
- ar = class extends Ce {
28042
+ sr = class extends Ce {
28044
28043
  constructor() {
28045
28044
  super(100);
28046
28045
  this.localStorage = new le("hms-analytics");
@@ -28061,7 +28060,7 @@ var init_dist = __esm({
28061
28060
  });
28062
28061
  }
28063
28062
  };
28064
- or = class {
28063
+ ar = class {
28065
28064
  constructor() {
28066
28065
  this.TAG = "[AnalyticsTransport]";
28067
28066
  }
@@ -28091,14 +28090,14 @@ var init_dist = __esm({
28091
28090
  }
28092
28091
  }
28093
28092
  };
28094
- nr = class extends or {
28093
+ or = class extends ar {
28095
28094
  constructor(t2) {
28096
28095
  super();
28097
28096
  this.transportProvider = t2;
28098
- this.failedEvents = new ar();
28097
+ this.failedEvents = new sr();
28099
28098
  }
28100
28099
  };
28101
- dt = class {
28100
+ ct = class {
28102
28101
  constructor(e, t2, i2, r2) {
28103
28102
  this.store = e;
28104
28103
  this.eventBus = t2;
@@ -28133,7 +28132,7 @@ var init_dist = __esm({
28133
28132
  });
28134
28133
  }
28135
28134
  };
28136
- lt = class {
28135
+ dt = class {
28137
28136
  constructor({ track: e, ssrc: t2, rid: i2, kind: r2, sampleWindowSize: s2 }) {
28138
28137
  this.samples = [];
28139
28138
  this.tempStats = [];
@@ -28176,10 +28175,10 @@ var init_dist = __esm({
28176
28175
  return this.tempStats.reduce((r2, s2) => r2 + ((s2[e] || 0) > t2 ? 1 : 0), 0);
28177
28176
  }
28178
28177
  };
28179
- cr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28180
- dr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28181
- Gt = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
28182
- Wt = class extends dt {
28178
+ nr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28179
+ cr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28180
+ Ft = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
28181
+ Gt = class extends ct {
28183
28182
  constructor() {
28184
28183
  super(...arguments);
28185
28184
  this.trackAnalytics = /* @__PURE__ */ new Map();
@@ -28199,16 +28198,16 @@ var init_dist = __esm({
28199
28198
  Object.keys(r2).forEach((s2) => {
28200
28199
  let o2 = r2[s2], n2 = this.store.getLocalPeerTracks().find((l2) => l2.getTrackIDBeingSent() === s2);
28201
28200
  Object.keys(o2).forEach((l2) => {
28202
- var g2, f2, P8;
28201
+ var g2, v2, E2;
28203
28202
  let u2 = o2[l2];
28204
28203
  if (!n2)
28205
28204
  return;
28206
- let p2 = this.getTrackIdentifier(n2.trackId, u2), h2 = M2(m({}, u2), { availableOutgoingBitrate: (f2 = (g2 = t2.getLocalPeerStats()) == null ? void 0 : g2.publish) == null ? void 0 : f2.availableOutgoingBitrate });
28205
+ let p2 = this.getTrackIdentifier(n2.trackId, u2), h2 = M2(m({}, u2), { availableOutgoingBitrate: (v2 = (g2 = t2.getLocalPeerStats()) == null ? void 0 : g2.publish) == null ? void 0 : v2.availableOutgoingBitrate });
28207
28206
  if (p2 && this.trackAnalytics.has(p2))
28208
- (P8 = this.trackAnalytics.get(p2)) == null || P8.pushTempStat(h2);
28207
+ (E2 = this.trackAnalytics.get(p2)) == null || E2.pushTempStat(h2);
28209
28208
  else if (n2) {
28210
- let k2 = new zr({ track: n2, sampleWindowSize: this.sampleWindowSize, rid: u2.rid, ssrc: u2.ssrc.toString(), kind: u2.kind });
28211
- k2.pushTempStat(h2), this.trackAnalytics.set(this.getTrackIdentifier(n2.trackId, u2), k2);
28209
+ let P8 = new zr({ track: n2, sampleWindowSize: this.sampleWindowSize, rid: u2.rid, ssrc: u2.ssrc.toString(), kind: u2.kind });
28210
+ P8.pushTempStat(h2), this.trackAnalytics.set(this.getTrackIdentifier(n2.trackId, u2), P8);
28212
28211
  }
28213
28212
  let T = this.trackAnalytics.get(p2);
28214
28213
  T != null && T.shouldCreateSample() && (i2 = true);
@@ -28219,22 +28218,22 @@ var init_dist = __esm({
28219
28218
  return i2.rid ? `${t2}:${i2.rid}` : t2;
28220
28219
  }
28221
28220
  };
28222
- zr = class extends lt {
28221
+ zr = class extends dt {
28223
28222
  constructor() {
28224
28223
  super(...arguments);
28225
28224
  this.samples = [];
28226
28225
  this.collateSample = () => {
28227
28226
  let t2 = this.getLatestStat(), i2 = t2.qualityLimitationDurations, r2 = i2 && { bandwidth_sec: i2.bandwidth, cpu_sec: i2.cpu, other_sec: i2.other }, s2 = t2.frameHeight ? { height_px: this.getLatestStat().frameHeight, width_px: this.getLatestStat().frameWidth } : void 0, o2 = this.calculateAverage("jitter", false), n2 = o2 ? Math.round(o2 * 1e3) : void 0, l2 = this.calculateAverage("roundTripTime", false), u2 = l2 ? Math.round(l2 * 1e3) : void 0;
28228
- return Gt({ timestamp: Date.now(), avg_available_outgoing_bitrate_bps: this.calculateAverage("availableOutgoingBitrate"), avg_bitrate_bps: this.calculateAverage("bitrate"), avg_fps: this.calculateAverage("framesPerSecond"), total_packets_lost: this.getLatestStat().packetsLost, total_packets_sent: this.getLatestStat().packetsSent, total_packet_sent_delay_sec: parseFloat(this.calculateDifferenceForSample("totalPacketSendDelay").toFixed(4)), total_fir_count: this.calculateDifferenceForSample("firCount"), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_ms: n2, avg_round_trip_time_ms: u2, total_quality_limitation: r2, resolution: s2 });
28227
+ return Ft({ timestamp: Date.now(), avg_available_outgoing_bitrate_bps: this.calculateAverage("availableOutgoingBitrate"), avg_bitrate_bps: this.calculateAverage("bitrate"), avg_fps: this.calculateAverage("framesPerSecond"), total_packets_lost: this.getLatestStat().packetsLost, total_packets_sent: this.getLatestStat().packetsSent, total_packet_sent_delay_sec: parseFloat(this.calculateDifferenceForSample("totalPacketSendDelay").toFixed(4)), total_fir_count: this.calculateDifferenceForSample("firCount"), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_ms: n2, avg_round_trip_time_ms: u2, total_quality_limitation: r2, resolution: s2 });
28229
28228
  };
28230
28229
  this.shouldCreateSample = () => {
28231
28230
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28232
- return t2 === 30 || dr(i2, r2) || i2.kind === "video" && cr(i2, r2);
28231
+ return t2 === 30 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28233
28232
  };
28234
28233
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28235
28234
  }
28236
28235
  };
28237
- $t = class extends dt {
28236
+ Wt = class extends ct {
28238
28237
  constructor() {
28239
28238
  super(...arguments);
28240
28239
  this.trackAnalytics = /* @__PURE__ */ new Map();
@@ -28252,20 +28251,20 @@ var init_dist = __esm({
28252
28251
  handleStatsUpdate(t2) {
28253
28252
  let i2 = t2.getAllRemoteTracksStats(), r2 = false;
28254
28253
  Object.keys(i2).forEach((s2) => {
28255
- var f2, P8;
28256
- let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (f2 = this.trackAnalytics.get(s2)) == null ? void 0 : f2.getLatestStat(), p2 = ((k2, w2) => {
28257
- let xe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Zt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((k2 == null ? void 0 : k2.jitterBufferDelay) || 0) - xe, $ = ((k2 == null ? void 0 : k2.jitterBufferEmittedCount) || 0) - Zt;
28254
+ var v2, E2;
28255
+ let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (v2 = this.trackAnalytics.get(s2)) == null ? void 0 : v2.getLatestStat(), p2 = ((P8, w2) => {
28256
+ let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Xt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((P8 == null ? void 0 : P8.jitterBufferDelay) || 0) - Oe, $ = ((P8 == null ? void 0 : P8.jitterBufferEmittedCount) || 0) - Xt;
28258
28257
  return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
28259
28258
  })(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
28260
28259
  if (n2.kind === "video") {
28261
- let k2 = o2.getPreferredLayerDefinition();
28262
- T.expectedFrameHeight = k2 == null ? void 0 : k2.resolution.height, T.expectedFrameWidth = k2 == null ? void 0 : k2.resolution.width;
28260
+ let P8 = o2.getPreferredLayerDefinition();
28261
+ T.expectedFrameHeight = P8 == null ? void 0 : P8.resolution.height, T.expectedFrameWidth = P8 == null ? void 0 : P8.resolution.width;
28263
28262
  }
28264
28263
  if (this.trackAnalytics.has(s2))
28265
- (P8 = this.trackAnalytics.get(s2)) == null || P8.pushTempStat(T);
28264
+ (E2 = this.trackAnalytics.get(s2)) == null || E2.pushTempStat(T);
28266
28265
  else if (o2) {
28267
- let k2 = new Xr({ track: o2, sampleWindowSize: this.sampleWindowSize, ssrc: n2.ssrc.toString(), kind: n2.kind });
28268
- k2.pushTempStat(T), this.trackAnalytics.set(s2, k2);
28266
+ let P8 = new Xr({ track: o2, sampleWindowSize: this.sampleWindowSize, ssrc: n2.ssrc.toString(), kind: n2.kind });
28267
+ P8.pushTempStat(T), this.trackAnalytics.set(s2, P8);
28269
28268
  }
28270
28269
  let g2 = this.trackAnalytics.get(s2);
28271
28270
  g2 != null && g2.shouldCreateSample() && (r2 = true);
@@ -28276,39 +28275,39 @@ var init_dist = __esm({
28276
28275
  return;
28277
28276
  let r2 = this.store.getPeerById(t2.peerID), s2 = r2 == null ? void 0 : r2.audioTrack, o2 = r2 == null ? void 0 : r2.videoTrack;
28278
28277
  if (!(s2 && o2 && s2.enabled && o2.enabled))
28279
- return Pt;
28278
+ return kt;
28280
28279
  let l2 = i2.getRemoteTrackStats(s2.trackId);
28281
28280
  if (!l2)
28282
- return Pt;
28281
+ return kt;
28283
28282
  if (l2.estimatedPlayoutTimestamp)
28284
28283
  return l2.estimatedPlayoutTimestamp - t2.estimatedPlayoutTimestamp;
28285
28284
  }
28286
28285
  };
28287
- Xr = class extends lt {
28286
+ Xr = class extends dt {
28288
28287
  constructor() {
28289
28288
  super(...arguments);
28290
28289
  this.samples = [];
28291
28290
  this.collateSample = () => {
28292
28291
  let t2 = this.getLatestStat(), i2 = this.getFirstStat(), r2 = { timestamp: Date.now(), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_buffer_delay: this.calculateAverage("calculatedJitterBufferDelay", false) };
28293
28292
  if (t2.kind === "video")
28294
- return Gt(M2(m({}, r2), { avg_av_sync_ms: this.calculateAvgAvSyncForSample(), avg_frames_received_per_sec: this.calculateDifferenceAverage("framesReceived"), avg_frames_dropped_per_sec: this.calculateDifferenceAverage("framesDropped"), avg_frames_decoded_per_sec: this.calculateDifferenceAverage("framesDecoded"), frame_width: this.calculateAverage("frameWidth"), frame_height: this.calculateAverage("frameHeight"), expected_frame_width: this.calculateAverage("expectedFrameWidth"), expected_frame_height: this.calculateAverage("expectedFrameHeight"), pause_count: this.calculateDifferenceForSample("pauseCount"), pause_duration_seconds: this.calculateDifferenceForSample("totalPausesDuration"), freeze_count: this.calculateDifferenceForSample("freezeCount"), freeze_duration_seconds: this.calculateDifferenceForSample("totalFreezesDuration") }));
28293
+ return Ft(M2(m({}, r2), { avg_av_sync_ms: this.calculateAvgAvSyncForSample(), avg_frames_received_per_sec: this.calculateDifferenceAverage("framesReceived"), avg_frames_dropped_per_sec: this.calculateDifferenceAverage("framesDropped"), avg_frames_decoded_per_sec: this.calculateDifferenceAverage("framesDecoded"), frame_width: this.calculateAverage("frameWidth"), frame_height: this.calculateAverage("frameHeight"), expected_frame_width: this.calculateAverage("expectedFrameWidth"), expected_frame_height: this.calculateAverage("expectedFrameHeight"), pause_count: this.calculateDifferenceForSample("pauseCount"), pause_duration_seconds: this.calculateDifferenceForSample("totalPausesDuration"), freeze_count: this.calculateDifferenceForSample("freezeCount"), freeze_duration_seconds: this.calculateDifferenceForSample("totalFreezesDuration") }));
28295
28294
  {
28296
28295
  let s2 = (t2.concealedSamples || 0) - (t2.silentConcealedSamples || 0) - ((i2.concealedSamples || 0) - (i2.silentConcealedSamples || 0));
28297
- return Gt(M2(m({}, r2), { audio_level: this.calculateInstancesOfHigh("audioLevel", 0.05), audio_concealed_samples: s2, audio_total_samples_received: this.calculateDifferenceForSample("totalSamplesReceived"), audio_concealment_events: this.calculateDifferenceForSample("concealmentEvents"), fec_packets_discarded: this.calculateDifferenceForSample("fecPacketsDiscarded"), fec_packets_received: this.calculateDifferenceForSample("fecPacketsReceived"), total_samples_duration: this.calculateDifferenceForSample("totalSamplesDuration"), total_packets_received: this.calculateDifferenceForSample("packetsReceived"), total_packets_lost: this.calculateDifferenceForSample("packetsLost") }));
28296
+ return Ft(M2(m({}, r2), { audio_level: this.calculateInstancesOfHigh("audioLevel", 0.05), audio_concealed_samples: s2, audio_total_samples_received: this.calculateDifferenceForSample("totalSamplesReceived"), audio_concealment_events: this.calculateDifferenceForSample("concealmentEvents"), fec_packets_discarded: this.calculateDifferenceForSample("fecPacketsDiscarded"), fec_packets_received: this.calculateDifferenceForSample("fecPacketsReceived"), total_samples_duration: this.calculateDifferenceForSample("totalSamplesDuration"), total_packets_received: this.calculateDifferenceForSample("packetsReceived"), total_packets_lost: this.calculateDifferenceForSample("packetsLost") }));
28298
28297
  }
28299
28298
  };
28300
28299
  this.shouldCreateSample = () => {
28301
28300
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28302
- return t2 === 10 || dr(i2, r2) || i2.kind === "video" && cr(i2, r2);
28301
+ return t2 === 10 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28303
28302
  };
28304
28303
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28305
28304
  }
28306
28305
  calculateAvgAvSyncForSample() {
28307
- let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== Pt);
28308
- return i2.length === 0 ? Pt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
28306
+ let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== kt);
28307
+ return i2.length === 0 ? kt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
28309
28308
  }
28310
28309
  };
28311
- ur = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(ur || {});
28310
+ lr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(lr || {});
28312
28311
  Ee = "[HMSConnection]";
28313
28312
  qe = class {
28314
28313
  constructor(e, t2) {
@@ -28331,7 +28330,7 @@ var init_dist = __esm({
28331
28330
  return c2(this, null, function* () {
28332
28331
  try {
28333
28332
  let i2 = yield this.nativeConnection.createOffer(t2);
28334
- return d2.d(Ee, `[role=${this.role}] createOffer offer=${JSON.stringify(i2, null, 1)}`), xa(Na(i2, e));
28333
+ return d2.d(Ee, `[role=${this.role}] createOffer offer=${JSON.stringify(i2, null, 1)}`), Ua(Oa(i2, e));
28335
28334
  } catch (i2) {
28336
28335
  throw S2.WebrtcErrors.CreateOfferFailed(this.action, i2.message);
28337
28336
  }
@@ -28387,13 +28386,13 @@ var init_dist = __esm({
28387
28386
  let i2 = (r2 = t2.track) == null ? void 0 : r2.kind;
28388
28387
  if (t2.transport) {
28389
28388
  let s2 = t2.transport.iceTransport, o2 = () => {
28390
- typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${ur[this.role]} connection`, `selected ${i2 || "unknown"} candidate pair`, JSON.stringify(this.selectedCandidatePair, null, 2))));
28389
+ typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${lr[this.role]} connection`, `selected ${i2 || "unknown"} candidate pair`, JSON.stringify(this.selectedCandidatePair, null, 2))));
28391
28390
  };
28392
28391
  typeof s2.onselectedcandidatepairchange == "function" && (s2.onselectedcandidatepairchange = o2), o2();
28393
28392
  }
28394
28393
  });
28395
28394
  } catch (e) {
28396
- d2.w(Ee, `Error in logging selected ice candidate pair for ${ur[this.role]} connection`, e);
28395
+ d2.w(Ee, `Error in logging selected ice candidate pair for ${lr[this.role]} connection`, e);
28397
28396
  }
28398
28397
  }
28399
28398
  removeTrack(e) {
@@ -28426,11 +28425,11 @@ var init_dist = __esm({
28426
28425
  return this.nativeConnection.getReceivers();
28427
28426
  }
28428
28427
  };
28429
- qt = class extends qe {
28428
+ Kt = class extends qe {
28430
28429
  constructor(t2, i2, r2) {
28431
28430
  super(0, t2);
28432
28431
  this.TAG = "[HMSPublishConnection]";
28433
- this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(ui, { protocol: "SCTP" }), this.channel.onerror = (s2) => d2.e(this.TAG, `publish data channel onerror ${s2}`, s2), this.nativeConnection.onicecandidate = ({ candidate: s2 }) => {
28432
+ this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(li, { protocol: "SCTP" }), this.channel.onerror = (s2) => d2.e(this.TAG, `publish data channel onerror ${s2}`, s2), this.nativeConnection.onicecandidate = ({ candidate: s2 }) => {
28434
28433
  s2 && (this.observer.onIceCandidate(s2), t2.trickle(this.role, s2));
28435
28434
  }, this.nativeConnection.oniceconnectionstatechange = () => {
28436
28435
  this.observer.onIceConnectionChange(this.nativeConnection.iceConnectionState);
@@ -28450,7 +28449,7 @@ var init_dist = __esm({
28450
28449
  });
28451
28450
  }
28452
28451
  };
28453
- jt = class {
28452
+ qt = class {
28454
28453
  constructor(e, t2, i2 = "") {
28455
28454
  this.TAG = "[HMSDataChannel]";
28456
28455
  this.nativeChannel = e, this.observer = t2, this.metadata = i2, e.onmessage = (r2) => {
@@ -28473,7 +28472,7 @@ var init_dist = __esm({
28473
28472
  this.nativeChannel.close();
28474
28473
  }
28475
28474
  };
28476
- Jt = class a9 extends qe {
28475
+ jt = class a9 extends qe {
28477
28476
  constructor(t2, i2, r2, s2) {
28478
28477
  super(1, t2);
28479
28478
  this.isFlagEnabled = r2;
@@ -28520,7 +28519,7 @@ var init_dist = __esm({
28520
28519
  }, this.nativeConnection.onconnectionstatechange = () => {
28521
28520
  this.observer.onConnectionStateChange(this.nativeConnection.connectionState);
28522
28521
  }, this.nativeConnection.ondatachannel = (t2) => {
28523
- t2.channel.label === ui && (this.apiChannel = new jt(t2.channel, { onMessage: (i2) => {
28522
+ t2.channel.label === li && (this.apiChannel = new qt(t2.channel, { onMessage: (i2) => {
28524
28523
  this.eventEmitter.emit("message", i2), this.observer.onApiChannelMessage(i2);
28525
28524
  } }, `role=${this.role}`), t2.channel.onopen = this.handlePendingApiMessages);
28526
28525
  }, this.nativeConnection.onicecandidate = (t2) => {
@@ -28546,7 +28545,7 @@ var init_dist = __esm({
28546
28545
  });
28547
28546
  let s2 = this.remoteStreams.get(r2), o2 = t2.track.kind === "audio" ? se : U2, n2 = new o2(s2, t2.track);
28548
28547
  t2.track.kind === "video" && s2.setVideoLayerLocally("none", "addTrack", "subscribeConnection"), n2.transceiver = t2.transceiver;
28549
- let l2 = Oa(this.remoteDescription, (u2 = t2.transceiver) == null ? void 0 : u2.mid);
28548
+ let l2 = xa(this.remoteDescription, (u2 = t2.transceiver) == null ? void 0 : u2.mid);
28550
28549
  l2 && n2.setSdpTrackId(l2), s2.tracks.push(n2), this.observer.onTrackAdd(n2);
28551
28550
  };
28552
28551
  }
@@ -28569,9 +28568,9 @@ var init_dist = __esm({
28569
28568
  });
28570
28569
  }
28571
28570
  };
28572
- Ua = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
28573
- pr = "[InitService]";
28574
- Qt = class {
28571
+ Ba = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
28572
+ ur = "[InitService]";
28573
+ Jt = class {
28575
28574
  static handleError(e, t2) {
28576
28575
  switch (e.status) {
28577
28576
  case 404:
@@ -28584,16 +28583,16 @@ var init_dist = __esm({
28584
28583
  }
28585
28584
  static fetchInitConfig(n2) {
28586
28585
  return c2(this, arguments, function* ({ token: e, peerId: t2, userAgent: i2, initEndpoint: r2 = "https://prod-init.100ms.live", region: s2 = "", iceServers: o2 }) {
28587
- d2.d(pr, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28588
- let l2 = ln2(r2, t2, i2, s2);
28586
+ d2.d(ur, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28587
+ let l2 = un2(r2, t2, i2, s2);
28589
28588
  try {
28590
28589
  let u2 = yield fetch(l2, { headers: { Authorization: `Bearer ${e}` } });
28591
28590
  try {
28592
28591
  let p2 = yield u2.clone().json();
28593
- return this.handleError(u2, p2), d2.d(pr, `config is ${JSON.stringify(p2, null, 2)}`), un2(p2, o2);
28592
+ return this.handleError(u2, p2), d2.d(ur, `config is ${JSON.stringify(p2, null, 2)}`), pn2(p2, o2);
28594
28593
  } catch (p2) {
28595
28594
  let h2 = yield u2.text();
28596
- throw d2.e(pr, "json error", p2.message, h2), p2 instanceof v2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28595
+ throw d2.e(ur, "json error", p2.message, h2), p2 instanceof f2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28597
28596
  }
28598
28597
  } catch (u2) {
28599
28598
  let p2 = u2;
@@ -28602,7 +28601,7 @@ var init_dist = __esm({
28602
28601
  });
28603
28602
  }
28604
28603
  };
28605
- zt = class {
28604
+ Qt = class {
28606
28605
  constructor(e) {
28607
28606
  this.TAG = "[SIGNAL]: ";
28608
28607
  this.pongResponseTimes = new Ce(5);
@@ -28647,7 +28646,7 @@ var init_dist = __esm({
28647
28646
  this.callbacks.set(i2, { resolve: n2, reject: l2, metadata: { method: e } });
28648
28647
  });
28649
28648
  } catch (o2) {
28650
- if (o2 instanceof v2)
28649
+ if (o2 instanceof f2)
28651
28650
  throw o2;
28652
28651
  let n2 = o2;
28653
28652
  throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), fr(e), n2.message);
@@ -28967,14 +28966,14 @@ var init_dist = __esm({
28967
28966
  });
28968
28967
  }
28969
28968
  };
28970
- Ba = () => {
28969
+ Va = () => {
28971
28970
  if (!O2 || typeof navigator.connection == "undefined")
28972
28971
  return;
28973
28972
  let a11 = navigator.connection;
28974
28973
  return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
28975
28974
  };
28976
28975
  I2 = "[HMSTransport]:";
28977
- Yt = class {
28976
+ zt = class {
28978
28977
  constructor(e, t2, i2, r2, s2, o2, n2) {
28979
28978
  this.observer = e;
28980
28979
  this.deviceManager = t2;
@@ -29003,7 +29002,7 @@ var init_dist = __esm({
29003
29002
  } catch (t3) {
29004
29003
  d2.d(I2, "[role=SUBSCRIBE] onOffer renegotiation FAILED \u274C", t3), this.state = "Failed";
29005
29004
  let i3;
29006
- t3 instanceof v2 ? i3 = t3 : i3 = S2.GenericErrors.Unknown("PUBLISH", t3.message), this.observer.onFailure(i3), this.eventBus.analytics.publish(y2.subscribeFail(i3));
29005
+ t3 instanceof f2 ? i3 = t3 : i3 = S2.GenericErrors.Unknown("PUBLISH", t3.message), this.observer.onFailure(i3), this.eventBus.analytics.publish(y2.subscribeFail(i3));
29007
29006
  }
29008
29007
  }), onTrickle: (e2) => c2(this, null, function* () {
29009
29008
  let t3 = e2.target === 0 ? this.publishConnection : this.subscribeConnection;
@@ -29013,7 +29012,7 @@ var init_dist = __esm({
29013
29012
  }), onFailure: (e2) => {
29014
29013
  this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
29015
29014
  }, onOffline: (e2) => c2(this, null, function* () {
29016
- d2.d(I2, "socket offline", ir[this.state]);
29015
+ d2.d(I2, "socket offline", tr[this.state]);
29017
29016
  try {
29018
29017
  this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
29019
29018
  } catch (t3) {
@@ -29021,12 +29020,12 @@ var init_dist = __esm({
29021
29020
  }
29022
29021
  }), onOnline: () => {
29023
29022
  var e2;
29024
- d2.d(I2, "socket online", ir[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
29023
+ d2.d(I2, "socket online", tr[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
29025
29024
  }, onNetworkOnline: () => {
29026
29025
  this.analyticsEventsService.flushFailedClientEvents();
29027
29026
  } };
29028
- this.signal = new zt(this.signalObserver);
29029
- this.analyticsSignalTransport = new nr(this.signal);
29027
+ this.signal = new Qt(this.signalObserver);
29028
+ this.analyticsSignalTransport = new or(this.signal);
29030
29029
  this.publishDtlsStateTimer = 0;
29031
29030
  this.lastPublishDtlsState = "new";
29032
29031
  this.publishConnectionObserver = { onRenegotiationNeeded: () => c2(this, null, function* () {
@@ -29051,8 +29050,8 @@ var init_dist = __esm({
29051
29050
  }), onConnectionStateChange: (e2) => c2(this, null, function* () {
29052
29051
  var i3, r3, s3, o3, n3, l3, u3, p3;
29053
29052
  (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publish connection state change: ${e2}`), e2 === "connected" && ((i3 = this.connectivityListener) == null || i3.onICESuccess(true), (r3 = this.publishConnection) == null || r3.handleSelectedIceCandidatePairs()), e2 === "disconnected" && setTimeout(() => {
29054
- var h2, T, g2, f2, P8, k2, w2;
29055
- ((h2 = this.publishConnection) == null ? void 0 : h2.connectionState) === "disconnected" && this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEDisconnected("PUBLISH", `local candidate - ${(f2 = (g2 = (T = this.publishConnection) == null ? void 0 : T.selectedCandidatePair) == null ? void 0 : g2.local) == null ? void 0 : f2.candidate}; remote candidate - ${(w2 = (k2 = (P8 = this.publishConnection) == null ? void 0 : P8.selectedCandidatePair) == null ? void 0 : k2.remote) == null ? void 0 : w2.candidate}`));
29053
+ var h2, T, g2, v2, E2, P8, w2;
29054
+ ((h2 = this.publishConnection) == null ? void 0 : h2.connectionState) === "disconnected" && this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEDisconnected("PUBLISH", `local candidate - ${(v2 = (g2 = (T = this.publishConnection) == null ? void 0 : T.selectedCandidatePair) == null ? void 0 : g2.local) == null ? void 0 : v2.candidate}; remote candidate - ${(w2 = (P8 = (E2 = this.publishConnection) == null ? void 0 : E2.selectedCandidatePair) == null ? void 0 : P8.remote) == null ? void 0 : w2.candidate}`));
29056
29055
  }, 5e3), e2 === "failed" && (yield this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEFailure("PUBLISH", `local candidate - ${(n3 = (o3 = (s3 = this.publishConnection) == null ? void 0 : s3.selectedCandidatePair) == null ? void 0 : o3.local) == null ? void 0 : n3.candidate}; remote candidate - ${(p3 = (u3 = (l3 = this.publishConnection) == null ? void 0 : l3.selectedCandidatePair) == null ? void 0 : u3.remote) == null ? void 0 : p3.candidate}`)));
29057
29056
  }), onIceCandidate: (e2) => {
29058
29057
  var t3;
@@ -29076,8 +29075,8 @@ var init_dist = __esm({
29076
29075
  }), onConnectionStateChange: (e2) => c2(this, null, function* () {
29077
29076
  var i3, r3, s3, o3, n3, l3;
29078
29077
  (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Subscribe connection state change: ${e2}`), e2 === "failed" && (yield this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEFailure("SUBSCRIBE", `local candidate - ${(s3 = (r3 = (i3 = this.subscribeConnection) == null ? void 0 : i3.selectedCandidatePair) == null ? void 0 : r3.local) == null ? void 0 : s3.candidate}; remote candidate - ${(l3 = (n3 = (o3 = this.subscribeConnection) == null ? void 0 : o3.selectedCandidatePair) == null ? void 0 : n3.remote) == null ? void 0 : l3.candidate}`))), e2 === "disconnected" && setTimeout(() => {
29079
- var u3, p3, h2, T, g2, f2, P8;
29080
- ((u3 = this.subscribeConnection) == null ? void 0 : u3.connectionState) === "disconnected" && this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEDisconnected("SUBSCRIBE", `local candidate - ${(T = (h2 = (p3 = this.subscribeConnection) == null ? void 0 : p3.selectedCandidatePair) == null ? void 0 : h2.local) == null ? void 0 : T.candidate}; remote candidate - ${(P8 = (f2 = (g2 = this.subscribeConnection) == null ? void 0 : g2.selectedCandidatePair) == null ? void 0 : f2.remote) == null ? void 0 : P8.candidate}`));
29078
+ var u3, p3, h2, T, g2, v2, E2;
29079
+ ((u3 = this.subscribeConnection) == null ? void 0 : u3.connectionState) === "disconnected" && this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEDisconnected("SUBSCRIBE", `local candidate - ${(T = (h2 = (p3 = this.subscribeConnection) == null ? void 0 : p3.selectedCandidatePair) == null ? void 0 : h2.local) == null ? void 0 : T.candidate}; remote candidate - ${(E2 = (v2 = (g2 = this.subscribeConnection) == null ? void 0 : g2.selectedCandidatePair) == null ? void 0 : v2.remote) == null ? void 0 : E2.candidate}`));
29081
29080
  }, 5e3), e2 === "connected" && this.handleSubscribeConnectionConnected();
29082
29081
  }), onIceCandidate: (e2) => {
29083
29082
  var t3;
@@ -29116,13 +29115,13 @@ var init_dist = __esm({
29116
29115
  return this.signal.trackUpdate(this.trackStates), e2;
29117
29116
  });
29118
29117
  var u2, p2;
29119
- this.webrtcInternals = new hi(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
29118
+ this.webrtcInternals = new pi(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
29120
29119
  let l2 = (h2, T) => c2(this, null, function* () {
29121
29120
  h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
29122
29121
  });
29123
- this.retryScheduler = new sr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29124
- var g2, f2;
29125
- let T = ((f2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : f2.bitrate) || 0;
29122
+ this.retryScheduler = new rr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29123
+ var g2, v2;
29124
+ let T = ((v2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : v2.bitrate) || 0;
29126
29125
  this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
29127
29126
  }), this.eventBus.localAudioEnabled.subscribe(({ track: h2 }) => this.trackUpdate(h2)), this.eventBus.localVideoEnabled.subscribe(({ track: h2 }) => this.trackUpdate(h2));
29128
29127
  }
@@ -29158,11 +29157,11 @@ var init_dist = __esm({
29158
29157
  }
29159
29158
  connect(e, t2, i2, r2, s2 = false, o2) {
29160
29159
  return c2(this, null, function* () {
29161
- this.setTransportStateForConnect(), this.joinParameters = new tr(e, i2, r2.name, r2.metaData, t2, s2, o2);
29160
+ this.setTransportStateForConnect(), this.joinParameters = new er(e, i2, r2.name, r2.metaData, t2, s2, o2);
29162
29161
  try {
29163
29162
  return yield this.internalConnect(e, t2, i2, o2);
29164
29163
  } catch (n2) {
29165
- if (n2 instanceof v2 && ([E2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, E2.WebSocketConnectionErrors.FAILED_TO_CONNECT, E2.WebSocketConnectionErrors.ABNORMAL_CLOSE, E2.APIErrors.ENDPOINT_UNREACHABLE].includes(n2.code) || n2.code.toString().startsWith("5") || n2.code.toString().startsWith("429"))) {
29164
+ if (n2 instanceof f2 && ([k2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, k2.WebSocketConnectionErrors.FAILED_TO_CONNECT, k2.WebSocketConnectionErrors.ABNORMAL_CLOSE, k2.APIErrors.ENDPOINT_UNREACHABLE].includes(n2.code) || n2.code.toString().startsWith("5") || n2.code.toString().startsWith("429"))) {
29166
29165
  let u2 = () => c2(this, null, function* () {
29167
29166
  return yield this.internalConnect(e, t2, i2, o2), !!(this.initConfig && this.initConfig.endpoint);
29168
29167
  });
@@ -29212,13 +29211,13 @@ var init_dist = __esm({
29212
29211
  trackUpdate(e) {
29213
29212
  let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
29214
29213
  if (i2) {
29215
- let r2 = new Nt(M2(m({}, i2), { mute: !e.enabled }));
29214
+ let r2 = new _t(M2(m({}, i2), { mute: !e.enabled }));
29216
29215
  this.trackStates.set(i2.track_id, r2), d2.d(I2, "Track Update", this.trackStates, e), this.signal.trackUpdate(/* @__PURE__ */ new Map([[i2.track_id, r2]]));
29217
29216
  }
29218
29217
  }
29219
29218
  publishTrack(e) {
29220
29219
  return c2(this, null, function* () {
29221
- e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new Nt(e));
29220
+ e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new _t(e));
29222
29221
  let t2 = new Promise((s2, o2) => {
29223
29222
  this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
29224
29223
  }), i2 = e.stream;
@@ -29256,7 +29255,7 @@ var init_dist = __esm({
29256
29255
  });
29257
29256
  }
29258
29257
  createPeerConnections() {
29259
- this.initConfig && (this.publishConnection || (this.publishConnection = new qt(this.signal, this.initConfig.rtcConfiguration, this.publishConnectionObserver)), this.subscribeConnection || (this.subscribeConnection = new Jt(this.signal, this.initConfig.rtcConfiguration, this.isFlagEnabled.bind(this), this.subscribeConnectionObserver)));
29258
+ this.initConfig && (this.publishConnection || (this.publishConnection = new Kt(this.signal, this.initConfig.rtcConfiguration, this.publishConnectionObserver)), this.subscribeConnection || (this.subscribeConnection = new jt(this.signal, this.initConfig.rtcConfiguration, this.isFlagEnabled.bind(this), this.subscribeConnectionObserver)));
29260
29259
  }
29261
29260
  negotiateJoinWithRetry(s2) {
29262
29261
  return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 = true }) {
@@ -29264,7 +29263,7 @@ var init_dist = __esm({
29264
29263
  yield this.negotiateJoin({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 });
29265
29264
  } catch (o2) {
29266
29265
  d2.e(I2, "Join negotiation failed \u274C", o2);
29267
- let n2 = o2 instanceof v2 ? o2 : S2.WebsocketMethodErrors.ServerErrors(500, "JOIN", `Websocket join error - ${o2.message}`), l2 = parseInt(`${n2.code / 100}`) === 5 || [E2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, 429].includes(n2.code);
29266
+ let n2 = o2 instanceof f2 ? o2 : S2.WebsocketMethodErrors.ServerErrors(500, "JOIN", `Websocket join error - ${o2.message}`), l2 = parseInt(`${n2.code / 100}`) === 5 || [k2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, 429].includes(n2.code);
29268
29267
  if (n2.code === 410 && (n2.isTerminal = true), l2) {
29269
29268
  this.joinRetryCount = 0, n2.isTerminal = false;
29270
29269
  let u2 = () => c2(this, null, function* () {
@@ -29330,7 +29329,7 @@ var init_dist = __esm({
29330
29329
  this.callbacks.delete(et), d2.timeEnd("renegotiation-offer-exchange"), yield this.publishConnection.setRemoteDescription(r2), t2.promise.resolve(true), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded DONE \u2705");
29331
29330
  } catch (i2) {
29332
29331
  let r2;
29333
- i2 instanceof v2 ? r2 = i2 : r2 = S2.GenericErrors.Unknown("PUBLISH", i2.message), t2.promise.reject(r2), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded FAILED \u274C");
29332
+ i2 instanceof f2 ? r2 = i2 : r2 = S2.GenericErrors.Unknown("PUBLISH", i2.message), t2.promise.reject(r2), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded FAILED \u274C");
29334
29333
  }
29335
29334
  }
29336
29335
  });
@@ -29346,7 +29345,7 @@ var init_dist = __esm({
29346
29345
  d2.d(I2, "connect: started \u23F0");
29347
29346
  let s2 = /* @__PURE__ */ new Date();
29348
29347
  try {
29349
- this.analyticsTimer.start("init_response_time"), this.initConfig = yield Qt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
29348
+ this.analyticsTimer.start("init_response_time"), this.initConfig = yield Jt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
29350
29349
  let u2 = this.store.getRoom();
29351
29350
  return u2 && (u2.effectsKey = (n2 = this.initConfig.config.vb) == null ? void 0 : n2.effectsKey, u2.isEffectsEnabled = this.isFlagEnabled("effectsSDKEnabled"), u2.isHipaaEnabled = this.isFlagEnabled("hipaa"), u2.isNoiseCancellationEnabled = this.isFlagEnabled("noiseCancellation")), this.analyticsTimer.end("init_response_time"), Pe.setWebsocketEndpoint(this.initConfig.endpoint), this.validateNotDisconnected("post init"), yield this.openSignal(e, i2), this.observer.onConnected(), (l2 = this.connectivityListener) == null || l2.onSignallingSuccess(), this.store.setSimulcastEnabled(this.isFlagEnabled("simulcast")), d2.d(I2, "Adding Analytics Transport: JsonRpcSignal"), this.analyticsEventsService.setTransport(this.analyticsSignalTransport), this.analyticsEventsService.flush(), this.initConfig;
29352
29351
  } catch (u2) {
@@ -29364,7 +29363,7 @@ var init_dist = __esm({
29364
29363
  throw S2.APIErrors.InitConfigNotAvailable("INIT", "Init Config not found");
29365
29364
  d2.d(I2, "\u23F3 internal connect: connecting to ws endpoint", this.initConfig.endpoint);
29366
29365
  let i2 = new URL(this.initConfig.endpoint);
29367
- i2.searchParams.set("peer", t2), i2.searchParams.set("token", e), i2.searchParams.set("user_agent_v2", this.store.getUserAgent()), i2.searchParams.set("protocol_version", Vs), i2.searchParams.set("protocol_spec", Fs), this.endpoint = i2.toString(), this.analyticsTimer.start("ws_connect_time"), yield this.signal.open(this.endpoint), this.analyticsTimer.end("ws_connect_time"), this.analyticsTimer.start("on_policy_change_time"), this.analyticsTimer.start("room_state_time"), d2.d(I2, "\u2705 internal connect: connected to ws endpoint");
29366
+ i2.searchParams.set("peer", t2), i2.searchParams.set("token", e), i2.searchParams.set("user_agent_v2", this.store.getUserAgent()), i2.searchParams.set("protocol_version", Fs), i2.searchParams.set("protocol_spec", Gs), this.endpoint = i2.toString(), this.analyticsTimer.start("ws_connect_time"), yield this.signal.open(this.endpoint), this.analyticsTimer.end("ws_connect_time"), this.analyticsTimer.start("on_policy_change_time"), this.analyticsTimer.start("room_state_time"), d2.d(I2, "\u2705 internal connect: connected to ws endpoint");
29368
29367
  });
29369
29368
  }
29370
29369
  initRtcStatsMonitor() {
@@ -29375,7 +29374,7 @@ var init_dist = __esm({
29375
29374
  }
29376
29375
  initStatsAnalytics() {
29377
29376
  var e, t2;
29378
- this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new Wt(this.store, this.eventBus, this.getValueFromInitConfig("publishStats", "maxSampleWindowSize", 30), this.getValueFromInitConfig("publishStats", "maxSamplePushInterval", 300)), (e = this.getWebrtcInternals()) == null || e.start()), this.isFlagEnabled("subscribeStats") && (this.subscribeStatsAnalytics = new $t(this.store, this.eventBus, this.getValueFromInitConfig("subscribeStats", "maxSampleWindowSize", 10), this.getValueFromInitConfig("subscribeStats", "maxSamplePushInterval", 60)), (t2 = this.getWebrtcInternals()) == null || t2.start());
29377
+ this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new Gt(this.store, this.eventBus, this.getValueFromInitConfig("publishStats", "maxSampleWindowSize", 30), this.getValueFromInitConfig("publishStats", "maxSamplePushInterval", 300)), (e = this.getWebrtcInternals()) == null || e.start()), this.isFlagEnabled("subscribeStats") && (this.subscribeStatsAnalytics = new Wt(this.store, this.eventBus, this.getValueFromInitConfig("subscribeStats", "maxSampleWindowSize", 10), this.getValueFromInitConfig("subscribeStats", "maxSamplePushInterval", 60)), (t2 = this.getWebrtcInternals()) == null || t2.start());
29379
29378
  }
29380
29379
  getValueFromInitConfig(e, t2, i2) {
29381
29380
  var r2, s2;
@@ -29430,17 +29429,18 @@ var init_dist = __esm({
29430
29429
  }
29431
29430
  getAdditionalAnalyticsProperties() {
29432
29431
  var o2, n2, l2, u2, p2, h2, T, g2;
29433
- let e = Ba(), t2 = typeof document != "undefined" && document.hidden, i2 = this.store.getRemoteVideoTracks().filter((f2) => f2.degraded).length, r2 = (u2 = (l2 = (n2 = (o2 = this.getWebrtcInternals()) == null ? void 0 : o2.getCurrentStats()) == null ? void 0 : n2.getLocalPeerStats()) == null ? void 0 : l2.publish) == null ? void 0 : u2.bitrate, s2 = (g2 = (T = (h2 = (p2 = this.getWebrtcInternals()) == null ? void 0 : p2.getCurrentStats()) == null ? void 0 : h2.getLocalPeerStats()) == null ? void 0 : T.subscribe) == null ? void 0 : g2.bitrate;
29432
+ let e = Va(), t2 = typeof document != "undefined" && document.hidden, i2 = this.store.getRemoteVideoTracks().filter((v2) => v2.degraded).length, r2 = (u2 = (l2 = (n2 = (o2 = this.getWebrtcInternals()) == null ? void 0 : o2.getCurrentStats()) == null ? void 0 : n2.getLocalPeerStats()) == null ? void 0 : l2.publish) == null ? void 0 : u2.bitrate, s2 = (g2 = (T = (h2 = (p2 = this.getWebrtcInternals()) == null ? void 0 : p2.getCurrentStats()) == null ? void 0 : h2.getLocalPeerStats()) == null ? void 0 : T.subscribe) == null ? void 0 : g2.bitrate;
29434
29433
  return { network_info: e, document_hidden: t2, num_degraded_tracks: i2, bitrate: { publish: r2, subscribe: s2 }, max_sub_bitrate: this.maxSubscribeBitrate, recent_pong_response_times: this.signal.getPongResponseTimes(), transport_state: this.state };
29435
29434
  }
29436
29435
  };
29437
- Fa = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
29436
+ Ga = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
29438
29437
  hr = class {
29439
29438
  constructor() {
29440
29439
  this.TAG = "[HMSSdk]:";
29441
29440
  this.transportState = "Disconnected";
29442
- this.analyticsTimer = new di();
29443
- this.sdkState = m({}, Fa);
29441
+ this.analyticsTimer = new ci();
29442
+ this.sdkState = m({}, Ga);
29443
+ this.isDiagnostics = false;
29444
29444
  this.playlistSettings = { video: { bitrate: Dr }, audio: { bitrate: wr } };
29445
29445
  this.handleAutoplayError = (e) => {
29446
29446
  var t2, i2;
@@ -29509,7 +29509,7 @@ var init_dist = __esm({
29509
29509
  var s2, o2, n2, l2;
29510
29510
  if (e.error && e.type) {
29511
29511
  let u2 = e.type.includes("audio") ? (s2 = this.localPeer) == null ? void 0 : s2.audioTrack : (o2 = this.localPeer) == null ? void 0 : o2.videoTrack;
29512
- (n2 = this.errorListener) == null || n2.onError(e.error), [E2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, E2.TracksErrors.DEVICE_IN_USE, E2.TracksErrors.DEVICE_NOT_AVAILABLE].includes(e.error.code) && u2 && (u2.setEnabled(false), (l2 = this.listener) == null || l2.onTrackUpdate(2, u2, this.localPeer));
29512
+ (n2 = this.errorListener) == null || n2.onError(e.error), [k2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, k2.TracksErrors.DEVICE_IN_USE, k2.TracksErrors.DEVICE_NOT_AVAILABLE].includes(e.error.code) && u2 && (u2.setEnabled(false), (l2 = this.listener) == null || l2.onTrackUpdate(2, u2, this.localPeer));
29513
29513
  }
29514
29514
  })();
29515
29515
  };
@@ -29524,7 +29524,7 @@ var init_dist = __esm({
29524
29524
  this.sendAudioPresenceFailed = () => {
29525
29525
  var t2;
29526
29526
  let e = S2.TracksErrors.NoAudioDetected("PREVIEW");
29527
- d2.w(this.TAG, "Audio Presence Failure", this.transportState, e), (t2 = this.listener) == null || t2.onError(e);
29527
+ d2.w(this.TAG, "Audio Presence Failure", this.transportState, e), this.isDiagnostics && ((t2 = this.listener) == null || t2.onError(e));
29528
29528
  };
29529
29529
  this.sendJoinAnalyticsEvent = (e = false, t2) => {
29530
29530
  this.eventBus.analytics.publish(y2.join(M2(m({ error: t2 }, this.analyticsTimer.getTimes()), { time: this.analyticsTimer.getTimeTaken("join_time"), is_preview_called: e, retries_join: this.transport.joinRetryCount })));
@@ -29533,11 +29533,11 @@ var init_dist = __esm({
29533
29533
  this.eventBus.analytics.publish(y2.preview(M2(m({ error: e }, this.analyticsTimer.getTimes()), { time: this.analyticsTimer.getTimeTaken("preview_time") })));
29534
29534
  };
29535
29535
  this.sendAnalyticsEvent = (e) => {
29536
- this.listener.onInitSuccess || this.analyticsEventsService.queue(e).flush();
29536
+ this.isDiagnostics || this.analyticsEventsService.queue(e).flush();
29537
29537
  };
29538
29538
  }
29539
29539
  initNotificationManager() {
29540
- this.notificationManager || (this.notificationManager = new Zi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29540
+ this.notificationManager || (this.notificationManager = new Xi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29541
29541
  }
29542
29542
  initStoreAndManagers(e) {
29543
29543
  var t2, i2;
@@ -29545,7 +29545,7 @@ var init_dist = __esm({
29545
29545
  (i2 = this.notificationManager) == null || i2.setListener(this.listener), this.audioSinkManager.setListener(this.listener), this.interactivityCenter.setListener(this.listener);
29546
29546
  return;
29547
29547
  }
29548
- this.sdkState.isInitialised = true, this.store = new Ot(), this.eventBus = new Bt(), this.pluginUsageTracker = new xi(this.eventBus), this.wakeLockManager = new Ni(), this.networkTestManager = new _i(this.eventBus, this.listener), this.playlistManager = new Rt(this, this.eventBus), this.deviceManager = new Ut(this.store, this.eventBus), this.audioSinkManager = new xt(this.store, this.deviceManager, this.eventBus), this.audioOutput = new Ui(this.deviceManager, this.audioSinkManager), this.audioSinkManager.setListener(this.listener), this.eventBus.autoplayError.subscribe(this.handleAutoplayError), this.localTrackManager = new ve(this.store, this.observer, this.deviceManager, this.eventBus, this.analyticsTimer), this.analyticsEventsService = new Oi(this.store), this.transport = new Yt(this.observer, this.deviceManager, this.store, this.eventBus, this.analyticsEventsService, this.analyticsTimer, this.pluginUsageTracker), e.onInitSuccess && this.transport.setConnectivityListener(e), this.sessionStore = new er(this.transport), this.interactivityCenter = new Ft(this.transport, this.store, this.listener), this.eventBus.analytics.subscribe(this.sendAnalyticsEvent), this.eventBus.deviceChange.subscribe(this.handleDeviceChange), this.eventBus.audioPluginFailed.subscribe(this.handleAudioPluginError);
29548
+ this.sdkState.isInitialised = true, this.store = new Nt(), this.eventBus = new Ut(), this.pluginUsageTracker = new Oi(this.eventBus), this.wakeLockManager = new _i(), this.networkTestManager = new wi(this.eventBus, this.listener), this.playlistManager = new bt(this, this.eventBus), this.deviceManager = new xt(this.store, this.eventBus), this.audioSinkManager = new Ot(this.store, this.deviceManager, this.eventBus), this.audioOutput = new xi(this.deviceManager, this.audioSinkManager), this.audioSinkManager.setListener(this.listener), this.eventBus.autoplayError.subscribe(this.handleAutoplayError), this.localTrackManager = new ve(this.store, this.observer, this.deviceManager, this.eventBus, this.analyticsTimer), this.analyticsEventsService = new Ni(this.store), this.transport = new zt(this.observer, this.deviceManager, this.store, this.eventBus, this.analyticsEventsService, this.analyticsTimer, this.pluginUsageTracker), "onInitSuccess" in e && this.transport.setConnectivityListener(e), this.sessionStore = new Zi(this.transport), this.interactivityCenter = new Vt(this.transport, this.store, this.listener), this.eventBus.analytics.subscribe(this.sendAnalyticsEvent), this.eventBus.deviceChange.subscribe(this.handleDeviceChange), this.eventBus.audioPluginFailed.subscribe(this.handleAudioPluginError);
29549
29549
  }
29550
29550
  validateJoined(e) {
29551
29551
  if (!this.localPeer)
@@ -29592,7 +29592,7 @@ var init_dist = __esm({
29592
29592
  return this.interactivityCenter;
29593
29593
  }
29594
29594
  getPeerListIterator(e) {
29595
- return new mi(this.transport, this.store, e);
29595
+ return new hi(this.transport, this.store, e);
29596
29596
  }
29597
29597
  updatePlaylistSettings(e) {
29598
29598
  e.video && Object.assign(this.playlistSettings.video, e.video), e.audio && Object.assign(this.playlistSettings.audio, e.audio);
@@ -29603,7 +29603,7 @@ var init_dist = __esm({
29603
29603
  }
29604
29604
  preview(e, t2) {
29605
29605
  return c2(this, null, function* () {
29606
- if (Tt(), gt(), this.sdkState.isPreviewInProgress)
29606
+ if (gt(), St(), this.sdkState.isPreviewInProgress)
29607
29607
  return Promise.reject(S2.GenericErrors.PreviewAlreadyInProgress("PREVIEW", "Preview already called"));
29608
29608
  if (["Joined", "Reconnecting"].includes(this.transportState))
29609
29609
  return this.midCallPreview(e.asRole, e.settings);
@@ -29663,17 +29663,17 @@ var init_dist = __esm({
29663
29663
  join(e, t2) {
29664
29664
  return c2(this, null, function* () {
29665
29665
  var l2, u2, p2, h2, T, g2;
29666
- if (Tt(), gt(), this.sdkState.isPreviewInProgress)
29666
+ if (gt(), St(), this.sdkState.isPreviewInProgress)
29667
29667
  throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
29668
29668
  this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
29669
- let { roomId: i2, userId: r2, role: s2 } = nt(e.authToken), o2 = ((u2 = (l2 = this.localPeer) == null ? void 0 : l2.asRole) == null ? void 0 : u2.name) || ((h2 = (p2 = this.localPeer) == null ? void 0 : p2.role) == null ? void 0 : h2.name);
29669
+ let { roomId: i2, userId: r2, role: s2 } = pr(e.authToken), o2 = ((u2 = (l2 = this.localPeer) == null ? void 0 : l2.asRole) == null ? void 0 : u2.name) || ((h2 = (p2 = this.localPeer) == null ? void 0 : p2.role) == null ? void 0 : h2.name);
29670
29670
  (T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), He.resumeContext();
29671
29671
  let n2 = this.store.getConfig();
29672
- n2 != null && n2.autoManageWakeLock && this.wakeLockManager.acquireLock(), this.localPeer ? (this.localPeer.name = e.userName, this.localPeer.role = this.store.getPolicyForRole(s2), this.localPeer.customerUserId = r2, this.localPeer.metadata = e.metaData, delete this.localPeer.asRole) : this.createAndAddLocalPeerToStore(e, s2, r2), this.roleChangeManager = new _t(this.store, this.transport, this.deviceManager, this.getAndPublishTracks.bind(this), this.removeTrack.bind(this), this.listener), this.eventBus.localRoleUpdate.subscribe(this.handleLocalRoleUpdate), d2.d(this.TAG, `\u23F3 Joining room ${i2}`), d2.time(`join-room-${i2}`);
29672
+ n2 != null && n2.autoManageWakeLock && this.wakeLockManager.acquireLock(), this.localPeer ? (this.localPeer.name = e.userName, this.localPeer.role = this.store.getPolicyForRole(s2), this.localPeer.customerUserId = r2, this.localPeer.metadata = e.metaData, delete this.localPeer.asRole) : this.createAndAddLocalPeerToStore(e, s2, r2), this.roleChangeManager = new wt(this.store, this.transport, this.deviceManager, this.getAndPublishTracks.bind(this), this.removeTrack.bind(this), this.listener), this.eventBus.localRoleUpdate.subscribe(this.handleLocalRoleUpdate), d2.d(this.TAG, `\u23F3 Joining room ${i2}`), d2.time(`join-room-${i2}`);
29673
29673
  try {
29674
29674
  yield this.transport.join(e.authToken, this.localPeer.peerId, { name: e.userName, metaData: e.metaData }, e.initEndpoint, e.autoVideoSubscribe, e.iceServers), d2.d(this.TAG, `\u2705 Joined room ${i2}`), this.analyticsTimer.start("peer_list_time"), yield this.notifyJoin(), this.sdkState.isJoinInProgress = false, yield this.publish(e.settings, o2);
29675
- } catch (f2) {
29676
- throw this.analyticsTimer.end("join_time"), this.sdkState.isJoinInProgress = false, (g2 = this.listener) == null || g2.onError(f2), this.sendJoinAnalyticsEvent(this.sdkState.isPreviewCalled, f2), d2.e(this.TAG, "Unable to join room", f2), f2;
29675
+ } catch (v2) {
29676
+ throw this.analyticsTimer.end("join_time"), this.sdkState.isJoinInProgress = false, (g2 = this.listener) == null || g2.onError(v2), this.sendJoinAnalyticsEvent(this.sdkState.isPreviewCalled, v2), d2.e(this.TAG, "Unable to join room", v2), v2;
29677
29677
  }
29678
29678
  d2.timeEnd(`join-room-${i2}`);
29679
29679
  });
@@ -29683,7 +29683,7 @@ var init_dist = __esm({
29683
29683
  }
29684
29684
  cleanup() {
29685
29685
  var e, t2, i2;
29686
- this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(), Q2.cleanup(), this.playlistManager.cleanup(), (e = this.wakeLockManager) == null || e.cleanup(), ve.cleanup(), this.notificationManager = void 0, d2.cleanup(), this.sdkState = m({}, Fa), this.localPeer && ((t2 = this.localPeer.audioTrack) == null || t2.cleanup(), this.localPeer.audioTrack = void 0, (i2 = this.localPeer.videoTrack) == null || i2.cleanup(), this.localPeer.videoTrack = void 0), this.store.cleanup(), this.listener = void 0, this.roleChangeManager && this.eventBus.localRoleUpdate.unsubscribe(this.handleLocalRoleUpdate);
29686
+ this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(), Q2.cleanup(), this.playlistManager.cleanup(), (e = this.wakeLockManager) == null || e.cleanup(), ve.cleanup(), this.notificationManager = void 0, d2.cleanup(), this.sdkState = m({}, Ga), this.localPeer && ((t2 = this.localPeer.audioTrack) == null || t2.cleanup(), this.localPeer.audioTrack = void 0, (i2 = this.localPeer.videoTrack) == null || i2.cleanup(), this.localPeer.videoTrack = void 0), this.store.cleanup(), this.listener = void 0, this.roleChangeManager && this.eventBus.localRoleUpdate.unsubscribe(this.handleLocalRoleUpdate);
29687
29687
  }
29688
29688
  leave(e) {
29689
29689
  return this.internalLeave(e);
@@ -29706,7 +29706,7 @@ var init_dist = __esm({
29706
29706
  return c2(this, null, function* () {
29707
29707
  let i2 = (t2 || {}).endpoint || "https://auth.100ms.live/v2/token";
29708
29708
  this.analyticsTimer.start("GET_TOKEN");
29709
- let r2 = yield Li(i2, { method: "POST", body: JSON.stringify({ code: e.roomCode, user_id: e.userId }) }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), s2 = yield r2.json();
29709
+ let r2 = yield Ci(i2, { method: "POST", body: JSON.stringify({ code: e.roomCode, user_id: e.userId }) }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), s2 = yield r2.json();
29710
29710
  if (this.analyticsTimer.end("GET_TOKEN"), !r2.ok)
29711
29711
  throw S2.APIErrors.ServerErrors(s2.code, "GET_TOKEN", s2.message, false);
29712
29712
  let { token: o2 } = s2;
@@ -29833,7 +29833,7 @@ var init_dist = __esm({
29833
29833
  throw S2.GenericErrors.NotConnected("VALIDATION", "No local peer present, cannot addTrack");
29834
29834
  if (this.localPeer.auxiliaryTracks.find((g2) => g2.trackId === e.id))
29835
29835
  return;
29836
- let r2 = e.kind, s2 = new MediaStream([e]), o2 = new We(s2), n2 = r2 === "audio" ? ce : F, l2 = new n2(o2, e, t2, this.eventBus);
29836
+ let r2 = e.kind, s2 = new MediaStream([e]), o2 = new Ge(s2), n2 = r2 === "audio" ? ce : F, l2 = new n2(o2, e, t2, this.eventBus);
29837
29837
  this.setPlaylistSettings({ track: e, hmsTrack: l2, source: t2 }), yield (u2 = this.transport) == null ? void 0 : u2.publish([l2]), l2.peerId = (p2 = this.localPeer) == null ? void 0 : p2.peerId, (h2 = this.localPeer) == null || h2.auxiliaryTracks.push(l2), (T = this.listener) == null || T.onTrackUpdate(0, l2, this.localPeer);
29838
29838
  });
29839
29839
  }
@@ -29864,6 +29864,9 @@ var init_dist = __esm({
29864
29864
  var t2;
29865
29865
  (t2 = this.notificationManager) == null || t2.setConnectionQualityListener(e);
29866
29866
  }
29867
+ setIsDiagnostics(e) {
29868
+ this.isDiagnostics = e;
29869
+ }
29867
29870
  changeRole(e, t2, i2 = false) {
29868
29871
  return c2(this, null, function* () {
29869
29872
  var r2;
@@ -30076,7 +30079,7 @@ var init_dist = __esm({
30076
30079
  publish(e, t2) {
30077
30080
  return c2(this, null, function* () {
30078
30081
  var i2, r2, s2;
30079
- if ([this.store.getPublishParams(), !this.sdkState.published, !Be].every((o2) => !!o2)) {
30082
+ if ([this.store.getPublishParams(), !this.sdkState.published, !Ue].every((o2) => !!o2)) {
30080
30083
  let o2 = t2 && t2 !== ((r2 = (i2 = this.localPeer) == null ? void 0 : i2.role) == null ? void 0 : r2.name) ? () => {
30081
30084
  var n2;
30082
30085
  return (n2 = this.roleChangeManager) == null ? void 0 : n2.diffRolesAndPublishTracks({ oldRole: this.store.getPolicyForRole(t2), newRole: this.localPeer.role });
@@ -30154,7 +30157,7 @@ var init_dist = __esm({
30154
30157
  }
30155
30158
  setUpPreview(e, t2) {
30156
30159
  this.sdkState.isPreviewCalled = true, this.sdkState.isPreviewInProgress = true;
30157
- let { roomId: i2, userId: r2, role: s2 } = nt(e.authToken);
30160
+ let { roomId: i2, userId: r2, role: s2 } = pr(e.authToken);
30158
30161
  this.commonSetup(e, i2, t2), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), this.createAndAddLocalPeerToStore(e, s2, r2, e.asRole);
30159
30162
  }
30160
30163
  setPlaylistSettings(r2) {
@@ -30175,11 +30178,11 @@ var init_dist = __esm({
30175
30178
  });
30176
30179
  }
30177
30180
  createAndAddLocalPeerToStore(e, t2, i2, r2) {
30178
- let s2 = this.store.getPolicyForRole(t2), o2 = r2 ? this.store.getPolicyForRole(r2) : void 0, n2 = new $e({ name: e.userName || "", customerUserId: i2, metadata: e.metaData || "", role: s2, asRole: o2 || s2, type: "regular" });
30181
+ let s2 = this.store.getPolicyForRole(t2), o2 = r2 ? this.store.getPolicyForRole(r2) : void 0, n2 = new We({ name: e.userName || "", customerUserId: i2, metadata: e.metaData || "", role: s2, asRole: o2 || s2, type: "regular" });
30179
30182
  this.store.addPeer(n2);
30180
30183
  }
30181
30184
  commonSetup(e, t2, i2) {
30182
- this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new Oe(t2));
30185
+ this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new Ke(t2));
30183
30186
  }
30184
30187
  removeDevicesFromConfig(e) {
30185
30188
  this.store.getConfig() && e.settings && (delete e.settings.audioOutputDeviceId, delete e.settings.videoDeviceId, delete e.settings.audioInputDeviceId);
@@ -30202,11 +30205,11 @@ var init_dist = __esm({
30202
30205
  e.source === "audioplaylist" ? this.playlistManager.stop("audio") : e.source === "videoplaylist" && this.playlistManager.stop("video");
30203
30206
  }
30204
30207
  };
30205
- ut = class a10 {
30208
+ lt = class a10 {
30206
30209
  constructor(e, t2, i2) {
30207
- this.getStats = () => (this.stats || (this.stats = new Xt(this.store, this.sdk)), this.stats);
30210
+ this.getStats = () => (this.stats || (this.stats = new Yt(this.store, this.sdk)), this.stats);
30208
30211
  this.getDiagnosticsSDK = () => (this.diagnostics || (this.diagnostics = this.actions.initDiagnostics()), this.diagnostics);
30209
- e ? this.store = e : this.store = a10.createNewHMSStore(wi("HMSStore"), ti), i2 ? this.notifications = i2 : this.notifications = new Pi(this.store), t2 ? this.actions = t2 : (this.sdk = new hr(), this.actions = new Di(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: Mr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
30212
+ e ? this.store = e : this.store = a10.createNewHMSStore(Di("HMSStore"), ei), i2 ? this.notifications = i2 : this.notifications = new ki(this.store), t2 ? this.actions = t2 : (this.sdk = new hr(), this.actions = new Li(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: Mr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
30210
30213
  }
30211
30214
  triggerOnSubscribe() {
30212
30215
  this.initialTriggerOnSubscribe || (a10.makeStoreTriggerOnSubscribe(this.store), this.initialTriggerOnSubscribe = true);
@@ -30283,22 +30286,22 @@ var init_dist = __esm({
30283
30286
  };
30284
30287
  }
30285
30288
  };
30286
- Wa = (a11, e, t2) => {
30289
+ $a = (a11, e, t2) => {
30287
30290
  let i2;
30288
- t2.getState(ie) === "Connected" && (i2 = Ga(a11, e, t2)), t2.subscribe((r2) => {
30289
- ["Connected", "Reconnecting"].includes(r2) ? i2 || (i2 = Ga(a11, e, t2)) : ["Disconnected", "Failed"].includes(r2) && i2 && (yn(e, r2), i2(), i2 = void 0);
30291
+ t2.getState(ie) === "Connected" && (i2 = Wa(a11, e, t2)), t2.subscribe((r2) => {
30292
+ ["Connected", "Reconnecting"].includes(r2) ? i2 || (i2 = Wa(a11, e, t2)) : ["Disconnected", "Failed"].includes(r2) && i2 && (kn(e, r2), i2(), i2 = void 0);
30290
30293
  }, ie);
30291
30294
  };
30292
- Ga = (a11, e, t2) => {
30295
+ Wa = (a11, e, t2) => {
30293
30296
  var s2, o2;
30294
- let i2 = vn2(t2, e);
30297
+ let i2 = Mn(t2, e);
30295
30298
  (s2 = a11.getWebrtcInternals()) == null || s2.start();
30296
- let r2 = (o2 = a11.getWebrtcInternals()) == null ? void 0 : o2.onStatsChange((n2) => Mn(e, n2, t2, a11));
30299
+ let r2 = (o2 = a11.getWebrtcInternals()) == null ? void 0 : o2.onStatsChange((n2) => yn(e, n2, t2, a11));
30297
30300
  return () => {
30298
30301
  i2(), r2 && r2();
30299
30302
  };
30300
30303
  };
30301
- vn2 = (a11, e) => {
30304
+ Mn = (a11, e) => {
30302
30305
  let t2, i2, r2;
30303
30306
  return a11.getState(ye) ? e.namedSetState((s2) => {
30304
30307
  s2.localPeer.id = a11.getState(ye);
@@ -30322,7 +30325,7 @@ var init_dist = __esm({
30322
30325
  t2 == null || t2(), i2 == null || i2(), r2 == null || r2();
30323
30326
  };
30324
30327
  };
30325
- Mn = (a11, e, t2, i2) => {
30328
+ yn = (a11, e, t2, i2) => {
30326
30329
  let r2 = t2.getState(N2);
30327
30330
  a11.namedSetState((s2) => {
30328
30331
  let o2 = t2.getState(ye), n2 = {}, l2 = Object.keys(r2).filter((p2) => r2[p2].peerId !== o2);
@@ -30332,19 +30335,19 @@ var init_dist = __esm({
30332
30335
  }
30333
30336
  Kr(s2.remoteTrackStats, n2);
30334
30337
  let u2 = { [o2]: e.getLocalPeerStats() };
30335
- Kr(s2.peerStats, u2), Ia(s2.localTrackStats, e.getLocalTrackStats(), i2.store.getLocalPeerTracks());
30338
+ Kr(s2.peerStats, u2), Aa(s2.localTrackStats, e.getLocalTrackStats(), i2.store.getLocalPeerTracks());
30336
30339
  }, "webrtc-stats");
30337
30340
  };
30338
- yn = (a11, e = "resetState") => {
30341
+ kn = (a11, e = "resetState") => {
30339
30342
  a11.namedSetState((t2) => {
30340
- Object.assign(t2, ii());
30343
+ Object.assign(t2, ti());
30341
30344
  }, e);
30342
30345
  };
30343
- Xt = class {
30346
+ Yt = class {
30344
30347
  constructor(e, t2) {
30345
30348
  this.hmsStore = e;
30346
30349
  this.sdk = t2;
30347
- this.store = ut.createNewHMSStore(wi("HMSStatsStore"), ii), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30350
+ this.store = lt.createNewHMSStore(Di("HMSStatsStore"), ti), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30348
30351
  var r2, s2;
30349
30352
  this.hmsStore.getState(ie) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
30350
30353
  var n2, l2;
@@ -30356,65 +30359,65 @@ var init_dist = __esm({
30356
30359
  var n2, l2;
30357
30360
  o2 === "Connected" && i2((l2 = (n2 = this.sdk) == null ? void 0 : n2.getWebrtcInternals()) == null ? void 0 : l2.getSubscribePeerConnection());
30358
30361
  }, ie);
30359
- }), this.sdk && Wa(this.sdk, this.store, this.hmsStore);
30362
+ }), this.sdk && $a(this.sdk, this.store, this.hmsStore);
30360
30363
  }
30361
30364
  };
30362
- kn = (a11) => a11.localPeer.id;
30363
- Pn = (a11) => a11.localPeer.audioTrack;
30364
- En = (a11) => a11.localPeer.videoTrack;
30365
- bn = (a11, e) => e;
30366
- $a = (a11, e) => e;
30367
- Rn = (a11) => a11.remoteTrackStats;
30368
- Ka = (a11) => a11.peerStats;
30365
+ Pn = (a11) => a11.localPeer.id;
30366
+ En = (a11) => a11.localPeer.audioTrack;
30367
+ bn = (a11) => a11.localPeer.videoTrack;
30368
+ Rn = (a11, e) => e;
30369
+ Ka = (a11, e) => e;
30370
+ In = (a11) => a11.remoteTrackStats;
30371
+ qa = (a11) => a11.peerStats;
30369
30372
  Zr = (a11) => a11.localTrackStats;
30370
- be = createSelector([Ka, kn], (a11, e) => a11[e]);
30371
- In = createSelector(be, (a11) => {
30373
+ be = createSelector([qa, Pn], (a11, e) => a11[e]);
30374
+ An = createSelector(be, (a11) => {
30372
30375
  var e;
30373
30376
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.packetsLost;
30374
30377
  });
30375
- An = createSelector(be, (a11) => {
30378
+ Hn = createSelector(be, (a11) => {
30376
30379
  var e;
30377
30380
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.jitter;
30378
30381
  });
30379
- Hn = createSelector(be, (a11) => {
30382
+ Cn = createSelector(be, (a11) => {
30380
30383
  var e;
30381
30384
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.bitrate;
30382
30385
  });
30383
- Cn = createSelector(be, (a11) => {
30386
+ Ln = createSelector(be, (a11) => {
30384
30387
  var e;
30385
30388
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.bitrate;
30386
30389
  });
30387
- Ln = createSelector(be, (a11) => {
30390
+ Dn = createSelector(be, (a11) => {
30388
30391
  var e;
30389
30392
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.availableOutgoingBitrate;
30390
30393
  });
30391
- Dn = createSelector(be, (a11) => {
30394
+ wn = createSelector(be, (a11) => {
30392
30395
  var e;
30393
30396
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.availableIncomingBitrate;
30394
30397
  });
30395
- wn = createSelector(be, (a11) => {
30398
+ _n = createSelector(be, (a11) => {
30396
30399
  var e;
30397
30400
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.bytesSent;
30398
30401
  });
30399
- _n = createSelector(be, (a11) => {
30402
+ Nn = createSelector(be, (a11) => {
30400
30403
  var e;
30401
30404
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.bytesReceived;
30402
30405
  });
30403
- Nn = createSelector([Ka, bn], (a11, e) => e ? a11[e] : void 0);
30404
- On = createSelector([Rn, $a], (a11, e) => e ? a11[e] : void 0);
30405
- es = createSelector([Zr, $a], (a11, e) => e ? a11[e] : void 0);
30406
- xn = A2(Nn);
30406
+ On = createSelector([qa, Rn], (a11, e) => e ? a11[e] : void 0);
30407
+ xn = createSelector([In, Ka], (a11, e) => e ? a11[e] : void 0);
30408
+ es = createSelector([Zr, Ka], (a11, e) => e ? a11[e] : void 0);
30407
30409
  Un = A2(On);
30408
- Bn = createSelector([Zr, Pn], (a11, e) => {
30410
+ Bn = A2(xn);
30411
+ Vn = createSelector([Zr, En], (a11, e) => {
30409
30412
  var t2;
30410
30413
  return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
30411
30414
  });
30412
- Vn = A2(createSelector(es, (a11) => a11 == null ? void 0 : a11[0]));
30413
- Fn = createSelector([Zr, En], (a11, e) => {
30415
+ Fn = A2(createSelector(es, (a11) => a11 == null ? void 0 : a11[0]));
30416
+ Gn = createSelector([Zr, bn], (a11, e) => {
30414
30417
  var t2;
30415
30418
  return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
30416
30419
  });
30417
- Gn = A2(createSelector(es, (a11) => a11));
30420
+ Wn = A2(createSelector(es, (a11) => a11));
30418
30421
  }
30419
30422
  });
30420
30423
 
@@ -36883,7 +36886,7 @@ var init_Chat = __esm({
36883
36886
  const listRef = (0, import_react149.useRef)(null);
36884
36887
  const hmsActions2 = (0, import_react_sdk73.useHMSActions)();
36885
36888
  const vanillaStore = (0, import_react_sdk73.useHMSVanillaStore)();
36886
- const { enabled: isChatEnabled = true } = (0, import_react_sdk73.useHMSStore)(xm("chatState" /* CHAT_STATE */)) || {};
36889
+ const { enabled: isChatEnabled = true } = (0, import_react_sdk73.useHMSStore)(Bm("chatState" /* CHAT_STATE */)) || {};
36887
36890
  const isMobile = (0, import_react_use24.useMedia)(config.media.md);
36888
36891
  const isMobileHLSStream = useMobileHLSStream();
36889
36892
  const isLandscapeStream = useLandscapeHLSStream();
@@ -36973,7 +36976,7 @@ var init_Chat = __esm({
36973
36976
  scrollToBottom,
36974
36977
  listRef
36975
36978
  }) => {
36976
- const unreadCount = (0, import_react_sdk73.useHMSStore)(om);
36979
+ const unreadCount = (0, import_react_sdk73.useHMSStore)(cm);
36977
36980
  if (!unreadCount || !listRef.current) {
36978
36981
  return null;
36979
36982
  }
@@ -38188,12 +38191,12 @@ var init_VBPicker = __esm({
38188
38191
  const [blurAmount, setBlurAmount] = (0, import_react159.useState)(VBHandler.getBlurAmount() || 0.5);
38189
38192
  const roomState = (0, import_react_sdk81.useHMSStore)(import_react_sdk81.selectRoomState);
38190
38193
  const isLargeRoom = (0, import_react_sdk81.useHMSStore)(import_react_sdk81.selectIsLargeRoom);
38191
- const isEffectsEnabled = (0, import_react_sdk81.useHMSStore)(vm);
38192
- const effectsKey = (0, import_react_sdk81.useHMSStore)(Mm);
38194
+ const isEffectsEnabled = (0, import_react_sdk81.useHMSStore)(ym);
38195
+ const effectsKey = (0, import_react_sdk81.useHMSStore)(km);
38193
38196
  const isMobile = (0, import_react_use30.useMedia)(config.media.md);
38194
38197
  const [loadingEffects, setLoadingEffects] = useSetAppDataByKey(APP_DATA.loadingEffects);
38195
38198
  const isPluginAdded = (0, import_react_sdk81.useHMSStore)((0, import_react_sdk81.selectIsLocalVideoPluginPresent)(((_a8 = VBHandler) == null ? void 0 : _a8.getName()) || ""));
38196
- const background = (0, import_react_sdk81.useHMSStore)(Om(APP_DATA.background));
38199
+ const background = (0, import_react_sdk81.useHMSStore)(Um(APP_DATA.background));
38197
38200
  const mediaList = backgroundMedia.length ? backgroundMedia.map((media) => media.url || "") : defaultMedia2;
38198
38201
  const inPreview = roomState === import_react_sdk81.HMSRoomState.Preview;
38199
38202
  const showVideoTile = isVideoOn && isLargeRoom && !inPreview;
@@ -40120,9 +40123,9 @@ var init_ScreenshareLayout = __esm({
40120
40123
  }
40121
40124
  });
40122
40125
 
40123
- // ../../../../../../../tmp/tmp-2968-qBDqAe9kdYHs/1903acfa61c0/index.css
40124
- var init_acfa61c0 = __esm({
40125
- "../../../../../../../tmp/tmp-2968-qBDqAe9kdYHs/1903acfa61c0/index.css"() {
40126
+ // ../../../../../../../tmp/tmp-2815-lzHDPVmI0tsz/1904f2f03760/index.css
40127
+ var init_f2f03760 = __esm({
40128
+ "../../../../../../../tmp/tmp-2815-lzHDPVmI0tsz/1904f2f03760/index.css"() {
40126
40129
  }
40127
40130
  });
40128
40131
 
@@ -40144,7 +40147,7 @@ var init_WhiteboardLayout = __esm({
40144
40147
  init_ProminenceLayout();
40145
40148
  init_useUISettings();
40146
40149
  init_constants();
40147
- init_acfa61c0();
40150
+ init_f2f03760();
40148
40151
  WhiteboardEmbed = () => {
40149
40152
  const isMobile = (0, import_react_use42.useMedia)(config.media.md);
40150
40153
  const { token, endpoint, zoomToContent } = (0, import_react_sdk93.useWhiteboard)(isMobile);
@@ -45322,7 +45325,7 @@ var init_hms = __esm({
45322
45325
  "use strict";
45323
45326
  init_define_process_env();
45324
45327
  init_dist();
45325
- hms = new ut();
45328
+ hms = new lt();
45326
45329
  hmsStore = hms.getStore();
45327
45330
  hmsActions = hms.getActions();
45328
45331
  hmsNotifications = hms.getNotifications();
@@ -45414,10 +45417,10 @@ var require_react_is_production_min = __commonJS({
45414
45417
  var c3 = b3 ? Symbol.for("react.element") : 60103;
45415
45418
  var d3 = b3 ? Symbol.for("react.portal") : 60106;
45416
45419
  var e = b3 ? Symbol.for("react.fragment") : 60107;
45417
- var f2 = b3 ? Symbol.for("react.strict_mode") : 60108;
45420
+ var f3 = b3 ? Symbol.for("react.strict_mode") : 60108;
45418
45421
  var g2 = b3 ? Symbol.for("react.profiler") : 60114;
45419
45422
  var h2 = b3 ? Symbol.for("react.provider") : 60109;
45420
- var k2 = b3 ? Symbol.for("react.context") : 60110;
45423
+ var k3 = b3 ? Symbol.for("react.context") : 60110;
45421
45424
  var l2 = b3 ? Symbol.for("react.async_mode") : 60111;
45422
45425
  var m2 = b3 ? Symbol.for("react.concurrent_mode") : 60111;
45423
45426
  var n2 = b3 ? Symbol.for("react.forward_ref") : 60112;
@@ -45425,7 +45428,7 @@ var require_react_is_production_min = __commonJS({
45425
45428
  var q3 = b3 ? Symbol.for("react.suspense_list") : 60120;
45426
45429
  var r2 = b3 ? Symbol.for("react.memo") : 60115;
45427
45430
  var t2 = b3 ? Symbol.for("react.lazy") : 60116;
45428
- var v3 = b3 ? Symbol.for("react.block") : 60121;
45431
+ var v2 = b3 ? Symbol.for("react.block") : 60121;
45429
45432
  var w2 = b3 ? Symbol.for("react.fundamental") : 60117;
45430
45433
  var x2 = b3 ? Symbol.for("react.responder") : 60118;
45431
45434
  var y3 = b3 ? Symbol.for("react.scope") : 60119;
@@ -45439,12 +45442,12 @@ var require_react_is_production_min = __commonJS({
45439
45442
  case m2:
45440
45443
  case e:
45441
45444
  case g2:
45442
- case f2:
45445
+ case f3:
45443
45446
  case p2:
45444
45447
  return a11;
45445
45448
  default:
45446
45449
  switch (a11 = a11 && a11.$$typeof, a11) {
45447
- case k2:
45450
+ case k3:
45448
45451
  case n2:
45449
45452
  case t2:
45450
45453
  case r2:
@@ -45464,7 +45467,7 @@ var require_react_is_production_min = __commonJS({
45464
45467
  }
45465
45468
  exports.AsyncMode = l2;
45466
45469
  exports.ConcurrentMode = m2;
45467
- exports.ContextConsumer = k2;
45470
+ exports.ContextConsumer = k3;
45468
45471
  exports.ContextProvider = h2;
45469
45472
  exports.Element = c3;
45470
45473
  exports.ForwardRef = n2;
@@ -45473,14 +45476,14 @@ var require_react_is_production_min = __commonJS({
45473
45476
  exports.Memo = r2;
45474
45477
  exports.Portal = d3;
45475
45478
  exports.Profiler = g2;
45476
- exports.StrictMode = f2;
45479
+ exports.StrictMode = f3;
45477
45480
  exports.Suspense = p2;
45478
45481
  exports.isAsyncMode = function(a11) {
45479
45482
  return A3(a11) || z3(a11) === l2;
45480
45483
  };
45481
45484
  exports.isConcurrentMode = A3;
45482
45485
  exports.isContextConsumer = function(a11) {
45483
- return z3(a11) === k2;
45486
+ return z3(a11) === k3;
45484
45487
  };
45485
45488
  exports.isContextProvider = function(a11) {
45486
45489
  return z3(a11) === h2;
@@ -45507,13 +45510,13 @@ var require_react_is_production_min = __commonJS({
45507
45510
  return z3(a11) === g2;
45508
45511
  };
45509
45512
  exports.isStrictMode = function(a11) {
45510
- return z3(a11) === f2;
45513
+ return z3(a11) === f3;
45511
45514
  };
45512
45515
  exports.isSuspense = function(a11) {
45513
45516
  return z3(a11) === p2;
45514
45517
  };
45515
45518
  exports.isValidElementType = function(a11) {
45516
- return "string" === typeof a11 || "function" === typeof a11 || a11 === e || a11 === m2 || a11 === g2 || a11 === f2 || a11 === p2 || a11 === q3 || "object" === typeof a11 && null !== a11 && (a11.$$typeof === t2 || a11.$$typeof === r2 || a11.$$typeof === h2 || a11.$$typeof === k2 || a11.$$typeof === n2 || a11.$$typeof === w2 || a11.$$typeof === x2 || a11.$$typeof === y3 || a11.$$typeof === v3);
45519
+ return "string" === typeof a11 || "function" === typeof a11 || a11 === e || a11 === m2 || a11 === g2 || a11 === f3 || a11 === p2 || a11 === q3 || "object" === typeof a11 && null !== a11 && (a11.$$typeof === t2 || a11.$$typeof === r2 || a11.$$typeof === h2 || a11.$$typeof === k3 || a11.$$typeof === n2 || a11.$$typeof === w2 || a11.$$typeof === x2 || a11.$$typeof === y3 || a11.$$typeof === v2);
45517
45520
  };
45518
45521
  exports.typeOf = z3;
45519
45522
  }
@@ -46817,7 +46820,7 @@ var init_ConnectivityTest = __esm({
46817
46820
  return /* @__PURE__ */ import_react243.default.createElement(import_react243.default.Fragment, null, /* @__PURE__ */ import_react243.default.createElement(TestContainer, null, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$on_primary_medium" } }, "Connectivity test has been completed."), /* @__PURE__ */ import_react243.default.createElement(SignallingResult, { result: result == null ? void 0 : result.signallingReport }), /* @__PURE__ */ import_react243.default.createElement(MediaServerResult, { result: result == null ? void 0 : result.mediaServerReport }), /* @__PURE__ */ import_react243.default.createElement(AudioStats, { stats: (_b7 = (_a8 = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _a8.stats) == null ? void 0 : _b7.audio }), /* @__PURE__ */ import_react243.default.createElement(VideoStats, { stats: (_d = (_c = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _c.stats) == null ? void 0 : _d.video })), /* @__PURE__ */ import_react243.default.createElement(Footer3, { result, restart: startTest, error }));
46818
46821
  }
46819
46822
  if (progress !== void 0) {
46820
- return /* @__PURE__ */ import_react243.default.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$primary_bright" } }, /* @__PURE__ */ import_react243.default.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ import_react243.default.createElement(
46823
+ return /* @__PURE__ */ import_react243.default.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$primary_bright", textAlign: "center" } }, /* @__PURE__ */ import_react243.default.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ import_react243.default.createElement(
46821
46824
  Text,
46822
46825
  {
46823
46826
  variant: "body2",