native-fn 1.0.89 → 1.1.0
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 +747 -29
- package/dist/native.cjs +4283 -74
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +4283 -74
- package/dist/native.umd.js +4283 -74
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +637 -663
- package/dist/plugin/app/index.d.ts +4 -114
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +637 -663
- package/dist/plugin/app/index.umd.js +637 -663
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/app/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/app/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/app/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/app/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/app/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/app/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/app/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/app/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/app/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/app/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/app/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/app/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/app/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/app/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/app/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/app/src/types/native.d.ts +16 -26
- package/dist/plugin/appearance/index.cjs +392 -585
- package/dist/plugin/appearance/index.d.ts +4 -37
- package/dist/plugin/appearance/index.min.cjs +1 -1
- package/dist/plugin/appearance/index.min.mjs +1 -1
- package/dist/plugin/appearance/index.mjs +392 -585
- package/dist/plugin/appearance/index.umd.js +392 -585
- package/dist/plugin/appearance/index.umd.min.js +1 -1
- package/dist/plugin/appearance/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/appearance/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/appearance/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/appearance/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/appearance/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/appearance/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/appearance/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/appearance/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/appearance/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/appearance/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/appearance/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/appearance/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/appearance/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/appearance/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/appearance/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/appearance/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/appearance/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/appearance/src/types/native.d.ts +16 -26
- package/dist/plugin/clipboard/index.cjs +48 -822
- package/dist/plugin/clipboard/index.d.ts +4 -27
- package/dist/plugin/clipboard/index.min.cjs +1 -1
- package/dist/plugin/clipboard/index.min.mjs +1 -1
- package/dist/plugin/clipboard/index.mjs +48 -822
- package/dist/plugin/clipboard/index.umd.js +48 -822
- package/dist/plugin/clipboard/index.umd.min.js +1 -1
- package/dist/plugin/clipboard/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/clipboard/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/clipboard/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/clipboard/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/clipboard/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/clipboard/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/clipboard/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/clipboard/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/clipboard/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/clipboard/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/clipboard/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/clipboard/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/clipboard/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/clipboard/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/clipboard/src/types/native.d.ts +16 -26
- package/dist/plugin/dimension/index.cjs +3 -883
- package/dist/plugin/dimension/index.d.ts +4 -36
- package/dist/plugin/dimension/index.min.cjs +1 -1
- package/dist/plugin/dimension/index.min.mjs +1 -1
- package/dist/plugin/dimension/index.mjs +3 -883
- package/dist/plugin/dimension/index.umd.js +3 -883
- package/dist/plugin/dimension/index.umd.min.js +1 -1
- package/dist/plugin/dimension/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/dimension/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/dimension/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/dimension/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/dimension/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/dimension/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/dimension/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/dimension/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/dimension/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/dimension/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/dimension/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/dimension/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/dimension/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/dimension/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/dimension/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/dimension/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/dimension/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/dimension/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/dimension/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/dimension/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/dimension/src/types/native.d.ts +16 -26
- package/dist/plugin/fullscreen/index.cjs +391 -588
- package/dist/plugin/fullscreen/index.d.ts +4 -33
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +391 -588
- package/dist/plugin/fullscreen/index.umd.js +391 -588
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/fullscreen/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/fullscreen/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/fullscreen/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/fullscreen/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/fullscreen/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/fullscreen/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/fullscreen/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/fullscreen/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/fullscreen/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/fullscreen/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/fullscreen/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/fullscreen/src/types/native.d.ts +16 -26
- package/dist/plugin/platform/index.cjs +409 -488
- package/dist/plugin/platform/index.d.ts +4 -96
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +409 -488
- package/dist/plugin/platform/index.umd.js +409 -488
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/platform/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/platform/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/platform/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/platform/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/platform/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/platform/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/platform/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/platform/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/platform/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/platform/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/platform/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/platform/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/platform/src/types/native.d.ts +16 -26
- package/dist/plugin/theme/index.cjs +390 -461
- package/dist/plugin/theme/index.d.ts +4 -27
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +390 -461
- package/dist/plugin/theme/index.umd.js +390 -461
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/theme/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/theme/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/theme/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/theme/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/theme/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/theme/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/theme/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/theme/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/theme/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/theme/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/theme/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/theme/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/theme/src/types/native.d.ts +16 -26
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/errors/not-supported-error.d.ts +2 -0
- package/dist/src/errors/permission-not-granted-error.d.ts +2 -0
- package/dist/src/plugin/Display/constants/index.d.ts +4 -0
- package/dist/src/plugin/Display/cores/index.d.ts +3 -0
- package/dist/src/plugin/Display/index.d.ts +3 -0
- package/dist/src/plugin/Display/types/display.d.ts +13 -0
- package/dist/src/plugin/Display/types/index.d.ts +1 -0
- package/dist/src/plugin/app/constants/index.d.ts +21 -0
- package/dist/src/plugin/app/cores/index.d.ts +10 -2
- package/dist/src/plugin/app/index.d.ts +2 -11
- package/dist/src/plugin/app/types/app.d.ts +73 -3
- package/dist/src/plugin/app/types/index.d.ts +0 -15
- package/dist/src/plugin/appearance/constants/index.d.ts +1 -4
- package/dist/src/plugin/appearance/index.d.ts +2 -7
- package/dist/src/plugin/appearance/types/appearance.d.ts +5 -2
- package/dist/src/plugin/appearance/types/appearanceInstance.d.ts +9 -0
- package/dist/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/src/plugin/badge/cores/index.d.ts +3 -0
- package/dist/src/plugin/badge/index.d.ts +3 -0
- package/dist/src/plugin/badge/types/badge.d.ts +10 -0
- package/dist/src/plugin/badge/types/index.d.ts +1 -0
- package/dist/src/plugin/battery/cores/index.d.ts +3 -0
- package/dist/src/plugin/battery/index.d.ts +3 -0
- package/dist/src/plugin/battery/types/battery.d.ts +26 -0
- package/dist/src/plugin/battery/types/index.d.ts +1 -0
- package/dist/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/src/plugin/clipboard/types/clipboard.d.ts +2 -0
- package/dist/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/src/plugin/dimension/constants/index.d.ts +42 -2
- package/dist/src/plugin/dimension/index.d.ts +3 -4
- package/dist/src/plugin/dimension/types/dimensions.d.ts +24 -1
- package/dist/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/src/plugin/dimension/utils/create-env-observer.d.ts +24 -0
- package/dist/src/plugin/fullscreen/cores/index.d.ts +3 -1
- package/dist/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +11 -6
- package/dist/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/src/plugin/geolocation/constants/index.d.ts +2 -0
- package/dist/src/plugin/geolocation/cores/index.d.ts +3 -0
- package/dist/src/plugin/geolocation/index.d.ts +3 -0
- package/dist/src/plugin/geolocation/types/geolocation.d.ts +12 -0
- package/dist/src/plugin/geolocation/types/index.d.ts +1 -0
- package/dist/src/plugin/network/cores/index.d.ts +15 -0
- package/dist/src/plugin/network/index.d.ts +3 -0
- package/dist/src/plugin/network/types/index.d.ts +1 -0
- package/dist/src/plugin/network/types/network.d.ts +4 -0
- package/dist/src/plugin/notification/cores/index.d.ts +3 -0
- package/dist/src/plugin/notification/index.d.ts +3 -0
- package/dist/src/plugin/notification/types/index.d.ts +1 -0
- package/dist/src/plugin/notification/types/notification.d.ts +27 -0
- package/dist/src/plugin/open/constants/index.d.ts +28 -0
- package/dist/src/plugin/open/cores/index.d.ts +55 -0
- package/dist/src/plugin/open/errors/not-supported-error.d.ts +2 -0
- package/dist/src/plugin/open/errors/url-open-error.d.ts +2 -0
- package/dist/src/plugin/open/errors/user-cancel-error.d.ts +2 -0
- package/dist/src/plugin/open/index.d.ts +3 -0
- package/dist/src/plugin/open/types/index.d.ts +1 -0
- package/dist/src/plugin/open/types/open.d.ts +187 -0
- package/dist/src/plugin/permission/constants/index.d.ts +22 -0
- package/dist/src/plugin/permission/cores/index.d.ts +3 -0
- package/dist/src/plugin/permission/index.d.ts +3 -0
- package/dist/src/plugin/permission/types/index.d.ts +1 -0
- package/dist/src/plugin/permission/types/permission.d.ts +10 -0
- package/dist/src/plugin/pip/cores/index.d.ts +12 -0
- package/dist/src/plugin/pip/index.d.ts +3 -0
- package/dist/src/plugin/pip/types/index.d.ts +1 -0
- package/dist/src/plugin/pip/types/pip.d.ts +15 -0
- package/dist/src/plugin/platform/constants/index.d.ts +5 -6
- package/dist/src/plugin/platform/cores/index.d.ts +36 -5
- package/dist/src/plugin/platform/index.d.ts +2 -11
- package/dist/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/src/plugin/platform/types/platform.d.ts +31 -14
- package/dist/src/plugin/pwa/cores/index.d.ts +3 -0
- package/dist/src/plugin/pwa/index.d.ts +3 -0
- package/dist/src/plugin/pwa/types/index.d.ts +1 -0
- package/dist/src/plugin/pwa/types/pwa.d.ts +8 -0
- package/dist/src/plugin/speech/cores/index.d.ts +53 -0
- package/dist/src/plugin/speech/index.d.ts +3 -0
- package/dist/src/plugin/speech/types/index.d.ts +1 -0
- package/dist/src/plugin/speech/types/speech.d.ts +9 -0
- package/dist/src/plugin/theme/index.d.ts +2 -4
- package/dist/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/src/plugin/theme/types/theme.d.ts +2 -0
- package/dist/src/plugin/vibration/cores/index.d.ts +3 -0
- package/dist/src/plugin/vibration/index.d.ts +3 -0
- package/dist/src/plugin/vibration/types/index.d.ts +1 -0
- package/dist/src/plugin/vibration/types/vibration.d.ts +9 -0
- package/dist/src/types/event-listener.d.ts +35 -0
- package/dist/src/types/index.d.ts +3 -0
- package/dist/src/types/listener-entry.d.ts +0 -1
- package/dist/src/types/native.d.ts +30 -26
- package/dist/src/types/subscription-manager.d.ts +4 -0
- package/dist/src/utils/create-env-observer.d.ts +8 -0
- package/dist/src/utils/create-hidden-element.d.ts +1 -1
- package/dist/src/utils/create-subscription-manager.d.ts +2 -0
- package/dist/src/utils/defer.d.ts +1 -0
- package/dist/src/utils/event-listener.d.ts +3 -0
- package/dist/src/utils/keys.d.ts +1 -0
- package/dist/src/utils/now.d.ts +1 -0
- package/dist/src/utils/pad-start.d.ts +1 -0
- package/dist/src/utils/random-string.d.ts +1 -0
- package/dist/src/utils/set-style.d.ts +3 -0
- package/package.json +1 -1
|
@@ -27,6 +27,33 @@
|
|
|
27
27
|
return 0;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
function resolveWindowsVersion(string) {
|
|
31
|
+
if (typeof string === 'undefined')
|
|
32
|
+
return '';
|
|
33
|
+
var mapped = {
|
|
34
|
+
'4.90': 'ME',
|
|
35
|
+
'NT3.51': 'NT 3.11',
|
|
36
|
+
'NT4.0': 'NT 4.0',
|
|
37
|
+
'NT 5.0': '2000',
|
|
38
|
+
'NT 5.1': 'XP',
|
|
39
|
+
'NT 5.2': 'XP',
|
|
40
|
+
'NT 6.0': 'Vista',
|
|
41
|
+
'NT 6.1': '7',
|
|
42
|
+
'NT 6.2': '8',
|
|
43
|
+
'NT 6.3': '8.1',
|
|
44
|
+
'NT 6.4': '10',
|
|
45
|
+
'NT 10.0': '10',
|
|
46
|
+
'ARM': 'RT'
|
|
47
|
+
}[string];
|
|
48
|
+
if (typeof mapped !== 'undefined')
|
|
49
|
+
return mapped;
|
|
50
|
+
return string;
|
|
51
|
+
}
|
|
52
|
+
function resolveUnderscoreVersion(string) {
|
|
53
|
+
if (typeof string === 'undefined')
|
|
54
|
+
return '';
|
|
55
|
+
return string.replace(/_/g, '.');
|
|
56
|
+
}
|
|
30
57
|
var OS;
|
|
31
58
|
(function (OS) {
|
|
32
59
|
OS["Unknown"] = "Unknown";
|
|
@@ -66,13 +93,6 @@
|
|
|
66
93
|
Browsers["IE"] = "IE";
|
|
67
94
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
68
95
|
})(Browsers || (Browsers = {}));
|
|
69
|
-
var CrossPlatformFramework;
|
|
70
|
-
(function (CrossPlatformFramework) {
|
|
71
|
-
CrossPlatformFramework["Unknown"] = "Unknown";
|
|
72
|
-
CrossPlatformFramework["ReactNative"] = "ReactNative";
|
|
73
|
-
CrossPlatformFramework["Electron"] = "Electron";
|
|
74
|
-
CrossPlatformFramework["Cordova"] = "Cordova";
|
|
75
|
-
})(CrossPlatformFramework || (CrossPlatformFramework = {}));
|
|
76
96
|
var USER_AGENT = typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgent === 'string' ? globalThis.navigator.userAgent : '';
|
|
77
97
|
var HIGH_ENTROPY_BRAND_NAME_MAP = {
|
|
78
98
|
'Google Chrome': 'Chrome',
|
|
@@ -82,82 +102,7 @@
|
|
|
82
102
|
'HeadlessChrome': 'Chrome Headless',
|
|
83
103
|
'OperaMobile': 'Opera Mobi',
|
|
84
104
|
};
|
|
85
|
-
|
|
86
|
-
var readyState = 'loading';
|
|
87
|
-
var readyCallback = [];
|
|
88
|
-
var pendingTasks = 0;
|
|
89
|
-
var Platform = {
|
|
90
|
-
os: { name: OS.Unknown, version: '' },
|
|
91
|
-
engine: { name: Engines.Unknown, version: '' },
|
|
92
|
-
browser: { name: Browsers.Unknown, version: '' },
|
|
93
|
-
crossPlatformFramework: CrossPlatformFramework.Unknown,
|
|
94
|
-
userAgent: USER_AGENT,
|
|
95
|
-
get locale() {
|
|
96
|
-
return getLocale();
|
|
97
|
-
},
|
|
98
|
-
get device() {
|
|
99
|
-
if (this.os.name === OS.iOS || this.os.name === OS.Android)
|
|
100
|
-
return Devices.Mobile;
|
|
101
|
-
if (this.os.name === OS.Windows || this.os.name === OS.MacOS)
|
|
102
|
-
return Devices.Desktop;
|
|
103
|
-
return Devices.Unknown;
|
|
104
|
-
},
|
|
105
|
-
get renderer() {
|
|
106
|
-
return getRenderer();
|
|
107
|
-
},
|
|
108
|
-
get isWebview() {
|
|
109
|
-
return /; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent);
|
|
110
|
-
},
|
|
111
|
-
get isNode() {
|
|
112
|
-
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
113
|
-
},
|
|
114
|
-
get isStandalone() {
|
|
115
|
-
if (this.os.name === OS.iOS)
|
|
116
|
-
return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
|
|
117
|
-
if (!('matchMedia' in globalThis))
|
|
118
|
-
return false;
|
|
119
|
-
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
120
|
-
},
|
|
121
|
-
onready: function (callback) {
|
|
122
|
-
if (readyState === 'complete') {
|
|
123
|
-
try {
|
|
124
|
-
callback(this);
|
|
125
|
-
}
|
|
126
|
-
catch (_) {
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
readyCallback.push(callback);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
function resolveWindowsVersion(string) {
|
|
135
|
-
if (typeof string === 'undefined')
|
|
136
|
-
return '';
|
|
137
|
-
var mapped = {
|
|
138
|
-
'4.90': 'ME',
|
|
139
|
-
'NT3.51': 'NT 3.11',
|
|
140
|
-
'NT4.0': 'NT 4.0',
|
|
141
|
-
'NT 5.0': '2000',
|
|
142
|
-
'NT 5.1': 'XP',
|
|
143
|
-
'NT 5.2': 'XP',
|
|
144
|
-
'NT 6.0': 'Vista',
|
|
145
|
-
'NT 6.1': '7',
|
|
146
|
-
'NT 6.2': '8',
|
|
147
|
-
'NT 6.3': '8.1',
|
|
148
|
-
'NT 6.4': '10',
|
|
149
|
-
'NT 10.0': '10',
|
|
150
|
-
'ARM': 'RT'
|
|
151
|
-
}[string];
|
|
152
|
-
if (typeof mapped !== 'undefined')
|
|
153
|
-
return mapped;
|
|
154
|
-
return string;
|
|
155
|
-
}
|
|
156
|
-
function resolveUnderscoreVersion(string) {
|
|
157
|
-
if (typeof string === 'undefined')
|
|
158
|
-
return '';
|
|
159
|
-
return string.replace(/_/g, '.');
|
|
160
|
-
}
|
|
105
|
+
var RTL_LANGUAGES = ['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'iw', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi'];
|
|
161
106
|
var OS_RESOLVER_MAP = [
|
|
162
107
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
163
108
|
[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -216,157 +161,237 @@
|
|
|
216
161
|
[/mobile vr; rv:([\w.]+)\).+firefox/i, Browsers.Firefox],
|
|
217
162
|
[/firefox\/([\w.]+)/i, Browsers.Firefox],
|
|
218
163
|
];
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
164
|
+
var BOT_REGEXP = [
|
|
165
|
+
/ daum[ /]/i,
|
|
166
|
+
/ deusu\//i,
|
|
167
|
+
/(?:^|[^g])news(?!sapphire)/i,
|
|
168
|
+
/(?<! (?:channel\/|google\/))google(?!(app|\/google| pixel))/i,
|
|
169
|
+
/(?<! cu)bots?(?:\b|_)/i,
|
|
170
|
+
/(?<!lib)http/i,
|
|
171
|
+
/(?<![hg]m)score/i,
|
|
172
|
+
/(?<!cam)scan/i,
|
|
173
|
+
/24x7/i,
|
|
174
|
+
/@[a-z][\w-]+\./i,
|
|
175
|
+
/\(\)/i,
|
|
176
|
+
/\.com\b/i,
|
|
177
|
+
/\b\w+\.ai/i,
|
|
178
|
+
/\bmanus-user\//i,
|
|
179
|
+
/\bort\//i,
|
|
180
|
+
/\bperl\b/i,
|
|
181
|
+
/\bsecurityheaders\b/i,
|
|
182
|
+
/\btime\//i,
|
|
183
|
+
/\|/i,
|
|
184
|
+
/^[\w .\-(?:)%]+(?:\/v?\d+(?:\.\d+)?(?:\.\d{1,10})*?)?(?:,|$)/i,
|
|
185
|
+
/^[^ ]{50,}$/i,
|
|
186
|
+
/^\d+\b/i,
|
|
187
|
+
/^\W/i,
|
|
188
|
+
/^\w*search\b/i,
|
|
189
|
+
/^\w+\/[\w()]*$/i,
|
|
190
|
+
/^\w+\/\d\.\d\s\([\w@]+\)$/i,
|
|
191
|
+
/^active/i,
|
|
192
|
+
/^ad muncher/i,
|
|
193
|
+
/^amaya/i,
|
|
194
|
+
/^apache\//i,
|
|
195
|
+
/^avsdevicesdk\//i,
|
|
196
|
+
/^azure/i,
|
|
197
|
+
/^biglotron/i,
|
|
198
|
+
/^bot/i,
|
|
199
|
+
/^bw\//i,
|
|
200
|
+
/^clamav[ /]/i,
|
|
201
|
+
/^client\//i,
|
|
202
|
+
/^cobweb\//i,
|
|
203
|
+
/^custom/i,
|
|
204
|
+
/^ddg[_-]android/i,
|
|
205
|
+
/^discourse/i,
|
|
206
|
+
/^dispatch\/\d/i,
|
|
207
|
+
/^downcast\//i,
|
|
208
|
+
/^duckduckgo/i,
|
|
209
|
+
/^email/i,
|
|
210
|
+
/^facebook/i,
|
|
211
|
+
/^getright\//i,
|
|
212
|
+
/^gozilla\//i,
|
|
213
|
+
/^hobbit/i,
|
|
214
|
+
/^hotzonu/i,
|
|
215
|
+
/^hwcdn\//i,
|
|
216
|
+
/^igetter\//i,
|
|
217
|
+
/^jeode\//i,
|
|
218
|
+
/^jetty\//i,
|
|
219
|
+
/^jigsaw/i,
|
|
220
|
+
/^microsoft bits/i,
|
|
221
|
+
/^movabletype/i,
|
|
222
|
+
/^mozilla\/\d\.\d\s[\w.-]+$/i,
|
|
223
|
+
/^mozilla\/\d\.\d\s\(compatible;?(?:\s[\w-.]+\/\d+\.\d+)?\)$/i,
|
|
224
|
+
/^navermailapp/i,
|
|
225
|
+
/^netsurf/i,
|
|
226
|
+
/^offline/i,
|
|
227
|
+
/^openai\//i,
|
|
228
|
+
/^owler/i,
|
|
229
|
+
/^php/i,
|
|
230
|
+
/^postman/i,
|
|
231
|
+
/^python/i,
|
|
232
|
+
/^rank/i,
|
|
233
|
+
/^read/i,
|
|
234
|
+
/^reed/i,
|
|
235
|
+
/^rest/i,
|
|
236
|
+
/^rss/i,
|
|
237
|
+
/^snapchat/i,
|
|
238
|
+
/^space bison/i,
|
|
239
|
+
/^svn/i,
|
|
240
|
+
/^swcd /i,
|
|
241
|
+
/^taringa/i,
|
|
242
|
+
/^thumbor\//i,
|
|
243
|
+
/^track/i,
|
|
244
|
+
/^w3c/i,
|
|
245
|
+
/^webbandit\//i,
|
|
246
|
+
/^webcopier/i,
|
|
247
|
+
/^wget/i,
|
|
248
|
+
/^whatsapp/i,
|
|
249
|
+
/^wordpress/i,
|
|
250
|
+
/^xenu link sleuth/i,
|
|
251
|
+
/^yahoo/i,
|
|
252
|
+
/^yandex/i,
|
|
253
|
+
/^zdm\/\d/i,
|
|
254
|
+
/^zoom marketplace\//i,
|
|
255
|
+
/advisor/i,
|
|
256
|
+
/agent\b/i,
|
|
257
|
+
/analyzer/i,
|
|
258
|
+
/archive/i,
|
|
259
|
+
/ask jeeves\/teoma/i,
|
|
260
|
+
/audit/i,
|
|
261
|
+
/bit\.ly\//i,
|
|
262
|
+
/bluecoat drtr/i,
|
|
263
|
+
/browsex/i,
|
|
264
|
+
/burpcollaborator/i,
|
|
265
|
+
/capture/i,
|
|
266
|
+
/catch/i,
|
|
267
|
+
/check\b/i,
|
|
268
|
+
/checker/i,
|
|
269
|
+
/chrome-lighthouse/i,
|
|
270
|
+
/chromeframe/i,
|
|
271
|
+
/classifier/i,
|
|
272
|
+
/cloudflare/i,
|
|
273
|
+
/convertify/i,
|
|
274
|
+
/crawl/i,
|
|
275
|
+
/cypress\//i,
|
|
276
|
+
/dareboost/i,
|
|
277
|
+
/datanyze/i,
|
|
278
|
+
/dejaclick/i,
|
|
279
|
+
/detect/i,
|
|
280
|
+
/dmbrowser/i,
|
|
281
|
+
/download/i,
|
|
282
|
+
/exaleadcloudview/i,
|
|
283
|
+
/feed/i,
|
|
284
|
+
/fetcher/i,
|
|
285
|
+
/firephp/i,
|
|
286
|
+
/functionize/i,
|
|
287
|
+
/grab/i,
|
|
288
|
+
/headless/i,
|
|
289
|
+
/httrack/i,
|
|
290
|
+
/hubspot marketing grader/i,
|
|
291
|
+
/ibisbrowser/i,
|
|
292
|
+
/infrawatch/i,
|
|
293
|
+
/insight/i,
|
|
294
|
+
/inspect/i,
|
|
295
|
+
/iplabel/i,
|
|
296
|
+
/java(?!;)/i,
|
|
297
|
+
/library/i,
|
|
298
|
+
/linkcheck/i,
|
|
299
|
+
/mail\.ru\//i,
|
|
300
|
+
/manager/i,
|
|
301
|
+
/measure/i,
|
|
302
|
+
/neustar wpm/i,
|
|
303
|
+
/node\b/i,
|
|
304
|
+
/nutch/i,
|
|
305
|
+
/offbyone/i,
|
|
306
|
+
/onetrust/i,
|
|
307
|
+
/optimize/i,
|
|
308
|
+
/pageburst/i,
|
|
309
|
+
/pagespeed/i,
|
|
310
|
+
/parser/i,
|
|
311
|
+
/phantomjs/i,
|
|
312
|
+
/pingdom/i,
|
|
313
|
+
/powermarks/i,
|
|
314
|
+
/preview/i,
|
|
315
|
+
/proxy/i,
|
|
316
|
+
/ptst[ /]\d/i,
|
|
317
|
+
/retriever/i,
|
|
318
|
+
/rexx;/i,
|
|
319
|
+
/rigor/i,
|
|
320
|
+
/rss\b/i,
|
|
321
|
+
/scrape/i,
|
|
322
|
+
/server/i,
|
|
323
|
+
/sogou/i,
|
|
324
|
+
/sparkler\//i,
|
|
325
|
+
/speedcurve/i,
|
|
326
|
+
/spider/i,
|
|
327
|
+
/splash/i,
|
|
328
|
+
/statuscake/i,
|
|
329
|
+
/supercleaner/i,
|
|
330
|
+
/synapse/i,
|
|
331
|
+
/synthetic/i,
|
|
332
|
+
/tools/i,
|
|
333
|
+
/torrent/i,
|
|
334
|
+
/transcoder/i,
|
|
335
|
+
/url/i,
|
|
336
|
+
/validator/i,
|
|
337
|
+
/virtuoso/i,
|
|
338
|
+
/wappalyzer/i,
|
|
339
|
+
/webglance/i,
|
|
340
|
+
/webkit2png/i,
|
|
341
|
+
/whatcms\//i,
|
|
342
|
+
/xtate\//i
|
|
343
|
+
];
|
|
344
|
+
|
|
345
|
+
var userAgent = USER_AGENT;
|
|
346
|
+
var Platform = {
|
|
347
|
+
get os() {
|
|
348
|
+
return getOS();
|
|
349
|
+
},
|
|
350
|
+
get engine() {
|
|
351
|
+
return getEngine();
|
|
352
|
+
},
|
|
353
|
+
get browser() {
|
|
354
|
+
return getBrowser();
|
|
355
|
+
},
|
|
356
|
+
get userAgent() {
|
|
357
|
+
return userAgent;
|
|
358
|
+
},
|
|
359
|
+
set userAgent(value) {
|
|
360
|
+
userAgent = value;
|
|
361
|
+
},
|
|
362
|
+
get locale() {
|
|
363
|
+
return getLocale();
|
|
364
|
+
},
|
|
365
|
+
get device() {
|
|
366
|
+
return getDevice();
|
|
367
|
+
},
|
|
368
|
+
get renderer() {
|
|
369
|
+
return getRenderer();
|
|
370
|
+
},
|
|
371
|
+
get isWebview() {
|
|
372
|
+
return getIsWebview();
|
|
373
|
+
},
|
|
374
|
+
get isNode() {
|
|
375
|
+
return getIsNode();
|
|
376
|
+
},
|
|
377
|
+
get isStandalone() {
|
|
378
|
+
return getIsStandalone();
|
|
379
|
+
},
|
|
380
|
+
get isBot() {
|
|
381
|
+
return getIsBot();
|
|
382
|
+
},
|
|
383
|
+
Constants: {
|
|
384
|
+
OS: OS,
|
|
385
|
+
Engines: Engines,
|
|
386
|
+
Browsers: Browsers,
|
|
387
|
+
Devices: Devices,
|
|
388
|
+
},
|
|
389
|
+
Errors: {},
|
|
390
|
+
};
|
|
391
|
+
var parsedFromHighEntropyValuesOS = {};
|
|
392
|
+
var parsedFromHighEntropyValuesBrowser = {};
|
|
393
|
+
var parsedFromHighEntropyValuesEngine = {};
|
|
394
|
+
var parsedFromHighEntropyValuesDevice = null;
|
|
370
395
|
function resolveVersion(string, resolver) {
|
|
371
396
|
if (typeof resolver === 'function')
|
|
372
397
|
return resolver(string);
|
|
@@ -383,54 +408,6 @@
|
|
|
383
408
|
return { brand: entry, version: '' };
|
|
384
409
|
return { brand: entry.brand, version: entry.version };
|
|
385
410
|
}
|
|
386
|
-
function getSemanticVersion(string) {
|
|
387
|
-
var parts = string.split('.');
|
|
388
|
-
return {
|
|
389
|
-
major: parseInt(parts[0] || '0'),
|
|
390
|
-
minor: parseInt(parts[1] || '0'),
|
|
391
|
-
build: parseInt(parts[2] || '0')
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
function parseOSFromCordova() {
|
|
395
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.Cordova;
|
|
396
|
-
if (typeof globalThis.device !== 'undefined') {
|
|
397
|
-
switch (globalThis.device.platform) {
|
|
398
|
-
case 'Android':
|
|
399
|
-
Platform.os = {
|
|
400
|
-
name: OS.Android,
|
|
401
|
-
version: globalThis.device.version,
|
|
402
|
-
};
|
|
403
|
-
break;
|
|
404
|
-
case 'iOS':
|
|
405
|
-
Platform.os = {
|
|
406
|
-
name: OS.iOS,
|
|
407
|
-
version: globalThis.device.version,
|
|
408
|
-
};
|
|
409
|
-
break;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
decrementPendingTasks();
|
|
413
|
-
}
|
|
414
|
-
function getRenderer() {
|
|
415
|
-
if (typeof globalThis.document === 'undefined')
|
|
416
|
-
return '';
|
|
417
|
-
var canvas = globalThis.document.createElement('canvas');
|
|
418
|
-
if (typeof canvas.getContext !== 'function')
|
|
419
|
-
return '';
|
|
420
|
-
var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
|
|
421
|
-
if (context === null)
|
|
422
|
-
return '';
|
|
423
|
-
if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
|
|
424
|
-
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
425
|
-
if (extension === null)
|
|
426
|
-
return context.getParameter(context.RENDERER);
|
|
427
|
-
else
|
|
428
|
-
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
431
|
-
return '';
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
411
|
function normalizeLocale(locale) {
|
|
435
412
|
if (locale === null || typeof locale === 'undefined')
|
|
436
413
|
return locale;
|
|
@@ -453,13 +430,35 @@
|
|
|
453
430
|
parts[1] = parts[1].charAt(0).toUpperCase() + parts[1].slice(1).toLowerCase();
|
|
454
431
|
return parts.join('-');
|
|
455
432
|
}
|
|
433
|
+
function getRenderer() {
|
|
434
|
+
if (typeof globalThis.document === 'undefined')
|
|
435
|
+
return '';
|
|
436
|
+
var canvas = globalThis.document.createElement('canvas');
|
|
437
|
+
if (typeof canvas.getContext !== 'function')
|
|
438
|
+
return '';
|
|
439
|
+
var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
|
|
440
|
+
if (context === null)
|
|
441
|
+
return '';
|
|
442
|
+
if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
|
|
443
|
+
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
444
|
+
if (extension === null)
|
|
445
|
+
return context.getParameter(context.RENDERER);
|
|
446
|
+
else
|
|
447
|
+
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
return '';
|
|
451
|
+
}
|
|
452
|
+
}
|
|
456
453
|
function getLocale() {
|
|
457
454
|
var locale = {
|
|
458
455
|
language: null,
|
|
459
456
|
languages: [],
|
|
460
457
|
timezone: null,
|
|
461
458
|
timezoneOffset: 0,
|
|
459
|
+
isRTL: false,
|
|
462
460
|
};
|
|
461
|
+
var isRTL = null;
|
|
463
462
|
function addLanguages(language) {
|
|
464
463
|
for (var i = 0; i < language.length; i++)
|
|
465
464
|
addLanguage(language[i]);
|
|
@@ -472,53 +471,6 @@
|
|
|
472
471
|
locale.languages.push(language);
|
|
473
472
|
}
|
|
474
473
|
}
|
|
475
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
|
|
476
|
-
try {
|
|
477
|
-
var reactNative = require('react-native');
|
|
478
|
-
var nativeModules = reactNative.NativeModules;
|
|
479
|
-
if (typeof nativeModules.SettingsManager !== 'undefined') {
|
|
480
|
-
var settingManager = nativeModules.SettingsManager;
|
|
481
|
-
if (typeof settingManager !== 'undefined') {
|
|
482
|
-
var constant = typeof settingManager.getConstants === 'function'
|
|
483
|
-
? settingManager.getConstants()
|
|
484
|
-
: settingManager;
|
|
485
|
-
if (typeof constant !== 'undefined' && typeof constant.settings !== 'undefined') {
|
|
486
|
-
var settings = constant.settings;
|
|
487
|
-
if (typeof settings.AppleLocale === 'string')
|
|
488
|
-
addLanguage(settings.AppleLocale);
|
|
489
|
-
if (Array.isArray(settings.AppleLanguages) && settings.AppleLanguages.length > 0)
|
|
490
|
-
addLanguages(settings.AppleLanguages);
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
if (typeof nativeModules.I18nManager !== 'undefined') {
|
|
495
|
-
var i18nManager = nativeModules.I18nManager;
|
|
496
|
-
if (typeof i18nManager !== 'undefined') {
|
|
497
|
-
var constant = typeof i18nManager.getConstants === 'function'
|
|
498
|
-
? i18nManager.getConstants()
|
|
499
|
-
: i18nManager;
|
|
500
|
-
if (typeof constant !== 'undefined' && typeof constant.localeIdentifier !== 'undefined')
|
|
501
|
-
addLanguage(constant.localeIdentifier);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
catch (_) {
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
509
|
-
try {
|
|
510
|
-
var electron = require('electron');
|
|
511
|
-
var app = electron.app;
|
|
512
|
-
if (typeof app.getLocale !== 'undefined')
|
|
513
|
-
addLanguage(app.getLocale());
|
|
514
|
-
if (typeof app.getSystemLocale !== 'undefined')
|
|
515
|
-
addLanguage(app.getSystemLocale());
|
|
516
|
-
if (typeof app.getPreferredSystemLanguages !== 'undefined')
|
|
517
|
-
addLanguages(app.getPreferredSystemLanguages());
|
|
518
|
-
}
|
|
519
|
-
catch (_) {
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
474
|
if (typeof Intl !== 'undefined') {
|
|
523
475
|
try {
|
|
524
476
|
addLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
@@ -548,13 +500,37 @@
|
|
|
548
500
|
}
|
|
549
501
|
catch (_) {
|
|
550
502
|
}
|
|
503
|
+
if (typeof locale.language === 'string') {
|
|
504
|
+
if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
|
|
505
|
+
try {
|
|
506
|
+
var intlLocale = new Intl.Locale(locale.language);
|
|
507
|
+
if (typeof intlLocale.getTextInfo === 'function')
|
|
508
|
+
isRTL = intlLocale.getTextInfo().direction === 'rtl';
|
|
509
|
+
else if (typeof intlLocale.textInfo !== 'undefined')
|
|
510
|
+
isRTL = intlLocale.textInfo.direction === 'rtl';
|
|
511
|
+
}
|
|
512
|
+
catch (_) {
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
if (typeof isRTL !== 'boolean') {
|
|
516
|
+
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(locale.language);
|
|
517
|
+
if (matched !== null) {
|
|
518
|
+
var language = matched[1].toLowerCase();
|
|
519
|
+
for (var i = 0; i < RTL_LANGUAGES.length; i++) {
|
|
520
|
+
if (RTL_LANGUAGES[i] === language) {
|
|
521
|
+
isRTL = true;
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
if (typeof isRTL === 'boolean')
|
|
529
|
+
locale.isRTL = isRTL;
|
|
551
530
|
return locale;
|
|
552
531
|
}
|
|
553
|
-
function
|
|
554
|
-
|
|
555
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
|
|
556
|
-
if (typeof globalThis.navigator !== 'undefined' && globalThis.navigator.product === 'ReactNative')
|
|
557
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.ReactNative;
|
|
532
|
+
function getOS() {
|
|
533
|
+
var result = { name: OS.Unknown, version: '' };
|
|
558
534
|
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
559
535
|
var map = OS_RESOLVER_MAP[i];
|
|
560
536
|
var regexp = map[0];
|
|
@@ -562,18 +538,26 @@
|
|
|
562
538
|
var resolver = map[2];
|
|
563
539
|
var matched = Platform.userAgent.match(regexp);
|
|
564
540
|
if (matched !== null) {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
version: resolveVersion(matched[1], resolver),
|
|
568
|
-
};
|
|
541
|
+
result.name = os;
|
|
542
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
569
543
|
break;
|
|
570
544
|
}
|
|
571
545
|
}
|
|
572
|
-
if (
|
|
546
|
+
if (result.name === OS.iOS && compareVersion(result.version, '18.6') === 0) {
|
|
573
547
|
var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
|
|
574
548
|
if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
|
|
575
|
-
|
|
549
|
+
result.version = version[1];
|
|
550
|
+
}
|
|
551
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
552
|
+
if (typeof parsedFromHighEntropyValuesOS.name !== 'undefined')
|
|
553
|
+
result.name = parsedFromHighEntropyValuesOS.name;
|
|
554
|
+
if (typeof parsedFromHighEntropyValuesOS.version !== 'undefined')
|
|
555
|
+
result.version = parsedFromHighEntropyValuesOS.version;
|
|
576
556
|
}
|
|
557
|
+
return result;
|
|
558
|
+
}
|
|
559
|
+
function getEngine() {
|
|
560
|
+
var result = { name: Engines.Unknown, version: '' };
|
|
577
561
|
for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
|
|
578
562
|
var map = ENGINE_RESOLVER_MAP[i];
|
|
579
563
|
var regexp = map[0];
|
|
@@ -581,13 +565,21 @@
|
|
|
581
565
|
var resolver = map[2];
|
|
582
566
|
var matched = Platform.userAgent.match(regexp);
|
|
583
567
|
if (matched !== null) {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
version: resolveVersion(matched[1], resolver),
|
|
587
|
-
};
|
|
568
|
+
result.name = engine;
|
|
569
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
588
570
|
break;
|
|
589
571
|
}
|
|
590
572
|
}
|
|
573
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
574
|
+
if (typeof parsedFromHighEntropyValuesEngine.name !== 'undefined')
|
|
575
|
+
result.name = parsedFromHighEntropyValuesEngine.name;
|
|
576
|
+
if (typeof parsedFromHighEntropyValuesEngine.version !== 'undefined')
|
|
577
|
+
result.version = parsedFromHighEntropyValuesEngine.version;
|
|
578
|
+
}
|
|
579
|
+
return result;
|
|
580
|
+
}
|
|
581
|
+
function getBrowser() {
|
|
582
|
+
var result = { name: Browsers.Unknown, version: '' };
|
|
591
583
|
for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
592
584
|
var map = BROWSER_RESOLVER_MAP[i];
|
|
593
585
|
var regexp = map[0];
|
|
@@ -595,102 +587,49 @@
|
|
|
595
587
|
var resolver = map[2];
|
|
596
588
|
var matched = Platform.userAgent.match(regexp);
|
|
597
589
|
if (matched !== null) {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
version: resolveVersion(matched[1], resolver),
|
|
601
|
-
};
|
|
590
|
+
result.name = browser;
|
|
591
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
602
592
|
break;
|
|
603
593
|
}
|
|
604
594
|
}
|
|
605
|
-
if (Platform.
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
var release = '' + platform.Version;
|
|
611
|
-
var version = getSemanticVersion(release);
|
|
612
|
-
switch (os) {
|
|
613
|
-
case 'android':
|
|
614
|
-
Platform.os = {
|
|
615
|
-
name: OS.Android,
|
|
616
|
-
version: resolveSemanticAndroidVersion(version, release),
|
|
617
|
-
};
|
|
618
|
-
break;
|
|
619
|
-
case 'ios':
|
|
620
|
-
Platform.os = {
|
|
621
|
-
name: OS.iOS,
|
|
622
|
-
version: release,
|
|
623
|
-
};
|
|
624
|
-
break;
|
|
625
|
-
case 'windows':
|
|
626
|
-
Platform.os = {
|
|
627
|
-
name: OS.Windows,
|
|
628
|
-
version: resolveSemanticWindowsVersion(version, release),
|
|
629
|
-
};
|
|
630
|
-
break;
|
|
631
|
-
case 'macos':
|
|
632
|
-
Platform.os = {
|
|
633
|
-
name: OS.MacOS,
|
|
634
|
-
version: release,
|
|
635
|
-
};
|
|
636
|
-
break;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
catch (_) {
|
|
640
|
-
}
|
|
641
|
-
finally {
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
if (Platform.isNode) {
|
|
645
|
-
try {
|
|
646
|
-
var os = require('os');
|
|
647
|
-
var platform = os.platform();
|
|
648
|
-
var release = os.release();
|
|
649
|
-
var version = getSemanticVersion(release);
|
|
650
|
-
switch (platform) {
|
|
651
|
-
case 'win32':
|
|
652
|
-
Platform.os = {
|
|
653
|
-
name: OS.Windows,
|
|
654
|
-
version: resolveSemanticWindowsVersion(version, release),
|
|
655
|
-
};
|
|
656
|
-
break;
|
|
657
|
-
case 'darwin':
|
|
658
|
-
Platform.os = {
|
|
659
|
-
name: OS.MacOS,
|
|
660
|
-
version: resolveSemanticDarwinVersion(version, release),
|
|
661
|
-
};
|
|
662
|
-
break;
|
|
663
|
-
case 'android':
|
|
664
|
-
Platform.os = {
|
|
665
|
-
name: OS.Android,
|
|
666
|
-
version: release,
|
|
667
|
-
};
|
|
668
|
-
break;
|
|
669
|
-
case 'linux':
|
|
670
|
-
if (/android/i.test(release)) {
|
|
671
|
-
Platform.os = {
|
|
672
|
-
name: OS.Android,
|
|
673
|
-
version: release,
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
break;
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
catch (_) {
|
|
680
|
-
}
|
|
681
|
-
finally {
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
if (typeof globalThis.document !== 'undefined') {
|
|
685
|
-
if (typeof globalThis.device !== 'undefined') {
|
|
686
|
-
parseOSFromCordova();
|
|
687
|
-
}
|
|
688
|
-
else {
|
|
689
|
-
globalThis.document.addEventListener("deviceready", parseOSFromCordova, false);
|
|
690
|
-
}
|
|
595
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
596
|
+
if (typeof parsedFromHighEntropyValuesBrowser.name !== 'undefined')
|
|
597
|
+
result.name = parsedFromHighEntropyValuesBrowser.name;
|
|
598
|
+
if (typeof parsedFromHighEntropyValuesBrowser.version !== 'undefined')
|
|
599
|
+
result.version = parsedFromHighEntropyValuesBrowser.version;
|
|
691
600
|
}
|
|
601
|
+
return result;
|
|
602
|
+
}
|
|
603
|
+
function getDevice() {
|
|
604
|
+
if (Platform.userAgent === USER_AGENT && parsedFromHighEntropyValuesDevice !== null)
|
|
605
|
+
return parsedFromHighEntropyValuesDevice;
|
|
606
|
+
if (Platform.os.name === OS.iOS || Platform.os.name === OS.Android)
|
|
607
|
+
return Devices.Mobile;
|
|
608
|
+
if (Platform.os.name === OS.Windows || Platform.os.name === OS.MacOS)
|
|
609
|
+
return Devices.Desktop;
|
|
610
|
+
return Devices.Unknown;
|
|
611
|
+
}
|
|
612
|
+
function getIsWebview() {
|
|
613
|
+
return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
|
|
614
|
+
}
|
|
615
|
+
function getIsNode() {
|
|
616
|
+
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
617
|
+
}
|
|
618
|
+
function getIsStandalone() {
|
|
619
|
+
if (Platform.os.name === OS.iOS)
|
|
620
|
+
return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
|
|
621
|
+
if (!('matchMedia' in globalThis))
|
|
622
|
+
return false;
|
|
623
|
+
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
624
|
+
}
|
|
625
|
+
function getIsBot() {
|
|
626
|
+
for (var i = 0; i < BOT_REGEXP.length; i++)
|
|
627
|
+
if (BOT_REGEXP[i].test(Platform.userAgent))
|
|
628
|
+
return true;
|
|
629
|
+
return false;
|
|
630
|
+
}
|
|
631
|
+
function parseFromHighEntropyValues() {
|
|
692
632
|
if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgentData !== 'undefined' && typeof globalThis.navigator.userAgentData.getHighEntropyValues !== 'undefined') {
|
|
693
|
-
incrementPendingTasks();
|
|
694
633
|
globalThis.navigator.userAgentData.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
695
634
|
.then(function (result) {
|
|
696
635
|
try {
|
|
@@ -711,47 +650,43 @@
|
|
|
711
650
|
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
712
651
|
browserName = brandName;
|
|
713
652
|
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
714
|
-
|
|
653
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Chrome;
|
|
715
654
|
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
716
|
-
|
|
655
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Edge;
|
|
717
656
|
else if (browserName === 'Opera Mobi')
|
|
718
|
-
|
|
719
|
-
|
|
657
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Opera;
|
|
658
|
+
parsedFromHighEntropyValuesBrowser.version = brandVersion;
|
|
720
659
|
}
|
|
721
660
|
prevBrandName = brandName;
|
|
722
661
|
}
|
|
723
662
|
if (brandName === 'Chromium')
|
|
724
|
-
|
|
663
|
+
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
725
664
|
}
|
|
726
665
|
if (typeof platformVersion === 'string') {
|
|
727
666
|
if (Platform.os.name === OS.Windows)
|
|
728
|
-
|
|
667
|
+
parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
|
|
729
668
|
else
|
|
730
|
-
|
|
669
|
+
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
731
670
|
}
|
|
732
671
|
if (typeof platform === 'string') {
|
|
733
672
|
if (/android/i.test(platform))
|
|
734
|
-
|
|
673
|
+
parsedFromHighEntropyValuesOS.name = OS.Android;
|
|
735
674
|
else if (/ios|iphone|ipad/i.test(platform))
|
|
736
|
-
|
|
675
|
+
parsedFromHighEntropyValuesOS.name = OS.iOS;
|
|
737
676
|
else if (/windows|win32/i.test(platform))
|
|
738
|
-
|
|
677
|
+
parsedFromHighEntropyValuesOS.name = OS.Windows;
|
|
739
678
|
else if (/macos|macintel/i.test(platform))
|
|
740
|
-
|
|
679
|
+
parsedFromHighEntropyValuesOS.name = OS.MacOS;
|
|
741
680
|
}
|
|
742
681
|
if (result.mobile === true)
|
|
743
|
-
|
|
682
|
+
parsedFromHighEntropyValuesDevice = Devices.Mobile;
|
|
744
683
|
}
|
|
745
684
|
catch (_) {
|
|
746
685
|
}
|
|
747
|
-
finally {
|
|
748
|
-
decrementPendingTasks();
|
|
749
|
-
}
|
|
750
686
|
});
|
|
751
687
|
}
|
|
752
|
-
checkReady();
|
|
753
688
|
}
|
|
754
|
-
|
|
689
|
+
parseFromHighEntropyValues();
|
|
755
690
|
|
|
756
691
|
var Fullscreen = {
|
|
757
692
|
get enabled() {
|
|
@@ -768,12 +703,11 @@
|
|
|
768
703
|
toggle: toggle,
|
|
769
704
|
onchange: onchange,
|
|
770
705
|
onerror: onerror,
|
|
706
|
+
Constants: {},
|
|
707
|
+
Errors: {},
|
|
771
708
|
};
|
|
772
709
|
var lastIOSVideo = null;
|
|
773
|
-
var lastElectronBrowserWindow = null;
|
|
774
|
-
var lastElectronBrowserWindowOptions = null;
|
|
775
710
|
var eventsBridged = false;
|
|
776
|
-
var api = detectApi();
|
|
777
711
|
var API_VARIANTS = {
|
|
778
712
|
standard: {
|
|
779
713
|
enabled: 'fullscreenEnabled',
|
|
@@ -804,9 +738,8 @@
|
|
|
804
738
|
events: { change: 'MSFullscreenChange', error: 'MSFullscreenError' },
|
|
805
739
|
},
|
|
806
740
|
};
|
|
741
|
+
var api = detectApi();
|
|
807
742
|
function detectApi() {
|
|
808
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron)
|
|
809
|
-
return null;
|
|
810
743
|
var element = globalThis.document.documentElement;
|
|
811
744
|
if ('fullscreenEnabled' in globalThis.document || 'exitFullscreen' in globalThis.document) {
|
|
812
745
|
return API_VARIANTS.standard;
|
|
@@ -836,14 +769,6 @@
|
|
|
836
769
|
return null;
|
|
837
770
|
}
|
|
838
771
|
function getDefaultTarget() {
|
|
839
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
840
|
-
var electron = require('electron');
|
|
841
|
-
var browserWindow = electron.BrowserWindow;
|
|
842
|
-
var focusedWindow = browserWindow.getFocusedWindow() || browserWindow.getAllWindows()[0];
|
|
843
|
-
if (typeof focusedWindow === 'undefined')
|
|
844
|
-
throw new Error();
|
|
845
|
-
return focusedWindow;
|
|
846
|
-
}
|
|
847
772
|
if (Platform.os.name === OS.iOS) {
|
|
848
773
|
var video = globalThis.document.querySelector('video');
|
|
849
774
|
if (video === null)
|
|
@@ -852,16 +777,6 @@
|
|
|
852
777
|
}
|
|
853
778
|
return globalThis.document.documentElement;
|
|
854
779
|
}
|
|
855
|
-
function restoreElectronBrowserWindowOptions() {
|
|
856
|
-
if (lastElectronBrowserWindowOptions !== null) {
|
|
857
|
-
if (lastElectronBrowserWindow !== null) {
|
|
858
|
-
lastElectronBrowserWindow.fullScreenable = lastElectronBrowserWindowOptions.fullScreenable;
|
|
859
|
-
lastElectronBrowserWindow.autoHideMenuBar = lastElectronBrowserWindowOptions.autoHideMenuBar;
|
|
860
|
-
}
|
|
861
|
-
lastElectronBrowserWindowOptions = null;
|
|
862
|
-
}
|
|
863
|
-
lastElectronBrowserWindow = null;
|
|
864
|
-
}
|
|
865
780
|
function bridgeEvents() {
|
|
866
781
|
if (eventsBridged)
|
|
867
782
|
return;
|
|
@@ -883,41 +798,6 @@
|
|
|
883
798
|
function emitError() {
|
|
884
799
|
emit('fullscreenerror');
|
|
885
800
|
}
|
|
886
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
887
|
-
try {
|
|
888
|
-
var electron = require('electron');
|
|
889
|
-
var browserWindow = electron.BrowserWindow;
|
|
890
|
-
var allWindows = browserWindow.getAllWindows();
|
|
891
|
-
var _loop_1 = function (i) {
|
|
892
|
-
var currentWindow = allWindows[i];
|
|
893
|
-
currentWindow.on('enter-full-screen', function () {
|
|
894
|
-
lastElectronBrowserWindow = currentWindow;
|
|
895
|
-
emitChange();
|
|
896
|
-
});
|
|
897
|
-
currentWindow.on('leave-full-screen', function () {
|
|
898
|
-
restoreElectronBrowserWindowOptions();
|
|
899
|
-
emitChange();
|
|
900
|
-
});
|
|
901
|
-
};
|
|
902
|
-
for (var i = 0; i < allWindows.length; i++) {
|
|
903
|
-
_loop_1(i);
|
|
904
|
-
}
|
|
905
|
-
if (typeof browserWindow.on === 'function') {
|
|
906
|
-
browserWindow.on('browser-window-created', function (_, currentWindow) {
|
|
907
|
-
currentWindow.on('enter-full-screen', function () {
|
|
908
|
-
lastElectronBrowserWindow = currentWindow;
|
|
909
|
-
emitChange();
|
|
910
|
-
});
|
|
911
|
-
currentWindow.on('leave-full-screen', function () {
|
|
912
|
-
restoreElectronBrowserWindowOptions();
|
|
913
|
-
emitChange();
|
|
914
|
-
});
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
catch (_) {
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
801
|
var changeEvents = ['webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'];
|
|
922
802
|
var errorEvents = ['webkitfullscreenerror', 'mozfullscreenerror', 'MSFullscreenError'];
|
|
923
803
|
for (var i = 0; i < changeEvents.length; i++) {
|
|
@@ -954,16 +834,6 @@
|
|
|
954
834
|
}
|
|
955
835
|
}
|
|
956
836
|
function getEnabled() {
|
|
957
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
958
|
-
try {
|
|
959
|
-
var electron = require('electron');
|
|
960
|
-
var browserWindow = electron.BrowserWindow;
|
|
961
|
-
return typeof browserWindow.prototype.setFullScreen === 'function';
|
|
962
|
-
}
|
|
963
|
-
catch (_) {
|
|
964
|
-
return false;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
837
|
if (api === null) {
|
|
968
838
|
if (Platform.os.name !== OS.iOS)
|
|
969
839
|
return false;
|
|
@@ -981,24 +851,6 @@
|
|
|
981
851
|
return typeof globalThis.document[api.element] !== 'undefined';
|
|
982
852
|
}
|
|
983
853
|
function getElement() {
|
|
984
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
985
|
-
if (lastElectronBrowserWindow !== null)
|
|
986
|
-
return lastElectronBrowserWindow;
|
|
987
|
-
try {
|
|
988
|
-
var electron = require('electron');
|
|
989
|
-
var browserWindow = electron.BrowserWindow;
|
|
990
|
-
var allWindows = browserWindow.getAllWindows();
|
|
991
|
-
for (var i = 0; i < allWindows.length; i++) {
|
|
992
|
-
var currentWindow = allWindows[i];
|
|
993
|
-
if (currentWindow.isFullScreen() || (Platform.os.name === OS.MacOS && typeof currentWindow.isSimpleFullScreen === 'function' && currentWindow.isSimpleFullScreen()))
|
|
994
|
-
return currentWindow;
|
|
995
|
-
}
|
|
996
|
-
return null;
|
|
997
|
-
}
|
|
998
|
-
catch (_) {
|
|
999
|
-
return null;
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
854
|
if (api === null) {
|
|
1003
855
|
if (lastIOSVideo && lastIOSVideo.webkitDisplayingFullscreen)
|
|
1004
856
|
return lastIOSVideo;
|
|
@@ -1014,28 +866,6 @@
|
|
|
1014
866
|
}
|
|
1015
867
|
function request(target, options) {
|
|
1016
868
|
if (target === void 0) { target = getDefaultTarget(); }
|
|
1017
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
1018
|
-
var browserWindow_1 = target;
|
|
1019
|
-
return new Promise(function (resolve, reject) {
|
|
1020
|
-
try {
|
|
1021
|
-
if (lastElectronBrowserWindow === null) {
|
|
1022
|
-
lastElectronBrowserWindowOptions = {
|
|
1023
|
-
fullScreenable: browserWindow_1.fullScreenable,
|
|
1024
|
-
autoHideMenuBar: browserWindow_1.autoHideMenuBar,
|
|
1025
|
-
};
|
|
1026
|
-
browserWindow_1.fullScreenable = true;
|
|
1027
|
-
browserWindow_1.autoHideMenuBar = true;
|
|
1028
|
-
}
|
|
1029
|
-
browserWindow_1.setFullScreen(true);
|
|
1030
|
-
lastElectronBrowserWindow = browserWindow_1;
|
|
1031
|
-
resolve();
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
catch (_) {
|
|
1035
|
-
reject();
|
|
1036
|
-
}
|
|
1037
|
-
});
|
|
1038
|
-
}
|
|
1039
869
|
return new Promise(function (resolve, reject) {
|
|
1040
870
|
if (api !== null) {
|
|
1041
871
|
var method = target[api.request];
|
|
@@ -1086,25 +916,6 @@
|
|
|
1086
916
|
});
|
|
1087
917
|
}
|
|
1088
918
|
function exit() {
|
|
1089
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
1090
|
-
return new Promise(function (resolve, reject) {
|
|
1091
|
-
try {
|
|
1092
|
-
if (lastElectronBrowserWindow !== null) {
|
|
1093
|
-
lastElectronBrowserWindow.setFullScreen(false);
|
|
1094
|
-
restoreElectronBrowserWindowOptions();
|
|
1095
|
-
}
|
|
1096
|
-
else {
|
|
1097
|
-
var browserWindow = getElement();
|
|
1098
|
-
if (browserWindow !== null)
|
|
1099
|
-
browserWindow.setFullScreen(false);
|
|
1100
|
-
}
|
|
1101
|
-
resolve();
|
|
1102
|
-
}
|
|
1103
|
-
catch (_) {
|
|
1104
|
-
reject();
|
|
1105
|
-
}
|
|
1106
|
-
});
|
|
1107
|
-
}
|
|
1108
919
|
return new Promise(function (resolve, reject) {
|
|
1109
920
|
if (api !== null) {
|
|
1110
921
|
var method = globalThis.document[api.exit];
|
|
@@ -1198,14 +1009,6 @@
|
|
|
1198
1009
|
}
|
|
1199
1010
|
bridgeEvents();
|
|
1200
1011
|
|
|
1201
|
-
|
|
1202
|
-
installed: false,
|
|
1203
|
-
name: 'Fullscreen',
|
|
1204
|
-
module: Fullscreen,
|
|
1205
|
-
Constants: {},
|
|
1206
|
-
Errors: {}
|
|
1207
|
-
};
|
|
1208
|
-
|
|
1209
|
-
return NativeFullscreenPlugin;
|
|
1012
|
+
return Fullscreen;
|
|
1210
1013
|
|
|
1211
1014
|
}));
|