native-fn 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +57 -45
- package/dist/native.cjs +1029 -930
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +1029 -930
- package/dist/native.umd.js +1029 -930
- package/dist/native.umd.min.js +1 -1
- package/dist/src/plugin/fullscreen/cores/index.d.ts +3 -3
- package/dist/src/plugin/notification/types/notification.d.ts +4 -4
- package/dist/src/plugin/open/constants/index.d.ts +12 -0
- package/dist/src/plugin/open/types/open.d.ts +4 -4
- package/dist/src/plugin/pip/cores/index.d.ts +3 -3
- package/dist/src/plugin/platform/cores/index.d.ts +1 -1
- package/dist/src/plugin/platform/types/platform.d.ts +2 -3
- package/dist/src/plugin/vibration/types/vibration.d.ts +1 -0
- package/dist/src/types/native.d.ts +15 -1
- package/package.json +1 -50
- package/dist/plugin/app/index.cjs +0 -1800
- package/dist/plugin/app/index.d.ts +0 -4
- package/dist/plugin/app/index.min.cjs +0 -1
- package/dist/plugin/app/index.min.mjs +0 -1
- package/dist/plugin/app/index.mjs +0 -1798
- package/dist/plugin/app/index.umd.js +0 -1806
- package/dist/plugin/app/index.umd.min.js +0 -1
- package/dist/plugin/app/src/constants/platform.d.ts +0 -67
- package/dist/plugin/app/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/app/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/app/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/app/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/app/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/app/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/app/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/app/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/app/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/app/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/app/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/app/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/app/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/app/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/app/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/app/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/app/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/app/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/app/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/app/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/app/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/plugin/app/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/app/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/app/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/app/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/app/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/plugin/app/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/plugin/app/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/app/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/app/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/app/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/app/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/app/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/app/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/media/constants/media.d.ts +0 -5
- package/dist/plugin/app/src/plugin/media/cores/media.d.ts +0 -3
- package/dist/plugin/app/src/plugin/media/index.d.ts +0 -5
- package/dist/plugin/app/src/plugin/media/types/index.d.ts +0 -13
- package/dist/plugin/app/src/plugin/media/types/media.d.ts +0 -4
- package/dist/plugin/app/src/plugin/media/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/app/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/app/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/app/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/app/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/app/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/app/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/app/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/app/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/app/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/app/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/app/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/app/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/app/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/app/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/app/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/app/src/types/index.d.ts +0 -1
- package/dist/plugin/app/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/app/src/types/native.d.ts +0 -17
- package/dist/plugin/app/src/types/platform.d.ts +0 -16
- package/dist/plugin/app/src/utils/assign.d.ts +0 -1
- package/dist/plugin/app/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/app/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/app/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/app/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/app/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/app/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/app/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/app/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/app/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/app/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/app/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/app/src/utils/request.d.ts +0 -6
- package/dist/plugin/app/src/utils/require.d.ts +0 -1
- package/dist/plugin/appearance/index.cjs +0 -857
- package/dist/plugin/appearance/index.d.ts +0 -4
- package/dist/plugin/appearance/index.min.cjs +0 -1
- package/dist/plugin/appearance/index.min.mjs +0 -1
- package/dist/plugin/appearance/index.mjs +0 -855
- package/dist/plugin/appearance/index.umd.js +0 -863
- package/dist/plugin/appearance/index.umd.min.js +0 -1
- package/dist/plugin/appearance/src/constants/platform.d.ts +0 -67
- package/dist/plugin/appearance/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/appearance/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/appearance/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/appearance/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/appearance/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/appearance/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/appearance/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/appearance/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/appearance/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/appearance/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/appearance/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/appearance/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/appearance/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/appearance/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/appearance/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/appearance/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/appearance/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/appearance/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/appearance/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/appearance/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/appearance/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/appearance/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/appearance/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/appearance/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/appearance/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/appearance/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/appearance/src/types/index.d.ts +0 -1
- package/dist/plugin/appearance/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/appearance/src/types/native.d.ts +0 -17
- package/dist/plugin/appearance/src/types/platform.d.ts +0 -16
- package/dist/plugin/appearance/src/utils/assign.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/appearance/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/appearance/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/appearance/src/utils/request.d.ts +0 -6
- package/dist/plugin/camera/index.cjs +0 -653
- package/dist/plugin/camera/index.d.ts +0 -34
- package/dist/plugin/camera/index.min.cjs +0 -1
- package/dist/plugin/camera/index.min.mjs +0 -1
- package/dist/plugin/camera/index.mjs +0 -651
- package/dist/plugin/camera/index.umd.js +0 -659
- package/dist/plugin/camera/index.umd.min.js +0 -1
- package/dist/plugin/camera/src/constants/platform.d.ts +0 -67
- package/dist/plugin/camera/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/camera/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/camera/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/app/constants/index.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/app/cores/index.d.ts +0 -13
- package/dist/plugin/camera/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/app/index.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/app/types/app.d.ts +0 -54
- package/dist/plugin/camera/src/plugin/app/types/index.d.ts +0 -16
- package/dist/plugin/camera/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/camera/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/camera/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/appearance/index.d.ts +0 -8
- package/dist/plugin/camera/src/plugin/appearance/types/appearance.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/appearance/types/index.d.ts +0 -13
- package/dist/plugin/camera/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/camera/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/camera/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/clipboard/index.d.ts +0 -5
- package/dist/plugin/camera/src/plugin/clipboard/types/clipboard.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/clipboard/types/index.d.ts +0 -11
- package/dist/plugin/camera/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/plugin/camera/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/plugin/camera/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/camera/src/plugin/fullscreen/index.d.ts +0 -5
- package/dist/plugin/camera/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/plugin/camera/src/plugin/fullscreen/types/fullscreen.d.ts +0 -10
- package/dist/plugin/camera/src/plugin/fullscreen/types/index.d.ts +0 -11
- package/dist/plugin/camera/src/plugin/platform/constants/index.d.ts +0 -42
- package/dist/plugin/camera/src/plugin/platform/cores/index.d.ts +0 -28
- package/dist/plugin/camera/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/platform/index.d.ts +0 -12
- package/dist/plugin/camera/src/plugin/platform/types/index.d.ts +0 -11
- package/dist/plugin/camera/src/plugin/platform/types/platform.d.ts +0 -18
- package/dist/plugin/camera/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/camera/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/camera/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/camera/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/theme/index.d.ts +0 -5
- package/dist/plugin/camera/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/camera/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/camera/src/plugin/theme/types/index.d.ts +0 -11
- package/dist/plugin/camera/src/plugin/theme/types/theme.d.ts +0 -4
- package/dist/plugin/camera/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/camera/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/camera/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/camera/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/camera/src/types/index.d.ts +0 -1
- package/dist/plugin/camera/src/types/native.d.ts +0 -27
- package/dist/plugin/camera/src/types/platform.d.ts +0 -16
- package/dist/plugin/camera/src/utils/assign.d.ts +0 -1
- package/dist/plugin/camera/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/camera/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/camera/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/camera/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/camera/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/camera/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/camera/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/camera/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/camera/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/camera/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/camera/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/camera/src/utils/require.d.ts +0 -1
- package/dist/plugin/clipboard/index.cjs +0 -512
- package/dist/plugin/clipboard/index.d.ts +0 -4
- package/dist/plugin/clipboard/index.min.cjs +0 -1
- package/dist/plugin/clipboard/index.min.mjs +0 -1
- package/dist/plugin/clipboard/index.mjs +0 -510
- package/dist/plugin/clipboard/index.umd.js +0 -518
- package/dist/plugin/clipboard/index.umd.min.js +0 -1
- package/dist/plugin/clipboard/src/constants/platform.d.ts +0 -67
- package/dist/plugin/clipboard/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/clipboard/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/clipboard/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/clipboard/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/clipboard/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/clipboard/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/clipboard/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/clipboard/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/clipboard/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/clipboard/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/clipboard/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/clipboard/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/clipboard/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/clipboard/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/clipboard/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/clipboard/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/clipboard/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/clipboard/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/clipboard/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/clipboard/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/clipboard/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/clipboard/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/clipboard/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/clipboard/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/clipboard/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/clipboard/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/clipboard/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/clipboard/src/types/index.d.ts +0 -1
- package/dist/plugin/clipboard/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/clipboard/src/types/native.d.ts +0 -17
- package/dist/plugin/clipboard/src/types/platform.d.ts +0 -16
- package/dist/plugin/clipboard/src/utils/assign.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/clipboard/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/clipboard/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/clipboard/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/clipboard/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/clipboard/src/utils/request.d.ts +0 -6
- package/dist/plugin/clipboard/src/utils/require.d.ts +0 -1
- package/dist/plugin/dimension/index.cjs +0 -110
- package/dist/plugin/dimension/index.d.ts +0 -4
- package/dist/plugin/dimension/index.min.cjs +0 -1
- package/dist/plugin/dimension/index.min.mjs +0 -1
- package/dist/plugin/dimension/index.mjs +0 -108
- package/dist/plugin/dimension/index.umd.js +0 -116
- package/dist/plugin/dimension/index.umd.min.js +0 -1
- package/dist/plugin/dimension/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/dimension/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/dimension/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/dimension/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/dimension/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/dimension/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/dimension/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/dimension/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/dimension/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/dimension/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/dimension/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/dimension/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/dimension/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/dimension/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/dimension/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/dimension/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/dimension/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/dimension/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/dimension/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/dimension/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/dimension/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/dimension/src/types/index.d.ts +0 -1
- package/dist/plugin/dimension/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/dimension/src/types/native.d.ts +0 -17
- package/dist/plugin/dimension/src/utils/assign.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/dimension/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/dimension/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/dimension/src/utils/request.d.ts +0 -6
- package/dist/plugin/fullscreen/index.cjs +0 -1008
- package/dist/plugin/fullscreen/index.d.ts +0 -4
- package/dist/plugin/fullscreen/index.min.cjs +0 -1
- package/dist/plugin/fullscreen/index.min.mjs +0 -1
- package/dist/plugin/fullscreen/index.mjs +0 -1006
- package/dist/plugin/fullscreen/index.umd.js +0 -1014
- package/dist/plugin/fullscreen/index.umd.min.js +0 -1
- package/dist/plugin/fullscreen/src/constants/platform.d.ts +0 -67
- package/dist/plugin/fullscreen/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/fullscreen/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/fullscreen/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/fullscreen/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/fullscreen/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/fullscreen/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/fullscreen/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/fullscreen/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/fullscreen/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/fullscreen/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/fullscreen/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/fullscreen/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/fullscreen/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/fullscreen/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/fullscreen/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/fullscreen/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/fullscreen/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/fullscreen/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/fullscreen/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/fullscreen/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/fullscreen/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/fullscreen/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/fullscreen/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/fullscreen/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/fullscreen/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/fullscreen/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/fullscreen/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/fullscreen/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/fullscreen/src/types/index.d.ts +0 -1
- package/dist/plugin/fullscreen/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/fullscreen/src/types/native.d.ts +0 -17
- package/dist/plugin/fullscreen/src/types/platform.d.ts +0 -16
- package/dist/plugin/fullscreen/src/utils/assign.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/fullscreen/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/fullscreen/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/fullscreen/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/fullscreen/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/fullscreen/src/utils/request.d.ts +0 -6
- package/dist/plugin/fullscreen/src/utils/require.d.ts +0 -1
- package/dist/plugin/media/index.cjs +0 -241
- package/dist/plugin/media/index.d.ts +0 -33
- package/dist/plugin/media/index.min.cjs +0 -1
- package/dist/plugin/media/index.min.mjs +0 -1
- package/dist/plugin/media/index.mjs +0 -239
- package/dist/plugin/media/index.umd.js +0 -247
- package/dist/plugin/media/index.umd.min.js +0 -1
- package/dist/plugin/media/src/constants/platform.d.ts +0 -35
- package/dist/plugin/media/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/media/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/media/src/plugin/app/constants/app.d.ts +0 -13
- package/dist/plugin/media/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/media/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/media/src/plugin/app/index.d.ts +0 -12
- package/dist/plugin/media/src/plugin/app/types/app.d.ts +0 -43
- package/dist/plugin/media/src/plugin/app/types/index.d.ts +0 -16
- package/dist/plugin/media/src/plugin/app/utils/try-open-url.d.ts +0 -1
- package/dist/plugin/media/src/plugin/media/constants/media.d.ts +0 -5
- package/dist/plugin/media/src/plugin/media/cores/media.d.ts +0 -3
- package/dist/plugin/media/src/plugin/media/index.d.ts +0 -5
- package/dist/plugin/media/src/plugin/media/types/index.d.ts +0 -13
- package/dist/plugin/media/src/plugin/media/types/media.d.ts +0 -4
- package/dist/plugin/media/src/plugin/media/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/media/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/media/src/plugin/platform/index.d.ts +0 -5
- package/dist/plugin/media/src/plugin/platform/types/index.d.ts +0 -7
- package/dist/plugin/media/src/plugin/platform/types/platform.d.ts +0 -13
- package/dist/plugin/media/src/plugin/theme/constants/theme.d.ts +0 -16
- package/dist/plugin/media/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/media/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/media/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/media/src/plugin/theme/index.d.ts +0 -17
- package/dist/plugin/media/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/media/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/media/src/plugin/theme/types/index.d.ts +0 -23
- package/dist/plugin/media/src/plugin/theme/types/theme.d.ts +0 -23
- package/dist/plugin/media/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/media/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/media/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/media/src/types/index.d.ts +0 -2
- package/dist/plugin/media/src/types/native.d.ts +0 -27
- package/dist/plugin/media/src/utils/assign.d.ts +0 -1
- package/dist/plugin/media/src/utils/create-custom-error.d.ts +0 -1
- package/dist/plugin/media/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/media/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/media/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/platform/index.cjs +0 -687
- package/dist/plugin/platform/index.d.ts +0 -4
- package/dist/plugin/platform/index.min.cjs +0 -1
- package/dist/plugin/platform/index.min.mjs +0 -1
- package/dist/plugin/platform/index.mjs +0 -685
- package/dist/plugin/platform/index.umd.js +0 -693
- package/dist/plugin/platform/index.umd.min.js +0 -1
- package/dist/plugin/platform/src/constants/platform.d.ts +0 -66
- package/dist/plugin/platform/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/platform/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/platform/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/platform/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/platform/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/app/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/app/utils/try-open-url.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/platform/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/platform/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/platform/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/platform/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/platform/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/platform/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/platform/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/platform/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/platform/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/media/constants/media.d.ts +0 -5
- package/dist/plugin/platform/src/plugin/media/cores/media.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/media/index.d.ts +0 -5
- package/dist/plugin/platform/src/plugin/media/types/index.d.ts +0 -13
- package/dist/plugin/platform/src/plugin/media/types/media.d.ts +0 -4
- package/dist/plugin/platform/src/plugin/media/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/platform/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/platform/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/platform/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/platform/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/platform/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/platform/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/platform/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/platform/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/platform/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/platform/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/platform/src/types/index.d.ts +0 -1
- package/dist/plugin/platform/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/platform/src/types/native.d.ts +0 -17
- package/dist/plugin/platform/src/utils/assign.d.ts +0 -1
- package/dist/plugin/platform/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/platform/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/platform/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/platform/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/platform/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/platform/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/platform/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/platform/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/platform/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/platform/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/platform/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/platform/src/utils/request.d.ts +0 -6
- package/dist/plugin/theme/index.cjs +0 -742
- package/dist/plugin/theme/index.d.ts +0 -4
- package/dist/plugin/theme/index.min.cjs +0 -1
- package/dist/plugin/theme/index.min.mjs +0 -1
- package/dist/plugin/theme/index.mjs +0 -740
- package/dist/plugin/theme/index.umd.js +0 -748
- package/dist/plugin/theme/index.umd.min.js +0 -1
- package/dist/plugin/theme/src/constants/platform.d.ts +0 -67
- package/dist/plugin/theme/src/constants/user-agent.d.ts +0 -1
- package/dist/plugin/theme/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/plugin/theme/src/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/app/constants/index.d.ts +0 -25
- package/dist/plugin/theme/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/app/cores/index.d.ts +0 -14
- package/dist/plugin/theme/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/app/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/app/types/app.d.ts +0 -72
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/app/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/plugin/theme/src/plugin/appearance/constants/index.d.ts +0 -11
- package/dist/plugin/theme/src/plugin/appearance/cores/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/appearance/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/appearance/types/appearance.d.ts +0 -9
- package/dist/plugin/theme/src/plugin/appearance/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/camera/index.d.ts +0 -8
- package/dist/plugin/theme/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/plugin/theme/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/clipboard/cores/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/clipboard/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/plugin/theme/src/plugin/clipboard/types/clipboard.d.ts +0 -6
- package/dist/plugin/theme/src/plugin/clipboard/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/dimension/constants/index.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/dimension/cores/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/dimension/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/plugin/theme/src/plugin/dimension/types/dimensions.d.ts +0 -13
- package/dist/plugin/theme/src/plugin/dimension/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +0 -35
- package/dist/plugin/theme/src/plugin/fullscreen/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/fullscreen/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/media/constants/media.d.ts +0 -5
- package/dist/plugin/theme/src/plugin/media/cores/media.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/media/index.d.ts +0 -5
- package/dist/plugin/theme/src/plugin/media/types/index.d.ts +0 -13
- package/dist/plugin/theme/src/plugin/media/types/media.d.ts +0 -4
- package/dist/plugin/theme/src/plugin/media/utils/try-open-camera.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/platform/constants/index.d.ts +0 -43
- package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +0 -52
- package/dist/plugin/theme/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +0 -34
- package/dist/plugin/theme/src/plugin/theme/constants/index.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/plugin/theme/src/plugin/theme/cores/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/plugin/theme/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +0 -3
- package/dist/plugin/theme/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/plugin/theme/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +0 -6
- package/dist/plugin/theme/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/plugin/theme/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/plugin/theme/src/types/clipboard-utils.d.ts +0 -4
- package/dist/plugin/theme/src/types/event-listener-util.d.ts +0 -11
- package/dist/plugin/theme/src/types/index.d.ts +0 -1
- package/dist/plugin/theme/src/types/listener-entry.d.ts +0 -6
- package/dist/plugin/theme/src/types/native.d.ts +0 -17
- package/dist/plugin/theme/src/types/platform.d.ts +0 -16
- package/dist/plugin/theme/src/utils/assign.d.ts +0 -1
- package/dist/plugin/theme/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/plugin/theme/src/utils/compare-version.d.ts +0 -1
- package/dist/plugin/theme/src/utils/create-custom-error.d.ts +0 -6
- package/dist/plugin/theme/src/utils/create-hidden-element.d.ts +0 -1
- package/dist/plugin/theme/src/utils/dispatch-click-event.d.ts +0 -1
- package/dist/plugin/theme/src/utils/dynamic-import.d.ts +0 -1
- package/dist/plugin/theme/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/plugin/theme/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/plugin/theme/src/utils/get-tag-name.d.ts +0 -1
- package/dist/plugin/theme/src/utils/get-topmost-window.d.ts +0 -1
- package/dist/plugin/theme/src/utils/is-secure-context.d.ts +0 -1
- package/dist/plugin/theme/src/utils/request.d.ts +0 -6
- package/dist/plugin/theme/src/utils/require.d.ts +0 -1
- package/dist/src/constants/platform.d.ts +0 -67
- package/dist/src/constants/user-agent.d.ts +0 -1
- package/dist/src/errors/plugin-not-extended-error.d.ts +0 -2
- package/dist/src/errors/url-open-error.d.ts +0 -2
- package/dist/src/plugin/Display/constants/index.d.ts +0 -4
- package/dist/src/plugin/Display/cores/index.d.ts +0 -3
- package/dist/src/plugin/Display/index.d.ts +0 -3
- package/dist/src/plugin/Display/types/display.d.ts +0 -13
- package/dist/src/plugin/Display/types/index.d.ts +0 -1
- package/dist/src/plugin/app/constants/app.d.ts +0 -12
- package/dist/src/plugin/app/constants/index.d.ts +0 -33
- package/dist/src/plugin/app/cores/app.d.ts +0 -3
- package/dist/src/plugin/app/cores/index.d.ts +0 -21
- package/dist/src/plugin/app/errors/url-open-error.d.ts +0 -2
- package/dist/src/plugin/app/index.d.ts +0 -3
- package/dist/src/plugin/app/types/app.d.ts +0 -132
- package/dist/src/plugin/app/types/index.d.ts +0 -1
- package/dist/src/plugin/app/utils/event-listener-utils.d.ts +0 -3
- package/dist/src/plugin/app/utils/try-open-url.d.ts +0 -16
- package/dist/src/plugin/appearance/types/appearanceInstance.d.ts +0 -9
- package/dist/src/plugin/camera/constants/camera.d.ts +0 -4
- package/dist/src/plugin/camera/constants/inedx.d.ts +0 -4
- package/dist/src/plugin/camera/cores/camera.d.ts +0 -3
- package/dist/src/plugin/camera/cores/index.d.ts +0 -3
- package/dist/src/plugin/camera/index.d.ts +0 -8
- package/dist/src/plugin/camera/types/camera.d.ts +0 -4
- package/dist/src/plugin/camera/types/index.d.ts +0 -13
- package/dist/src/plugin/camera/utils/try-open-camera.d.ts +0 -2
- package/dist/src/plugin/clipboard/constants/clipboard.d.ts +0 -4
- package/dist/src/plugin/clipboard/cores/clipboard.d.ts +0 -3
- package/dist/src/plugin/clipboard/errors/unsupported-color-error.d.ts +0 -2
- package/dist/src/plugin/clipboard/types/appearance.d.ts +0 -13
- package/dist/src/plugin/clipboard/utils/copy.d.ts +0 -1
- package/dist/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +0 -1
- package/dist/src/plugin/dimension/types/dimension.d.ts +0 -11
- package/dist/src/plugin/fullscreen/cores/fullscreen.d.ts +0 -3
- package/dist/src/plugin/fullscreen/types/fullscreen-electron.d.ts +0 -10
- package/dist/src/plugin/geolocation/constants/index.d.ts +0 -2
- package/dist/src/plugin/media/constants/media.d.ts +0 -5
- package/dist/src/plugin/media/cores/media.d.ts +0 -3
- package/dist/src/plugin/media/index.d.ts +0 -5
- package/dist/src/plugin/media/types/index.d.ts +0 -13
- package/dist/src/plugin/media/types/media.d.ts +0 -4
- package/dist/src/plugin/media/utils/try-open-camera.d.ts +0 -2
- package/dist/src/plugin/network/cores/index.d.ts +0 -15
- package/dist/src/plugin/network/index.d.ts +0 -3
- package/dist/src/plugin/network/types/index.d.ts +0 -1
- package/dist/src/plugin/network/types/network.d.ts +0 -4
- package/dist/src/plugin/open/errors/not-supported-error.d.ts +0 -2
- package/dist/src/plugin/platform/cores/platform.d.ts +0 -3
- package/dist/src/plugin/pwa/cores/index.d.ts +0 -3
- package/dist/src/plugin/pwa/index.d.ts +0 -3
- package/dist/src/plugin/pwa/types/index.d.ts +0 -1
- package/dist/src/plugin/pwa/types/pwa.d.ts +0 -8
- package/dist/src/plugin/speech/cores/index.d.ts +0 -53
- package/dist/src/plugin/speech/index.d.ts +0 -3
- package/dist/src/plugin/speech/types/index.d.ts +0 -1
- package/dist/src/plugin/speech/types/speech.d.ts +0 -9
- package/dist/src/plugin/theme/constants/theme.d.ts +0 -14
- package/dist/src/plugin/theme/cores/theme.d.ts +0 -3
- package/dist/src/plugin/theme/errors/easing-error.d.ts +0 -6
- package/dist/src/plugin/theme/errors/unsupported-color-error.d.ts +0 -2
- package/dist/src/plugin/theme/types/color.d.ts +0 -17
- package/dist/src/plugin/theme/types/easing-syntax.d.ts +0 -16
- package/dist/src/plugin/theme/utils/parse-color.d.ts +0 -2
- package/dist/src/plugin/theme/utils/parse-easing-function.d.ts +0 -2
- package/dist/src/types/clipboard-utils.d.ts +0 -4
- package/dist/src/types/event-listener-util.d.ts +0 -11
- package/dist/src/types/platform.d.ts +0 -16
- package/dist/src/utils/clipboard-utils.d.ts +0 -4
- package/dist/src/utils/create-env-observer.d.ts +0 -8
- package/dist/src/utils/dynamic-import.d.ts +0 -1
- package/dist/src/utils/event-listener-utils.d.ts +0 -3
- package/dist/src/utils/fullscreen-utils.d.ts +0 -44
- package/dist/src/utils/get-tag-name.d.ts +0 -1
- package/dist/src/utils/require.d.ts +0 -1
package/dist/native.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var version = "1.1.
|
|
1
|
+
var version = "1.1.2";
|
|
2
2
|
var packageJSON = {
|
|
3
3
|
version: version};
|
|
4
4
|
|
|
@@ -195,383 +195,6 @@ var BROWSER_RESOLVER_MAP = [
|
|
|
195
195
|
[/firefox\/([\w.]+)/i, Browsers.Firefox],
|
|
196
196
|
];
|
|
197
197
|
|
|
198
|
-
var userAgent = USER_AGENT;
|
|
199
|
-
var Platform = {
|
|
200
|
-
get os() {
|
|
201
|
-
return getOS();
|
|
202
|
-
},
|
|
203
|
-
get engine() {
|
|
204
|
-
return getEngine();
|
|
205
|
-
},
|
|
206
|
-
get browser() {
|
|
207
|
-
return getBrowser();
|
|
208
|
-
},
|
|
209
|
-
get userAgent() {
|
|
210
|
-
return userAgent;
|
|
211
|
-
},
|
|
212
|
-
set userAgent(value) {
|
|
213
|
-
userAgent = value;
|
|
214
|
-
},
|
|
215
|
-
get locale() {
|
|
216
|
-
return getLocale();
|
|
217
|
-
},
|
|
218
|
-
get device() {
|
|
219
|
-
return getDevice();
|
|
220
|
-
},
|
|
221
|
-
get gpu() {
|
|
222
|
-
return getGPU();
|
|
223
|
-
},
|
|
224
|
-
get isWebview() {
|
|
225
|
-
return getIsWebview();
|
|
226
|
-
},
|
|
227
|
-
get isNode() {
|
|
228
|
-
return getIsNode();
|
|
229
|
-
},
|
|
230
|
-
get isStandalone() {
|
|
231
|
-
return getIsStandalone();
|
|
232
|
-
},
|
|
233
|
-
Constants: {
|
|
234
|
-
OS: OS,
|
|
235
|
-
Engines: Engines,
|
|
236
|
-
Browsers: Browsers,
|
|
237
|
-
Devices: Devices,
|
|
238
|
-
},
|
|
239
|
-
Errors: {},
|
|
240
|
-
};
|
|
241
|
-
var parsedFromHighEntropyValuesOS = {};
|
|
242
|
-
var parsedFromHighEntropyValuesBrowser = {};
|
|
243
|
-
var parsedFromHighEntropyValuesEngine = {};
|
|
244
|
-
var parsedFromHighEntropyValuesDevice = null;
|
|
245
|
-
var parsedFromNavigatorGPU = {};
|
|
246
|
-
function resolveVersion(string, resolver) {
|
|
247
|
-
if (typeof resolver === 'function')
|
|
248
|
-
return resolver(string);
|
|
249
|
-
if (typeof resolver === 'string')
|
|
250
|
-
return resolver;
|
|
251
|
-
if (typeof string === 'undefined')
|
|
252
|
-
return '';
|
|
253
|
-
return string;
|
|
254
|
-
}
|
|
255
|
-
function normalizeBrand(entry) {
|
|
256
|
-
if (entry === null || typeof entry === 'undefined')
|
|
257
|
-
return { brand: '', version: '' };
|
|
258
|
-
if (typeof entry === 'string')
|
|
259
|
-
return { brand: entry, version: '' };
|
|
260
|
-
return { brand: entry.brand, version: entry.version };
|
|
261
|
-
}
|
|
262
|
-
function normalizeLocale(locale) {
|
|
263
|
-
if (locale === null || typeof locale === 'undefined')
|
|
264
|
-
return locale;
|
|
265
|
-
if (locale.length === 0)
|
|
266
|
-
return null;
|
|
267
|
-
locale = locale.replace(/_/g, '-');
|
|
268
|
-
if (locale === 'C' || locale.toLowerCase() === 'posix')
|
|
269
|
-
return 'en-US';
|
|
270
|
-
if (locale.indexOf('.') !== -1)
|
|
271
|
-
return normalizeLocale(locale.split('.')[0]);
|
|
272
|
-
if (locale.indexOf('@') !== -1)
|
|
273
|
-
return normalizeLocale(locale.split('@')[0]);
|
|
274
|
-
var parts = locale.split('-');
|
|
275
|
-
if (parts.length === 0)
|
|
276
|
-
return null;
|
|
277
|
-
parts[0] = parts[0].toLowerCase();
|
|
278
|
-
if (parts.length > 1 && parts[1].length === 2)
|
|
279
|
-
parts[1] = parts[1].toUpperCase();
|
|
280
|
-
if (parts.length > 2 && parts[1].length === 4)
|
|
281
|
-
parts[1] = parts[1].charAt(0).toUpperCase() + parts[1].slice(1).toLowerCase();
|
|
282
|
-
return parts.join('-');
|
|
283
|
-
}
|
|
284
|
-
function getWebGLRenderer() {
|
|
285
|
-
var canvas = globalThis.document.createElement('canvas');
|
|
286
|
-
if (typeof canvas.getContext !== 'function')
|
|
287
|
-
return '';
|
|
288
|
-
var context = (function () {
|
|
289
|
-
var ctx1 = canvas.getContext('webgl2');
|
|
290
|
-
if (ctx1 !== null)
|
|
291
|
-
return ctx1;
|
|
292
|
-
var ctx2 = canvas.getContext('experimental-webgl');
|
|
293
|
-
if (ctx2 !== null)
|
|
294
|
-
return ctx2;
|
|
295
|
-
var ctx3 = canvas.getContext('webgl');
|
|
296
|
-
if (ctx3 !== null)
|
|
297
|
-
return ctx3;
|
|
298
|
-
return null;
|
|
299
|
-
})();
|
|
300
|
-
if (context === null)
|
|
301
|
-
return '';
|
|
302
|
-
if (typeof context.getExtension !== 'undefined' && typeof context.getParameter !== 'undefined') {
|
|
303
|
-
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
304
|
-
if (extension === null)
|
|
305
|
-
return context.getParameter(context.RENDERER);
|
|
306
|
-
else
|
|
307
|
-
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
return '';
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
function getGPU() {
|
|
314
|
-
return {
|
|
315
|
-
architecture: parsedFromNavigatorGPU.architecture,
|
|
316
|
-
description: parsedFromNavigatorGPU.description,
|
|
317
|
-
device: parsedFromNavigatorGPU.device,
|
|
318
|
-
vendor: parsedFromNavigatorGPU.vendor,
|
|
319
|
-
webglRenderer: getWebGLRenderer(),
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
function getLocale() {
|
|
323
|
-
var locale = {
|
|
324
|
-
language: null,
|
|
325
|
-
languages: [],
|
|
326
|
-
timezone: null,
|
|
327
|
-
offset: 0,
|
|
328
|
-
isRTL: false,
|
|
329
|
-
};
|
|
330
|
-
var isRTL = null;
|
|
331
|
-
function addLanguages(language) {
|
|
332
|
-
for (var i = 0; i < language.length; i++)
|
|
333
|
-
addLanguage(language[i]);
|
|
334
|
-
}
|
|
335
|
-
function addLanguage(language) {
|
|
336
|
-
language = normalizeLocale(language);
|
|
337
|
-
if (typeof language === "string" && locale.languages.indexOf(language) === -1) {
|
|
338
|
-
if (locale.language === null)
|
|
339
|
-
locale.language = language;
|
|
340
|
-
locale.languages.push(language);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
if (typeof Intl !== 'undefined') {
|
|
344
|
-
try {
|
|
345
|
-
addLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
346
|
-
}
|
|
347
|
-
catch (_) {
|
|
348
|
-
}
|
|
349
|
-
try {
|
|
350
|
-
locale.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
351
|
-
}
|
|
352
|
-
catch (_) {
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
if (typeof globalThis.navigator !== 'undefined') {
|
|
356
|
-
if (typeof globalThis.navigator.languages !== 'undefined')
|
|
357
|
-
addLanguages(globalThis.navigator.languages);
|
|
358
|
-
if (typeof globalThis.navigator.language !== 'undefined')
|
|
359
|
-
addLanguage(globalThis.navigator.language);
|
|
360
|
-
if (typeof globalThis.navigator.userLanguage !== 'undefined')
|
|
361
|
-
addLanguage(globalThis.navigator.userLanguage);
|
|
362
|
-
if (typeof globalThis.navigator.browserLanguage !== 'undefined')
|
|
363
|
-
addLanguage(globalThis.navigator.browserLanguage);
|
|
364
|
-
if (typeof globalThis.navigator.systemLanguage !== 'undefined')
|
|
365
|
-
addLanguage(globalThis.navigator.systemLanguage);
|
|
366
|
-
}
|
|
367
|
-
try {
|
|
368
|
-
locale.offset = new Date().getTimezoneOffset() * -1;
|
|
369
|
-
}
|
|
370
|
-
catch (_) {
|
|
371
|
-
}
|
|
372
|
-
if (typeof locale.language === 'string') {
|
|
373
|
-
if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
|
|
374
|
-
try {
|
|
375
|
-
var intlLocale = new Intl.Locale(locale.language);
|
|
376
|
-
if (typeof intlLocale.getTextInfo === 'function')
|
|
377
|
-
isRTL = intlLocale.getTextInfo().direction === 'rtl';
|
|
378
|
-
else if (typeof intlLocale.textInfo !== 'undefined')
|
|
379
|
-
isRTL = intlLocale.textInfo.direction === 'rtl';
|
|
380
|
-
}
|
|
381
|
-
catch (_) {
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
if (typeof isRTL !== 'boolean') {
|
|
385
|
-
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(locale.language);
|
|
386
|
-
if (matched !== null) {
|
|
387
|
-
var language = matched[1].toLowerCase();
|
|
388
|
-
for (var i = 0; i < RTL_LANGUAGES.length; i++) {
|
|
389
|
-
if (RTL_LANGUAGES[i] === language) {
|
|
390
|
-
isRTL = true;
|
|
391
|
-
break;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
if (typeof isRTL === 'boolean')
|
|
398
|
-
locale.isRTL = isRTL;
|
|
399
|
-
return locale;
|
|
400
|
-
}
|
|
401
|
-
function getOS() {
|
|
402
|
-
var result = { name: OS.Unknown, version: '' };
|
|
403
|
-
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
404
|
-
var map = OS_RESOLVER_MAP[i];
|
|
405
|
-
var regexp = map[0];
|
|
406
|
-
var os = map[1];
|
|
407
|
-
var resolver = map[2];
|
|
408
|
-
var matched = Platform.userAgent.match(regexp);
|
|
409
|
-
if (matched !== null) {
|
|
410
|
-
result.name = os;
|
|
411
|
-
result.version = resolveVersion(matched[1], resolver);
|
|
412
|
-
break;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
if (result.name === OS.iOS && compareVersion(result.version, '18.6') === 0) {
|
|
416
|
-
var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
|
|
417
|
-
if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
|
|
418
|
-
result.version = version[1];
|
|
419
|
-
}
|
|
420
|
-
if (Platform.userAgent === USER_AGENT) {
|
|
421
|
-
if (typeof parsedFromHighEntropyValuesOS.name !== 'undefined')
|
|
422
|
-
result.name = parsedFromHighEntropyValuesOS.name;
|
|
423
|
-
if (typeof parsedFromHighEntropyValuesOS.version !== 'undefined')
|
|
424
|
-
result.version = parsedFromHighEntropyValuesOS.version;
|
|
425
|
-
if (result.name === OS.MacOS && typeof globalThis.navigator.standalone !== 'undefined' && globalThis.navigator.maxTouchPoints > 2)
|
|
426
|
-
result.name = OS.iOS;
|
|
427
|
-
}
|
|
428
|
-
return result;
|
|
429
|
-
}
|
|
430
|
-
function getEngine() {
|
|
431
|
-
var result = { name: Engines.Unknown, version: '' };
|
|
432
|
-
for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
|
|
433
|
-
var map = ENGINE_RESOLVER_MAP[i];
|
|
434
|
-
var regexp = map[0];
|
|
435
|
-
var engine = map[1];
|
|
436
|
-
var resolver = map[2];
|
|
437
|
-
var matched = Platform.userAgent.match(regexp);
|
|
438
|
-
if (matched !== null) {
|
|
439
|
-
result.name = engine;
|
|
440
|
-
result.version = resolveVersion(matched[1], resolver);
|
|
441
|
-
break;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
if (Platform.userAgent === USER_AGENT) {
|
|
445
|
-
if (typeof parsedFromHighEntropyValuesEngine.name !== 'undefined')
|
|
446
|
-
result.name = parsedFromHighEntropyValuesEngine.name;
|
|
447
|
-
if (typeof parsedFromHighEntropyValuesEngine.version !== 'undefined')
|
|
448
|
-
result.version = parsedFromHighEntropyValuesEngine.version;
|
|
449
|
-
}
|
|
450
|
-
return result;
|
|
451
|
-
}
|
|
452
|
-
function getBrowser() {
|
|
453
|
-
var result = { name: Browsers.Unknown, version: '' };
|
|
454
|
-
for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
455
|
-
var map = BROWSER_RESOLVER_MAP[i];
|
|
456
|
-
var regexp = map[0];
|
|
457
|
-
var browser = map[1];
|
|
458
|
-
var resolver = map[2];
|
|
459
|
-
var matched = Platform.userAgent.match(regexp);
|
|
460
|
-
if (matched !== null) {
|
|
461
|
-
result.name = browser;
|
|
462
|
-
result.version = resolveVersion(matched[1], resolver);
|
|
463
|
-
break;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
if (Platform.userAgent === USER_AGENT) {
|
|
467
|
-
if (typeof parsedFromHighEntropyValuesBrowser.name !== 'undefined')
|
|
468
|
-
result.name = parsedFromHighEntropyValuesBrowser.name;
|
|
469
|
-
if (typeof parsedFromHighEntropyValuesBrowser.version !== 'undefined')
|
|
470
|
-
result.version = parsedFromHighEntropyValuesBrowser.version;
|
|
471
|
-
}
|
|
472
|
-
return result;
|
|
473
|
-
}
|
|
474
|
-
function getDevice() {
|
|
475
|
-
if (Platform.userAgent === USER_AGENT && parsedFromHighEntropyValuesDevice !== null)
|
|
476
|
-
return parsedFromHighEntropyValuesDevice;
|
|
477
|
-
if (Platform.os.name === OS.iOS || Platform.os.name === OS.Android)
|
|
478
|
-
return Devices.Mobile;
|
|
479
|
-
if (Platform.os.name === OS.Windows || Platform.os.name === OS.MacOS)
|
|
480
|
-
return Devices.Desktop;
|
|
481
|
-
return Devices.Unknown;
|
|
482
|
-
}
|
|
483
|
-
function getIsWebview() {
|
|
484
|
-
return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
|
|
485
|
-
}
|
|
486
|
-
function getIsNode() {
|
|
487
|
-
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
488
|
-
}
|
|
489
|
-
function getIsStandalone() {
|
|
490
|
-
if (Platform.os.name === OS.iOS)
|
|
491
|
-
return typeof globalThis.navigator.standalone !== 'undefined' && globalThis.navigator.standalone;
|
|
492
|
-
if (typeof globalThis.matchMedia === 'undefined')
|
|
493
|
-
return false;
|
|
494
|
-
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
495
|
-
}
|
|
496
|
-
function parseFromHighEntropyValues() {
|
|
497
|
-
if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgentData !== 'undefined' && typeof globalThis.navigator.userAgentData.getHighEntropyValues !== 'undefined') {
|
|
498
|
-
globalThis.navigator.userAgentData.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
499
|
-
.then(function (result) {
|
|
500
|
-
try {
|
|
501
|
-
var brands = result.fullVersionList || result.brands || [];
|
|
502
|
-
var platformVersion = result.platformVersion;
|
|
503
|
-
var platform = result.platform;
|
|
504
|
-
var browserName = Platform.browser.name;
|
|
505
|
-
var prevBrandName = null;
|
|
506
|
-
for (var i = 0; i < brands.length; i++) {
|
|
507
|
-
var brand = normalizeBrand(brands[i]);
|
|
508
|
-
var brandVersion = brand.version;
|
|
509
|
-
var brandName = brand.brand;
|
|
510
|
-
if (/not.a.brand/i.test(brandName))
|
|
511
|
-
continue;
|
|
512
|
-
if (prevBrandName === null || (/Chrom/.test(prevBrandName) && brandName !== 'Chromium') || (prevBrandName === 'Edge' && /WebView2/.test(brandName))) {
|
|
513
|
-
brandName = HIGH_ENTROPY_BRAND_NAME_MAP[brandName] || brandName;
|
|
514
|
-
prevBrandName = browserName;
|
|
515
|
-
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
516
|
-
browserName = brandName;
|
|
517
|
-
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
518
|
-
parsedFromHighEntropyValuesBrowser.name = Browsers.Chrome;
|
|
519
|
-
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
520
|
-
parsedFromHighEntropyValuesBrowser.name = Browsers.Edge;
|
|
521
|
-
else if (browserName === 'Opera Mobi')
|
|
522
|
-
parsedFromHighEntropyValuesBrowser.name = Browsers.Opera;
|
|
523
|
-
parsedFromHighEntropyValuesBrowser.version = brandVersion;
|
|
524
|
-
}
|
|
525
|
-
prevBrandName = brandName;
|
|
526
|
-
}
|
|
527
|
-
if (brandName === 'Chromium')
|
|
528
|
-
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
529
|
-
}
|
|
530
|
-
if (typeof platformVersion === 'string') {
|
|
531
|
-
if (Platform.os.name === OS.Windows) {
|
|
532
|
-
if (parseInt(platformVersion.split('.')[0], 10) >= 13)
|
|
533
|
-
parsedFromHighEntropyValuesOS.version = '11';
|
|
534
|
-
else
|
|
535
|
-
parsedFromHighEntropyValuesOS.version = '10';
|
|
536
|
-
}
|
|
537
|
-
else
|
|
538
|
-
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
539
|
-
}
|
|
540
|
-
if (typeof platform === 'string') {
|
|
541
|
-
if (/android/i.test(platform))
|
|
542
|
-
parsedFromHighEntropyValuesOS.name = OS.Android;
|
|
543
|
-
else if (/ios|iphone|ipad/i.test(platform))
|
|
544
|
-
parsedFromHighEntropyValuesOS.name = OS.iOS;
|
|
545
|
-
else if (/windows|win32/i.test(platform))
|
|
546
|
-
parsedFromHighEntropyValuesOS.name = OS.Windows;
|
|
547
|
-
else if (/macos|macintel/i.test(platform))
|
|
548
|
-
parsedFromHighEntropyValuesOS.name = OS.MacOS;
|
|
549
|
-
}
|
|
550
|
-
if (result.mobile === true)
|
|
551
|
-
parsedFromHighEntropyValuesDevice = Devices.Mobile;
|
|
552
|
-
}
|
|
553
|
-
catch (_) {
|
|
554
|
-
}
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
function parseFromNavigatorGPU() {
|
|
559
|
-
if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.gpu !== 'undefined') {
|
|
560
|
-
globalThis.navigator.gpu.requestAdapter()
|
|
561
|
-
.then(function (adapter) {
|
|
562
|
-
if (adapter !== null) {
|
|
563
|
-
var info = adapter.info;
|
|
564
|
-
parsedFromNavigatorGPU.architecture = info.architecture;
|
|
565
|
-
parsedFromNavigatorGPU.description = info.description;
|
|
566
|
-
parsedFromNavigatorGPU.device = info.device;
|
|
567
|
-
parsedFromNavigatorGPU.vendor = info.vendor;
|
|
568
|
-
}
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
parseFromHighEntropyValues();
|
|
573
|
-
parseFromNavigatorGPU();
|
|
574
|
-
|
|
575
198
|
var IE_WRAPPER_STORE = [];
|
|
576
199
|
var MEDIA_QUERY_LIST_WRAPPER_STORE = [];
|
|
577
200
|
function isEventListenerCallback(callback) {
|
|
@@ -704,78 +327,472 @@ var EventListener = {
|
|
|
704
327
|
}
|
|
705
328
|
}
|
|
706
329
|
}
|
|
707
|
-
if (typeof target.addEventListener === 'function') {
|
|
330
|
+
if (typeof target.addEventListener === 'function') {
|
|
331
|
+
try {
|
|
332
|
+
if (isEventListenerCallback(callback)) {
|
|
333
|
+
return target.addEventListener(type, callback, options);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
catch (_) {
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
if (typeof target.attachEvent === 'function') {
|
|
340
|
+
var existing = findIEWrapper(target, type, callback);
|
|
341
|
+
if (typeof existing === 'function')
|
|
342
|
+
return;
|
|
343
|
+
var wrapper = function (event) {
|
|
344
|
+
if (typeof event === 'undefined')
|
|
345
|
+
event = globalThis.event;
|
|
346
|
+
if (typeof event === 'undefined')
|
|
347
|
+
return;
|
|
348
|
+
try {
|
|
349
|
+
Object.defineProperty(event, 'currentTarget', { value: target, configurable: true });
|
|
350
|
+
}
|
|
351
|
+
catch (_) {
|
|
352
|
+
}
|
|
353
|
+
if (typeof event.preventDefault !== 'function')
|
|
354
|
+
event.preventDefault = preventDefaultPolyfill.bind(event);
|
|
355
|
+
if (typeof event.stopPropagation !== 'function')
|
|
356
|
+
event.stopPropagation = stopPropagationPolyfill.bind(event);
|
|
357
|
+
if (typeof callback === 'function')
|
|
358
|
+
callback.call(target, event);
|
|
359
|
+
else if (callback && typeof callback.handleEvent === 'function')
|
|
360
|
+
callback.handleEvent(event);
|
|
361
|
+
};
|
|
362
|
+
setIEWrapper(target, type, callback, wrapper);
|
|
363
|
+
return target.attachEvent('on' + type, wrapper);
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
remove: function (target, eventListenerOptions) {
|
|
367
|
+
if (typeof eventListenerOptions.type === 'undefined')
|
|
368
|
+
return;
|
|
369
|
+
if (typeof target === 'undefined')
|
|
370
|
+
return;
|
|
371
|
+
var callback = eventListenerOptions.callback;
|
|
372
|
+
var type = withVendor(target, eventListenerOptions.type);
|
|
373
|
+
var options = eventListenerOptions.options;
|
|
374
|
+
if (isMediaQueryListTarget(target)) {
|
|
375
|
+
if (typeof target.removeListener === 'function') {
|
|
376
|
+
try {
|
|
377
|
+
var wrapper = removeMediaQueryListWrapper(target, type, callback);
|
|
378
|
+
if (typeof wrapper === 'function')
|
|
379
|
+
return target.removeListener(wrapper);
|
|
380
|
+
}
|
|
381
|
+
catch (_) {
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
if (typeof target.removeEventListener === 'function') {
|
|
387
|
+
try {
|
|
388
|
+
if (isEventListenerCallback(callback)) {
|
|
389
|
+
return target.removeEventListener(type, callback, options);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
catch (_) {
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
if (typeof target.detachEvent === 'function') {
|
|
396
|
+
var wrapper = removeIEWrapper(target, type, callback);
|
|
397
|
+
if (typeof wrapper === 'function')
|
|
398
|
+
target.detachEvent('on' + type, wrapper);
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
var currentUserAgent = USER_AGENT;
|
|
405
|
+
var parsedCache = null;
|
|
406
|
+
var parsedFromHighEntropyValuesOS = {};
|
|
407
|
+
var parsedFromHighEntropyValuesBrowser = {};
|
|
408
|
+
var parsedFromHighEntropyValuesEngine = {};
|
|
409
|
+
var parsedFromHighEntropyValuesDevice = null;
|
|
410
|
+
var parsedFromNavigatorGPU = {};
|
|
411
|
+
var cachedLocale = null;
|
|
412
|
+
var ready;
|
|
413
|
+
function resolveVersion(string, resolver) {
|
|
414
|
+
if (typeof resolver === 'function')
|
|
415
|
+
return resolver(string);
|
|
416
|
+
if (typeof resolver === 'string')
|
|
417
|
+
return resolver;
|
|
418
|
+
if (typeof string === 'undefined')
|
|
419
|
+
return '';
|
|
420
|
+
return string;
|
|
421
|
+
}
|
|
422
|
+
function normalizeBrand(entry) {
|
|
423
|
+
if (entry === null || typeof entry === 'undefined')
|
|
424
|
+
return { brand: '', version: '' };
|
|
425
|
+
if (typeof entry === 'string')
|
|
426
|
+
return { brand: entry, version: '' };
|
|
427
|
+
return { brand: entry.brand, version: entry.version };
|
|
428
|
+
}
|
|
429
|
+
function normalizeLocale(locale) {
|
|
430
|
+
if (locale === null || typeof locale === 'undefined')
|
|
431
|
+
return locale;
|
|
432
|
+
if (locale.length === 0)
|
|
433
|
+
return null;
|
|
434
|
+
locale = locale.replace(/_/g, '-');
|
|
435
|
+
if (locale === 'C' || locale.toLowerCase() === 'posix')
|
|
436
|
+
return 'en-US';
|
|
437
|
+
if (locale.indexOf('.') !== -1)
|
|
438
|
+
return normalizeLocale(locale.split('.')[0]);
|
|
439
|
+
if (locale.indexOf('@') !== -1)
|
|
440
|
+
return normalizeLocale(locale.split('@')[0]);
|
|
441
|
+
var parts = locale.split('-');
|
|
442
|
+
if (parts.length === 0)
|
|
443
|
+
return null;
|
|
444
|
+
parts[0] = parts[0].toLowerCase();
|
|
445
|
+
if (parts.length > 1 && parts[1].length === 2)
|
|
446
|
+
parts[1] = parts[1].toUpperCase();
|
|
447
|
+
if (parts.length > 2 && parts[1].length === 4) {
|
|
448
|
+
parts[1] = parts[1].charAt(0).toUpperCase() + parts[1].slice(1).toLowerCase();
|
|
449
|
+
}
|
|
450
|
+
return parts.join('-');
|
|
451
|
+
}
|
|
452
|
+
function invalidateCache() {
|
|
453
|
+
parsedCache = null;
|
|
454
|
+
cachedLocale = null;
|
|
455
|
+
parsedFromHighEntropyValuesOS = {};
|
|
456
|
+
parsedFromHighEntropyValuesBrowser = {};
|
|
457
|
+
parsedFromHighEntropyValuesEngine = {};
|
|
458
|
+
parsedFromHighEntropyValuesDevice = null;
|
|
459
|
+
parsedFromNavigatorGPU = {};
|
|
460
|
+
}
|
|
461
|
+
function getParsedCache() {
|
|
462
|
+
if (parsedCache !== null && parsedCache.userAgent === currentUserAgent)
|
|
463
|
+
return parsedCache;
|
|
464
|
+
parsedCache = {
|
|
465
|
+
userAgent: currentUserAgent,
|
|
466
|
+
os: parseOS(),
|
|
467
|
+
browser: parseBrowser(),
|
|
468
|
+
engine: parseEngine(),
|
|
469
|
+
};
|
|
470
|
+
return parsedCache;
|
|
471
|
+
}
|
|
472
|
+
function parseOS() {
|
|
473
|
+
var result = { name: OS.Unknown, version: '' };
|
|
474
|
+
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
475
|
+
var map = OS_RESOLVER_MAP[i];
|
|
476
|
+
var matched = currentUserAgent.match(map[0]);
|
|
477
|
+
if (matched !== null) {
|
|
478
|
+
result.name = map[1];
|
|
479
|
+
result.version = resolveVersion(matched[1], map[2]);
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
if (result.name === OS.iOS && compareVersion(result.version, '18.6') === 0) {
|
|
484
|
+
var version = /\) Version\/([\d.]+)/.exec(currentUserAgent);
|
|
485
|
+
if (version !== null) {
|
|
486
|
+
var major = parseInt(version[1].split('.')[0], 10);
|
|
487
|
+
if (major >= 26)
|
|
488
|
+
result.version = version[1];
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
if (currentUserAgent === USER_AGENT) {
|
|
492
|
+
if (typeof parsedFromHighEntropyValuesOS.name !== 'undefined')
|
|
493
|
+
result.name = parsedFromHighEntropyValuesOS.name;
|
|
494
|
+
if (typeof parsedFromHighEntropyValuesOS.version !== 'undefined')
|
|
495
|
+
result.version = parsedFromHighEntropyValuesOS.version;
|
|
496
|
+
if (result.name === OS.MacOS && typeof globalThis.navigator.standalone !== 'undefined' && globalThis.navigator.maxTouchPoints > 2)
|
|
497
|
+
result.name = OS.iOS;
|
|
498
|
+
}
|
|
499
|
+
return result;
|
|
500
|
+
}
|
|
501
|
+
function parseBrowser() {
|
|
502
|
+
var result = { name: Browsers.Unknown, version: '' };
|
|
503
|
+
for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
504
|
+
var map = BROWSER_RESOLVER_MAP[i];
|
|
505
|
+
var matched = currentUserAgent.match(map[0]);
|
|
506
|
+
if (matched !== null) {
|
|
507
|
+
result.name = map[1];
|
|
508
|
+
result.version = resolveVersion(matched[1], map[2]);
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
if (currentUserAgent === USER_AGENT) {
|
|
513
|
+
if (typeof parsedFromHighEntropyValuesBrowser.name !== 'undefined')
|
|
514
|
+
result.name = parsedFromHighEntropyValuesBrowser.name;
|
|
515
|
+
if (typeof parsedFromHighEntropyValuesBrowser.version !== 'undefined')
|
|
516
|
+
result.version = parsedFromHighEntropyValuesBrowser.version;
|
|
517
|
+
}
|
|
518
|
+
return result;
|
|
519
|
+
}
|
|
520
|
+
function parseEngine() {
|
|
521
|
+
var result = { name: Engines.Unknown, version: '' };
|
|
522
|
+
for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
|
|
523
|
+
var map = ENGINE_RESOLVER_MAP[i];
|
|
524
|
+
var matched = currentUserAgent.match(map[0]);
|
|
525
|
+
if (matched !== null) {
|
|
526
|
+
result.name = map[1];
|
|
527
|
+
result.version = resolveVersion(matched[1], map[2]);
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
if (currentUserAgent === USER_AGENT) {
|
|
532
|
+
if (typeof parsedFromHighEntropyValuesEngine.name !== 'undefined')
|
|
533
|
+
result.name = parsedFromHighEntropyValuesEngine.name;
|
|
534
|
+
if (typeof parsedFromHighEntropyValuesEngine.version !== 'undefined')
|
|
535
|
+
result.version = parsedFromHighEntropyValuesEngine.version;
|
|
536
|
+
}
|
|
537
|
+
return result;
|
|
538
|
+
}
|
|
539
|
+
function getGPU() {
|
|
540
|
+
return {
|
|
541
|
+
architecture: parsedFromNavigatorGPU.architecture,
|
|
542
|
+
description: parsedFromNavigatorGPU.description,
|
|
543
|
+
device: parsedFromNavigatorGPU.device,
|
|
544
|
+
vendor: parsedFromNavigatorGPU.vendor,
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
function getLocale() {
|
|
548
|
+
if (cachedLocale !== null)
|
|
549
|
+
return cachedLocale;
|
|
550
|
+
var locale = {
|
|
551
|
+
language: null,
|
|
552
|
+
languages: [],
|
|
553
|
+
timezone: null,
|
|
554
|
+
offset: 0,
|
|
555
|
+
isRTL: false,
|
|
556
|
+
};
|
|
557
|
+
var isRTL = null;
|
|
558
|
+
function addLanguages(language) {
|
|
559
|
+
for (var i = 0; i < language.length; i++)
|
|
560
|
+
addLanguage(language[i]);
|
|
561
|
+
}
|
|
562
|
+
function addLanguage(language) {
|
|
563
|
+
language = normalizeLocale(language);
|
|
564
|
+
if (typeof language === 'string' && locale.languages.indexOf(language) === -1) {
|
|
565
|
+
if (locale.language === null)
|
|
566
|
+
locale.language = language;
|
|
567
|
+
locale.languages.push(language);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
if (typeof Intl !== 'undefined') {
|
|
571
|
+
try {
|
|
572
|
+
addLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
573
|
+
}
|
|
574
|
+
catch (_) {
|
|
575
|
+
}
|
|
576
|
+
try {
|
|
577
|
+
locale.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
578
|
+
}
|
|
579
|
+
catch (_) {
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
if (typeof globalThis.navigator !== 'undefined') {
|
|
583
|
+
if (typeof globalThis.navigator.languages !== 'undefined')
|
|
584
|
+
addLanguages(globalThis.navigator.languages);
|
|
585
|
+
if (typeof globalThis.navigator.language !== 'undefined')
|
|
586
|
+
addLanguage(globalThis.navigator.language);
|
|
587
|
+
if (typeof globalThis.navigator.userLanguage !== 'undefined')
|
|
588
|
+
addLanguage(globalThis.navigator.userLanguage);
|
|
589
|
+
if (typeof globalThis.navigator.browserLanguage !== 'undefined')
|
|
590
|
+
addLanguage(globalThis.navigator.browserLanguage);
|
|
591
|
+
if (typeof globalThis.navigator.systemLanguage !== 'undefined')
|
|
592
|
+
addLanguage(globalThis.navigator.systemLanguage);
|
|
593
|
+
}
|
|
594
|
+
try {
|
|
595
|
+
locale.offset = new Date().getTimezoneOffset() * -1;
|
|
596
|
+
}
|
|
597
|
+
catch (_) {
|
|
598
|
+
}
|
|
599
|
+
if (typeof locale.language === 'string') {
|
|
600
|
+
if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
|
|
708
601
|
try {
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
602
|
+
var intlLocale = new Intl.Locale(locale.language);
|
|
603
|
+
if (typeof intlLocale.getTextInfo === 'function')
|
|
604
|
+
isRTL = intlLocale.getTextInfo().direction === 'rtl';
|
|
605
|
+
else if (typeof intlLocale.textInfo !== 'undefined')
|
|
606
|
+
isRTL = intlLocale.textInfo.direction === 'rtl';
|
|
712
607
|
}
|
|
713
608
|
catch (_) {
|
|
714
609
|
}
|
|
715
610
|
}
|
|
716
|
-
if (typeof
|
|
717
|
-
var
|
|
718
|
-
if (
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
try {
|
|
726
|
-
Object.defineProperty(event, 'currentTarget', { value: target, configurable: true });
|
|
727
|
-
}
|
|
728
|
-
catch (_) {
|
|
729
|
-
}
|
|
730
|
-
if (typeof event.preventDefault !== 'function')
|
|
731
|
-
event.preventDefault = preventDefaultPolyfill.bind(event);
|
|
732
|
-
if (typeof event.stopPropagation !== 'function')
|
|
733
|
-
event.stopPropagation = stopPropagationPolyfill.bind(event);
|
|
734
|
-
if (typeof callback === 'function')
|
|
735
|
-
callback.call(target, event);
|
|
736
|
-
else if (callback && typeof callback.handleEvent === 'function')
|
|
737
|
-
callback.handleEvent(event);
|
|
738
|
-
};
|
|
739
|
-
setIEWrapper(target, type, callback, wrapper);
|
|
740
|
-
return target.attachEvent('on' + type, wrapper);
|
|
741
|
-
}
|
|
742
|
-
},
|
|
743
|
-
remove: function (target, eventListenerOptions) {
|
|
744
|
-
if (typeof eventListenerOptions.type === 'undefined')
|
|
745
|
-
return;
|
|
746
|
-
if (typeof target === 'undefined')
|
|
747
|
-
return;
|
|
748
|
-
var callback = eventListenerOptions.callback;
|
|
749
|
-
var type = withVendor(target, eventListenerOptions.type);
|
|
750
|
-
var options = eventListenerOptions.options;
|
|
751
|
-
if (isMediaQueryListTarget(target)) {
|
|
752
|
-
if (typeof target.removeListener === 'function') {
|
|
753
|
-
try {
|
|
754
|
-
var wrapper = removeMediaQueryListWrapper(target, type, callback);
|
|
755
|
-
if (typeof wrapper === 'function')
|
|
756
|
-
return target.removeListener(wrapper);
|
|
757
|
-
}
|
|
758
|
-
catch (_) {
|
|
611
|
+
if (typeof isRTL !== 'boolean') {
|
|
612
|
+
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(locale.language);
|
|
613
|
+
if (matched !== null) {
|
|
614
|
+
var language = matched[1].toLowerCase();
|
|
615
|
+
for (var i = 0; i < RTL_LANGUAGES.length; i++) {
|
|
616
|
+
if (RTL_LANGUAGES[i] === language) {
|
|
617
|
+
isRTL = true;
|
|
618
|
+
break;
|
|
619
|
+
}
|
|
759
620
|
}
|
|
760
621
|
}
|
|
761
|
-
return;
|
|
762
622
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
623
|
+
}
|
|
624
|
+
if (typeof isRTL === 'boolean')
|
|
625
|
+
locale.isRTL = isRTL;
|
|
626
|
+
cachedLocale = locale;
|
|
627
|
+
return cachedLocale;
|
|
628
|
+
}
|
|
629
|
+
function getDevice() {
|
|
630
|
+
if (currentUserAgent === USER_AGENT && parsedFromHighEntropyValuesDevice !== null)
|
|
631
|
+
return parsedFromHighEntropyValuesDevice;
|
|
632
|
+
var osName = getParsedCache().os.name;
|
|
633
|
+
if (osName === OS.iOS || osName === OS.Android)
|
|
634
|
+
return Devices.Mobile;
|
|
635
|
+
if (osName === OS.Windows || osName === OS.MacOS)
|
|
636
|
+
return Devices.Desktop;
|
|
637
|
+
return Devices.Unknown;
|
|
638
|
+
}
|
|
639
|
+
function getIsWebview() {
|
|
640
|
+
return /; ?wv|applewebkit(?!.*safari)/i.test(currentUserAgent);
|
|
641
|
+
}
|
|
642
|
+
function getIsNode() {
|
|
643
|
+
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
644
|
+
}
|
|
645
|
+
function getIsStandalone() {
|
|
646
|
+
var osName = getParsedCache().os.name;
|
|
647
|
+
if (osName === OS.iOS)
|
|
648
|
+
return globalThis.navigator.standalone === true;
|
|
649
|
+
if (typeof globalThis.matchMedia === 'undefined')
|
|
650
|
+
return false;
|
|
651
|
+
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
652
|
+
}
|
|
653
|
+
function parseFromHighEntropyValues() {
|
|
654
|
+
if (typeof globalThis.navigator === 'undefined' || typeof globalThis.navigator.userAgentData === 'undefined' || typeof globalThis.navigator.userAgentData.getHighEntropyValues === 'undefined')
|
|
655
|
+
return Promise.resolve();
|
|
656
|
+
return globalThis.navigator.userAgentData
|
|
657
|
+
.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
658
|
+
.then(function (result) {
|
|
659
|
+
try {
|
|
660
|
+
var brands = result.fullVersionList || result.brands || [];
|
|
661
|
+
var platformVersion = result.platformVersion;
|
|
662
|
+
var platform = result.platform;
|
|
663
|
+
var browserName = getParsedCache().browser.name;
|
|
664
|
+
var prevBrandName = null;
|
|
665
|
+
for (var i = 0; i < brands.length; i++) {
|
|
666
|
+
var brand = normalizeBrand(brands[i]);
|
|
667
|
+
var brandVersion = brand.version;
|
|
668
|
+
var brandName = brand.brand;
|
|
669
|
+
if (/not.a.brand/i.test(brandName))
|
|
670
|
+
continue;
|
|
671
|
+
if (prevBrandName === null || (/Chrom/.test(prevBrandName) && brandName !== 'Chromium') || (prevBrandName === 'Edge' && /WebView2/.test(brandName))) {
|
|
672
|
+
brandName = HIGH_ENTROPY_BRAND_NAME_MAP[brandName] || brandName;
|
|
673
|
+
prevBrandName = browserName;
|
|
674
|
+
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
675
|
+
browserName = brandName;
|
|
676
|
+
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
677
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Chrome;
|
|
678
|
+
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
679
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Edge;
|
|
680
|
+
else if (browserName === 'Opera Mobi')
|
|
681
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Opera;
|
|
682
|
+
parsedFromHighEntropyValuesBrowser.version = brandVersion;
|
|
683
|
+
}
|
|
684
|
+
prevBrandName = brandName;
|
|
767
685
|
}
|
|
686
|
+
if (brandName === 'Chromium')
|
|
687
|
+
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
768
688
|
}
|
|
769
|
-
|
|
689
|
+
if (typeof platformVersion === 'string') {
|
|
690
|
+
if (getParsedCache().os.name === OS.Windows)
|
|
691
|
+
parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
|
|
692
|
+
else
|
|
693
|
+
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
694
|
+
}
|
|
695
|
+
if (typeof platform === 'string') {
|
|
696
|
+
if (/android/i.test(platform))
|
|
697
|
+
parsedFromHighEntropyValuesOS.name = OS.Android;
|
|
698
|
+
else if (/ios|iphone|ipad/i.test(platform))
|
|
699
|
+
parsedFromHighEntropyValuesOS.name = OS.iOS;
|
|
700
|
+
else if (/windows|win32/i.test(platform))
|
|
701
|
+
parsedFromHighEntropyValuesOS.name = OS.Windows;
|
|
702
|
+
else if (/macos|macintel/i.test(platform))
|
|
703
|
+
parsedFromHighEntropyValuesOS.name = OS.MacOS;
|
|
770
704
|
}
|
|
705
|
+
if (result.mobile === true)
|
|
706
|
+
parsedFromHighEntropyValuesDevice = Devices.Mobile;
|
|
707
|
+
parsedCache = null;
|
|
771
708
|
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
709
|
+
catch (_) {
|
|
710
|
+
}
|
|
711
|
+
})
|
|
712
|
+
.catch(function () {
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
function parseFromNavigatorGPU() {
|
|
716
|
+
if (typeof globalThis.navigator === 'undefined' || typeof globalThis.navigator.gpu === 'undefined')
|
|
717
|
+
return Promise.resolve();
|
|
718
|
+
return globalThis.navigator.gpu
|
|
719
|
+
.requestAdapter()
|
|
720
|
+
.then(function (adapter) {
|
|
721
|
+
if (adapter !== null) {
|
|
722
|
+
var info = adapter.info;
|
|
723
|
+
parsedFromNavigatorGPU.architecture = info.architecture;
|
|
724
|
+
parsedFromNavigatorGPU.description = info.description;
|
|
725
|
+
parsedFromNavigatorGPU.device = info.device;
|
|
726
|
+
parsedFromNavigatorGPU.vendor = info.vendor;
|
|
727
|
+
}
|
|
728
|
+
})
|
|
729
|
+
.catch(function () {
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
ready = Promise.all([
|
|
733
|
+
parseFromHighEntropyValues(),
|
|
734
|
+
parseFromNavigatorGPU(),
|
|
735
|
+
]).then(function () {
|
|
736
|
+
});
|
|
737
|
+
EventListener.add(globalThis, {
|
|
738
|
+
type: 'languagechange', callback: function () {
|
|
739
|
+
cachedLocale = null;
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
var Platform = {
|
|
743
|
+
get ready() {
|
|
744
|
+
return ready;
|
|
745
|
+
},
|
|
746
|
+
get os() {
|
|
747
|
+
return getParsedCache().os;
|
|
748
|
+
},
|
|
749
|
+
get engine() {
|
|
750
|
+
return getParsedCache().engine;
|
|
751
|
+
},
|
|
752
|
+
get browser() {
|
|
753
|
+
return getParsedCache().browser;
|
|
754
|
+
},
|
|
755
|
+
get userAgent() {
|
|
756
|
+
return currentUserAgent;
|
|
757
|
+
},
|
|
758
|
+
set userAgent(value) {
|
|
759
|
+
if (currentUserAgent === value)
|
|
776
760
|
return;
|
|
761
|
+
currentUserAgent = value;
|
|
762
|
+
invalidateCache();
|
|
763
|
+
if (value === USER_AGENT) {
|
|
764
|
+
ready = Promise.all([
|
|
765
|
+
parseFromHighEntropyValues(),
|
|
766
|
+
parseFromNavigatorGPU(),
|
|
767
|
+
]).then(function () {
|
|
768
|
+
});
|
|
777
769
|
}
|
|
778
770
|
},
|
|
771
|
+
get locale() {
|
|
772
|
+
return getLocale();
|
|
773
|
+
},
|
|
774
|
+
get device() {
|
|
775
|
+
return getDevice();
|
|
776
|
+
},
|
|
777
|
+
get gpu() {
|
|
778
|
+
return getGPU();
|
|
779
|
+
},
|
|
780
|
+
get isWebview() {
|
|
781
|
+
return getIsWebview();
|
|
782
|
+
},
|
|
783
|
+
get isNode() {
|
|
784
|
+
return getIsNode();
|
|
785
|
+
},
|
|
786
|
+
get isStandalone() {
|
|
787
|
+
return getIsStandalone();
|
|
788
|
+
},
|
|
789
|
+
Constants: {
|
|
790
|
+
OS: OS,
|
|
791
|
+
Engines: Engines,
|
|
792
|
+
Browsers: Browsers,
|
|
793
|
+
Devices: Devices,
|
|
794
|
+
},
|
|
795
|
+
Errors: {},
|
|
779
796
|
};
|
|
780
797
|
|
|
781
798
|
function createSubscriptionManager(attach, detach) {
|
|
@@ -836,14 +853,14 @@ function createSubscriptionManager(attach, detach) {
|
|
|
836
853
|
};
|
|
837
854
|
}
|
|
838
855
|
|
|
839
|
-
var onChangeSubscriptionManager$
|
|
856
|
+
var onChangeSubscriptionManager$3 = createSubscriptionManager(attachOnChange$3, detachOnChange$3);
|
|
840
857
|
var appearanceRef = null;
|
|
841
858
|
var pollingIntervalId = null;
|
|
842
859
|
var Appearance = {
|
|
843
860
|
get value() {
|
|
844
861
|
return getAppearance();
|
|
845
862
|
},
|
|
846
|
-
onChange: onChangeSubscriptionManager$
|
|
863
|
+
onChange: onChangeSubscriptionManager$3.subscribe,
|
|
847
864
|
Constants: {
|
|
848
865
|
Appearances: Appearances
|
|
849
866
|
},
|
|
@@ -879,7 +896,7 @@ function startPolling() {
|
|
|
879
896
|
var appearance = getAppearanceFromEngine();
|
|
880
897
|
if (appearance !== appearanceRef) {
|
|
881
898
|
appearanceRef = appearance;
|
|
882
|
-
onChangeSubscriptionManager$
|
|
899
|
+
onChangeSubscriptionManager$3.emit(appearance);
|
|
883
900
|
}
|
|
884
901
|
}, 2000);
|
|
885
902
|
}
|
|
@@ -890,13 +907,13 @@ function stopPolling() {
|
|
|
890
907
|
pollingIntervalId = null;
|
|
891
908
|
}
|
|
892
909
|
}
|
|
893
|
-
function attachOnChange$
|
|
910
|
+
function attachOnChange$3() {
|
|
894
911
|
appearanceRef = getAppearanceFromMediaQuery();
|
|
895
912
|
EventListener.add(MEDIA_QUERY_LIST$1, { type: 'change', callback: onMediaChange });
|
|
896
913
|
if (Platform.browser.name === Browsers.SamsungInternet)
|
|
897
914
|
startPolling();
|
|
898
915
|
}
|
|
899
|
-
function detachOnChange$
|
|
916
|
+
function detachOnChange$3() {
|
|
900
917
|
appearanceRef = null;
|
|
901
918
|
EventListener.remove(MEDIA_QUERY_LIST$1, { type: 'change', callback: onMediaChange });
|
|
902
919
|
if (Platform.browser.name === Browsers.SamsungInternet)
|
|
@@ -909,7 +926,7 @@ function onMediaChange(event) {
|
|
|
909
926
|
else
|
|
910
927
|
appearance = Appearances.Light;
|
|
911
928
|
if (appearance !== appearanceRef)
|
|
912
|
-
onChangeSubscriptionManager$
|
|
929
|
+
onChangeSubscriptionManager$3.emit(appearanceRef = appearance);
|
|
913
930
|
}
|
|
914
931
|
|
|
915
932
|
function isSecureContext() {
|
|
@@ -1645,14 +1662,14 @@ var safeAreaMaxInsetObserver = createEnvObserver('safe-area-max-inset');
|
|
|
1645
1662
|
var keyboardInsetObserver = createEnvObserver('keyboard-inset');
|
|
1646
1663
|
var titlebarAreaObserver = createEnvObserver('titlebar-area');
|
|
1647
1664
|
var viewportSegmentObserver = createEnvObserver('viewport-segment');
|
|
1648
|
-
var onChangeSubscriptionManager$
|
|
1665
|
+
var onChangeSubscriptionManager$2 = createSubscriptionManager(attachOnChange$2, detachOnChange$2);
|
|
1649
1666
|
var dimensionRef = null;
|
|
1650
1667
|
var Dimension = {
|
|
1651
1668
|
get value() {
|
|
1652
1669
|
return getDimension();
|
|
1653
1670
|
},
|
|
1654
1671
|
environment: getEnvironment(),
|
|
1655
|
-
onChange: onChangeSubscriptionManager$
|
|
1672
|
+
onChange: onChangeSubscriptionManager$2.subscribe,
|
|
1656
1673
|
Constants: {
|
|
1657
1674
|
Orientation: Orientation,
|
|
1658
1675
|
},
|
|
@@ -1738,7 +1755,7 @@ function getDimension() {
|
|
|
1738
1755
|
}
|
|
1739
1756
|
return FALLBACK_DIMENSION;
|
|
1740
1757
|
}
|
|
1741
|
-
function attachOnChange$
|
|
1758
|
+
function attachOnChange$2() {
|
|
1742
1759
|
dimensionRef = getDimension();
|
|
1743
1760
|
EventListener.add(globalThis, { type: 'resize', callback: onResize });
|
|
1744
1761
|
if (typeof globalThis.screen.orientation.addEventListener === 'function')
|
|
@@ -1748,7 +1765,7 @@ function attachOnChange$4() {
|
|
|
1748
1765
|
else if (MEDIA_QUERY_LIST.media !== 'not all')
|
|
1749
1766
|
EventListener.add(MEDIA_QUERY_LIST, { type: 'change', callback: onResize });
|
|
1750
1767
|
}
|
|
1751
|
-
function detachOnChange$
|
|
1768
|
+
function detachOnChange$2() {
|
|
1752
1769
|
dimensionRef = null;
|
|
1753
1770
|
EventListener.remove(globalThis, { type: 'resize', callback: onResize });
|
|
1754
1771
|
if (typeof globalThis.screen.orientation.removeEventListener === 'function')
|
|
@@ -1761,7 +1778,7 @@ function detachOnChange$4() {
|
|
|
1761
1778
|
function onResize() {
|
|
1762
1779
|
var dimension = getDimension();
|
|
1763
1780
|
if (dimensionRef === null || dimension.innerWidth !== dimensionRef.innerWidth || dimension.innerHeight !== dimensionRef.innerHeight || dimension.outerWidth !== dimensionRef.outerWidth || dimension.outerHeight !== dimensionRef.outerHeight || dimension.scale !== dimensionRef.scale || dimension.orientation !== dimensionRef.orientation)
|
|
1764
|
-
onChangeSubscriptionManager$
|
|
1781
|
+
onChangeSubscriptionManager$2.emit(dimensionRef = dimension);
|
|
1765
1782
|
}
|
|
1766
1783
|
|
|
1767
1784
|
function createCustomError(name, Base) {
|
|
@@ -1848,13 +1865,7 @@ function createCustomError(name, Base) {
|
|
|
1848
1865
|
|
|
1849
1866
|
var NotSupportedError = createCustomError('NotSupportedError');
|
|
1850
1867
|
|
|
1851
|
-
var
|
|
1852
|
-
var eventsBridged$1 = false;
|
|
1853
|
-
var activeOperation$1 = null;
|
|
1854
|
-
var pendingOperation$1 = null;
|
|
1855
|
-
var pendingTarget$1 = undefined;
|
|
1856
|
-
var pendingOptions = undefined;
|
|
1857
|
-
var expectedIsFullscreen = false;
|
|
1868
|
+
var FS_BRIDGED_KEY = Symbol('fsBridged');
|
|
1858
1869
|
var API_VARIANTS = {
|
|
1859
1870
|
standard: {
|
|
1860
1871
|
enabled: 'fullscreenEnabled',
|
|
@@ -1886,28 +1897,6 @@ var API_VARIANTS = {
|
|
|
1886
1897
|
},
|
|
1887
1898
|
};
|
|
1888
1899
|
var api = detectApi();
|
|
1889
|
-
var onChangeSubscriptionManager$3 = createSubscriptionManager(attachOnChange$3, detachOnChange$3);
|
|
1890
|
-
var onErrorSubscriptionManager$1 = createSubscriptionManager(attachOnError$1, detachOnError$1);
|
|
1891
|
-
var Fullscreen = {
|
|
1892
|
-
get supported() {
|
|
1893
|
-
return getEnabled$1();
|
|
1894
|
-
},
|
|
1895
|
-
get element() {
|
|
1896
|
-
return getElement$1();
|
|
1897
|
-
},
|
|
1898
|
-
get isFullscreen() {
|
|
1899
|
-
return getIsFullscreen();
|
|
1900
|
-
},
|
|
1901
|
-
request: request$3,
|
|
1902
|
-
exit: exit$1,
|
|
1903
|
-
toggle: toggle$1,
|
|
1904
|
-
onChange: onChangeSubscriptionManager$3.subscribe,
|
|
1905
|
-
onError: onErrorSubscriptionManager$1.subscribe,
|
|
1906
|
-
Constants: {},
|
|
1907
|
-
Errors: {
|
|
1908
|
-
NotSupportedError: NotSupportedError,
|
|
1909
|
-
},
|
|
1910
|
-
};
|
|
1911
1900
|
function detectApi() {
|
|
1912
1901
|
var element = globalThis.document.documentElement;
|
|
1913
1902
|
if (typeof globalThis.document.fullscreenEnabled !== 'undefined' || typeof globalThis.document.exitFullscreen !== 'undefined')
|
|
@@ -1924,232 +1913,287 @@ function detectApi() {
|
|
|
1924
1913
|
}
|
|
1925
1914
|
return null;
|
|
1926
1915
|
}
|
|
1927
|
-
function
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1916
|
+
function createFullscreen() {
|
|
1917
|
+
var lastIOSVideo = null;
|
|
1918
|
+
var eventsBridged = false;
|
|
1919
|
+
var activeOperation = null;
|
|
1920
|
+
var pendingQueue = [];
|
|
1921
|
+
var lastIntendedOperation = 'exit';
|
|
1922
|
+
var onChangeSubscriptionManager = createSubscriptionManager(attachOnChange, detachOnChange);
|
|
1923
|
+
var onErrorSubscriptionManager = createSubscriptionManager(attachOnError, detachOnError);
|
|
1924
|
+
function getDefaultTarget() {
|
|
1925
|
+
if (Platform.os.name === OS.iOS) {
|
|
1926
|
+
var video = globalThis.document.querySelector('video');
|
|
1927
|
+
if (video === null)
|
|
1928
|
+
return undefined;
|
|
1929
|
+
return video;
|
|
1930
|
+
}
|
|
1931
|
+
return globalThis.document.documentElement;
|
|
1933
1932
|
}
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1933
|
+
function bridgeEvents() {
|
|
1934
|
+
if (eventsBridged)
|
|
1935
|
+
return;
|
|
1936
|
+
eventsBridged = true;
|
|
1937
|
+
if (Platform.os.name === OS.iOS) {
|
|
1938
|
+
bridgeIOSVideoEvents();
|
|
1939
|
+
if (typeof globalThis.MutationObserver !== 'undefined') {
|
|
1940
|
+
var observer = new MutationObserver(function () {
|
|
1941
|
+
bridgeIOSVideoEvents();
|
|
1942
|
+
});
|
|
1943
|
+
observer.observe(globalThis.document.documentElement, {
|
|
1944
|
+
childList: true,
|
|
1945
|
+
subtree: true,
|
|
1946
|
+
});
|
|
1947
|
+
}
|
|
1947
1948
|
}
|
|
1948
1949
|
}
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
if (typeof globalThis.document === 'undefined')
|
|
1952
|
-
return;
|
|
1953
|
-
var videos = globalThis.document.querySelectorAll('video');
|
|
1954
|
-
videos.forEach(function (video) {
|
|
1955
|
-
if (video.__fsBridged__ || !(typeof video.webkitEnterFullscreen !== 'undefined' || typeof video.onwebkitbeginfullscreen !== 'undefined'))
|
|
1950
|
+
function bridgeIOSVideoEvents() {
|
|
1951
|
+
if (typeof globalThis.document === 'undefined')
|
|
1956
1952
|
return;
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
}
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1953
|
+
var videos = globalThis.document.querySelectorAll('video');
|
|
1954
|
+
videos.forEach(function (video) {
|
|
1955
|
+
if (video[FS_BRIDGED_KEY] === true || !(typeof video.webkitEnterFullscreen !== 'undefined' || typeof video.onwebkitbeginfullscreen !== 'undefined'))
|
|
1956
|
+
return;
|
|
1957
|
+
EventListener.add(video, {
|
|
1958
|
+
type: 'webkitbeginfullscreen',
|
|
1959
|
+
callback: onChangeSubscriptionManager.emit,
|
|
1960
|
+
options: false,
|
|
1961
|
+
});
|
|
1962
|
+
EventListener.add(video, {
|
|
1963
|
+
type: 'webkitendfullscreen',
|
|
1964
|
+
callback: onChangeSubscriptionManager.emit,
|
|
1965
|
+
options: false,
|
|
1966
|
+
});
|
|
1967
|
+
video[FS_BRIDGED_KEY] = true;
|
|
1968
|
+
});
|
|
1969
|
+
}
|
|
1970
|
+
function attachOnChange() {
|
|
1971
|
+
var events = ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'];
|
|
1972
|
+
for (var i = 0; i < events.length; i++) {
|
|
1973
|
+
EventListener.add(globalThis.document, {
|
|
1974
|
+
type: events[i],
|
|
1975
|
+
callback: onChangeSubscriptionManager.emit,
|
|
1976
|
+
options: false,
|
|
1977
|
+
});
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
function detachOnChange() {
|
|
1981
|
+
var events = ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'];
|
|
1982
|
+
for (var i = 0; i < events.length; i++) {
|
|
1983
|
+
EventListener.remove(globalThis.document, {
|
|
1984
|
+
type: events[i],
|
|
1985
|
+
callback: onChangeSubscriptionManager.emit,
|
|
1986
|
+
options: false,
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
function attachOnError() {
|
|
1991
|
+
var events = ['fullscreenerror', 'webkitfullscreenerror', 'mozfullscreenerror', 'MSFullscreenError'];
|
|
1992
|
+
for (var i = 0; i < events.length; i++) {
|
|
1993
|
+
EventListener.add(globalThis.document, {
|
|
1994
|
+
type: events[i],
|
|
1995
|
+
callback: onErrorSubscriptionManager.emit,
|
|
1996
|
+
options: false,
|
|
1997
|
+
});
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
function detachOnError() {
|
|
2001
|
+
var events = ['fullscreenerror', 'webkitfullscreenerror', 'mozfullscreenerror', 'MSFullscreenError'];
|
|
2002
|
+
for (var i = 0; i < events.length; i++) {
|
|
2003
|
+
EventListener.remove(globalThis.document, {
|
|
2004
|
+
type: events[i],
|
|
2005
|
+
callback: onErrorSubscriptionManager.emit,
|
|
2006
|
+
options: false,
|
|
2007
|
+
});
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
function getEnabled() {
|
|
2011
|
+
if (api === null)
|
|
2012
|
+
return (Platform.os.name === OS.iOS && globalThis.HTMLVideoElement.prototype.webkitSupportsFullscreen === true);
|
|
2013
|
+
return globalThis.document[api.enabled] === true;
|
|
2014
|
+
}
|
|
2015
|
+
function getElement() {
|
|
2016
|
+
if (api === null) {
|
|
2017
|
+
if (lastIOSVideo !== null && lastIOSVideo.webkitDisplayingFullscreen === true)
|
|
2018
|
+
return lastIOSVideo;
|
|
2019
|
+
return null;
|
|
2020
|
+
}
|
|
2021
|
+
var currentElement = globalThis.document[api.element];
|
|
2022
|
+
if (typeof currentElement !== 'undefined')
|
|
2023
|
+
return currentElement;
|
|
1991
2024
|
return null;
|
|
1992
2025
|
}
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2026
|
+
function getIsFullscreen() {
|
|
2027
|
+
return getElement() !== null;
|
|
2028
|
+
}
|
|
2029
|
+
function drainPendingOperation() {
|
|
2030
|
+
var entry = pendingQueue.shift();
|
|
2031
|
+
if (typeof entry === 'undefined') {
|
|
2032
|
+
activeOperation = null;
|
|
2033
|
+
return;
|
|
2034
|
+
}
|
|
2035
|
+
var next;
|
|
2036
|
+
if (entry.operation === 'request')
|
|
2037
|
+
next = requestImmediately(entry.target, entry.options);
|
|
2038
|
+
else
|
|
2039
|
+
next = exitImmediately();
|
|
2040
|
+
activeOperation = next
|
|
2041
|
+
.then(function () {
|
|
2042
|
+
entry.resolve();
|
|
2043
|
+
drainPendingOperation();
|
|
2044
|
+
})
|
|
2045
|
+
.catch(function (error) {
|
|
2046
|
+
entry.reject(error);
|
|
2047
|
+
drainPendingOperation();
|
|
2048
|
+
});
|
|
2049
|
+
}
|
|
2050
|
+
function request(target, options) {
|
|
2051
|
+
lastIntendedOperation = 'request';
|
|
2052
|
+
if (activeOperation === null) {
|
|
2053
|
+
var next = requestImmediately(target, options);
|
|
2054
|
+
activeOperation = next
|
|
2055
|
+
.then(drainPendingOperation)
|
|
2056
|
+
.catch(drainPendingOperation);
|
|
2057
|
+
return next;
|
|
2058
|
+
}
|
|
2059
|
+
return new Promise(function (resolve, reject) {
|
|
2060
|
+
pendingQueue.push({
|
|
2061
|
+
operation: 'request',
|
|
2062
|
+
target: target,
|
|
2063
|
+
options: options,
|
|
2064
|
+
resolve: resolve,
|
|
2065
|
+
reject: reject,
|
|
2066
|
+
});
|
|
2009
2067
|
});
|
|
2010
|
-
return;
|
|
2011
2068
|
}
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
next = requestImmediately$1(target, options);
|
|
2021
|
-
else
|
|
2022
|
-
next = exitImmediately$1();
|
|
2023
|
-
activeOperation$1 = next
|
|
2024
|
-
.then(drainPendingOperation$1)
|
|
2025
|
-
.catch(drainPendingOperation$1);
|
|
2026
|
-
}
|
|
2027
|
-
function request$3(target, options) {
|
|
2028
|
-
expectedIsFullscreen = true;
|
|
2029
|
-
if (activeOperation$1 === null) {
|
|
2030
|
-
var next = requestImmediately$1(target, options);
|
|
2031
|
-
activeOperation$1 = next
|
|
2032
|
-
.then(drainPendingOperation$1)
|
|
2033
|
-
.catch(drainPendingOperation$1);
|
|
2034
|
-
return next;
|
|
2035
|
-
}
|
|
2036
|
-
pendingOperation$1 = 'request';
|
|
2037
|
-
pendingTarget$1 = target;
|
|
2038
|
-
pendingOptions = options;
|
|
2039
|
-
return activeOperation$1.then(function () {
|
|
2040
|
-
return Promise.resolve();
|
|
2041
|
-
});
|
|
2042
|
-
}
|
|
2043
|
-
function exit$1() {
|
|
2044
|
-
expectedIsFullscreen = false;
|
|
2045
|
-
if (activeOperation$1 === null) {
|
|
2046
|
-
var next = exitImmediately$1();
|
|
2047
|
-
activeOperation$1 = next
|
|
2048
|
-
.then(drainPendingOperation$1)
|
|
2049
|
-
.catch(drainPendingOperation$1);
|
|
2050
|
-
return next;
|
|
2051
|
-
}
|
|
2052
|
-
pendingOperation$1 = 'exit';
|
|
2053
|
-
pendingTarget$1 = undefined;
|
|
2054
|
-
pendingOptions = undefined;
|
|
2055
|
-
return activeOperation$1.then(function () {
|
|
2056
|
-
return Promise.resolve();
|
|
2057
|
-
});
|
|
2058
|
-
}
|
|
2059
|
-
function requestImmediately$1(target, options) {
|
|
2060
|
-
return new Promise(function (resolve, reject) {
|
|
2061
|
-
if (typeof target === 'undefined')
|
|
2062
|
-
target = getDefaultTarget$1();
|
|
2063
|
-
if (typeof target === 'undefined')
|
|
2064
|
-
return reject(new NotSupportedError('Failed to enter fullscreen mode.'));
|
|
2065
|
-
var tagName = target.tagName.toLowerCase();
|
|
2066
|
-
if (api !== null) {
|
|
2067
|
-
var method = target[api.request];
|
|
2068
|
-
if (typeof method === 'function') {
|
|
2069
|
-
var result = method.call(target, options);
|
|
2070
|
-
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
2071
|
-
result
|
|
2072
|
-
.then(resolve)
|
|
2073
|
-
.catch(function () {
|
|
2074
|
-
if (Platform.os.name !== OS.iOS)
|
|
2075
|
-
return reject(new NotSupportedError('The "' + tagName + '" element does not support fullscreen requests.'));
|
|
2076
|
-
fallbackToIOSVideo();
|
|
2077
|
-
});
|
|
2078
|
-
return;
|
|
2079
|
-
}
|
|
2080
|
-
else {
|
|
2081
|
-
return resolve();
|
|
2082
|
-
}
|
|
2083
|
-
}
|
|
2069
|
+
function exit() {
|
|
2070
|
+
lastIntendedOperation = 'exit';
|
|
2071
|
+
if (activeOperation === null) {
|
|
2072
|
+
var next = exitImmediately();
|
|
2073
|
+
activeOperation = next
|
|
2074
|
+
.then(drainPendingOperation)
|
|
2075
|
+
.catch(drainPendingOperation);
|
|
2076
|
+
return next;
|
|
2084
2077
|
}
|
|
2085
|
-
function
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2078
|
+
return new Promise(function (resolve, reject) {
|
|
2079
|
+
pendingQueue.push({
|
|
2080
|
+
operation: 'exit',
|
|
2081
|
+
target: undefined,
|
|
2082
|
+
options: undefined,
|
|
2083
|
+
resolve: resolve,
|
|
2084
|
+
reject: reject,
|
|
2085
|
+
});
|
|
2086
|
+
});
|
|
2087
|
+
}
|
|
2088
|
+
function requestImmediately(target, options) {
|
|
2089
|
+
return new Promise(function (resolve, reject) {
|
|
2090
|
+
if (typeof target === 'undefined')
|
|
2091
|
+
target = getDefaultTarget();
|
|
2092
|
+
if (typeof target === 'undefined')
|
|
2093
|
+
return reject(new NotSupportedError('Failed to enter fullscreen mode.'));
|
|
2094
|
+
var tagName = target.tagName.toLowerCase();
|
|
2095
|
+
function fallbackToIOSVideo() {
|
|
2096
|
+
if (Platform.os.name === OS.iOS && typeof target !== 'undefined' && target.tagName.toUpperCase() === 'VIDEO') {
|
|
2097
|
+
var video = target;
|
|
2098
|
+
if (video.webkitSupportsFullscreen === true && typeof video.webkitEnterFullscreen === 'function') {
|
|
2099
|
+
lastIOSVideo = video;
|
|
2100
|
+
bridgeIOSVideoEvents();
|
|
2101
|
+
video.webkitEnterFullscreen();
|
|
2102
|
+
return resolve();
|
|
2103
|
+
}
|
|
2093
2104
|
}
|
|
2105
|
+
reject(new NotSupportedError('The "' + tagName + '" element does not support fullscreen requests.'));
|
|
2094
2106
|
}
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
.catch(function () {
|
|
2110
|
-
if (Platform.os.name !== OS.iOS)
|
|
2111
|
-
return reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
2112
|
-
fallbackToIOSVideo();
|
|
2113
|
-
});
|
|
2114
|
-
return;
|
|
2115
|
-
}
|
|
2116
|
-
else {
|
|
2107
|
+
if (api !== null) {
|
|
2108
|
+
var method = target[api.request];
|
|
2109
|
+
if (typeof method === 'function') {
|
|
2110
|
+
var result = method.call(target, options);
|
|
2111
|
+
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
2112
|
+
result
|
|
2113
|
+
.then(resolve)
|
|
2114
|
+
.catch(function () {
|
|
2115
|
+
if (Platform.os.name !== OS.iOS)
|
|
2116
|
+
return reject(new NotSupportedError('The "' + tagName + '" element does not support fullscreen requests.'));
|
|
2117
|
+
fallbackToIOSVideo();
|
|
2118
|
+
});
|
|
2119
|
+
return;
|
|
2120
|
+
}
|
|
2117
2121
|
return resolve();
|
|
2118
2122
|
}
|
|
2119
2123
|
}
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2124
|
+
fallbackToIOSVideo();
|
|
2125
|
+
});
|
|
2126
|
+
}
|
|
2127
|
+
function exitImmediately() {
|
|
2128
|
+
return new Promise(function (resolve, reject) {
|
|
2129
|
+
if (getElement() === null && lastIOSVideo === null)
|
|
2130
|
+
return resolve();
|
|
2131
|
+
function fallbackToIOSVideo() {
|
|
2132
|
+
if (Platform.os.name === OS.iOS) {
|
|
2133
|
+
var candidates = void 0;
|
|
2134
|
+
if (lastIOSVideo !== null)
|
|
2135
|
+
candidates = [lastIOSVideo];
|
|
2136
|
+
else
|
|
2137
|
+
candidates = globalThis.document.querySelectorAll('video');
|
|
2138
|
+
for (var i = 0; i < candidates.length; i++) {
|
|
2139
|
+
var video = candidates[i];
|
|
2140
|
+
if (typeof video.webkitExitFullscreen === 'function' && video.webkitDisplayingFullscreen === true) {
|
|
2141
|
+
video.webkitExitFullscreen();
|
|
2142
|
+
lastIOSVideo = null;
|
|
2143
|
+
return resolve();
|
|
2144
|
+
}
|
|
2128
2145
|
}
|
|
2129
2146
|
}
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2147
|
+
reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
2148
|
+
}
|
|
2149
|
+
if (api !== null) {
|
|
2150
|
+
var method = globalThis.document[api.exit];
|
|
2151
|
+
if (typeof method === 'function') {
|
|
2152
|
+
var result = method.call(globalThis.document);
|
|
2153
|
+
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
2154
|
+
result
|
|
2155
|
+
.then(resolve)
|
|
2156
|
+
.catch(function () {
|
|
2157
|
+
if (Platform.os.name !== OS.iOS)
|
|
2158
|
+
return reject(new NotSupportedError('Failed to exit fullscreen mode.'));
|
|
2159
|
+
fallbackToIOSVideo();
|
|
2160
|
+
});
|
|
2161
|
+
return;
|
|
2137
2162
|
}
|
|
2163
|
+
return resolve();
|
|
2138
2164
|
}
|
|
2139
2165
|
}
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2166
|
+
fallbackToIOSVideo();
|
|
2167
|
+
});
|
|
2168
|
+
}
|
|
2169
|
+
function toggle(target, options) {
|
|
2170
|
+
if (lastIntendedOperation === 'request')
|
|
2171
|
+
return exit();
|
|
2172
|
+
return request(target, options);
|
|
2173
|
+
}
|
|
2174
|
+
bridgeEvents();
|
|
2175
|
+
return {
|
|
2176
|
+
get supported() {
|
|
2177
|
+
return getEnabled();
|
|
2178
|
+
},
|
|
2179
|
+
get element() {
|
|
2180
|
+
return getElement();
|
|
2181
|
+
},
|
|
2182
|
+
get isFullscreen() {
|
|
2183
|
+
return getIsFullscreen();
|
|
2184
|
+
},
|
|
2185
|
+
request: request,
|
|
2186
|
+
exit: exit,
|
|
2187
|
+
toggle: toggle,
|
|
2188
|
+
onChange: onChangeSubscriptionManager.subscribe,
|
|
2189
|
+
onError: onErrorSubscriptionManager.subscribe,
|
|
2190
|
+
Constants: {},
|
|
2191
|
+
Errors: {
|
|
2192
|
+
NotSupportedError: NotSupportedError,
|
|
2193
|
+
},
|
|
2194
|
+
};
|
|
2151
2195
|
}
|
|
2152
|
-
|
|
2196
|
+
var Fullscreen = createFullscreen();
|
|
2153
2197
|
|
|
2154
2198
|
var PermissionType;
|
|
2155
2199
|
(function (PermissionType) {
|
|
@@ -2190,7 +2234,7 @@ var GET_USER_MEDIA = (function () {
|
|
|
2190
2234
|
})();
|
|
2191
2235
|
|
|
2192
2236
|
var Permission = {
|
|
2193
|
-
request: request$
|
|
2237
|
+
request: request$1,
|
|
2194
2238
|
check: check,
|
|
2195
2239
|
Constants: {
|
|
2196
2240
|
PermissionType: PermissionType,
|
|
@@ -2198,7 +2242,7 @@ var Permission = {
|
|
|
2198
2242
|
},
|
|
2199
2243
|
Errors: {},
|
|
2200
2244
|
};
|
|
2201
|
-
function request$
|
|
2245
|
+
function request$1(type) {
|
|
2202
2246
|
var instance = this;
|
|
2203
2247
|
return new Promise(function (resolve) {
|
|
2204
2248
|
function resolveAfterCheck() {
|
|
@@ -2281,7 +2325,7 @@ function check(type) {
|
|
|
2281
2325
|
|
|
2282
2326
|
var PermissionNotGrantedError = createCustomError('PermissionNotGrantedError');
|
|
2283
2327
|
|
|
2284
|
-
function request
|
|
2328
|
+
function request(url, options) {
|
|
2285
2329
|
return new Promise(function (resolve) {
|
|
2286
2330
|
var method = 'GET';
|
|
2287
2331
|
var headers = {};
|
|
@@ -2363,7 +2407,7 @@ function assign() {
|
|
|
2363
2407
|
return to;
|
|
2364
2408
|
}
|
|
2365
2409
|
|
|
2366
|
-
var onChangeSubscriptionManager$
|
|
2410
|
+
var onChangeSubscriptionManager$1 = createSubscriptionManager(attachOnChange$1, detachOnChange$1);
|
|
2367
2411
|
var watchIdRef = null;
|
|
2368
2412
|
var Geolocation = {
|
|
2369
2413
|
get value() {
|
|
@@ -2372,7 +2416,7 @@ var Geolocation = {
|
|
|
2372
2416
|
get supported() {
|
|
2373
2417
|
return supported$4();
|
|
2374
2418
|
},
|
|
2375
|
-
onChange: onChangeSubscriptionManager$
|
|
2419
|
+
onChange: onChangeSubscriptionManager$1.subscribe,
|
|
2376
2420
|
Constants: {},
|
|
2377
2421
|
Errors: {
|
|
2378
2422
|
NotSupportedError: NotSupportedError,
|
|
@@ -2409,7 +2453,7 @@ function getValue$1() {
|
|
|
2409
2453
|
}
|
|
2410
2454
|
function getFallbackValue(error) {
|
|
2411
2455
|
return new Promise(function (resolve, reject) {
|
|
2412
|
-
request
|
|
2456
|
+
request('http://ip-api.com/json?fields=lat,lon')
|
|
2413
2457
|
.then(function (response) {
|
|
2414
2458
|
if (typeof response !== 'undefined') {
|
|
2415
2459
|
var coordinate_1 = {
|
|
@@ -2448,7 +2492,7 @@ function normalizeError(error) {
|
|
|
2448
2492
|
return new NotSupportedError('Unknown error.');
|
|
2449
2493
|
}
|
|
2450
2494
|
}
|
|
2451
|
-
function attachOnChange$
|
|
2495
|
+
function attachOnChange$1() {
|
|
2452
2496
|
if (!supported$4())
|
|
2453
2497
|
return;
|
|
2454
2498
|
Permission
|
|
@@ -2461,13 +2505,13 @@ function attachOnChange$2() {
|
|
|
2461
2505
|
}
|
|
2462
2506
|
});
|
|
2463
2507
|
}
|
|
2464
|
-
function detachOnChange$
|
|
2508
|
+
function detachOnChange$1() {
|
|
2465
2509
|
if (!supported$4() || watchIdRef === null)
|
|
2466
2510
|
return;
|
|
2467
2511
|
globalThis.navigator.geolocation.clearWatch(watchIdRef);
|
|
2468
2512
|
}
|
|
2469
2513
|
function onGeolocationCoordinatesChange(coordinates) {
|
|
2470
|
-
onChangeSubscriptionManager$
|
|
2514
|
+
onChangeSubscriptionManager$1.emit(coordinates);
|
|
2471
2515
|
}
|
|
2472
2516
|
function supported$4() {
|
|
2473
2517
|
return typeof globalThis.navigator.geolocation !== 'undefined';
|
|
@@ -2505,6 +2549,20 @@ var CaptureType;
|
|
|
2505
2549
|
CaptureType["User"] = "user";
|
|
2506
2550
|
CaptureType["Environment"] = "environment";
|
|
2507
2551
|
})(CaptureType || (CaptureType = {}));
|
|
2552
|
+
var ExplorerStartIn;
|
|
2553
|
+
(function (ExplorerStartIn) {
|
|
2554
|
+
ExplorerStartIn["Desktop"] = "desktop";
|
|
2555
|
+
ExplorerStartIn["Documents"] = "documents";
|
|
2556
|
+
ExplorerStartIn["Downloads"] = "downloads";
|
|
2557
|
+
ExplorerStartIn["Music"] = "music";
|
|
2558
|
+
ExplorerStartIn["Pictures"] = "pictures";
|
|
2559
|
+
ExplorerStartIn["Videos"] = "videos";
|
|
2560
|
+
})(ExplorerStartIn || (ExplorerStartIn = {}));
|
|
2561
|
+
var DirectoryExploreMode;
|
|
2562
|
+
(function (DirectoryExploreMode) {
|
|
2563
|
+
DirectoryExploreMode["Read"] = "read";
|
|
2564
|
+
DirectoryExploreMode["ReadWrite"] = "readwrite";
|
|
2565
|
+
})(DirectoryExploreMode || (DirectoryExploreMode = {}));
|
|
2508
2566
|
var SETTING_URL = (_a = {},
|
|
2509
2567
|
_a[OS.Android] = (_b = {},
|
|
2510
2568
|
_b[SettingType.General] = 'intent:#Intent;action=android.settings.SETTINGS;end',
|
|
@@ -2956,15 +3014,15 @@ function dateToICSDateString(date, allDay) {
|
|
|
2956
3014
|
if (allDay) {
|
|
2957
3015
|
return date.getUTCFullYear()
|
|
2958
3016
|
+ padStart(date.getUTCMonth() + 1, 2, '0')
|
|
2959
|
-
+ padStart(date.getUTCDate()
|
|
3017
|
+
+ padStart(date.getUTCDate(), 2, '0');
|
|
2960
3018
|
}
|
|
2961
3019
|
return date.getUTCFullYear()
|
|
2962
3020
|
+ padStart(date.getUTCMonth() + 1, 2, '0')
|
|
2963
|
-
+ padStart(date.getUTCDate()
|
|
3021
|
+
+ padStart(date.getUTCDate(), 2, '0')
|
|
2964
3022
|
+ 'T'
|
|
2965
|
-
+ padStart(date.getUTCHours()
|
|
2966
|
-
+ padStart(date.getUTCMinutes()
|
|
2967
|
-
+ padStart(date.getUTCSeconds()
|
|
3023
|
+
+ padStart(date.getUTCHours(), 2, '0')
|
|
3024
|
+
+ padStart(date.getUTCMinutes(), 2, '0')
|
|
3025
|
+
+ padStart(date.getUTCSeconds(), 2, '0')
|
|
2968
3026
|
+ 'Z';
|
|
2969
3027
|
}
|
|
2970
3028
|
function getURLOpenError(tried) {
|
|
@@ -3905,6 +3963,7 @@ function removeThemeColor() {
|
|
|
3905
3963
|
|
|
3906
3964
|
var Vibration = {
|
|
3907
3965
|
run: run,
|
|
3966
|
+
stop: stop,
|
|
3908
3967
|
get supported() {
|
|
3909
3968
|
return supported$3();
|
|
3910
3969
|
},
|
|
@@ -3918,269 +3977,309 @@ function run(pattern) {
|
|
|
3918
3977
|
return globalThis.navigator.vibrate(pattern);
|
|
3919
3978
|
throw new NotSupportedError('\'navigator.vibrate\' does not supported.');
|
|
3920
3979
|
}
|
|
3980
|
+
function stop() {
|
|
3981
|
+
return this.run(0);
|
|
3982
|
+
}
|
|
3921
3983
|
function supported$3() {
|
|
3922
3984
|
return typeof globalThis.navigator.vibrate !== 'undefined';
|
|
3923
3985
|
}
|
|
3924
3986
|
|
|
3925
|
-
var
|
|
3926
|
-
var eventsBridged = false;
|
|
3927
|
-
var activeOperation = null;
|
|
3928
|
-
var pendingOperation = null;
|
|
3929
|
-
var pendingTarget = undefined;
|
|
3930
|
-
var expectedIsPip = false;
|
|
3987
|
+
var PIP_BRIDGED_KEY = Symbol('pipBridged');
|
|
3931
3988
|
var PIP_PRESENTATION_MODE = 'picture-in-picture';
|
|
3932
3989
|
var INLINE_PRESENTATION_MODE = 'inline';
|
|
3933
|
-
var onChangeSubscriptionManager$1 = createSubscriptionManager(attachOnChange$1, detachOnChange$1);
|
|
3934
|
-
var onErrorSubscriptionManager = createSubscriptionManager(attachOnError, detachOnError);
|
|
3935
|
-
var Pip = {
|
|
3936
|
-
get supported() {
|
|
3937
|
-
return getEnabled();
|
|
3938
|
-
},
|
|
3939
|
-
get element() {
|
|
3940
|
-
return getElement();
|
|
3941
|
-
},
|
|
3942
|
-
get isPip() {
|
|
3943
|
-
return getIsPip();
|
|
3944
|
-
},
|
|
3945
|
-
request: request,
|
|
3946
|
-
exit: exit,
|
|
3947
|
-
toggle: toggle,
|
|
3948
|
-
onChange: onChangeSubscriptionManager$1.subscribe,
|
|
3949
|
-
onError: onErrorSubscriptionManager.subscribe,
|
|
3950
|
-
Constants: {},
|
|
3951
|
-
Errors: {
|
|
3952
|
-
NotSupportedError: NotSupportedError,
|
|
3953
|
-
},
|
|
3954
|
-
};
|
|
3955
3990
|
function hasStandardPipEvents() {
|
|
3956
3991
|
return typeof globalThis.document.pictureInPictureEnabled !== 'undefined';
|
|
3957
3992
|
}
|
|
3958
|
-
function
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3993
|
+
function createPip() {
|
|
3994
|
+
var lastPipVideo = null;
|
|
3995
|
+
var eventsBridged = false;
|
|
3996
|
+
var activeOperation = null;
|
|
3997
|
+
var pendingQueue = [];
|
|
3998
|
+
var lastIntendedOperation = 'exit';
|
|
3999
|
+
var onChangeSubscriptionManager = createSubscriptionManager(attachOnChange, detachOnChange);
|
|
4000
|
+
var onErrorSubscriptionManager = createSubscriptionManager(attachOnError, detachOnError);
|
|
4001
|
+
function getEnabled() {
|
|
4002
|
+
if (typeof globalThis.document.pictureInPictureEnabled === 'boolean')
|
|
4003
|
+
return globalThis.document.pictureInPictureEnabled;
|
|
4004
|
+
if (typeof HTMLVideoElement === 'undefined')
|
|
4005
|
+
return false;
|
|
4006
|
+
var videos = globalThis.document.querySelectorAll('video');
|
|
4007
|
+
for (var i = 0; i < videos.length; i++) {
|
|
4008
|
+
var video = videos[i];
|
|
4009
|
+
if (typeof video.webkitSupportsPresentationMode === 'function' && video.webkitSupportsPresentationMode(PIP_PRESENTATION_MODE))
|
|
4010
|
+
return true;
|
|
4011
|
+
}
|
|
3962
4012
|
return false;
|
|
3963
|
-
var videos = globalThis.document.querySelectorAll('video');
|
|
3964
|
-
for (var i = 0; i < videos.length; i++) {
|
|
3965
|
-
var video = videos[i];
|
|
3966
|
-
if (typeof video.webkitSupportsPresentationMode === 'function' && video.webkitSupportsPresentationMode(PIP_PRESENTATION_MODE))
|
|
3967
|
-
return true;
|
|
3968
4013
|
}
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
return lastPipVideo;
|
|
3977
|
-
return null;
|
|
3978
|
-
}
|
|
3979
|
-
function getIsPip() {
|
|
3980
|
-
return getElement() !== null;
|
|
3981
|
-
}
|
|
3982
|
-
function getDefaultTarget() {
|
|
3983
|
-
var video = globalThis.document.querySelector('video');
|
|
3984
|
-
if (video === null)
|
|
3985
|
-
return undefined;
|
|
3986
|
-
return video;
|
|
3987
|
-
}
|
|
3988
|
-
function onWebkitPresentationModeChanged(event) {
|
|
3989
|
-
if (this.webkitPresentationMode === PIP_PRESENTATION_MODE || this.webkitPresentationMode === INLINE_PRESENTATION_MODE && lastPipVideo === this)
|
|
3990
|
-
onChangeSubscriptionManager$1.emit(event);
|
|
3991
|
-
}
|
|
3992
|
-
function bridgeEvents() {
|
|
3993
|
-
if (eventsBridged)
|
|
3994
|
-
return;
|
|
3995
|
-
eventsBridged = true;
|
|
3996
|
-
if (!hasStandardPipEvents()) {
|
|
3997
|
-
bridgeWebkitVideoEvents();
|
|
3998
|
-
if (typeof globalThis.MutationObserver !== 'undefined') {
|
|
3999
|
-
var observer = new MutationObserver(function () {
|
|
4000
|
-
bridgeWebkitVideoEvents();
|
|
4001
|
-
});
|
|
4002
|
-
observer.observe(globalThis.document.documentElement, { childList: true, subtree: true });
|
|
4003
|
-
}
|
|
4014
|
+
function getElement() {
|
|
4015
|
+
var currentElement = globalThis.document.pictureInPictureElement;
|
|
4016
|
+
if (currentElement !== null && typeof currentElement !== 'undefined')
|
|
4017
|
+
return currentElement;
|
|
4018
|
+
if (lastPipVideo !== null && lastPipVideo.webkitPresentationMode === PIP_PRESENTATION_MODE)
|
|
4019
|
+
return lastPipVideo;
|
|
4020
|
+
return null;
|
|
4004
4021
|
}
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
if (typeof globalThis.document === 'undefined')
|
|
4008
|
-
return;
|
|
4009
|
-
var videos = globalThis.document.querySelectorAll('video');
|
|
4010
|
-
videos.forEach(function (video) {
|
|
4011
|
-
if (video.__pipBridged__ || !(typeof video.webkitSetPresentationMode !== 'undefined' || typeof video.onwebkitpresentationmodechanged !== 'undefined'))
|
|
4012
|
-
return;
|
|
4013
|
-
EventListener.add(video, { type: 'webkitpresentationmodechanged', callback: onWebkitPresentationModeChanged, options: false });
|
|
4014
|
-
video.__pipBridged__ = true;
|
|
4015
|
-
});
|
|
4016
|
-
}
|
|
4017
|
-
function attachOnChange$1() {
|
|
4018
|
-
if (hasStandardPipEvents()) {
|
|
4019
|
-
var changeEvents = ['enterpictureinpicture', 'leavepictureinpicture'];
|
|
4020
|
-
for (var i = 0; i < changeEvents.length; i++)
|
|
4021
|
-
EventListener.add(globalThis.document, { type: changeEvents[i], callback: onChangeSubscriptionManager$1.emit, options: false });
|
|
4022
|
-
return;
|
|
4022
|
+
function getIsPip() {
|
|
4023
|
+
return getElement() !== null;
|
|
4023
4024
|
}
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
for (var i = 0; i < changeEvents.length; i++)
|
|
4030
|
-
EventListener.remove(globalThis.document, { type: changeEvents[i], callback: onChangeSubscriptionManager$1.emit, options: false });
|
|
4031
|
-
return;
|
|
4025
|
+
function getDefaultTarget() {
|
|
4026
|
+
var video = globalThis.document.querySelector('video');
|
|
4027
|
+
if (video === null)
|
|
4028
|
+
return undefined;
|
|
4029
|
+
return video;
|
|
4032
4030
|
}
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
video.__pipBridged__ = false;
|
|
4037
|
-
});
|
|
4038
|
-
}
|
|
4039
|
-
function attachOnError() {
|
|
4040
|
-
EventListener.add(globalThis.document, { type: 'pictureinpictureerror', callback: onErrorSubscriptionManager.emit, options: false });
|
|
4041
|
-
}
|
|
4042
|
-
function detachOnError() {
|
|
4043
|
-
EventListener.remove(globalThis.document, { type: 'pictureinpictureerror', callback: onErrorSubscriptionManager.emit, options: false });
|
|
4044
|
-
}
|
|
4045
|
-
function drainPendingOperation() {
|
|
4046
|
-
if (pendingOperation === null) {
|
|
4047
|
-
activeOperation = Promise.resolve().then(function () {
|
|
4048
|
-
if (pendingOperation === null) {
|
|
4049
|
-
activeOperation = null;
|
|
4050
|
-
return;
|
|
4051
|
-
}
|
|
4052
|
-
drainPendingOperation();
|
|
4053
|
-
});
|
|
4054
|
-
return;
|
|
4031
|
+
function onWebkitPresentationModeChanged(event) {
|
|
4032
|
+
if (this.webkitPresentationMode === PIP_PRESENTATION_MODE || (this.webkitPresentationMode === INLINE_PRESENTATION_MODE && lastPipVideo === this))
|
|
4033
|
+
onChangeSubscriptionManager.emit(event);
|
|
4055
4034
|
}
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
var next = requestImmediately(target);
|
|
4073
|
-
activeOperation = next
|
|
4074
|
-
.then(drainPendingOperation)
|
|
4075
|
-
.catch(drainPendingOperation);
|
|
4076
|
-
return next;
|
|
4035
|
+
function bridgeEvents() {
|
|
4036
|
+
if (eventsBridged)
|
|
4037
|
+
return;
|
|
4038
|
+
eventsBridged = true;
|
|
4039
|
+
if (!hasStandardPipEvents()) {
|
|
4040
|
+
bridgeWebkitVideoEvents();
|
|
4041
|
+
if (typeof globalThis.MutationObserver !== 'undefined') {
|
|
4042
|
+
var observer = new MutationObserver(function () {
|
|
4043
|
+
bridgeWebkitVideoEvents();
|
|
4044
|
+
});
|
|
4045
|
+
observer.observe(globalThis.document.documentElement, {
|
|
4046
|
+
childList: true,
|
|
4047
|
+
subtree: true,
|
|
4048
|
+
});
|
|
4049
|
+
}
|
|
4050
|
+
}
|
|
4077
4051
|
}
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4052
|
+
function bridgeWebkitVideoEvents() {
|
|
4053
|
+
if (typeof globalThis.document === 'undefined')
|
|
4054
|
+
return;
|
|
4055
|
+
var videos = globalThis.document.querySelectorAll('video');
|
|
4056
|
+
videos.forEach(function (video) {
|
|
4057
|
+
if (video[PIP_BRIDGED_KEY] === true || !(typeof video.webkitSetPresentationMode !== 'undefined' || typeof video.onwebkitpresentationmodechanged !== 'undefined'))
|
|
4058
|
+
return;
|
|
4059
|
+
EventListener.add(video, {
|
|
4060
|
+
type: 'webkitpresentationmodechanged',
|
|
4061
|
+
callback: onWebkitPresentationModeChanged,
|
|
4062
|
+
options: false,
|
|
4063
|
+
});
|
|
4064
|
+
video[PIP_BRIDGED_KEY] = true;
|
|
4065
|
+
});
|
|
4092
4066
|
}
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
if (typeof target === 'undefined')
|
|
4102
|
-
target = getDefaultTarget();
|
|
4103
|
-
if (typeof target === 'undefined')
|
|
4104
|
-
return reject(new NotSupportedError('Failed to enter Picture-in-Picture mode.'));
|
|
4105
|
-
var tagName = target.tagName.toLowerCase();
|
|
4106
|
-
if (tagName !== 'video')
|
|
4107
|
-
return reject(new NotSupportedError('The "' + tagName + '" element does not support Picture-in-Picture requests.'));
|
|
4108
|
-
var method = target.requestPictureInPicture;
|
|
4109
|
-
if (typeof method === 'function') {
|
|
4110
|
-
var result = method.call(target);
|
|
4111
|
-
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
4112
|
-
result
|
|
4113
|
-
.then(function () { resolve(); })
|
|
4114
|
-
.catch(function () {
|
|
4115
|
-
fallbackToWebkitVideo();
|
|
4067
|
+
function attachOnChange() {
|
|
4068
|
+
if (hasStandardPipEvents()) {
|
|
4069
|
+
var changeEvents = ['enterpictureinpicture', 'leavepictureinpicture'];
|
|
4070
|
+
for (var i = 0; i < changeEvents.length; i++) {
|
|
4071
|
+
EventListener.add(globalThis.document, {
|
|
4072
|
+
type: changeEvents[i],
|
|
4073
|
+
callback: onChangeSubscriptionManager.emit,
|
|
4074
|
+
options: false,
|
|
4116
4075
|
});
|
|
4117
|
-
return;
|
|
4118
|
-
}
|
|
4119
|
-
else {
|
|
4120
|
-
return resolve();
|
|
4121
4076
|
}
|
|
4077
|
+
return;
|
|
4122
4078
|
}
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4079
|
+
bridgeWebkitVideoEvents();
|
|
4080
|
+
}
|
|
4081
|
+
function detachOnChange() {
|
|
4082
|
+
if (hasStandardPipEvents()) {
|
|
4083
|
+
var changeEvents = ['enterpictureinpicture', 'leavepictureinpicture'];
|
|
4084
|
+
for (var i = 0; i < changeEvents.length; i++) {
|
|
4085
|
+
EventListener.remove(globalThis.document, {
|
|
4086
|
+
type: changeEvents[i],
|
|
4087
|
+
callback: onChangeSubscriptionManager.emit,
|
|
4088
|
+
options: false,
|
|
4089
|
+
});
|
|
4131
4090
|
}
|
|
4132
|
-
|
|
4091
|
+
return;
|
|
4133
4092
|
}
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
result
|
|
4144
|
-
.then(resolve)
|
|
4145
|
-
.catch(function () {
|
|
4146
|
-
fallbackToWebkitVideo();
|
|
4147
|
-
});
|
|
4148
|
-
return;
|
|
4093
|
+
var videos = globalThis.document.querySelectorAll('video');
|
|
4094
|
+
videos.forEach(function (video) {
|
|
4095
|
+
EventListener.remove(video, {
|
|
4096
|
+
type: 'webkitpresentationmodechanged',
|
|
4097
|
+
callback: onWebkitPresentationModeChanged,
|
|
4098
|
+
options: false,
|
|
4099
|
+
});
|
|
4100
|
+
try {
|
|
4101
|
+
delete video[PIP_BRIDGED_KEY];
|
|
4149
4102
|
}
|
|
4150
|
-
|
|
4151
|
-
|
|
4103
|
+
catch (_) {
|
|
4104
|
+
video[PIP_BRIDGED_KEY] = undefined;
|
|
4152
4105
|
}
|
|
4106
|
+
});
|
|
4107
|
+
}
|
|
4108
|
+
function attachOnError() {
|
|
4109
|
+
EventListener.add(globalThis.document, {
|
|
4110
|
+
type: 'pictureinpictureerror',
|
|
4111
|
+
callback: onErrorSubscriptionManager.emit,
|
|
4112
|
+
options: false,
|
|
4113
|
+
});
|
|
4114
|
+
}
|
|
4115
|
+
function detachOnError() {
|
|
4116
|
+
EventListener.remove(globalThis.document, {
|
|
4117
|
+
type: 'pictureinpictureerror',
|
|
4118
|
+
callback: onErrorSubscriptionManager.emit,
|
|
4119
|
+
options: false,
|
|
4120
|
+
});
|
|
4121
|
+
}
|
|
4122
|
+
function drainPendingOperation() {
|
|
4123
|
+
var entry = pendingQueue.shift();
|
|
4124
|
+
if (typeof entry === 'undefined') {
|
|
4125
|
+
activeOperation = null;
|
|
4126
|
+
return;
|
|
4127
|
+
}
|
|
4128
|
+
var next;
|
|
4129
|
+
if (entry.operation === 'request')
|
|
4130
|
+
next = requestImmediately(entry.target);
|
|
4131
|
+
else
|
|
4132
|
+
next = exitImmediately();
|
|
4133
|
+
activeOperation = next
|
|
4134
|
+
.then(function () {
|
|
4135
|
+
entry.resolve();
|
|
4136
|
+
drainPendingOperation();
|
|
4137
|
+
})
|
|
4138
|
+
.catch(function (error) {
|
|
4139
|
+
entry.reject(error);
|
|
4140
|
+
drainPendingOperation();
|
|
4141
|
+
});
|
|
4142
|
+
}
|
|
4143
|
+
function request(target) {
|
|
4144
|
+
lastIntendedOperation = 'request';
|
|
4145
|
+
if (activeOperation === null) {
|
|
4146
|
+
var next = requestImmediately(target);
|
|
4147
|
+
activeOperation = next
|
|
4148
|
+
.then(drainPendingOperation)
|
|
4149
|
+
.catch(drainPendingOperation);
|
|
4150
|
+
return next;
|
|
4151
|
+
}
|
|
4152
|
+
return new Promise(function (resolve, reject) {
|
|
4153
|
+
pendingQueue.push({
|
|
4154
|
+
operation: 'request',
|
|
4155
|
+
target: target,
|
|
4156
|
+
resolve: resolve,
|
|
4157
|
+
reject: reject,
|
|
4158
|
+
});
|
|
4159
|
+
});
|
|
4160
|
+
}
|
|
4161
|
+
function exit() {
|
|
4162
|
+
lastIntendedOperation = 'exit';
|
|
4163
|
+
if (activeOperation === null) {
|
|
4164
|
+
var next = exitImmediately();
|
|
4165
|
+
activeOperation = next
|
|
4166
|
+
.then(drainPendingOperation)
|
|
4167
|
+
.catch(drainPendingOperation);
|
|
4168
|
+
return next;
|
|
4153
4169
|
}
|
|
4154
|
-
function
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4170
|
+
return new Promise(function (resolve, reject) {
|
|
4171
|
+
pendingQueue.push({
|
|
4172
|
+
operation: 'exit',
|
|
4173
|
+
target: undefined,
|
|
4174
|
+
resolve: resolve,
|
|
4175
|
+
reject: reject,
|
|
4176
|
+
});
|
|
4177
|
+
});
|
|
4178
|
+
}
|
|
4179
|
+
function requestImmediately(target) {
|
|
4180
|
+
return new Promise(function (resolve, reject) {
|
|
4181
|
+
if (typeof target === 'undefined')
|
|
4182
|
+
target = getDefaultTarget();
|
|
4183
|
+
if (typeof target === 'undefined')
|
|
4184
|
+
return reject(new NotSupportedError('Failed to enter Picture-in-Picture mode.'));
|
|
4185
|
+
var tagName = target.tagName.toLowerCase();
|
|
4186
|
+
if (tagName !== 'video')
|
|
4187
|
+
return reject(new NotSupportedError('The "' + tagName + '" element does not support Picture-in-Picture requests.'));
|
|
4188
|
+
function fallbackToWebkitVideo() {
|
|
4189
|
+
if (typeof target !== 'undefined' && typeof target.webkitSupportsPresentationMode === 'function' && target.webkitSupportsPresentationMode(PIP_PRESENTATION_MODE) && typeof target.webkitSetPresentationMode === 'function') {
|
|
4190
|
+
if (target.disablePictureInPicture)
|
|
4191
|
+
return reject(new NotSupportedError('Picture-in-Picture is disabled on this video element.'));
|
|
4192
|
+
lastPipVideo = target;
|
|
4193
|
+
bridgeWebkitVideoEvents();
|
|
4194
|
+
target.webkitSetPresentationMode(PIP_PRESENTATION_MODE);
|
|
4159
4195
|
return resolve();
|
|
4160
4196
|
}
|
|
4197
|
+
reject(new NotSupportedError('The "' + tagName + '" element does not support Picture-in-Picture requests.'));
|
|
4161
4198
|
}
|
|
4162
|
-
var
|
|
4163
|
-
|
|
4164
|
-
var
|
|
4165
|
-
if (typeof
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4199
|
+
var method = target.requestPictureInPicture;
|
|
4200
|
+
if (typeof method === 'function') {
|
|
4201
|
+
var result = method.call(target);
|
|
4202
|
+
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
4203
|
+
result
|
|
4204
|
+
.then(function () {
|
|
4205
|
+
resolve();
|
|
4206
|
+
})
|
|
4207
|
+
.catch(function () {
|
|
4208
|
+
fallbackToWebkitVideo();
|
|
4209
|
+
});
|
|
4210
|
+
return;
|
|
4211
|
+
}
|
|
4212
|
+
return resolve();
|
|
4213
|
+
}
|
|
4214
|
+
fallbackToWebkitVideo();
|
|
4215
|
+
});
|
|
4216
|
+
}
|
|
4217
|
+
function exitImmediately() {
|
|
4218
|
+
return new Promise(function (resolve, reject) {
|
|
4219
|
+
if (getElement() === null && lastPipVideo === null)
|
|
4220
|
+
return resolve();
|
|
4221
|
+
function fallbackToWebkitVideo() {
|
|
4222
|
+
var candidates;
|
|
4223
|
+
if (lastPipVideo !== null && lastPipVideo.webkitPresentationMode === PIP_PRESENTATION_MODE)
|
|
4224
|
+
candidates = [lastPipVideo];
|
|
4225
|
+
else
|
|
4226
|
+
candidates = globalThis.document.querySelectorAll('video');
|
|
4227
|
+
for (var i = 0; i < candidates.length; i++) {
|
|
4228
|
+
var video = candidates[i];
|
|
4229
|
+
if (typeof video.webkitSetPresentationMode === 'function' && video.webkitPresentationMode === PIP_PRESENTATION_MODE) {
|
|
4230
|
+
video.webkitSetPresentationMode(INLINE_PRESENTATION_MODE);
|
|
4231
|
+
lastPipVideo = null;
|
|
4232
|
+
return resolve();
|
|
4233
|
+
}
|
|
4169
4234
|
}
|
|
4235
|
+
if (getElement() === null)
|
|
4236
|
+
return resolve();
|
|
4237
|
+
reject(new NotSupportedError('Failed to exit Picture-in-Picture mode.'));
|
|
4170
4238
|
}
|
|
4171
|
-
|
|
4239
|
+
var method = globalThis.document.exitPictureInPicture;
|
|
4240
|
+
if (typeof method === 'function') {
|
|
4241
|
+
var result = method.call(globalThis.document);
|
|
4242
|
+
if (typeof result !== 'undefined' && typeof result.then === 'function') {
|
|
4243
|
+
result
|
|
4244
|
+
.then(resolve)
|
|
4245
|
+
.catch(function () {
|
|
4246
|
+
fallbackToWebkitVideo();
|
|
4247
|
+
});
|
|
4248
|
+
return;
|
|
4249
|
+
}
|
|
4172
4250
|
return resolve();
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
}
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
return
|
|
4181
|
-
|
|
4251
|
+
}
|
|
4252
|
+
fallbackToWebkitVideo();
|
|
4253
|
+
});
|
|
4254
|
+
}
|
|
4255
|
+
function toggle(target) {
|
|
4256
|
+
if (lastIntendedOperation === 'request')
|
|
4257
|
+
return exit();
|
|
4258
|
+
return request(target);
|
|
4259
|
+
}
|
|
4260
|
+
bridgeEvents();
|
|
4261
|
+
return {
|
|
4262
|
+
get supported() {
|
|
4263
|
+
return getEnabled();
|
|
4264
|
+
},
|
|
4265
|
+
get element() {
|
|
4266
|
+
return getElement();
|
|
4267
|
+
},
|
|
4268
|
+
get isPip() {
|
|
4269
|
+
return getIsPip();
|
|
4270
|
+
},
|
|
4271
|
+
request: request,
|
|
4272
|
+
exit: exit,
|
|
4273
|
+
toggle: toggle,
|
|
4274
|
+
onChange: onChangeSubscriptionManager.subscribe,
|
|
4275
|
+
onError: onErrorSubscriptionManager.subscribe,
|
|
4276
|
+
Constants: {},
|
|
4277
|
+
Errors: {
|
|
4278
|
+
NotSupportedError: NotSupportedError,
|
|
4279
|
+
},
|
|
4280
|
+
};
|
|
4182
4281
|
}
|
|
4183
|
-
|
|
4282
|
+
var Pip = createPip();
|
|
4184
4283
|
|
|
4185
4284
|
var Badge = {
|
|
4186
4285
|
set: set,
|
|
@@ -4294,10 +4393,10 @@ function attachOnChange() {
|
|
|
4294
4393
|
function detachOnChange() {
|
|
4295
4394
|
if (!supported() || batteryRef === null)
|
|
4296
4395
|
return;
|
|
4297
|
-
EventListener.
|
|
4298
|
-
EventListener.
|
|
4299
|
-
EventListener.
|
|
4300
|
-
EventListener.
|
|
4396
|
+
EventListener.remove(batteryRef, { type: 'chargingchange', callback: onBatteryChange });
|
|
4397
|
+
EventListener.remove(batteryRef, { type: 'levelchange', callback: onBatteryChange });
|
|
4398
|
+
EventListener.remove(batteryRef, { type: 'chargingtimechange', callback: onBatteryChange });
|
|
4399
|
+
EventListener.remove(batteryRef, { type: 'dischargingtimechange', callback: onBatteryChange });
|
|
4301
4400
|
batteryRef = null;
|
|
4302
4401
|
}
|
|
4303
4402
|
function onBatteryChange() {
|