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
|
@@ -51,6 +51,33 @@ function compareVersion(lhs, rhs) {
|
|
|
51
51
|
return 0;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
function resolveWindowsVersion(string) {
|
|
55
|
+
if (typeof string === 'undefined')
|
|
56
|
+
return '';
|
|
57
|
+
var mapped = {
|
|
58
|
+
'4.90': 'ME',
|
|
59
|
+
'NT3.51': 'NT 3.11',
|
|
60
|
+
'NT4.0': 'NT 4.0',
|
|
61
|
+
'NT 5.0': '2000',
|
|
62
|
+
'NT 5.1': 'XP',
|
|
63
|
+
'NT 5.2': 'XP',
|
|
64
|
+
'NT 6.0': 'Vista',
|
|
65
|
+
'NT 6.1': '7',
|
|
66
|
+
'NT 6.2': '8',
|
|
67
|
+
'NT 6.3': '8.1',
|
|
68
|
+
'NT 6.4': '10',
|
|
69
|
+
'NT 10.0': '10',
|
|
70
|
+
'ARM': 'RT'
|
|
71
|
+
}[string];
|
|
72
|
+
if (typeof mapped !== 'undefined')
|
|
73
|
+
return mapped;
|
|
74
|
+
return string;
|
|
75
|
+
}
|
|
76
|
+
function resolveUnderscoreVersion(string) {
|
|
77
|
+
if (typeof string === 'undefined')
|
|
78
|
+
return '';
|
|
79
|
+
return string.replace(/_/g, '.');
|
|
80
|
+
}
|
|
54
81
|
var OS;
|
|
55
82
|
(function (OS) {
|
|
56
83
|
OS["Unknown"] = "Unknown";
|
|
@@ -90,13 +117,6 @@ var Browsers;
|
|
|
90
117
|
Browsers["IE"] = "IE";
|
|
91
118
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
92
119
|
})(Browsers || (Browsers = {}));
|
|
93
|
-
var CrossPlatformFramework;
|
|
94
|
-
(function (CrossPlatformFramework) {
|
|
95
|
-
CrossPlatformFramework["Unknown"] = "Unknown";
|
|
96
|
-
CrossPlatformFramework["ReactNative"] = "ReactNative";
|
|
97
|
-
CrossPlatformFramework["Electron"] = "Electron";
|
|
98
|
-
CrossPlatformFramework["Cordova"] = "Cordova";
|
|
99
|
-
})(CrossPlatformFramework || (CrossPlatformFramework = {}));
|
|
100
120
|
var USER_AGENT = typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgent === 'string' ? globalThis.navigator.userAgent : '';
|
|
101
121
|
var HIGH_ENTROPY_BRAND_NAME_MAP = {
|
|
102
122
|
'Google Chrome': 'Chrome',
|
|
@@ -106,82 +126,7 @@ var HIGH_ENTROPY_BRAND_NAME_MAP = {
|
|
|
106
126
|
'HeadlessChrome': 'Chrome Headless',
|
|
107
127
|
'OperaMobile': 'Opera Mobi',
|
|
108
128
|
};
|
|
109
|
-
|
|
110
|
-
var readyState = 'loading';
|
|
111
|
-
var readyCallback = [];
|
|
112
|
-
var pendingTasks = 0;
|
|
113
|
-
var Platform = {
|
|
114
|
-
os: { name: OS.Unknown, version: '' },
|
|
115
|
-
engine: { name: Engines.Unknown, version: '' },
|
|
116
|
-
browser: { name: Browsers.Unknown, version: '' },
|
|
117
|
-
crossPlatformFramework: CrossPlatformFramework.Unknown,
|
|
118
|
-
userAgent: USER_AGENT,
|
|
119
|
-
get locale() {
|
|
120
|
-
return getLocale();
|
|
121
|
-
},
|
|
122
|
-
get device() {
|
|
123
|
-
if (this.os.name === OS.iOS || this.os.name === OS.Android)
|
|
124
|
-
return Devices.Mobile;
|
|
125
|
-
if (this.os.name === OS.Windows || this.os.name === OS.MacOS)
|
|
126
|
-
return Devices.Desktop;
|
|
127
|
-
return Devices.Unknown;
|
|
128
|
-
},
|
|
129
|
-
get renderer() {
|
|
130
|
-
return getRenderer();
|
|
131
|
-
},
|
|
132
|
-
get isWebview() {
|
|
133
|
-
return /; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent);
|
|
134
|
-
},
|
|
135
|
-
get isNode() {
|
|
136
|
-
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
137
|
-
},
|
|
138
|
-
get isStandalone() {
|
|
139
|
-
if (this.os.name === OS.iOS)
|
|
140
|
-
return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
|
|
141
|
-
if (!('matchMedia' in globalThis))
|
|
142
|
-
return false;
|
|
143
|
-
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
144
|
-
},
|
|
145
|
-
onready: function (callback) {
|
|
146
|
-
if (readyState === 'complete') {
|
|
147
|
-
try {
|
|
148
|
-
callback(this);
|
|
149
|
-
}
|
|
150
|
-
catch (_) {
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
readyCallback.push(callback);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
function resolveWindowsVersion(string) {
|
|
159
|
-
if (typeof string === 'undefined')
|
|
160
|
-
return '';
|
|
161
|
-
var mapped = {
|
|
162
|
-
'4.90': 'ME',
|
|
163
|
-
'NT3.51': 'NT 3.11',
|
|
164
|
-
'NT4.0': 'NT 4.0',
|
|
165
|
-
'NT 5.0': '2000',
|
|
166
|
-
'NT 5.1': 'XP',
|
|
167
|
-
'NT 5.2': 'XP',
|
|
168
|
-
'NT 6.0': 'Vista',
|
|
169
|
-
'NT 6.1': '7',
|
|
170
|
-
'NT 6.2': '8',
|
|
171
|
-
'NT 6.3': '8.1',
|
|
172
|
-
'NT 6.4': '10',
|
|
173
|
-
'NT 10.0': '10',
|
|
174
|
-
'ARM': 'RT'
|
|
175
|
-
}[string];
|
|
176
|
-
if (typeof mapped !== 'undefined')
|
|
177
|
-
return mapped;
|
|
178
|
-
return string;
|
|
179
|
-
}
|
|
180
|
-
function resolveUnderscoreVersion(string) {
|
|
181
|
-
if (typeof string === 'undefined')
|
|
182
|
-
return '';
|
|
183
|
-
return string.replace(/_/g, '.');
|
|
184
|
-
}
|
|
129
|
+
var RTL_LANGUAGES = ['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'iw', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi'];
|
|
185
130
|
var OS_RESOLVER_MAP = [
|
|
186
131
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
187
132
|
[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -240,157 +185,237 @@ var BROWSER_RESOLVER_MAP = [
|
|
|
240
185
|
[/mobile vr; rv:([\w.]+)\).+firefox/i, Browsers.Firefox],
|
|
241
186
|
[/firefox\/([\w.]+)/i, Browsers.Firefox],
|
|
242
187
|
];
|
|
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
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
188
|
+
var BOT_REGEXP = [
|
|
189
|
+
/ daum[ /]/i,
|
|
190
|
+
/ deusu\//i,
|
|
191
|
+
/(?:^|[^g])news(?!sapphire)/i,
|
|
192
|
+
/(?<! (?:channel\/|google\/))google(?!(app|\/google| pixel))/i,
|
|
193
|
+
/(?<! cu)bots?(?:\b|_)/i,
|
|
194
|
+
/(?<!lib)http/i,
|
|
195
|
+
/(?<![hg]m)score/i,
|
|
196
|
+
/(?<!cam)scan/i,
|
|
197
|
+
/24x7/i,
|
|
198
|
+
/@[a-z][\w-]+\./i,
|
|
199
|
+
/\(\)/i,
|
|
200
|
+
/\.com\b/i,
|
|
201
|
+
/\b\w+\.ai/i,
|
|
202
|
+
/\bmanus-user\//i,
|
|
203
|
+
/\bort\//i,
|
|
204
|
+
/\bperl\b/i,
|
|
205
|
+
/\bsecurityheaders\b/i,
|
|
206
|
+
/\btime\//i,
|
|
207
|
+
/\|/i,
|
|
208
|
+
/^[\w .\-(?:)%]+(?:\/v?\d+(?:\.\d+)?(?:\.\d{1,10})*?)?(?:,|$)/i,
|
|
209
|
+
/^[^ ]{50,}$/i,
|
|
210
|
+
/^\d+\b/i,
|
|
211
|
+
/^\W/i,
|
|
212
|
+
/^\w*search\b/i,
|
|
213
|
+
/^\w+\/[\w()]*$/i,
|
|
214
|
+
/^\w+\/\d\.\d\s\([\w@]+\)$/i,
|
|
215
|
+
/^active/i,
|
|
216
|
+
/^ad muncher/i,
|
|
217
|
+
/^amaya/i,
|
|
218
|
+
/^apache\//i,
|
|
219
|
+
/^avsdevicesdk\//i,
|
|
220
|
+
/^azure/i,
|
|
221
|
+
/^biglotron/i,
|
|
222
|
+
/^bot/i,
|
|
223
|
+
/^bw\//i,
|
|
224
|
+
/^clamav[ /]/i,
|
|
225
|
+
/^client\//i,
|
|
226
|
+
/^cobweb\//i,
|
|
227
|
+
/^custom/i,
|
|
228
|
+
/^ddg[_-]android/i,
|
|
229
|
+
/^discourse/i,
|
|
230
|
+
/^dispatch\/\d/i,
|
|
231
|
+
/^downcast\//i,
|
|
232
|
+
/^duckduckgo/i,
|
|
233
|
+
/^email/i,
|
|
234
|
+
/^facebook/i,
|
|
235
|
+
/^getright\//i,
|
|
236
|
+
/^gozilla\//i,
|
|
237
|
+
/^hobbit/i,
|
|
238
|
+
/^hotzonu/i,
|
|
239
|
+
/^hwcdn\//i,
|
|
240
|
+
/^igetter\//i,
|
|
241
|
+
/^jeode\//i,
|
|
242
|
+
/^jetty\//i,
|
|
243
|
+
/^jigsaw/i,
|
|
244
|
+
/^microsoft bits/i,
|
|
245
|
+
/^movabletype/i,
|
|
246
|
+
/^mozilla\/\d\.\d\s[\w.-]+$/i,
|
|
247
|
+
/^mozilla\/\d\.\d\s\(compatible;?(?:\s[\w-.]+\/\d+\.\d+)?\)$/i,
|
|
248
|
+
/^navermailapp/i,
|
|
249
|
+
/^netsurf/i,
|
|
250
|
+
/^offline/i,
|
|
251
|
+
/^openai\//i,
|
|
252
|
+
/^owler/i,
|
|
253
|
+
/^php/i,
|
|
254
|
+
/^postman/i,
|
|
255
|
+
/^python/i,
|
|
256
|
+
/^rank/i,
|
|
257
|
+
/^read/i,
|
|
258
|
+
/^reed/i,
|
|
259
|
+
/^rest/i,
|
|
260
|
+
/^rss/i,
|
|
261
|
+
/^snapchat/i,
|
|
262
|
+
/^space bison/i,
|
|
263
|
+
/^svn/i,
|
|
264
|
+
/^swcd /i,
|
|
265
|
+
/^taringa/i,
|
|
266
|
+
/^thumbor\//i,
|
|
267
|
+
/^track/i,
|
|
268
|
+
/^w3c/i,
|
|
269
|
+
/^webbandit\//i,
|
|
270
|
+
/^webcopier/i,
|
|
271
|
+
/^wget/i,
|
|
272
|
+
/^whatsapp/i,
|
|
273
|
+
/^wordpress/i,
|
|
274
|
+
/^xenu link sleuth/i,
|
|
275
|
+
/^yahoo/i,
|
|
276
|
+
/^yandex/i,
|
|
277
|
+
/^zdm\/\d/i,
|
|
278
|
+
/^zoom marketplace\//i,
|
|
279
|
+
/advisor/i,
|
|
280
|
+
/agent\b/i,
|
|
281
|
+
/analyzer/i,
|
|
282
|
+
/archive/i,
|
|
283
|
+
/ask jeeves\/teoma/i,
|
|
284
|
+
/audit/i,
|
|
285
|
+
/bit\.ly\//i,
|
|
286
|
+
/bluecoat drtr/i,
|
|
287
|
+
/browsex/i,
|
|
288
|
+
/burpcollaborator/i,
|
|
289
|
+
/capture/i,
|
|
290
|
+
/catch/i,
|
|
291
|
+
/check\b/i,
|
|
292
|
+
/checker/i,
|
|
293
|
+
/chrome-lighthouse/i,
|
|
294
|
+
/chromeframe/i,
|
|
295
|
+
/classifier/i,
|
|
296
|
+
/cloudflare/i,
|
|
297
|
+
/convertify/i,
|
|
298
|
+
/crawl/i,
|
|
299
|
+
/cypress\//i,
|
|
300
|
+
/dareboost/i,
|
|
301
|
+
/datanyze/i,
|
|
302
|
+
/dejaclick/i,
|
|
303
|
+
/detect/i,
|
|
304
|
+
/dmbrowser/i,
|
|
305
|
+
/download/i,
|
|
306
|
+
/exaleadcloudview/i,
|
|
307
|
+
/feed/i,
|
|
308
|
+
/fetcher/i,
|
|
309
|
+
/firephp/i,
|
|
310
|
+
/functionize/i,
|
|
311
|
+
/grab/i,
|
|
312
|
+
/headless/i,
|
|
313
|
+
/httrack/i,
|
|
314
|
+
/hubspot marketing grader/i,
|
|
315
|
+
/ibisbrowser/i,
|
|
316
|
+
/infrawatch/i,
|
|
317
|
+
/insight/i,
|
|
318
|
+
/inspect/i,
|
|
319
|
+
/iplabel/i,
|
|
320
|
+
/java(?!;)/i,
|
|
321
|
+
/library/i,
|
|
322
|
+
/linkcheck/i,
|
|
323
|
+
/mail\.ru\//i,
|
|
324
|
+
/manager/i,
|
|
325
|
+
/measure/i,
|
|
326
|
+
/neustar wpm/i,
|
|
327
|
+
/node\b/i,
|
|
328
|
+
/nutch/i,
|
|
329
|
+
/offbyone/i,
|
|
330
|
+
/onetrust/i,
|
|
331
|
+
/optimize/i,
|
|
332
|
+
/pageburst/i,
|
|
333
|
+
/pagespeed/i,
|
|
334
|
+
/parser/i,
|
|
335
|
+
/phantomjs/i,
|
|
336
|
+
/pingdom/i,
|
|
337
|
+
/powermarks/i,
|
|
338
|
+
/preview/i,
|
|
339
|
+
/proxy/i,
|
|
340
|
+
/ptst[ /]\d/i,
|
|
341
|
+
/retriever/i,
|
|
342
|
+
/rexx;/i,
|
|
343
|
+
/rigor/i,
|
|
344
|
+
/rss\b/i,
|
|
345
|
+
/scrape/i,
|
|
346
|
+
/server/i,
|
|
347
|
+
/sogou/i,
|
|
348
|
+
/sparkler\//i,
|
|
349
|
+
/speedcurve/i,
|
|
350
|
+
/spider/i,
|
|
351
|
+
/splash/i,
|
|
352
|
+
/statuscake/i,
|
|
353
|
+
/supercleaner/i,
|
|
354
|
+
/synapse/i,
|
|
355
|
+
/synthetic/i,
|
|
356
|
+
/tools/i,
|
|
357
|
+
/torrent/i,
|
|
358
|
+
/transcoder/i,
|
|
359
|
+
/url/i,
|
|
360
|
+
/validator/i,
|
|
361
|
+
/virtuoso/i,
|
|
362
|
+
/wappalyzer/i,
|
|
363
|
+
/webglance/i,
|
|
364
|
+
/webkit2png/i,
|
|
365
|
+
/whatcms\//i,
|
|
366
|
+
/xtate\//i
|
|
367
|
+
];
|
|
368
|
+
|
|
369
|
+
var userAgent = USER_AGENT;
|
|
370
|
+
var Platform = {
|
|
371
|
+
get os() {
|
|
372
|
+
return getOS();
|
|
373
|
+
},
|
|
374
|
+
get engine() {
|
|
375
|
+
return getEngine();
|
|
376
|
+
},
|
|
377
|
+
get browser() {
|
|
378
|
+
return getBrowser();
|
|
379
|
+
},
|
|
380
|
+
get userAgent() {
|
|
381
|
+
return userAgent;
|
|
382
|
+
},
|
|
383
|
+
set userAgent(value) {
|
|
384
|
+
userAgent = value;
|
|
385
|
+
},
|
|
386
|
+
get locale() {
|
|
387
|
+
return getLocale();
|
|
388
|
+
},
|
|
389
|
+
get device() {
|
|
390
|
+
return getDevice();
|
|
391
|
+
},
|
|
392
|
+
get renderer() {
|
|
393
|
+
return getRenderer();
|
|
394
|
+
},
|
|
395
|
+
get isWebview() {
|
|
396
|
+
return getIsWebview();
|
|
397
|
+
},
|
|
398
|
+
get isNode() {
|
|
399
|
+
return getIsNode();
|
|
400
|
+
},
|
|
401
|
+
get isStandalone() {
|
|
402
|
+
return getIsStandalone();
|
|
403
|
+
},
|
|
404
|
+
get isBot() {
|
|
405
|
+
return getIsBot();
|
|
406
|
+
},
|
|
407
|
+
Constants: {
|
|
408
|
+
OS: OS,
|
|
409
|
+
Engines: Engines,
|
|
410
|
+
Browsers: Browsers,
|
|
411
|
+
Devices: Devices,
|
|
412
|
+
},
|
|
413
|
+
Errors: {},
|
|
414
|
+
};
|
|
415
|
+
var parsedFromHighEntropyValuesOS = {};
|
|
416
|
+
var parsedFromHighEntropyValuesBrowser = {};
|
|
417
|
+
var parsedFromHighEntropyValuesEngine = {};
|
|
418
|
+
var parsedFromHighEntropyValuesDevice = null;
|
|
394
419
|
function resolveVersion(string, resolver) {
|
|
395
420
|
if (typeof resolver === 'function')
|
|
396
421
|
return resolver(string);
|
|
@@ -407,54 +432,6 @@ function normalizeBrand(entry) {
|
|
|
407
432
|
return { brand: entry, version: '' };
|
|
408
433
|
return { brand: entry.brand, version: entry.version };
|
|
409
434
|
}
|
|
410
|
-
function getSemanticVersion(string) {
|
|
411
|
-
var parts = string.split('.');
|
|
412
|
-
return {
|
|
413
|
-
major: parseInt(parts[0] || '0'),
|
|
414
|
-
minor: parseInt(parts[1] || '0'),
|
|
415
|
-
build: parseInt(parts[2] || '0')
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
function parseOSFromCordova() {
|
|
419
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.Cordova;
|
|
420
|
-
if (typeof globalThis.device !== 'undefined') {
|
|
421
|
-
switch (globalThis.device.platform) {
|
|
422
|
-
case 'Android':
|
|
423
|
-
Platform.os = {
|
|
424
|
-
name: OS.Android,
|
|
425
|
-
version: globalThis.device.version,
|
|
426
|
-
};
|
|
427
|
-
break;
|
|
428
|
-
case 'iOS':
|
|
429
|
-
Platform.os = {
|
|
430
|
-
name: OS.iOS,
|
|
431
|
-
version: globalThis.device.version,
|
|
432
|
-
};
|
|
433
|
-
break;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
decrementPendingTasks();
|
|
437
|
-
}
|
|
438
|
-
function getRenderer() {
|
|
439
|
-
if (typeof globalThis.document === 'undefined')
|
|
440
|
-
return '';
|
|
441
|
-
var canvas = globalThis.document.createElement('canvas');
|
|
442
|
-
if (typeof canvas.getContext !== 'function')
|
|
443
|
-
return '';
|
|
444
|
-
var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
|
|
445
|
-
if (context === null)
|
|
446
|
-
return '';
|
|
447
|
-
if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
|
|
448
|
-
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
449
|
-
if (extension === null)
|
|
450
|
-
return context.getParameter(context.RENDERER);
|
|
451
|
-
else
|
|
452
|
-
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
453
|
-
}
|
|
454
|
-
else {
|
|
455
|
-
return '';
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
435
|
function normalizeLocale(locale) {
|
|
459
436
|
if (locale === null || typeof locale === 'undefined')
|
|
460
437
|
return locale;
|
|
@@ -477,13 +454,35 @@ function normalizeLocale(locale) {
|
|
|
477
454
|
parts[1] = parts[1].charAt(0).toUpperCase() + parts[1].slice(1).toLowerCase();
|
|
478
455
|
return parts.join('-');
|
|
479
456
|
}
|
|
457
|
+
function getRenderer() {
|
|
458
|
+
if (typeof globalThis.document === 'undefined')
|
|
459
|
+
return '';
|
|
460
|
+
var canvas = globalThis.document.createElement('canvas');
|
|
461
|
+
if (typeof canvas.getContext !== 'function')
|
|
462
|
+
return '';
|
|
463
|
+
var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
|
|
464
|
+
if (context === null)
|
|
465
|
+
return '';
|
|
466
|
+
if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
|
|
467
|
+
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
468
|
+
if (extension === null)
|
|
469
|
+
return context.getParameter(context.RENDERER);
|
|
470
|
+
else
|
|
471
|
+
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
return '';
|
|
475
|
+
}
|
|
476
|
+
}
|
|
480
477
|
function getLocale() {
|
|
481
478
|
var locale = {
|
|
482
479
|
language: null,
|
|
483
480
|
languages: [],
|
|
484
481
|
timezone: null,
|
|
485
482
|
timezoneOffset: 0,
|
|
483
|
+
isRTL: false,
|
|
486
484
|
};
|
|
485
|
+
var isRTL = null;
|
|
487
486
|
function addLanguages(language) {
|
|
488
487
|
for (var i = 0; i < language.length; i++)
|
|
489
488
|
addLanguage(language[i]);
|
|
@@ -496,53 +495,6 @@ function getLocale() {
|
|
|
496
495
|
locale.languages.push(language);
|
|
497
496
|
}
|
|
498
497
|
}
|
|
499
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
|
|
500
|
-
try {
|
|
501
|
-
var reactNative = require('react-native');
|
|
502
|
-
var nativeModules = reactNative.NativeModules;
|
|
503
|
-
if (typeof nativeModules.SettingsManager !== 'undefined') {
|
|
504
|
-
var settingManager = nativeModules.SettingsManager;
|
|
505
|
-
if (typeof settingManager !== 'undefined') {
|
|
506
|
-
var constant = typeof settingManager.getConstants === 'function'
|
|
507
|
-
? settingManager.getConstants()
|
|
508
|
-
: settingManager;
|
|
509
|
-
if (typeof constant !== 'undefined' && typeof constant.settings !== 'undefined') {
|
|
510
|
-
var settings = constant.settings;
|
|
511
|
-
if (typeof settings.AppleLocale === 'string')
|
|
512
|
-
addLanguage(settings.AppleLocale);
|
|
513
|
-
if (Array.isArray(settings.AppleLanguages) && settings.AppleLanguages.length > 0)
|
|
514
|
-
addLanguages(settings.AppleLanguages);
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
if (typeof nativeModules.I18nManager !== 'undefined') {
|
|
519
|
-
var i18nManager = nativeModules.I18nManager;
|
|
520
|
-
if (typeof i18nManager !== 'undefined') {
|
|
521
|
-
var constant = typeof i18nManager.getConstants === 'function'
|
|
522
|
-
? i18nManager.getConstants()
|
|
523
|
-
: i18nManager;
|
|
524
|
-
if (typeof constant !== 'undefined' && typeof constant.localeIdentifier !== 'undefined')
|
|
525
|
-
addLanguage(constant.localeIdentifier);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
catch (_) {
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
533
|
-
try {
|
|
534
|
-
var electron = require('electron');
|
|
535
|
-
var app = electron.app;
|
|
536
|
-
if (typeof app.getLocale !== 'undefined')
|
|
537
|
-
addLanguage(app.getLocale());
|
|
538
|
-
if (typeof app.getSystemLocale !== 'undefined')
|
|
539
|
-
addLanguage(app.getSystemLocale());
|
|
540
|
-
if (typeof app.getPreferredSystemLanguages !== 'undefined')
|
|
541
|
-
addLanguages(app.getPreferredSystemLanguages());
|
|
542
|
-
}
|
|
543
|
-
catch (_) {
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
498
|
if (typeof Intl !== 'undefined') {
|
|
547
499
|
try {
|
|
548
500
|
addLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
@@ -572,13 +524,37 @@ function getLocale() {
|
|
|
572
524
|
}
|
|
573
525
|
catch (_) {
|
|
574
526
|
}
|
|
527
|
+
if (typeof locale.language === 'string') {
|
|
528
|
+
if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
|
|
529
|
+
try {
|
|
530
|
+
var intlLocale = new Intl.Locale(locale.language);
|
|
531
|
+
if (typeof intlLocale.getTextInfo === 'function')
|
|
532
|
+
isRTL = intlLocale.getTextInfo().direction === 'rtl';
|
|
533
|
+
else if (typeof intlLocale.textInfo !== 'undefined')
|
|
534
|
+
isRTL = intlLocale.textInfo.direction === 'rtl';
|
|
535
|
+
}
|
|
536
|
+
catch (_) {
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
if (typeof isRTL !== 'boolean') {
|
|
540
|
+
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(locale.language);
|
|
541
|
+
if (matched !== null) {
|
|
542
|
+
var language = matched[1].toLowerCase();
|
|
543
|
+
for (var i = 0; i < RTL_LANGUAGES.length; i++) {
|
|
544
|
+
if (RTL_LANGUAGES[i] === language) {
|
|
545
|
+
isRTL = true;
|
|
546
|
+
break;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
if (typeof isRTL === 'boolean')
|
|
553
|
+
locale.isRTL = isRTL;
|
|
575
554
|
return locale;
|
|
576
555
|
}
|
|
577
|
-
function
|
|
578
|
-
|
|
579
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
|
|
580
|
-
if (typeof globalThis.navigator !== 'undefined' && globalThis.navigator.product === 'ReactNative')
|
|
581
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.ReactNative;
|
|
556
|
+
function getOS() {
|
|
557
|
+
var result = { name: OS.Unknown, version: '' };
|
|
582
558
|
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
583
559
|
var map = OS_RESOLVER_MAP[i];
|
|
584
560
|
var regexp = map[0];
|
|
@@ -586,18 +562,26 @@ function init() {
|
|
|
586
562
|
var resolver = map[2];
|
|
587
563
|
var matched = Platform.userAgent.match(regexp);
|
|
588
564
|
if (matched !== null) {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
version: resolveVersion(matched[1], resolver),
|
|
592
|
-
};
|
|
565
|
+
result.name = os;
|
|
566
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
593
567
|
break;
|
|
594
568
|
}
|
|
595
569
|
}
|
|
596
|
-
if (
|
|
570
|
+
if (result.name === OS.iOS && compareVersion(result.version, '18.6') === 0) {
|
|
597
571
|
var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
|
|
598
572
|
if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
|
|
599
|
-
|
|
573
|
+
result.version = version[1];
|
|
600
574
|
}
|
|
575
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
576
|
+
if (typeof parsedFromHighEntropyValuesOS.name !== 'undefined')
|
|
577
|
+
result.name = parsedFromHighEntropyValuesOS.name;
|
|
578
|
+
if (typeof parsedFromHighEntropyValuesOS.version !== 'undefined')
|
|
579
|
+
result.version = parsedFromHighEntropyValuesOS.version;
|
|
580
|
+
}
|
|
581
|
+
return result;
|
|
582
|
+
}
|
|
583
|
+
function getEngine() {
|
|
584
|
+
var result = { name: Engines.Unknown, version: '' };
|
|
601
585
|
for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
|
|
602
586
|
var map = ENGINE_RESOLVER_MAP[i];
|
|
603
587
|
var regexp = map[0];
|
|
@@ -605,13 +589,21 @@ function init() {
|
|
|
605
589
|
var resolver = map[2];
|
|
606
590
|
var matched = Platform.userAgent.match(regexp);
|
|
607
591
|
if (matched !== null) {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
version: resolveVersion(matched[1], resolver),
|
|
611
|
-
};
|
|
592
|
+
result.name = engine;
|
|
593
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
612
594
|
break;
|
|
613
595
|
}
|
|
614
596
|
}
|
|
597
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
598
|
+
if (typeof parsedFromHighEntropyValuesEngine.name !== 'undefined')
|
|
599
|
+
result.name = parsedFromHighEntropyValuesEngine.name;
|
|
600
|
+
if (typeof parsedFromHighEntropyValuesEngine.version !== 'undefined')
|
|
601
|
+
result.version = parsedFromHighEntropyValuesEngine.version;
|
|
602
|
+
}
|
|
603
|
+
return result;
|
|
604
|
+
}
|
|
605
|
+
function getBrowser() {
|
|
606
|
+
var result = { name: Browsers.Unknown, version: '' };
|
|
615
607
|
for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
616
608
|
var map = BROWSER_RESOLVER_MAP[i];
|
|
617
609
|
var regexp = map[0];
|
|
@@ -619,102 +611,49 @@ function init() {
|
|
|
619
611
|
var resolver = map[2];
|
|
620
612
|
var matched = Platform.userAgent.match(regexp);
|
|
621
613
|
if (matched !== null) {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
version: resolveVersion(matched[1], resolver),
|
|
625
|
-
};
|
|
614
|
+
result.name = browser;
|
|
615
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
626
616
|
break;
|
|
627
617
|
}
|
|
628
618
|
}
|
|
629
|
-
if (Platform.
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
var release = '' + platform.Version;
|
|
635
|
-
var version = getSemanticVersion(release);
|
|
636
|
-
switch (os) {
|
|
637
|
-
case 'android':
|
|
638
|
-
Platform.os = {
|
|
639
|
-
name: OS.Android,
|
|
640
|
-
version: resolveSemanticAndroidVersion(version, release),
|
|
641
|
-
};
|
|
642
|
-
break;
|
|
643
|
-
case 'ios':
|
|
644
|
-
Platform.os = {
|
|
645
|
-
name: OS.iOS,
|
|
646
|
-
version: release,
|
|
647
|
-
};
|
|
648
|
-
break;
|
|
649
|
-
case 'windows':
|
|
650
|
-
Platform.os = {
|
|
651
|
-
name: OS.Windows,
|
|
652
|
-
version: resolveSemanticWindowsVersion(version, release),
|
|
653
|
-
};
|
|
654
|
-
break;
|
|
655
|
-
case 'macos':
|
|
656
|
-
Platform.os = {
|
|
657
|
-
name: OS.MacOS,
|
|
658
|
-
version: release,
|
|
659
|
-
};
|
|
660
|
-
break;
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
catch (_) {
|
|
664
|
-
}
|
|
665
|
-
finally {
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
if (Platform.isNode) {
|
|
669
|
-
try {
|
|
670
|
-
var os = require('os');
|
|
671
|
-
var platform = os.platform();
|
|
672
|
-
var release = os.release();
|
|
673
|
-
var version = getSemanticVersion(release);
|
|
674
|
-
switch (platform) {
|
|
675
|
-
case 'win32':
|
|
676
|
-
Platform.os = {
|
|
677
|
-
name: OS.Windows,
|
|
678
|
-
version: resolveSemanticWindowsVersion(version, release),
|
|
679
|
-
};
|
|
680
|
-
break;
|
|
681
|
-
case 'darwin':
|
|
682
|
-
Platform.os = {
|
|
683
|
-
name: OS.MacOS,
|
|
684
|
-
version: resolveSemanticDarwinVersion(version, release),
|
|
685
|
-
};
|
|
686
|
-
break;
|
|
687
|
-
case 'android':
|
|
688
|
-
Platform.os = {
|
|
689
|
-
name: OS.Android,
|
|
690
|
-
version: release,
|
|
691
|
-
};
|
|
692
|
-
break;
|
|
693
|
-
case 'linux':
|
|
694
|
-
if (/android/i.test(release)) {
|
|
695
|
-
Platform.os = {
|
|
696
|
-
name: OS.Android,
|
|
697
|
-
version: release,
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
break;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
catch (_) {
|
|
704
|
-
}
|
|
705
|
-
finally {
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
if (typeof globalThis.document !== 'undefined') {
|
|
709
|
-
if (typeof globalThis.device !== 'undefined') {
|
|
710
|
-
parseOSFromCordova();
|
|
711
|
-
}
|
|
712
|
-
else {
|
|
713
|
-
globalThis.document.addEventListener("deviceready", parseOSFromCordova, false);
|
|
714
|
-
}
|
|
619
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
620
|
+
if (typeof parsedFromHighEntropyValuesBrowser.name !== 'undefined')
|
|
621
|
+
result.name = parsedFromHighEntropyValuesBrowser.name;
|
|
622
|
+
if (typeof parsedFromHighEntropyValuesBrowser.version !== 'undefined')
|
|
623
|
+
result.version = parsedFromHighEntropyValuesBrowser.version;
|
|
715
624
|
}
|
|
625
|
+
return result;
|
|
626
|
+
}
|
|
627
|
+
function getDevice() {
|
|
628
|
+
if (Platform.userAgent === USER_AGENT && parsedFromHighEntropyValuesDevice !== null)
|
|
629
|
+
return parsedFromHighEntropyValuesDevice;
|
|
630
|
+
if (Platform.os.name === OS.iOS || Platform.os.name === OS.Android)
|
|
631
|
+
return Devices.Mobile;
|
|
632
|
+
if (Platform.os.name === OS.Windows || Platform.os.name === OS.MacOS)
|
|
633
|
+
return Devices.Desktop;
|
|
634
|
+
return Devices.Unknown;
|
|
635
|
+
}
|
|
636
|
+
function getIsWebview() {
|
|
637
|
+
return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
|
|
638
|
+
}
|
|
639
|
+
function getIsNode() {
|
|
640
|
+
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
641
|
+
}
|
|
642
|
+
function getIsStandalone() {
|
|
643
|
+
if (Platform.os.name === OS.iOS)
|
|
644
|
+
return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
|
|
645
|
+
if (!('matchMedia' in globalThis))
|
|
646
|
+
return false;
|
|
647
|
+
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
648
|
+
}
|
|
649
|
+
function getIsBot() {
|
|
650
|
+
for (var i = 0; i < BOT_REGEXP.length; i++)
|
|
651
|
+
if (BOT_REGEXP[i].test(Platform.userAgent))
|
|
652
|
+
return true;
|
|
653
|
+
return false;
|
|
654
|
+
}
|
|
655
|
+
function parseFromHighEntropyValues() {
|
|
716
656
|
if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgentData !== 'undefined' && typeof globalThis.navigator.userAgentData.getHighEntropyValues !== 'undefined') {
|
|
717
|
-
incrementPendingTasks();
|
|
718
657
|
globalThis.navigator.userAgentData.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
719
658
|
.then(function (result) {
|
|
720
659
|
try {
|
|
@@ -735,47 +674,43 @@ function init() {
|
|
|
735
674
|
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
736
675
|
browserName = brandName;
|
|
737
676
|
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
738
|
-
|
|
677
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Chrome;
|
|
739
678
|
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
740
|
-
|
|
679
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Edge;
|
|
741
680
|
else if (browserName === 'Opera Mobi')
|
|
742
|
-
|
|
743
|
-
|
|
681
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Opera;
|
|
682
|
+
parsedFromHighEntropyValuesBrowser.version = brandVersion;
|
|
744
683
|
}
|
|
745
684
|
prevBrandName = brandName;
|
|
746
685
|
}
|
|
747
686
|
if (brandName === 'Chromium')
|
|
748
|
-
|
|
687
|
+
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
749
688
|
}
|
|
750
689
|
if (typeof platformVersion === 'string') {
|
|
751
690
|
if (Platform.os.name === OS.Windows)
|
|
752
|
-
|
|
691
|
+
parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
|
|
753
692
|
else
|
|
754
|
-
|
|
693
|
+
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
755
694
|
}
|
|
756
695
|
if (typeof platform === 'string') {
|
|
757
696
|
if (/android/i.test(platform))
|
|
758
|
-
|
|
697
|
+
parsedFromHighEntropyValuesOS.name = OS.Android;
|
|
759
698
|
else if (/ios|iphone|ipad/i.test(platform))
|
|
760
|
-
|
|
699
|
+
parsedFromHighEntropyValuesOS.name = OS.iOS;
|
|
761
700
|
else if (/windows|win32/i.test(platform))
|
|
762
|
-
|
|
701
|
+
parsedFromHighEntropyValuesOS.name = OS.Windows;
|
|
763
702
|
else if (/macos|macintel/i.test(platform))
|
|
764
|
-
|
|
703
|
+
parsedFromHighEntropyValuesOS.name = OS.MacOS;
|
|
765
704
|
}
|
|
766
705
|
if (result.mobile === true)
|
|
767
|
-
|
|
706
|
+
parsedFromHighEntropyValuesDevice = Devices.Mobile;
|
|
768
707
|
}
|
|
769
708
|
catch (_) {
|
|
770
709
|
}
|
|
771
|
-
finally {
|
|
772
|
-
decrementPendingTasks();
|
|
773
|
-
}
|
|
774
710
|
});
|
|
775
711
|
}
|
|
776
|
-
checkReady();
|
|
777
712
|
}
|
|
778
|
-
|
|
713
|
+
parseFromHighEntropyValues();
|
|
779
714
|
|
|
780
715
|
var currentAppearance = null;
|
|
781
716
|
var appearanceIntervalId = null;
|
|
@@ -783,10 +718,11 @@ var Appearance = {
|
|
|
783
718
|
get value() {
|
|
784
719
|
return getAppearance();
|
|
785
720
|
},
|
|
786
|
-
set value(appearance) {
|
|
787
|
-
setAppearance(appearance);
|
|
788
|
-
},
|
|
789
721
|
onchange: onchange,
|
|
722
|
+
Constants: {
|
|
723
|
+
Appearances: Appearances
|
|
724
|
+
},
|
|
725
|
+
Errors: {}
|
|
790
726
|
};
|
|
791
727
|
function getAppearanceFromEngine() {
|
|
792
728
|
var img = new Image();
|
|
@@ -807,53 +743,11 @@ function getAppearanceFromMediaQuery() {
|
|
|
807
743
|
return Appearances.Dark;
|
|
808
744
|
return Appearances.Light;
|
|
809
745
|
}
|
|
810
|
-
function getAppearanceFromReactNative() {
|
|
811
|
-
try {
|
|
812
|
-
var reactNative = require('react-native');
|
|
813
|
-
return reactNative.Appearance.getColorScheme() || Appearances.Unknown;
|
|
814
|
-
}
|
|
815
|
-
catch (_) {
|
|
816
|
-
return Appearances.Unknown;
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
function getAppearanceFromElectron() {
|
|
820
|
-
try {
|
|
821
|
-
var electron = require('electron');
|
|
822
|
-
return electron.nativeTheme.shouldUseDarkColors ? Appearances.Dark : Appearances.Light;
|
|
823
|
-
}
|
|
824
|
-
catch (_) {
|
|
825
|
-
return Appearances.Unknown;
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
746
|
function getAppearance() {
|
|
829
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative)
|
|
830
|
-
return getAppearanceFromReactNative();
|
|
831
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron)
|
|
832
|
-
return getAppearanceFromElectron();
|
|
833
747
|
if (Platform.browser.name === Browsers.SamsungInternet)
|
|
834
748
|
return getAppearanceFromEngine();
|
|
835
749
|
return getAppearanceFromMediaQuery();
|
|
836
750
|
}
|
|
837
|
-
function setAppearance(appearance) {
|
|
838
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
|
|
839
|
-
try {
|
|
840
|
-
var reactNative = require('react-native');
|
|
841
|
-
reactNative.Appearance.setColorScheme(appearance);
|
|
842
|
-
return;
|
|
843
|
-
}
|
|
844
|
-
catch (_) {
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
848
|
-
try {
|
|
849
|
-
var electron = require('electron');
|
|
850
|
-
electron.nativeTheme.themeSource = appearance || 'system';
|
|
851
|
-
return;
|
|
852
|
-
}
|
|
853
|
-
catch (_) {
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
751
|
function startPolling() {
|
|
858
752
|
currentAppearance = getAppearanceFromEngine();
|
|
859
753
|
appearanceIntervalId = globalThis.setInterval(function () {
|
|
@@ -919,79 +813,6 @@ function indexOfEntry(entry) {
|
|
|
919
813
|
return i;
|
|
920
814
|
return -1;
|
|
921
815
|
}
|
|
922
|
-
function onchangeReactNative(entry) {
|
|
923
|
-
try {
|
|
924
|
-
var reactNative = require('react-native');
|
|
925
|
-
var isRemoved_1 = false;
|
|
926
|
-
var listener = function (preferences) {
|
|
927
|
-
if (isRemoved_1)
|
|
928
|
-
return;
|
|
929
|
-
entry.fn(preferences.colorScheme || Appearances.Unknown);
|
|
930
|
-
if (entry.once)
|
|
931
|
-
cleanup_1();
|
|
932
|
-
};
|
|
933
|
-
var cleanup_1 = function () {
|
|
934
|
-
if (isRemoved_1)
|
|
935
|
-
return;
|
|
936
|
-
if (typeof entry.signal !== 'undefined')
|
|
937
|
-
entry.signal.removeEventListener('abort', cleanup_1);
|
|
938
|
-
isRemoved_1 = true;
|
|
939
|
-
subscription_1.remove();
|
|
940
|
-
};
|
|
941
|
-
if (typeof entry.signal !== 'undefined') {
|
|
942
|
-
if (entry.signal.aborted) {
|
|
943
|
-
return function () {
|
|
944
|
-
};
|
|
945
|
-
}
|
|
946
|
-
entry.signal.addEventListener('abort', cleanup_1);
|
|
947
|
-
}
|
|
948
|
-
var subscription_1 = reactNative.Appearance.addChangeListener(listener);
|
|
949
|
-
return function () {
|
|
950
|
-
subscription_1.remove();
|
|
951
|
-
};
|
|
952
|
-
}
|
|
953
|
-
catch (_) {
|
|
954
|
-
}
|
|
955
|
-
return function () {
|
|
956
|
-
};
|
|
957
|
-
}
|
|
958
|
-
function onchangeElectron(entry) {
|
|
959
|
-
try {
|
|
960
|
-
var electron = require('electron');
|
|
961
|
-
var nativeTheme_1 = electron.nativeTheme;
|
|
962
|
-
var isRemoved_2 = false;
|
|
963
|
-
var listener_1 = function () {
|
|
964
|
-
if (isRemoved_2)
|
|
965
|
-
return;
|
|
966
|
-
entry.fn(getAppearanceFromElectron());
|
|
967
|
-
if (entry.once)
|
|
968
|
-
cleanup_2();
|
|
969
|
-
};
|
|
970
|
-
var cleanup_2 = function () {
|
|
971
|
-
if (isRemoved_2)
|
|
972
|
-
return;
|
|
973
|
-
if (typeof entry.signal !== 'undefined')
|
|
974
|
-
entry.signal.removeEventListener('abort', cleanup_2);
|
|
975
|
-
isRemoved_2 = true;
|
|
976
|
-
nativeTheme_1.removeListener('updated', listener_1);
|
|
977
|
-
};
|
|
978
|
-
if (typeof entry.signal !== 'undefined') {
|
|
979
|
-
if (entry.signal.aborted) {
|
|
980
|
-
return function () {
|
|
981
|
-
};
|
|
982
|
-
}
|
|
983
|
-
entry.signal.addEventListener('abort', cleanup_2);
|
|
984
|
-
}
|
|
985
|
-
nativeTheme_1.on('updated', listener_1);
|
|
986
|
-
return function () {
|
|
987
|
-
nativeTheme_1.removeListener('updated', listener_1);
|
|
988
|
-
};
|
|
989
|
-
}
|
|
990
|
-
catch (_) {
|
|
991
|
-
}
|
|
992
|
-
return function () {
|
|
993
|
-
};
|
|
994
|
-
}
|
|
995
816
|
function onchange(listener, options) {
|
|
996
817
|
if (options === void 0) { options = false; }
|
|
997
818
|
var entry = { fn: listener, capture: false, once: false };
|
|
@@ -1003,10 +824,6 @@ function onchange(listener, options) {
|
|
|
1003
824
|
entry.once = options.once;
|
|
1004
825
|
if (typeof options.signal !== 'undefined')
|
|
1005
826
|
entry.signal = options.signal;
|
|
1006
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative)
|
|
1007
|
-
return onchangeReactNative(entry);
|
|
1008
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron)
|
|
1009
|
-
return onchangeElectron(entry);
|
|
1010
827
|
var index = indexOfEntry(entry);
|
|
1011
828
|
if (index === -1) {
|
|
1012
829
|
ENTRIES.push(entry);
|
|
@@ -1037,14 +854,4 @@ function onchange(listener, options) {
|
|
|
1037
854
|
};
|
|
1038
855
|
}
|
|
1039
856
|
|
|
1040
|
-
|
|
1041
|
-
installed: false,
|
|
1042
|
-
name: 'Appearance',
|
|
1043
|
-
module: Appearance,
|
|
1044
|
-
Constants: {
|
|
1045
|
-
Appearances: Appearances,
|
|
1046
|
-
},
|
|
1047
|
-
Errors: {}
|
|
1048
|
-
};
|
|
1049
|
-
|
|
1050
|
-
module.exports = NativeAppearancePlugin;
|
|
857
|
+
module.exports = Appearance;
|