@psnext/slingcli 3.5.20261019-1 → 3.6.20261105-1
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/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +38 -13
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +7 -7
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +51 -1
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/getDefaultSocketTimeout.js +10 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.browser.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.native.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/getDefaultSocketTimeout.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.browser.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.native.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +3 -7
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +25 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/getDefaultSocketTimeout.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +36 -0
- package/node_modules/@aws-sdk/core/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +914 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +13 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +51 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +263 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +135 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +204 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-https.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +38 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +11 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +11 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +56 -0
- package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +4 -2
- package/node_modules/@aws-sdk/middleware-eventstream/dist-es/eventStreamHandlingMiddleware.js +2 -1
- package/node_modules/@aws-sdk/middleware-eventstream/dist-es/eventStreamHeaderMiddleware.js +2 -1
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-websocket/package.json +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +10 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +5 -59
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.d.ts +5 -33
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/index.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +16 -9
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +8 -39
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/models_0.d.ts +36 -48
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSOClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +914 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +13 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +51 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +263 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +135 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +204 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-https.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +38 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +56 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
- package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +3 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +3 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
- package/node_modules/@babel/runtime/helpers/asyncIterator.js +1 -1
- package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +1 -1
- package/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/LICENSE +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/classes/index.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/classes/range.js +577 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/major.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/index.js +93 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/re.js +223 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/package.json +78 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/preload.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/range.bnf +17 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/@hono/node-server/dist/index.cjs +31 -6
- package/node_modules/@hono/node-server/dist/index.mjs +31 -6
- package/node_modules/@hono/node-server/package.json +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js +10 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts +8 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +10 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts +8 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +45 -53
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +52 -19
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +10 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +28 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +28 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +91 -58
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +53 -15
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +57 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +7 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +12 -37
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +17 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +10 -4
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +12 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/AbstractRpcV2Protocol.js +35 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +6 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +8 -31
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +11 -8
- package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +17 -8
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js +22 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/race.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/race.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +10 -4
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +6 -2
- package/node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js +4 -2
- package/node_modules/@smithy/fetch-http-handler/dist-types/request-timeout.d.ts +12 -1
- package/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/request-timeout.d.ts +12 -1
- package/node_modules/@smithy/fetch-http-handler/package.json +3 -3
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +23 -11
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +5 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +6 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/@smithy/types/dist-types/middleware.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +6 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/zlib.d.ts +752 -0
- package/node_modules/body-parser/README.md +17 -13
- package/node_modules/body-parser/lib/read.js +74 -57
- package/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/body-parser/lib/utils.js +0 -15
- package/node_modules/body-parser/package.json +7 -12
- package/node_modules/bowser/README.md +26 -3
- package/node_modules/bowser/bowser.mjs +2225 -0
- package/node_modules/bowser/bundled.js +14 -1
- package/node_modules/bowser/es5.js +14 -1
- package/node_modules/bowser/index.d.mts +45 -0
- package/node_modules/bowser/package.json +90 -31
- package/node_modules/bowser/src/bowser.js +9 -1
- package/node_modules/bowser/src/constants.js +7 -0
- package/node_modules/bowser/src/parser-browsers.js +73 -7
- package/node_modules/bowser/src/parser-engines.js +12 -0
- package/node_modules/bowser/src/parser-os.js +3 -1
- package/node_modules/bowser/src/parser-platforms.js +3 -1
- package/node_modules/bowser/src/parser.js +22 -5
- package/node_modules/bowser/src/utils.js +16 -0
- package/node_modules/encodeurl/README.md +14 -0
- package/node_modules/encodeurl/index.js +5 -10
- package/node_modules/encodeurl/package.json +10 -6
- package/node_modules/express-rate-limit/dist/index.cjs +7 -3
- package/node_modules/express-rate-limit/dist/index.mjs +7 -3
- package/node_modules/express-rate-limit/package.json +10 -10
- package/node_modules/hono/README.md +2 -3
- package/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +1 -1
- package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +1 -1
- package/node_modules/hono/dist/cjs/context.js +1 -1
- package/node_modules/hono/dist/cjs/helper/css/common.js +11 -8
- package/node_modules/hono/dist/cjs/helper/css/index.js +1 -1
- package/node_modules/hono/dist/cjs/helper/route/index.js +3 -1
- package/node_modules/hono/dist/cjs/hono-base.js +4 -10
- package/node_modules/hono/dist/cjs/hono.js +0 -1
- package/node_modules/hono/dist/cjs/jsx/base.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +9 -1
- package/node_modules/hono/dist/cjs/middleware/csrf/index.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/mount/index.js +4 -4
- package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +3 -1
- package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +13 -11
- package/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js +4 -4
- package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +39 -51
- package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +15 -5
- package/node_modules/hono/dist/cjs/router/trie-router/node.js +2 -2
- package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +2 -1
- package/node_modules/hono/dist/cjs/utils/mount.js +35 -0
- package/node_modules/hono/dist/cjs/utils/url.js +21 -6
- package/node_modules/hono/dist/cjs/validator/validator.js +1 -1
- package/node_modules/hono/dist/context.js +1 -1
- package/node_modules/hono/dist/helper/css/common.js +11 -8
- package/node_modules/hono/dist/helper/css/index.js +1 -1
- package/node_modules/hono/dist/helper/route/index.js +3 -1
- package/node_modules/hono/dist/hono-base.js +4 -10
- package/node_modules/hono/dist/hono.js +0 -1
- package/node_modules/hono/dist/jsx/base.js +1 -1
- package/node_modules/hono/dist/middleware/basic-auth/index.js +1 -1
- package/node_modules/hono/dist/middleware/bearer-auth/index.js +9 -1
- package/node_modules/hono/dist/middleware/csrf/index.js +2 -2
- package/node_modules/hono/dist/middleware/jwk/jwk.js +2 -2
- package/node_modules/hono/dist/middleware/jwt/jwt.js +2 -2
- package/node_modules/hono/dist/middleware/language/language.js +1 -1
- package/node_modules/hono/dist/middleware/mount/index.js +4 -4
- package/node_modules/hono/dist/middleware/serve-static/index.js +3 -1
- package/node_modules/hono/dist/router/reg-exp-router/node.js +13 -11
- package/node_modules/hono/dist/router/reg-exp-router/prepared-router.js +5 -5
- package/node_modules/hono/dist/router/reg-exp-router/router.js +40 -52
- package/node_modules/hono/dist/router/reg-exp-router/trie.js +15 -5
- package/node_modules/hono/dist/router/trie-router/node.js +2 -2
- package/node_modules/hono/dist/types/adapter/aws-lambda/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/bun/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/bun/ssg.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/cloudflare-pages/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/deno/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/deno/ssg.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/lambda-edge/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/netlify/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/vercel/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/helper/testing/index.d.ts +2 -1
- package/node_modules/hono/dist/types/hono-base.d.ts +21 -9
- package/node_modules/hono/dist/types/index.d.ts +1 -1
- package/node_modules/hono/dist/types/jsx/components.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/context.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/dom/components.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/dom/css.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/streaming.d.ts +4 -3
- package/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts +3 -3
- package/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +3 -3
- package/node_modules/hono/dist/types/middleware/mount/index.d.ts +1 -0
- package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +3 -3
- package/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +1 -1
- package/node_modules/hono/dist/types/utils/ipaddr.d.ts +1 -1
- package/node_modules/hono/dist/types/utils/mount.d.ts +4 -0
- package/node_modules/hono/dist/types/utils/url.d.ts +1 -0
- package/node_modules/hono/dist/utils/jwt/jwt.js +2 -1
- package/node_modules/hono/dist/utils/mount.js +34 -0
- package/node_modules/hono/dist/utils/url.js +21 -7
- package/node_modules/hono/dist/validator/validator.js +1 -1
- package/node_modules/hono/package.json +1 -1
- package/node_modules/ip-address/README.md +39 -39
- package/node_modules/ip-address/dist/common.js +2 -2
- package/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/ip-address/dist/ipv6.js +1 -1
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/package.json +2 -2
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +3 -0
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +2 -0
- package/node_modules/jose/dist/types/jwt/verify.d.ts +3 -0
- package/node_modules/jose/dist/types/types.d.ts +8 -0
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +1 -0
- package/node_modules/jose/dist/webapi/jwks/remote.js +3 -1
- package/node_modules/jose/dist/webapi/lib/deflate.js +2 -1
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -1
- package/node_modules/jose/package.json +1 -1
- package/node_modules/on-finished/index.js +14 -2
- package/node_modules/on-finished/package.json +11 -7
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/CHANGELOG.md +87 -22
- package/node_modules/qs/README.md +63 -10
- package/node_modules/qs/dist/qs.js +17 -17
- package/node_modules/qs/eslint.config.mjs +61 -50
- package/node_modules/qs/lib/formats.js +7 -2
- package/node_modules/qs/lib/parse.js +29 -10
- package/node_modules/qs/lib/stringify.js +5 -3
- package/node_modules/qs/lib/utils.js +28 -9
- package/node_modules/qs/package.json +6 -6
- package/node_modules/qs/test/parse.js +335 -2
- package/node_modules/qs/test/stringify.js +222 -0
- package/node_modules/qs/test/utils.js +61 -3
- package/node_modules/semver/classes/range.js +2 -2
- package/node_modules/semver/internal/constants.js +30 -0
- package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/semver/package.json +1 -1
- package/node_modules/tslib/README.md +3 -8
- package/node_modules/tslib/package.json +1 -1
- package/node_modules/tslib/tslib.d.ts +4 -2
- package/node_modules/tslib/tslib.es6.js +10 -1
- package/node_modules/tslib/tslib.es6.mjs +10 -1
- package/node_modules/tslib/tslib.js +10 -1
- package/node_modules/ws/README.md +21 -29
- package/node_modules/ws/lib/buffer-util.js +13 -2
- package/node_modules/ws/lib/sender.js +4 -1
- package/node_modules/ws/lib/websocket.js +8 -3
- package/node_modules/ws/package.json +1 -1
- package/package.json +14 -14
- package/sling-default-packages.json +3 -2
- package/slingshot/index.js +2 -2
- package/node_modules/on-finished/HISTORY.md +0 -98
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols → serde}/writeKey.js +0 -0
- /package/node_modules/@smithy/core/dist-types/submodules/{protocols → serde}/writeKey.d.ts +0 -0
- /package/node_modules/@smithy/core/dist-types/ts3.4/submodules/{protocols → serde}/writeKey.d.ts +0 -0
|
@@ -0,0 +1,2225 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Bowser - a browser detector
|
|
3
|
+
* https://github.com/lancedikson/bowser
|
|
4
|
+
* MIT License | (c) Dustin Diaz 2012-2015
|
|
5
|
+
* MIT License | (c) Denis Demchenko 2015-2026
|
|
6
|
+
*/
|
|
7
|
+
//#region src/constants.js
|
|
8
|
+
var BROWSER_ALIASES_MAP = {
|
|
9
|
+
AmazonBot: "amazonbot",
|
|
10
|
+
"Amazon Silk": "amazon_silk",
|
|
11
|
+
"Android Browser": "android",
|
|
12
|
+
BaiduSpider: "baiduspider",
|
|
13
|
+
Bada: "bada",
|
|
14
|
+
BingCrawler: "bingcrawler",
|
|
15
|
+
Brave: "brave",
|
|
16
|
+
BlackBerry: "blackberry",
|
|
17
|
+
"ChatGPT-User": "chatgpt_user",
|
|
18
|
+
Chrome: "chrome",
|
|
19
|
+
ClaudeBot: "claudebot",
|
|
20
|
+
Chromium: "chromium",
|
|
21
|
+
Diffbot: "diffbot",
|
|
22
|
+
DuckDuckBot: "duckduckbot",
|
|
23
|
+
DuckDuckGo: "duckduckgo",
|
|
24
|
+
Electron: "electron",
|
|
25
|
+
Epiphany: "epiphany",
|
|
26
|
+
FacebookExternalHit: "facebookexternalhit",
|
|
27
|
+
Firefox: "firefox",
|
|
28
|
+
Focus: "focus",
|
|
29
|
+
Generic: "generic",
|
|
30
|
+
"Google Search": "google_search",
|
|
31
|
+
Googlebot: "googlebot",
|
|
32
|
+
GPTBot: "gptbot",
|
|
33
|
+
"HeyTap Browser": "heytap",
|
|
34
|
+
"Internet Explorer": "ie",
|
|
35
|
+
InternetArchiveCrawler: "internetarchivecrawler",
|
|
36
|
+
"K-Meleon": "k_meleon",
|
|
37
|
+
Ladybird: "ladybird",
|
|
38
|
+
LibreWolf: "librewolf",
|
|
39
|
+
Linespider: "linespider",
|
|
40
|
+
Maxthon: "maxthon",
|
|
41
|
+
"Meta-ExternalAds": "meta_externalads",
|
|
42
|
+
"Meta-ExternalAgent": "meta_externalagent",
|
|
43
|
+
"Meta-ExternalFetcher": "meta_externalfetcher",
|
|
44
|
+
"Meta-WebIndexer": "meta_webindexer",
|
|
45
|
+
"Microsoft Edge": "edge",
|
|
46
|
+
"MZ Browser": "mz",
|
|
47
|
+
"NAVER Whale Browser": "naver",
|
|
48
|
+
"OAI-SearchBot": "oai_searchbot",
|
|
49
|
+
Omgilibot: "omgilibot",
|
|
50
|
+
Opera: "opera",
|
|
51
|
+
"Opera Coast": "opera_coast",
|
|
52
|
+
"Pale Moon": "pale_moon",
|
|
53
|
+
PerplexityBot: "perplexitybot",
|
|
54
|
+
"Perplexity-User": "perplexity_user",
|
|
55
|
+
PhantomJS: "phantomjs",
|
|
56
|
+
PingdomBot: "pingdombot",
|
|
57
|
+
Puffin: "puffin",
|
|
58
|
+
QQ: "qq",
|
|
59
|
+
QQLite: "qqlite",
|
|
60
|
+
QupZilla: "qupzilla",
|
|
61
|
+
Roku: "roku",
|
|
62
|
+
Safari: "safari",
|
|
63
|
+
Sailfish: "sailfish",
|
|
64
|
+
"Samsung Internet for Android": "samsung_internet",
|
|
65
|
+
SlackBot: "slackbot",
|
|
66
|
+
SeaMonkey: "seamonkey",
|
|
67
|
+
Sleipnir: "sleipnir",
|
|
68
|
+
"Sogou Browser": "sogou",
|
|
69
|
+
Swing: "swing",
|
|
70
|
+
Tizen: "tizen",
|
|
71
|
+
"UC Browser": "uc",
|
|
72
|
+
"Vivo Browser": "vivo",
|
|
73
|
+
Vivaldi: "vivaldi",
|
|
74
|
+
"WebOS Browser": "webos",
|
|
75
|
+
WeChat: "wechat",
|
|
76
|
+
YahooSlurp: "yahooslurp",
|
|
77
|
+
"Yandex Browser": "yandex",
|
|
78
|
+
YandexBot: "yandexbot",
|
|
79
|
+
YouBot: "youbot"
|
|
80
|
+
};
|
|
81
|
+
var BROWSER_MAP = {
|
|
82
|
+
amazonbot: "AmazonBot",
|
|
83
|
+
amazon_silk: "Amazon Silk",
|
|
84
|
+
android: "Android Browser",
|
|
85
|
+
baiduspider: "BaiduSpider",
|
|
86
|
+
bada: "Bada",
|
|
87
|
+
bingcrawler: "BingCrawler",
|
|
88
|
+
blackberry: "BlackBerry",
|
|
89
|
+
brave: "Brave",
|
|
90
|
+
chatgpt_user: "ChatGPT-User",
|
|
91
|
+
chrome: "Chrome",
|
|
92
|
+
claudebot: "ClaudeBot",
|
|
93
|
+
chromium: "Chromium",
|
|
94
|
+
diffbot: "Diffbot",
|
|
95
|
+
duckduckbot: "DuckDuckBot",
|
|
96
|
+
duckduckgo: "DuckDuckGo",
|
|
97
|
+
edge: "Microsoft Edge",
|
|
98
|
+
electron: "Electron",
|
|
99
|
+
epiphany: "Epiphany",
|
|
100
|
+
facebookexternalhit: "FacebookExternalHit",
|
|
101
|
+
firefox: "Firefox",
|
|
102
|
+
focus: "Focus",
|
|
103
|
+
generic: "Generic",
|
|
104
|
+
google_search: "Google Search",
|
|
105
|
+
googlebot: "Googlebot",
|
|
106
|
+
gptbot: "GPTBot",
|
|
107
|
+
heytap: "HeyTap Browser",
|
|
108
|
+
ie: "Internet Explorer",
|
|
109
|
+
internetarchivecrawler: "InternetArchiveCrawler",
|
|
110
|
+
k_meleon: "K-Meleon",
|
|
111
|
+
ladybird: "Ladybird",
|
|
112
|
+
librewolf: "LibreWolf",
|
|
113
|
+
linespider: "Linespider",
|
|
114
|
+
maxthon: "Maxthon",
|
|
115
|
+
meta_externalads: "Meta-ExternalAds",
|
|
116
|
+
meta_externalagent: "Meta-ExternalAgent",
|
|
117
|
+
meta_externalfetcher: "Meta-ExternalFetcher",
|
|
118
|
+
meta_webindexer: "Meta-WebIndexer",
|
|
119
|
+
mz: "MZ Browser",
|
|
120
|
+
naver: "NAVER Whale Browser",
|
|
121
|
+
oai_searchbot: "OAI-SearchBot",
|
|
122
|
+
omgilibot: "Omgilibot",
|
|
123
|
+
opera: "Opera",
|
|
124
|
+
opera_coast: "Opera Coast",
|
|
125
|
+
pale_moon: "Pale Moon",
|
|
126
|
+
perplexitybot: "PerplexityBot",
|
|
127
|
+
perplexity_user: "Perplexity-User",
|
|
128
|
+
phantomjs: "PhantomJS",
|
|
129
|
+
pingdombot: "PingdomBot",
|
|
130
|
+
puffin: "Puffin",
|
|
131
|
+
qq: "QQ Browser",
|
|
132
|
+
qqlite: "QQ Browser Lite",
|
|
133
|
+
qupzilla: "QupZilla",
|
|
134
|
+
roku: "Roku",
|
|
135
|
+
safari: "Safari",
|
|
136
|
+
sailfish: "Sailfish",
|
|
137
|
+
samsung_internet: "Samsung Internet for Android",
|
|
138
|
+
seamonkey: "SeaMonkey",
|
|
139
|
+
slackbot: "SlackBot",
|
|
140
|
+
sleipnir: "Sleipnir",
|
|
141
|
+
sogou: "Sogou Browser",
|
|
142
|
+
swing: "Swing",
|
|
143
|
+
tizen: "Tizen",
|
|
144
|
+
uc: "UC Browser",
|
|
145
|
+
vivo: "Vivo Browser",
|
|
146
|
+
vivaldi: "Vivaldi",
|
|
147
|
+
webos: "WebOS Browser",
|
|
148
|
+
wechat: "WeChat",
|
|
149
|
+
yahooslurp: "YahooSlurp",
|
|
150
|
+
yandex: "Yandex Browser",
|
|
151
|
+
yandexbot: "YandexBot",
|
|
152
|
+
youbot: "YouBot"
|
|
153
|
+
};
|
|
154
|
+
var PLATFORMS_MAP = {
|
|
155
|
+
bot: "bot",
|
|
156
|
+
desktop: "desktop",
|
|
157
|
+
mobile: "mobile",
|
|
158
|
+
tablet: "tablet",
|
|
159
|
+
tv: "tv"
|
|
160
|
+
};
|
|
161
|
+
var OS_MAP = {
|
|
162
|
+
Android: "Android",
|
|
163
|
+
Bada: "Bada",
|
|
164
|
+
BlackBerry: "BlackBerry",
|
|
165
|
+
ChromeOS: "Chrome OS",
|
|
166
|
+
HarmonyOS: "HarmonyOS",
|
|
167
|
+
iOS: "iOS",
|
|
168
|
+
Linux: "Linux",
|
|
169
|
+
MacOS: "macOS",
|
|
170
|
+
PlayStation4: "PlayStation 4",
|
|
171
|
+
Roku: "Roku",
|
|
172
|
+
Tizen: "Tizen",
|
|
173
|
+
WebOS: "WebOS",
|
|
174
|
+
Windows: "Windows",
|
|
175
|
+
WindowsPhone: "Windows Phone"
|
|
176
|
+
};
|
|
177
|
+
var ENGINE_MAP = {
|
|
178
|
+
Blink: "Blink",
|
|
179
|
+
EdgeHTML: "EdgeHTML",
|
|
180
|
+
Gecko: "Gecko",
|
|
181
|
+
LibWeb: "LibWeb",
|
|
182
|
+
Presto: "Presto",
|
|
183
|
+
Trident: "Trident",
|
|
184
|
+
WebKit: "WebKit"
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region src/utils.js
|
|
189
|
+
var Utils = /*#__PURE__*/function () {
|
|
190
|
+
function Utils() {}
|
|
191
|
+
/**
|
|
192
|
+
* Get first matched item for a string
|
|
193
|
+
* @param {RegExp} regexp
|
|
194
|
+
* @param {String} ua
|
|
195
|
+
* @return {Array|{index: number, input: string}|*|boolean|string}
|
|
196
|
+
*/
|
|
197
|
+
Utils.getFirstMatch = function getFirstMatch(regexp, ua) {
|
|
198
|
+
var match = ua.match(regexp);
|
|
199
|
+
return match && match.length > 0 && match[1] || "";
|
|
200
|
+
};
|
|
201
|
+
Utils.getSecondMatch = function getSecondMatch(regexp, ua) {
|
|
202
|
+
var match = ua.match(regexp);
|
|
203
|
+
return match && match.length > 1 && match[2] || "";
|
|
204
|
+
};
|
|
205
|
+
Utils.matchAndReturnConst = function matchAndReturnConst(regexp, ua, _const) {
|
|
206
|
+
if (regexp.test(ua)) return _const;
|
|
207
|
+
};
|
|
208
|
+
Utils.isFirefoxOnIpad = function isFirefoxOnIpad(ua) {
|
|
209
|
+
var macIndex = ua.indexOf("Macintosh");
|
|
210
|
+
if (macIndex === -1) return false;
|
|
211
|
+
var fxiosIndex = ua.indexOf(" FxiOS", macIndex + 9);
|
|
212
|
+
return fxiosIndex !== -1 && ua.indexOf("/", fxiosIndex + 6) !== -1;
|
|
213
|
+
};
|
|
214
|
+
Utils.getWindowsVersionName = function getWindowsVersionName(version) {
|
|
215
|
+
switch (version) {
|
|
216
|
+
case "NT":
|
|
217
|
+
return "NT";
|
|
218
|
+
case "XP":
|
|
219
|
+
return "XP";
|
|
220
|
+
case "NT 5.0":
|
|
221
|
+
return "2000";
|
|
222
|
+
case "NT 5.1":
|
|
223
|
+
return "XP";
|
|
224
|
+
case "NT 5.2":
|
|
225
|
+
return "2003";
|
|
226
|
+
case "NT 6.0":
|
|
227
|
+
return "Vista";
|
|
228
|
+
case "NT 6.1":
|
|
229
|
+
return "7";
|
|
230
|
+
case "NT 6.2":
|
|
231
|
+
return "8";
|
|
232
|
+
case "NT 6.3":
|
|
233
|
+
return "8.1";
|
|
234
|
+
case "NT 10.0":
|
|
235
|
+
return "10";
|
|
236
|
+
default:
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
Utils.getMacOSVersionName = function getMacOSVersionName(version) {
|
|
241
|
+
var v = version.split(".").splice(0, 2).map(function (s) {
|
|
242
|
+
return parseInt(s, 10) || 0;
|
|
243
|
+
});
|
|
244
|
+
v.push(0);
|
|
245
|
+
var major = v[0];
|
|
246
|
+
var minor = v[1];
|
|
247
|
+
if (major === 10) switch (minor) {
|
|
248
|
+
case 5:
|
|
249
|
+
return "Leopard";
|
|
250
|
+
case 6:
|
|
251
|
+
return "Snow Leopard";
|
|
252
|
+
case 7:
|
|
253
|
+
return "Lion";
|
|
254
|
+
case 8:
|
|
255
|
+
return "Mountain Lion";
|
|
256
|
+
case 9:
|
|
257
|
+
return "Mavericks";
|
|
258
|
+
case 10:
|
|
259
|
+
return "Yosemite";
|
|
260
|
+
case 11:
|
|
261
|
+
return "El Capitan";
|
|
262
|
+
case 12:
|
|
263
|
+
return "Sierra";
|
|
264
|
+
case 13:
|
|
265
|
+
return "High Sierra";
|
|
266
|
+
case 14:
|
|
267
|
+
return "Mojave";
|
|
268
|
+
case 15:
|
|
269
|
+
return "Catalina";
|
|
270
|
+
default:
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
switch (major) {
|
|
274
|
+
case 11:
|
|
275
|
+
return "Big Sur";
|
|
276
|
+
case 12:
|
|
277
|
+
return "Monterey";
|
|
278
|
+
case 13:
|
|
279
|
+
return "Ventura";
|
|
280
|
+
case 14:
|
|
281
|
+
return "Sonoma";
|
|
282
|
+
case 15:
|
|
283
|
+
return "Sequoia";
|
|
284
|
+
default:
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
Utils.getAndroidVersionName = function getAndroidVersionName(version) {
|
|
289
|
+
var v = version.split(".").splice(0, 2).map(function (s) {
|
|
290
|
+
return parseInt(s, 10) || 0;
|
|
291
|
+
});
|
|
292
|
+
v.push(0);
|
|
293
|
+
if (v[0] === 1 && v[1] < 5) return void 0;
|
|
294
|
+
if (v[0] === 1 && v[1] < 6) return "Cupcake";
|
|
295
|
+
if (v[0] === 1 && v[1] >= 6) return "Donut";
|
|
296
|
+
if (v[0] === 2 && v[1] < 2) return "Eclair";
|
|
297
|
+
if (v[0] === 2 && v[1] === 2) return "Froyo";
|
|
298
|
+
if (v[0] === 2 && v[1] > 2) return "Gingerbread";
|
|
299
|
+
if (v[0] === 3) return "Honeycomb";
|
|
300
|
+
if (v[0] === 4 && v[1] < 1) return "Ice Cream Sandwich";
|
|
301
|
+
if (v[0] === 4 && v[1] < 4) return "Jelly Bean";
|
|
302
|
+
if (v[0] === 4 && v[1] >= 4) return "KitKat";
|
|
303
|
+
if (v[0] === 5) return "Lollipop";
|
|
304
|
+
if (v[0] === 6) return "Marshmallow";
|
|
305
|
+
if (v[0] === 7) return "Nougat";
|
|
306
|
+
if (v[0] === 8) return "Oreo";
|
|
307
|
+
if (v[0] === 9) return "Pie";
|
|
308
|
+
};
|
|
309
|
+
Utils.getVersionPrecision = function getVersionPrecision(version) {
|
|
310
|
+
return version.split(".").length;
|
|
311
|
+
};
|
|
312
|
+
Utils.compareVersions = function compareVersions(versionA, versionB, isLoose) {
|
|
313
|
+
if (isLoose === void 0) isLoose = false;
|
|
314
|
+
var versionAPrecision = Utils.getVersionPrecision(versionA);
|
|
315
|
+
var versionBPrecision = Utils.getVersionPrecision(versionB);
|
|
316
|
+
var precision = Math.max(versionAPrecision, versionBPrecision);
|
|
317
|
+
var lastPrecision = 0;
|
|
318
|
+
var chunks = Utils.map([versionA, versionB], function (version) {
|
|
319
|
+
var delta = precision - Utils.getVersionPrecision(version);
|
|
320
|
+
var _version = version + new Array(delta + 1).join(".0");
|
|
321
|
+
return Utils.map(_version.split("."), function (chunk) {
|
|
322
|
+
return new Array(20 - chunk.length).join("0") + chunk;
|
|
323
|
+
}).reverse();
|
|
324
|
+
});
|
|
325
|
+
if (isLoose) lastPrecision = precision - Math.min(versionAPrecision, versionBPrecision);
|
|
326
|
+
precision -= 1;
|
|
327
|
+
while (precision >= lastPrecision) {
|
|
328
|
+
if (chunks[0][precision] > chunks[1][precision]) return 1;
|
|
329
|
+
if (chunks[0][precision] === chunks[1][precision]) {
|
|
330
|
+
if (precision === lastPrecision) return 0;
|
|
331
|
+
precision -= 1;
|
|
332
|
+
} else if (chunks[0][precision] < chunks[1][precision]) return -1;
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
Utils.map = function map(arr, iterator) {
|
|
336
|
+
var result = [];
|
|
337
|
+
var i;
|
|
338
|
+
if (Array.prototype.map) return Array.prototype.map.call(arr, iterator);
|
|
339
|
+
for (i = 0; i < arr.length; i += 1) result.push(iterator(arr[i]));
|
|
340
|
+
return result;
|
|
341
|
+
};
|
|
342
|
+
Utils.find = function find(arr, predicate) {
|
|
343
|
+
var i;
|
|
344
|
+
var l;
|
|
345
|
+
if (Array.prototype.find) return Array.prototype.find.call(arr, predicate);
|
|
346
|
+
for (i = 0, l = arr.length; i < l; i += 1) {
|
|
347
|
+
var value = arr[i];
|
|
348
|
+
if (predicate(value, i)) return value;
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
Utils.assign = function assign(obj) {
|
|
352
|
+
var result = obj;
|
|
353
|
+
var i;
|
|
354
|
+
var l;
|
|
355
|
+
for (var _len = arguments.length, assigners = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) assigners[_key - 1] = arguments[_key];
|
|
356
|
+
if (Object.assign) return Object.assign.apply(Object, [obj].concat(assigners));
|
|
357
|
+
var _loop = function _loop() {
|
|
358
|
+
var assigner = assigners[i];
|
|
359
|
+
if (typeof assigner === "object" && assigner !== null) Object.keys(assigner).forEach(function (key) {
|
|
360
|
+
result[key] = assigner[key];
|
|
361
|
+
});
|
|
362
|
+
};
|
|
363
|
+
for (i = 0, l = assigners.length; i < l; i += 1) _loop();
|
|
364
|
+
return obj;
|
|
365
|
+
};
|
|
366
|
+
Utils.getBrowserAlias = function getBrowserAlias(browserName) {
|
|
367
|
+
return BROWSER_ALIASES_MAP[browserName];
|
|
368
|
+
};
|
|
369
|
+
Utils.getBrowserTypeByAlias = function getBrowserTypeByAlias(browserAlias) {
|
|
370
|
+
return BROWSER_MAP[browserAlias] || "";
|
|
371
|
+
};
|
|
372
|
+
return Utils;
|
|
373
|
+
}();
|
|
374
|
+
|
|
375
|
+
//#endregion
|
|
376
|
+
//#region src/parser-browsers.js
|
|
377
|
+
/**
|
|
378
|
+
* Browsers' descriptors
|
|
379
|
+
*
|
|
380
|
+
* The idea of descriptors is simple. You should know about them two simple things:
|
|
381
|
+
* 1. Every descriptor has a method or property called `test` and a `describe` method.
|
|
382
|
+
* 2. Order of descriptors is important.
|
|
383
|
+
*
|
|
384
|
+
* More details:
|
|
385
|
+
* 1. Method or property `test` serves as a way to detect whether the UA string
|
|
386
|
+
* matches some certain browser or not. The `describe` method helps to make a result
|
|
387
|
+
* object with params that show some browser-specific things: name, version, etc.
|
|
388
|
+
* 2. Order of descriptors is important because a Parser goes through them one by one
|
|
389
|
+
* in course. For example, if you insert Chrome's descriptor as the first one,
|
|
390
|
+
* more then a half of browsers will be described as Chrome, because they will pass
|
|
391
|
+
* the Chrome descriptor's test.
|
|
392
|
+
*
|
|
393
|
+
* Descriptor's `test` could be a property with an array of RegExps, where every RegExp
|
|
394
|
+
* will be applied to a UA string to test it whether it matches or not.
|
|
395
|
+
* If a descriptor has two or more regexps in the `test` array it tests them one by one
|
|
396
|
+
* with a logical sum operation. Parser stops if it has found any RegExp that matches the UA.
|
|
397
|
+
*
|
|
398
|
+
* Or `test` could be a method. In that case it gets a Parser instance and should
|
|
399
|
+
* return true/false to get the Parser know if this browser descriptor matches the UA or not.
|
|
400
|
+
*/
|
|
401
|
+
var commonVersionIdentifier = /version\/(\d+(\.?_?\d+)+)/i;
|
|
402
|
+
var browsersList = [{
|
|
403
|
+
test: [/gptbot/i],
|
|
404
|
+
describe: function describe(ua) {
|
|
405
|
+
var browser = {
|
|
406
|
+
name: "GPTBot"
|
|
407
|
+
};
|
|
408
|
+
var version = Utils.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
409
|
+
if (version) browser.version = version;
|
|
410
|
+
return browser;
|
|
411
|
+
}
|
|
412
|
+
}, {
|
|
413
|
+
test: [/chatgpt-user/i],
|
|
414
|
+
describe: function describe(ua) {
|
|
415
|
+
var browser = {
|
|
416
|
+
name: "ChatGPT-User"
|
|
417
|
+
};
|
|
418
|
+
var version = Utils.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
419
|
+
if (version) browser.version = version;
|
|
420
|
+
return browser;
|
|
421
|
+
}
|
|
422
|
+
}, {
|
|
423
|
+
test: [/oai-searchbot/i],
|
|
424
|
+
describe: function describe(ua) {
|
|
425
|
+
var browser = {
|
|
426
|
+
name: "OAI-SearchBot"
|
|
427
|
+
};
|
|
428
|
+
var version = Utils.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
429
|
+
if (version) browser.version = version;
|
|
430
|
+
return browser;
|
|
431
|
+
}
|
|
432
|
+
}, {
|
|
433
|
+
test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i],
|
|
434
|
+
describe: function describe(ua) {
|
|
435
|
+
var browser = {
|
|
436
|
+
name: "ClaudeBot"
|
|
437
|
+
};
|
|
438
|
+
var version = Utils.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
439
|
+
if (version) browser.version = version;
|
|
440
|
+
return browser;
|
|
441
|
+
}
|
|
442
|
+
}, {
|
|
443
|
+
test: [/omgilibot/i, /webzio-extended/i],
|
|
444
|
+
describe: function describe(ua) {
|
|
445
|
+
var browser = {
|
|
446
|
+
name: "Omgilibot"
|
|
447
|
+
};
|
|
448
|
+
var version = Utils.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
449
|
+
if (version) browser.version = version;
|
|
450
|
+
return browser;
|
|
451
|
+
}
|
|
452
|
+
}, {
|
|
453
|
+
test: [/diffbot/i],
|
|
454
|
+
describe: function describe(ua) {
|
|
455
|
+
var browser = {
|
|
456
|
+
name: "Diffbot"
|
|
457
|
+
};
|
|
458
|
+
var version = Utils.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
459
|
+
if (version) browser.version = version;
|
|
460
|
+
return browser;
|
|
461
|
+
}
|
|
462
|
+
}, {
|
|
463
|
+
test: [/perplexitybot/i],
|
|
464
|
+
describe: function describe(ua) {
|
|
465
|
+
var browser = {
|
|
466
|
+
name: "PerplexityBot"
|
|
467
|
+
};
|
|
468
|
+
var version = Utils.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
469
|
+
if (version) browser.version = version;
|
|
470
|
+
return browser;
|
|
471
|
+
}
|
|
472
|
+
}, {
|
|
473
|
+
test: [/perplexity-user/i],
|
|
474
|
+
describe: function describe(ua) {
|
|
475
|
+
var browser = {
|
|
476
|
+
name: "Perplexity-User"
|
|
477
|
+
};
|
|
478
|
+
var version = Utils.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
479
|
+
if (version) browser.version = version;
|
|
480
|
+
return browser;
|
|
481
|
+
}
|
|
482
|
+
}, {
|
|
483
|
+
test: [/youbot/i],
|
|
484
|
+
describe: function describe(ua) {
|
|
485
|
+
var browser = {
|
|
486
|
+
name: "YouBot"
|
|
487
|
+
};
|
|
488
|
+
var version = Utils.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
489
|
+
if (version) browser.version = version;
|
|
490
|
+
return browser;
|
|
491
|
+
}
|
|
492
|
+
}, {
|
|
493
|
+
test: [/meta-webindexer/i],
|
|
494
|
+
describe: function describe(ua) {
|
|
495
|
+
var browser = {
|
|
496
|
+
name: "Meta-WebIndexer"
|
|
497
|
+
};
|
|
498
|
+
var version = Utils.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
499
|
+
if (version) browser.version = version;
|
|
500
|
+
return browser;
|
|
501
|
+
}
|
|
502
|
+
}, {
|
|
503
|
+
test: [/meta-externalads/i],
|
|
504
|
+
describe: function describe(ua) {
|
|
505
|
+
var browser = {
|
|
506
|
+
name: "Meta-ExternalAds"
|
|
507
|
+
};
|
|
508
|
+
var version = Utils.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
509
|
+
if (version) browser.version = version;
|
|
510
|
+
return browser;
|
|
511
|
+
}
|
|
512
|
+
}, {
|
|
513
|
+
test: [/meta-externalagent/i],
|
|
514
|
+
describe: function describe(ua) {
|
|
515
|
+
var browser = {
|
|
516
|
+
name: "Meta-ExternalAgent"
|
|
517
|
+
};
|
|
518
|
+
var version = Utils.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
519
|
+
if (version) browser.version = version;
|
|
520
|
+
return browser;
|
|
521
|
+
}
|
|
522
|
+
}, {
|
|
523
|
+
test: [/meta-externalfetcher/i],
|
|
524
|
+
describe: function describe(ua) {
|
|
525
|
+
var browser = {
|
|
526
|
+
name: "Meta-ExternalFetcher"
|
|
527
|
+
};
|
|
528
|
+
var version = Utils.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
529
|
+
if (version) browser.version = version;
|
|
530
|
+
return browser;
|
|
531
|
+
}
|
|
532
|
+
}, {
|
|
533
|
+
test: [/googlebot/i],
|
|
534
|
+
describe: function describe(ua) {
|
|
535
|
+
var browser = {
|
|
536
|
+
name: "Googlebot"
|
|
537
|
+
};
|
|
538
|
+
var version = Utils.getFirstMatch(/googlebot\/(\d+(\.\d+))/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
539
|
+
if (version) browser.version = version;
|
|
540
|
+
return browser;
|
|
541
|
+
}
|
|
542
|
+
}, {
|
|
543
|
+
test: [/linespider/i],
|
|
544
|
+
describe: function describe(ua) {
|
|
545
|
+
var browser = {
|
|
546
|
+
name: "Linespider"
|
|
547
|
+
};
|
|
548
|
+
var version = Utils.getFirstMatch(/(?:linespider)(?:-[-\w]{1,64})?[\s/](\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
549
|
+
if (version) browser.version = version;
|
|
550
|
+
return browser;
|
|
551
|
+
}
|
|
552
|
+
}, {
|
|
553
|
+
test: [/amazonbot/i],
|
|
554
|
+
describe: function describe(ua) {
|
|
555
|
+
var browser = {
|
|
556
|
+
name: "AmazonBot"
|
|
557
|
+
};
|
|
558
|
+
var version = Utils.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
559
|
+
if (version) browser.version = version;
|
|
560
|
+
return browser;
|
|
561
|
+
}
|
|
562
|
+
}, {
|
|
563
|
+
test: [/bingbot/i],
|
|
564
|
+
describe: function describe(ua) {
|
|
565
|
+
var browser = {
|
|
566
|
+
name: "BingCrawler"
|
|
567
|
+
};
|
|
568
|
+
var version = Utils.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
569
|
+
if (version) browser.version = version;
|
|
570
|
+
return browser;
|
|
571
|
+
}
|
|
572
|
+
}, {
|
|
573
|
+
test: [/baiduspider/i],
|
|
574
|
+
describe: function describe(ua) {
|
|
575
|
+
var browser = {
|
|
576
|
+
name: "BaiduSpider"
|
|
577
|
+
};
|
|
578
|
+
var version = Utils.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
579
|
+
if (version) browser.version = version;
|
|
580
|
+
return browser;
|
|
581
|
+
}
|
|
582
|
+
}, {
|
|
583
|
+
test: [/duckduckbot/i],
|
|
584
|
+
describe: function describe(ua) {
|
|
585
|
+
var browser = {
|
|
586
|
+
name: "DuckDuckBot"
|
|
587
|
+
};
|
|
588
|
+
var version = Utils.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
589
|
+
if (version) browser.version = version;
|
|
590
|
+
return browser;
|
|
591
|
+
}
|
|
592
|
+
}, {
|
|
593
|
+
test: [/ia_archiver/i],
|
|
594
|
+
describe: function describe(ua) {
|
|
595
|
+
var browser = {
|
|
596
|
+
name: "InternetArchiveCrawler"
|
|
597
|
+
};
|
|
598
|
+
var version = Utils.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
599
|
+
if (version) browser.version = version;
|
|
600
|
+
return browser;
|
|
601
|
+
}
|
|
602
|
+
}, {
|
|
603
|
+
test: [/facebookexternalhit/i, /facebookcatalog/i],
|
|
604
|
+
describe: function describe() {
|
|
605
|
+
return {
|
|
606
|
+
name: "FacebookExternalHit"
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
}, {
|
|
610
|
+
test: [/slackbot/i, /slack-imgProxy/i],
|
|
611
|
+
describe: function describe(ua) {
|
|
612
|
+
var browser = {
|
|
613
|
+
name: "SlackBot"
|
|
614
|
+
};
|
|
615
|
+
var version = Utils.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]{1,64})?[\s/](\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
616
|
+
if (version) browser.version = version;
|
|
617
|
+
return browser;
|
|
618
|
+
}
|
|
619
|
+
}, {
|
|
620
|
+
test: [/yahoo!?[\s/]*slurp/i],
|
|
621
|
+
describe: function describe() {
|
|
622
|
+
return {
|
|
623
|
+
name: "YahooSlurp"
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
}, {
|
|
627
|
+
test: [/yandexbot/i, /yandexmobilebot/i],
|
|
628
|
+
describe: function describe() {
|
|
629
|
+
return {
|
|
630
|
+
name: "YandexBot"
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
}, {
|
|
634
|
+
test: [/pingdom/i],
|
|
635
|
+
describe: function describe() {
|
|
636
|
+
return {
|
|
637
|
+
name: "PingdomBot"
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
}, {
|
|
641
|
+
test: [/opera/i],
|
|
642
|
+
describe: function describe(ua) {
|
|
643
|
+
var browser = {
|
|
644
|
+
name: "Opera"
|
|
645
|
+
};
|
|
646
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
647
|
+
if (version) browser.version = version;
|
|
648
|
+
return browser;
|
|
649
|
+
}
|
|
650
|
+
}, {
|
|
651
|
+
test: [/opr\/|opios/i],
|
|
652
|
+
describe: function describe(ua) {
|
|
653
|
+
var browser = {
|
|
654
|
+
name: "Opera"
|
|
655
|
+
};
|
|
656
|
+
var version = Utils.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
657
|
+
if (version) browser.version = version;
|
|
658
|
+
return browser;
|
|
659
|
+
}
|
|
660
|
+
}, {
|
|
661
|
+
test: [/SamsungBrowser/i],
|
|
662
|
+
describe: function describe(ua) {
|
|
663
|
+
var browser = {
|
|
664
|
+
name: "Samsung Internet for Android"
|
|
665
|
+
};
|
|
666
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
667
|
+
if (version) browser.version = version;
|
|
668
|
+
return browser;
|
|
669
|
+
}
|
|
670
|
+
}, {
|
|
671
|
+
test: [/Whale/i],
|
|
672
|
+
describe: function describe(ua) {
|
|
673
|
+
var browser = {
|
|
674
|
+
name: "NAVER Whale Browser"
|
|
675
|
+
};
|
|
676
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, ua);
|
|
677
|
+
if (version) browser.version = version;
|
|
678
|
+
return browser;
|
|
679
|
+
}
|
|
680
|
+
}, {
|
|
681
|
+
test: [/PaleMoon/i],
|
|
682
|
+
describe: function describe(ua) {
|
|
683
|
+
var browser = {
|
|
684
|
+
name: "Pale Moon"
|
|
685
|
+
};
|
|
686
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i, ua);
|
|
687
|
+
if (version) browser.version = version;
|
|
688
|
+
return browser;
|
|
689
|
+
}
|
|
690
|
+
}, {
|
|
691
|
+
test: [/HeyTapBrowser/i],
|
|
692
|
+
describe: function describe(ua) {
|
|
693
|
+
var browser = {
|
|
694
|
+
name: "HeyTap Browser"
|
|
695
|
+
};
|
|
696
|
+
var version = Utils.getFirstMatch(/(?:HeyTapBrowser)[\s/](\d+(?:\.\d+)*)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
697
|
+
if (version) browser.version = version;
|
|
698
|
+
return browser;
|
|
699
|
+
}
|
|
700
|
+
}, {
|
|
701
|
+
test: [/VivoBrowser/i],
|
|
702
|
+
describe: function describe(ua) {
|
|
703
|
+
var browser = {
|
|
704
|
+
name: "Vivo Browser"
|
|
705
|
+
};
|
|
706
|
+
var version = Utils.getFirstMatch(/(?:VivoBrowser)[\s/](\d+(?:\.\d+)*)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
707
|
+
if (version) browser.version = version;
|
|
708
|
+
return browser;
|
|
709
|
+
}
|
|
710
|
+
}, {
|
|
711
|
+
test: [/MZBrowser/i],
|
|
712
|
+
describe: function describe(ua) {
|
|
713
|
+
var browser = {
|
|
714
|
+
name: "MZ Browser"
|
|
715
|
+
};
|
|
716
|
+
var version = Utils.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
717
|
+
if (version) browser.version = version;
|
|
718
|
+
return browser;
|
|
719
|
+
}
|
|
720
|
+
}, {
|
|
721
|
+
test: [/focus/i],
|
|
722
|
+
describe: function describe(ua) {
|
|
723
|
+
var browser = {
|
|
724
|
+
name: "Focus"
|
|
725
|
+
};
|
|
726
|
+
var version = Utils.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
727
|
+
if (version) browser.version = version;
|
|
728
|
+
return browser;
|
|
729
|
+
}
|
|
730
|
+
}, {
|
|
731
|
+
test: [/swing/i],
|
|
732
|
+
describe: function describe(ua) {
|
|
733
|
+
var browser = {
|
|
734
|
+
name: "Swing"
|
|
735
|
+
};
|
|
736
|
+
var version = Utils.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
737
|
+
if (version) browser.version = version;
|
|
738
|
+
return browser;
|
|
739
|
+
}
|
|
740
|
+
}, {
|
|
741
|
+
test: [/coast/i],
|
|
742
|
+
describe: function describe(ua) {
|
|
743
|
+
var browser = {
|
|
744
|
+
name: "Opera Coast"
|
|
745
|
+
};
|
|
746
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
747
|
+
if (version) browser.version = version;
|
|
748
|
+
return browser;
|
|
749
|
+
}
|
|
750
|
+
}, {
|
|
751
|
+
test: [/opt\/\d+(?:.?_?\d+)+/i],
|
|
752
|
+
describe: function describe(ua) {
|
|
753
|
+
var browser = {
|
|
754
|
+
name: "Opera Touch"
|
|
755
|
+
};
|
|
756
|
+
var version = Utils.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
757
|
+
if (version) browser.version = version;
|
|
758
|
+
return browser;
|
|
759
|
+
}
|
|
760
|
+
}, {
|
|
761
|
+
test: [/yabrowser/i],
|
|
762
|
+
describe: function describe(ua) {
|
|
763
|
+
var browser = {
|
|
764
|
+
name: "Yandex Browser"
|
|
765
|
+
};
|
|
766
|
+
var version = Utils.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
767
|
+
if (version) browser.version = version;
|
|
768
|
+
return browser;
|
|
769
|
+
}
|
|
770
|
+
}, {
|
|
771
|
+
test: [/ucbrowser/i],
|
|
772
|
+
describe: function describe(ua) {
|
|
773
|
+
var browser = {
|
|
774
|
+
name: "UC Browser"
|
|
775
|
+
};
|
|
776
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
777
|
+
if (version) browser.version = version;
|
|
778
|
+
return browser;
|
|
779
|
+
}
|
|
780
|
+
}, {
|
|
781
|
+
test: [/Maxthon|mxios/i],
|
|
782
|
+
describe: function describe(ua) {
|
|
783
|
+
var browser = {
|
|
784
|
+
name: "Maxthon"
|
|
785
|
+
};
|
|
786
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
787
|
+
if (version) browser.version = version;
|
|
788
|
+
return browser;
|
|
789
|
+
}
|
|
790
|
+
}, {
|
|
791
|
+
test: [/epiphany/i],
|
|
792
|
+
describe: function describe(ua) {
|
|
793
|
+
var browser = {
|
|
794
|
+
name: "Epiphany"
|
|
795
|
+
};
|
|
796
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
797
|
+
if (version) browser.version = version;
|
|
798
|
+
return browser;
|
|
799
|
+
}
|
|
800
|
+
}, {
|
|
801
|
+
test: [/puffin/i],
|
|
802
|
+
describe: function describe(ua) {
|
|
803
|
+
var browser = {
|
|
804
|
+
name: "Puffin"
|
|
805
|
+
};
|
|
806
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
807
|
+
if (version) browser.version = version;
|
|
808
|
+
return browser;
|
|
809
|
+
}
|
|
810
|
+
}, {
|
|
811
|
+
test: [/sleipnir/i],
|
|
812
|
+
describe: function describe(ua) {
|
|
813
|
+
var browser = {
|
|
814
|
+
name: "Sleipnir"
|
|
815
|
+
};
|
|
816
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
817
|
+
if (version) browser.version = version;
|
|
818
|
+
return browser;
|
|
819
|
+
}
|
|
820
|
+
}, {
|
|
821
|
+
test: [/k-meleon/i],
|
|
822
|
+
describe: function describe(ua) {
|
|
823
|
+
var browser = {
|
|
824
|
+
name: "K-Meleon"
|
|
825
|
+
};
|
|
826
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
827
|
+
if (version) browser.version = version;
|
|
828
|
+
return browser;
|
|
829
|
+
}
|
|
830
|
+
}, {
|
|
831
|
+
test: [/micromessenger/i],
|
|
832
|
+
describe: function describe(ua) {
|
|
833
|
+
var browser = {
|
|
834
|
+
name: "WeChat"
|
|
835
|
+
};
|
|
836
|
+
var version = Utils.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
837
|
+
if (version) browser.version = version;
|
|
838
|
+
return browser;
|
|
839
|
+
}
|
|
840
|
+
}, {
|
|
841
|
+
test: [/qqbrowser/i],
|
|
842
|
+
describe: function describe(ua) {
|
|
843
|
+
var browser = {
|
|
844
|
+
name: /qqbrowserlite/i.test(ua) ? "QQ Browser Lite" : "QQ Browser"
|
|
845
|
+
};
|
|
846
|
+
var version = Utils.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
847
|
+
if (version) browser.version = version;
|
|
848
|
+
return browser;
|
|
849
|
+
}
|
|
850
|
+
}, {
|
|
851
|
+
test: [/msie|trident/i],
|
|
852
|
+
describe: function describe(ua) {
|
|
853
|
+
var browser = {
|
|
854
|
+
name: "Internet Explorer"
|
|
855
|
+
};
|
|
856
|
+
var version = Utils.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, ua);
|
|
857
|
+
if (version) browser.version = version;
|
|
858
|
+
return browser;
|
|
859
|
+
}
|
|
860
|
+
}, {
|
|
861
|
+
test: [/\sedg\//i],
|
|
862
|
+
describe: function describe(ua) {
|
|
863
|
+
var browser = {
|
|
864
|
+
name: "Microsoft Edge"
|
|
865
|
+
};
|
|
866
|
+
var version = Utils.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, ua);
|
|
867
|
+
if (version) browser.version = version;
|
|
868
|
+
return browser;
|
|
869
|
+
}
|
|
870
|
+
}, {
|
|
871
|
+
test: [/edg([ea]|ios)\//i],
|
|
872
|
+
describe: function describe(ua) {
|
|
873
|
+
var browser = {
|
|
874
|
+
name: "Microsoft Edge"
|
|
875
|
+
};
|
|
876
|
+
var version = Utils.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, ua);
|
|
877
|
+
if (version) browser.version = version;
|
|
878
|
+
return browser;
|
|
879
|
+
}
|
|
880
|
+
}, {
|
|
881
|
+
test: function test(parser) {
|
|
882
|
+
if (parser.hasBrand("Vivaldi")) return true;
|
|
883
|
+
return parser.test(/vivaldi/i);
|
|
884
|
+
},
|
|
885
|
+
describe: function describe(ua, parser) {
|
|
886
|
+
var browser = {
|
|
887
|
+
name: "Vivaldi"
|
|
888
|
+
};
|
|
889
|
+
if (parser) {
|
|
890
|
+
var hintsVersion = parser.getBrandVersion("Vivaldi");
|
|
891
|
+
if (hintsVersion) {
|
|
892
|
+
browser.version = hintsVersion;
|
|
893
|
+
return browser;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
var version = Utils.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i, ua);
|
|
897
|
+
if (version) browser.version = version;
|
|
898
|
+
return browser;
|
|
899
|
+
}
|
|
900
|
+
}, {
|
|
901
|
+
test: [/seamonkey/i],
|
|
902
|
+
describe: function describe(ua) {
|
|
903
|
+
var browser = {
|
|
904
|
+
name: "SeaMonkey"
|
|
905
|
+
};
|
|
906
|
+
var version = Utils.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i, ua);
|
|
907
|
+
if (version) browser.version = version;
|
|
908
|
+
return browser;
|
|
909
|
+
}
|
|
910
|
+
}, {
|
|
911
|
+
test: [/sailfish/i],
|
|
912
|
+
describe: function describe(ua) {
|
|
913
|
+
var browser = {
|
|
914
|
+
name: "Sailfish"
|
|
915
|
+
};
|
|
916
|
+
var version = Utils.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i, ua);
|
|
917
|
+
if (version) browser.version = version;
|
|
918
|
+
return browser;
|
|
919
|
+
}
|
|
920
|
+
}, {
|
|
921
|
+
test: [/silk/i],
|
|
922
|
+
describe: function describe(ua) {
|
|
923
|
+
var browser = {
|
|
924
|
+
name: "Amazon Silk"
|
|
925
|
+
};
|
|
926
|
+
var version = Utils.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i, ua);
|
|
927
|
+
if (version) browser.version = version;
|
|
928
|
+
return browser;
|
|
929
|
+
}
|
|
930
|
+
}, {
|
|
931
|
+
test: [/phantom/i],
|
|
932
|
+
describe: function describe(ua) {
|
|
933
|
+
var browser = {
|
|
934
|
+
name: "PhantomJS"
|
|
935
|
+
};
|
|
936
|
+
var version = Utils.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i, ua);
|
|
937
|
+
if (version) browser.version = version;
|
|
938
|
+
return browser;
|
|
939
|
+
}
|
|
940
|
+
}, {
|
|
941
|
+
test: [/slimerjs/i],
|
|
942
|
+
describe: function describe(ua) {
|
|
943
|
+
var browser = {
|
|
944
|
+
name: "SlimerJS"
|
|
945
|
+
};
|
|
946
|
+
var version = Utils.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i, ua);
|
|
947
|
+
if (version) browser.version = version;
|
|
948
|
+
return browser;
|
|
949
|
+
}
|
|
950
|
+
}, {
|
|
951
|
+
test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
|
|
952
|
+
describe: function describe(ua) {
|
|
953
|
+
var browser = {
|
|
954
|
+
name: "BlackBerry"
|
|
955
|
+
};
|
|
956
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, ua);
|
|
957
|
+
if (version) browser.version = version;
|
|
958
|
+
return browser;
|
|
959
|
+
}
|
|
960
|
+
}, {
|
|
961
|
+
test: [/(web|hpw)[o0]s/i],
|
|
962
|
+
describe: function describe(ua) {
|
|
963
|
+
var browser = {
|
|
964
|
+
name: "WebOS Browser"
|
|
965
|
+
};
|
|
966
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, ua);
|
|
967
|
+
if (version) browser.version = version;
|
|
968
|
+
return browser;
|
|
969
|
+
}
|
|
970
|
+
}, {
|
|
971
|
+
test: [/bada/i],
|
|
972
|
+
describe: function describe(ua) {
|
|
973
|
+
var browser = {
|
|
974
|
+
name: "Bada"
|
|
975
|
+
};
|
|
976
|
+
var version = Utils.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i, ua);
|
|
977
|
+
if (version) browser.version = version;
|
|
978
|
+
return browser;
|
|
979
|
+
}
|
|
980
|
+
}, {
|
|
981
|
+
test: [/tizen/i],
|
|
982
|
+
describe: function describe(ua) {
|
|
983
|
+
var browser = {
|
|
984
|
+
name: "Tizen"
|
|
985
|
+
};
|
|
986
|
+
var version = Utils.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
987
|
+
if (version) browser.version = version;
|
|
988
|
+
return browser;
|
|
989
|
+
}
|
|
990
|
+
}, {
|
|
991
|
+
test: [/qupzilla/i],
|
|
992
|
+
describe: function describe(ua) {
|
|
993
|
+
var browser = {
|
|
994
|
+
name: "QupZilla"
|
|
995
|
+
};
|
|
996
|
+
var version = Utils.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
997
|
+
if (version) browser.version = version;
|
|
998
|
+
return browser;
|
|
999
|
+
}
|
|
1000
|
+
}, {
|
|
1001
|
+
test: [/librewolf/i],
|
|
1002
|
+
describe: function describe(ua) {
|
|
1003
|
+
var browser = {
|
|
1004
|
+
name: "LibreWolf"
|
|
1005
|
+
};
|
|
1006
|
+
var version = Utils.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
1007
|
+
if (version) browser.version = version;
|
|
1008
|
+
return browser;
|
|
1009
|
+
}
|
|
1010
|
+
}, {
|
|
1011
|
+
test: [/firefox|iceweasel|fxios/i],
|
|
1012
|
+
describe: function describe(ua) {
|
|
1013
|
+
var browser = {
|
|
1014
|
+
name: "Firefox"
|
|
1015
|
+
};
|
|
1016
|
+
var version = Utils.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
1017
|
+
if (version) browser.version = version;
|
|
1018
|
+
return browser;
|
|
1019
|
+
}
|
|
1020
|
+
}, {
|
|
1021
|
+
test: [/electron/i],
|
|
1022
|
+
describe: function describe(ua) {
|
|
1023
|
+
var browser = {
|
|
1024
|
+
name: "Electron"
|
|
1025
|
+
};
|
|
1026
|
+
var version = Utils.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1027
|
+
if (version) browser.version = version;
|
|
1028
|
+
return browser;
|
|
1029
|
+
}
|
|
1030
|
+
}, {
|
|
1031
|
+
test: [/sogoumobilebrowser/i, /metasr/i, /se 2\.[x]/i],
|
|
1032
|
+
describe: function describe(ua) {
|
|
1033
|
+
var browser = {
|
|
1034
|
+
name: "Sogou Browser"
|
|
1035
|
+
};
|
|
1036
|
+
var sogouMobileVersion = Utils.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
1037
|
+
var chromiumVersion = Utils.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1038
|
+
var seVersion = Utils.getFirstMatch(/se ([\d.]+)x/i, ua);
|
|
1039
|
+
var version = sogouMobileVersion || chromiumVersion || seVersion;
|
|
1040
|
+
if (version) browser.version = version;
|
|
1041
|
+
return browser;
|
|
1042
|
+
}
|
|
1043
|
+
}, {
|
|
1044
|
+
test: [/MiuiBrowser/i],
|
|
1045
|
+
describe: function describe(ua) {
|
|
1046
|
+
var browser = {
|
|
1047
|
+
name: "Miui"
|
|
1048
|
+
};
|
|
1049
|
+
var version = Utils.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, ua);
|
|
1050
|
+
if (version) browser.version = version;
|
|
1051
|
+
return browser;
|
|
1052
|
+
}
|
|
1053
|
+
}, {
|
|
1054
|
+
test: function test(parser) {
|
|
1055
|
+
if (parser.hasBrand("DuckDuckGo")) return true;
|
|
1056
|
+
return parser.test(/\sDdg\/[\d.]+$/i);
|
|
1057
|
+
},
|
|
1058
|
+
describe: function describe(ua, parser) {
|
|
1059
|
+
var browser = {
|
|
1060
|
+
name: "DuckDuckGo"
|
|
1061
|
+
};
|
|
1062
|
+
if (parser) {
|
|
1063
|
+
var hintsVersion = parser.getBrandVersion("DuckDuckGo");
|
|
1064
|
+
if (hintsVersion) {
|
|
1065
|
+
browser.version = hintsVersion;
|
|
1066
|
+
return browser;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
var uaVersion = Utils.getFirstMatch(/\sDdg\/([\d.]+)$/i, ua);
|
|
1070
|
+
if (uaVersion) browser.version = uaVersion;
|
|
1071
|
+
return browser;
|
|
1072
|
+
}
|
|
1073
|
+
}, {
|
|
1074
|
+
test: function test(parser) {
|
|
1075
|
+
return parser.hasBrand("Brave");
|
|
1076
|
+
},
|
|
1077
|
+
describe: function describe(ua, parser) {
|
|
1078
|
+
var browser = {
|
|
1079
|
+
name: "Brave"
|
|
1080
|
+
};
|
|
1081
|
+
if (parser) {
|
|
1082
|
+
var hintsVersion = parser.getBrandVersion("Brave");
|
|
1083
|
+
if (hintsVersion) {
|
|
1084
|
+
browser.version = hintsVersion;
|
|
1085
|
+
return browser;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
return browser;
|
|
1089
|
+
}
|
|
1090
|
+
}, {
|
|
1091
|
+
test: [/chromium/i],
|
|
1092
|
+
describe: function describe(ua) {
|
|
1093
|
+
var browser = {
|
|
1094
|
+
name: "Chromium"
|
|
1095
|
+
};
|
|
1096
|
+
var version = Utils.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
1097
|
+
if (version) browser.version = version;
|
|
1098
|
+
return browser;
|
|
1099
|
+
}
|
|
1100
|
+
}, {
|
|
1101
|
+
test: [/ladybird/i],
|
|
1102
|
+
describe: function describe(ua) {
|
|
1103
|
+
var browser = {
|
|
1104
|
+
name: "Ladybird"
|
|
1105
|
+
};
|
|
1106
|
+
var version = Utils.getFirstMatch(/ladybird\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1107
|
+
if (version) browser.version = version;
|
|
1108
|
+
return browser;
|
|
1109
|
+
}
|
|
1110
|
+
}, {
|
|
1111
|
+
test: [/chrome|crios|crmo/i],
|
|
1112
|
+
describe: function describe(ua) {
|
|
1113
|
+
var browser = {
|
|
1114
|
+
name: "Chrome"
|
|
1115
|
+
};
|
|
1116
|
+
var version = Utils.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1117
|
+
if (version) browser.version = version;
|
|
1118
|
+
return browser;
|
|
1119
|
+
}
|
|
1120
|
+
}, {
|
|
1121
|
+
test: [/GSA/i],
|
|
1122
|
+
describe: function describe(ua) {
|
|
1123
|
+
var browser = {
|
|
1124
|
+
name: "Google Search"
|
|
1125
|
+
};
|
|
1126
|
+
var version = Utils.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1127
|
+
if (version) browser.version = version;
|
|
1128
|
+
return browser;
|
|
1129
|
+
}
|
|
1130
|
+
}, {
|
|
1131
|
+
test: function test(parser) {
|
|
1132
|
+
var notLikeAndroid = !parser.test(/like android/i);
|
|
1133
|
+
var butAndroid = parser.test(/android/i);
|
|
1134
|
+
return notLikeAndroid && butAndroid;
|
|
1135
|
+
},
|
|
1136
|
+
describe: function describe(ua) {
|
|
1137
|
+
var browser = {
|
|
1138
|
+
name: "Android Browser"
|
|
1139
|
+
};
|
|
1140
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
1141
|
+
if (version) browser.version = version;
|
|
1142
|
+
return browser;
|
|
1143
|
+
}
|
|
1144
|
+
}, {
|
|
1145
|
+
test: [/playstation 4/i],
|
|
1146
|
+
describe: function describe(ua) {
|
|
1147
|
+
var browser = {
|
|
1148
|
+
name: "PlayStation 4"
|
|
1149
|
+
};
|
|
1150
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
1151
|
+
if (version) browser.version = version;
|
|
1152
|
+
return browser;
|
|
1153
|
+
}
|
|
1154
|
+
}, {
|
|
1155
|
+
test: [/safari|applewebkit/i],
|
|
1156
|
+
describe: function describe(ua) {
|
|
1157
|
+
var browser = {
|
|
1158
|
+
name: "Safari"
|
|
1159
|
+
};
|
|
1160
|
+
var version = Utils.getFirstMatch(commonVersionIdentifier, ua);
|
|
1161
|
+
if (version) browser.version = version;
|
|
1162
|
+
return browser;
|
|
1163
|
+
}
|
|
1164
|
+
}, {
|
|
1165
|
+
test: [/.*/i],
|
|
1166
|
+
describe: function describe(ua) {
|
|
1167
|
+
var regexp = ua.search("\\(") !== -1 ? /^(.*)\/([^/]*)[ \t]\((.*)/ : /^(.*)\/([^/]*) /;
|
|
1168
|
+
return {
|
|
1169
|
+
name: Utils.getFirstMatch(regexp, ua),
|
|
1170
|
+
version: Utils.getSecondMatch(regexp, ua)
|
|
1171
|
+
};
|
|
1172
|
+
}
|
|
1173
|
+
}];
|
|
1174
|
+
|
|
1175
|
+
//#endregion
|
|
1176
|
+
//#region src/parser-os.js
|
|
1177
|
+
var parser_os_default = [{
|
|
1178
|
+
test: [/Roku\/DVP/],
|
|
1179
|
+
describe: function describe(ua) {
|
|
1180
|
+
var version = Utils.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, ua);
|
|
1181
|
+
return {
|
|
1182
|
+
name: OS_MAP.Roku,
|
|
1183
|
+
version: version
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
}, {
|
|
1187
|
+
test: [/windows phone/i],
|
|
1188
|
+
describe: function describe(ua) {
|
|
1189
|
+
var version = Utils.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, ua);
|
|
1190
|
+
return {
|
|
1191
|
+
name: OS_MAP.WindowsPhone,
|
|
1192
|
+
version: version
|
|
1193
|
+
};
|
|
1194
|
+
}
|
|
1195
|
+
}, {
|
|
1196
|
+
test: [/windows /i],
|
|
1197
|
+
describe: function describe(ua) {
|
|
1198
|
+
var version = Utils.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, ua);
|
|
1199
|
+
var versionName = Utils.getWindowsVersionName(version);
|
|
1200
|
+
return {
|
|
1201
|
+
name: OS_MAP.Windows,
|
|
1202
|
+
version: version,
|
|
1203
|
+
versionName: versionName
|
|
1204
|
+
};
|
|
1205
|
+
}
|
|
1206
|
+
}, {
|
|
1207
|
+
test: function test(parser) {
|
|
1208
|
+
return Utils.isFirefoxOnIpad(parser.getUA());
|
|
1209
|
+
},
|
|
1210
|
+
describe: function describe(ua) {
|
|
1211
|
+
var result = {
|
|
1212
|
+
name: OS_MAP.iOS
|
|
1213
|
+
};
|
|
1214
|
+
var version = Utils.getSecondMatch(/(Version\/)(\d[\d.]+)/, ua);
|
|
1215
|
+
if (version) result.version = version;
|
|
1216
|
+
return result;
|
|
1217
|
+
}
|
|
1218
|
+
}, {
|
|
1219
|
+
test: [/macintosh/i],
|
|
1220
|
+
describe: function describe(ua) {
|
|
1221
|
+
var version = Utils.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, ua).replace(/[_\s]/g, ".");
|
|
1222
|
+
var versionName = Utils.getMacOSVersionName(version);
|
|
1223
|
+
var os = {
|
|
1224
|
+
name: OS_MAP.MacOS,
|
|
1225
|
+
version: version
|
|
1226
|
+
};
|
|
1227
|
+
if (versionName) os.versionName = versionName;
|
|
1228
|
+
return os;
|
|
1229
|
+
}
|
|
1230
|
+
}, {
|
|
1231
|
+
test: [/(ipod|iphone|ipad)/i],
|
|
1232
|
+
describe: function describe(ua) {
|
|
1233
|
+
var version = Utils.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i, ua).replace(/[_\s]/g, ".");
|
|
1234
|
+
return {
|
|
1235
|
+
name: OS_MAP.iOS,
|
|
1236
|
+
version: version
|
|
1237
|
+
};
|
|
1238
|
+
}
|
|
1239
|
+
}, {
|
|
1240
|
+
test: [/OpenHarmony/i],
|
|
1241
|
+
describe: function describe(ua) {
|
|
1242
|
+
var version = Utils.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i, ua);
|
|
1243
|
+
return {
|
|
1244
|
+
name: OS_MAP.HarmonyOS,
|
|
1245
|
+
version: version
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
1248
|
+
}, {
|
|
1249
|
+
test: function test(parser) {
|
|
1250
|
+
var notLikeAndroid = !parser.test(/like android/i);
|
|
1251
|
+
var butAndroid = parser.test(/android/i);
|
|
1252
|
+
return notLikeAndroid && butAndroid;
|
|
1253
|
+
},
|
|
1254
|
+
describe: function describe(ua) {
|
|
1255
|
+
var version = Utils.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, ua);
|
|
1256
|
+
var versionName = Utils.getAndroidVersionName(version);
|
|
1257
|
+
var os = {
|
|
1258
|
+
name: OS_MAP.Android,
|
|
1259
|
+
version: version
|
|
1260
|
+
};
|
|
1261
|
+
if (versionName) os.versionName = versionName;
|
|
1262
|
+
return os;
|
|
1263
|
+
}
|
|
1264
|
+
}, {
|
|
1265
|
+
test: [/(web|hpw)[o0]s/i],
|
|
1266
|
+
describe: function describe(ua) {
|
|
1267
|
+
var version = Utils.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, ua);
|
|
1268
|
+
var os = {
|
|
1269
|
+
name: OS_MAP.WebOS
|
|
1270
|
+
};
|
|
1271
|
+
if (version && version.length) os.version = version;
|
|
1272
|
+
return os;
|
|
1273
|
+
}
|
|
1274
|
+
}, {
|
|
1275
|
+
test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
|
|
1276
|
+
describe: function describe(ua) {
|
|
1277
|
+
var version = Utils.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, ua) || Utils.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, ua) || Utils.getFirstMatch(/\bbb(\d+)/i, ua);
|
|
1278
|
+
return {
|
|
1279
|
+
name: OS_MAP.BlackBerry,
|
|
1280
|
+
version: version
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1283
|
+
}, {
|
|
1284
|
+
test: [/bada/i],
|
|
1285
|
+
describe: function describe(ua) {
|
|
1286
|
+
var version = Utils.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, ua);
|
|
1287
|
+
return {
|
|
1288
|
+
name: OS_MAP.Bada,
|
|
1289
|
+
version: version
|
|
1290
|
+
};
|
|
1291
|
+
}
|
|
1292
|
+
}, {
|
|
1293
|
+
test: [/tizen/i],
|
|
1294
|
+
describe: function describe(ua) {
|
|
1295
|
+
var version = Utils.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, ua);
|
|
1296
|
+
return {
|
|
1297
|
+
name: OS_MAP.Tizen,
|
|
1298
|
+
version: version
|
|
1299
|
+
};
|
|
1300
|
+
}
|
|
1301
|
+
}, {
|
|
1302
|
+
test: [/linux/i],
|
|
1303
|
+
describe: function describe() {
|
|
1304
|
+
return {
|
|
1305
|
+
name: OS_MAP.Linux
|
|
1306
|
+
};
|
|
1307
|
+
}
|
|
1308
|
+
}, {
|
|
1309
|
+
test: [/CrOS/],
|
|
1310
|
+
describe: function describe() {
|
|
1311
|
+
return {
|
|
1312
|
+
name: OS_MAP.ChromeOS
|
|
1313
|
+
};
|
|
1314
|
+
}
|
|
1315
|
+
}, {
|
|
1316
|
+
test: [/PlayStation 4/],
|
|
1317
|
+
describe: function describe(ua) {
|
|
1318
|
+
var version = Utils.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, ua);
|
|
1319
|
+
return {
|
|
1320
|
+
name: OS_MAP.PlayStation4,
|
|
1321
|
+
version: version
|
|
1322
|
+
};
|
|
1323
|
+
}
|
|
1324
|
+
}];
|
|
1325
|
+
|
|
1326
|
+
//#endregion
|
|
1327
|
+
//#region src/parser-platforms.js
|
|
1328
|
+
var parser_platforms_default = [{
|
|
1329
|
+
test: [/googlebot/i],
|
|
1330
|
+
describe: function describe() {
|
|
1331
|
+
return {
|
|
1332
|
+
type: PLATFORMS_MAP.bot,
|
|
1333
|
+
vendor: "Google"
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1336
|
+
}, {
|
|
1337
|
+
test: [/linespider/i],
|
|
1338
|
+
describe: function describe() {
|
|
1339
|
+
return {
|
|
1340
|
+
type: PLATFORMS_MAP.bot,
|
|
1341
|
+
vendor: "Line"
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
}, {
|
|
1345
|
+
test: [/amazonbot/i],
|
|
1346
|
+
describe: function describe() {
|
|
1347
|
+
return {
|
|
1348
|
+
type: PLATFORMS_MAP.bot,
|
|
1349
|
+
vendor: "Amazon"
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
}, {
|
|
1353
|
+
test: [/gptbot/i],
|
|
1354
|
+
describe: function describe() {
|
|
1355
|
+
return {
|
|
1356
|
+
type: PLATFORMS_MAP.bot,
|
|
1357
|
+
vendor: "OpenAI"
|
|
1358
|
+
};
|
|
1359
|
+
}
|
|
1360
|
+
}, {
|
|
1361
|
+
test: [/chatgpt-user/i],
|
|
1362
|
+
describe: function describe() {
|
|
1363
|
+
return {
|
|
1364
|
+
type: PLATFORMS_MAP.bot,
|
|
1365
|
+
vendor: "OpenAI"
|
|
1366
|
+
};
|
|
1367
|
+
}
|
|
1368
|
+
}, {
|
|
1369
|
+
test: [/oai-searchbot/i],
|
|
1370
|
+
describe: function describe() {
|
|
1371
|
+
return {
|
|
1372
|
+
type: PLATFORMS_MAP.bot,
|
|
1373
|
+
vendor: "OpenAI"
|
|
1374
|
+
};
|
|
1375
|
+
}
|
|
1376
|
+
}, {
|
|
1377
|
+
test: [/baiduspider/i],
|
|
1378
|
+
describe: function describe() {
|
|
1379
|
+
return {
|
|
1380
|
+
type: PLATFORMS_MAP.bot,
|
|
1381
|
+
vendor: "Baidu"
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
}, {
|
|
1385
|
+
test: [/bingbot/i],
|
|
1386
|
+
describe: function describe() {
|
|
1387
|
+
return {
|
|
1388
|
+
type: PLATFORMS_MAP.bot,
|
|
1389
|
+
vendor: "Bing"
|
|
1390
|
+
};
|
|
1391
|
+
}
|
|
1392
|
+
}, {
|
|
1393
|
+
test: [/duckduckbot/i],
|
|
1394
|
+
describe: function describe() {
|
|
1395
|
+
return {
|
|
1396
|
+
type: PLATFORMS_MAP.bot,
|
|
1397
|
+
vendor: "DuckDuckGo"
|
|
1398
|
+
};
|
|
1399
|
+
}
|
|
1400
|
+
}, {
|
|
1401
|
+
test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i],
|
|
1402
|
+
describe: function describe() {
|
|
1403
|
+
return {
|
|
1404
|
+
type: PLATFORMS_MAP.bot,
|
|
1405
|
+
vendor: "Anthropic"
|
|
1406
|
+
};
|
|
1407
|
+
}
|
|
1408
|
+
}, {
|
|
1409
|
+
test: [/omgilibot/i, /webzio-extended/i],
|
|
1410
|
+
describe: function describe() {
|
|
1411
|
+
return {
|
|
1412
|
+
type: PLATFORMS_MAP.bot,
|
|
1413
|
+
vendor: "Webz.io"
|
|
1414
|
+
};
|
|
1415
|
+
}
|
|
1416
|
+
}, {
|
|
1417
|
+
test: [/diffbot/i],
|
|
1418
|
+
describe: function describe() {
|
|
1419
|
+
return {
|
|
1420
|
+
type: PLATFORMS_MAP.bot,
|
|
1421
|
+
vendor: "Diffbot"
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
}, {
|
|
1425
|
+
test: [/perplexitybot/i],
|
|
1426
|
+
describe: function describe() {
|
|
1427
|
+
return {
|
|
1428
|
+
type: PLATFORMS_MAP.bot,
|
|
1429
|
+
vendor: "Perplexity AI"
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1432
|
+
}, {
|
|
1433
|
+
test: [/perplexity-user/i],
|
|
1434
|
+
describe: function describe() {
|
|
1435
|
+
return {
|
|
1436
|
+
type: PLATFORMS_MAP.bot,
|
|
1437
|
+
vendor: "Perplexity AI"
|
|
1438
|
+
};
|
|
1439
|
+
}
|
|
1440
|
+
}, {
|
|
1441
|
+
test: [/youbot/i],
|
|
1442
|
+
describe: function describe() {
|
|
1443
|
+
return {
|
|
1444
|
+
type: PLATFORMS_MAP.bot,
|
|
1445
|
+
vendor: "You.com"
|
|
1446
|
+
};
|
|
1447
|
+
}
|
|
1448
|
+
}, {
|
|
1449
|
+
test: [/ia_archiver/i],
|
|
1450
|
+
describe: function describe() {
|
|
1451
|
+
return {
|
|
1452
|
+
type: PLATFORMS_MAP.bot,
|
|
1453
|
+
vendor: "Internet Archive"
|
|
1454
|
+
};
|
|
1455
|
+
}
|
|
1456
|
+
}, {
|
|
1457
|
+
test: [/meta-webindexer/i],
|
|
1458
|
+
describe: function describe() {
|
|
1459
|
+
return {
|
|
1460
|
+
type: PLATFORMS_MAP.bot,
|
|
1461
|
+
vendor: "Meta"
|
|
1462
|
+
};
|
|
1463
|
+
}
|
|
1464
|
+
}, {
|
|
1465
|
+
test: [/meta-externalads/i],
|
|
1466
|
+
describe: function describe() {
|
|
1467
|
+
return {
|
|
1468
|
+
type: PLATFORMS_MAP.bot,
|
|
1469
|
+
vendor: "Meta"
|
|
1470
|
+
};
|
|
1471
|
+
}
|
|
1472
|
+
}, {
|
|
1473
|
+
test: [/meta-externalagent/i],
|
|
1474
|
+
describe: function describe() {
|
|
1475
|
+
return {
|
|
1476
|
+
type: PLATFORMS_MAP.bot,
|
|
1477
|
+
vendor: "Meta"
|
|
1478
|
+
};
|
|
1479
|
+
}
|
|
1480
|
+
}, {
|
|
1481
|
+
test: [/meta-externalfetcher/i],
|
|
1482
|
+
describe: function describe() {
|
|
1483
|
+
return {
|
|
1484
|
+
type: PLATFORMS_MAP.bot,
|
|
1485
|
+
vendor: "Meta"
|
|
1486
|
+
};
|
|
1487
|
+
}
|
|
1488
|
+
}, {
|
|
1489
|
+
test: [/facebookexternalhit/i, /facebookcatalog/i],
|
|
1490
|
+
describe: function describe() {
|
|
1491
|
+
return {
|
|
1492
|
+
type: PLATFORMS_MAP.bot,
|
|
1493
|
+
vendor: "Meta"
|
|
1494
|
+
};
|
|
1495
|
+
}
|
|
1496
|
+
}, {
|
|
1497
|
+
test: [/slackbot/i, /slack-imgProxy/i],
|
|
1498
|
+
describe: function describe() {
|
|
1499
|
+
return {
|
|
1500
|
+
type: PLATFORMS_MAP.bot,
|
|
1501
|
+
vendor: "Slack"
|
|
1502
|
+
};
|
|
1503
|
+
}
|
|
1504
|
+
}, {
|
|
1505
|
+
test: [/yahoo/i],
|
|
1506
|
+
describe: function describe() {
|
|
1507
|
+
return {
|
|
1508
|
+
type: PLATFORMS_MAP.bot,
|
|
1509
|
+
vendor: "Yahoo"
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
}, {
|
|
1513
|
+
test: [/yandexbot/i, /yandexmobilebot/i],
|
|
1514
|
+
describe: function describe() {
|
|
1515
|
+
return {
|
|
1516
|
+
type: PLATFORMS_MAP.bot,
|
|
1517
|
+
vendor: "Yandex"
|
|
1518
|
+
};
|
|
1519
|
+
}
|
|
1520
|
+
}, {
|
|
1521
|
+
test: [/pingdom/i],
|
|
1522
|
+
describe: function describe() {
|
|
1523
|
+
return {
|
|
1524
|
+
type: PLATFORMS_MAP.bot,
|
|
1525
|
+
vendor: "Pingdom"
|
|
1526
|
+
};
|
|
1527
|
+
}
|
|
1528
|
+
}, {
|
|
1529
|
+
test: [/huawei/i],
|
|
1530
|
+
describe: function describe(ua) {
|
|
1531
|
+
var model = Utils.getFirstMatch(/(can-l01)/i, ua) && "Nova";
|
|
1532
|
+
var platform = {
|
|
1533
|
+
type: PLATFORMS_MAP.mobile,
|
|
1534
|
+
vendor: "Huawei"
|
|
1535
|
+
};
|
|
1536
|
+
if (model) platform.model = model;
|
|
1537
|
+
return platform;
|
|
1538
|
+
}
|
|
1539
|
+
}, {
|
|
1540
|
+
test: [/nexus\s*(?:7|8|9|10).*/i],
|
|
1541
|
+
describe: function describe() {
|
|
1542
|
+
return {
|
|
1543
|
+
type: PLATFORMS_MAP.tablet,
|
|
1544
|
+
vendor: "Nexus"
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
}, {
|
|
1548
|
+
test: [/ipad/i],
|
|
1549
|
+
describe: function describe() {
|
|
1550
|
+
return {
|
|
1551
|
+
type: PLATFORMS_MAP.tablet,
|
|
1552
|
+
vendor: "Apple",
|
|
1553
|
+
model: "iPad"
|
|
1554
|
+
};
|
|
1555
|
+
}
|
|
1556
|
+
}, {
|
|
1557
|
+
test: function test(parser) {
|
|
1558
|
+
return Utils.isFirefoxOnIpad(parser.getUA());
|
|
1559
|
+
},
|
|
1560
|
+
describe: function describe() {
|
|
1561
|
+
return {
|
|
1562
|
+
type: PLATFORMS_MAP.tablet,
|
|
1563
|
+
vendor: "Apple",
|
|
1564
|
+
model: "iPad"
|
|
1565
|
+
};
|
|
1566
|
+
}
|
|
1567
|
+
}, {
|
|
1568
|
+
test: [/kftt build/i],
|
|
1569
|
+
describe: function describe() {
|
|
1570
|
+
return {
|
|
1571
|
+
type: PLATFORMS_MAP.tablet,
|
|
1572
|
+
vendor: "Amazon",
|
|
1573
|
+
model: "Kindle Fire HD 7"
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1576
|
+
}, {
|
|
1577
|
+
test: [/silk/i],
|
|
1578
|
+
describe: function describe() {
|
|
1579
|
+
return {
|
|
1580
|
+
type: PLATFORMS_MAP.tablet,
|
|
1581
|
+
vendor: "Amazon"
|
|
1582
|
+
};
|
|
1583
|
+
}
|
|
1584
|
+
}, {
|
|
1585
|
+
test: [/tablet(?! pc)/i],
|
|
1586
|
+
describe: function describe() {
|
|
1587
|
+
return {
|
|
1588
|
+
type: PLATFORMS_MAP.tablet
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
}, {
|
|
1592
|
+
test: function test(parser) {
|
|
1593
|
+
var iDevice = parser.test(/ipod|iphone/i);
|
|
1594
|
+
var likeIDevice = parser.test(/like (ipod|iphone)/i);
|
|
1595
|
+
return iDevice && !likeIDevice;
|
|
1596
|
+
},
|
|
1597
|
+
describe: function describe(ua) {
|
|
1598
|
+
var model = Utils.getFirstMatch(/(ipod|iphone)/i, ua);
|
|
1599
|
+
return {
|
|
1600
|
+
type: PLATFORMS_MAP.mobile,
|
|
1601
|
+
vendor: "Apple",
|
|
1602
|
+
model: model
|
|
1603
|
+
};
|
|
1604
|
+
}
|
|
1605
|
+
}, {
|
|
1606
|
+
test: [/nexus\s*[0-6].*/i, /galaxy nexus/i],
|
|
1607
|
+
describe: function describe() {
|
|
1608
|
+
return {
|
|
1609
|
+
type: PLATFORMS_MAP.mobile,
|
|
1610
|
+
vendor: "Nexus"
|
|
1611
|
+
};
|
|
1612
|
+
}
|
|
1613
|
+
}, {
|
|
1614
|
+
test: [/Nokia/i],
|
|
1615
|
+
describe: function describe(ua) {
|
|
1616
|
+
var model = Utils.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i, ua);
|
|
1617
|
+
var platform = {
|
|
1618
|
+
type: PLATFORMS_MAP.mobile,
|
|
1619
|
+
vendor: "Nokia"
|
|
1620
|
+
};
|
|
1621
|
+
if (model) platform.model = model;
|
|
1622
|
+
return platform;
|
|
1623
|
+
}
|
|
1624
|
+
}, {
|
|
1625
|
+
test: [/[^-]mobi/i],
|
|
1626
|
+
describe: function describe() {
|
|
1627
|
+
return {
|
|
1628
|
+
type: PLATFORMS_MAP.mobile
|
|
1629
|
+
};
|
|
1630
|
+
}
|
|
1631
|
+
}, {
|
|
1632
|
+
test: function test(parser) {
|
|
1633
|
+
return parser.getBrowserName(true) === "blackberry";
|
|
1634
|
+
},
|
|
1635
|
+
describe: function describe() {
|
|
1636
|
+
return {
|
|
1637
|
+
type: PLATFORMS_MAP.mobile,
|
|
1638
|
+
vendor: "BlackBerry"
|
|
1639
|
+
};
|
|
1640
|
+
}
|
|
1641
|
+
}, {
|
|
1642
|
+
test: function test(parser) {
|
|
1643
|
+
return parser.getBrowserName(true) === "bada";
|
|
1644
|
+
},
|
|
1645
|
+
describe: function describe() {
|
|
1646
|
+
return {
|
|
1647
|
+
type: PLATFORMS_MAP.mobile
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1650
|
+
}, {
|
|
1651
|
+
test: function test(parser) {
|
|
1652
|
+
return parser.getBrowserName() === "windows phone";
|
|
1653
|
+
},
|
|
1654
|
+
describe: function describe() {
|
|
1655
|
+
return {
|
|
1656
|
+
type: PLATFORMS_MAP.mobile,
|
|
1657
|
+
vendor: "Microsoft"
|
|
1658
|
+
};
|
|
1659
|
+
}
|
|
1660
|
+
}, {
|
|
1661
|
+
test: function test(parser) {
|
|
1662
|
+
var osMajorVersion = Number(String(parser.getOSVersion()).split(".")[0]);
|
|
1663
|
+
return parser.getOSName(true) === "android" && osMajorVersion >= 3;
|
|
1664
|
+
},
|
|
1665
|
+
describe: function describe() {
|
|
1666
|
+
return {
|
|
1667
|
+
type: PLATFORMS_MAP.tablet
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
}, {
|
|
1671
|
+
test: function test(parser) {
|
|
1672
|
+
return parser.getOSName(true) === "android";
|
|
1673
|
+
},
|
|
1674
|
+
describe: function describe() {
|
|
1675
|
+
return {
|
|
1676
|
+
type: PLATFORMS_MAP.mobile
|
|
1677
|
+
};
|
|
1678
|
+
}
|
|
1679
|
+
}, {
|
|
1680
|
+
test: [/smart-?tv|smarttv/i],
|
|
1681
|
+
describe: function describe() {
|
|
1682
|
+
return {
|
|
1683
|
+
type: PLATFORMS_MAP.tv
|
|
1684
|
+
};
|
|
1685
|
+
}
|
|
1686
|
+
}, {
|
|
1687
|
+
test: [/netcast/i],
|
|
1688
|
+
describe: function describe() {
|
|
1689
|
+
return {
|
|
1690
|
+
type: PLATFORMS_MAP.tv
|
|
1691
|
+
};
|
|
1692
|
+
}
|
|
1693
|
+
}, {
|
|
1694
|
+
test: function test(parser) {
|
|
1695
|
+
return parser.getOSName(true) === "macos";
|
|
1696
|
+
},
|
|
1697
|
+
describe: function describe() {
|
|
1698
|
+
return {
|
|
1699
|
+
type: PLATFORMS_MAP.desktop,
|
|
1700
|
+
vendor: "Apple"
|
|
1701
|
+
};
|
|
1702
|
+
}
|
|
1703
|
+
}, {
|
|
1704
|
+
test: function test(parser) {
|
|
1705
|
+
return parser.getOSName(true) === "windows";
|
|
1706
|
+
},
|
|
1707
|
+
describe: function describe() {
|
|
1708
|
+
return {
|
|
1709
|
+
type: PLATFORMS_MAP.desktop
|
|
1710
|
+
};
|
|
1711
|
+
}
|
|
1712
|
+
}, {
|
|
1713
|
+
test: function test(parser) {
|
|
1714
|
+
return parser.getOSName(true) === "linux";
|
|
1715
|
+
},
|
|
1716
|
+
describe: function describe() {
|
|
1717
|
+
return {
|
|
1718
|
+
type: PLATFORMS_MAP.desktop
|
|
1719
|
+
};
|
|
1720
|
+
}
|
|
1721
|
+
}, {
|
|
1722
|
+
test: function test(parser) {
|
|
1723
|
+
return parser.getOSName(true) === "playstation 4";
|
|
1724
|
+
},
|
|
1725
|
+
describe: function describe() {
|
|
1726
|
+
return {
|
|
1727
|
+
type: PLATFORMS_MAP.tv
|
|
1728
|
+
};
|
|
1729
|
+
}
|
|
1730
|
+
}, {
|
|
1731
|
+
test: function test(parser) {
|
|
1732
|
+
return parser.getOSName(true) === "roku";
|
|
1733
|
+
},
|
|
1734
|
+
describe: function describe() {
|
|
1735
|
+
return {
|
|
1736
|
+
type: PLATFORMS_MAP.tv
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
}];
|
|
1740
|
+
|
|
1741
|
+
//#endregion
|
|
1742
|
+
//#region src/parser-engines.js
|
|
1743
|
+
var parser_engines_default = [{
|
|
1744
|
+
test: function test(parser) {
|
|
1745
|
+
return parser.getBrowserName(true) === "microsoft edge";
|
|
1746
|
+
},
|
|
1747
|
+
describe: function describe(ua) {
|
|
1748
|
+
if (/\sedg\//i.test(ua)) return {
|
|
1749
|
+
name: ENGINE_MAP.Blink
|
|
1750
|
+
};
|
|
1751
|
+
var version = Utils.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1752
|
+
return {
|
|
1753
|
+
name: ENGINE_MAP.EdgeHTML,
|
|
1754
|
+
version: version
|
|
1755
|
+
};
|
|
1756
|
+
}
|
|
1757
|
+
}, {
|
|
1758
|
+
test: function test(parser) {
|
|
1759
|
+
return parser.getBrowserName(true) === "ladybird";
|
|
1760
|
+
},
|
|
1761
|
+
describe: function describe() {
|
|
1762
|
+
return {
|
|
1763
|
+
name: ENGINE_MAP.LibWeb
|
|
1764
|
+
};
|
|
1765
|
+
}
|
|
1766
|
+
}, {
|
|
1767
|
+
test: [/trident/i],
|
|
1768
|
+
describe: function describe(ua) {
|
|
1769
|
+
var engine = {
|
|
1770
|
+
name: ENGINE_MAP.Trident
|
|
1771
|
+
};
|
|
1772
|
+
var version = Utils.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1773
|
+
if (version) engine.version = version;
|
|
1774
|
+
return engine;
|
|
1775
|
+
}
|
|
1776
|
+
}, {
|
|
1777
|
+
test: function test(parser) {
|
|
1778
|
+
return parser.test(/presto/i);
|
|
1779
|
+
},
|
|
1780
|
+
describe: function describe(ua) {
|
|
1781
|
+
var engine = {
|
|
1782
|
+
name: ENGINE_MAP.Presto
|
|
1783
|
+
};
|
|
1784
|
+
var version = Utils.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1785
|
+
if (version) engine.version = version;
|
|
1786
|
+
return engine;
|
|
1787
|
+
}
|
|
1788
|
+
}, {
|
|
1789
|
+
test: function test(parser) {
|
|
1790
|
+
var isGecko = parser.test(/gecko/i);
|
|
1791
|
+
var likeGecko = parser.test(/like gecko/i);
|
|
1792
|
+
return isGecko && !likeGecko;
|
|
1793
|
+
},
|
|
1794
|
+
describe: function describe(ua) {
|
|
1795
|
+
var engine = {
|
|
1796
|
+
name: ENGINE_MAP.Gecko
|
|
1797
|
+
};
|
|
1798
|
+
var version = Utils.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1799
|
+
if (version) engine.version = version;
|
|
1800
|
+
return engine;
|
|
1801
|
+
}
|
|
1802
|
+
}, {
|
|
1803
|
+
test: [/(apple)?webkit\/537\.36/i],
|
|
1804
|
+
describe: function describe() {
|
|
1805
|
+
return {
|
|
1806
|
+
name: ENGINE_MAP.Blink
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1809
|
+
}, {
|
|
1810
|
+
test: [/(apple)?webkit/i],
|
|
1811
|
+
describe: function describe(ua) {
|
|
1812
|
+
var engine = {
|
|
1813
|
+
name: ENGINE_MAP.WebKit
|
|
1814
|
+
};
|
|
1815
|
+
var version = Utils.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, ua);
|
|
1816
|
+
if (version) engine.version = version;
|
|
1817
|
+
return engine;
|
|
1818
|
+
}
|
|
1819
|
+
}];
|
|
1820
|
+
|
|
1821
|
+
//#endregion
|
|
1822
|
+
//#region src/parser.js
|
|
1823
|
+
/**
|
|
1824
|
+
* @typedef {Object} ClientHints
|
|
1825
|
+
* @property {Array<{brand: string, version: string}>} [brands] Array of brand objects
|
|
1826
|
+
* @property {boolean} [mobile] Whether the device is mobile
|
|
1827
|
+
* @property {string} [platform] Platform name (e.g., "Windows", "macOS")
|
|
1828
|
+
* @property {string} [platformVersion] Platform version
|
|
1829
|
+
* @property {string} [architecture] CPU architecture
|
|
1830
|
+
* @property {string} [model] Device model
|
|
1831
|
+
* @property {boolean} [wow64] Whether running under WoW64
|
|
1832
|
+
*/
|
|
1833
|
+
/**
|
|
1834
|
+
* The main class that arranges the whole parsing process.
|
|
1835
|
+
*/
|
|
1836
|
+
var Parser = /*#__PURE__*/function () {
|
|
1837
|
+
/**
|
|
1838
|
+
* Create instance of Parser
|
|
1839
|
+
*
|
|
1840
|
+
* @param {String} UA User-Agent string
|
|
1841
|
+
* @param {Boolean|ClientHints} [skipParsingOrHints=false] Either a boolean to skip parsing,
|
|
1842
|
+
* or a ClientHints object containing User-Agent Client Hints data
|
|
1843
|
+
* @param {ClientHints} [clientHints] User-Agent Client Hints data (navigator.userAgentData)
|
|
1844
|
+
*
|
|
1845
|
+
* @throw {Error} in case of empty UA String
|
|
1846
|
+
*
|
|
1847
|
+
* @constructor
|
|
1848
|
+
*/
|
|
1849
|
+
function Parser(UA, skipParsingOrHints, clientHints) {
|
|
1850
|
+
if (skipParsingOrHints === void 0) skipParsingOrHints = false;
|
|
1851
|
+
if (clientHints === void 0) clientHints = null;
|
|
1852
|
+
if (UA === void 0 || UA === null || UA === "") throw new Error("UserAgent parameter can't be empty");
|
|
1853
|
+
this._ua = UA;
|
|
1854
|
+
var skipParsing = false;
|
|
1855
|
+
if (typeof skipParsingOrHints === "boolean") {
|
|
1856
|
+
skipParsing = skipParsingOrHints;
|
|
1857
|
+
this._hints = clientHints;
|
|
1858
|
+
} else if (skipParsingOrHints != null && typeof skipParsingOrHints === "object") this._hints = skipParsingOrHints;else this._hints = null;
|
|
1859
|
+
/**
|
|
1860
|
+
* @typedef ParsedResult
|
|
1861
|
+
* @property {Object} browser
|
|
1862
|
+
* @property {String|undefined} [browser.name]
|
|
1863
|
+
* Browser name, like `"Chrome"` or `"Internet Explorer"`
|
|
1864
|
+
* @property {String|undefined} [browser.version] Browser version as a String `"12.01.45334.10"`
|
|
1865
|
+
* @property {Object} os
|
|
1866
|
+
* @property {String|undefined} [os.name] OS name, like `"Windows"` or `"macOS"`
|
|
1867
|
+
* @property {String|undefined} [os.version] OS version, like `"NT 5.1"` or `"10.11.1"`
|
|
1868
|
+
* @property {String|undefined} [os.versionName] OS name, like `"XP"` or `"High Sierra"`
|
|
1869
|
+
* @property {Object} platform
|
|
1870
|
+
* @property {String|undefined} [platform.type]
|
|
1871
|
+
* platform type, can be either `"desktop"`, `"tablet"` or `"mobile"`
|
|
1872
|
+
* @property {String|undefined} [platform.vendor] Vendor of the device,
|
|
1873
|
+
* like `"Apple"` or `"Samsung"`
|
|
1874
|
+
* @property {String|undefined} [platform.model] Device model,
|
|
1875
|
+
* like `"iPhone"` or `"Kindle Fire HD 7"`
|
|
1876
|
+
* @property {Object} engine
|
|
1877
|
+
* @property {String|undefined} [engine.name]
|
|
1878
|
+
* Can be any of this: `WebKit`, `Blink`, `Gecko`, `Trident`, `Presto`, `EdgeHTML`,
|
|
1879
|
+
* `LibWeb`
|
|
1880
|
+
* @property {String|undefined} [engine.version] String version of the engine
|
|
1881
|
+
*/
|
|
1882
|
+
this.parsedResult = {};
|
|
1883
|
+
if (skipParsing !== true) this.parse();
|
|
1884
|
+
}
|
|
1885
|
+
/**
|
|
1886
|
+
* Get Client Hints data
|
|
1887
|
+
* @return {ClientHints|null}
|
|
1888
|
+
*
|
|
1889
|
+
* @public
|
|
1890
|
+
* @example
|
|
1891
|
+
* const parser = Bowser.getParser(UA, clientHints);
|
|
1892
|
+
* const hints = parser.getHints();
|
|
1893
|
+
* console.log(hints.platform); // 'Windows'
|
|
1894
|
+
* console.log(hints.mobile); // false
|
|
1895
|
+
*/
|
|
1896
|
+
var _proto = Parser.prototype;
|
|
1897
|
+
_proto.getHints = function getHints() {
|
|
1898
|
+
return this._hints;
|
|
1899
|
+
};
|
|
1900
|
+
_proto.hasBrand = function hasBrand(brandName) {
|
|
1901
|
+
if (!this._hints || !Array.isArray(this._hints.brands)) return false;
|
|
1902
|
+
var brandLower = brandName.toLowerCase();
|
|
1903
|
+
return this._hints.brands.some(function (b) {
|
|
1904
|
+
return b.brand && b.brand.toLowerCase() === brandLower;
|
|
1905
|
+
});
|
|
1906
|
+
};
|
|
1907
|
+
_proto.getBrandVersion = function getBrandVersion(brandName) {
|
|
1908
|
+
if (!this._hints || !Array.isArray(this._hints.brands)) return;
|
|
1909
|
+
var brandLower = brandName.toLowerCase();
|
|
1910
|
+
var brand = Utils.find(this._hints.brands, function (b) {
|
|
1911
|
+
return b.brand && b.brand.toLowerCase() === brandLower;
|
|
1912
|
+
});
|
|
1913
|
+
return brand ? brand.version : void 0;
|
|
1914
|
+
};
|
|
1915
|
+
_proto.getUA = function getUA() {
|
|
1916
|
+
return this._ua;
|
|
1917
|
+
};
|
|
1918
|
+
_proto.test = function test(regex) {
|
|
1919
|
+
return regex.test(this._ua);
|
|
1920
|
+
};
|
|
1921
|
+
_proto.parseBrowser = function parseBrowser() {
|
|
1922
|
+
var _this = this;
|
|
1923
|
+
this.parsedResult.browser = {};
|
|
1924
|
+
var browserDescriptor = Utils.find(browsersList, function (_browser) {
|
|
1925
|
+
if (typeof _browser.test === "function") return _browser.test(_this);
|
|
1926
|
+
if (Array.isArray(_browser.test)) return _browser.test.some(function (condition) {
|
|
1927
|
+
return _this.test(condition);
|
|
1928
|
+
});
|
|
1929
|
+
throw new Error("Browser's test function is not valid");
|
|
1930
|
+
});
|
|
1931
|
+
if (browserDescriptor) this.parsedResult.browser = browserDescriptor.describe(this.getUA(), this);
|
|
1932
|
+
return this.parsedResult.browser;
|
|
1933
|
+
};
|
|
1934
|
+
_proto.getBrowser = function getBrowser() {
|
|
1935
|
+
if (this.parsedResult.browser) return this.parsedResult.browser;
|
|
1936
|
+
return this.parseBrowser();
|
|
1937
|
+
};
|
|
1938
|
+
_proto.getBrowserName = function getBrowserName(toLowerCase) {
|
|
1939
|
+
if (toLowerCase) return String(this.getBrowser().name).toLowerCase() || "";
|
|
1940
|
+
return this.getBrowser().name || "";
|
|
1941
|
+
};
|
|
1942
|
+
_proto.getBrowserVersion = function getBrowserVersion() {
|
|
1943
|
+
return this.getBrowser().version;
|
|
1944
|
+
};
|
|
1945
|
+
_proto.getOS = function getOS() {
|
|
1946
|
+
if (this.parsedResult.os) return this.parsedResult.os;
|
|
1947
|
+
return this.parseOS();
|
|
1948
|
+
};
|
|
1949
|
+
_proto.parseOS = function parseOS() {
|
|
1950
|
+
var _this2 = this;
|
|
1951
|
+
this.parsedResult.os = {};
|
|
1952
|
+
var os = Utils.find(parser_os_default, function (_os) {
|
|
1953
|
+
if (typeof _os.test === "function") return _os.test(_this2);
|
|
1954
|
+
if (Array.isArray(_os.test)) return _os.test.some(function (condition) {
|
|
1955
|
+
return _this2.test(condition);
|
|
1956
|
+
});
|
|
1957
|
+
throw new Error("Browser's test function is not valid");
|
|
1958
|
+
});
|
|
1959
|
+
if (os) this.parsedResult.os = os.describe(this.getUA());
|
|
1960
|
+
return this.parsedResult.os;
|
|
1961
|
+
};
|
|
1962
|
+
_proto.getOSName = function getOSName(toLowerCase) {
|
|
1963
|
+
var name = this.getOS().name;
|
|
1964
|
+
if (toLowerCase) return String(name).toLowerCase() || "";
|
|
1965
|
+
return name || "";
|
|
1966
|
+
};
|
|
1967
|
+
_proto.getOSVersion = function getOSVersion() {
|
|
1968
|
+
return this.getOS().version;
|
|
1969
|
+
};
|
|
1970
|
+
_proto.getPlatform = function getPlatform() {
|
|
1971
|
+
if (this.parsedResult.platform) return this.parsedResult.platform;
|
|
1972
|
+
return this.parsePlatform();
|
|
1973
|
+
};
|
|
1974
|
+
_proto.getPlatformType = function getPlatformType(toLowerCase) {
|
|
1975
|
+
if (toLowerCase === void 0) toLowerCase = false;
|
|
1976
|
+
var type = this.getPlatform().type;
|
|
1977
|
+
if (toLowerCase) return String(type).toLowerCase() || "";
|
|
1978
|
+
return type || "";
|
|
1979
|
+
};
|
|
1980
|
+
_proto.parsePlatform = function parsePlatform() {
|
|
1981
|
+
var _this3 = this;
|
|
1982
|
+
this.parsedResult.platform = {};
|
|
1983
|
+
var platform = Utils.find(parser_platforms_default, function (_platform) {
|
|
1984
|
+
if (typeof _platform.test === "function") return _platform.test(_this3);
|
|
1985
|
+
if (Array.isArray(_platform.test)) return _platform.test.some(function (condition) {
|
|
1986
|
+
return _this3.test(condition);
|
|
1987
|
+
});
|
|
1988
|
+
throw new Error("Browser's test function is not valid");
|
|
1989
|
+
});
|
|
1990
|
+
if (platform) this.parsedResult.platform = platform.describe(this.getUA());
|
|
1991
|
+
return this.parsedResult.platform;
|
|
1992
|
+
};
|
|
1993
|
+
_proto.getEngine = function getEngine() {
|
|
1994
|
+
if (this.parsedResult.engine) return this.parsedResult.engine;
|
|
1995
|
+
return this.parseEngine();
|
|
1996
|
+
};
|
|
1997
|
+
_proto.getEngineName = function getEngineName(toLowerCase) {
|
|
1998
|
+
if (toLowerCase) return String(this.getEngine().name).toLowerCase() || "";
|
|
1999
|
+
return this.getEngine().name || "";
|
|
2000
|
+
};
|
|
2001
|
+
_proto.parseEngine = function parseEngine() {
|
|
2002
|
+
var _this4 = this;
|
|
2003
|
+
this.parsedResult.engine = {};
|
|
2004
|
+
var engine = Utils.find(parser_engines_default, function (_engine) {
|
|
2005
|
+
if (typeof _engine.test === "function") return _engine.test(_this4);
|
|
2006
|
+
if (Array.isArray(_engine.test)) return _engine.test.some(function (condition) {
|
|
2007
|
+
return _this4.test(condition);
|
|
2008
|
+
});
|
|
2009
|
+
throw new Error("Browser's test function is not valid");
|
|
2010
|
+
});
|
|
2011
|
+
if (engine) this.parsedResult.engine = engine.describe(this.getUA());
|
|
2012
|
+
return this.parsedResult.engine;
|
|
2013
|
+
};
|
|
2014
|
+
_proto.parse = function parse() {
|
|
2015
|
+
this.parseBrowser();
|
|
2016
|
+
this.parseOS();
|
|
2017
|
+
this.parsePlatform();
|
|
2018
|
+
this.parseEngine();
|
|
2019
|
+
return this;
|
|
2020
|
+
};
|
|
2021
|
+
_proto.getResult = function getResult() {
|
|
2022
|
+
return Utils.assign({}, this.parsedResult);
|
|
2023
|
+
};
|
|
2024
|
+
_proto.satisfies = function satisfies(checkTree) {
|
|
2025
|
+
var _this5 = this;
|
|
2026
|
+
var platformsAndOSes = {};
|
|
2027
|
+
var platformsAndOSCounter = 0;
|
|
2028
|
+
var browsers = {};
|
|
2029
|
+
var browsersCounter = 0;
|
|
2030
|
+
Object.keys(checkTree).forEach(function (key) {
|
|
2031
|
+
var currentDefinition = checkTree[key];
|
|
2032
|
+
if (typeof currentDefinition === "string" || Array.isArray(currentDefinition)) {
|
|
2033
|
+
browsers[key] = currentDefinition;
|
|
2034
|
+
browsersCounter += 1;
|
|
2035
|
+
} else if (typeof currentDefinition === "object") {
|
|
2036
|
+
platformsAndOSes[key] = currentDefinition;
|
|
2037
|
+
platformsAndOSCounter += 1;
|
|
2038
|
+
}
|
|
2039
|
+
});
|
|
2040
|
+
if (platformsAndOSCounter > 0) {
|
|
2041
|
+
var platformsAndOSNames = Object.keys(platformsAndOSes);
|
|
2042
|
+
var OSMatchingDefinition = Utils.find(platformsAndOSNames, function (name) {
|
|
2043
|
+
return _this5.isOS(name);
|
|
2044
|
+
});
|
|
2045
|
+
if (OSMatchingDefinition) {
|
|
2046
|
+
var osResult = this.satisfies(platformsAndOSes[OSMatchingDefinition]);
|
|
2047
|
+
if (osResult !== void 0) return osResult;
|
|
2048
|
+
}
|
|
2049
|
+
var platformMatchingDefinition = Utils.find(platformsAndOSNames, function (name) {
|
|
2050
|
+
return _this5.isPlatform(name);
|
|
2051
|
+
});
|
|
2052
|
+
if (platformMatchingDefinition) {
|
|
2053
|
+
var platformResult = this.satisfies(platformsAndOSes[platformMatchingDefinition]);
|
|
2054
|
+
if (platformResult !== void 0) return platformResult;
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
if (browsersCounter > 0) {
|
|
2058
|
+
var browserNames = Object.keys(browsers);
|
|
2059
|
+
var matchingDefinition = Utils.find(browserNames, function (name) {
|
|
2060
|
+
return _this5.isBrowser(name, true);
|
|
2061
|
+
});
|
|
2062
|
+
if (matchingDefinition !== void 0) return this.compareVersions(browsers[matchingDefinition]);
|
|
2063
|
+
}
|
|
2064
|
+
};
|
|
2065
|
+
_proto.isBrowser = function isBrowser(browserName, includingAlias) {
|
|
2066
|
+
if (includingAlias === void 0) includingAlias = false;
|
|
2067
|
+
var defaultBrowserName = this.getBrowserName().toLowerCase();
|
|
2068
|
+
var browserNameLower = browserName.toLowerCase();
|
|
2069
|
+
var alias = Utils.getBrowserTypeByAlias(browserNameLower);
|
|
2070
|
+
if (includingAlias && alias) browserNameLower = alias.toLowerCase();
|
|
2071
|
+
return browserNameLower === defaultBrowserName;
|
|
2072
|
+
};
|
|
2073
|
+
_proto.compareVersions = function compareVersions(versionsOrVersion) {
|
|
2074
|
+
var _this6 = this;
|
|
2075
|
+
if (typeof versionsOrVersion === "string") return this.compareVersion(versionsOrVersion);
|
|
2076
|
+
return versionsOrVersion.some(function (version) {
|
|
2077
|
+
return _this6.compareVersion(version);
|
|
2078
|
+
});
|
|
2079
|
+
};
|
|
2080
|
+
_proto.compareVersion = function compareVersion(version) {
|
|
2081
|
+
var expectedResults = [0];
|
|
2082
|
+
var comparableVersion = version;
|
|
2083
|
+
var isLoose = false;
|
|
2084
|
+
var currentBrowserVersion = this.getBrowserVersion();
|
|
2085
|
+
if (typeof currentBrowserVersion !== "string") return;
|
|
2086
|
+
if (version[0] === ">" || version[0] === "<") {
|
|
2087
|
+
comparableVersion = version.substr(1);
|
|
2088
|
+
if (version[1] === "=") {
|
|
2089
|
+
isLoose = true;
|
|
2090
|
+
comparableVersion = version.substr(2);
|
|
2091
|
+
} else expectedResults = [];
|
|
2092
|
+
if (version[0] === ">") expectedResults.push(1);else expectedResults.push(-1);
|
|
2093
|
+
} else if (version[0] === "=") comparableVersion = version.substr(1);else if (version[0] === "~") {
|
|
2094
|
+
isLoose = true;
|
|
2095
|
+
comparableVersion = version.substr(1);
|
|
2096
|
+
}
|
|
2097
|
+
return expectedResults.indexOf(Utils.compareVersions(currentBrowserVersion, comparableVersion, isLoose)) > -1;
|
|
2098
|
+
};
|
|
2099
|
+
_proto.isOS = function isOS(osName) {
|
|
2100
|
+
return this.getOSName(true) === String(osName).toLowerCase();
|
|
2101
|
+
};
|
|
2102
|
+
_proto.isPlatform = function isPlatform(platformType) {
|
|
2103
|
+
return this.getPlatformType(true) === String(platformType).toLowerCase();
|
|
2104
|
+
};
|
|
2105
|
+
_proto.isEngine = function isEngine(engineName) {
|
|
2106
|
+
return this.getEngineName(true) === String(engineName).toLowerCase();
|
|
2107
|
+
};
|
|
2108
|
+
_proto.is = function is(anything, includingAlias) {
|
|
2109
|
+
if (includingAlias === void 0) includingAlias = false;
|
|
2110
|
+
return this.isBrowser(anything, includingAlias) || this.isOS(anything) || this.isPlatform(anything);
|
|
2111
|
+
};
|
|
2112
|
+
_proto.some = function some(anythings) {
|
|
2113
|
+
var _this7 = this;
|
|
2114
|
+
if (anythings === void 0) anythings = [];
|
|
2115
|
+
return anythings.some(function (anything) {
|
|
2116
|
+
return _this7.is(anything);
|
|
2117
|
+
});
|
|
2118
|
+
};
|
|
2119
|
+
return Parser;
|
|
2120
|
+
}();
|
|
2121
|
+
|
|
2122
|
+
//#endregion
|
|
2123
|
+
//#region src/bowser.js
|
|
2124
|
+
/*!
|
|
2125
|
+
* Bowser - a browser detector
|
|
2126
|
+
* https://github.com/bowser-js/bowser
|
|
2127
|
+
* MIT License | (c) Dustin Diaz 2012-2015
|
|
2128
|
+
* MIT License | (c) Denis Demchenko 2015-2026
|
|
2129
|
+
*/
|
|
2130
|
+
function _defineProperties(e, r) {
|
|
2131
|
+
for (var t = 0; t < r.length; t++) {
|
|
2132
|
+
var o = r[t];
|
|
2133
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
function _createClass(e, r, t) {
|
|
2137
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
2138
|
+
writable: !1
|
|
2139
|
+
}), e;
|
|
2140
|
+
}
|
|
2141
|
+
function _toPropertyKey(t) {
|
|
2142
|
+
var i = _toPrimitive(t, "string");
|
|
2143
|
+
return "symbol" == typeof i ? i : i + "";
|
|
2144
|
+
}
|
|
2145
|
+
function _toPrimitive(t, r) {
|
|
2146
|
+
if ("object" != typeof t || !t) return t;
|
|
2147
|
+
var e = t[Symbol.toPrimitive];
|
|
2148
|
+
if (void 0 !== e) {
|
|
2149
|
+
var i = e.call(t, r || "default");
|
|
2150
|
+
if ("object" != typeof i) return i;
|
|
2151
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2152
|
+
}
|
|
2153
|
+
return ("string" === r ? String : Number)(t);
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2156
|
+
* Bowser class.
|
|
2157
|
+
* Keep it simple as much as it can be.
|
|
2158
|
+
* It's supposed to work with collections of {@link Parser} instances
|
|
2159
|
+
* rather then solve one-instance problems.
|
|
2160
|
+
* All the one-instance stuff is located in Parser class.
|
|
2161
|
+
*
|
|
2162
|
+
* @class
|
|
2163
|
+
* @classdesc Bowser is a static object, that provides an API to the Parsers
|
|
2164
|
+
* @hideconstructor
|
|
2165
|
+
*/
|
|
2166
|
+
var Bowser = /*#__PURE__*/function () {
|
|
2167
|
+
function Bowser() {}
|
|
2168
|
+
/**
|
|
2169
|
+
* Creates a {@link Parser} instance
|
|
2170
|
+
*
|
|
2171
|
+
* @param {String} UA UserAgent string
|
|
2172
|
+
* @param {Boolean|Object} [skipParsingOrHints=false] Either a boolean to skip parsing,
|
|
2173
|
+
* or a ClientHints object (navigator.userAgentData)
|
|
2174
|
+
* @param {Object} [clientHints] User-Agent Client Hints data (navigator.userAgentData)
|
|
2175
|
+
* @returns {Parser}
|
|
2176
|
+
* @throws {Error} when UA is not a String
|
|
2177
|
+
*
|
|
2178
|
+
* @example
|
|
2179
|
+
* const parser = Bowser.getParser(window.navigator.userAgent);
|
|
2180
|
+
* const result = parser.getResult();
|
|
2181
|
+
*
|
|
2182
|
+
* @example
|
|
2183
|
+
* // With User-Agent Client Hints
|
|
2184
|
+
* const parser = Bowser.getParser(
|
|
2185
|
+
* window.navigator.userAgent,
|
|
2186
|
+
* window.navigator.userAgentData
|
|
2187
|
+
* );
|
|
2188
|
+
*/
|
|
2189
|
+
Bowser.getParser = function getParser(UA, skipParsingOrHints, clientHints) {
|
|
2190
|
+
if (skipParsingOrHints === void 0) skipParsingOrHints = false;
|
|
2191
|
+
if (clientHints === void 0) clientHints = null;
|
|
2192
|
+
if (typeof UA !== "string") throw new Error("UserAgent should be a string");
|
|
2193
|
+
return new Parser(UA, skipParsingOrHints, clientHints);
|
|
2194
|
+
};
|
|
2195
|
+
Bowser.parse = function parse(UA, clientHints) {
|
|
2196
|
+
if (clientHints === void 0) clientHints = null;
|
|
2197
|
+
return new Parser(UA, clientHints).getResult();
|
|
2198
|
+
};
|
|
2199
|
+
return _createClass(Bowser, null, [{
|
|
2200
|
+
key: "BROWSER_MAP",
|
|
2201
|
+
get: function get() {
|
|
2202
|
+
return BROWSER_MAP;
|
|
2203
|
+
}
|
|
2204
|
+
}, {
|
|
2205
|
+
key: "ENGINE_MAP",
|
|
2206
|
+
get: function get() {
|
|
2207
|
+
return ENGINE_MAP;
|
|
2208
|
+
}
|
|
2209
|
+
}, {
|
|
2210
|
+
key: "OS_MAP",
|
|
2211
|
+
get: function get() {
|
|
2212
|
+
return OS_MAP;
|
|
2213
|
+
}
|
|
2214
|
+
}, {
|
|
2215
|
+
key: "PLATFORMS_MAP",
|
|
2216
|
+
get: function get() {
|
|
2217
|
+
return PLATFORMS_MAP;
|
|
2218
|
+
}
|
|
2219
|
+
}]);
|
|
2220
|
+
}();
|
|
2221
|
+
var parse = Bowser.parse;
|
|
2222
|
+
var getParser = Bowser.getParser;
|
|
2223
|
+
|
|
2224
|
+
//#endregion
|
|
2225
|
+
export { BROWSER_MAP, ENGINE_MAP, OS_MAP, PLATFORMS_MAP, Bowser as default, getParser, parse };
|