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