@100mslive/roomkit-react 0.3.14-alpha.6 → 0.3.14-alpha.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,8 +34,8 @@ var __objRest = (source, exclude) => {
34
34
  }
35
35
  return target;
36
36
  };
37
- var __esm = (fn3, res) => function __init() {
38
- return fn3 && (res = (0, fn3[__getOwnPropNames(fn3)[0]])(fn3 = 0)), res;
37
+ var __esm = (fn2, res) => function __init() {
38
+ return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res;
39
39
  };
40
40
  var __commonJS = (cb, mod) => function __require() {
41
41
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
@@ -107,7 +107,7 @@ var __async = (__this, __arguments, generator) => {
107
107
  var define_process_env_default;
108
108
  var init_define_process_env = __esm({
109
109
  "<define:process.env>"() {
110
- define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_edbcd26e-c393-4a06-9c63-460e7bf573b2", 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.6", 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.6", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_edbcd26e-c393-4a06-9c63-460e7bf573b2", 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.6", 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: "592", 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:19799", 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.6", 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: "9597213335", 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: "66c83d117ead187aeacea1da6e46e90a42bbc9d5", 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: "cee48422229fee953e8e086e54d4fa203a64dd5ae1b8dc4744d51aee0d7125a5", npm_package_exports___import: "./dist/index.js", 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--1718885760966-0.5857043603210648:/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--1718885760771-0.5932669820388576:/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--1718885735154-0.9330554665523483:/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--1718885734974-0.16452677320094344:/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_9c510c30-777e-4fbf-97c8-a3f8a69e2de8", INVOCATION_ID: "5e98cbd253ca4116b5e9af64fcd9d695", 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: "583", 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 483", 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.6", 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.6", 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: "66c83d117ead187aeacea1da6e46e90a42bbc9d5", 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_edbcd26e-c393-4a06-9c63-460e7bf573b2", 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_edbcd26e-c393-4a06-9c63-460e7bf573b2", 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_edbcd26e-c393-4a06-9c63-460e7bf573b2" };
110
+ define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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.7", 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.7", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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.7", 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: "592", 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:17308", 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.7", 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: "9598388267", 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: "c57e858bbc09c5b82722610c4ae0fcf200e61161", 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: "2c40941210fdfcce83d8f8ea6e75595dc23825a6d30d1f8b04ee1d5c13c011e8", npm_package_exports___import: "./dist/index.js", 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--1718890248699-0.19677626630198497:/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--1718890248506-0.34564658162174067:/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--1718890223199-0.8761704666839227:/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--1718890223022-0.05784877896719243:/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_a00aa94b-086d-4f59-aff2-64b17cc8cc39", INVOCATION_ID: "ddaa7297c32e4415969cd4dbdf7c4640", 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: "584", 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 361", 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.7", 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.7", 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: "c57e858bbc09c5b82722610c4ae0fcf200e61161", 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_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe" };
111
111
  }
112
112
  });
113
113
 
@@ -2286,8 +2286,8 @@ var require_lodash = __commonJS({
2286
2286
  function createBind(func, bitmask, thisArg) {
2287
2287
  var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
2288
2288
  function wrapper() {
2289
- var fn3 = this && this !== root && this instanceof wrapper ? Ctor : func;
2290
- return fn3.apply(isBind ? thisArg : this, arguments);
2289
+ var fn2 = this && this !== root && this instanceof wrapper ? Ctor : func;
2290
+ return fn2.apply(isBind ? thisArg : this, arguments);
2291
2291
  }
2292
2292
  return wrapper;
2293
2293
  }
@@ -2353,8 +2353,8 @@ var require_lodash = __commonJS({
2353
2353
  arity - length
2354
2354
  );
2355
2355
  }
2356
- var fn3 = this && this !== root && this instanceof wrapper ? Ctor : func;
2357
- return apply(fn3, this, args);
2356
+ var fn2 = this && this !== root && this instanceof wrapper ? Ctor : func;
2357
+ return apply(fn2, this, args);
2358
2358
  }
2359
2359
  return wrapper;
2360
2360
  }
@@ -2442,7 +2442,7 @@ var require_lodash = __commonJS({
2442
2442
  arity - length
2443
2443
  );
2444
2444
  }
2445
- var thisBinding = isBind ? thisArg : this, fn3 = isBindKey ? thisBinding[func] : func;
2445
+ var thisBinding = isBind ? thisArg : this, fn2 = isBindKey ? thisBinding[func] : func;
2446
2446
  length = args.length;
2447
2447
  if (argPos) {
2448
2448
  args = reorder(args, argPos);
@@ -2453,9 +2453,9 @@ var require_lodash = __commonJS({
2453
2453
  args.length = ary2;
2454
2454
  }
2455
2455
  if (this && this !== root && this instanceof wrapper) {
2456
- fn3 = Ctor || createCtor(fn3);
2456
+ fn2 = Ctor || createCtor(fn2);
2457
2457
  }
2458
- return fn3.apply(thisBinding, args);
2458
+ return fn2.apply(thisBinding, args);
2459
2459
  }
2460
2460
  return wrapper;
2461
2461
  }
@@ -2512,14 +2512,14 @@ var require_lodash = __commonJS({
2512
2512
  function createPartial(func, bitmask, thisArg, partials) {
2513
2513
  var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
2514
2514
  function wrapper() {
2515
- var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn3 = this && this !== root && this instanceof wrapper ? Ctor : func;
2515
+ var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn2 = this && this !== root && this instanceof wrapper ? Ctor : func;
2516
2516
  while (++leftIndex < leftLength) {
2517
2517
  args[leftIndex] = partials[leftIndex];
2518
2518
  }
2519
2519
  while (argsLength--) {
2520
2520
  args[leftIndex++] = arguments[++argsIndex];
2521
2521
  }
2522
- return apply(fn3, isBind ? thisArg : this, args);
2522
+ return apply(fn2, isBind ? thisArg : this, args);
2523
2523
  }
2524
2524
  return wrapper;
2525
2525
  }
@@ -5629,10 +5629,10 @@ var require_ua_parser = __commonJS({
5629
5629
  }
5630
5630
  };
5631
5631
  var rgxMapper = function(ua2, arrays) {
5632
- var i2 = 0, j3, k3, p2, q3, matches, match17;
5632
+ var i2 = 0, j3, k2, p2, q3, matches, match17;
5633
5633
  while (i2 < arrays.length && !matches) {
5634
5634
  var regex = arrays[i2], props = arrays[i2 + 1];
5635
- j3 = k3 = 0;
5635
+ j3 = k2 = 0;
5636
5636
  while (j3 < regex.length && !matches) {
5637
5637
  if (!regex[j3]) {
5638
5638
  break;
@@ -5640,7 +5640,7 @@ var require_ua_parser = __commonJS({
5640
5640
  matches = regex[j3++].exec(ua2);
5641
5641
  if (!!matches) {
5642
5642
  for (p2 = 0; p2 < props.length; p2++) {
5643
- match17 = matches[++k3];
5643
+ match17 = matches[++k2];
5644
5644
  q3 = props[p2];
5645
5645
  if (typeof q3 === OBJ_TYPE && q3.length > 0) {
5646
5646
  if (q3.length === 2) {
@@ -8874,7 +8874,7 @@ var require_react_is_production_min = __commonJS({
8874
8874
  var f3 = b3 ? Symbol.for("react.strict_mode") : 60108;
8875
8875
  var g2 = b3 ? Symbol.for("react.profiler") : 60114;
8876
8876
  var h2 = b3 ? Symbol.for("react.provider") : 60109;
8877
- var k3 = b3 ? Symbol.for("react.context") : 60110;
8877
+ var k2 = b3 ? Symbol.for("react.context") : 60110;
8878
8878
  var l2 = b3 ? Symbol.for("react.async_mode") : 60111;
8879
8879
  var m2 = b3 ? Symbol.for("react.concurrent_mode") : 60111;
8880
8880
  var n2 = b3 ? Symbol.for("react.forward_ref") : 60112;
@@ -8901,7 +8901,7 @@ var require_react_is_production_min = __commonJS({
8901
8901
  return a11;
8902
8902
  default:
8903
8903
  switch (a11 = a11 && a11.$$typeof, a11) {
8904
- case k3:
8904
+ case k2:
8905
8905
  case n2:
8906
8906
  case t2:
8907
8907
  case r2:
@@ -8921,7 +8921,7 @@ var require_react_is_production_min = __commonJS({
8921
8921
  }
8922
8922
  exports.AsyncMode = l2;
8923
8923
  exports.ConcurrentMode = m2;
8924
- exports.ContextConsumer = k3;
8924
+ exports.ContextConsumer = k2;
8925
8925
  exports.ContextProvider = h2;
8926
8926
  exports.Element = c3;
8927
8927
  exports.ForwardRef = n2;
@@ -8937,7 +8937,7 @@ var require_react_is_production_min = __commonJS({
8937
8937
  };
8938
8938
  exports.isConcurrentMode = A3;
8939
8939
  exports.isContextConsumer = function(a11) {
8940
- return z3(a11) === k3;
8940
+ return z3(a11) === k2;
8941
8941
  };
8942
8942
  exports.isContextProvider = function(a11) {
8943
8943
  return z3(a11) === h2;
@@ -8970,7 +8970,7 @@ var require_react_is_production_min = __commonJS({
8970
8970
  return z3(a11) === p2;
8971
8971
  };
8972
8972
  exports.isValidElementType = function(a11) {
8973
- 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);
8973
+ 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 === k2 || a11.$$typeof === n2 || a11.$$typeof === w2 || a11.$$typeof === x2 || a11.$$typeof === y3 || a11.$$typeof === v2);
8974
8974
  };
8975
8975
  exports.typeOf = z3;
8976
8976
  }
@@ -12134,12 +12134,12 @@ var formatBytes = (bytes, unit = "B", decimals = 2) => {
12134
12134
  if (!bytes) {
12135
12135
  return "-";
12136
12136
  }
12137
- const k3 = 1024;
12137
+ const k2 = 1024;
12138
12138
  const dm2 = decimals < 0 ? 0 : decimals;
12139
12139
  const sizes = ["", "K", "M", "G", "T", "P", "E", "Z", "Y"].map((size) => size + unit);
12140
- let i2 = Math.floor(Math.log(bytes) / Math.log(k3));
12140
+ let i2 = Math.floor(Math.log(bytes) / Math.log(k2));
12141
12141
  i2 === 0 && i2++;
12142
- return `${parseFloat((bytes / Math.pow(k3, i2)).toFixed(dm2))} ${sizes[i2]}`;
12142
+ return `${parseFloat((bytes / Math.pow(k2, i2)).toFixed(dm2))} ${sizes[i2]}`;
12143
12143
  };
12144
12144
 
12145
12145
  // src/Stats/StyledStats.tsx
@@ -17776,8 +17776,8 @@ var createSelector = createSelectorCreator(defaultMemoize);
17776
17776
  // ../hms-video-store/dist/index.js
17777
17777
  var import_ua_parser_js = __toESM(require_ua_parser());
17778
17778
  var import_lodash3 = __toESM(require_lodash2());
17779
- import { v4 as oo } from "uuid";
17780
- import { v4 as so } from "uuid";
17779
+ import { v4 as no } from "uuid";
17780
+ import { v4 as ao } from "uuid";
17781
17781
 
17782
17782
  // ../../node_modules/webrtc-adapter/src/js/adapter_core.js
17783
17783
  init_define_process_env();
@@ -19875,10 +19875,10 @@ var adapter_core_default = adapter;
19875
19875
 
19876
19876
  // ../hms-video-store/dist/index.js
19877
19877
  var import_lodash4 = __toESM(require_lodash2());
19878
- import { v4 as To } from "uuid";
19879
- import { v4 as yo } from "uuid";
19880
- import { v4 as bo } from "uuid";
19881
- import { EventEmitter2 as Ro } from "eventemitter2";
19878
+ import { v4 as fo } from "uuid";
19879
+ import { v4 as ko } from "uuid";
19880
+ import { v4 as Ro } from "uuid";
19881
+ import { EventEmitter2 as Ao } from "eventemitter2";
19882
19882
 
19883
19883
  // ../../node_modules/immer/dist/immer.esm.mjs
19884
19884
  init_define_process_env();
@@ -20328,41 +20328,41 @@ var vanilla_default = create;
20328
20328
 
20329
20329
  // ../hms-video-store/dist/index.js
20330
20330
  var Kt = __toESM(require_lib());
20331
- import { EventEmitter2 as Zo } from "eventemitter2";
20332
- import { v4 as an2 } from "uuid";
20333
- import { EventEmitter2 as on2 } from "eventemitter2";
20334
- import nn2 from "eventemitter2";
20335
- import { v4 as cn2 } from "uuid";
20336
- import { v4 as un2 } from "uuid";
20337
- var Ka = Object.defineProperty;
20338
- var qa = Object.defineProperties;
20339
- var ja = Object.getOwnPropertyDescriptors;
20331
+ import { EventEmitter2 as en2 } from "eventemitter2";
20332
+ import { v4 as on2 } from "uuid";
20333
+ import { EventEmitter2 as nn2 } from "eventemitter2";
20334
+ import cn2 from "eventemitter2";
20335
+ import { v4 as dn2 } from "uuid";
20336
+ import { v4 as pn2 } from "uuid";
20337
+ var qa = Object.defineProperty;
20338
+ var ja = Object.defineProperties;
20339
+ var Ja = Object.getOwnPropertyDescriptors;
20340
20340
  var ei = Object.getOwnPropertySymbols;
20341
- var Ja = Object.getPrototypeOf;
20342
- var ts = Object.prototype.hasOwnProperty;
20343
- var is = Object.prototype.propertyIsEnumerable;
20344
- var Qa = Reflect.get;
20345
- var es = (a11, e, t2) => e in a11 ? Ka(a11, e, { enumerable: true, configurable: true, writable: true, value: t2 }) : a11[e] = t2;
20341
+ var Qa = Object.getPrototypeOf;
20342
+ var is = Object.prototype.hasOwnProperty;
20343
+ var rs = Object.prototype.propertyIsEnumerable;
20344
+ var za = Reflect.get;
20345
+ var ts = (a11, e, t2) => e in a11 ? qa(a11, e, { enumerable: true, configurable: true, writable: true, value: t2 }) : a11[e] = t2;
20346
20346
  var m = (a11, e) => {
20347
20347
  for (var t2 in e || (e = {}))
20348
- ts.call(e, t2) && es(a11, t2, e[t2]);
20348
+ is.call(e, t2) && ts(a11, t2, e[t2]);
20349
20349
  if (ei)
20350
20350
  for (var t2 of ei(e))
20351
- is.call(e, t2) && es(a11, t2, e[t2]);
20351
+ rs.call(e, t2) && ts(a11, t2, e[t2]);
20352
20352
  return a11;
20353
20353
  };
20354
- var M2 = (a11, e) => qa(a11, ja(e));
20355
- var hr = (a11, e) => {
20354
+ var M2 = (a11, e) => ja(a11, Ja(e));
20355
+ var mr = (a11, e) => {
20356
20356
  var t2 = {};
20357
20357
  for (var i2 in a11)
20358
- ts.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
20358
+ is.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
20359
20359
  if (a11 != null && ei)
20360
20360
  for (var i2 of ei(a11))
20361
- e.indexOf(i2) < 0 && is.call(a11, i2) && (t2[i2] = a11[i2]);
20361
+ e.indexOf(i2) < 0 && rs.call(a11, i2) && (t2[i2] = a11[i2]);
20362
20362
  return t2;
20363
20363
  };
20364
- var za = (a11, e) => () => (e || a11((e = { exports: {} }).exports, e), e.exports);
20365
- var Q2 = (a11, e, t2) => Qa(Ja(a11), t2, e);
20364
+ var Ya = (a11, e) => () => (e || a11((e = { exports: {} }).exports, e), e.exports);
20365
+ var Q2 = (a11, e, t2) => za(Qa(a11), t2, e);
20366
20366
  var c2 = (a11, e, t2) => new Promise((i2, r2) => {
20367
20367
  var s2 = (l2) => {
20368
20368
  try {
@@ -20379,22 +20379,22 @@ var c2 = (a11, e, t2) => new Promise((i2, r2) => {
20379
20379
  }, n2 = (l2) => l2.done ? i2(l2.value) : Promise.resolve(l2.value).then(s2, o2);
20380
20380
  n2((t2 = t2.apply(a11, e)).next());
20381
20381
  });
20382
- var vr = za((Bc, ao) => {
20383
- ao.exports = { version: "0.12.14-alpha.6", 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"] };
20382
+ var Mr = Ya((Vc, oo) => {
20383
+ oo.exports = { version: "0.12.14-alpha.7", 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"] };
20384
20384
  });
20385
- var mr = ((n2) => (n2.Disconnected = "Disconnected", n2.Preview = "Preview", n2.Connecting = "Connecting", n2.Connected = "Connected", n2.Reconnecting = "Reconnecting", n2.Disconnecting = "Disconnecting", n2.Failed = "Failed", n2))(mr || {});
20385
+ var 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 || {});
20386
20386
  var 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 });
20387
20387
  var ii = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
20388
- var Ya = ((e) => (e.CHAT = "chat", e))(Ya || {});
20389
- var rs = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(rs || {});
20390
- var Sr = ((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))(Sr || {});
20391
- var ss = ((t2) => (t2.audio = "audio", t2.video = "video", t2))(ss || {});
20388
+ var Xa = ((e) => (e.CHAT = "chat", e))(Xa || {});
20389
+ var ss = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(ss || {});
20390
+ var 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 || {});
20391
+ var as = ((t2) => (t2.audio = "audio", t2.video = "video", t2))(as || {});
20392
20392
  function xe(a11, e) {
20393
20393
  let t2, i2;
20394
20394
  if (e)
20395
20395
  for (let r2 of e.auxiliaryTracks) {
20396
20396
  let s2 = a11[r2];
20397
- Xa(s2) && (i2 = pt(s2) ? s2 : i2, t2 = ht(s2) ? s2 : t2);
20397
+ Za(s2) && (i2 = pt(s2) ? s2 : i2, t2 = ht(s2) ? s2 : t2);
20398
20398
  }
20399
20399
  return { video: t2, audio: i2 };
20400
20400
  }
@@ -20404,7 +20404,7 @@ function pt(a11) {
20404
20404
  function ht(a11) {
20405
20405
  return a11 && a11.type === "video";
20406
20406
  }
20407
- function Xa(a11) {
20407
+ function Za(a11) {
20408
20408
  return a11 && a11.source === "screen";
20409
20409
  }
20410
20410
  function ri(a11) {
@@ -20413,13 +20413,13 @@ function ri(a11) {
20413
20413
  function mt(a11) {
20414
20414
  return a11 && a11.source === "videoplaylist";
20415
20415
  }
20416
- function as(a11) {
20416
+ function os(a11) {
20417
20417
  return a11 ? !!(a11 != null && a11.degraded) : false;
20418
20418
  }
20419
20419
  function qe(a11, e) {
20420
20420
  return e && a11.tracks[e] ? a11.tracks[e].enabled : false;
20421
20421
  }
20422
- function os(a11, e) {
20422
+ function ns(a11, e) {
20423
20423
  return e && a11.tracks[e] ? a11.tracks[e].displayEnabled : false;
20424
20424
  }
20425
20425
  function St(a11) {
@@ -20427,8 +20427,8 @@ function St(a11) {
20427
20427
  let e = false, t2 = false, i2 = false;
20428
20428
  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 };
20429
20429
  }
20430
- var ns = ((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))(ns || {});
20431
- var Za = typeof window != "undefined" && typeof window.expect != "undefined";
20430
+ var 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 || {});
20431
+ var eo = typeof window != "undefined" && typeof window.expect != "undefined";
20432
20432
  var d2 = class {
20433
20433
  static v(e, ...t2) {
20434
20434
  this.log(0, e, ...t2);
@@ -20494,7 +20494,7 @@ var d2 = class {
20494
20494
  }
20495
20495
  }
20496
20496
  };
20497
- d2.level = Za ? 7 : 0;
20497
+ d2.level = eo ? 7 : 0;
20498
20498
  var je = class {
20499
20499
  constructor(e) {
20500
20500
  this.tracks = new Array();
@@ -20506,19 +20506,19 @@ var je = class {
20506
20506
  };
20507
20507
  var ge = new import_ua_parser_js.UAParser();
20508
20508
  var O2 = typeof window != "undefined";
20509
- var cs;
20510
- var Ue = typeof window == "undefined" && !((cs = ge.getBrowser().name) != null && cs.toLowerCase().includes("electron"));
20511
- var to = () => !Ue;
20512
- var ec = to();
20509
+ var ds;
20510
+ var Ue = typeof window == "undefined" && !((ds = ge.getBrowser().name) != null && ds.toLowerCase().includes("electron"));
20511
+ var io = () => !Ue;
20512
+ var tc = io();
20513
20513
  var Te = () => ge.getDevice().type === "mobile";
20514
- var us = () => typeof document != "undefined" && document.hidden;
20515
- var gr = () => {
20514
+ var ps = () => typeof document != "undefined" && document.hidden;
20515
+ var Tr = () => {
20516
20516
  var a11;
20517
20517
  return ((a11 = ge.getOS().name) == null ? void 0 : a11.toLowerCase()) === "ios";
20518
20518
  };
20519
- var ds;
20520
20519
  var ls;
20521
- var ps = ((ls = (ds = ge.getBrowser()) == null ? void 0 : ds.name) == null ? void 0 : ls.toLowerCase()) === "firefox";
20520
+ var us;
20521
+ var hs = ((us = (ls = ge.getBrowser()) == null ? void 0 : ls.name) == null ? void 0 : us.toLowerCase()) === "firefox";
20522
20522
  var si = (a11) => a11 ? `{
20523
20523
  trackId: ${a11.id};
20524
20524
  kind: ${a11.kind};
@@ -20569,7 +20569,7 @@ var Re = class {
20569
20569
  }`;
20570
20570
  }
20571
20571
  };
20572
- var Ie = class extends Re {
20572
+ var Ae = class extends Re {
20573
20573
  constructor(t2, i2, r2) {
20574
20574
  super(t2, i2, r2);
20575
20575
  this.type = "audio";
@@ -20611,7 +20611,7 @@ var Ie = class extends Re {
20611
20611
  return;
20612
20612
  }
20613
20613
  try {
20614
- typeof this.audioElement.setSinkId == "function" && (ps || (yield (i2 = this.audioElement) == null ? void 0 : i2.setSinkId(t2.deviceId)), this.outputDevice = t2);
20614
+ typeof this.audioElement.setSinkId == "function" && (hs || (yield (i2 = this.audioElement) == null ? void 0 : i2.setSinkId(t2.deviceId)), this.outputDevice = t2);
20615
20615
  } catch (r2) {
20616
20616
  d2.d("[HMSAudioTrack]", "error in setSinkId", r2);
20617
20617
  }
@@ -20623,16 +20623,16 @@ var Ie = class extends Re {
20623
20623
  });
20624
20624
  }
20625
20625
  };
20626
- var hs = ((i2) => (i2.CUSTOM = "CUSTOM", i2.LOCAL = "LOCAL", i2.HMS = "HMS", i2))(hs || {});
20627
- function io() {
20626
+ var ms = ((i2) => (i2.CUSTOM = "CUSTOM", i2.LOCAL = "LOCAL", i2.HMS = "HMS", i2))(ms || {});
20627
+ function ro() {
20628
20628
  if (O2 && window) {
20629
20629
  let a11 = window.location.hostname;
20630
20630
  return a11 === "localhost" || a11 === "127.0.0.1" ? "LOCAL" : a11.includes("app.100ms.live") ? "HMS" : "CUSTOM";
20631
20631
  }
20632
20632
  return "CUSTOM";
20633
20633
  }
20634
- var Je = io();
20635
- var 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 } };
20634
+ var Je = ro();
20635
+ var P4 = { 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 } };
20636
20636
  var f2 = class a2 extends Error {
20637
20637
  constructor(t2, i2, r2, s2, o2, n2 = false) {
20638
20638
  super(s2);
@@ -20662,7 +20662,7 @@ var f2 = class a2 extends Error {
20662
20662
  }`;
20663
20663
  }
20664
20664
  };
20665
- function Tr(a11) {
20665
+ function fr(a11) {
20666
20666
  switch (a11) {
20667
20667
  case "join":
20668
20668
  return "JOIN";
@@ -20676,99 +20676,99 @@ function Tr(a11) {
20676
20676
  return "NONE";
20677
20677
  }
20678
20678
  }
20679
- var ro = ["join", "offer", "answer", "trickle", "on-error", "JOIN"];
20679
+ var so = ["join", "offer", "answer", "trickle", "on-error", "JOIN"];
20680
20680
  var S2 = { WebSocketConnectionErrors: { FailedToConnect(a11, e = "") {
20681
- return new f2(k2.WebSocketConnectionErrors.FAILED_TO_CONNECT, "WebsocketFailedToConnect", a11, `[WS]: ${e}`, `[WS]: ${e}`);
20681
+ return new f2(P4.WebSocketConnectionErrors.FAILED_TO_CONNECT, "WebsocketFailedToConnect", a11, `[WS]: ${e}`, `[WS]: ${e}`);
20682
20682
  }, WebSocketConnectionLost(a11, e = "") {
20683
- return new f2(k2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, "WebSocketConnectionLost", a11, "Network connection lost", e);
20683
+ return new f2(P4.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, "WebSocketConnectionLost", a11, "Network connection lost", e);
20684
20684
  }, AbnormalClose(a11, e = "") {
20685
- return new f2(k2.WebSocketConnectionErrors.ABNORMAL_CLOSE, "WebSocketAbnormalClose", a11, "Websocket closed abnormally", e);
20685
+ return new f2(P4.WebSocketConnectionErrors.ABNORMAL_CLOSE, "WebSocketAbnormalClose", a11, "Websocket closed abnormally", e);
20686
20686
  } }, APIErrors: { ServerErrors(a11, e, t2 = "", i2 = true) {
20687
20687
  return new f2(a11, "ServerErrors", e, `[${e}]: Server error ${t2}`, t2, i2);
20688
20688
  }, EndpointUnreachable(a11, e = "") {
20689
- return new f2(k2.APIErrors.ENDPOINT_UNREACHABLE, "EndpointUnreachable", a11, `Endpoint is not reachable - ${e}`, e);
20689
+ return new f2(P4.APIErrors.ENDPOINT_UNREACHABLE, "EndpointUnreachable", a11, `Endpoint is not reachable - ${e}`, e);
20690
20690
  }, InvalidTokenFormat(a11, e = "") {
20691
- return new f2(k2.APIErrors.INVALID_TOKEN_FORMAT, "InvalidTokenFormat", a11, `Token is not in proper JWT format - ${e}`, e, true);
20691
+ return new f2(P4.APIErrors.INVALID_TOKEN_FORMAT, "InvalidTokenFormat", a11, `Token is not in proper JWT format - ${e}`, e, true);
20692
20692
  }, InitConfigNotAvailable(a11, e = "") {
20693
- return new f2(k2.APIErrors.INIT_CONFIG_NOT_AVAILABLE, "InitError", a11, `[INIT]: ${e}`, `[INIT]: ${e}`);
20693
+ return new f2(P4.APIErrors.INIT_CONFIG_NOT_AVAILABLE, "InitError", a11, `[INIT]: ${e}`, `[INIT]: ${e}`);
20694
20694
  } }, TracksErrors: { GenericTrack(a11, e = "") {
20695
- return new f2(k2.TracksErrors.GENERIC_TRACK, "GenericTrack", a11, `[TRACK]: ${e}`, `[TRACK]: ${e}`);
20695
+ return new f2(P4.TracksErrors.GENERIC_TRACK, "GenericTrack", a11, `[TRACK]: ${e}`, `[TRACK]: ${e}`);
20696
20696
  }, CantAccessCaptureDevice(a11, e, t2 = "") {
20697
- return new f2(k2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, "CantAccessCaptureDevice", a11, `User denied permission to access capture device - ${e}`, t2);
20697
+ return new f2(P4.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, "CantAccessCaptureDevice", a11, `User denied permission to access capture device - ${e}`, t2);
20698
20698
  }, DeviceNotAvailable(a11, e, t2 = "") {
20699
- return new f2(k2.TracksErrors.DEVICE_NOT_AVAILABLE, "DeviceNotAvailable", a11, `[TRACK]: Capture device is no longer available - ${e}`, t2);
20699
+ return new f2(P4.TracksErrors.DEVICE_NOT_AVAILABLE, "DeviceNotAvailable", a11, `[TRACK]: Capture device is no longer available - ${e}`, t2);
20700
20700
  }, DeviceInUse(a11, e, t2 = "") {
20701
- return new f2(k2.TracksErrors.DEVICE_IN_USE, "DeviceInUse", a11, `[TRACK]: Capture device is in use by another application - ${e}`, t2);
20701
+ return new f2(P4.TracksErrors.DEVICE_IN_USE, "DeviceInUse", a11, `[TRACK]: Capture device is in use by another application - ${e}`, t2);
20702
20702
  }, DeviceLostMidway(a11, e, t2 = "") {
20703
- return new f2(k2.TracksErrors.DEVICE_LOST_MIDWAY, "DeviceLostMidway", a11, `Lost access to capture device midway - ${e}`, t2);
20703
+ return new f2(P4.TracksErrors.DEVICE_LOST_MIDWAY, "DeviceLostMidway", a11, `Lost access to capture device midway - ${e}`, t2);
20704
20704
  }, NothingToReturn(a11, e = "", t2 = "There is no media to return. Please select either video or audio or both.") {
20705
- return new f2(k2.TracksErrors.NOTHING_TO_RETURN, "NothingToReturn", a11, t2, e);
20705
+ return new f2(P4.TracksErrors.NOTHING_TO_RETURN, "NothingToReturn", a11, t2, e);
20706
20706
  }, InvalidVideoSettings(a11, e = "") {
20707
- return new f2(k2.TracksErrors.INVALID_VIDEO_SETTINGS, "InvalidVideoSettings", a11, "Cannot enable simulcast when no video settings are provided", e);
20707
+ return new f2(P4.TracksErrors.INVALID_VIDEO_SETTINGS, "InvalidVideoSettings", a11, "Cannot enable simulcast when no video settings are provided", e);
20708
20708
  }, AutoplayBlocked(a11, e = "") {
20709
- return new f2(k2.TracksErrors.AUTOPLAY_ERROR, "AutoplayBlocked", a11, "Autoplay blocked because the user didn't interact with the document first", e);
20709
+ return new f2(P4.TracksErrors.AUTOPLAY_ERROR, "AutoplayBlocked", a11, "Autoplay blocked because the user didn't interact with the document first", e);
20710
20710
  }, CodecChangeNotPermitted(a11, e = "") {
20711
- return new f2(k2.TracksErrors.CODEC_CHANGE_NOT_PERMITTED, "CodecChangeNotPermitted", a11, "Codec can't be changed mid call.", e);
20711
+ return new f2(P4.TracksErrors.CODEC_CHANGE_NOT_PERMITTED, "CodecChangeNotPermitted", a11, "Codec can't be changed mid call.", e);
20712
20712
  }, OverConstrained(a11, e, t2 = "") {
20713
- return new f2(k2.TracksErrors.OVER_CONSTRAINED, "OverConstrained", a11, `[TRACK]: Requested constraints cannot be satisfied with the device hardware - ${e}`, t2);
20713
+ return new f2(P4.TracksErrors.OVER_CONSTRAINED, "OverConstrained", a11, `[TRACK]: Requested constraints cannot be satisfied with the device hardware - ${e}`, t2);
20714
20714
  }, NoAudioDetected(a11, e = "Please check the mic or use another audio input") {
20715
- return new f2(k2.TracksErrors.NO_AUDIO_DETECTED, "NoAudioDetected", a11, "No audio input detected from microphone", e);
20715
+ return new f2(P4.TracksErrors.NO_AUDIO_DETECTED, "NoAudioDetected", a11, "No audio input detected from microphone", e);
20716
20716
  }, SystemDeniedPermission(a11, e, t2 = "") {
20717
- return new f2(k2.TracksErrors.SYSTEM_DENIED_PERMISSION, "SystemDeniedPermission", a11, `Operating System denied permission to access capture device - ${e}`, t2);
20717
+ return new f2(P4.TracksErrors.SYSTEM_DENIED_PERMISSION, "SystemDeniedPermission", a11, `Operating System denied permission to access capture device - ${e}`, t2);
20718
20718
  }, CurrentTabNotShared() {
20719
- 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");
20719
+ return new f2(P4.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");
20720
20720
  }, AudioPlaybackError(a11) {
20721
- return new f2(k2.TracksErrors.AUDIO_PLAYBACK_ERROR, "Audio playback error", "TRACK", a11, a11);
20721
+ return new f2(P4.TracksErrors.AUDIO_PLAYBACK_ERROR, "Audio playback error", "TRACK", a11, a11);
20722
20722
  }, SelectedDeviceMissing(a11) {
20723
- return new f2(k2.TracksErrors.SELECTED_DEVICE_MISSING, "SelectedDeviceMissing", "TRACK", `Could not detect selected ${a11} device`, `Please check connection to the ${a11} device`, false);
20723
+ return new f2(P4.TracksErrors.SELECTED_DEVICE_MISSING, "SelectedDeviceMissing", "TRACK", `Could not detect selected ${a11} device`, `Please check connection to the ${a11} device`, false);
20724
20724
  } }, WebrtcErrors: { CreateOfferFailed(a11, e = "") {
20725
- return new f2(k2.WebrtcErrors.CREATE_OFFER_FAILED, "CreateOfferFailed", a11, `[${a11.toString()}]: Failed to create offer. `, e);
20725
+ return new f2(P4.WebrtcErrors.CREATE_OFFER_FAILED, "CreateOfferFailed", a11, `[${a11.toString()}]: Failed to create offer. `, e);
20726
20726
  }, CreateAnswerFailed(a11, e = "") {
20727
- return new f2(k2.WebrtcErrors.CREATE_ANSWER_FAILED, "CreateAnswerFailed", a11, `[${a11.toString()}]: Failed to create answer. `, e);
20727
+ return new f2(P4.WebrtcErrors.CREATE_ANSWER_FAILED, "CreateAnswerFailed", a11, `[${a11.toString()}]: Failed to create answer. `, e);
20728
20728
  }, SetLocalDescriptionFailed(a11, e = "") {
20729
- return new f2(k2.WebrtcErrors.SET_LOCAL_DESCRIPTION_FAILED, "SetLocalDescriptionFailed", a11, `[${a11.toString()}]: Failed to set offer. `, e);
20729
+ return new f2(P4.WebrtcErrors.SET_LOCAL_DESCRIPTION_FAILED, "SetLocalDescriptionFailed", a11, `[${a11.toString()}]: Failed to set offer. `, e);
20730
20730
  }, SetRemoteDescriptionFailed(a11, e = "") {
20731
- return new f2(k2.WebrtcErrors.SET_REMOTE_DESCRIPTION_FAILED, "SetRemoteDescriptionFailed", a11, `[${a11.toString()}]: Failed to set answer. `, e, true);
20731
+ return new f2(P4.WebrtcErrors.SET_REMOTE_DESCRIPTION_FAILED, "SetRemoteDescriptionFailed", a11, `[${a11.toString()}]: Failed to set answer. `, e, true);
20732
20732
  }, ICEFailure(a11, e = "", t2 = false) {
20733
- return new f2(k2.WebrtcErrors.ICE_FAILURE, "ICEFailure", a11, `[${a11.toString()}]: Ice connection state FAILED`, e, t2);
20733
+ return new f2(P4.WebrtcErrors.ICE_FAILURE, "ICEFailure", a11, `[${a11.toString()}]: Ice connection state FAILED`, e, t2);
20734
20734
  }, ICEDisconnected(a11, e = "") {
20735
- return new f2(k2.WebrtcErrors.ICE_DISCONNECTED, "ICEDisconnected", a11, `[${a11.toString()}]: Ice connection state DISCONNECTED`, e);
20735
+ return new f2(P4.WebrtcErrors.ICE_DISCONNECTED, "ICEDisconnected", a11, `[${a11.toString()}]: Ice connection state DISCONNECTED`, e);
20736
20736
  }, StatsFailed(a11, e = "") {
20737
- return new f2(k2.WebrtcErrors.STATS_FAILED, "StatsFailed", a11, `Failed to WebRTC get stats - ${e}`, e);
20737
+ return new f2(P4.WebrtcErrors.STATS_FAILED, "StatsFailed", a11, `Failed to WebRTC get stats - ${e}`, e);
20738
20738
  } }, WebsocketMethodErrors: { ServerErrors(a11, e, t2) {
20739
- return new f2(a11, "ServerErrors", e, t2, t2, ro.includes(e));
20739
+ return new f2(a11, "ServerErrors", e, t2, t2, so.includes(e));
20740
20740
  }, AlreadyJoined(a11, e = "") {
20741
- return new f2(k2.WebsocketMethodErrors.ALREADY_JOINED, "AlreadyJoined", a11, "[JOIN]: You have already joined this room.", e);
20741
+ return new f2(P4.WebsocketMethodErrors.ALREADY_JOINED, "AlreadyJoined", a11, "[JOIN]: You have already joined this room.", e);
20742
20742
  }, CannotJoinPreviewInProgress(a11, e = "") {
20743
- return new f2(k2.WebsocketMethodErrors.CANNOT_JOIN_PREVIEW_IN_PROGRESS, "CannotJoinPreviewInProgress", a11, "[JOIN]: Cannot join if preview is in progress", e);
20743
+ return new f2(P4.WebsocketMethodErrors.CANNOT_JOIN_PREVIEW_IN_PROGRESS, "CannotJoinPreviewInProgress", a11, "[JOIN]: Cannot join if preview is in progress", e);
20744
20744
  } }, GenericErrors: { NotConnected(a11, e = "") {
20745
- return new f2(k2.GenericErrors.NOT_CONNECTED, "NotConnected", a11, "Client is not connected", e);
20745
+ return new f2(P4.GenericErrors.NOT_CONNECTED, "NotConnected", a11, "Client is not connected", e);
20746
20746
  }, Signalling(a11, e) {
20747
- return new f2(k2.GenericErrors.SIGNALLING, "Signalling", a11, `Unknown signalling error: ${a11.toString()} ${e} `, e);
20747
+ return new f2(P4.GenericErrors.SIGNALLING, "Signalling", a11, `Unknown signalling error: ${a11.toString()} ${e} `, e);
20748
20748
  }, Unknown(a11, e) {
20749
- return new f2(k2.GenericErrors.UNKNOWN, "Unknown", a11, `Unknown exception: ${e}`, e);
20749
+ return new f2(P4.GenericErrors.UNKNOWN, "Unknown", a11, `Unknown exception: ${e}`, e);
20750
20750
  }, NotReady(a11, e = "") {
20751
- return new f2(k2.GenericErrors.NOT_READY, "NotReady", a11, e, e);
20751
+ return new f2(P4.GenericErrors.NOT_READY, "NotReady", a11, e, e);
20752
20752
  }, JsonParsingFailed(a11, e, t2 = "") {
20753
- return new f2(k2.GenericErrors.JSON_PARSING_FAILED, "JsonParsingFailed", a11, `Failed to parse JSON message - ${e}`, t2);
20753
+ return new f2(P4.GenericErrors.JSON_PARSING_FAILED, "JsonParsingFailed", a11, `Failed to parse JSON message - ${e}`, t2);
20754
20754
  }, TrackMetadataMissing(a11, e = "") {
20755
- return new f2(k2.GenericErrors.TRACK_METADATA_MISSING, "TrackMetadataMissing", a11, "Track Metadata Missing", e);
20755
+ return new f2(P4.GenericErrors.TRACK_METADATA_MISSING, "TrackMetadataMissing", a11, "Track Metadata Missing", e);
20756
20756
  }, RTCTrackMissing(a11, e = "") {
20757
- return new f2(k2.GenericErrors.RTC_TRACK_MISSING, "RTCTrackMissing", a11, "RTC Track missing", e);
20757
+ return new f2(P4.GenericErrors.RTC_TRACK_MISSING, "RTCTrackMissing", a11, "RTC Track missing", e);
20758
20758
  }, PeerMetadataMissing(a11, e = "") {
20759
- return new f2(k2.GenericErrors.PEER_METADATA_MISSING, "PeerMetadataMissing", a11, "Peer Metadata Missing", e);
20759
+ return new f2(P4.GenericErrors.PEER_METADATA_MISSING, "PeerMetadataMissing", a11, "Peer Metadata Missing", e);
20760
20760
  }, ValidationFailed(a11, e) {
20761
- return new f2(k2.GenericErrors.VALIDATION_FAILED, "ValidationFailed", "VALIDATION", a11, e ? JSON.stringify(e) : "");
20761
+ return new f2(P4.GenericErrors.VALIDATION_FAILED, "ValidationFailed", "VALIDATION", a11, e ? JSON.stringify(e) : "");
20762
20762
  }, InvalidRole(a11, e) {
20763
- return new f2(k2.GenericErrors.INVALID_ROLE, "InvalidRole", a11, "Invalid role. Join with valid role", e, true);
20763
+ return new f2(P4.GenericErrors.INVALID_ROLE, "InvalidRole", a11, "Invalid role. Join with valid role", e, true);
20764
20764
  }, PreviewAlreadyInProgress(a11, e = "") {
20765
- return new f2(k2.GenericErrors.PREVIEW_IN_PROGRESS, "PreviewAlreadyInProgress", a11, "[Preview]: Cannot join if preview is in progress", e);
20765
+ return new f2(P4.GenericErrors.PREVIEW_IN_PROGRESS, "PreviewAlreadyInProgress", a11, "[Preview]: Cannot join if preview is in progress", e);
20766
20766
  }, LocalStorageAccessDenied(a11 = "Access to localStorage has been denied") {
20767
- return new f2(k2.GenericErrors.LOCAL_STORAGE_ACCESS_DENIED, "LocalStorageAccessDenied", "NONE", "LocalStorageAccessDenied", a11);
20767
+ return new f2(P4.GenericErrors.LOCAL_STORAGE_ACCESS_DENIED, "LocalStorageAccessDenied", "NONE", "LocalStorageAccessDenied", a11);
20768
20768
  }, MissingMediaDevices() {
20769
- 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);
20769
+ return new f2(P4.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);
20770
20770
  }, MissingRTCPeerConnection() {
20771
- 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);
20771
+ return new f2(P4.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);
20772
20772
  } }, MediaPluginErrors: { PlatformNotSupported(a11, e = "") {
20773
20773
  return new f2(7001, "PlatformNotSupported", a11, "Check HMS Docs to see the list of supported platforms", e);
20774
20774
  }, InitFailed(a11, e = "") {
@@ -20780,11 +20780,11 @@ var S2 = { WebSocketConnectionErrors: { FailedToConnect(a11, e = "") {
20780
20780
  }, DeviceNotSupported(a11, e = "") {
20781
20781
  return new f2(7005, "DeviceNotSupported", a11, "Check HMS Docs to see the list of supported devices", e);
20782
20782
  } }, PlaylistErrors: { NoEntryToPlay(a11, e) {
20783
- return new f2(k2.PlaylistErrors.NO_ENTRY_TO_PLAY, "NoEntryToPlay", a11, "Reached end of playlist", e);
20783
+ return new f2(P4.PlaylistErrors.NO_ENTRY_TO_PLAY, "NoEntryToPlay", a11, "Reached end of playlist", e);
20784
20784
  }, NoEntryPlaying(a11, e) {
20785
- return new f2(k2.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
20785
+ return new f2(P4.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
20786
20786
  } } };
20787
- var fr = class {
20787
+ var vr = class {
20788
20788
  constructor() {
20789
20789
  this.valuesMap = /* @__PURE__ */ new Map();
20790
20790
  }
@@ -20809,9 +20809,9 @@ var fr = class {
20809
20809
  return this.valuesMap.size;
20810
20810
  }
20811
20811
  };
20812
- var ms = () => {
20812
+ var Ss = () => {
20813
20813
  try {
20814
- O2 && !localStorage && (window.localStorage = new fr());
20814
+ O2 && !localStorage && (window.localStorage = new vr());
20815
20815
  } catch (a11) {
20816
20816
  d2.e("Error initialising localStorage", S2.GenericErrors.LocalStorageAccessDenied());
20817
20817
  }
@@ -20823,7 +20823,7 @@ var le = class {
20823
20823
  }
20824
20824
  getStorage() {
20825
20825
  try {
20826
- return O2 && !this.storage && (ms(), this.storage = window.localStorage), this.storage;
20826
+ return O2 && !this.storage && (Ss(), this.storage = window.localStorage), this.storage;
20827
20827
  } catch (e) {
20828
20828
  return d2.e("Error initialising localStorage", S2.GenericErrors.LocalStorageAccessDenied()), null;
20829
20829
  }
@@ -20843,42 +20843,42 @@ var le = class {
20843
20843
  (e = this.getStorage()) == null || e.removeItem(this.key);
20844
20844
  }
20845
20845
  };
20846
- var Ss = () => {
20846
+ var gs = () => {
20847
20847
  let a11, e = new le("hms-analytics-deviceId"), t2 = e.get();
20848
- return t2 ? a11 = t2 : (a11 = so(), e.set(a11)), a11;
20848
+ return t2 ? a11 = t2 : (a11 = ao(), e.set(a11)), a11;
20849
20849
  };
20850
- var gs = "[VALIDATIONS]";
20851
- function ee(a11) {
20850
+ var Ts = "[VALIDATIONS]";
20851
+ function oe(a11) {
20852
20852
  return a11 != null;
20853
20853
  }
20854
20854
  var gt = () => {
20855
- if (!ee(RTCPeerConnection)) {
20855
+ if (!oe(RTCPeerConnection)) {
20856
20856
  let a11 = S2.GenericErrors.MissingRTCPeerConnection();
20857
- throw d2.e(gs, a11), a11;
20857
+ throw d2.e(Ts, a11), a11;
20858
20858
  }
20859
20859
  };
20860
20860
  var Tt = () => {
20861
- if (!ee(navigator.mediaDevices)) {
20861
+ if (!oe(navigator.mediaDevices)) {
20862
20862
  let a11 = S2.GenericErrors.MissingMediaDevices();
20863
- throw d2.e(gs, a11), a11;
20863
+ throw d2.e(Ts, a11), a11;
20864
20864
  }
20865
20865
  };
20866
- var Ts = vr().version;
20866
+ var fs = Mr().version;
20867
20867
  function ft(a11 = "prod", e) {
20868
20868
  let t2 = "web", i2 = Je !== "LOCAL" && a11 === "prod" ? "prod" : "debug";
20869
20869
  if (Ue)
20870
- return fs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: Ts, env: i2, domain: Je, is_prebuilt: !!(e != null && e.isPrebuilt), framework: "node", framework_version: process.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
20871
- let r2 = ge.getOS(), s2 = ge.getDevice(), o2 = ge.getBrowser(), n2 = Mr(`web_${r2.name}`), l2 = r2.version || "", u2 = Mr(`${o2.name}_${o2.version}`), p2 = u2;
20872
- return s2.type && (p2 = `${Mr(`${s2.vendor}_${s2.type}`)}/${u2}`), fs({ os: n2, os_version: l2, sdk: t2, sdk_version: Ts, device_model: p2, env: i2, domain: Je, 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 });
20870
+ return vs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: fs, env: i2, domain: Je, is_prebuilt: !!(e != null && e.isPrebuilt), framework: "node", framework_version: process.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
20871
+ 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;
20872
+ 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: Je, 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 });
20873
20873
  }
20874
- function Mr(a11) {
20874
+ function yr(a11) {
20875
20875
  return a11.replace(/ /g, "_");
20876
20876
  }
20877
- var fs = (a11, e = ",") => Object.keys(a11).filter((t2) => ee(a11[t2])).map((t2) => `${t2}:${a11[t2]}`).join(e);
20877
+ var vs = (a11, e = ",") => Object.keys(a11).filter((t2) => oe(a11[t2])).map((t2) => `${t2}:${a11[t2]}`).join(e);
20878
20878
  var H2 = class {
20879
20879
  constructor({ name: e, level: t2, properties: i2, includesPII: r2, timestamp: s2 }) {
20880
20880
  this.metadata = { peer: {}, userAgent: ft() };
20881
- this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = oo(), this.device_id = Ss();
20881
+ this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = no(), this.device_id = gs();
20882
20882
  }
20883
20883
  toSignalParams() {
20884
20884
  return { name: this.name, info: M2(m({}, this.properties), { timestamp: this.timestamp, domain: Je }), timestamp: (/* @__PURE__ */ new Date()).getTime() };
@@ -20894,12 +20894,12 @@ var y2 = class {
20894
20894
  return new H2({ name: i2, level: r2, properties: s2 });
20895
20895
  }
20896
20896
  static preview(i2) {
20897
- var r2 = i2, { error: e } = r2, t2 = hr(r2, ["error"]);
20897
+ var r2 = i2, { error: e } = r2, t2 = mr(r2, ["error"]);
20898
20898
  let s2 = this.eventNameFor("preview", e === void 0), o2 = e ? 2 : 1, n2 = this.getPropertiesWithError(t2, e);
20899
20899
  return new H2({ name: s2, level: o2, properties: n2 });
20900
20900
  }
20901
20901
  static join(i2) {
20902
- var r2 = i2, { error: e } = r2, t2 = hr(r2, ["error"]);
20902
+ var r2 = i2, { error: e } = r2, t2 = mr(r2, ["error"]);
20903
20903
  let s2 = this.eventNameFor("join", e === void 0), o2 = e ? 2 : 1, n2 = this.getPropertiesWithError(M2(m({}, t2), { is_preview_called: !!t2.is_preview_called }), e);
20904
20904
  return new H2({ name: s2, level: o2, properties: n2 });
20905
20905
  }
@@ -20981,7 +20981,7 @@ var y2 = class {
20981
20981
  }
20982
20982
  };
20983
20983
  y2.KEY_REQUESTED_AT = "requested_at", y2.KEY_RESPONDED_AT = "responded_at";
20984
- var yr = class {
20984
+ var kr = class {
20985
20985
  constructor() {
20986
20986
  this.storage = new le("hms-device-selection");
20987
20987
  this.remember = false;
@@ -21015,9 +21015,9 @@ var yr = class {
21015
21015
  return e.deviceId === t2.deviceId && (e.groupId === t2.groupId || !e.groupId);
21016
21016
  }
21017
21017
  };
21018
- var z2 = new yr();
21019
- var kr = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(kr || {});
21020
- var Pr = ((t2) => (t2.PLATFORM_NOT_SUPPORTED = "PLATFORM_NOT_SUPPORTED", t2.DEVICE_NOT_SUPPORTED = "DEVICE_NOT_SUPPORTED", t2))(Pr || {});
21018
+ var z2 = new kr();
21019
+ var Pr = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Pr || {});
21020
+ var Er = ((t2) => (t2.PLATFORM_NOT_SUPPORTED = "PLATFORM_NOT_SUPPORTED", t2.DEVICE_NOT_SUPPORTED = "DEVICE_NOT_SUPPORTED", t2))(Er || {});
21021
21021
  var ne = class {
21022
21022
  static failure(e, t2) {
21023
21023
  let i2 = "mediaPlugin.failed", r2 = 2, s2 = m({ plugin_name: e }, t2.toAnalyticsProperties());
@@ -21084,8 +21084,8 @@ var ai = class {
21084
21084
  delete this.addedTimestamps[e], delete this.initTime[e], delete this.pluginAdded[e], delete this.pluginSampleRate[e];
21085
21085
  }
21086
21086
  };
21087
- var no = 48e3;
21088
- var co = () => navigator.userAgent.indexOf("Firefox") !== -1;
21087
+ var co = 48e3;
21088
+ var lo = () => navigator.userAgent.indexOf("Firefox") !== -1;
21089
21089
  var vt = class {
21090
21090
  constructor(e, t2, i2) {
21091
21091
  this.eventBus = t2;
@@ -21250,14 +21250,14 @@ var vt = class {
21250
21250
  });
21251
21251
  }
21252
21252
  createAudioContext() {
21253
- this.audioContext || (co() ? this.audioContext = new AudioContext() : this.audioContext = new AudioContext({ sampleRate: no }));
21253
+ this.audioContext || (lo() ? this.audioContext = new AudioContext() : this.audioContext = new AudioContext({ sampleRate: co }));
21254
21254
  }
21255
21255
  };
21256
- function lo(a11, e) {
21256
+ function uo(a11, e) {
21257
21257
  let t2 = a11.toLowerCase();
21258
21258
  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);
21259
21259
  }
21260
- function uo(a11, e = "") {
21260
+ function po(a11, e = "") {
21261
21261
  if (adapter_core_default.browserDetails.browser === "chrome" && a11.name === "NotAllowedError" && a11.message.includes("denied by system"))
21262
21262
  return S2.TracksErrors.SystemDeniedPermission("TRACK", e, a11.message);
21263
21263
  if (adapter_core_default.browserDetails.browser === "firefox" && a11.name === "NotFoundError") {
@@ -21276,14 +21276,14 @@ function uo(a11, e = "") {
21276
21276
  case "TypeError":
21277
21277
  return S2.TracksErrors.NothingToReturn("TRACK", a11.message);
21278
21278
  default:
21279
- return lo(a11.message, e);
21279
+ return uo(a11.message, e);
21280
21280
  }
21281
21281
  }
21282
21282
  function Qe(a11, e) {
21283
- let t2 = uo(a11, e);
21283
+ let t2 = po(a11, e);
21284
21284
  return t2.addNativeError(a11), t2;
21285
21285
  }
21286
- function Ms(a11) {
21286
+ function ys(a11) {
21287
21287
  return c2(this, null, function* () {
21288
21288
  try {
21289
21289
  return (yield navigator.mediaDevices.getUserMedia({ audio: a11 ? a11.toConstraints() : false })).getAudioTracks()[0];
@@ -21292,7 +21292,7 @@ function Ms(a11) {
21292
21292
  }
21293
21293
  });
21294
21294
  }
21295
- function ys(a11) {
21295
+ function ks(a11) {
21296
21296
  return c2(this, null, function* () {
21297
21297
  try {
21298
21298
  return (yield navigator.mediaDevices.getUserMedia({ video: a11 ? a11.toConstraints() : false })).getVideoTracks()[0];
@@ -21304,7 +21304,7 @@ function ys(a11) {
21304
21304
  function ue(a11) {
21305
21305
  return "canvas" in a11 || a11.label === "MediaStreamAudioDestinationNode" || a11.label === "";
21306
21306
  }
21307
- var Ae = { audioContext: null, getAudioContext() {
21307
+ var Ie = { audioContext: null, getAudioContext() {
21308
21308
  return this.audioContext || (this.audioContext = new AudioContext()), this.audioContext;
21309
21309
  }, resumeContext() {
21310
21310
  return c2(this, null, function* () {
@@ -21336,7 +21336,7 @@ var He = class {
21336
21336
  return e(this.storage);
21337
21337
  }
21338
21338
  };
21339
- var ks = `(function workerSetup() {
21339
+ var Ps = `(function workerSetup() {
21340
21340
  function ticker() {
21341
21341
  self.postMessage('tick');
21342
21342
  }
@@ -21363,17 +21363,17 @@ function Ce(a11) {
21363
21363
  throw Error("`ms` should be a positive integer");
21364
21364
  if (typeof Worker == "undefined")
21365
21365
  return K(a11);
21366
- let e = new Worker(URL.createObjectURL(new Blob([ks], { type: "application/javascript" })));
21366
+ let e = new Worker(URL.createObjectURL(new Blob([Ps], { type: "application/javascript" })));
21367
21367
  return e.postMessage(["start", a11]), new Promise((t2) => {
21368
21368
  e.onmessage = (i2) => {
21369
21369
  i2.data === "tick" && (t2(), e.terminate());
21370
21370
  };
21371
21371
  });
21372
21372
  }
21373
- function Ps() {
21373
+ function Es() {
21374
21374
  if (typeof Worker == "undefined")
21375
21375
  return { sleep: (e) => K(e) };
21376
- let a11 = new Worker(URL.createObjectURL(new Blob([ks], { type: "application/javascript" })));
21376
+ let a11 = new Worker(URL.createObjectURL(new Blob([Ps], { type: "application/javascript" })));
21377
21377
  return { sleep: (e) => (a11.postMessage(["start", e]), new Promise((t2) => {
21378
21378
  a11.onmessage = (i2) => {
21379
21379
  i2.data === "tick" && t2();
@@ -21390,8 +21390,8 @@ function oi(a11, e = 300) {
21390
21390
  }, e);
21391
21391
  };
21392
21392
  }
21393
- var ho = 35;
21394
- var mo = 5;
21393
+ var mo = 35;
21394
+ var So = 5;
21395
21395
  var ni = class {
21396
21396
  constructor(e, t2, i2) {
21397
21397
  this.track = e;
@@ -21441,7 +21441,7 @@ var ni = class {
21441
21441
  });
21442
21442
  }
21443
21443
  sendAudioLevel(e = 0) {
21444
- if (e = e > ho ? e : 0, Math.abs(this.audioLevel - e) > mo) {
21444
+ if (e = e > mo ? e : 0, Math.abs(this.audioLevel - e) > So) {
21445
21445
  this.audioLevel = e;
21446
21446
  let i2 = { track: this.track, audioLevel: this.audioLevel };
21447
21447
  this.audioLevelEvent.publish(i2);
@@ -21477,19 +21477,19 @@ var ni = class {
21477
21477
  return this.analyserNode.getByteTimeDomainData(e), !e.some((t2) => t2 !== 128 && t2 !== 0);
21478
21478
  }
21479
21479
  createAnalyserNodeForStream(e) {
21480
- let t2 = Ae.getAudioContext(), i2 = t2.createAnalyser();
21480
+ let t2 = Ie.getAudioContext(), i2 = t2.createAnalyser();
21481
21481
  return t2.createMediaStreamSource(e).connect(i2), i2;
21482
21482
  }
21483
21483
  };
21484
- var Er = ((t2) => (t2.SIP = "sip", t2.REGULAR = "regular", t2))(Er || {});
21485
- var Es = ((n2) => (n2.NONE = "none", n2.INITIALISED = "initialised", n2.STARTED = "started", n2.PAUSED = "paused", n2.RESUMED = "resumed", n2.STOPPED = "stopped", n2.FAILED = "failed", n2))(Es || {});
21486
- var bs = ((t2) => (t2.DVR = "dvr", t2.NO_DVR = "no-dvr", t2))(bs || {});
21487
- var Rs = ((i2) => (i2.REGULAR = "regular", i2.SCREEN = "screen", i2.COMPOSITE = "composite", i2))(Rs || {});
21484
+ var br = ((t2) => (t2.SIP = "sip", t2.REGULAR = "regular", t2))(br || {});
21485
+ var bs = ((n2) => (n2.NONE = "none", n2.INITIALISED = "initialised", n2.STARTED = "started", n2.PAUSED = "paused", n2.RESUMED = "resumed", n2.STOPPED = "stopped", n2.FAILED = "failed", n2))(bs || {});
21486
+ var Rs = ((t2) => (t2.DVR = "dvr", t2.NO_DVR = "no-dvr", t2))(Rs || {});
21487
+ var As = ((i2) => (i2.REGULAR = "regular", i2.SCREEN = "screen", i2.COMPOSITE = "composite", i2))(As || {});
21488
21488
  var Is = ((r2) => (r2.INITIALISED = "initialised", r2.STARTED = "started", r2.STOPPED = "stopped", r2.FAILED = "failed", r2))(Is || {});
21489
- var As = ((e) => (e.CAPTION = "caption", e))(As || {});
21489
+ var Hs = ((e) => (e.CAPTION = "caption", e))(Hs || {});
21490
21490
  var Be = { f: "high", h: "medium", q: "low" };
21491
- var Hs = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Hs || {});
21492
- var te = class {
21491
+ var Cs = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Cs || {});
21492
+ var ee = class {
21493
21493
  constructor() {
21494
21494
  this._volume = 1;
21495
21495
  this._codec = "opus";
@@ -21596,7 +21596,7 @@ var Fe = class {
21596
21596
  var Le = class {
21597
21597
  constructor() {
21598
21598
  this._video = new Y2().build();
21599
- this._audio = new te().build();
21599
+ this._audio = new ee().build();
21600
21600
  this._screen = new Y2().build();
21601
21601
  this._simulcast = false;
21602
21602
  }
@@ -21629,13 +21629,13 @@ var ze = class {
21629
21629
  return this.audio && (e = m(m({}, this.audio.toAnalyticsProperties()), e)), this.video && (e = m(m({}, this.video.toAnalyticsProperties()), e)), e;
21630
21630
  }
21631
21631
  };
21632
- function Ls(a11, e) {
21632
+ function Ds(a11, e) {
21633
21633
  return function(i2) {
21634
21634
  return !(0, import_lodash3.default)(a11[i2], e[i2]);
21635
21635
  };
21636
21636
  }
21637
- var ce = class a3 extends Ie {
21638
- constructor(t2, i2, r2, s2, o2 = new te().build(), n2) {
21637
+ var ce = class a3 extends Ae {
21638
+ constructor(t2, i2, r2, s2, o2 = new ee().build(), n2) {
21639
21639
  super(t2, i2, r2);
21640
21640
  this.eventBus = s2;
21641
21641
  this.TAG = "[HMSLocalAudioTrack]";
@@ -21651,17 +21651,17 @@ var ce = class a3 extends Ie {
21651
21651
  yield this.transceiver.sender.replaceTrack(this.processedTrack || this.nativeTrack);
21652
21652
  });
21653
21653
  this.handleSettingsChange = (t3) => c2(this, null, function* () {
21654
- let i3 = this.stream, r3 = Ls(t3, this.settings);
21654
+ let i3 = this.stream, r3 = Ds(t3, this.settings);
21655
21655
  (r3("maxBitrate") || r3("audioMode")) && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this, t3)), (r3("advanced") || r3("audioMode")) && (yield this.replaceTrackWith(t3));
21656
21656
  });
21657
21657
  this.handleDeviceChange = (t3, i3 = false) => c2(this, null, function* () {
21658
- if (Ls(t3, this.settings)("deviceId")) {
21658
+ if (Ds(t3, this.settings)("deviceId")) {
21659
21659
  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);
21660
21660
  let s3 = this.nativeTrack.getSettings().groupId;
21661
21661
  !i3 && t3.deviceId && (z2.updateSelection("audioInput", { deviceId: t3.deviceId, groupId: s3 }), this.eventBus.deviceChange.publish({ isUserSelection: true, type: "audioInput", selection: { deviceId: t3.deviceId, groupId: s3 } }));
21662
21662
  }
21663
21663
  });
21664
- 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), gr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
21664
+ 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);
21665
21665
  }
21666
21666
  getManuallySelectedDeviceId() {
21667
21667
  return this.manuallySelectedDeviceId;
@@ -21675,7 +21675,7 @@ var ce = class a3 extends Ie {
21675
21675
  i2 == null || i2.stop();
21676
21676
  let r2 = !!this.audioLevelMonitor;
21677
21677
  try {
21678
- let s2 = yield Ms(t2);
21678
+ let s2 = yield ys(t2);
21679
21679
  s2.enabled = this.enabled, d2.d(this.TAG, "replaceTrack, Previous track stopped", i2, "newTrack", s2), yield this.stream.replaceStreamTrack(i2, s2), this.nativeTrack = s2, yield this.replaceSenderTrack(), r2 && this.initAudioLevelMonitor();
21680
21680
  } catch (s2) {
21681
21681
  throw this.isPublished && this.eventBus.analytics.publish(y2.publish({ error: s2 })), s2;
@@ -21736,7 +21736,7 @@ var ce = class a3 extends Ie {
21736
21736
  cleanup() {
21737
21737
  return c2(this, null, function* () {
21738
21738
  var t2;
21739
- Q2(a3.prototype, this, "cleanup").call(this), yield this.pluginsManager.cleanup(), yield this.pluginsManager.closeContext(), this.transceiver = void 0, (t2 = this.processedTrack) == null || t2.stop(), this.isPublished = false, this.destroyAudioLevelMonitor(), gr() && O2 && document.removeEventListener("visibilitychange", this.handleVisibilityChange);
21739
+ Q2(a3.prototype, this, "cleanup").call(this), yield this.pluginsManager.cleanup(), yield this.pluginsManager.closeContext(), this.transceiver = void 0, (t2 = this.processedTrack) == null || t2.stop(), this.isPublished = false, this.destroyAudioLevelMonitor(), Tr() && O2 && document.removeEventListener("visibilitychange", this.handleVisibilityChange);
21740
21740
  });
21741
21741
  }
21742
21742
  getTrackIDBeingSent() {
@@ -21750,7 +21750,7 @@ var ce = class a3 extends Ie {
21750
21750
  return new Ve(i2, r2, s2, o2, n2, l2);
21751
21751
  }
21752
21752
  };
21753
- var ae = class a4 extends Ie {
21753
+ var se = class a4 extends Ae {
21754
21754
  setEnabled(e) {
21755
21755
  return c2(this, null, function* () {
21756
21756
  e !== this.enabled && (yield Q2(a4.prototype, this, "setEnabled").call(this, e), yield this.subscribeToAudio(e));
@@ -21816,8 +21816,8 @@ var Ye = class extends Re {
21816
21816
  }
21817
21817
  };
21818
21818
  var Mt = { none: -1, low: 0, medium: 1, high: 2 };
21819
- var go = 0.5;
21820
- var Ds = (a11, e) => {
21819
+ var To = 0.5;
21820
+ var ws = (a11, e) => {
21821
21821
  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);
21822
21822
  for (let o2 = 0; o2 < r2.length; o2++) {
21823
21823
  let { resolution: n2, layer: l2 } = r2[o2], u2 = n2[i2];
@@ -21826,7 +21826,7 @@ var Ds = (a11, e) => {
21826
21826
  break;
21827
21827
  } else {
21828
21828
  let p2 = r2[o2 + 1], h2 = p2 ? p2.resolution[i2] : Number.POSITIVE_INFINITY;
21829
- if ((s2 - u2) / (h2 - u2) < go) {
21829
+ if ((s2 - u2) / (h2 - u2) < To) {
21830
21830
  t2 = l2;
21831
21831
  break;
21832
21832
  }
@@ -21834,7 +21834,7 @@ var Ds = (a11, e) => {
21834
21834
  }
21835
21835
  return t2;
21836
21836
  };
21837
- var br = class {
21837
+ var Rr = class {
21838
21838
  constructor() {
21839
21839
  this.TAG = "[HMSIntersectionObserverWrapper]";
21840
21840
  this.listeners = /* @__PURE__ */ new WeakMap();
@@ -21861,8 +21861,8 @@ var br = class {
21861
21861
  return e || d2.w(this.TAG, "IntersectionObserver is not supported, fallback will be used instead"), e;
21862
21862
  }
21863
21863
  };
21864
- var ws = new br();
21865
- var Rr = class {
21864
+ var _s = new Rr();
21865
+ var Ar = class {
21866
21866
  constructor() {
21867
21867
  this.TAG = "[HMSResizeObserverWrapper]";
21868
21868
  this.listeners = /* @__PURE__ */ new WeakMap();
@@ -21889,7 +21889,7 @@ var Rr = class {
21889
21889
  return e || d2.w(this.TAG, "Resize Observer is not supported"), e;
21890
21890
  }
21891
21891
  };
21892
- var _s = new Rr();
21892
+ var Ns = new Ar();
21893
21893
  var Xe = class {
21894
21894
  constructor(e) {
21895
21895
  this.track = e;
@@ -21913,7 +21913,7 @@ var Xe = class {
21913
21913
  e2.srcObject = null, e2.removeEventListener("pause", this.resumeVideoPlayback), (t2 = this.resizeObserver) == null || t2.unobserve(e2), (i2 = this.intersectionObserver) == null || i2.unobserve(e2);
21914
21914
  }), this.videoElements.clear(), this.resizeObserver = void 0, this.intersectionObserver = void 0;
21915
21915
  };
21916
- this.init(), this.id = To();
21916
+ this.init(), this.id = fo();
21917
21917
  }
21918
21918
  updateSinks(e = false) {
21919
21919
  for (let t2 of this.videoElements)
@@ -21933,7 +21933,7 @@ var Xe = class {
21933
21933
  return Array.from(this.videoElements);
21934
21934
  }
21935
21935
  init() {
21936
- O2 && (this.resizeObserver = _s, this.intersectionObserver = ws);
21936
+ O2 && (this.resizeObserver = Ns, this.intersectionObserver = _s);
21937
21937
  }
21938
21938
  isElementInViewport(e) {
21939
21939
  let t2 = e.offsetTop, i2 = e.offsetLeft, r2 = e.offsetWidth, s2 = e.offsetHeight, { hidden: o2 } = e, { opacity: n2, display: l2 } = getComputedStyle(e);
@@ -21953,7 +21953,7 @@ var Xe = class {
21953
21953
  let { width: r2, height: s2 } = i2;
21954
21954
  if (r2 === 0 || s2 === 0)
21955
21955
  continue;
21956
- let o2 = Ds(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
21956
+ let o2 = ws(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
21957
21957
  e ? e = Mt[o2] > Mt[e] ? o2 : e : e = o2;
21958
21958
  }
21959
21959
  e && (d2.d(this.TAG, `selecting max layer ${e} for the track`, `${this.track}`), yield this.track.setPreferredLayer(e));
@@ -21961,7 +21961,7 @@ var Xe = class {
21961
21961
  }
21962
21962
  };
21963
21963
  var Ir = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Ir || {});
21964
- var Ar = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Ar || {});
21964
+ var Hr = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Hr || {});
21965
21965
  var yt = class {
21966
21966
  constructor() {
21967
21967
  this.total = 0;
@@ -22041,16 +22041,16 @@ var Ze = class {
22041
22041
  delete this.addedTimestamps[e], delete this.initTime[e], delete this.processingAvgs[e], delete this.pluginAdded[e], delete this.pluginInputFrameRate[e], delete this.pluginFrameRate[e];
22042
22042
  }
22043
22043
  };
22044
- var Ns = 24;
22045
- var fo = 320;
22046
- var vo = 240;
22044
+ var Os = 24;
22045
+ var vo = 320;
22046
+ var Mo = 240;
22047
22047
  var kt = class {
22048
22048
  constructor(e, t2) {
22049
22049
  this.TAG = "[VideoPluginsManager]";
22050
22050
  this.pluginsLoopRunning = false;
22051
22051
  this.pluginsLoopState = "paused";
22052
22052
  this.pluginAddInProgress = false;
22053
- this.reusableWorker = Ps();
22053
+ this.reusableWorker = Es();
22054
22054
  this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.pluginNumFramesToSkip = {}, this.pluginNumFramesSkipped = {}, this.analytics = new Ze(t2), this.canvases = new Array();
22055
22055
  }
22056
22056
  getPlugins() {
@@ -22088,7 +22088,7 @@ var kt = class {
22088
22088
  d2.w(this.TAG, `plugin - ${e.getName()} already added.`);
22089
22089
  return;
22090
22090
  }
22091
- let r2 = this.hmsTrack.getMediaTrackSettings().frameRate || Ns, s2 = 0;
22091
+ let r2 = this.hmsTrack.getMediaTrackSettings().frameRate || Os, s2 = 0;
22092
22092
  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);
22093
22093
  try {
22094
22094
  if (yield this.analytics.initWithTime(i2, () => c2(this, null, function* () {
@@ -22176,7 +22176,7 @@ var kt = class {
22176
22176
  pluginsLoop() {
22177
22177
  return c2(this, null, function* () {
22178
22178
  for (; this.pluginsLoopRunning; ) {
22179
- let e = this.hmsTrack.getMediaTrackSettings().frameRate || Ns, t2 = Math.floor(1e3 / e);
22179
+ let e = this.hmsTrack.getMediaTrackSettings().frameRate || Os, t2 = Math.floor(1e3 / e);
22180
22180
  if (!this.hmsTrack.enabled || this.hmsTrack.nativeTrack.readyState === "ended") {
22181
22181
  this.pluginsLoopState === "running" && this.resetCanvases(), this.pluginsLoopState = "paused", yield this.reusableWorker.sleep(t2);
22182
22182
  continue;
@@ -22252,7 +22252,7 @@ var kt = class {
22252
22252
  return c2(this, null, function* () {
22253
22253
  if (!this.inputCanvas || !this.inputVideo)
22254
22254
  return;
22255
- let { width: e = fo, height: t2 = vo } = this.hmsTrack.getMediaTrackSettings();
22255
+ let { width: e = vo, height: t2 = Mo } = this.hmsTrack.getMediaTrackSettings();
22256
22256
  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);
22257
22257
  });
22258
22258
  }
@@ -22311,7 +22311,7 @@ var ci = class {
22311
22311
  return Array.from(this.plugins).map((e) => e.getName());
22312
22312
  }
22313
22313
  };
22314
- var Mo = ["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"];
22314
+ var 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"];
22315
22315
  var di = class {
22316
22316
  constructor() {
22317
22317
  this.eventPerformanceMeasures = {};
@@ -22332,13 +22332,13 @@ var di = class {
22332
22332
  return (t2 = this.eventPerformanceMeasures[e]) == null ? void 0 : t2.duration;
22333
22333
  }
22334
22334
  getTimes(...e) {
22335
- return [...Mo, ...e].reduce((t2, i2) => M2(m({}, t2), { [i2]: this.getTimeTaken(i2) }), {});
22335
+ return [...yo, ...e].reduce((t2, i2) => M2(m({}, t2), { [i2]: this.getTimeTaken(i2) }), {});
22336
22336
  }
22337
22337
  cleanup() {
22338
22338
  this.eventPerformanceMeasures = {};
22339
22339
  }
22340
22340
  };
22341
- var Hr = { isAudioMuted: false, isVideoMuted: false, audioInputDeviceId: "default", audioOutputDeviceId: "default", videoDeviceId: "default" };
22341
+ var Cr = { isAudioMuted: false, isVideoMuted: false, audioInputDeviceId: "default", audioOutputDeviceId: "default", videoDeviceId: "default" };
22342
22342
  var pe;
22343
22343
  var li;
22344
22344
  var ve = class a5 {
@@ -22352,7 +22352,7 @@ var ve = class a5 {
22352
22352
  this.setScreenCaptureHandleConfig();
22353
22353
  }
22354
22354
  getTracksToPublish() {
22355
- return c2(this, arguments, function* (e = Hr) {
22355
+ return c2(this, arguments, function* (e = Cr) {
22356
22356
  var T, g2, v2, E2;
22357
22357
  let t2 = this.getAVTrackSettings(e);
22358
22358
  if (!t2)
@@ -22364,8 +22364,8 @@ var ve = class a5 {
22364
22364
  h2.audio && ((T = this.analyticsTimer) == null || T.start("local_audio_track_time")), h2.video && ((g2 = this.analyticsTimer) == null || g2.start("local_video_track_time"));
22365
22365
  try {
22366
22366
  d2.d(this.TAG, "Init Local Tracks", { fetchTrackOptions: h2 }), s2 = yield this.getLocalTracks(h2, t2, l2);
22367
- } catch (P7) {
22368
- s2 = yield this.retryGetLocalTracks(P7, t2, h2, l2);
22367
+ } catch (k2) {
22368
+ s2 = yield this.retryGetLocalTracks(k2, t2, h2, l2);
22369
22369
  }
22370
22370
  return h2.audio && ((v2 = this.analyticsTimer) == null || v2.end("local_audio_track_time")), h2.video && ((E2 = this.analyticsTimer) == null || E2.end("local_video_track_time")), o2 && r2 && !u2 && s2.push(o2), n2 && i2 && !p2 && s2.push(n2), s2;
22371
22371
  });
@@ -22398,8 +22398,8 @@ var ve = class a5 {
22398
22398
  r2.srcObject = e, r2.addEventListener("loadedmetadata", () => c2(this, null, function* () {
22399
22399
  let { videoWidth: l2, videoHeight: u2 } = r2, p2 = i2.screen, h2 = p2.width * p2.height, T = l2 / u2, g2 = p2.width / p2.height;
22400
22400
  if (T > g2) {
22401
- let v2 = t2.video, E2 = T / g2, P7 = Math.sqrt(E2);
22402
- l2 * u2 > h2 ? (v2.width = l2 / P7, v2.height = u2 / P7) : (v2.height = u2 * P7, v2.width = l2 * P7), yield e.getVideoTracks()[0].applyConstraints(v2);
22401
+ let v2 = t2.video, E2 = T / g2, k2 = Math.sqrt(E2);
22402
+ l2 * u2 > h2 ? (v2.width = l2 / k2, v2.height = u2 / k2) : (v2.height = u2 * k2, v2.width = l2 * k2), yield e.getVideoTracks()[0].applyConstraints(v2);
22403
22403
  }
22404
22404
  }));
22405
22405
  });
@@ -22439,7 +22439,7 @@ var ve = class a5 {
22439
22439
  }
22440
22440
  setScreenCaptureHandleConfig(e) {
22441
22441
  var t2;
22442
- !((t2 = navigator.mediaDevices) != null && t2.setCaptureHandleConfig) || this.isInIframe() || (e = e || {}, Object.assign(e, { handle: yo(), exposeOrigin: false, permittedOrigins: [window.location.origin] }), d2.d("setting capture handle - ", e.handle), navigator.mediaDevices.setCaptureHandleConfig(e), this.captureHandleIdentifier = e.handle);
22442
+ !((t2 = navigator.mediaDevices) != null && t2.setCaptureHandleConfig) || this.isInIframe() || (e = e || {}, Object.assign(e, { handle: ko(), exposeOrigin: false, permittedOrigins: [window.location.origin] }), d2.d("setting capture handle - ", e.handle), navigator.mediaDevices.setCaptureHandleConfig(e), this.captureHandleIdentifier = e.handle);
22443
22443
  }
22444
22444
  validateCurrentTabCapture(e, t2) {
22445
22445
  let i2 = e.getCaptureHandle(), r2 = !!(this.captureHandleIdentifier && (i2 == null ? void 0 : i2.handle) === this.captureHandleIdentifier);
@@ -22467,7 +22467,7 @@ var ve = class a5 {
22467
22467
  return o2.enabled = false, o2;
22468
22468
  }
22469
22469
  static getEmptyAudioTrack() {
22470
- let e = Ae.getAudioContext(), t2 = e.createOscillator(), i2 = e.createMediaStreamDestination();
22470
+ let e = Ie.getAudioContext(), t2 = e.createOscillator(), i2 = e.createMediaStreamDestination();
22471
22471
  t2.connect(i2), t2.start();
22472
22472
  let r2 = i2.stream.getAudioTracks()[0];
22473
22473
  return r2.enabled = false, r2;
@@ -22502,7 +22502,7 @@ var ve = class a5 {
22502
22502
  return c2(this, null, function* () {
22503
22503
  if (e instanceof f2 && e.action === "TRACK") {
22504
22504
  this.observer.onFailure(e);
22505
- let s2 = e.code === k2.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
22505
+ let s2 = e.code === P4.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
22506
22506
  if (s2) {
22507
22507
  let l2 = new Le().video(new Fe()).audio(new Ve()).build();
22508
22508
  d2.w(this.TAG, "Fetch AV Tracks failed with overconstrained error", { fetchTrackOptions: i2 }, { error: e });
@@ -22548,7 +22548,7 @@ var ve = class a5 {
22548
22548
  if (!t2 || !((o2 = t2.allowed) != null && o2.includes("audio")))
22549
22549
  return null;
22550
22550
  let i2 = this.store.getLocalPeer(), r2 = i2 == null ? void 0 : i2.audioTrack, s2 = (r2 == null ? void 0 : r2.settings.deviceId) || e.audioInputDeviceId;
22551
- return new te().codec(t2.audio.codec).maxBitrate(t2.audio.bitRate).deviceId(s2 || Hr.audioInputDeviceId).build();
22551
+ return new ee().codec(t2.audio.codec).maxBitrate(t2.audio.bitRate).deviceId(s2 || Cr.audioInputDeviceId).build();
22552
22552
  }
22553
22553
  getVideoSettings(e) {
22554
22554
  var n2;
@@ -22556,7 +22556,7 @@ var ve = class a5 {
22556
22556
  if (!t2 || !((n2 = t2.allowed) != null && n2.includes("video")))
22557
22557
  return null;
22558
22558
  let i2 = this.store.getLocalPeer(), r2 = i2 == null ? void 0 : i2.videoTrack, s2 = (r2 == null ? void 0 : r2.settings.deviceId) || e.videoDeviceId, o2 = t2.video;
22559
- return new Y2().codec(o2.codec).maxBitrate(o2.bitRate).maxFramerate(o2.frameRate).setWidth(o2.width).setHeight(o2.height).deviceId(s2 || Hr.videoDeviceId).build();
22559
+ return new Y2().codec(o2.codec).maxBitrate(o2.bitRate).maxFramerate(o2.frameRate).setWidth(o2.width).setHeight(o2.height).deviceId(s2 || Cr.videoDeviceId).build();
22560
22560
  }
22561
22561
  getScreenshareSettings(e = false) {
22562
22562
  var r2;
@@ -22564,7 +22564,7 @@ var ve = class a5 {
22564
22564
  if (!t2 || !((r2 = t2.allowed) != null && r2.includes("screen")))
22565
22565
  return null;
22566
22566
  let i2 = t2.screen;
22567
- return { video: new Y2().maxBitrate(i2.bitRate, false).codec(i2.codec).maxFramerate(i2.frameRate).setWidth(i2.width).setHeight(i2.height).build(), audio: e ? void 0 : new te().build() };
22567
+ return { video: new Y2().maxBitrate(i2.bitRate, false).codec(i2.codec).maxFramerate(i2.frameRate).setWidth(i2.width).setHeight(i2.height).build(), audio: e ? void 0 : new ee().build() };
22568
22568
  }
22569
22569
  getOrDefaultScreenshareConfig(e) {
22570
22570
  return c2(this, null, function* () {
@@ -22588,7 +22588,7 @@ var ve = class a5 {
22588
22588
  return o2;
22589
22589
  }
22590
22590
  };
22591
- function Os(a11, e) {
22591
+ function xs(a11, e) {
22592
22592
  return function(i2) {
22593
22593
  return !(0, import_lodash4.default)(a11[i2], e[i2]);
22594
22594
  };
@@ -22614,7 +22614,7 @@ var F = class a6 extends Ye {
22614
22614
  return new Fe(i3, r3, s3, o3, l2, u2, n3, p2);
22615
22615
  };
22616
22616
  this.handleSettingsChange = (t3) => c2(this, null, function* () {
22617
- let i3 = this.stream, r3 = Os(t3, this.settings);
22617
+ let i3 = this.stream, r3 = xs(t3, this.settings);
22618
22618
  if (r3("maxBitrate") && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this)), r3("width") || r3("height") || r3("advanced"))
22619
22619
  if (this.source === "video") {
22620
22620
  let s3 = yield this.replaceTrackWith(t3);
@@ -22623,7 +22623,7 @@ var F = class a6 extends Ye {
22623
22623
  yield this.nativeTrack.applyConstraints(t3.toConstraints());
22624
22624
  });
22625
22625
  this.handleDeviceChange = (t3, i3 = false) => c2(this, null, function* () {
22626
- if (Os(t3, this.settings)("deviceId") && this.source === "regular") {
22626
+ if (xs(t3, this.settings)("deviceId") && this.source === "regular") {
22627
22627
  if (this.enabled) {
22628
22628
  delete t3.facingMode;
22629
22629
  let o3 = yield this.replaceTrackWith(t3);
@@ -22775,7 +22775,7 @@ var F = class a6 extends Ye {
22775
22775
  let i2 = this.nativeTrack;
22776
22776
  i2 == null || i2.stop();
22777
22777
  try {
22778
- let r2 = yield ys(t2);
22778
+ let r2 = yield ks(t2);
22779
22779
  return d2.d(this.TAG, "replaceTrack, Previous track stopped", i2, "newTrack", r2), this.settings.deviceId === "default" && (this.settings = this.buildNewSettings({ deviceId: this.nativeTrack.getSettings().deviceId })), r2;
22780
22780
  } catch (r2) {
22781
22781
  throw this.isPublished && this.eventBus.analytics.publish(y2.publish({ error: r2 })), r2;
@@ -22797,24 +22797,24 @@ var F = class a6 extends Ye {
22797
22797
  var et = "renegotiation-callback-id";
22798
22798
  var ui = "ion-sfu";
22799
22799
  var tt = "SUBSCRIBE_ICE_CONNECTION_CALLBACK_ID";
22800
- var xs = "https://event.100ms.live/v2/client/report";
22801
- var Us = "https://event-nonprod.100ms.live/v2/client/report";
22800
+ var Us = "https://event.100ms.live/v2/client/report";
22801
+ var Bs = "https://event-nonprod.100ms.live/v2/client/report";
22802
22802
  var Pt = Math.pow(2, 31) - 1;
22803
22803
  var 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" };
22804
- var Bs = "2.5";
22805
- var Vs = "20240521";
22804
+ var Vs = "2.5";
22805
+ var Fs = "20240521";
22806
22806
  var Me = "_handraise";
22807
- var Lr = 1e3;
22808
- var Dr = 64;
22809
- var Fs = "https://whiteboard.100ms.live";
22810
- var Gs = "https://whiteboard-qa.100ms.live";
22807
+ var Dr = 1e3;
22808
+ var wr = 64;
22809
+ var Gs = "https://whiteboard.100ms.live";
22810
+ var Ws = "https://whiteboard-qa.100ms.live";
22811
22811
  var U2 = class a7 extends Ye {
22812
22812
  constructor(t2, i2, r2) {
22813
22813
  super(t2, i2, r2);
22814
22814
  this._degraded = false;
22815
22815
  this._degradedAt = null;
22816
22816
  this._layerDefinitions = [];
22817
- this.history = new wr();
22817
+ this.history = new _r();
22818
22818
  this.preferredLayer = "high";
22819
22819
  this.setVideoHandler(new Xe(this));
22820
22820
  }
@@ -22928,7 +22928,7 @@ var U2 = class a7 extends Ye {
22928
22928
  return this.degraded && t2 === "none" ? true : r2 === t2 ? (d2.d(`[Remote Track] ${this.logIdentifier}`, `Not sending update, already on layer ${t2}, source=${i2}`), false) : true;
22929
22929
  }
22930
22930
  };
22931
- var wr = class {
22931
+ var _r = class {
22932
22932
  constructor() {
22933
22933
  this.history = [];
22934
22934
  }
@@ -23024,7 +23024,7 @@ var fe = class extends je {
23024
23024
  return this.audio;
23025
23025
  }
23026
23026
  };
23027
- var Ws = (a11, e, t2, i2) => c2(void 0, null, function* () {
23027
+ var $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
23028
23028
  var o2;
23029
23029
  let r2, s2 = {};
23030
23030
  if ((o2 = e.transceiver) != null && o2.sender.track) {
@@ -23046,8 +23046,8 @@ var Ws = (a11, e, t2, i2) => c2(void 0, null, function* () {
23046
23046
  break;
23047
23047
  }
23048
23048
  }), Object.keys(m({}, l2)).forEach((p2) => {
23049
- var P7, w2;
23050
- let h2 = (P7 = l2[p2]) == null ? void 0 : P7.codecId, T = h2 ? n2[h2] : void 0, g2;
23049
+ var k2, w2;
23050
+ let h2 = (k2 = l2[p2]) == null ? void 0 : k2.codecId, T = h2 ? n2[h2] : void 0, g2;
23051
23051
  T && (g2 = T.substring(T.indexOf("/") + 1));
23052
23052
  let v2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), E2 = u2[v2.ssrc];
23053
23053
  s2[p2] = M2(m({}, v2), { bitrate: Et("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 });
@@ -23058,7 +23058,7 @@ var Ws = (a11, e, t2, i2) => c2(void 0, null, function* () {
23058
23058
  return s2;
23059
23059
  }
23060
23060
  });
23061
- var $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
23061
+ var Ks = (a11, e, t2, i2) => c2(void 0, null, function* () {
23062
23062
  var l2;
23063
23063
  let r2;
23064
23064
  try {
@@ -23066,10 +23066,10 @@ var $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
23066
23066
  } catch (u2) {
23067
23067
  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);
23068
23068
  }
23069
- let s2 = Po(r2), o2 = Et("bytesReceived", s2, i2), n2 = _r("packetsLost", s2, i2);
23070
- return s2 != null && s2.remote && Object.assign(s2.remote, { packetsLostRate: _r("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 });
23069
+ let s2 = Eo(r2), o2 = Et("bytesReceived", s2, i2), n2 = Nr("packetsLost", s2, i2);
23070
+ 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 });
23071
23071
  });
23072
- var Po = (a11) => {
23072
+ var Eo = (a11) => {
23073
23073
  let e, t2, i2 = {};
23074
23074
  a11 == null || a11.forEach((o2) => {
23075
23075
  switch (o2.type) {
@@ -23092,11 +23092,11 @@ var Po = (a11) => {
23092
23092
  let r2 = e != null && e.codecId ? i2[e.codecId] : void 0, s2;
23093
23093
  return r2 && (s2 = r2.substring(r2.indexOf("/") + 1)), e && Object.assign(e, { remote: t2, codec: s2 });
23094
23094
  };
23095
- var Nr = (a11, e, t2) => {
23096
- let i2 = Eo(e), r2 = Et(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23095
+ var Or = (a11, e, t2) => {
23096
+ let i2 = bo(e), r2 = Et(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23097
23097
  return i2 && Object.assign(i2, { bitrate: r2 });
23098
23098
  };
23099
- var Eo = (a11) => {
23099
+ var bo = (a11) => {
23100
23100
  let e;
23101
23101
  return a11 == null || a11.forEach((t2) => {
23102
23102
  t2.type === "transport" && (e = a11 == null ? void 0 : a11.get(t2.selectedCandidatePairId));
@@ -23104,19 +23104,19 @@ var Eo = (a11) => {
23104
23104
  t2.type === "candidate-pair" && t2.selected && (e = t2);
23105
23105
  }), e;
23106
23106
  };
23107
- var Ks = (a11) => {
23107
+ var qs = (a11) => {
23108
23108
  let e = { packetsLost: 0, jitter: 0 };
23109
23109
  return a11 == null || a11.forEach((t2) => {
23110
23110
  t2.packetsLost && (e.packetsLost += t2.packetsLost), t2.jitter > e.jitter && (e.jitter = t2.jitter);
23111
23111
  }), e;
23112
23112
  };
23113
- var qs = (a11, e) => Array.from(new Set(a11.concat(e)));
23114
- var Et = (a11, e, t2) => _r(a11, e, t2) * 8;
23115
- var _r = (a11, e, t2) => {
23113
+ var js = (a11, e) => Array.from(new Set(a11.concat(e)));
23114
+ var Et = (a11, e, t2) => Nr(a11, e, t2) * 8;
23115
+ var Nr = (a11, e, t2) => {
23116
23116
  let i2 = e && e[a11], r2 = t2 ? t2[a11] : null;
23117
- return [e, t2, ee(i2), ee(r2)].every((o2) => !!o2) ? Or(i2, r2, e == null ? void 0 : e.timestamp, t2 == null ? void 0 : t2.timestamp) * 1e3 : 0;
23117
+ 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;
23118
23118
  };
23119
- var Or = (a11, e, t2, i2) => ee(a11) && ee(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
23119
+ var xr = (a11, e, t2, i2) => oe(a11) && oe(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
23120
23120
  var pi = class {
23121
23121
  constructor(e, t2, i2) {
23122
23122
  this.getStats = e;
@@ -23138,36 +23138,36 @@ var pi = class {
23138
23138
  let e2 = this.getLocalPeerStats(), t3;
23139
23139
  try {
23140
23140
  t3 = yield (h2 = (p2 = this.getStats).publish) == null ? void 0 : h2.call(p2);
23141
- } catch (P7) {
23142
- this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("PUBLISH", P7.message))), d2.w(this.TAG, "Error in getting publish stats", P7);
23141
+ } catch (k2) {
23142
+ this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("PUBLISH", k2.message))), d2.w(this.TAG, "Error in getting publish stats", k2);
23143
23143
  }
23144
- let i3 = t3 && Nr("publish", t3, e2), r3;
23144
+ let i3 = t3 && Or("publish", t3, e2), r3;
23145
23145
  try {
23146
23146
  r3 = yield (g2 = (T = this.getStats).subscribe) == null ? void 0 : g2.call(T);
23147
- } catch (P7) {
23148
- this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("SUBSCRIBE", P7.message))), d2.w(this.TAG, "Error in getting subscribe stats", P7);
23147
+ } catch (k2) {
23148
+ this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("SUBSCRIBE", k2.message))), d2.w(this.TAG, "Error in getting subscribe stats", k2);
23149
23149
  }
23150
- let s2 = r3 && Nr("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = Ks(r3), l2 = Or(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 });
23150
+ let s2 = r3 && Or("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = qs(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 });
23151
23151
  this.peerStats[this.localPeerID] = { publish: i3, subscribe: u2 };
23152
23152
  });
23153
23153
  this.updateRemoteTrackStats = () => c2(this, null, function* () {
23154
23154
  var i3;
23155
- let e2 = Array.from(this.store.getTracksMap().values()).filter((r3) => r3 instanceof U2 || r3 instanceof ae), t3 = e2.map((r3) => r3.trackId);
23155
+ let e2 = Array.from(this.store.getTracksMap().values()).filter((r3) => r3 instanceof U2 || r3 instanceof se), t3 = e2.map((r3) => r3.trackId);
23156
23156
  Object.keys(this.remoteTrackStats).forEach((r3) => {
23157
23157
  t3.includes(r3) || delete this.remoteTrackStats[r3];
23158
23158
  });
23159
23159
  for (let r3 of e2) {
23160
- let s2 = r3.peerId && ((i3 = this.store.getPeerById(r3.peerId)) == null ? void 0 : i3.name), o2 = this.getRemoteTrackStats(r3.trackId), n2 = yield $s(this.eventBus, r3, s2, o2);
23160
+ 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);
23161
23161
  n2 && (this.remoteTrackStats[r3.trackId] = n2);
23162
23162
  }
23163
23163
  });
23164
23164
  this.updateLocalTrackStats = () => c2(this, null, function* () {
23165
23165
  var i3;
23166
- let e2 = this.store.getLocalPeerTracks().reduce((r3, s2) => (r3[s2.getTrackIDBeingSent()] = s2, r3), {}), t3 = qs(Object.keys(this.localTrackStats), Object.keys(e2));
23166
+ let e2 = this.store.getLocalPeerTracks().reduce((r3, s2) => (r3[s2.getTrackIDBeingSent()] = s2, r3), {}), t3 = js(Object.keys(this.localTrackStats), Object.keys(e2));
23167
23167
  for (let r3 of t3) {
23168
23168
  let s2 = e2[r3];
23169
23169
  if (s2) {
23170
- let o2 = (i3 = this.store.getLocalPeer()) == null ? void 0 : i3.name, n2 = yield Ws(this.eventBus, s2, o2, this.localTrackStats[r3]);
23170
+ let o2 = (i3 = this.store.getLocalPeer()) == null ? void 0 : i3.name, n2 = yield $s(this.eventBus, s2, o2, this.localTrackStats[r3]);
23171
23171
  n2 && (this.localTrackStats[r3] = n2);
23172
23172
  } else
23173
23173
  delete this.localTrackStats[r3];
@@ -23274,7 +23274,7 @@ var it = class {
23274
23274
  };
23275
23275
  var rt = class {
23276
23276
  };
23277
- rt.makePeerId = () => bo();
23277
+ rt.makePeerId = () => Ro();
23278
23278
  var We = class extends it {
23279
23279
  constructor(t2) {
23280
23280
  super(M2(m({}, t2), { peerId: rt.makePeerId(), isLocal: true }));
@@ -23374,7 +23374,7 @@ var st = class {
23374
23374
  });
23375
23375
  }
23376
23376
  };
23377
- var De = class extends Ro {
23377
+ var De = class extends Ao {
23378
23378
  on(e, t2) {
23379
23379
  return super.on(e, t2);
23380
23380
  }
@@ -23737,33 +23737,33 @@ var Rt = class extends De {
23737
23737
  };
23738
23738
  var B2 = (a11) => a11.room;
23739
23739
  var Io = (a11) => a11.errors;
23740
- var Gh = createSelector(Io, (a11) => a11.length === 0 ? null : a11.at(-1));
23741
- var Wh = createSelector(B2, (a11) => a11.id);
23740
+ var Wh = createSelector(Io, (a11) => a11.length === 0 ? null : a11.at(-1));
23741
+ var $h = createSelector(B2, (a11) => a11.id);
23742
23742
  var q2 = (a11) => a11.peers;
23743
23743
  var fi = (a11) => a11.messages.byID;
23744
- var js = (a11) => a11.messages.allIDs;
23744
+ var Js = (a11) => a11.messages.allIDs;
23745
23745
  var N2 = (a11) => a11.tracks;
23746
- var Js = (a11) => a11.settings;
23747
- var xr = (a11) => a11.appData;
23748
- var Ao = (a11) => a11.speakers;
23746
+ var Qs = (a11) => a11.settings;
23747
+ var Ur = (a11) => a11.appData;
23748
+ var Ho = (a11) => a11.speakers;
23749
23749
  var we = createSelector([B2], (a11) => a11 && a11.isConnected);
23750
- var qh = createSelector([we, 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));
23751
- var Ho = (a11) => a11.hideLocalPeer;
23752
- var me = createSelector([B2, q2, Ho], (a11, e, t2) => t2 ? a11.peers.filter((i2) => a11.localPeer !== i2).map((i2) => e[i2]) : a11.peers.map((i2) => e[i2]));
23753
- var Co = createSelector(N2, (a11) => Object.values(a11));
23754
- var ie = createSelector(B2, q2, (a11, e) => e[a11.localPeer]);
23750
+ var jh = createSelector([we, 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));
23751
+ var Co = (a11) => a11.hideLocalPeer;
23752
+ var me = createSelector([B2, q2, Co], (a11, e, t2) => t2 ? a11.peers.filter((i2) => a11.localPeer !== i2).map((i2) => e[i2]) : a11.peers.map((i2) => e[i2]));
23753
+ var Lo = createSelector(N2, (a11) => Object.values(a11));
23754
+ var te = createSelector(B2, q2, (a11, e) => e[a11.localPeer]);
23755
23755
  var ye = createSelector(B2, (a11) => a11.localPeer);
23756
- var jh = createSelector(ie, (a11) => a11 == null ? void 0 : a11.name);
23757
- var Jh = createSelector(ie, (a11) => a11 == null ? void 0 : a11.roleName);
23758
- var oe = createSelector(ie, (a11) => a11 == null ? void 0 : a11.audioTrack);
23759
- var X2 = createSelector(ie, (a11) => a11 == null ? void 0 : a11.videoTrack);
23760
- var Lo = createSelector(ie, (a11) => a11 == null ? void 0 : a11.auxiliaryTracks);
23761
- var Qs = createSelector([oe, X2, Lo], (a11, e, t2) => {
23756
+ var Jh = createSelector(te, (a11) => a11 == null ? void 0 : a11.name);
23757
+ var Qh = createSelector(te, (a11) => a11 == null ? void 0 : a11.roleName);
23758
+ var ae = createSelector(te, (a11) => a11 == null ? void 0 : a11.audioTrack);
23759
+ var X2 = createSelector(te, (a11) => a11 == null ? void 0 : a11.videoTrack);
23760
+ var Do = createSelector(te, (a11) => a11 == null ? void 0 : a11.auxiliaryTracks);
23761
+ var zs = createSelector([ae, X2, Do], (a11, e, t2) => {
23762
23762
  let i2 = t2 ? [...t2] : [];
23763
23763
  return a11 && i2.unshift(a11), e && i2.unshift(e), i2;
23764
23764
  });
23765
- var Qh = createSelector(me, (a11) => a11.filter((e) => !e.isLocal));
23766
- var zh = createSelector(q2, Ao, (a11, e) => {
23765
+ var zh = createSelector(me, (a11) => a11.filter((e) => !e.isLocal));
23766
+ var Yh = createSelector(q2, Ho, (a11, e) => {
23767
23767
  let t2 = Object.entries(e).sort((i2, r2) => {
23768
23768
  var n2, l2;
23769
23769
  let s2 = ((n2 = i2[1]) == null ? void 0 : n2.audioLevel) || 0;
@@ -23776,19 +23776,19 @@ var zh = createSelector(q2, Ao, (a11, e) => {
23776
23776
  }
23777
23777
  return null;
23778
23778
  });
23779
- var Ur = (a11) => {
23780
- let e = ie(a11);
23779
+ var Br = (a11) => {
23780
+ let e = te(a11);
23781
23781
  return qe(a11, e == null ? void 0 : e.videoTrack);
23782
23782
  };
23783
- var zs = (a11) => {
23784
- let e = ie(a11);
23785
- return os(a11, e == null ? void 0 : e.videoTrack);
23783
+ var Ys = (a11) => {
23784
+ let e = te(a11);
23785
+ return ns(a11, e == null ? void 0 : e.videoTrack);
23786
23786
  };
23787
- var Br = createSelector(ie, N2, (a11, e) => {
23787
+ var Vr = createSelector(te, N2, (a11, e) => {
23788
23788
  let { video: t2, audio: i2 } = xe(e, a11);
23789
23789
  return !!(t2 || i2);
23790
23790
  });
23791
- var Do = createSelector(q2, N2, (a11, e) => {
23791
+ var wo = createSelector(q2, N2, (a11, e) => {
23792
23792
  let t2;
23793
23793
  for (let i2 in a11) {
23794
23794
  let r2 = a11[i2], { video: s2, audio: o2 } = xe(e, r2);
@@ -23798,15 +23798,15 @@ var Do = createSelector(q2, N2, (a11, e) => {
23798
23798
  }
23799
23799
  return t2;
23800
23800
  });
23801
- var Xh = createSelector(Do, (a11) => !!a11);
23802
- var Zh = createSelector(q2, N2, (a11, e) => {
23801
+ var Zh = createSelector(wo, (a11) => !!a11);
23802
+ var em = createSelector(q2, N2, (a11, e) => {
23803
23803
  for (let t2 in a11) {
23804
23804
  let i2 = a11[t2], { audio: r2, video: s2 } = xe(e, i2);
23805
23805
  if (!s2 && r2)
23806
23806
  return i2;
23807
23807
  }
23808
23808
  });
23809
- var em = createSelector(q2, N2, (a11, e) => {
23809
+ var tm = createSelector(q2, N2, (a11, e) => {
23810
23810
  let t2 = [], i2 = [];
23811
23811
  for (let r2 in a11) {
23812
23812
  let s2 = a11[r2], { video: o2, audio: n2 } = xe(e, s2);
@@ -23814,81 +23814,81 @@ var em = createSelector(q2, N2, (a11, e) => {
23814
23814
  }
23815
23815
  return t2.concat(i2);
23816
23816
  });
23817
- var tm = createSelector(q2, N2, (a11, e) => {
23817
+ var im = createSelector(q2, N2, (a11, e) => {
23818
23818
  for (let t2 in e) {
23819
23819
  let i2 = e[t2];
23820
23820
  if (mt(i2) && ht(i2) && i2.peerId)
23821
23821
  return a11[i2.peerId];
23822
23822
  }
23823
23823
  });
23824
- var im = createSelector(q2, N2, (a11, e) => {
23824
+ var rm = createSelector(q2, N2, (a11, e) => {
23825
23825
  for (let t2 in e) {
23826
23826
  let i2 = e[t2];
23827
23827
  if (ri(i2) && i2.peerId)
23828
23828
  return a11[i2.peerId];
23829
23829
  }
23830
23830
  });
23831
- var rm = createSelector(Co, (a11) => a11.filter(as));
23832
- var sm = createSelector(js, (a11) => a11.length);
23833
- var am = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
23834
- var It = createSelector(js, fi, (a11, e) => {
23831
+ var sm = createSelector(Lo, (a11) => a11.filter(os));
23832
+ var am = createSelector(Js, (a11) => a11.length);
23833
+ var om = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
23834
+ var At = createSelector(Js, fi, (a11, e) => {
23835
23835
  let t2 = [];
23836
23836
  return a11.forEach((i2) => {
23837
23837
  t2.push(e[i2]);
23838
23838
  }), t2;
23839
23839
  });
23840
- var wo = createSelector(It, (a11) => a11.filter((e) => {
23840
+ var _o = createSelector(At, (a11) => a11.filter((e) => {
23841
23841
  var t2;
23842
23842
  return !e.recipientPeer && !(e.recipientRoles && ((t2 = e.recipientRoles) == null ? void 0 : t2.length) > 0);
23843
23843
  }));
23844
- var om = createSelector(wo, (a11) => a11.filter((e) => !e.read).length);
23845
- var re = createSelector([B2], (a11) => a11 && a11.roomState);
23846
- var Ys = createSelector(re, (a11) => a11 === "Preview");
23847
- var nm = createSelector(B2, (a11) => a11.roomState !== "Disconnected");
23848
- var cm = createSelector(B2, (a11) => !a11.transcriptions || a11.transcriptions.length <= 0 ? false : a11.transcriptions.some((e) => e.mode === "caption" && e.state === "started"));
23844
+ var nm = createSelector(_o, (a11) => a11.filter((e) => !e.read).length);
23845
+ var ie = createSelector([B2], (a11) => a11 && a11.roomState);
23846
+ var Xs = createSelector(ie, (a11) => a11 === "Preview");
23847
+ var cm = createSelector(B2, (a11) => a11.roomState !== "Disconnected");
23848
+ var dm = createSelector(B2, (a11) => !a11.transcriptions || a11.transcriptions.length <= 0 ? false : a11.transcriptions.some((e) => e.mode === "caption" && e.state === "started"));
23849
23849
  var Se = (a11) => a11.roles;
23850
- var dm = createSelector([Se], (a11) => Object.keys(a11));
23851
- var at = createSelector([ie, Se], (a11, e) => a11 != null && a11.roleName ? e[a11.roleName] : null);
23852
- var _o = (a11) => {
23850
+ var lm = createSelector([Se], (a11) => Object.keys(a11));
23851
+ var at = createSelector([te, Se], (a11, e) => a11 != null && a11.roleName ? e[a11.roleName] : null);
23852
+ var No = (a11) => {
23853
23853
  var e;
23854
23854
  return (e = a11.preview) == null ? void 0 : e.asRole;
23855
23855
  };
23856
- var Xs = createSelector([_o, Se], (a11, e) => a11 ? e[a11] : null);
23857
- var lm = createSelector([at], (a11) => {
23856
+ var Zs = createSelector([No, Se], (a11, e) => a11 ? e[a11] : null);
23857
+ var um = createSelector([at], (a11) => {
23858
23858
  var e;
23859
23859
  return (e = a11 == null ? void 0 : a11.subscribeParams) != null && e.subscribeToRoles ? a11.subscribeParams.subscribeToRoles.length > 0 : false;
23860
23860
  });
23861
- var Zs = createSelector(at, (a11) => a11 == null ? void 0 : a11.permissions);
23862
- var um = createSelector(B2, (a11) => a11.recording);
23863
- var pm = createSelector(B2, (a11) => a11.rtmp);
23864
- var hm = createSelector(B2, (a11) => a11.hls);
23865
- var mm = createSelector(B2, (a11) => a11.transcriptions);
23866
- var Sm = createSelector(B2, (a11) => a11.sessionId);
23867
- var gm = createSelector(B2, (a11) => a11.startedAt);
23868
- var Tm = createSelector(B2, (a11) => !!a11.isLargeRoom);
23869
- var fm = createSelector(B2, (a11) => !!a11.isEffectsEnabled);
23870
- var vm = createSelector(B2, (a11) => a11.effectsKey);
23871
- var ea = (a11) => a11.polls;
23872
- var Pm = createSelector(me, (a11) => a11.filter((e) => e.isHandRaised));
23873
- var No = (a11) => a11.whiteboards;
23874
- var Em = createSelector(No, (a11) => Object.values(a11)[0]);
23875
- var ia = (a11 = "audio") => (e) => e.playlist[a11].list;
23876
- var Vr = (a11 = "audio") => (e) => e.playlist[a11].selection;
23877
- var ra = (a11 = "audio") => (e) => e.playlist[a11].progress;
23878
- var sa = (a11 = "audio") => (e) => e.playlist[a11].currentTime;
23879
- var aa = (a11 = "audio") => (e) => e.playlist[a11].playbackRate;
23880
- var oa = (a11 = "audio") => (e) => e.playlist[a11].volume;
23881
- var na = (a11 = "audio") => createSelector(ia(a11), (e) => Object.values(e));
23882
- var ca = (a11 = "audio") => createSelector(ia(a11), Vr(a11), (e, t2) => {
23861
+ var ea = createSelector(at, (a11) => a11 == null ? void 0 : a11.permissions);
23862
+ var pm = createSelector(B2, (a11) => a11.recording);
23863
+ var hm = createSelector(B2, (a11) => a11.rtmp);
23864
+ var mm = createSelector(B2, (a11) => a11.hls);
23865
+ var Sm = createSelector(B2, (a11) => a11.transcriptions);
23866
+ var gm = createSelector(B2, (a11) => a11.sessionId);
23867
+ var Tm = createSelector(B2, (a11) => a11.startedAt);
23868
+ var fm = createSelector(B2, (a11) => !!a11.isLargeRoom);
23869
+ var vm = createSelector(B2, (a11) => !!a11.isEffectsEnabled);
23870
+ var Mm = createSelector(B2, (a11) => a11.effectsKey);
23871
+ var ta = (a11) => a11.polls;
23872
+ var Em = createSelector(me, (a11) => a11.filter((e) => e.isHandRaised));
23873
+ var Oo = (a11) => a11.whiteboards;
23874
+ var bm = createSelector(Oo, (a11) => Object.values(a11)[0]);
23875
+ var ra = (a11 = "audio") => (e) => e.playlist[a11].list;
23876
+ var Fr = (a11 = "audio") => (e) => e.playlist[a11].selection;
23877
+ var sa = (a11 = "audio") => (e) => e.playlist[a11].progress;
23878
+ var aa = (a11 = "audio") => (e) => e.playlist[a11].currentTime;
23879
+ var oa = (a11 = "audio") => (e) => e.playlist[a11].playbackRate;
23880
+ var na = (a11 = "audio") => (e) => e.playlist[a11].volume;
23881
+ var ca = (a11 = "audio") => createSelector(ra(a11), (e) => Object.values(e));
23882
+ var da = (a11 = "audio") => createSelector(ra(a11), Fr(a11), (e, t2) => {
23883
23883
  if (t2.id)
23884
23884
  return e[t2.id];
23885
23885
  });
23886
- var da = { selection: Vr("audio"), progress: ra("audio"), currentTime: sa("audio"), playbackRate: aa("audio"), volume: oa("audio"), list: na("audio"), selectedItem: ca("audio") };
23887
- var la = { selection: Vr("video"), progress: ra("video"), currentTime: sa("video"), playbackRate: aa("video"), volume: oa("video"), list: na("video"), selectedItem: ca("video") };
23888
- function A2(a11) {
23886
+ var la = { selection: Fr("audio"), progress: sa("audio"), currentTime: aa("audio"), playbackRate: oa("audio"), volume: na("audio"), list: ca("audio"), selectedItem: da("audio") };
23887
+ var ua = { selection: Fr("video"), progress: sa("video"), currentTime: aa("video"), playbackRate: oa("video"), volume: na("video"), list: ca("video"), selectedItem: da("video") };
23888
+ function I2(a11) {
23889
23889
  return (e) => (t2) => a11(t2, e);
23890
23890
  }
23891
- var At = "HMS-Store:";
23891
+ var It = "HMS-Store:";
23892
23892
  var b2 = class {
23893
23893
  static v(e, ...t2) {
23894
23894
  this.log(0, e, ...t2);
@@ -23918,23 +23918,23 @@ var b2 = class {
23918
23918
  if (!(this.level.valueOf() > e.valueOf()))
23919
23919
  switch (e) {
23920
23920
  case 0: {
23921
- console.log(At, ...t2);
23921
+ console.log(It, ...t2);
23922
23922
  break;
23923
23923
  }
23924
23924
  case 1: {
23925
- console.debug(At, ...t2);
23925
+ console.debug(It, ...t2);
23926
23926
  break;
23927
23927
  }
23928
23928
  case 2: {
23929
- console.info(At, ...t2);
23929
+ console.info(It, ...t2);
23930
23930
  break;
23931
23931
  }
23932
23932
  case 3: {
23933
- console.warn(At, ...t2);
23933
+ console.warn(It, ...t2);
23934
23934
  break;
23935
23935
  }
23936
23936
  case 6: {
23937
- console.error(At, ...t2);
23937
+ console.error(It, ...t2);
23938
23938
  break;
23939
23939
  }
23940
23940
  case 4: {
@@ -23955,133 +23955,133 @@ var b2 = class {
23955
23955
  }
23956
23956
  };
23957
23957
  b2.level = 0;
23958
- var Fr = (a11, e) => e;
23958
+ var Gr = (a11, e) => e;
23959
23959
  var Ht = (a11, e) => e;
23960
- var ua = (a11, e) => e;
23961
- var Oo = (a11, e) => e;
23960
+ var pa = (a11, e) => e;
23962
23961
  var xo = (a11, e) => e;
23963
- var j2 = createSelector([q2, Fr], (a11, e) => e ? a11[e] : null);
23964
- var Gr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
23965
- var Uo = createSelector([N2, Ht], (a11, e) => {
23962
+ var Uo = (a11, e) => e;
23963
+ var j2 = createSelector([q2, Gr], (a11, e) => e ? a11[e] : null);
23964
+ var Wr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
23965
+ var Bo = createSelector([N2, Ht], (a11, e) => {
23966
23966
  if (!e)
23967
23967
  return null;
23968
23968
  let t2 = a11[e];
23969
23969
  return (t2 == null ? void 0 : t2.type) === "video" ? t2 : null;
23970
23970
  });
23971
- var Bo = createSelector([N2, Ht], (a11, e) => {
23971
+ var Vo = createSelector([N2, Ht], (a11, e) => {
23972
23972
  if (!e)
23973
23973
  return null;
23974
23974
  let t2 = a11[e];
23975
23975
  return (t2 == null ? void 0 : t2.type) === "audio" ? t2 : null;
23976
23976
  });
23977
- var Vo = createSelector([N2, Ht], (a11, e) => {
23977
+ var Fo = createSelector([N2, Ht], (a11, e) => {
23978
23978
  if (!e)
23979
23979
  return null;
23980
23980
  let t2 = a11[e];
23981
23981
  return (t2 == null ? void 0 : t2.type) === "audio" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
23982
23982
  });
23983
- var Fo = createSelector([N2, Ht], (a11, e) => {
23983
+ var Go = createSelector([N2, Ht], (a11, e) => {
23984
23984
  if (!e)
23985
23985
  return null;
23986
23986
  let t2 = a11[e];
23987
23987
  return (t2 == null ? void 0 : t2.type) === "video" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
23988
23988
  });
23989
- var Go = createSelector([ea, xo], (a11, e) => e ? a11[e] : null);
23990
- var Z2 = A2(j2);
23991
- var Nm = A2(createSelector([xr, Oo], (a11, e) => {
23989
+ var Wo = createSelector([ta, Uo], (a11, e) => e ? a11[e] : null);
23990
+ var Z2 = I2(j2);
23991
+ var Om = I2(createSelector([Ur, xo], (a11, e) => {
23992
23992
  if (a11)
23993
23993
  return e ? a11[e] : a11;
23994
23994
  }));
23995
- function Om(a11) {
23995
+ function xm(a11) {
23996
23996
  return (e) => {
23997
23997
  if (e.sessionStore)
23998
23998
  return a11 ? e.sessionStore[a11] : e.sessionStore;
23999
23999
  };
24000
24000
  }
24001
- var Um = A2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.name));
24002
- var Bm = A2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.type));
24003
- var vi = A2(Gr);
24004
- var pa = A2(Uo);
24005
- var Vm = A2(Bo);
24006
- var Fm = A2(Vo);
24007
- var Gm = A2(Fo);
24008
- var Wo = A2((a11, e) => {
24001
+ var Bm = I2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.name));
24002
+ var Vm = I2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.type));
24003
+ var vi = I2(Wr);
24004
+ var ha = I2(Bo);
24005
+ var Fm = I2(Vo);
24006
+ var Gm = I2(Fo);
24007
+ var Wm = I2(Go);
24008
+ var $o = I2((a11, e) => {
24009
24009
  let t2 = j2(a11, e);
24010
24010
  if (t2 && t2.videoTrack && t2.videoTrack !== "")
24011
24011
  return a11.tracks[t2.videoTrack];
24012
24012
  });
24013
- var $o = A2((a11, e) => {
24013
+ var Ko = I2((a11, e) => {
24014
24014
  let t2 = j2(a11, e);
24015
24015
  if (t2 && t2.audioTrack && t2.audioTrack !== "")
24016
24016
  return a11.tracks[t2.audioTrack];
24017
24017
  });
24018
- var $m = A2((a11, e) => {
24018
+ var Km = I2((a11, e) => {
24019
24019
  let t2 = j2(a11, e);
24020
24020
  return (t2 == null ? void 0 : t2.auxiliaryTracks.map((i2) => a11.tracks[i2])) || [];
24021
24021
  });
24022
- var ha = (a11, e) => e ? a11.speakers[e] : null;
24023
- var Km = A2(createSelector(ha, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24024
- var Ko = (a11, e) => {
24025
- let t2 = $o(e)(a11);
24026
- return ha(a11, t2 == null ? void 0 : t2.id);
24027
- };
24028
- var qm = A2(createSelector(Ko, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24029
- var jm = A2((a11, e) => {
24022
+ var ma = (a11, e) => e ? a11.speakers[e] : null;
24023
+ var qm = I2(createSelector(ma, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24024
+ var qo = (a11, e) => {
24025
+ let t2 = Ko(e)(a11);
24026
+ return ma(a11, t2 == null ? void 0 : t2.id);
24027
+ };
24028
+ var jm = I2(createSelector(qo, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
24029
+ var Jm = I2((a11, e) => {
24030
24030
  if (e)
24031
24031
  return a11.connectionQualities[e];
24032
24032
  });
24033
- var Jm = A2((a11, e) => {
24033
+ var Qm = I2((a11, e) => {
24034
24034
  let t2 = j2(a11, e);
24035
24035
  if (t2) {
24036
24036
  let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => pt(a11.tracks[r2]));
24037
24037
  return i2 ? a11.tracks[i2] : void 0;
24038
24038
  }
24039
24039
  });
24040
- var Qm = A2(createSelector(N2, j2, (a11, e) => {
24040
+ var zm = I2(createSelector(N2, j2, (a11, e) => {
24041
24041
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24042
24042
  let r2 = a11[i2];
24043
24043
  return mt(r2) && ht(r2);
24044
24044
  });
24045
24045
  return t2 ? a11[t2] : void 0;
24046
24046
  }));
24047
- var zm = A2(createSelector(N2, j2, (a11, e) => {
24047
+ var Ym = I2(createSelector(N2, j2, (a11, e) => {
24048
24048
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24049
24049
  let r2 = a11[i2];
24050
24050
  return mt(r2) && pt(r2);
24051
24051
  });
24052
24052
  return t2 ? a11[t2] : void 0;
24053
24053
  }));
24054
- var Ym = A2(createSelector(N2, j2, (a11, e) => {
24054
+ var Xm = I2(createSelector(N2, j2, (a11, e) => {
24055
24055
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24056
24056
  let r2 = a11[i2];
24057
24057
  return ri(r2) && pt(r2);
24058
24058
  });
24059
24059
  return t2 ? a11[t2] : void 0;
24060
24060
  }));
24061
- var ma = A2(createSelector(N2, j2, (a11, e) => xe(a11, e)));
24062
- var Sa = (a11) => createSelector(ma(a11), (e) => e.audio);
24063
- var Zm = A2((a11, e) => {
24061
+ var Sa = I2(createSelector(N2, j2, (a11, e) => xe(a11, e)));
24062
+ var ga = (a11) => createSelector(Sa(a11), (e) => e.audio);
24063
+ var eS = I2((a11, e) => {
24064
24064
  let t2 = j2(a11, e);
24065
24065
  return qe(a11, t2 == null ? void 0 : t2.audioTrack);
24066
24066
  });
24067
- var eS = A2((a11, e) => {
24067
+ var tS = I2((a11, e) => {
24068
24068
  let t2 = j2(a11, e);
24069
24069
  return qe(a11, t2 == null ? void 0 : t2.videoTrack);
24070
24070
  });
24071
- var ga = A2((a11, e) => {
24071
+ var Ta = I2((a11, e) => {
24072
24072
  if (e && a11.tracks[e])
24073
24073
  return a11.tracks[e].volume === 0;
24074
24074
  });
24075
- var tS = A2((a11, e) => {
24075
+ var iS = I2((a11, e) => {
24076
24076
  let t2 = j2(a11, e);
24077
- return ga(t2 == null ? void 0 : t2.audioTrack)(a11);
24077
+ return Ta(t2 == null ? void 0 : t2.audioTrack)(a11);
24078
24078
  });
24079
- var iS = A2((a11, e) => {
24080
- let t2 = Sa(e)(a11);
24081
- return ga(t2 == null ? void 0 : t2.id)(a11);
24079
+ var rS = I2((a11, e) => {
24080
+ let t2 = ga(e)(a11);
24081
+ return Ta(t2 == null ? void 0 : t2.id)(a11);
24082
24082
  });
24083
- var Ta = A2((a11, e) => {
24084
- let t2 = Gr(a11, e);
24083
+ var fa = I2((a11, e) => {
24084
+ let t2 = Wr(a11, e);
24085
24085
  if (t2) {
24086
24086
  if (t2.type !== "audio") {
24087
24087
  b2.w("Please pass audio track here");
@@ -24090,16 +24090,16 @@ var Ta = A2((a11, e) => {
24090
24090
  return t2.volume;
24091
24091
  }
24092
24092
  });
24093
- var rS = A2((a11, e) => {
24093
+ var sS = I2((a11, e) => {
24094
24094
  let t2 = j2(a11, e);
24095
- return Ta(t2 == null ? void 0 : t2.audioTrack)(a11);
24095
+ return fa(t2 == null ? void 0 : t2.audioTrack)(a11);
24096
24096
  });
24097
- var sS = A2((a11, e) => {
24098
- let t2 = Sa(e)(a11);
24099
- return Ta(t2 == null ? void 0 : t2.id)(a11);
24097
+ var aS = I2((a11, e) => {
24098
+ let t2 = ga(e)(a11);
24099
+ return fa(t2 == null ? void 0 : t2.id)(a11);
24100
24100
  });
24101
- var aS = A2((a11, e) => {
24102
- let t2 = Gr(a11, e);
24101
+ var oS = I2((a11, e) => {
24102
+ let t2 = Wr(a11, e);
24103
24103
  if (t2) {
24104
24104
  if (t2.type !== "video") {
24105
24105
  b2.w("Please pass video track here");
@@ -24108,53 +24108,53 @@ var aS = A2((a11, e) => {
24108
24108
  return t2.layer;
24109
24109
  }
24110
24110
  });
24111
- var fa = createSelector([It, ye, Fr], (a11, e, t2) => {
24111
+ var va = createSelector([At, ye, Gr], (a11, e, t2) => {
24112
24112
  if (t2)
24113
24113
  return a11.filter((i2) => {
24114
24114
  var r2;
24115
24115
  return !i2.recipientPeer && !((r2 = i2.recipientRoles) != null && r2.length) || i2.sender && ![e, t2].includes(i2.sender) ? false : [e, t2].includes(i2.recipientPeer);
24116
24116
  });
24117
24117
  });
24118
- var va = createSelector([It, ua], (a11, e) => {
24118
+ var Ma = createSelector([At, pa], (a11, e) => {
24119
24119
  if (e)
24120
24120
  return a11.filter((t2) => {
24121
24121
  var i2, r2;
24122
24122
  return (i2 = t2.recipientRoles) != null && i2.length ? (r2 = t2.recipientRoles) == null ? void 0 : r2.includes(e) : false;
24123
24123
  });
24124
24124
  });
24125
- var qo = createSelector(It, (a11) => a11.filter((e) => {
24125
+ var jo = createSelector(At, (a11) => a11.filter((e) => {
24126
24126
  var t2;
24127
24127
  return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
24128
24128
  }));
24129
- var jo = createSelector([va, ua], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24130
- var Jo = createSelector([fa, Fr], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24131
- var oS = createSelector(qo, (a11) => a11.filter((e) => !e.read).length);
24132
- var nS = A2(fa);
24133
- var cS = A2(va);
24134
- var dS = A2(jo);
24135
- var lS = A2(Jo);
24136
- var Ma = A2(Go);
24137
- var kS = createSelector([q2, N2], (a11, e) => Object.values(a11).map((i2) => {
24129
+ var Jo = createSelector([Ma, pa], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24130
+ var Qo = createSelector([va, Gr], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
24131
+ var nS = createSelector(jo, (a11) => a11.filter((e) => !e.read).length);
24132
+ var cS = I2(va);
24133
+ var dS = I2(Ma);
24134
+ var lS = I2(Jo);
24135
+ var uS = I2(Qo);
24136
+ var ya = I2(Wo);
24137
+ var PS = createSelector([q2, N2], (a11, e) => Object.values(a11).map((i2) => {
24138
24138
  var r2;
24139
24139
  return { peer: i2, isAudioEnabled: i2.audioTrack ? (r2 = e[i2.audioTrack]) == null ? void 0 : r2.enabled : false };
24140
24140
  }));
24141
- var Qo = (a11) => a11.roleChangeRequests[0] || null;
24142
- var PS = createSelector([Qo, q2, Se], (a11, e, t2) => a11 ? { requestedBy: a11.requestedBy ? e[a11.requestedBy] : void 0, role: t2[a11.roleName], token: a11.token } : null);
24143
- var ES = createSelector([at], (a11) => St(a11));
24144
- var bS = createSelector([Xs], (a11) => St(a11));
24145
- var Yo = createSelector([X2, N2], (a11, e) => {
24141
+ var zo = (a11) => a11.roleChangeRequests[0] || null;
24142
+ var ES = createSelector([zo, q2, Se], (a11, e, t2) => a11 ? { requestedBy: a11.requestedBy ? e[a11.requestedBy] : void 0, role: t2[a11.roleName], token: a11.token } : null);
24143
+ var bS = createSelector([at], (a11) => St(a11));
24144
+ var RS = createSelector([Zs], (a11) => St(a11));
24145
+ var Xo = createSelector([X2, N2], (a11, e) => {
24146
24146
  let t2 = null;
24147
24147
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
24148
24148
  });
24149
- var Xo = createSelector([oe, N2], (a11, e) => {
24149
+ var Zo = createSelector([ae, N2], (a11, e) => {
24150
24150
  let t2 = null;
24151
24151
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
24152
24152
  });
24153
24153
  var yi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
24154
24154
  var Ct = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
24155
24155
  var ki = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
24156
- var ya = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
24157
- var Wr = "hmsNotification";
24156
+ var ka = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
24157
+ var $r = "hmsNotification";
24158
24158
  var Pi = class {
24159
24159
  constructor(e) {
24160
24160
  this.id = 0;
@@ -24167,11 +24167,11 @@ var Pi = class {
24167
24167
  }
24168
24168
  e2(r2);
24169
24169
  };
24170
- return this.eventEmitter.addListener(Wr, i2), () => {
24171
- this.eventEmitter.removeListener(Wr, i2);
24170
+ return this.eventEmitter.addListener($r, i2), () => {
24171
+ this.eventEmitter.removeListener($r, i2);
24172
24172
  };
24173
24173
  };
24174
- this.store = e, this.eventEmitter = new Zo({ maxListeners: Object.keys(Sr).length });
24174
+ this.store = e, this.eventEmitter = new en2({ maxListeners: Object.keys(gr).length });
24175
24175
  }
24176
24176
  sendPlaylistTrackEnded(e) {
24177
24177
  let t2 = this.createNotification("PLAYLIST_TRACK_ENDED", e, "info");
@@ -24232,18 +24232,18 @@ var Pi = class {
24232
24232
  this.emitEvent(t2);
24233
24233
  }
24234
24234
  sendPollUpdate(e, t2) {
24235
- let i2 = ki[e], r2 = this.store.getState(Ma(t2));
24235
+ let i2 = ki[e], r2 = this.store.getState(ya(t2));
24236
24236
  if (i2) {
24237
24237
  let s2 = this.createNotification(i2, r2, "info");
24238
24238
  this.emitEvent(s2);
24239
24239
  }
24240
24240
  }
24241
24241
  sendTranscriptionUpdate(e) {
24242
- let t2 = this.createNotification(ya.TRANSCRIPTION_STATE_UPDATED, e, "info");
24242
+ let t2 = this.createNotification(ka.TRANSCRIPTION_STATE_UPDATED, e, "info");
24243
24243
  this.emitEvent(t2);
24244
24244
  }
24245
24245
  emitEvent(e) {
24246
- this.eventEmitter.emit(Wr, e);
24246
+ this.eventEmitter.emit($r, e);
24247
24247
  }
24248
24248
  createNotification(e, t2, i2, r2 = "") {
24249
24249
  return this.id++, { id: this.id, type: e, message: r2, data: t2, severity: i2 };
@@ -24276,38 +24276,38 @@ var Ei = class {
24276
24276
  delete this.queuedUpdates[e], window && this.timers[e] && (window.clearTimeout(this.timers[e]), delete this.timers[e]);
24277
24277
  }
24278
24278
  };
24279
- function ka(a11) {
24280
- return a11 instanceof ae || a11 instanceof U2;
24279
+ function Pa(a11) {
24280
+ return a11 instanceof se || a11 instanceof U2;
24281
24281
  }
24282
- var Pa = (a11, e) => {
24282
+ var Ea = (a11, e) => {
24283
24283
  let t2 = Lt(Object.keys(a11), Object.keys(e));
24284
24284
  for (let i2 of t2) {
24285
24285
  let r2 = a11[i2], s2 = e[i2];
24286
- $e(r2, s2) ? (se(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && se(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24286
+ $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] : bi(r2, s2) && (a11[i2] = s2);
24287
24287
  }
24288
24288
  };
24289
- var Ea = (a11, e) => {
24289
+ var ba = (a11, e) => {
24290
24290
  let t2 = Lt(Object.keys(a11), Object.keys(e));
24291
24291
  for (let i2 of t2) {
24292
24292
  let r2 = a11[i2], s2 = e[i2];
24293
- $e(r2, s2) ? (Kr(r2, s2), Object.assign(r2, s2)) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24293
+ $e(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24294
24294
  }
24295
24295
  };
24296
- var ba = (a11, e) => {
24296
+ var Ra = (a11, e) => {
24297
24297
  let t2 = Lt(Object.keys(a11), Object.keys(e));
24298
24298
  for (let i2 of t2) {
24299
24299
  let r2 = a11[i2], s2 = e[i2];
24300
- $e(r2, s2) ? (r2.questions && se(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : bi(r2, s2) && (a11[i2] = s2);
24300
+ $e(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : bi(r2, s2) && (a11[i2] = s2);
24301
24301
  }
24302
24302
  };
24303
- var $r = (a11, e) => {
24303
+ var Kr = (a11, e) => {
24304
24304
  let t2 = Lt(Object.keys(a11), Object.keys(e));
24305
24305
  for (let i2 of t2) {
24306
24306
  let r2 = a11[i2], s2 = e[i2];
24307
- $e(r2, s2) ? Object.assign(r2, s2) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24307
+ $e(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24308
24308
  }
24309
24309
  };
24310
- var Ra = (a11, e, t2) => {
24310
+ var Aa = (a11, e, t2) => {
24311
24311
  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));
24312
24312
  for (let s2 of r2) {
24313
24313
  if (!i2[s2]) {
@@ -24317,13 +24317,13 @@ var Ra = (a11, e, t2) => {
24317
24317
  a11[s2] = i2[s2];
24318
24318
  }
24319
24319
  };
24320
- var Kr = (a11, e) => {
24321
- a11.plugins && se(a11.plugins, e.plugins) && (e.plugins = a11.plugins), a11.type === "video" && a11.layerDefinitions && se(a11.layerDefinitions, e.layerDefinitions) && (e.layerDefinitions = a11.layerDefinitions);
24320
+ var qr = (a11, e) => {
24321
+ 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);
24322
24322
  };
24323
24323
  var $e = (a11, e) => a11 && e;
24324
- var qr = (a11, e) => a11 && !e;
24324
+ var jr = (a11, e) => a11 && !e;
24325
24325
  var bi = (a11, e) => !a11 && e;
24326
- var se = (a11, e) => {
24326
+ var re = (a11, e) => {
24327
24327
  if (a11 === e || a11.length === 0 && (e == null ? void 0 : e.length) === 0)
24328
24328
  return true;
24329
24329
  if (!a11 || !e || a11.length !== e.length)
@@ -24352,7 +24352,7 @@ var _2 = class a8 {
24352
24352
  }
24353
24353
  static enrichTrack(e, t2) {
24354
24354
  let i2 = t2.getMediaTrackSettings();
24355
- t2 instanceof ae && (e.volume = t2.getVolume() || 0), a8.updateDeviceID(e, t2), a8.enrichLocalTrack(e, t2), e.type === "video" && (e.source === "screen" ? (e.displaySurface = i2.displaySurface, a8.enrichScreenTrack(e, t2)) : e.source === "regular" && (e.facingMode = i2.facingMode), e.height = i2.height, e.width = i2.width, a8.enrichVideoTrack(e, t2)), a8.enrichPluginsDetails(e, t2);
24355
+ t2 instanceof se && (e.volume = t2.getVolume() || 0), a8.updateDeviceID(e, t2), a8.enrichLocalTrack(e, t2), e.type === "video" && (e.source === "screen" ? (e.displaySurface = i2.displaySurface, a8.enrichScreenTrack(e, t2)) : e.source === "regular" && (e.facingMode = i2.facingMode), e.height = i2.height, e.width = i2.width, a8.enrichVideoTrack(e, t2)), a8.enrichPluginsDetails(e, t2);
24356
24356
  }
24357
24357
  static enrichLocalTrack(e, t2) {
24358
24358
  (t2 instanceof F || t2 instanceof ce) && (e.isPublished = t2.isPublished);
@@ -24362,7 +24362,7 @@ var _2 = class a8 {
24362
24362
  t2 instanceof F || t2 instanceof ce ? e.deviceID = t2.settings.deviceId : e.deviceID = (i2 = t2.getMediaTrackSettings()) == null ? void 0 : i2.deviceId;
24363
24363
  }
24364
24364
  static enrichVideoTrack(e, t2) {
24365
- t2 instanceof U2 && (e.layer = t2.getLayer(), e.preferredLayer = t2.getPreferredLayer(), e.degraded = t2.degraded), (t2 instanceof U2 || t2 instanceof F) && (se(t2.getSimulcastDefinitions(), e.layerDefinitions) || (e.layerDefinitions = t2.getSimulcastDefinitions()));
24365
+ t2 instanceof U2 && (e.layer = t2.getLayer(), e.preferredLayer = t2.getPreferredLayer(), e.degraded = t2.degraded), (t2 instanceof U2 || t2 instanceof F) && (re(t2.getSimulcastDefinitions(), e.layerDefinitions) || (e.layerDefinitions = t2.getSimulcastDefinitions()));
24366
24366
  }
24367
24367
  static enrichScreenTrack(e, t2) {
24368
24368
  var i2, r2;
@@ -24372,7 +24372,7 @@ var _2 = class a8 {
24372
24372
  }
24373
24373
  }
24374
24374
  static enrichPluginsDetails(e, t2) {
24375
- (t2 instanceof F || t2 instanceof ce) && (se(t2.getPlugins(), e.plugins) || (e.plugins = t2.getPlugins()));
24375
+ (t2 instanceof F || t2 instanceof ce) && (re(t2.getPlugins(), e.plugins) || (e.plugins = t2.getPlugins()));
24376
24376
  }
24377
24377
  static convertRoom(e, t2) {
24378
24378
  let { recording: i2, rtmp: r2, hls: s2, transcriptions: o2 } = a8.convertRecordingStreamingState(e.recording, e.rtmp, e.hls, e.transcriptions);
@@ -24436,7 +24436,7 @@ var Dt = class {
24436
24436
  }
24437
24437
  pause() {
24438
24438
  return c2(this, null, function* () {
24439
- let e = this.type === "audio" ? da : la, t2 = this.store.getState(e.selection);
24439
+ let e = this.type === "audio" ? la : ua, t2 = this.store.getState(e.selection);
24440
24440
  if (!t2.id) {
24441
24441
  b2.w("No item is currently playing to pause");
24442
24442
  return;
@@ -24516,7 +24516,7 @@ var Ri = class {
24516
24516
  });
24517
24517
  }
24518
24518
  };
24519
- var Ii = class {
24519
+ var Ai = class {
24520
24520
  constructor(e, t2) {
24521
24521
  this.intervalMs = 100, this.shouldMonitor = false, this.hasStarted = false, this.unsubs = [], this.analysers = {}, this.store = e, this.actions = t2;
24522
24522
  }
@@ -24593,16 +24593,36 @@ var Ii = class {
24593
24593
  }
24594
24594
  };
24595
24595
  var Ia = 2e4;
24596
- var Aa = 1e4;
24596
+ var Ha = 1e4;
24597
24597
  var 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 } };
24598
- var Ha = "https://100ms.live/test-audio.wav";
24599
- var en2 = (a11) => !!a11 && !isNaN(a11);
24598
+ var Ca = "https://100ms.live/test-audio.wav";
24599
+ var Ii = class {
24600
+ constructor() {
24601
+ this.networkScores = [];
24602
+ this.lastPushedAt = 0;
24603
+ }
24604
+ pushScore(e) {
24605
+ !e || e < 0 || (this.networkScores.length === 0 ? (this.networkScores.push(e), this.lastPushedAt = Date.now()) : this.addPendingCQSTillNow());
24606
+ }
24607
+ addPendingCQSTillNow() {
24608
+ if (this.networkScores.length > 0) {
24609
+ let e = (Date.now() - this.lastPushedAt) / 1e3;
24610
+ for (; e > 0; )
24611
+ this.networkScores.push(this.networkScores[this.networkScores.length - 1]), e -= 1;
24612
+ this.lastPushedAt = Date.now();
24613
+ }
24614
+ }
24615
+ getCQS() {
24616
+ return this.networkScores.reduce((e, t2) => e + t2, 0) / this.networkScores.length;
24617
+ }
24618
+ };
24619
+ var tn2 = (a11) => !!a11 && !isNaN(a11);
24600
24620
  var de = (a11) => a11[a11.length - 1];
24601
24621
  var _e = (a11, e) => {
24602
- let t2 = a11.filter((i2) => en2(e(i2)));
24622
+ let t2 = a11.filter((i2) => tn2(e(i2)));
24603
24623
  return t2.reduce((i2, r2) => i2 + (e(r2) || 0), 0) / t2.length;
24604
24624
  };
24605
- var Ai = class {
24625
+ var Hi = class {
24606
24626
  constructor(e) {
24607
24627
  this.sdk = e;
24608
24628
  this.peerStatsList = [];
@@ -24613,22 +24633,22 @@ var Ai = class {
24613
24633
  }
24614
24634
  handleStatsUpdate(e) {
24615
24635
  return c2(this, null, function* () {
24616
- var n2, l2, u2, p2, h2, T;
24636
+ var n2, l2, u2, p2, h2, T, g2, v2;
24617
24637
  let t2 = e.getLocalPeerStats();
24618
24638
  t2 && this.peerStatsList.push(t2);
24619
- let i2 = (l2 = (n2 = this.sdk.getLocalPeer()) == null ? void 0 : n2.audioTrack) == null ? void 0 : l2.trackId, r2 = (p2 = (u2 = this.sdk.getLocalPeer()) == null ? void 0 : u2.videoTrack) == null ? void 0 : p2.trackId, s2 = e.getLocalTrackStats();
24639
+ 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();
24620
24640
  s2 && (i2 && this.localAudioTrackStatsList.push(s2[i2]), r2 && this.localVideoTrackStatsList.push(s2[r2]));
24621
- let o2 = yield (T = (h2 = this.sdk.getWebrtcInternals()) == null ? void 0 : h2.getSubscribePeerConnection()) == null ? void 0 : T.getStats();
24622
- o2 == null || o2.forEach((g2) => {
24623
- if (g2.type === "inbound-rtp") {
24624
- let v2 = g2.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, E2 = Et("bytesReceived", g2, de(v2));
24625
- v2.push(M2(m({}, g2), { bitrate: E2 }));
24641
+ let o2 = yield (v2 = (g2 = this.sdk.getWebrtcInternals()) == null ? void 0 : g2.getSubscribePeerConnection()) == null ? void 0 : v2.getStats();
24642
+ o2 == null || o2.forEach((E2) => {
24643
+ if (E2.type === "inbound-rtp") {
24644
+ let k2 = E2.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Et("bytesReceived", E2, de(k2));
24645
+ k2.push(M2(m({}, E2), { bitrate: w2 }));
24626
24646
  }
24627
24647
  });
24628
24648
  });
24629
24649
  }
24630
24650
  buildReport() {
24631
- var T, g2, v2, E2, P7, w2, Oe, Zt;
24651
+ var T, g2, v2, E2, k2, w2, Oe, Zt;
24632
24652
  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 ? _e(Object.values(x2), ($) => $.bitrate) : 0), u2 = this.localVideoTrackStatsList.map((x2) => x2 ? _e(Object.values(x2), ($) => $.bitrate) : 0), p2 = de(this.localAudioTrackStatsList), h2 = de(this.localVideoTrackStatsList);
24633
24653
  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: _e(this.peerStatsList, (x2) => {
24634
24654
  var $;
@@ -24636,13 +24656,13 @@ var Ai = class {
24636
24656
  }), bitrateReceived: _e(this.peerStatsList, (x2) => {
24637
24657
  var $;
24638
24658
  return ($ = x2.subscribe) == null ? void 0 : $.bitrate;
24639
- }) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((P7 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : P7.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: _e(l2, (x2) => x2), bitrateReceived: _e(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: ((Zt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Zt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: _e(u2, (x2) => x2), bitrateReceived: _e(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24659
+ }) }, 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: _e(l2, (x2) => x2), bitrateReceived: _e(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: ((Zt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Zt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: _e(u2, (x2) => x2), bitrateReceived: _e(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24640
24660
  }
24641
24661
  };
24642
- var tn2 = ((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))(tn2 || {});
24643
- var Ca;
24662
+ var 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 || {});
24644
24663
  var La;
24645
- var Hi = class {
24664
+ var Da;
24665
+ var Ci = class {
24646
24666
  constructor(e, t2, i2, r2) {
24647
24667
  this.sdk = e;
24648
24668
  this.sdkListener = t2;
@@ -24654,26 +24674,25 @@ var Hi = class {
24654
24674
  this.isSubscribeICEConnected = false;
24655
24675
  this.gatheredPublishICECandidates = [];
24656
24676
  this.gatheredSubscribeICECandidates = [];
24657
- this.networkScores = [];
24658
24677
  this.errors = [];
24659
24678
  this.isAudioTrackCaptured = false;
24660
24679
  this.isVideoTrackCaptured = false;
24661
24680
  this.isAudioTrackPublished = false;
24662
24681
  this.isVideoTrackPublished = false;
24682
+ this.cqsCalculator = new Ii();
24663
24683
  this.timestamp = Date.now();
24664
24684
  this.onRoomUpdate = this.sdkListener.onRoomUpdate.bind(this.sdkListener);
24665
24685
  this.onPeerUpdate = this.sdkListener.onPeerUpdate.bind(this.sdkListener);
24666
24686
  this.onMessageReceived = this.sdkListener.onMessageReceived.bind(this.sdkListener);
24667
- this.onReconnecting = this.sdkListener.onReconnecting.bind(this.sdkListener);
24668
24687
  this.onReconnected = this.sdkListener.onReconnected.bind(this.sdkListener);
24669
24688
  this.onRoleChangeRequest = this.sdkListener.onRoleChangeRequest.bind(this.sdkListener);
24670
24689
  this.onRoleUpdate = this.sdkListener.onRoleUpdate.bind(this.sdkListener);
24671
24690
  this.onChangeTrackStateRequest = this.sdkListener.onChangeTrackStateRequest.bind(this.sdkListener);
24672
24691
  this.onChangeMultiTrackStateRequest = this.sdkListener.onChangeMultiTrackStateRequest.bind(this.sdkListener);
24673
24692
  this.onRemovedFromRoom = this.sdkListener.onRemovedFromRoom.bind(this.sdkListener);
24674
- this.onNetworkQuality = (Ca = this.sdkListener.onNetworkQuality) == null ? void 0 : Ca.bind(this.sdkListener);
24693
+ this.onNetworkQuality = (La = this.sdkListener.onNetworkQuality) == null ? void 0 : La.bind(this.sdkListener);
24675
24694
  this.onPreview = this.sdkListener.onPreview.bind(this.sdkListener);
24676
- this.onDeviceChange = (La = this.sdkListener.onDeviceChange) == null ? void 0 : La.bind(this.sdkListener);
24695
+ this.onDeviceChange = (Da = this.sdkListener.onDeviceChange) == null ? void 0 : Da.bind(this.sdkListener);
24677
24696
  this.onSessionStoreUpdate = this.sdkListener.onSessionStoreUpdate.bind(this.sdkListener);
24678
24697
  this.onPollsUpdate = this.sdkListener.onPollsUpdate.bind(this.sdkListener);
24679
24698
  this.onWhiteboardUpdate = this.sdkListener.onWhiteboardUpdate.bind(this.sdkListener);
@@ -24682,9 +24701,9 @@ var Hi = class {
24682
24701
  var r3, s2;
24683
24702
  return i3.peerID === ((s2 = (r3 = this.sdk) == null ? void 0 : r3.store.getLocalPeer()) == null ? void 0 : s2.peerId);
24684
24703
  });
24685
- this.networkScores.push(ee(t3 == null ? void 0 : t3.downlinkQuality) ? t3.downlinkQuality : -1);
24704
+ this.cqsCalculator.pushScore(t3 == null ? void 0 : t3.downlinkQuality);
24686
24705
  };
24687
- this.statsCollector = new Ai(e), this.state = 0;
24706
+ this.statsCollector = new Hi(e), this.state = 0;
24688
24707
  }
24689
24708
  get state() {
24690
24709
  return this._state;
@@ -24745,12 +24764,16 @@ var Hi = class {
24745
24764
  this.isVideoTrackCaptured && this.isAudioTrackCaptured && (this.state = 4);
24746
24765
  }
24747
24766
  }
24767
+ onReconnecting(e) {
24768
+ this.sdkListener.onReconnecting(e), this.cqsCalculator.addPendingCQSTillNow();
24769
+ }
24748
24770
  cleanupAndReport() {
24749
24771
  var e;
24750
24772
  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();
24751
24773
  }
24752
24774
  buildReport() {
24753
- let e = this.networkScores.reduce((i2, r2) => i2 + r2, 0) / this.networkScores.length, t2 = this.statsCollector.buildReport();
24775
+ this.cqsCalculator.addPendingCQSTillNow();
24776
+ let e = this.cqsCalculator.getCQS(), t2 = this.statsCollector.buildReport();
24754
24777
  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 } };
24755
24778
  }
24756
24779
  };
@@ -24763,7 +24786,7 @@ var Ne = class {
24763
24786
  this.id = e;
24764
24787
  }
24765
24788
  };
24766
- var Ci = (a11, e, t2) => c2(void 0, null, function* () {
24789
+ var Li = (a11, e, t2) => c2(void 0, null, function* () {
24767
24790
  let r2 = Error("something went wrong during fetch");
24768
24791
  for (let s2 = 0; s2 < 4; s2++)
24769
24792
  try {
@@ -24794,7 +24817,7 @@ var wt = class {
24794
24817
  constructor(e, t2) {
24795
24818
  this.sdk = e;
24796
24819
  this.sdkListener = t2;
24797
- this.recordedAudio = Ha;
24820
+ this.recordedAudio = Ca;
24798
24821
  this.initSdkWithLocalPeer();
24799
24822
  }
24800
24823
  get localPeer() {
@@ -24827,7 +24850,7 @@ var wt = class {
24827
24850
  (t2 = (e = this.localPeer) == null ? void 0 : e.videoTrack) == null || t2.cleanup(), this.localPeer && (this.localPeer.videoTrack = void 0);
24828
24851
  }
24829
24852
  startMicCheck(r2, s2) {
24830
- return c2(this, arguments, function* (e, t2, i2 = Aa) {
24853
+ return c2(this, arguments, function* (e, t2, i2 = Ha) {
24831
24854
  var l2, u2, p2, h2;
24832
24855
  this.initSdkWithLocalPeer();
24833
24856
  let o2 = yield this.getLocalAudioTrack(e);
@@ -24857,17 +24880,22 @@ var wt = class {
24857
24880
  }
24858
24881
  startConnectivityCheck(e, t2, i2) {
24859
24882
  return c2(this, null, function* () {
24860
- var n2;
24883
+ var o2;
24861
24884
  if (!this.sdk)
24862
24885
  throw new Error("SDK not found");
24863
- let r2 = new Hi(this.sdk, this.sdkListener, e, t2), s2 = yield this.getAuthToken(i2), { roomId: o2 } = nt(s2);
24864
- (n2 = this.sdk) == null || n2.store.setRoom(new Ne(o2)), yield this.sdk.leave(), yield this.sdk.join({ authToken: s2, userName: "diagonistic-test", initEndpoint: "https://qa-in2-ipv6.100ms.live/init" }, r2), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate(l2) {
24865
- r2.handleConnectionQualityUpdate(l2);
24886
+ this.connectivityCheck = new Ci(this.sdk, this.sdkListener, e, t2);
24887
+ let r2 = yield this.getAuthToken(i2), { roomId: s2 } = nt(r2);
24888
+ yield this.sdk.leave(), (o2 = this.sdk) == null || o2.store.setRoom(new Ne(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) => {
24889
+ var l2;
24890
+ (l2 = this.connectivityCheck) == null || l2.handleConnectionQualityUpdate(n2);
24866
24891
  } });
24867
24892
  });
24868
24893
  }
24869
24894
  stopConnectivityCheck() {
24870
- return this.sdk.leave();
24895
+ return c2(this, null, function* () {
24896
+ var e;
24897
+ return (e = this.connectivityCheck) == null ? void 0 : e.cleanupAndReport();
24898
+ });
24871
24899
  }
24872
24900
  initSdkWithLocalPeer() {
24873
24901
  var i2, r2, s2;
@@ -24881,7 +24909,7 @@ var wt = class {
24881
24909
  return c2(this, null, function* () {
24882
24910
  let t2 = new URL("https://api-nonprod.100ms.live/v2/diagnostics/token");
24883
24911
  e && t2.searchParams.append("region", e);
24884
- 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();
24912
+ 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();
24885
24913
  if (!i2.ok)
24886
24914
  throw S2.APIErrors.ServerErrors(r2.code, "GET_TOKEN", r2.message, false);
24887
24915
  let { token: s2 } = r2;
@@ -24896,12 +24924,12 @@ var wt = class {
24896
24924
  if (!this.localPeer)
24897
24925
  return;
24898
24926
  this.localPeer.role = M2(m({}, ot), { publishParams: M2(m({}, ot.publishParams), { allowed: ["audio"] }) });
24899
- let t2 = new Le().audio(new te().deviceId(e || "default").build()).build(), i2 = yield (r2 = this.sdk) == null ? void 0 : r2.localTrackManager.getLocalTracks({ audio: true, video: false }, t2);
24927
+ let t2 = new Le().audio(new ee().deviceId(e || "default").build()).build(), i2 = yield (r2 = this.sdk) == null ? void 0 : r2.localTrackManager.getLocalTracks({ audio: true, video: false }, t2);
24900
24928
  return i2 == null ? void 0 : i2.find((s2) => s2.type === "audio");
24901
24929
  });
24902
24930
  }
24903
24931
  };
24904
- var Li = class {
24932
+ var Di = class {
24905
24933
  constructor(e, t2, i2) {
24906
24934
  this.isRoomJoinCalled = false;
24907
24935
  this.ignoredMessageTypes = [];
@@ -24927,7 +24955,7 @@ var Li = class {
24927
24955
  let s2 = _2.convertPeer(t3);
24928
24956
  this.setState((o2) => {
24929
24957
  let n2 = o2.peers[s2.id];
24930
- $e(n2, s2) && (se(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
24958
+ $e(n2, s2) && (re(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
24931
24959
  }, r2);
24932
24960
  }
24933
24961
  this.hmsNotifications.sendPeerUpdate(e2, i3);
@@ -24977,7 +25005,7 @@ var Li = class {
24977
25005
  b2.d("layer none will be ignored");
24978
25006
  return;
24979
25007
  }
24980
- if (((r2 = this.store.getState(pa(e))) == null ? void 0 : r2.preferredLayer) === t2) {
25008
+ if (((r2 = this.store.getState(ha(e))) == null ? void 0 : r2.preferredLayer) === t2) {
24981
25009
  b2.d(`preferred layer is already ${t2}`);
24982
25010
  return;
24983
25011
  }
@@ -25003,7 +25031,7 @@ var Li = class {
25003
25031
  }
25004
25032
  preview(e) {
25005
25033
  return c2(this, null, function* () {
25006
- let t2 = this.store.getState(re);
25034
+ let t2 = this.store.getState(ie);
25007
25035
  if (t2 === "Preview" || t2 === "Connecting") {
25008
25036
  this.logPossibleInconsistency("attempting to call preview while room is in preview/connecting");
25009
25037
  return;
@@ -25041,7 +25069,7 @@ var Li = class {
25041
25069
  return c2(this, null, function* () {
25042
25070
  let e = this.store.getState(we), t2 = true;
25043
25071
  e || (t2 = false, this.logPossibleInconsistency("room leave is called when no room is connected"));
25044
- let i2 = this.store.getState(re);
25072
+ let i2 = this.store.getState(ie);
25045
25073
  return this.setState((r2) => {
25046
25074
  r2.room.roomState = "Disconnecting";
25047
25075
  }, "leaving"), this.sdk.leave(t2).then(() => {
@@ -25075,7 +25103,7 @@ var Li = class {
25075
25103
  }
25076
25104
  setLocalAudioEnabled(e) {
25077
25105
  return c2(this, null, function* () {
25078
- let t2 = this.store.getState(oe);
25106
+ let t2 = this.store.getState(ae);
25079
25107
  t2 && (yield this.setEnabledTrack(t2, e));
25080
25108
  });
25081
25109
  }
@@ -25108,7 +25136,7 @@ var Li = class {
25108
25136
  }
25109
25137
  setAudioSettings(e) {
25110
25138
  return c2(this, null, function* () {
25111
- let t2 = this.store.getState(oe);
25139
+ let t2 = this.store.getState(ae);
25112
25140
  t2 && (yield this.setSDKLocalAudioTrackSettings(t2, e), this.syncRoomState("setAudioSettings"));
25113
25141
  });
25114
25142
  }
@@ -25172,7 +25200,7 @@ var Li = class {
25172
25200
  return new Promise((i2) => {
25173
25201
  let r2 = this.store.subscribe((s2) => c2(this, null, function* () {
25174
25202
  s2 && (yield this.attachVideoInternal(e, t2), r2(), i2());
25175
- }), Ur);
25203
+ }), Br);
25176
25204
  });
25177
25205
  yield this.attachVideoInternal(e, t2);
25178
25206
  });
@@ -25217,7 +25245,7 @@ var Li = class {
25217
25245
  let t2 = {};
25218
25246
  if (t2.isSupported = false, !e)
25219
25247
  return b2.w('no plugin passed in for checking support"'), t2.errMsg = 'no plugin passed in for checking support"', t2;
25220
- let i2 = this.store.getState(oe);
25248
+ let i2 = this.store.getState(ae);
25221
25249
  if (!i2)
25222
25250
  return b2.w("audio track not added to local peer yet"), t2.errMsg = "call this function only after local peer has audio track", t2;
25223
25251
  let r2 = this.getTrackById(i2);
@@ -25319,12 +25347,12 @@ var Li = class {
25319
25347
  }
25320
25348
  endRoom(e, t2) {
25321
25349
  return c2(this, null, function* () {
25322
- let i2 = this.store.getState(Zs);
25350
+ let i2 = this.store.getState(ea);
25323
25351
  if (!(i2 != null && i2.endRoom)) {
25324
25352
  b2.w("You are not allowed to perform this action - endRoom");
25325
25353
  return;
25326
25354
  }
25327
- let r2 = this.store.getState(re);
25355
+ let r2 = this.store.getState(ie);
25328
25356
  this.setState((s2) => {
25329
25357
  s2.room.roomState = "Disconnecting";
25330
25358
  }, "endingRoom");
@@ -25408,7 +25436,7 @@ var Li = class {
25408
25436
  return c2(this, null, function* () {
25409
25437
  if (typeof e == "string") {
25410
25438
  let i2 = this.getTrackById(e);
25411
- i2 && ka(i2) ? yield this.sdk.changeTrackState(i2, t2) : this.logPossibleInconsistency(`No remote track with ID ${e} found for change track state`);
25439
+ i2 && Pa(i2) ? yield this.sdk.changeTrackState(i2, t2) : this.logPossibleInconsistency(`No remote track with ID ${e} found for change track state`);
25412
25440
  } else
25413
25441
  Array.isArray(e) && e.forEach((i2) => this.setRemoteTrackEnabled(i2, t2));
25414
25442
  });
@@ -25438,7 +25466,7 @@ var Li = class {
25438
25466
  }
25439
25467
  enableBeamSpeakerLabelsLogging() {
25440
25468
  return c2(this, null, function* () {
25441
- this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ii(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25469
+ this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ai(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25442
25470
  });
25443
25471
  }
25444
25472
  initDiagnostics() {
@@ -25466,9 +25494,9 @@ var Li = class {
25466
25494
  let t2 = e.devices;
25467
25495
  if (!t2)
25468
25496
  return;
25469
- let i2 = this.store.getState(ie);
25497
+ let i2 = this.store.getState(te);
25470
25498
  if (this.setState((r2) => {
25471
- se(r2.devices.audioInput, t2.audioInput) || (r2.devices.audioInput = t2.audioInput), se(r2.devices.videoInput, t2.videoInput) || (r2.devices.videoInput = t2.videoInput), se(r2.devices.audioOutput, t2.audioOutput) || (r2.devices.audioOutput = t2.audioOutput);
25499
+ re(r2.devices.audioInput, t2.audioInput) || (r2.devices.audioInput = t2.audioInput), re(r2.devices.videoInput, t2.videoInput) || (r2.devices.videoInput = t2.videoInput), re(r2.devices.audioOutput, t2.audioOutput) || (r2.devices.audioOutput = t2.audioOutput);
25472
25500
  let s2 = this.sdk.getLocalPeer();
25473
25501
  i2 != null && i2.id && s2 && Object.assign(r2.settings, this.getMediaSettings(s2));
25474
25502
  }, "deviceChange"), e.selection) {
@@ -25501,7 +25529,7 @@ var Li = class {
25501
25529
  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)) });
25502
25530
  }) }), o2;
25503
25531
  }, {});
25504
- ba(r2.polls, s2);
25532
+ Ra(r2.polls, s2);
25505
25533
  }, i2), t2.forEach((r2) => this.hmsNotifications.sendPollUpdate(e, r2.id));
25506
25534
  }
25507
25535
  onWhiteboardUpdate(e) {
@@ -25511,12 +25539,12 @@ var Li = class {
25511
25539
  }
25512
25540
  startScreenShare(e) {
25513
25541
  return c2(this, null, function* () {
25514
- this.store.getState(Br) ? this.logPossibleInconsistency("start screenshare is called while it's on") : (yield this.sdk.startScreenShare(() => this.syncRoomState("screenshareStopped"), e), this.syncRoomState("startScreenShare"));
25542
+ this.store.getState(Vr) ? this.logPossibleInconsistency("start screenshare is called while it's on") : (yield this.sdk.startScreenShare(() => this.syncRoomState("screenshareStopped"), e), this.syncRoomState("startScreenShare"));
25515
25543
  });
25516
25544
  }
25517
25545
  stopScreenShare() {
25518
25546
  return c2(this, null, function* () {
25519
- this.store.getState(Br) ? (yield this.sdk.stopScreenShare(), this.syncRoomState("stopScreenShare")) : this.logPossibleInconsistency("stop screenshare is called while it's not on");
25547
+ this.store.getState(Vr) ? (yield this.sdk.stopScreenShare(), this.syncRoomState("stopScreenShare")) : this.logPossibleInconsistency("stop screenshare is called while it's not on");
25520
25548
  });
25521
25549
  }
25522
25550
  attachVideoInternal(e, t2) {
@@ -25532,23 +25560,23 @@ var Li = class {
25532
25560
  let v2 = _2.convertPeer(g2);
25533
25561
  t2[v2.id] = v2, i2.push(v2.id), o2[v2.id] = { peerID: v2.id, downlinkQuality: g2.networkQuality || -1 };
25534
25562
  let E2 = [g2.audioTrack, g2.videoTrack, ...g2.auxiliaryTracks];
25535
- for (let P7 of E2) {
25536
- if (!P7)
25563
+ for (let k2 of E2) {
25564
+ if (!k2)
25537
25565
  continue;
25538
- let w2 = _2.convertTrack(P7);
25566
+ let w2 = _2.convertTrack(k2);
25539
25567
  r2[w2.id] = w2;
25540
25568
  }
25541
25569
  if (g2.isLocal) {
25542
- let P7 = g2;
25543
- n2 = this.getPreviewFields(P7), Object.assign(s2, this.getMediaSettings(P7));
25570
+ let k2 = g2;
25571
+ n2 = this.getPreviewFields(k2), Object.assign(s2, this.getMediaSettings(k2));
25544
25572
  }
25545
25573
  }
25546
25574
  let u2 = this.sdk.getRecordingState(), p2 = this.sdk.getRTMPState(), h2 = this.sdk.getHLSState(), T = this.sdk.getTranscriptionState();
25547
25575
  this.setState((g2) => {
25548
- var P7;
25576
+ var k2;
25549
25577
  g2.room.peers = i2;
25550
25578
  let v2 = g2.peers, E2 = g2.tracks;
25551
- Pa(v2, t2), Ea(E2, r2), Object.assign(g2.settings, s2), g2.room.isConnected && Object.assign(g2.connectionQualities, o2), (P7 = g2.preview) != null && P7.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());
25579
+ Ea(v2, t2), ba(E2, 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());
25552
25580
  }, e), b2.timeEnd(`store-sync-${e}`);
25553
25581
  }
25554
25582
  onPreview(e) {
@@ -25607,7 +25635,7 @@ var Li = class {
25607
25635
  let r2 = Ct[e] || "trackUpdate", s2 = _2.convertTrack(t2);
25608
25636
  this.setState((o2) => {
25609
25637
  let n2 = o2.tracks[s2.id];
25610
- $e(n2, s2) && (Kr(n2, s2), Object.assign(n2, s2));
25638
+ $e(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
25611
25639
  }, r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
25612
25640
  }
25613
25641
  }
@@ -25714,7 +25742,7 @@ var Li = class {
25714
25742
  }
25715
25743
  getMediaSettings(e) {
25716
25744
  var s2;
25717
- let t2 = this.store.getState(Js), i2 = e.audioTrack, r2 = e.videoTrack;
25745
+ let t2 = this.store.getState(Qs), i2 = e.audioTrack, r2 = e.videoTrack;
25718
25746
  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 };
25719
25747
  }
25720
25748
  getPreviewFields(e) {
@@ -25727,17 +25755,17 @@ var Li = class {
25727
25755
  setTrackVolume(e, t2) {
25728
25756
  return c2(this, null, function* () {
25729
25757
  let i2 = this.getTrackById(t2);
25730
- i2 ? i2 instanceof Ie ? (yield i2.setVolume(e), this.setState((r2) => {
25758
+ i2 ? i2 instanceof Ae ? (yield i2.setVolume(e), this.setState((r2) => {
25731
25759
  let s2 = r2.tracks[t2];
25732
25760
  s2 && s2.type === "audio" && (s2.volume = e);
25733
25761
  }, "trackVolume")) : b2.w(`track ${t2} is not an audio track`) : this.logPossibleInconsistency(`track ${t2} not present, unable to set volume`);
25734
25762
  });
25735
25763
  }
25736
25764
  localAndVideoUnmuting(e) {
25737
- let t2 = this.store.getState(ie);
25765
+ let t2 = this.store.getState(te);
25738
25766
  if ((t2 == null ? void 0 : t2.videoTrack) !== e)
25739
25767
  return false;
25740
- let i2 = this.store.getState(zs), r2 = this.store.getState(Ur);
25768
+ let i2 = this.store.getState(Ys), r2 = this.store.getState(Br);
25741
25769
  return i2 && !r2;
25742
25770
  }
25743
25771
  logPossibleInconsistency(e) {
@@ -25775,7 +25803,7 @@ var Li = class {
25775
25803
  b2.w("Invalid plugin received in store");
25776
25804
  return;
25777
25805
  }
25778
- let i2 = this.store.getState(oe);
25806
+ let i2 = this.store.getState(ae);
25779
25807
  if (i2) {
25780
25808
  let r2 = this.getLocalTrack(i2);
25781
25809
  r2 ? (t2 === "add" ? yield r2.addPlugin(e) : t2 === "remove" && (yield r2.removePlugin(e)), this.syncRoomState(`${t2}AudioPlugin`)) : this.logPossibleInconsistency(`track ${i2} not present, unable to ${t2} plugin`);
@@ -25797,13 +25825,13 @@ var Li = class {
25797
25825
  this.syncRoomState("roleUpdate");
25798
25826
  }
25799
25827
  getStoreLocalTrackIDfromSDKTrack(e) {
25800
- return this.store.getState(Qs).find((i2) => {
25828
+ return this.store.getState(zs).find((i2) => {
25801
25829
  var r2;
25802
25830
  return ((r2 = this.getTrackById(i2)) == null ? void 0 : r2.trackId) === e.trackId;
25803
25831
  });
25804
25832
  }
25805
25833
  updateMidCallPreviewRoomState(e, t2) {
25806
- t2.isLocal && e === 8 && this.store.getState(Ys) && this.setState((i2) => {
25834
+ t2.isLocal && e === 8 && this.store.getState(Xs) && this.setState((i2) => {
25807
25835
  i2.room.roomState = "Connected";
25808
25836
  }, "midCallPreviewCompleted");
25809
25837
  }
@@ -25816,8 +25844,8 @@ var Li = class {
25816
25844
  }, t2);
25817
25845
  }
25818
25846
  };
25819
- var Di = (a11) => O2 ? `${a11} ${document.title}` : a11;
25820
- var wi = class {
25847
+ var wi = (a11) => O2 ? `${a11} ${document.title}` : a11;
25848
+ var _i = class {
25821
25849
  constructor(e, t2) {
25822
25850
  this.eventBus = e;
25823
25851
  this.listener = t2;
@@ -25886,8 +25914,8 @@ var _t = class {
25886
25914
  r3 && (yield this.diffRolesAndPublishTracks({ oldRole: e2, newRole: t3 }), (s3 = this.listener) == null || s3.onPeerUpdate(8, r3));
25887
25915
  });
25888
25916
  this.diffRolesAndPublishTracks = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
25889
- var g2, v2, E2, P7, w2, Oe;
25890
- 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, (P7 = t3.publishParams.simulcast) == null ? void 0 : P7.screen), h2 = (Oe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : Oe.enabled;
25917
+ var g2, v2, E2, k2, w2, Oe;
25918
+ 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, (k2 = t3.publishParams.simulcast) == null ? void 0 : k2.screen), h2 = (Oe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : Oe.enabled;
25891
25919
  yield this.removeAudioTrack(n2), yield this.removeVideoTracks(o3 || u2), yield this.removeScreenTracks(l2 || p2);
25892
25920
  let T = this.getSettings();
25893
25921
  u2 && (T.isVideoMuted = !h2), yield this.publish(T), yield this.syncDevices(T, t3);
@@ -25948,7 +25976,7 @@ var _t = class {
25948
25976
  return { isAudioMuted: (i2 = e == null ? void 0 : e.isAudioMuted) != null ? i2 : true, isVideoMuted: (r2 = e == null ? void 0 : e.isVideoMuted) != null ? r2 : true, audioInputDeviceId: (e == null ? void 0 : e.audioInputDeviceId) || "default", audioOutputDeviceId: (e == null ? void 0 : e.audioOutputDeviceId) || "default", videoDeviceId: (e == null ? void 0 : e.videoDeviceId) || "default" };
25949
25977
  }
25950
25978
  };
25951
- var jr = class {
25979
+ var Jr = class {
25952
25980
  constructor() {
25953
25981
  this.TAG = "[HTTPAnalyticsTransport]";
25954
25982
  this.failedEvents = new le("client-events");
@@ -25967,7 +25995,7 @@ var jr = class {
25967
25995
  this.addEventToStorage(e);
25968
25996
  return;
25969
25997
  }
25970
- 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" ? xs : Us;
25998
+ 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;
25971
25999
  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) => {
25972
26000
  if (r2.status === 401) {
25973
26001
  this.removeFromStorage(e);
@@ -25993,7 +26021,7 @@ var jr = class {
25993
26021
  i2 > -1 && (t2.splice(i2, 1), this.failedEvents.set(t2));
25994
26022
  }
25995
26023
  };
25996
- var Pe = new jr();
26024
+ var Pe = new Jr();
25997
26025
  var Nt = class {
25998
26026
  constructor(e) {
25999
26027
  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);
@@ -26184,7 +26212,7 @@ var Ot = class {
26184
26212
  return c2(this, null, function* () {
26185
26213
  let t2 = [];
26186
26214
  this.getAudioTracks().forEach((i2) => {
26187
- i2 instanceof ae && t2.push(i2.setOutputDevice(e));
26215
+ i2 instanceof se && t2.push(i2.setOutputDevice(e));
26188
26216
  }), yield Promise.all(t2);
26189
26217
  });
26190
26218
  }
@@ -26270,7 +26298,7 @@ var Ot = class {
26270
26298
  t2.startsWith("prod") ? i2 = "prod" : t2.startsWith("qa") ? i2 = "qa" : t2.startsWith("dev") && (i2 = "dev"), this.env = i2, Pe.setEnv(i2);
26271
26299
  }
26272
26300
  };
26273
- var _i = class {
26301
+ var Ni = class {
26274
26302
  constructor() {
26275
26303
  this.TAG = "[WakeLockManager]";
26276
26304
  this.wakeLock = null;
@@ -26304,7 +26332,7 @@ var _i = class {
26304
26332
  });
26305
26333
  }
26306
26334
  };
26307
- var Ni = class {
26335
+ var Oi = class {
26308
26336
  constructor(e) {
26309
26337
  this.store = e;
26310
26338
  this.bufferSize = 100;
@@ -26346,7 +26374,7 @@ var Ni = class {
26346
26374
  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);
26347
26375
  }
26348
26376
  };
26349
- var Da = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
26377
+ var wa = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
26350
26378
  var xt = class {
26351
26379
  constructor(e, t2, i2) {
26352
26380
  this.store = e;
@@ -26355,7 +26383,7 @@ var xt = class {
26355
26383
  this.autoPausedTracks = /* @__PURE__ */ new Set();
26356
26384
  this.TAG = "[AudioSinkManager]:";
26357
26385
  this.volume = 100;
26358
- this.state = m({}, Da);
26386
+ this.state = m({}, wa);
26359
26387
  this.timer = null;
26360
26388
  this.autoUnpauseTimer = null;
26361
26389
  this.earpieceSelected = false;
@@ -26458,11 +26486,11 @@ var xt = class {
26458
26486
  return;
26459
26487
  this.state.initialized = true;
26460
26488
  let t2 = document.createElement("div");
26461
- t2.id = `HMS-SDK-audio-sink-${an2()}`, (e && document.getElementById(e) || document.body).append(t2), this.audioSink = t2, d2.d(this.TAG, "audio sink created", this.audioSink);
26489
+ t2.id = `HMS-SDK-audio-sink-${on2()}`, (e && document.getElementById(e) || document.body).append(t2), this.audioSink = t2, d2.d(this.TAG, "audio sink created", this.audioSink);
26462
26490
  }
26463
26491
  cleanup() {
26464
26492
  var e;
26465
- (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({}, Da);
26493
+ (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);
26466
26494
  }
26467
26495
  playAudioFor(e) {
26468
26496
  return c2(this, null, function* () {
@@ -26485,7 +26513,7 @@ var xt = class {
26485
26513
  });
26486
26514
  }
26487
26515
  };
26488
- var Oi = class {
26516
+ var xi = class {
26489
26517
  constructor(e) {
26490
26518
  this.eventBus = e;
26491
26519
  this.pluginUsage = /* @__PURE__ */ new Map();
@@ -26581,7 +26609,7 @@ var Ut = class {
26581
26609
  this.eventBus.analytics.publish(y2.deviceChange({ selection: { audioInput: t3 }, error: S2.TracksErrors.SelectedDeviceMissing("audio"), devices: this.getDevices(), type: "audioInput" })), d2.e(this.TAG, "Audio device not found");
26582
26610
  return;
26583
26611
  }
26584
- let { settings: i3 } = e2, r2 = new te().codec(i3.codec).maxBitrate(i3.maxBitrate).deviceId(t3.deviceId).audioMode(i3.audioMode).build();
26612
+ let { settings: i3 } = e2, r2 = new ee().codec(i3.codec).maxBitrate(i3.maxBitrate).deviceId(t3.deviceId).audioMode(i3.audioMode).build();
26585
26613
  try {
26586
26614
  yield e2.setSettings(r2, true), this.eventBus.deviceChange.publish({ devices: this.getDevices(), selection: t3, type: "audioInput" }), this.logDevices("Audio Device Change Success");
26587
26615
  } catch (s2) {
@@ -26668,7 +26696,7 @@ var Ut = class {
26668
26696
  d2.d(this.TAG, e, JSON.stringify({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput], selected: this.getCurrentSelection() }, null, 4));
26669
26697
  }
26670
26698
  };
26671
- var xi = class {
26699
+ var Ui = class {
26672
26700
  constructor(e, t2) {
26673
26701
  this.deviceManager = e;
26674
26702
  this.audioSinkManager = t2;
@@ -26689,7 +26717,7 @@ var xi = class {
26689
26717
  }
26690
26718
  unblockAutoplay() {
26691
26719
  return c2(this, null, function* () {
26692
- yield this.audioSinkManager.unblockAutoplay(), yield Ae.resumeContext();
26720
+ yield this.audioSinkManager.unblockAutoplay(), yield Ie.resumeContext();
26693
26721
  });
26694
26722
  }
26695
26723
  };
@@ -26717,7 +26745,7 @@ var V = class {
26717
26745
  };
26718
26746
  var Bt = class {
26719
26747
  constructor() {
26720
- this.eventEmitter = new on2();
26748
+ this.eventEmitter = new nn2();
26721
26749
  this.analytics = new V(G2.ANALYTICS, this.eventEmitter);
26722
26750
  this.deviceChange = new V(G2.DEVICE_CHANGE, this.eventEmitter);
26723
26751
  this.localAudioEnabled = new V(G2.LOCAL_AUDIO_ENABLED, this.eventEmitter);
@@ -26737,7 +26765,7 @@ var Bt = class {
26737
26765
  this.leave = new V(G2.LEAVE, this.eventEmitter);
26738
26766
  }
26739
26767
  };
26740
- var Ui = class {
26768
+ var Bi = class {
26741
26769
  constructor(e, t2, i2) {
26742
26770
  this.store = e;
26743
26771
  this.listener = t2;
@@ -26755,7 +26783,7 @@ var Ui = class {
26755
26783
  (n2 = this.listener) == null || n2.onPeerUpdate(5, null);
26756
26784
  }
26757
26785
  };
26758
- var Bi = class {
26786
+ var Vi = class {
26759
26787
  constructor(e) {
26760
26788
  this.listener = e;
26761
26789
  this.TAG = "[BroadcastManager]";
@@ -26768,7 +26796,7 @@ var Bi = class {
26768
26796
  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);
26769
26797
  }
26770
26798
  };
26771
- var Vi = class {
26799
+ var Fi = class {
26772
26800
  constructor(e, t2) {
26773
26801
  this.store = e;
26774
26802
  this.listener = t2;
@@ -26914,7 +26942,7 @@ var ct = class {
26914
26942
  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;
26915
26943
  }
26916
26944
  };
26917
- var Fi = class extends ct {
26945
+ var Gi = class extends ct {
26918
26946
  constructor(t2, i2, r2, s2) {
26919
26947
  super(t2, i2, s2);
26920
26948
  this.transport = r2;
@@ -26954,7 +26982,7 @@ var Fi = class extends ct {
26954
26982
  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));
26955
26983
  }
26956
26984
  };
26957
- var Gi = class {
26985
+ var Wi = class {
26958
26986
  constructor(e, t2, i2, r2) {
26959
26987
  this.store = e;
26960
26988
  this.peerManager = t2;
@@ -27021,7 +27049,7 @@ var Gi = class {
27021
27049
  }
27022
27050
  };
27023
27051
  var C = (a11) => a11 ? new Date(a11) : void 0;
27024
- var Wi = class {
27052
+ var $i = class {
27025
27053
  constructor(e, t2, i2) {
27026
27054
  this.store = e;
27027
27055
  this.trackManager = t2;
@@ -27120,7 +27148,7 @@ var Wi = class {
27120
27148
  });
27121
27149
  }
27122
27150
  };
27123
- var $i = class {
27151
+ var Ki = class {
27124
27152
  constructor(e, t2) {
27125
27153
  this.store = e;
27126
27154
  this.eventBus = t2;
@@ -27145,10 +27173,10 @@ var $i = class {
27145
27173
  }
27146
27174
  };
27147
27175
  var Vt = (a11, e, t2) => {
27148
- let i2 = t2 === "qa" ? Gs : Fs, r2 = new URL(i2);
27176
+ let i2 = t2 === "qa" ? Ws : Gs, r2 = new URL(i2);
27149
27177
  return r2.searchParams.set("endpoint", `https://${e}`), r2.searchParams.set("token", a11), r2.toString();
27150
27178
  };
27151
- var Ki = class {
27179
+ var qi = class {
27152
27180
  constructor(e, t2, i2) {
27153
27181
  this.transport = e;
27154
27182
  this.store = t2;
@@ -27210,7 +27238,7 @@ var Ft = class {
27210
27238
  this.transport = e;
27211
27239
  this.store = t2;
27212
27240
  this.listener = i2;
27213
- this.whiteboard = new Ki(e, t2, i2);
27241
+ this.whiteboard = new qi(e, t2, i2);
27214
27242
  }
27215
27243
  setListener(e) {
27216
27244
  this.listener = e, this.whiteboard.setListener(e);
@@ -27220,7 +27248,7 @@ var Ft = class {
27220
27248
  var o2, n2;
27221
27249
  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 }));
27222
27250
  e.id || (e.id = i2), Array.isArray(e.questions) && (yield this.addQuestionsToPoll(e.id, e.questions));
27223
- 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 }));
27251
+ 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 }));
27224
27252
  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]);
27225
27253
  });
27226
27254
  }
@@ -27288,10 +27316,10 @@ var Ft = class {
27288
27316
  r2 = [...l2.polls, ...r2, ...u2.polls];
27289
27317
  }
27290
27318
  for (let l2 of r2) {
27291
- 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);
27319
+ 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);
27292
27320
  p2.questions = u2.questions.map(({ question: T, options: g2, answer: v2 }, E2) => {
27293
- var P7, w2;
27294
- return M2(m({}, T), { options: g2, answer: v2, responses: (w2 = (P7 = h2 == null ? void 0 : h2.questions) == null ? void 0 : P7[E2]) == null ? void 0 : w2.responses });
27321
+ var k2, w2;
27322
+ return M2(m({}, T), { options: g2, answer: v2, responses: (w2 = (k2 = h2 == null ? void 0 : h2.questions) == null ? void 0 : k2[E2]) == null ? void 0 : w2.responses });
27295
27323
  }), t2.push(p2), this.store.setPoll(p2);
27296
27324
  }
27297
27325
  return (n2 = this.listener) == null || n2.onPollsUpdate(3, t2), t2;
@@ -27314,11 +27342,11 @@ var Ft = class {
27314
27342
  return i2;
27315
27343
  }
27316
27344
  };
27317
- var qi = (a11) => {
27345
+ var ji = (a11) => {
27318
27346
  let e = { userid: "customerID", peerid: "peerID", username: "userName" };
27319
27347
  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) };
27320
27348
  };
27321
- var ji = class {
27349
+ var Ji = class {
27322
27350
  constructor(e, t2, i2) {
27323
27351
  this.store = e;
27324
27352
  this.transport = t2;
@@ -27351,7 +27379,7 @@ var ji = class {
27351
27379
  (i2 = this.listener) == null || i2.onPollsUpdate(1, [o2]);
27352
27380
  return;
27353
27381
  }
27354
- let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = qi(s2);
27382
+ let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = ji(s2);
27355
27383
  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);
27356
27384
  }
27357
27385
  (r2 = this.listener) == null || r2.onPollsUpdate(1, t2);
@@ -27411,7 +27439,7 @@ var ji = class {
27411
27439
  });
27412
27440
  }
27413
27441
  };
27414
- var Ji = class {
27442
+ var Qi = class {
27415
27443
  constructor(e, t2) {
27416
27444
  this.store = e;
27417
27445
  this.listener = t2;
@@ -27472,7 +27500,7 @@ var Ji = class {
27472
27500
  return e && (s2 = s2.filter((o2) => o2.type === e)), t2 && (s2 = s2.filter((o2) => o2.source === t2)), s2.filter((o2) => o2.enabled !== i2);
27473
27501
  }
27474
27502
  };
27475
- var Qi = class {
27503
+ var zi = class {
27476
27504
  constructor(e, t2) {
27477
27505
  this.store = e;
27478
27506
  this.listener = t2;
@@ -27629,7 +27657,7 @@ var Qi = class {
27629
27657
  return d2.e(this.TAG, "error in streaming/recording", i2), i2;
27630
27658
  }
27631
27659
  };
27632
- var zi = class {
27660
+ var Yi = class {
27633
27661
  constructor(e, t2) {
27634
27662
  this.store = e;
27635
27663
  this.listener = t2;
@@ -27643,7 +27671,7 @@ var zi = class {
27643
27671
  (i2 = this.listener) == null || i2.onSessionStoreUpdate(t2);
27644
27672
  }
27645
27673
  };
27646
- var Yi = class {
27674
+ var Xi = class {
27647
27675
  constructor(e, t2, i2) {
27648
27676
  this.store = e;
27649
27677
  this.transport = t2;
@@ -27674,7 +27702,7 @@ var Yi = class {
27674
27702
  });
27675
27703
  }
27676
27704
  };
27677
- var Xi = class {
27705
+ var Zi = class {
27678
27706
  constructor(e, t2, i2, r2, s2, o2) {
27679
27707
  this.store = e;
27680
27708
  this.transport = i2;
@@ -27701,7 +27729,7 @@ var Xi = class {
27701
27729
  this.peerManager.handlePeerInfoUpdate({ peer: i3, name: e2, data: t3 });
27702
27730
  };
27703
27731
  let n2 = this.transport.isFlagEnabled("onDemandTracks");
27704
- this.trackManager = n2 ? new Fi(this.store, t2, this.transport, this.listener) : new ct(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);
27732
+ 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);
27705
27733
  }
27706
27734
  setListener(e) {
27707
27735
  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;
@@ -27753,7 +27781,7 @@ var Xi = class {
27753
27781
  }
27754
27782
  }
27755
27783
  };
27756
- var Zi = class {
27784
+ var er = class {
27757
27785
  constructor(e) {
27758
27786
  this.transport = e;
27759
27787
  this.observedKeys = /* @__PURE__ */ new Set();
@@ -27793,7 +27821,7 @@ var Zi = class {
27793
27821
  });
27794
27822
  }
27795
27823
  };
27796
- var er = class {
27824
+ var tr = class {
27797
27825
  constructor(e, t2, i2 = "", r2 = "", s2 = "https://prod-init.100ms.live/init", o2 = false, n2) {
27798
27826
  this.authToken = e;
27799
27827
  this.peerId = t2;
@@ -27805,16 +27833,16 @@ var er = class {
27805
27833
  }
27806
27834
  };
27807
27835
  var J = ((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))(J || {});
27808
- var wa = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
27809
- var 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 || {});
27810
- var ir = class {
27836
+ var _a7 = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
27837
+ var 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 || {});
27838
+ var rr = class {
27811
27839
  constructor(e) {
27812
27840
  this.promise = new Promise((t2, i2) => {
27813
27841
  this.resolve = t2, this.reject = i2, e(t2, i2);
27814
27842
  });
27815
27843
  }
27816
27844
  };
27817
- var rr = class {
27845
+ var sr = class {
27818
27846
  constructor(e, t2) {
27819
27847
  this.onStateChange = e;
27820
27848
  this.sendEvent = t2;
@@ -27841,11 +27869,11 @@ var rr = class {
27841
27869
  d2.d(this.TAG, `schedule: Already a task for ${J[e]} scheduled, waiting for its completion`), yield g2.promise;
27842
27870
  return;
27843
27871
  }
27844
- let v2 = new ir((E2, P7) => {
27872
+ let v2 = new rr((E2, k2) => {
27845
27873
  });
27846
27874
  this.inProgress.set(e, v2), this.sendEvent(t2, e);
27847
27875
  }
27848
- let u2 = false, p2 = wa[e];
27876
+ let u2 = false, p2 = _a7[e];
27849
27877
  for (let g2 in p2) {
27850
27878
  let v2 = p2[parseInt(g2)];
27851
27879
  try {
@@ -27902,7 +27930,7 @@ var rr = class {
27902
27930
  });
27903
27931
  }
27904
27932
  };
27905
- var sr = class extends He {
27933
+ var ar = class extends He {
27906
27934
  constructor() {
27907
27935
  super(100);
27908
27936
  this.localStorage = new le("hms-analytics");
@@ -27923,7 +27951,7 @@ var sr = class extends He {
27923
27951
  });
27924
27952
  }
27925
27953
  };
27926
- var ar = class {
27954
+ var or = class {
27927
27955
  constructor() {
27928
27956
  this.TAG = "[AnalyticsTransport]";
27929
27957
  }
@@ -27953,11 +27981,11 @@ var ar = class {
27953
27981
  }
27954
27982
  }
27955
27983
  };
27956
- var or = class extends ar {
27984
+ var nr = class extends or {
27957
27985
  constructor(t2) {
27958
27986
  super();
27959
27987
  this.transportProvider = t2;
27960
- this.failedEvents = new sr();
27988
+ this.failedEvents = new ar();
27961
27989
  }
27962
27990
  };
27963
27991
  var dt = class {
@@ -28038,8 +28066,8 @@ var lt = class {
28038
28066
  return this.tempStats.reduce((r2, s2) => r2 + ((s2[e] || 0) > t2 ? 1 : 0), 0);
28039
28067
  }
28040
28068
  };
28041
- var nr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28042
- var cr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28069
+ var cr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28070
+ var dr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28043
28071
  var Gt = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
28044
28072
  var Wt = class extends dt {
28045
28073
  constructor() {
@@ -28069,8 +28097,8 @@ var Wt = class extends dt {
28069
28097
  if (p2 && this.trackAnalytics.has(p2))
28070
28098
  (E2 = this.trackAnalytics.get(p2)) == null || E2.pushTempStat(h2);
28071
28099
  else if (n2) {
28072
- let P7 = new Qr({ track: n2, sampleWindowSize: this.sampleWindowSize, rid: u2.rid, ssrc: u2.ssrc.toString(), kind: u2.kind });
28073
- P7.pushTempStat(h2), this.trackAnalytics.set(this.getTrackIdentifier(n2.trackId, u2), P7);
28100
+ let k2 = new zr({ track: n2, sampleWindowSize: this.sampleWindowSize, rid: u2.rid, ssrc: u2.ssrc.toString(), kind: u2.kind });
28101
+ k2.pushTempStat(h2), this.trackAnalytics.set(this.getTrackIdentifier(n2.trackId, u2), k2);
28074
28102
  }
28075
28103
  let T = this.trackAnalytics.get(p2);
28076
28104
  T != null && T.shouldCreateSample() && (i2 = true);
@@ -28081,7 +28109,7 @@ var Wt = class extends dt {
28081
28109
  return i2.rid ? `${t2}:${i2.rid}` : t2;
28082
28110
  }
28083
28111
  };
28084
- var Qr = class extends lt {
28112
+ var zr = class extends lt {
28085
28113
  constructor() {
28086
28114
  super(...arguments);
28087
28115
  this.samples = [];
@@ -28091,7 +28119,7 @@ var Qr = class extends lt {
28091
28119
  };
28092
28120
  this.shouldCreateSample = () => {
28093
28121
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28094
- return t2 === 30 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28122
+ return t2 === 30 || dr(i2, r2) || i2.kind === "video" && cr(i2, r2);
28095
28123
  };
28096
28124
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28097
28125
  }
@@ -28115,19 +28143,19 @@ var $t = class extends dt {
28115
28143
  let i2 = t2.getAllRemoteTracksStats(), r2 = false;
28116
28144
  Object.keys(i2).forEach((s2) => {
28117
28145
  var v2, E2;
28118
- let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (v2 = this.trackAnalytics.get(s2)) == null ? void 0 : v2.getLatestStat(), p2 = ((P7, w2) => {
28119
- let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Zt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((P7 == null ? void 0 : P7.jitterBufferDelay) || 0) - Oe, $ = ((P7 == null ? void 0 : P7.jitterBufferEmittedCount) || 0) - Zt;
28146
+ let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (v2 = this.trackAnalytics.get(s2)) == null ? void 0 : v2.getLatestStat(), p2 = ((k2, w2) => {
28147
+ let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Zt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((k2 == null ? void 0 : k2.jitterBufferDelay) || 0) - Oe, $ = ((k2 == null ? void 0 : k2.jitterBufferEmittedCount) || 0) - Zt;
28120
28148
  return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
28121
28149
  })(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
28122
28150
  if (n2.kind === "video") {
28123
- let P7 = o2.getPreferredLayerDefinition();
28124
- T.expectedFrameHeight = P7 == null ? void 0 : P7.resolution.height, T.expectedFrameWidth = P7 == null ? void 0 : P7.resolution.width;
28151
+ let k2 = o2.getPreferredLayerDefinition();
28152
+ T.expectedFrameHeight = k2 == null ? void 0 : k2.resolution.height, T.expectedFrameWidth = k2 == null ? void 0 : k2.resolution.width;
28125
28153
  }
28126
28154
  if (this.trackAnalytics.has(s2))
28127
28155
  (E2 = this.trackAnalytics.get(s2)) == null || E2.pushTempStat(T);
28128
28156
  else if (o2) {
28129
- let P7 = new Yr({ track: o2, sampleWindowSize: this.sampleWindowSize, ssrc: n2.ssrc.toString(), kind: n2.kind });
28130
- P7.pushTempStat(T), this.trackAnalytics.set(s2, P7);
28157
+ let k2 = new Xr({ track: o2, sampleWindowSize: this.sampleWindowSize, ssrc: n2.ssrc.toString(), kind: n2.kind });
28158
+ k2.pushTempStat(T), this.trackAnalytics.set(s2, k2);
28131
28159
  }
28132
28160
  let g2 = this.trackAnalytics.get(s2);
28133
28161
  g2 != null && g2.shouldCreateSample() && (r2 = true);
@@ -28146,7 +28174,7 @@ var $t = class extends dt {
28146
28174
  return l2.estimatedPlayoutTimestamp - t2.estimatedPlayoutTimestamp;
28147
28175
  }
28148
28176
  };
28149
- var Yr = class extends lt {
28177
+ var Xr = class extends lt {
28150
28178
  constructor() {
28151
28179
  super(...arguments);
28152
28180
  this.samples = [];
@@ -28161,7 +28189,7 @@ var Yr = class extends lt {
28161
28189
  };
28162
28190
  this.shouldCreateSample = () => {
28163
28191
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28164
- return t2 === 10 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28192
+ return t2 === 10 || dr(i2, r2) || i2.kind === "video" && cr(i2, r2);
28165
28193
  };
28166
28194
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28167
28195
  }
@@ -28170,8 +28198,8 @@ var Yr = class extends lt {
28170
28198
  return i2.length === 0 ? Pt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
28171
28199
  }
28172
28200
  };
28173
- var lr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(lr || {});
28174
- function _a7(a11, e) {
28201
+ var ur = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(ur || {});
28202
+ function Na(a11, e) {
28175
28203
  var r2;
28176
28204
  let t2 = Kt.parse(a11.sdp);
28177
28205
  if (!((r2 = t2.origin) != null && r2.username.startsWith("mozilla")))
@@ -28183,14 +28211,14 @@ function _a7(a11, e) {
28183
28211
  n2 && (s2.msid = (p2 = s2.msid) == null ? void 0 : p2.replace(/\s(.+)/, ` ${n2}`));
28184
28212
  }), { type: a11.type, sdp: Kt.write(t2) };
28185
28213
  }
28186
- function Na(a11, e) {
28214
+ function Oa(a11, e) {
28187
28215
  var s2;
28188
28216
  if (!(a11 != null && a11.sdp) || !e)
28189
28217
  return;
28190
- let i2 = Kt.parse(a11.sdp).media.find((o2) => ee(o2.mid) && parseInt(o2.mid) === parseInt(e));
28218
+ let i2 = Kt.parse(a11.sdp).media.find((o2) => oe(o2.mid) && parseInt(o2.mid) === parseInt(e));
28191
28219
  return (s2 = i2 == null ? void 0 : i2.msid) == null ? void 0 : s2.split(" ")[1];
28192
28220
  }
28193
- function Oa(a11) {
28221
+ function xa(a11) {
28194
28222
  return a11.sdp.includes("usedtx=1") ? a11 : { type: a11.type, sdp: a11.sdp.replace("useinbandfec=1", "useinbandfec=1;usedtx=1") };
28195
28223
  }
28196
28224
  var Ee = "[HMSConnection]";
@@ -28215,7 +28243,7 @@ var Ke = class {
28215
28243
  return c2(this, null, function* () {
28216
28244
  try {
28217
28245
  let i2 = yield this.nativeConnection.createOffer(t2);
28218
- return d2.d(Ee, `[role=${this.role}] createOffer offer=${JSON.stringify(i2, null, 1)}`), Oa(_a7(i2, e));
28246
+ return d2.d(Ee, `[role=${this.role}] createOffer offer=${JSON.stringify(i2, null, 1)}`), xa(Na(i2, e));
28219
28247
  } catch (i2) {
28220
28248
  throw S2.WebrtcErrors.CreateOfferFailed(this.action, i2.message);
28221
28249
  }
@@ -28271,13 +28299,13 @@ var Ke = class {
28271
28299
  let i2 = (r2 = t2.track) == null ? void 0 : r2.kind;
28272
28300
  if (t2.transport) {
28273
28301
  let s2 = t2.transport.iceTransport, o2 = () => {
28274
- 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))));
28302
+ 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))));
28275
28303
  };
28276
28304
  typeof s2.onselectedcandidatepairchange == "function" && (s2.onselectedcandidatepairchange = o2), o2();
28277
28305
  }
28278
28306
  });
28279
28307
  } catch (e) {
28280
- d2.w(Ee, `Error in logging selected ice candidate pair for ${lr[this.role]} connection`, e);
28308
+ d2.w(Ee, `Error in logging selected ice candidate pair for ${ur[this.role]} connection`, e);
28281
28309
  }
28282
28310
  }
28283
28311
  removeTrack(e) {
@@ -28365,7 +28393,7 @@ var Jt = class a9 extends Ke {
28365
28393
  this.remoteStreams = /* @__PURE__ */ new Map();
28366
28394
  this.MAX_RETRIES = 3;
28367
28395
  this.pendingMessageQueue = [];
28368
- this.eventEmitter = new nn2({ maxListeners: 60 });
28396
+ this.eventEmitter = new cn2({ maxListeners: 60 });
28369
28397
  this.handlePendingApiMessages = () => {
28370
28398
  this.eventEmitter.emit("open", true), this.pendingMessageQueue.length > 0 && (d2.d(this.TAG, "Found pending message queue, sending messages"), this.pendingMessageQueue.forEach((t3) => this.sendOverApiDataChannel(t3)), this.pendingMessageQueue.length = 0);
28371
28399
  };
@@ -28428,9 +28456,9 @@ var Jt = class a9 extends Ke {
28428
28456
  this.observer.onTrackRemove(T), s2.tracks.splice(h2, 1), s2.tracks.length === 0 && this.remoteStreams.delete(r2);
28429
28457
  }
28430
28458
  });
28431
- let s2 = this.remoteStreams.get(r2), o2 = t2.track.kind === "audio" ? ae : U2, n2 = new o2(s2, t2.track);
28459
+ let s2 = this.remoteStreams.get(r2), o2 = t2.track.kind === "audio" ? se : U2, n2 = new o2(s2, t2.track);
28432
28460
  t2.track.kind === "video" && s2.setVideoLayerLocally("none", "addTrack", "subscribeConnection"), n2.transceiver = t2.transceiver;
28433
- let l2 = Na(this.remoteDescription, (u2 = t2.transceiver) == null ? void 0 : u2.mid);
28461
+ let l2 = Oa(this.remoteDescription, (u2 = t2.transceiver) == null ? void 0 : u2.mid);
28434
28462
  l2 && n2.setSdpTrackId(l2), s2.tracks.push(n2), this.observer.onTrackAdd(n2);
28435
28463
  };
28436
28464
  }
@@ -28439,7 +28467,7 @@ var Jt = class a9 extends Ke {
28439
28467
  }
28440
28468
  sendOverApiDataChannelWithResponse(t2, i2) {
28441
28469
  return c2(this, null, function* () {
28442
- let r2 = cn2();
28470
+ let r2 = dn2();
28443
28471
  if (t2.method === "prefer-video-track-state" && this.isFlagEnabled("disableVideoTrackAutoUnsubscribe") && t2.params.max_spatial_layer === "none")
28444
28472
  return d2.d(this.TAG, "video auto unsubscribe is disabled, request is ignored"), { id: r2 };
28445
28473
  let s2 = JSON.stringify(m({ id: i2 || r2, jsonrpc: "2.0" }, t2));
@@ -28453,8 +28481,8 @@ var Jt = class a9 extends Ke {
28453
28481
  });
28454
28482
  }
28455
28483
  };
28456
- var xa = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
28457
- var ur = "[InitService]";
28484
+ var Ua = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
28485
+ var pr = "[InitService]";
28458
28486
  var Qt = class {
28459
28487
  static handleError(e, t2) {
28460
28488
  switch (e.status) {
@@ -28468,16 +28496,16 @@ var Qt = class {
28468
28496
  }
28469
28497
  static fetchInitConfig(n2) {
28470
28498
  return c2(this, arguments, function* ({ token: e, peerId: t2, userAgent: i2, initEndpoint: r2 = "https://prod-init.100ms.live", region: s2 = "", iceServers: o2 }) {
28471
- d2.d(ur, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28472
- let l2 = dn2(r2, t2, i2, s2);
28499
+ d2.d(pr, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28500
+ let l2 = ln2(r2, t2, i2, s2);
28473
28501
  try {
28474
28502
  let u2 = yield fetch(l2, { headers: { Authorization: `Bearer ${e}` } });
28475
28503
  try {
28476
28504
  let p2 = yield u2.clone().json();
28477
- return this.handleError(u2, p2), d2.d(ur, `config is ${JSON.stringify(p2, null, 2)}`), ln2(p2, o2);
28505
+ return this.handleError(u2, p2), d2.d(pr, `config is ${JSON.stringify(p2, null, 2)}`), un2(p2, o2);
28478
28506
  } catch (p2) {
28479
28507
  let h2 = yield u2.text();
28480
- throw d2.e(ur, "json error", p2.message, h2), p2 instanceof f2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28508
+ throw d2.e(pr, "json error", p2.message, h2), p2 instanceof f2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28481
28509
  }
28482
28510
  } catch (u2) {
28483
28511
  let p2 = u2;
@@ -28486,18 +28514,18 @@ var Qt = class {
28486
28514
  });
28487
28515
  }
28488
28516
  };
28489
- function dn2(a11, e, t2, i2) {
28517
+ function ln2(a11, e, t2, i2) {
28490
28518
  try {
28491
28519
  let r2 = new URL("/init", a11);
28492
28520
  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();
28493
28521
  } catch (r2) {
28494
28522
  let s2 = r2;
28495
- throw d2.e(ur, s2.name, s2.message), s2;
28523
+ throw d2.e(pr, s2.name, s2.message), s2;
28496
28524
  }
28497
28525
  }
28498
- function ln2(a11, e) {
28526
+ function un2(a11, e) {
28499
28527
  var t2;
28500
- return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: xa((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
28528
+ return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: Ua((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
28501
28529
  }
28502
28530
  var zt = class {
28503
28531
  constructor(e) {
@@ -28537,7 +28565,7 @@ var zt = class {
28537
28565
  internalCall(e, t2) {
28538
28566
  return c2(this, null, function* () {
28539
28567
  var s2;
28540
- let i2 = un2(), r2 = { method: e, params: t2, id: i2, jsonrpc: "2.0" };
28568
+ let i2 = pn2(), r2 = { method: e, params: t2, id: i2, jsonrpc: "2.0" };
28541
28569
  (s2 = this.socket) == null || s2.send(JSON.stringify(r2));
28542
28570
  try {
28543
28571
  return yield new Promise((n2, l2) => {
@@ -28547,7 +28575,7 @@ var zt = class {
28547
28575
  if (o2 instanceof f2)
28548
28576
  throw o2;
28549
28577
  let n2 = o2;
28550
- throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), Tr(e), n2.message);
28578
+ throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), fr(e), n2.message);
28551
28579
  }
28552
28580
  });
28553
28581
  }
@@ -28833,7 +28861,7 @@ var zt = class {
28833
28861
  rejectPendingCalls(e = "") {
28834
28862
  this.callbacks.forEach((t2, i2) => {
28835
28863
  var r2, s2, o2, n2;
28836
- ((r2 = t2.metadata) == null ? void 0 : r2.method) !== "ping" && (d2.e(this.TAG, `rejecting pending callback ${(s2 = t2.metadata) == null ? void 0 : s2.method}, id=${i2}`), t2.reject(S2.WebSocketConnectionErrors.WebSocketConnectionLost((o2 = t2.metadata) != null && o2.method ? Tr((n2 = t2.metadata) == null ? void 0 : n2.method) : "RECONNECT_SIGNAL", e)), this.callbacks.delete(i2));
28864
+ ((r2 = t2.metadata) == null ? void 0 : r2.method) !== "ping" && (d2.e(this.TAG, `rejecting pending callback ${(s2 = t2.metadata) == null ? void 0 : s2.method}, id=${i2}`), t2.reject(S2.WebSocketConnectionErrors.WebSocketConnectionLost((o2 = t2.metadata) != null && o2.method ? fr((n2 = t2.metadata) == null ? void 0 : n2.method) : "RECONNECT_SIGNAL", e)), this.callbacks.delete(i2));
28837
28865
  });
28838
28866
  }
28839
28867
  pingPongLoop(e) {
@@ -28842,7 +28870,7 @@ var zt = class {
28842
28870
  let t2 = ((i2 = window.HMS) == null ? void 0 : i2.PING_TIMEOUT) || 12e3;
28843
28871
  if (this.isConnected) {
28844
28872
  let s2 = yield this.ping(t2);
28845
- this.pongResponseTimes.enqueue(s2), s2 > t2 ? (d2.d(this.TAG, `Pong timeout ${e}, pageHidden=${us()}`), this.id === e && this.setIsConnected(false, "ping pong failure")) : setTimeout(() => this.pingPongLoop(e), ((r2 = window.HMS) == null ? void 0 : r2.PING_INTERVAL) || 3e3);
28873
+ this.pongResponseTimes.enqueue(s2), s2 > t2 ? (d2.d(this.TAG, `Pong timeout ${e}, pageHidden=${ps()}`), this.id === e && this.setIsConnected(false, "ping pong failure")) : setTimeout(() => this.pingPongLoop(e), ((r2 = window.HMS) == null ? void 0 : r2.PING_INTERVAL) || 3e3);
28846
28874
  }
28847
28875
  });
28848
28876
  }
@@ -28864,13 +28892,13 @@ var zt = class {
28864
28892
  });
28865
28893
  }
28866
28894
  };
28867
- var Ua = () => {
28895
+ var Ba = () => {
28868
28896
  if (!O2 || typeof navigator.connection == "undefined")
28869
28897
  return;
28870
28898
  let a11 = navigator.connection;
28871
28899
  return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
28872
28900
  };
28873
- var I2 = "[HMSTransport]:";
28901
+ var A2 = "[HMSTransport]:";
28874
28902
  var Yt = class {
28875
28903
  constructor(e, t2, i2, r2, s2, o2, n2) {
28876
28904
  this.observer = e;
@@ -28891,14 +28919,14 @@ var Yt = class {
28891
28919
  try {
28892
28920
  if (!this.subscribeConnection)
28893
28921
  return;
28894
- yield this.subscribeConnection.setRemoteDescription(e2), d2.d(I2, `[SUBSCRIBE] Adding ${this.subscribeConnection.candidates.length} ice-candidates`, this.subscribeConnection.candidates);
28922
+ yield this.subscribeConnection.setRemoteDescription(e2), d2.d(A2, `[SUBSCRIBE] Adding ${this.subscribeConnection.candidates.length} ice-candidates`, this.subscribeConnection.candidates);
28895
28923
  for (let i3 of this.subscribeConnection.candidates)
28896
28924
  yield this.subscribeConnection.addIceCandidate(i3);
28897
28925
  this.subscribeConnection.candidates.length = 0;
28898
28926
  let t3 = yield this.subscribeConnection.createAnswer();
28899
- yield this.subscribeConnection.setLocalDescription(t3), this.signal.answer(t3), d2.d(I2, "[role=SUBSCRIBE] onOffer renegotiation DONE \u2705");
28927
+ yield this.subscribeConnection.setLocalDescription(t3), this.signal.answer(t3), d2.d(A2, "[role=SUBSCRIBE] onOffer renegotiation DONE \u2705");
28900
28928
  } catch (t3) {
28901
- d2.d(I2, "[role=SUBSCRIBE] onOffer renegotiation FAILED \u274C", t3), this.state = "Failed";
28929
+ d2.d(A2, "[role=SUBSCRIBE] onOffer renegotiation FAILED \u274C", t3), this.state = "Failed";
28902
28930
  let i3;
28903
28931
  t3 instanceof f2 ? i3 = t3 : i3 = S2.GenericErrors.Unknown("PUBLISH", t3.message), this.observer.onFailure(i3), this.eventBus.analytics.publish(y2.subscribeFail(i3));
28904
28932
  }
@@ -28910,7 +28938,7 @@ var Yt = class {
28910
28938
  }), onFailure: (e2) => {
28911
28939
  this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
28912
28940
  }, onOffline: (e2) => c2(this, null, function* () {
28913
- d2.d(I2, "socket offline", tr[this.state]);
28941
+ d2.d(A2, "socket offline", ir[this.state]);
28914
28942
  try {
28915
28943
  this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
28916
28944
  } catch (t3) {
@@ -28918,19 +28946,19 @@ var Yt = class {
28918
28946
  }
28919
28947
  }), onOnline: () => {
28920
28948
  var e2;
28921
- d2.d(I2, "socket online", tr[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
28949
+ d2.d(A2, "socket online", ir[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
28922
28950
  }, onNetworkOnline: () => {
28923
28951
  this.analyticsEventsService.flushFailedClientEvents();
28924
28952
  } };
28925
28953
  this.signal = new zt(this.signalObserver);
28926
- this.analyticsSignalTransport = new or(this.signal);
28954
+ this.analyticsSignalTransport = new nr(this.signal);
28927
28955
  this.publishDtlsStateTimer = 0;
28928
28956
  this.lastPublishDtlsState = "new";
28929
28957
  this.publishConnectionObserver = { onRenegotiationNeeded: () => c2(this, null, function* () {
28930
28958
  yield this.performPublishRenegotiation();
28931
28959
  }), onDTLSTransportStateChange: (e2) => {
28932
28960
  var r3, s3, o3;
28933
- if ((e2 === "failed" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publisher on dtls transport state change: ${e2}`), !e2 || this.lastPublishDtlsState === e2 || (this.lastPublishDtlsState = e2, this.publishDtlsStateTimer !== 0 && (clearTimeout(this.publishDtlsStateTimer), this.publishDtlsStateTimer = 0), e2 !== "connecting" && e2 !== "failed"))
28961
+ if ((e2 === "failed" ? d2.w.bind(d2) : d2.d.bind(d2))(A2, `Publisher on dtls transport state change: ${e2}`), !e2 || this.lastPublishDtlsState === e2 || (this.lastPublishDtlsState = e2, this.publishDtlsStateTimer !== 0 && (clearTimeout(this.publishDtlsStateTimer), this.publishDtlsStateTimer = 0), e2 !== "connecting" && e2 !== "failed"))
28934
28962
  return;
28935
28963
  let i3 = (o3 = (s3 = (r3 = this.initConfig) == null ? void 0 : r3.config) == null ? void 0 : s3.dtlsStateTimeouts) == null ? void 0 : o3[e2];
28936
28964
  !i3 || i3 <= 0 || (this.publishDtlsStateTimer = window.setTimeout(() => {
@@ -28942,14 +28970,14 @@ var Yt = class {
28942
28970
  }
28943
28971
  }, i3));
28944
28972
  }, onDTLSTransportError: (e2) => {
28945
- d2.e(I2, `onDTLSTransportError ${e2.name} ${e2.message}`, e2), this.eventBus.analytics.publish(y2.disconnect(e2));
28973
+ d2.e(A2, `onDTLSTransportError ${e2.name} ${e2.message}`, e2), this.eventBus.analytics.publish(y2.disconnect(e2));
28946
28974
  }, onIceConnectionChange: (e2) => c2(this, null, function* () {
28947
- (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publish ice connection state change: ${e2}`);
28975
+ (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(A2, `Publish ice connection state change: ${e2}`);
28948
28976
  }), onConnectionStateChange: (e2) => c2(this, null, function* () {
28949
28977
  var i3, r3, s3, o3, n3, l3, u3, p3;
28950
- (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(() => {
28951
- var h2, T, g2, v2, E2, P7, w2;
28952
- ((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 = (P7 = (E2 = this.publishConnection) == null ? void 0 : E2.selectedCandidatePair) == null ? void 0 : P7.remote) == null ? void 0 : w2.candidate}`));
28978
+ (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(A2, `Publish connection state change: ${e2}`), e2 === "connected" && ((i3 = this.connectivityListener) == null || i3.onICESuccess(true), (r3 = this.publishConnection) == null || r3.handleSelectedIceCandidatePairs()), e2 === "disconnected" && setTimeout(() => {
28979
+ var h2, T, g2, v2, E2, k2, w2;
28980
+ ((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 = (k2 = (E2 = this.publishConnection) == null ? void 0 : E2.selectedCandidatePair) == null ? void 0 : k2.remote) == null ? void 0 : w2.candidate}`));
28953
28981
  }, 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}`)));
28954
28982
  }), onIceCandidate: (e2) => {
28955
28983
  var t3;
@@ -28961,18 +28989,18 @@ var Yt = class {
28961
28989
  this.subscribeConnectionObserver = { onApiChannelMessage: (e2) => {
28962
28990
  this.observer.onNotification(JSON.parse(e2));
28963
28991
  }, onTrackAdd: (e2) => {
28964
- d2.d(I2, "[Subscribe] onTrackAdd", `${e2}`), this.observer.onTrackAdd(e2);
28992
+ d2.d(A2, "[Subscribe] onTrackAdd", `${e2}`), this.observer.onTrackAdd(e2);
28965
28993
  }, onTrackRemove: (e2) => {
28966
- d2.d(I2, "[Subscribe] onTrackRemove", `${e2}`), this.observer.onTrackRemove(e2);
28994
+ d2.d(A2, "[Subscribe] onTrackRemove", `${e2}`), this.observer.onTrackRemove(e2);
28967
28995
  }, onIceConnectionChange: (e2) => c2(this, null, function* () {
28968
28996
  var i3;
28969
- if ((e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Subscribe ice connection state change: ${e2}`), e2 === "connected") {
28997
+ if ((e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(A2, `Subscribe ice connection state change: ${e2}`), e2 === "connected") {
28970
28998
  let r3 = this.callbacks.get(tt);
28971
28999
  this.callbacks.delete(tt), (i3 = this.connectivityListener) == null || i3.onICESuccess(false), r3 && r3.promise.resolve(true);
28972
29000
  }
28973
29001
  }), onConnectionStateChange: (e2) => c2(this, null, function* () {
28974
29002
  var i3, r3, s3, o3, n3, l3;
28975
- (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(() => {
29003
+ (e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(A2, `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(() => {
28976
29004
  var u3, p3, h2, T, g2, v2, E2;
28977
29005
  ((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}`));
28978
29006
  }, 5e3), e2 === "connected" && this.handleSubscribeConnectionConnected();
@@ -28984,7 +29012,7 @@ var Yt = class {
28984
29012
  (t3 = this.connectivityListener) == null || t3.onSelectedICECandidatePairChange(e2, false);
28985
29013
  } };
28986
29014
  this.handleLocalRoleUpdate = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
28987
- !this.doesRoleNeedWebRTC(e2) && this.doesRoleNeedWebRTC(t3) && (d2.d(I2, "Local peer role updated to webrtc role, creating PeerConnections and performing inital publish negotiation \u23F3"), this.createPeerConnections(), yield this.negotiateOnFirstPublish());
29015
+ !this.doesRoleNeedWebRTC(e2) && this.doesRoleNeedWebRTC(t3) && (d2.d(A2, "Local peer role updated to webrtc role, creating PeerConnections and performing inital publish negotiation \u23F3"), this.createPeerConnections(), yield this.negotiateOnFirstPublish());
28988
29016
  });
28989
29017
  this.retryPublishIceFailedTask = () => c2(this, null, function* () {
28990
29018
  if (this.publishConnection) {
@@ -29008,7 +29036,7 @@ var Yt = class {
29008
29036
  });
29009
29037
  this.retrySignalDisconnectTask = () => c2(this, null, function* () {
29010
29038
  var t3;
29011
- d2.d(I2, "retrySignalDisconnectTask", { signalConnected: this.signal.isConnected }), this.signal.isConnected || (yield this.internalConnect(this.joinParameters.authToken, this.joinParameters.endpoint, this.joinParameters.peerId, this.joinParameters.iceServers));
29039
+ d2.d(A2, "retrySignalDisconnectTask", { signalConnected: this.signal.isConnected }), this.signal.isConnected || (yield this.internalConnect(this.joinParameters.authToken, this.joinParameters.endpoint, this.joinParameters.peerId, this.joinParameters.iceServers));
29012
29040
  let e2 = (t3 = this.store.getRoom()) != null && t3.joinedAt ? this.signal.isConnected && (yield this.retryPublishIceFailedTask()) : this.signal.isConnected;
29013
29041
  return this.signal.trackUpdate(this.trackStates), e2;
29014
29042
  });
@@ -29017,7 +29045,7 @@ var Yt = class {
29017
29045
  let l2 = (h2, T) => c2(this, null, function* () {
29018
29046
  h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
29019
29047
  });
29020
- this.retryScheduler = new rr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29048
+ this.retryScheduler = new sr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29021
29049
  var g2, v2;
29022
29050
  let T = ((v2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : v2.bitrate) || 0;
29023
29051
  this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
@@ -29042,24 +29070,24 @@ var Yt = class {
29042
29070
  }
29043
29071
  join(e, t2, i2, r2, s2 = false, o2) {
29044
29072
  return c2(this, null, function* () {
29045
- d2.d(I2, "join: started \u23F0");
29073
+ d2.d(A2, "join: started \u23F0");
29046
29074
  try {
29047
- (!this.signal.isConnected || !this.initConfig) && (yield this.connect(e, r2, t2, i2, s2, o2)), this.validateNotDisconnected("connect"), this.initConfig && (yield this.waitForLocalRoleAvailability(), yield this.createConnectionsAndNegotiateJoin(i2, s2), yield this.initRtcStatsMonitor(), d2.d(I2, "\u2705 join: Negotiated over PUBLISH connection"));
29075
+ (!this.signal.isConnected || !this.initConfig) && (yield this.connect(e, r2, t2, i2, s2, o2)), this.validateNotDisconnected("connect"), this.initConfig && (yield this.waitForLocalRoleAvailability(), yield this.createConnectionsAndNegotiateJoin(i2, s2), yield this.initRtcStatsMonitor(), d2.d(A2, "\u2705 join: Negotiated over PUBLISH connection"));
29048
29076
  } catch (n2) {
29049
- d2.e(I2, `join: failed \u274C [token=${e}]`, n2), this.state = "Failed";
29077
+ d2.e(A2, `join: failed \u274C [token=${e}]`, n2), this.state = "Failed";
29050
29078
  let l2 = n2;
29051
29079
  throw l2.isTerminal = l2.isTerminal || l2.code === 500, yield this.observer.onStateChange(this.state, l2), l2;
29052
29080
  }
29053
- d2.d(I2, "\u2705 join: successful"), this.state = "Joined", this.observer.onStateChange(this.state);
29081
+ d2.d(A2, "\u2705 join: successful"), this.state = "Joined", this.observer.onStateChange(this.state);
29054
29082
  });
29055
29083
  }
29056
29084
  connect(e, t2, i2, r2, s2 = false, o2) {
29057
29085
  return c2(this, null, function* () {
29058
- this.setTransportStateForConnect(), this.joinParameters = new er(e, i2, r2.name, r2.metaData, t2, s2, o2);
29086
+ this.setTransportStateForConnect(), this.joinParameters = new tr(e, i2, r2.name, r2.metaData, t2, s2, o2);
29059
29087
  try {
29060
29088
  return yield this.internalConnect(e, t2, i2, o2);
29061
29089
  } catch (n2) {
29062
- 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"))) {
29090
+ if (n2 instanceof f2 && ([P4.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, P4.WebSocketConnectionErrors.FAILED_TO_CONNECT, P4.WebSocketConnectionErrors.ABNORMAL_CLOSE, P4.APIErrors.ENDPOINT_UNREACHABLE].includes(n2.code) || n2.code.toString().startsWith("5") || n2.code.toString().startsWith("429"))) {
29063
29091
  let u2 = () => c2(this, null, function* () {
29064
29092
  return yield this.internalConnect(e, t2, i2, o2), !!(this.initConfig && this.initConfig.endpoint);
29065
29093
  });
@@ -29072,18 +29100,18 @@ var Yt = class {
29072
29100
  leave(e) {
29073
29101
  return c2(this, null, function* () {
29074
29102
  var t2, i2, r2, s2, o2;
29075
- this.retryScheduler.reset(), this.joinParameters = void 0, d2.d(I2, "leaving in transport");
29103
+ this.retryScheduler.reset(), this.joinParameters = void 0, d2.d(A2, "leaving in transport");
29076
29104
  try {
29077
29105
  let n2 = this.pluginUsageTracker.getPluginUsage("HMSKrispPlugin");
29078
29106
  if (n2 && this.eventBus.analytics.publish(y2.getKrispUsage(n2)), this.state = "Leaving", (t2 = this.publishStatsAnalytics) == null || t2.stop(), (i2 = this.subscribeStatsAnalytics) == null || i2.stop(), (r2 = this.webrtcInternals) == null || r2.cleanup(), yield (s2 = this.publishConnection) == null ? void 0 : s2.close(), yield (o2 = this.subscribeConnection) == null ? void 0 : o2.close(), e)
29079
29107
  try {
29080
- this.signal.leave(), d2.d(I2, "signal leave done");
29108
+ this.signal.leave(), d2.d(A2, "signal leave done");
29081
29109
  } catch (l2) {
29082
- d2.w(I2, "failed to send leave on websocket to server", l2);
29110
+ d2.w(A2, "failed to send leave on websocket to server", l2);
29083
29111
  }
29084
29112
  this.analyticsEventsService.flushFailedClientEvents(), this.analyticsEventsService.reset(), yield this.signal.close();
29085
29113
  } catch (n2) {
29086
- this.eventBus.analytics.publish(y2.disconnect(n2)), d2.e(I2, "leave: FAILED \u274C", n2);
29114
+ this.eventBus.analytics.publish(y2.disconnect(n2)), d2.e(A2, "leave: FAILED \u274C", n2);
29087
29115
  } finally {
29088
29116
  this.state = "Disconnected", this.observer.onStateChange(this.state);
29089
29117
  }
@@ -29110,25 +29138,25 @@ var Yt = class {
29110
29138
  let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
29111
29139
  if (i2) {
29112
29140
  let r2 = new Nt(M2(m({}, i2), { mute: !e.enabled }));
29113
- 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]]));
29141
+ this.trackStates.set(i2.track_id, r2), d2.d(A2, "Track Update", this.trackStates, e), this.signal.trackUpdate(/* @__PURE__ */ new Map([[i2.track_id, r2]]));
29114
29142
  }
29115
29143
  }
29116
29144
  publishTrack(e) {
29117
29145
  return c2(this, null, function* () {
29118
- e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new Nt(e));
29146
+ e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(A2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new Nt(e));
29119
29147
  let t2 = new Promise((s2, o2) => {
29120
29148
  this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
29121
29149
  }), i2 = e.stream;
29122
29150
  i2.setConnection(this.publishConnection);
29123
29151
  let r2 = this.store.getSimulcastLayers(e.source);
29124
29152
  i2.addTransceiver(e, r2), d2.time(`publish-${e.trackId}-${e.type}`), yield t2, d2.timeEnd(`publish-${e.trackId}-${e.type}`), this.store.addTrack(e), yield i2.setMaxBitrateAndFramerate(e).then(() => {
29125
- d2.d(I2, `Setting maxBitrate=${e.settings.maxBitrate} kpbs${e instanceof F ? ` and maxFramerate=${e.settings.maxFramerate}` : ""} for ${e.source} ${e.type} ${e.trackId}`);
29126
- }).catch((s2) => d2.w(I2, "Failed setting maxBitrate and maxFramerate", s2)), e.isPublished = true, d2.d(I2, `\u2705 publishTrack: trackId=${e.trackId}`, `${e}`, this.callbacks);
29153
+ d2.d(A2, `Setting maxBitrate=${e.settings.maxBitrate} kpbs${e instanceof F ? ` and maxFramerate=${e.settings.maxFramerate}` : ""} for ${e.source} ${e.type} ${e.trackId}`);
29154
+ }).catch((s2) => d2.w(A2, "Failed setting maxBitrate and maxFramerate", s2)), e.isPublished = true, d2.d(A2, `\u2705 publishTrack: trackId=${e.trackId}`, `${e}`, this.callbacks);
29127
29155
  });
29128
29156
  }
29129
29157
  unpublishTrack(e) {
29130
29158
  return c2(this, null, function* () {
29131
- if (d2.d(I2, `\u23F3 unpublishTrack: trackId=${e.trackId}`, `${e}`), e.publishedTrackId && this.trackStates.has(e.publishedTrackId))
29159
+ if (d2.d(A2, `\u23F3 unpublishTrack: trackId=${e.trackId}`, `${e}`), e.publishedTrackId && this.trackStates.has(e.publishedTrackId))
29132
29160
  this.trackStates.delete(e.publishedTrackId);
29133
29161
  else {
29134
29162
  let s2 = Array.from(this.trackStates.values()).find((o2) => e.type === o2.type && e.source === o2.source);
@@ -29137,7 +29165,7 @@ var Yt = class {
29137
29165
  let t2 = new Promise((r2, s2) => {
29138
29166
  this.callbacks.set(et, { promise: { resolve: r2, reject: s2 }, action: "UNPUBLISH", extra: {} });
29139
29167
  });
29140
- e.stream.removeSender(e), yield t2, yield e.cleanup(), this.store.removeTrack(e), d2.d(I2, `\u2705 unpublishTrack: trackId=${e.trackId}`, this.callbacks);
29168
+ e.stream.removeSender(e), yield t2, yield e.cleanup(), this.store.removeTrack(e), d2.d(A2, `\u2705 unpublishTrack: trackId=${e.trackId}`, this.callbacks);
29141
29169
  });
29142
29170
  }
29143
29171
  waitForLocalRoleAvailability() {
@@ -29160,8 +29188,8 @@ var Yt = class {
29160
29188
  try {
29161
29189
  yield this.negotiateJoin({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 });
29162
29190
  } catch (o2) {
29163
- d2.e(I2, "Join negotiation failed \u274C", o2);
29164
- 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);
29191
+ d2.e(A2, "Join negotiation failed \u274C", o2);
29192
+ let n2 = o2 instanceof f2 ? o2 : S2.WebsocketMethodErrors.ServerErrors(500, "JOIN", `Websocket join error - ${o2.message}`), l2 = parseInt(`${n2.code / 100}`) === 5 || [P4.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, 429].includes(n2.code);
29165
29193
  if (n2.code === 410 && (n2.isTerminal = true), l2) {
29166
29194
  this.joinRetryCount = 0, n2.isTerminal = false;
29167
29195
  let u2 = () => c2(this, null, function* () {
@@ -29180,8 +29208,8 @@ var Yt = class {
29180
29208
  }
29181
29209
  negotiateJoinWebRTC(r2) {
29182
29210
  return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2 }) {
29183
- if (d2.d(I2, "\u23F3 join: Negotiating over PUBLISH connection"), !this.publishConnection)
29184
- return d2.e(I2, "Publish peer connection not found, cannot negotiate"), false;
29211
+ if (d2.d(A2, "\u23F3 join: Negotiating over PUBLISH connection"), !this.publishConnection)
29212
+ return d2.e(A2, "Publish peer connection not found, cannot negotiate"), false;
29185
29213
  let s2 = yield this.publishConnection.createOffer();
29186
29214
  yield this.publishConnection.setLocalDescription(s2);
29187
29215
  let o2 = this.isFlagEnabled("subscribeDegradation"), n2 = this.isFlagEnabled("simulcast"), l2 = this.isFlagEnabled("onDemandTracks"), u2 = yield this.signal.join(e, t2, !i2, o2, n2, l2, s2);
@@ -29193,15 +29221,15 @@ var Yt = class {
29193
29221
  }
29194
29222
  negotiateJoinNonWebRTC(r2) {
29195
29223
  return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2 }) {
29196
- d2.d(I2, "\u23F3 join: Negotiating Non-WebRTC");
29224
+ d2.d(A2, "\u23F3 join: Negotiating Non-WebRTC");
29197
29225
  let s2 = this.isFlagEnabled("subscribeDegradation"), o2 = this.isFlagEnabled("simulcast"), n2 = this.isFlagEnabled("onDemandTracks");
29198
29226
  return !!(yield this.signal.join(e, t2, !i2, s2, o2, n2));
29199
29227
  });
29200
29228
  }
29201
29229
  negotiateOnFirstPublish() {
29202
29230
  return c2(this, null, function* () {
29203
- if (d2.d(I2, "\u23F3 Negotiating offer over PUBLISH connection"), !this.publishConnection)
29204
- return d2.e(I2, "Publish peer connection not found, cannot negotiate"), false;
29231
+ if (d2.d(A2, "\u23F3 Negotiating offer over PUBLISH connection"), !this.publishConnection)
29232
+ return d2.e(A2, "Publish peer connection not found, cannot negotiate"), false;
29205
29233
  let e = yield this.publishConnection.createOffer(this.trackStates);
29206
29234
  yield this.publishConnection.setLocalDescription(e);
29207
29235
  let t2 = yield this.signal.offer(e, this.trackStates);
@@ -29213,21 +29241,21 @@ var Yt = class {
29213
29241
  }
29214
29242
  performPublishRenegotiation(e) {
29215
29243
  return c2(this, null, function* () {
29216
- d2.d(I2, "\u23F3 [role=PUBLISH] onRenegotiationNeeded START", this.trackStates);
29244
+ d2.d(A2, "\u23F3 [role=PUBLISH] onRenegotiationNeeded START", this.trackStates);
29217
29245
  let t2 = this.callbacks.get(et);
29218
29246
  if (t2) {
29219
29247
  if (!this.publishConnection) {
29220
- d2.e(I2, "Publish peer connection not found, cannot renegotiate");
29248
+ d2.e(A2, "Publish peer connection not found, cannot renegotiate");
29221
29249
  return;
29222
29250
  }
29223
29251
  try {
29224
29252
  let i2 = yield this.publishConnection.createOffer(this.trackStates, e);
29225
29253
  yield this.publishConnection.setLocalDescription(i2), d2.time("renegotiation-offer-exchange");
29226
29254
  let r2 = yield this.signal.offer(i2, this.trackStates);
29227
- 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");
29255
+ this.callbacks.delete(et), d2.timeEnd("renegotiation-offer-exchange"), yield this.publishConnection.setRemoteDescription(r2), t2.promise.resolve(true), d2.d(A2, "[role=PUBLISH] onRenegotiationNeeded DONE \u2705");
29228
29256
  } catch (i2) {
29229
29257
  let r2;
29230
- i2 instanceof f2 ? r2 = i2 : r2 = S2.GenericErrors.Unknown("PUBLISH", i2.message), t2.promise.reject(r2), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded FAILED \u274C");
29258
+ i2 instanceof f2 ? r2 = i2 : r2 = S2.GenericErrors.Unknown("PUBLISH", i2.message), t2.promise.reject(r2), d2.d(A2, "[role=PUBLISH] onRenegotiationNeeded FAILED \u274C");
29231
29259
  }
29232
29260
  }
29233
29261
  });
@@ -29240,28 +29268,28 @@ var Yt = class {
29240
29268
  internalConnect(e, t2, i2, r2) {
29241
29269
  return c2(this, null, function* () {
29242
29270
  var o2, n2, l2;
29243
- d2.d(I2, "connect: started \u23F0");
29271
+ d2.d(A2, "connect: started \u23F0");
29244
29272
  let s2 = /* @__PURE__ */ new Date();
29245
29273
  try {
29246
29274
  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);
29247
29275
  let u2 = this.store.getRoom();
29248
- 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;
29276
+ 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(A2, "Adding Analytics Transport: JsonRpcSignal"), this.analyticsEventsService.setTransport(this.analyticsSignalTransport), this.analyticsEventsService.flush(), this.initConfig;
29249
29277
  } catch (u2) {
29250
- throw this.state !== "Reconnecting" && this.eventBus.analytics.publish(y2.connect(u2, this.getAdditionalAnalyticsProperties(), s2, /* @__PURE__ */ new Date(), t2)), d2.e(I2, "\u274C internal connect: failed", u2), u2;
29278
+ throw this.state !== "Reconnecting" && this.eventBus.analytics.publish(y2.connect(u2, this.getAdditionalAnalyticsProperties(), s2, /* @__PURE__ */ new Date(), t2)), d2.e(A2, "\u274C internal connect: failed", u2), u2;
29251
29279
  }
29252
29280
  });
29253
29281
  }
29254
29282
  validateNotDisconnected(e) {
29255
29283
  if (this.state === "Disconnected")
29256
- throw d2.w(I2, "aborting join as transport state is disconnected"), S2.GenericErrors.ValidationFailed(`leave called before join could complete - stage=${e}`);
29284
+ throw d2.w(A2, "aborting join as transport state is disconnected"), S2.GenericErrors.ValidationFailed(`leave called before join could complete - stage=${e}`);
29257
29285
  }
29258
29286
  openSignal(e, t2) {
29259
29287
  return c2(this, null, function* () {
29260
29288
  if (!this.initConfig)
29261
29289
  throw S2.APIErrors.InitConfigNotAvailable("INIT", "Init Config not found");
29262
- d2.d(I2, "\u23F3 internal connect: connecting to ws endpoint", this.initConfig.endpoint);
29290
+ d2.d(A2, "\u23F3 internal connect: connecting to ws endpoint", this.initConfig.endpoint);
29263
29291
  let i2 = new URL(this.initConfig.endpoint);
29264
- i2.searchParams.set("peer", t2), i2.searchParams.set("token", e), i2.searchParams.set("user_agent_v2", this.store.getUserAgent()), i2.searchParams.set("protocol_version", Bs), i2.searchParams.set("protocol_spec", Vs), 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");
29292
+ 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(A2, "\u2705 internal connect: connected to ws endpoint");
29265
29293
  });
29266
29294
  }
29267
29295
  initRtcStatsMonitor() {
@@ -29327,18 +29355,18 @@ var Yt = class {
29327
29355
  }
29328
29356
  getAdditionalAnalyticsProperties() {
29329
29357
  var o2, n2, l2, u2, p2, h2, T, g2;
29330
- let e = Ua(), 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;
29358
+ let e = Ba(), 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;
29331
29359
  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 };
29332
29360
  }
29333
29361
  };
29334
- var Va = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
29335
- var pr = class {
29362
+ var Fa = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
29363
+ var hr = class {
29336
29364
  constructor() {
29337
29365
  this.TAG = "[HMSSdk]:";
29338
29366
  this.transportState = "Disconnected";
29339
29367
  this.analyticsTimer = new di();
29340
- this.sdkState = m({}, Va);
29341
- this.playlistSettings = { video: { bitrate: Lr }, audio: { bitrate: Dr } };
29368
+ this.sdkState = m({}, Fa);
29369
+ this.playlistSettings = { video: { bitrate: Dr }, audio: { bitrate: wr } };
29342
29370
  this.handleAutoplayError = (e) => {
29343
29371
  var t2, i2;
29344
29372
  (i2 = (t2 = this.errorListener) == null ? void 0 : t2.onError) == null || i2.call(t2, e);
@@ -29406,7 +29434,7 @@ var pr = class {
29406
29434
  var s2, o2, n2, l2;
29407
29435
  if (e.error && e.type) {
29408
29436
  let u2 = e.type.includes("audio") ? (s2 = this.localPeer) == null ? void 0 : s2.audioTrack : (o2 = this.localPeer) == null ? void 0 : o2.videoTrack;
29409
- (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));
29437
+ (n2 = this.errorListener) == null || n2.onError(e.error), [P4.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, P4.TracksErrors.DEVICE_IN_USE, P4.TracksErrors.DEVICE_NOT_AVAILABLE].includes(e.error.code) && u2 && (u2.setEnabled(false), (l2 = this.listener) == null || l2.onTrackUpdate(2, u2, this.localPeer));
29410
29438
  }
29411
29439
  })();
29412
29440
  };
@@ -29433,7 +29461,7 @@ var pr = class {
29433
29461
  };
29434
29462
  }
29435
29463
  initNotificationManager() {
29436
- this.notificationManager || (this.notificationManager = new Xi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29464
+ this.notificationManager || (this.notificationManager = new Zi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29437
29465
  }
29438
29466
  initStoreAndManagers(e) {
29439
29467
  var t2, i2;
@@ -29441,7 +29469,7 @@ var pr = class {
29441
29469
  (i2 = this.notificationManager) == null || i2.setListener(this.listener), this.audioSinkManager.setListener(this.listener), this.interactivityCenter.setListener(this.listener);
29442
29470
  return;
29443
29471
  }
29444
- this.sdkState.isInitialised = true, this.store = new Ot(), this.eventBus = new Bt(), this.pluginUsageTracker = new Oi(this.eventBus), this.wakeLockManager = new _i(), this.networkTestManager = new wi(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 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 Yt(this.observer, this.deviceManager, this.store, this.eventBus, this.analyticsEventsService, this.analyticsTimer, this.pluginUsageTracker), e.onInitSuccess && this.transport.setConnectivityListener(e), this.sessionStore = new Zi(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);
29472
+ 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);
29445
29473
  }
29446
29474
  validateJoined(e) {
29447
29475
  if (!this.localPeer)
@@ -29563,7 +29591,7 @@ var pr = class {
29563
29591
  throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
29564
29592
  this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
29565
29593
  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);
29566
- (T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), Ae.resumeContext();
29594
+ (T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), Ie.resumeContext();
29567
29595
  let n2 = this.store.getConfig();
29568
29596
  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}`);
29569
29597
  try {
@@ -29579,7 +29607,7 @@ var pr = class {
29579
29607
  }
29580
29608
  cleanup() {
29581
29609
  var e, t2, i2;
29582
- this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(), z2.cleanup(), this.playlistManager.cleanup(), (e = this.wakeLockManager) == null || e.cleanup(), ve.cleanup(), this.notificationManager = void 0, d2.cleanup(), this.sdkState = m({}, Va), 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);
29610
+ this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(), z2.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);
29583
29611
  }
29584
29612
  leave(e) {
29585
29613
  return this.internalLeave(e);
@@ -29600,7 +29628,7 @@ var pr = class {
29600
29628
  return c2(this, null, function* () {
29601
29629
  let i2 = (t2 || {}).endpoint || "https://auth.100ms.live/v2/token";
29602
29630
  this.analyticsTimer.start("GET_TOKEN");
29603
- 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();
29631
+ 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();
29604
29632
  if (this.analyticsTimer.end("GET_TOKEN"), !r2.ok)
29605
29633
  throw S2.APIErrors.ServerErrors(s2.code, "GET_TOKEN", s2.message, false);
29606
29634
  let { token: o2 } = s2;
@@ -30057,9 +30085,9 @@ var pr = class {
30057
30085
  if (i2 === "videoplaylist") {
30058
30086
  let n2 = {};
30059
30087
  if (e.kind === "audio")
30060
- n2.maxBitrate = ((s2 = this.playlistSettings.audio) == null ? void 0 : s2.bitrate) || Dr;
30088
+ n2.maxBitrate = ((s2 = this.playlistSettings.audio) == null ? void 0 : s2.bitrate) || wr;
30061
30089
  else {
30062
- n2.maxBitrate = ((o2 = this.playlistSettings.video) == null ? void 0 : o2.bitrate) || Lr;
30090
+ n2.maxBitrate = ((o2 = this.playlistSettings.video) == null ? void 0 : o2.bitrate) || Dr;
30063
30091
  let { width: l2, height: u2 } = e.getSettings();
30064
30092
  n2.width = l2, n2.height = u2;
30065
30093
  }
@@ -30100,7 +30128,7 @@ var ut = class a10 {
30100
30128
  constructor(e, t2, i2) {
30101
30129
  this.getStats = () => (this.stats || (this.stats = new Xt(this.store, this.sdk)), this.stats);
30102
30130
  this.getDiagnosticsSDK = () => (this.diagnostics || (this.diagnostics = this.actions.initDiagnostics()), this.diagnostics);
30103
- e ? this.store = e : this.store = a10.createNewHMSStore(Di("HMSStore"), ti), i2 ? this.notifications = i2 : this.notifications = new Pi(this.store), t2 ? this.actions = t2 : (this.sdk = new pr(), this.actions = new Li(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: vr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
30131
+ 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);
30104
30132
  }
30105
30133
  triggerOnSubscribe() {
30106
30134
  this.initialTriggerOnSubscribe || (a10.makeStoreTriggerOnSubscribe(this.store), this.initialTriggerOnSubscribe = true);
@@ -30177,22 +30205,22 @@ var ut = class a10 {
30177
30205
  };
30178
30206
  }
30179
30207
  };
30180
- var Ga = (a11, e, t2) => {
30208
+ var Wa = (a11, e, t2) => {
30181
30209
  let i2;
30182
- t2.getState(re) === "Connected" && (i2 = Fa(a11, e, t2)), t2.subscribe((r2) => {
30183
- ["Connected", "Reconnecting"].includes(r2) ? i2 || (i2 = Fa(a11, e, t2)) : ["Disconnected", "Failed"].includes(r2) && i2 && (Mn(e, r2), i2(), i2 = void 0);
30184
- }, re);
30210
+ t2.getState(ie) === "Connected" && (i2 = Ga(a11, e, t2)), t2.subscribe((r2) => {
30211
+ ["Connected", "Reconnecting"].includes(r2) ? i2 || (i2 = Ga(a11, e, t2)) : ["Disconnected", "Failed"].includes(r2) && i2 && (yn(e, r2), i2(), i2 = void 0);
30212
+ }, ie);
30185
30213
  };
30186
- var Fa = (a11, e, t2) => {
30214
+ var Ga = (a11, e, t2) => {
30187
30215
  var s2, o2;
30188
- let i2 = fn2(t2, e);
30216
+ let i2 = vn2(t2, e);
30189
30217
  (s2 = a11.getWebrtcInternals()) == null || s2.start();
30190
- let r2 = (o2 = a11.getWebrtcInternals()) == null ? void 0 : o2.onStatsChange((n2) => vn2(e, n2, t2, a11));
30218
+ let r2 = (o2 = a11.getWebrtcInternals()) == null ? void 0 : o2.onStatsChange((n2) => Mn(e, n2, t2, a11));
30191
30219
  return () => {
30192
30220
  i2(), r2 && r2();
30193
30221
  };
30194
30222
  };
30195
- var fn2 = (a11, e) => {
30223
+ var vn2 = (a11, e) => {
30196
30224
  let t2, i2, r2;
30197
30225
  return a11.getState(ye) ? e.namedSetState((s2) => {
30198
30226
  s2.localPeer.id = a11.getState(ye);
@@ -30206,17 +30234,17 @@ var fn2 = (a11, e) => {
30206
30234
  s2 && e.namedSetState((o2) => {
30207
30235
  o2.localPeer.videoTrack = s2;
30208
30236
  }, "localpeer-videotrack-id");
30209
- }, X2), a11.getState(oe) ? e.namedSetState((s2) => {
30210
- s2.localPeer.audioTrack = a11.getState(oe);
30237
+ }, X2), a11.getState(ae) ? e.namedSetState((s2) => {
30238
+ s2.localPeer.audioTrack = a11.getState(ae);
30211
30239
  }, "localpeer-audiotrack-id") : r2 = a11.subscribe((s2) => {
30212
30240
  s2 && e.namedSetState((o2) => {
30213
30241
  o2.localPeer.audioTrack = s2;
30214
30242
  }, "localpeer-audiotrack-id");
30215
- }, oe), () => {
30243
+ }, ae), () => {
30216
30244
  t2 == null || t2(), i2 == null || i2(), r2 == null || r2();
30217
30245
  };
30218
30246
  };
30219
- var vn2 = (a11, e, t2, i2) => {
30247
+ var Mn = (a11, e, t2, i2) => {
30220
30248
  let r2 = t2.getState(N2);
30221
30249
  a11.namedSetState((s2) => {
30222
30250
  let o2 = t2.getState(ye), n2 = {}, l2 = Object.keys(r2).filter((p2) => r2[p2].peerId !== o2);
@@ -30224,12 +30252,12 @@ var vn2 = (a11, e, t2, i2) => {
30224
30252
  let h2 = e.getRemoteTrackStats(p2);
30225
30253
  h2 && (n2[p2] = h2);
30226
30254
  }
30227
- $r(s2.remoteTrackStats, n2);
30255
+ Kr(s2.remoteTrackStats, n2);
30228
30256
  let u2 = { [o2]: e.getLocalPeerStats() };
30229
- $r(s2.peerStats, u2), Ra(s2.localTrackStats, e.getLocalTrackStats(), i2.store.getLocalPeerTracks());
30257
+ Kr(s2.peerStats, u2), Aa(s2.localTrackStats, e.getLocalTrackStats(), i2.store.getLocalPeerTracks());
30230
30258
  }, "webrtc-stats");
30231
30259
  };
30232
- var Mn = (a11, e = "resetState") => {
30260
+ var yn = (a11, e = "resetState") => {
30233
30261
  a11.namedSetState((t2) => {
30234
30262
  Object.assign(t2, ii());
30235
30263
  }, e);
@@ -30238,31 +30266,31 @@ var Xt = class {
30238
30266
  constructor(e, t2) {
30239
30267
  this.hmsStore = e;
30240
30268
  this.sdk = t2;
30241
- this.store = ut.createNewHMSStore(Di("HMSStatsStore"), ii), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30269
+ this.store = ut.createNewHMSStore(wi("HMSStatsStore"), ii), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30242
30270
  var r2, s2;
30243
- this.hmsStore.getState(re) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
30271
+ this.hmsStore.getState(ie) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
30244
30272
  var n2, l2;
30245
30273
  o2 === "Connected" && i2((l2 = (n2 = this.sdk) == null ? void 0 : n2.getWebrtcInternals()) == null ? void 0 : l2.getPublishPeerConnection());
30246
- }, re);
30274
+ }, ie);
30247
30275
  }), this.getSubscribePeerConnection = () => new Promise((i2) => {
30248
30276
  var r2, s2;
30249
- this.hmsStore.getState(re) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getSubscribePeerConnection()) : this.hmsStore.subscribe((o2) => {
30277
+ this.hmsStore.getState(ie) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getSubscribePeerConnection()) : this.hmsStore.subscribe((o2) => {
30250
30278
  var n2, l2;
30251
30279
  o2 === "Connected" && i2((l2 = (n2 = this.sdk) == null ? void 0 : n2.getWebrtcInternals()) == null ? void 0 : l2.getSubscribePeerConnection());
30252
- }, re);
30253
- }), this.sdk && Ga(this.sdk, this.store, this.hmsStore);
30254
- }
30255
- };
30256
- var yn = (a11) => a11.localPeer.id;
30257
- var kn = (a11) => a11.localPeer.audioTrack;
30258
- var Pn = (a11) => a11.localPeer.videoTrack;
30259
- var En = (a11, e) => e;
30260
- var Wa = (a11, e) => e;
30261
- var bn = (a11) => a11.remoteTrackStats;
30262
- var $a = (a11) => a11.peerStats;
30263
- var Xr = (a11) => a11.localTrackStats;
30264
- var be = createSelector([$a, yn], (a11, e) => a11[e]);
30265
- var Rn = createSelector(be, (a11) => {
30280
+ }, ie);
30281
+ }), this.sdk && Wa(this.sdk, this.store, this.hmsStore);
30282
+ }
30283
+ };
30284
+ var kn = (a11) => a11.localPeer.id;
30285
+ var Pn = (a11) => a11.localPeer.audioTrack;
30286
+ var En = (a11) => a11.localPeer.videoTrack;
30287
+ var bn = (a11, e) => e;
30288
+ var $a = (a11, e) => e;
30289
+ var Rn = (a11) => a11.remoteTrackStats;
30290
+ var Ka = (a11) => a11.peerStats;
30291
+ var Zr = (a11) => a11.localTrackStats;
30292
+ var be = createSelector([Ka, kn], (a11, e) => a11[e]);
30293
+ var An = createSelector(be, (a11) => {
30266
30294
  var e;
30267
30295
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.packetsLost;
30268
30296
  });
@@ -30270,45 +30298,45 @@ var In = createSelector(be, (a11) => {
30270
30298
  var e;
30271
30299
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.jitter;
30272
30300
  });
30273
- var An = createSelector(be, (a11) => {
30301
+ var Hn = createSelector(be, (a11) => {
30274
30302
  var e;
30275
30303
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.bitrate;
30276
30304
  });
30277
- var Hn = createSelector(be, (a11) => {
30305
+ var Cn = createSelector(be, (a11) => {
30278
30306
  var e;
30279
30307
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.bitrate;
30280
30308
  });
30281
- var Cn = createSelector(be, (a11) => {
30309
+ var Ln = createSelector(be, (a11) => {
30282
30310
  var e;
30283
30311
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.availableOutgoingBitrate;
30284
30312
  });
30285
- var Ln = createSelector(be, (a11) => {
30313
+ var Dn = createSelector(be, (a11) => {
30286
30314
  var e;
30287
30315
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.availableIncomingBitrate;
30288
30316
  });
30289
- var Dn = createSelector(be, (a11) => {
30317
+ var wn = createSelector(be, (a11) => {
30290
30318
  var e;
30291
30319
  return (e = a11 == null ? void 0 : a11.publish) == null ? void 0 : e.bytesSent;
30292
30320
  });
30293
- var wn = createSelector(be, (a11) => {
30321
+ var _n = createSelector(be, (a11) => {
30294
30322
  var e;
30295
30323
  return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.bytesReceived;
30296
30324
  });
30297
- var _n = createSelector([$a, En], (a11, e) => e ? a11[e] : void 0);
30298
- var Nn = createSelector([bn, Wa], (a11, e) => e ? a11[e] : void 0);
30299
- var Zr = createSelector([Xr, Wa], (a11, e) => e ? a11[e] : void 0);
30300
- var On = A2(_n);
30301
- var xn = A2(Nn);
30302
- var Un = createSelector([Xr, kn], (a11, e) => {
30325
+ var Nn = createSelector([Ka, bn], (a11, e) => e ? a11[e] : void 0);
30326
+ var On = createSelector([Rn, $a], (a11, e) => e ? a11[e] : void 0);
30327
+ var es = createSelector([Zr, $a], (a11, e) => e ? a11[e] : void 0);
30328
+ var xn = I2(Nn);
30329
+ var Un = I2(On);
30330
+ var Bn = createSelector([Zr, Pn], (a11, e) => {
30303
30331
  var t2;
30304
30332
  return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
30305
30333
  });
30306
- var Bn = A2(createSelector(Zr, (a11) => a11 == null ? void 0 : a11[0]));
30307
- var Vn = createSelector([Xr, Pn], (a11, e) => {
30334
+ var Vn = I2(createSelector(es, (a11) => a11 == null ? void 0 : a11[0]));
30335
+ var Fn = createSelector([Zr, En], (a11, e) => {
30308
30336
  var t2;
30309
30337
  return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
30310
30338
  });
30311
- var Fn = A2(createSelector(Zr, (a11) => a11));
30339
+ var Gn = I2(createSelector(es, (a11) => a11));
30312
30340
 
30313
30341
  // src/Prebuilt/components/Header/StreamActions.tsx
30314
30342
  import {
@@ -30578,7 +30606,7 @@ var RecordingStatus = () => {
30578
30606
  };
30579
30607
  var RecordingPauseStatus = () => {
30580
30608
  const recording = useHMSStore26(selectRecordingState2);
30581
- if (recording.hls && recording.hls.state === Es.PAUSED) {
30609
+ if (recording.hls && recording.hls.state === bs.PAUSED) {
30582
30610
  return /* @__PURE__ */ React58.createElement(
30583
30611
  Tooltip,
30584
30612
  {
@@ -32042,7 +32070,7 @@ var RoleOptions = ({ roleName, peerList }) => {
32042
32070
 
32043
32071
  // src/Prebuilt/components/hooks/useGroupOnStageActions.tsx
32044
32072
  init_define_process_env();
32045
- import { match as match7, P as P4 } from "ts-pattern";
32073
+ import { match as match7, P as P5 } from "ts-pattern";
32046
32074
  import { selectPermissions as selectPermissions11, useHMSActions as useHMSActions26, useHMSStore as useHMSStore37 } from "@100mslive/react-sdk";
32047
32075
  var useGroupOnStageActions = ({ peers }) => {
32048
32076
  var _a8;
@@ -32059,9 +32087,9 @@ var useGroupOnStageActions = ({ peers }) => {
32059
32087
  const offStageRolePeers = peers.filter(
32060
32088
  (peer) => match7({ on_stage_role, bring_to_stage_label, roleName: peer.roleName }).with(
32061
32089
  {
32062
- on_stage_role: P4.when((role) => !!role),
32063
- bring_to_stage_label: P4.when((label) => !!label),
32064
- roleName: P4.when((role) => !!role && off_stage_roles.includes(role))
32090
+ on_stage_role: P5.when((role) => !!role),
32091
+ bring_to_stage_label: P5.when((label) => !!label),
32092
+ roleName: P5.when((role) => !!role && off_stage_roles.includes(role))
32065
32093
  },
32066
32094
  () => true
32067
32095
  ).otherwise(() => false)
@@ -36132,7 +36160,7 @@ var Chat = () => {
36132
36160
  const listRef = useRef24(null);
36133
36161
  const hmsActions2 = useHMSActions41();
36134
36162
  const vanillaStore = useHMSVanillaStore10();
36135
- const { enabled: isChatEnabled = true } = useHMSStore62(Om("chatState" /* CHAT_STATE */)) || {};
36163
+ const { enabled: isChatEnabled = true } = useHMSStore62(xm("chatState" /* CHAT_STATE */)) || {};
36136
36164
  const isMobile = useMedia19(config.media.md);
36137
36165
  const isMobileHLSStream = useMobileHLSStream();
36138
36166
  const isLandscapeStream = useLandscapeHLSStream();
@@ -36222,7 +36250,7 @@ var NewMessageIndicator = ({
36222
36250
  scrollToBottom,
36223
36251
  listRef
36224
36252
  }) => {
36225
- const unreadCount = useHMSStore62(am);
36253
+ const unreadCount = useHMSStore62(om);
36226
36254
  if (!unreadCount || !listRef.current) {
36227
36255
  return null;
36228
36256
  }
@@ -37341,12 +37369,12 @@ var VBPicker = ({ backgroundMedia = [] }) => {
37341
37369
  const [blurAmount, setBlurAmount] = useState56(VBHandler.getBlurAmount() || 0.5);
37342
37370
  const roomState = useHMSStore70(selectRoomState4);
37343
37371
  const isLargeRoom = useHMSStore70(selectIsLargeRoom3);
37344
- const isEffectsEnabled = useHMSStore70(fm);
37345
- const effectsKey = useHMSStore70(vm);
37372
+ const isEffectsEnabled = useHMSStore70(vm);
37373
+ const effectsKey = useHMSStore70(Mm);
37346
37374
  const isMobile = useMedia23(config.media.md);
37347
37375
  const [loadingEffects, setLoadingEffects] = useSetAppDataByKey(APP_DATA.loadingEffects);
37348
37376
  const isPluginAdded = useHMSStore70(selectIsLocalVideoPluginPresent(((_a8 = VBHandler) == null ? void 0 : _a8.getName()) || ""));
37349
- const background = useHMSStore70(Nm(APP_DATA.background));
37377
+ const background = useHMSStore70(Om(APP_DATA.background));
37350
37378
  const mediaList = backgroundMedia.length ? backgroundMedia.map((media) => media.url || "") : defaultMedia2;
37351
37379
  const inPreview = roomState === HMSRoomState4.Preview;
37352
37380
  const showVideoTile = isVideoOn && isLargeRoom && !inPreview;
@@ -39718,7 +39746,7 @@ var useCloseScreenshareWhiteboard = () => {
39718
39746
  };
39719
39747
 
39720
39748
  // src/Prebuilt/layouts/VideoStreamingSection.tsx
39721
- var HLSView = React155.lazy(() => import("./HLSView-3BTMB5NS.js"));
39749
+ var HLSView = React155.lazy(() => import("./HLSView-RRYP5FV5.js"));
39722
39750
  var VideoStreamingSection = ({
39723
39751
  screenType,
39724
39752
  elements,
@@ -40480,7 +40508,7 @@ import { ExitIcon as ExitIcon3 } from "@100mslive/react-icons";
40480
40508
  init_define_process_env();
40481
40509
  import React162, { useContext as useContext4, useEffect as useEffect59 } from "react";
40482
40510
  import { usePreviousDistinct } from "react-use";
40483
- import { match as match13, P as P5 } from "ts-pattern";
40511
+ import { match as match13, P as P6 } from "ts-pattern";
40484
40512
  import { HMSRoomState as HMSRoomState8, selectRoomState as selectRoomState8, useHMSStore as useHMSStore89 } from "@100mslive/react-sdk";
40485
40513
 
40486
40514
  // src/Prebuilt/components/hooks/useRedirectToLeave.tsx
@@ -40530,7 +40558,7 @@ var useAppStateManager = () => {
40530
40558
  if (!roomLayout) {
40531
40559
  return;
40532
40560
  }
40533
- match13([roomState, prevRoomState]).with([HMSRoomState8.Connected, P5.any], () => setActiveState("meeting" /* MEETING */)).with(
40561
+ match13([roomState, prevRoomState]).with([HMSRoomState8.Connected, P6.any], () => setActiveState("meeting" /* MEETING */)).with(
40534
40562
  [HMSRoomState8.Disconnecting, HMSRoomState8.Connected],
40535
40563
  [HMSRoomState8.Disconnecting, HMSRoomState8.Connecting],
40536
40564
  [HMSRoomState8.Disconnecting, HMSRoomState8.Reconnecting],
@@ -40544,7 +40572,7 @@ var useAppStateManager = () => {
40544
40572
  VBHandler.reset();
40545
40573
  redirectToLeave(1e3);
40546
40574
  }
40547
- ).with([HMSRoomState8.Disconnected, P5.nullish], () => {
40575
+ ).with([HMSRoomState8.Disconnected, P6.nullish], () => {
40548
40576
  setActiveState(isPreviewScreenEnabled ? "preview" /* PREVIEW */ : "meeting" /* MEETING */);
40549
40577
  }).otherwise(() => {
40550
40578
  });
@@ -40600,7 +40628,7 @@ var LeaveScreen = () => {
40600
40628
  init_define_process_env();
40601
40629
  import React164, { useEffect as useEffect60, useState as useState69 } from "react";
40602
40630
  import { useMedia as useMedia40 } from "react-use";
40603
- import { match as match14, P as P6 } from "ts-pattern";
40631
+ import { match as match14, P as P7 } from "ts-pattern";
40604
40632
  import { RefreshIcon } from "@100mslive/react-icons";
40605
40633
  var MwebLandscapePrompt = () => {
40606
40634
  const [showMwebLandscapePrompt, setShowMwebLandscapePrompt] = useState69(false);
@@ -40620,7 +40648,7 @@ var MwebLandscapePrompt = () => {
40620
40648
  const angle = window.screen.orientation.angle;
40621
40649
  const type = window.screen.orientation.type || "";
40622
40650
  setShowMwebLandscapePrompt(
40623
- match14({ angle, isLandscapeHLSStream, isLandscape, type }).with({ isLandscapeHLSStream: true }, () => false).with({ angle: P6.when((angle2) => angle2 && angle2 >= 90) }, ({ type: type2 }) => type2.includes("landscape")).otherwise(() => isLandscape)
40651
+ match14({ angle, isLandscapeHLSStream, isLandscape, type }).with({ isLandscapeHLSStream: true }, () => false).with({ angle: P7.when((angle2) => angle2 && angle2 >= 90) }, ({ type: type2 }) => type2.includes("landscape")).otherwise(() => isLandscape)
40624
40652
  );
40625
40653
  };
40626
40654
  handleRotation();
@@ -42214,14 +42242,17 @@ DeviceSelector2.propTypes = {
42214
42242
  // src/Diagnostics/AudioTest.tsx
42215
42243
  var SelectContainer = ({ children }) => /* @__PURE__ */ React185.createElement(Box, { css: { w: "calc(50% - 0.75rem)", "@lg": { w: "100%" } } }, children);
42216
42244
  var MicTest = () => {
42245
+ var _a8, _b7;
42217
42246
  const devices = useHMSStore99(selectDevices);
42218
42247
  const [isRecording, setIsRecording] = useState78(false);
42219
42248
  const { audioInputDeviceId } = useHMSStore99(selectLocalMediaSettings);
42220
- const [selectedMic, setSelectedMic] = useState78(audioInputDeviceId || "default");
42249
+ const [selectedMic, setSelectedMic] = useState78(audioInputDeviceId || ((_a8 = devices.audioInput[0]) == null ? void 0 : _a8.deviceId));
42221
42250
  const trackID = useHMSStore99(selectLocalAudioTrackID2);
42222
42251
  const audioLevel = useHMSStore99(selectTrackAudioByID2(trackID));
42223
42252
  const { audioOutputDeviceId } = useHMSStore99(selectLocalMediaSettings);
42224
- const { playing, setPlaying, audioRef } = useAudioOutputTest({ deviceId: audioOutputDeviceId || "default" });
42253
+ const { playing, setPlaying, audioRef } = useAudioOutputTest({
42254
+ deviceId: audioOutputDeviceId || ((_b7 = devices.audioOutput[0]) == null ? void 0 : _b7.deviceId)
42255
+ });
42225
42256
  return /* @__PURE__ */ React185.createElement(SelectContainer, null, /* @__PURE__ */ React185.createElement(
42226
42257
  DeviceSelector2,
42227
42258
  {
@@ -42284,6 +42315,7 @@ var MicTest = () => {
42284
42315
  ))));
42285
42316
  };
42286
42317
  var SpeakerTest = () => {
42318
+ var _a8;
42287
42319
  const actions = useHMSActions58();
42288
42320
  const devices = useHMSStore99(selectDevices);
42289
42321
  const { audioOutputDeviceId } = useHMSStore99(selectLocalMediaSettings);
@@ -42295,7 +42327,7 @@ var SpeakerTest = () => {
42295
42327
  {
42296
42328
  title: "Speaker (Output)",
42297
42329
  devices: devices.audioOutput,
42298
- selection: audioOutputDeviceId || "default",
42330
+ selection: audioOutputDeviceId || ((_a8 = devices.audioOutput[0]) == null ? void 0 : _a8.deviceId),
42299
42331
  icon: /* @__PURE__ */ React185.createElement(SpeakerIcon5, null),
42300
42332
  onChange: (deviceId) => {
42301
42333
  actions.setAudioOutputDevice(deviceId);
@@ -42393,6 +42425,11 @@ var browserTypeIconInfo = {
42393
42425
  val: "Safari",
42394
42426
  icon: `${CMS_MEDIA_SERVER}cms/Safari_254e74ed94/Safari_254e74ed94.svg`
42395
42427
  },
42428
+ "mobile safari": {
42429
+ key: "safari",
42430
+ val: "Safari",
42431
+ icon: `${CMS_MEDIA_SERVER}cms/Safari_254e74ed94/Safari_254e74ed94.svg`
42432
+ },
42396
42433
  edge: {
42397
42434
  key: "edge",
42398
42435
  val: "Edge",
@@ -42404,9 +42441,9 @@ var browserTypeIconInfo = {
42404
42441
  icon: `${CMS_MEDIA_SERVER}cms/Opera_0f3bf4eb19/Opera_0f3bf4eb19.svg`
42405
42442
  }
42406
42443
  };
42407
- var CheckDetails = ({ title, value, iconURL }) => /* @__PURE__ */ React186.createElement(Box, { css: { w: "100%", my: "$10", p: "$10", r: "$1", bg: "$surface_default", "@lg": { w: "auto" } } }, /* @__PURE__ */ React186.createElement(Text, { css: { c: "$on_primary_medium", mb: "$6" } }, title), /* @__PURE__ */ React186.createElement(Flex, { align: "center" }, iconURL && /* @__PURE__ */ React186.createElement(Box, { css: { size: "2rem", r: "$round", bg: "$surface_brighter" } }, /* @__PURE__ */ React186.createElement("img", { style: { objectFit: "contain", width: "2rem" }, src: iconURL, alt: value })), /* @__PURE__ */ React186.createElement(Text, { css: { ml: "$4" } }, value)));
42444
+ var CheckDetails = ({ title, value, iconURL }) => /* @__PURE__ */ React186.createElement(Box, { css: { w: "100%", my: "$10", p: "$10", r: "$1", bg: "$surface_default", "@lg": { w: "auto" } } }, /* @__PURE__ */ React186.createElement(Text, { css: { c: "$on_primary_medium", mb: "$6" } }, title), /* @__PURE__ */ React186.createElement(Flex, { align: "center" }, iconURL && /* @__PURE__ */ React186.createElement(Box, { css: { size: "2rem", r: "$round", bg: "$surface_brighter", mr: "$4" } }, /* @__PURE__ */ React186.createElement("img", { style: { objectFit: "contain", width: "2rem" }, src: iconURL, alt: value })), /* @__PURE__ */ React186.createElement(Text, null, value)));
42408
42445
  var BrowserTest = () => {
42409
- var _a8, _b7;
42446
+ var _a8, _b7, _c, _d;
42410
42447
  const [error, setError] = useState79();
42411
42448
  useEffect77(() => {
42412
42449
  try {
@@ -42419,14 +42456,14 @@ var BrowserTest = () => {
42419
42456
  CheckDetails,
42420
42457
  {
42421
42458
  title: "Browser",
42422
- iconURL: parsedUserAgent3.getBrowser().name && browserTypeIconInfo[(_a8 = parsedUserAgent3.getBrowser().name) == null ? void 0 : _a8.toLowerCase()].icon,
42459
+ iconURL: parsedUserAgent3.getBrowser().name && ((_b7 = browserTypeIconInfo[(_a8 = parsedUserAgent3.getBrowser().name) == null ? void 0 : _a8.toLowerCase()]) == null ? void 0 : _b7.icon),
42423
42460
  value: `${parsedUserAgent3.getBrowser().name} ${parsedUserAgent3.getBrowser().version}`
42424
42461
  }
42425
42462
  ), /* @__PURE__ */ React186.createElement(
42426
42463
  CheckDetails,
42427
42464
  {
42428
42465
  title: "Operating system",
42429
- iconURL: parsedUserAgent3.getOS().name && operatingSystemIconInfo[(_b7 = parsedUserAgent3.getOS().name) == null ? void 0 : _b7.toLowerCase()].icon,
42466
+ iconURL: parsedUserAgent3.getOS().name && ((_d = operatingSystemIconInfo[(_c = parsedUserAgent3.getOS().name) == null ? void 0 : _c.toLowerCase()]) == null ? void 0 : _d.icon),
42430
42467
  value: `${parsedUserAgent3.getOS().name} ${parsedUserAgent3.getOS().version}`
42431
42468
  }
42432
42469
  )), /* @__PURE__ */ React186.createElement(TestFooter, { error, ctaText: "Is your device information correct?" }));
@@ -42723,10 +42760,13 @@ var DiagnosticsStepsList = () => {
42723
42760
  const keyIndex = keys.indexOf(key);
42724
42761
  const isStepCompleted = activeStepIndex > keyIndex || activeStep === "connectivity" && connectivityTested;
42725
42762
  let color = "$on_primary_low";
42763
+ if (activeStep === key) {
42764
+ color = "$on_primary_high";
42765
+ }
42726
42766
  if (isStepCompleted) {
42727
42767
  color = "$primary_bright";
42728
42768
  }
42729
- return /* @__PURE__ */ React189.createElement(Flex, { css: { mb: "$10", c: color, gap: "$4", alignItems: "center" } }, isStepCompleted ? /* @__PURE__ */ React189.createElement(CheckCircleIcon7, { width: "1rem", height: "1rem" }) : /* @__PURE__ */ React189.createElement(Text, { css: { c: color, fontSize: "1.75rem" } }, "\u2022"), /* @__PURE__ */ React189.createElement(Text, { css: { c: color } }, DiagnosticsSteps[key]));
42769
+ return /* @__PURE__ */ React189.createElement(Flex, { key, css: { mb: "$10", c: color, gap: "$4", alignItems: "center" } }, isStepCompleted ? /* @__PURE__ */ React189.createElement(CheckCircleIcon7, { width: "1rem", height: "1rem" }) : /* @__PURE__ */ React189.createElement(Text, { css: { c: color, fontSize: "1.75rem" } }, "\u2022"), /* @__PURE__ */ React189.createElement(Text, { css: { c: color } }, DiagnosticsSteps[key]));
42730
42770
  }));
42731
42771
  };
42732
42772
  var Diagnostics = () => {
@@ -42867,4 +42907,4 @@ object-assign/index.js:
42867
42907
  @license MIT
42868
42908
  *)
42869
42909
  */
42870
- //# sourceMappingURL=chunk-MIJLZRDK.js.map
42910
+ //# sourceMappingURL=chunk-DR5OAQOV.js.map