diff --git a/CHANGELOG.md b/CHANGELOG.md index bfbf84b..318bd2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Release notes +## 6.11.1 + +### Bug fixes + +- Fixed memory leak in Safari +- Fixed incorrect positioning of the close button introduced in 6.11.0 + ## 6.11.0 ### Expanded Document Coverage diff --git a/examples/blinkid-camera/javascript/app.js b/examples/blinkid-camera/javascript/app.js index 143c46b..ff82c61 100644 --- a/examples/blinkid-camera/javascript/app.js +++ b/examples/blinkid-camera/javascript/app.js @@ -34,11 +34,11 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; if (window.location.hostname === "blinkid.github.io") { - licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9hPYYlTvZbRmaDRoPhJOp2oExtMeLQkQgJgE+eDVhY3OTfpJcsDgROo8DnQUZ8RhkCGPZlokHeQgvTSPm6yRvotnaQV8AQP7HYR9IbHfodldfqlCGAWw+LtG0MMV9E/H4i0knaJZ9CfX6Ty2+dvqw8xPM1JWSrk/COOS34jJ57aovNd18+9qimphvJJlFSX2cnjnI41J0rlpG2vtX7+j/NlLuzxElSybEy5+480HFgus/RmUkSm2t1MM4m1WVMjOPQNqA4IP6gTUkNZ4NmV7IOuIMm6K2xEyJRx6Rtq2V2MW1pbHaA1fLtbwCzQIHXcaqAni8fx+TF/g=="; + licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9hPYYlTvZbRmaDxofhV1cqeyqVL4XAQwQ3RlqRTCXUaj+w3FBz3qZazWy5hmGRRHmvuxxn7frL1OQ6uFPvbdFZPOXHo0TmqT6cDMWFWIKVwERZW0/v7gwL0Le3KBavqDUO7qxCX4+V9W55YQnPLfGpNfBx0vLnRvZWyNvl6ecWpNRE/PBacv0h9Lv0rGITtL0Pfi0ivV43mR9HMVSRGaGk0msbs8F5aLhOYYEV94ASTq4qsHNnus9mpyq7AAMX04MYkiRa+QTD2L4XUct4Iq593RocQVSShDVWPbBQ6LsP8Mako34Bt6kI7zJkxWD3pM67DuUNjFAIkA=="; } // 2. Create instance of SDK load settings with your license key diff --git a/examples/blinkid-camera/javascript/index.html b/examples/blinkid-camera/javascript/index.html index 8c1e698..b14f385 100644 --- a/examples/blinkid-camera/javascript/index.html +++ b/examples/blinkid-camera/javascript/index.html @@ -24,6 +24,6 @@

Loading...

- + diff --git a/examples/blinkid-camera/typescript/package.json b/examples/blinkid-camera/typescript/package.json index 255dd97..338c8f7 100644 --- a/examples/blinkid-camera/typescript/package.json +++ b/examples/blinkid-camera/typescript/package.json @@ -19,6 +19,6 @@ "typescript": "^3.9.5" }, "dependencies": { - "@microblink/blinkid-in-browser-sdk": "~6.11.0" + "@microblink/blinkid-in-browser-sdk": "~6.11.1" } } \ No newline at end of file diff --git a/examples/blinkid-camera/typescript/src/app.ts b/examples/blinkid-camera/typescript/src/app.ts index 2468887..38d86ef 100644 --- a/examples/blinkid-camera/typescript/src/app.ts +++ b/examples/blinkid-camera/typescript/src/app.ts @@ -33,7 +33,7 @@ function main() { } // 1. It's possible to obtain a free trial license key on microblink.com - const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; // 2. Create instance of SDK load settings with your license key const loadSettings = new BlinkIDSDK.WasmSDKLoadSettings(licenseKey); diff --git a/examples/blinkid-file/javascript/app.js b/examples/blinkid-file/javascript/app.js index 5601371..013a1f0 100644 --- a/examples/blinkid-file/javascript/app.js +++ b/examples/blinkid-file/javascript/app.js @@ -30,11 +30,11 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; if (window.location.hostname === "blinkid.github.io") { - licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9hPYYlTvZbRmaDRoPhJOp2oExtMeLQkQgJgE+eDVhY3OTfpJcsDgROo8DnQUZ8RhkCGPZlokHeQgvTSPm6yRvotnaQV8AQP7HYR9IbHfodldfqlCGAWw+LtG0MMV9E/H4i0knaJZ9CfX6Ty2+dvqw8xPM1JWSrk/COOS34jJ57aovNd18+9qimphvJJlFSX2cnjnI41J0rlpG2vtX7+j/NlLuzxElSybEy5+480HFgus/RmUkSm2t1MM4m1WVMjOPQNqA4IP6gTUkNZ4NmV7IOuIMm6K2xEyJRx6Rtq2V2MW1pbHaA1fLtbwCzQIHXcaqAni8fx+TF/g=="; + licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9hPYYlTvZbRmaDxofhV1cqeyqVL4XAQwQ3RlqRTCXUaj+w3FBz3qZazWy5hmGRRHmvuxxn7frL1OQ6uFPvbdFZPOXHo0TmqT6cDMWFWIKVwERZW0/v7gwL0Le3KBavqDUO7qxCX4+V9W55YQnPLfGpNfBx0vLnRvZWyNvl6ecWpNRE/PBacv0h9Lv0rGITtL0Pfi0ivV43mR9HMVSRGaGk0msbs8F5aLhOYYEV94ASTq4qsHNnus9mpyq7AAMX04MYkiRa+QTD2L4XUct4Iq593RocQVSShDVWPbBQ6LsP8Mako34Bt6kI7zJkxWD3pM67DuUNjFAIkA=="; } // 2. Create instance of SDK load settings with your license key diff --git a/examples/blinkid-file/javascript/index.html b/examples/blinkid-file/javascript/index.html index 01f84c9..bb49e10 100644 --- a/examples/blinkid-file/javascript/index.html +++ b/examples/blinkid-file/javascript/index.html @@ -23,6 +23,6 @@

Processing...

- + diff --git a/examples/blinkid-file/typescript/package.json b/examples/blinkid-file/typescript/package.json index 255dd97..338c8f7 100644 --- a/examples/blinkid-file/typescript/package.json +++ b/examples/blinkid-file/typescript/package.json @@ -19,6 +19,6 @@ "typescript": "^3.9.5" }, "dependencies": { - "@microblink/blinkid-in-browser-sdk": "~6.11.0" + "@microblink/blinkid-in-browser-sdk": "~6.11.1" } } \ No newline at end of file diff --git a/examples/blinkid-file/typescript/src/app.ts b/examples/blinkid-file/typescript/src/app.ts index 826432f..6ec9a94 100644 --- a/examples/blinkid-file/typescript/src/app.ts +++ b/examples/blinkid-file/typescript/src/app.ts @@ -29,7 +29,7 @@ function main() { } // 1. It's possible to obtain a free trial license key on microblink.com - const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; // 2. Create instance of SDK load settings with your license key const loadSettings = new BlinkIDSDK.WasmSDKLoadSettings(licenseKey); diff --git a/examples/getting-started/package.json b/examples/getting-started/package.json index f048601..e547873 100644 --- a/examples/getting-started/package.json +++ b/examples/getting-started/package.json @@ -12,6 +12,6 @@ "vite": "^5.3.1" }, "dependencies": { - "@microblink/blinkid-in-browser-sdk": "~6.11.0" + "@microblink/blinkid-in-browser-sdk": "~6.11.1" } } \ No newline at end of file diff --git a/examples/idbarcode/javascript/app.js b/examples/idbarcode/javascript/app.js index e2ff28f..59a2ca1 100644 --- a/examples/idbarcode/javascript/app.js +++ b/examples/idbarcode/javascript/app.js @@ -31,11 +31,11 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; if (window.location.hostname === "blinkid.github.io") { - licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9hPYYlTvZbRmaDRoPhJOp2oExtMeLQkQgJgE+eDVhY3OTfpJcsDgROo8DnQUZ8RhkCGPZlokHeQgvTSPm6yRvotnaQV8AQP7HYR9IbHfodldfqlCGAWw+LtG0MMV9E/H4i0knaJZ9CfX6Ty2+dvqw8xPM1JWSrk/COOS34jJ57aovNd18+9qimphvJJlFSX2cnjnI41J0rlpG2vtX7+j/NlLuzxElSybEy5+480HFgus/RmUkSm2t1MM4m1WVMjOPQNqA4IP6gTUkNZ4NmV7IOuIMm6K2xEyJRx6Rtq2V2MW1pbHaA1fLtbwCzQIHXcaqAni8fx+TF/g=="; + licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9hPYYlTvZbRmaDxofhV1cqeyqVL4XAQwQ3RlqRTCXUaj+w3FBz3qZazWy5hmGRRHmvuxxn7frL1OQ6uFPvbdFZPOXHo0TmqT6cDMWFWIKVwERZW0/v7gwL0Le3KBavqDUO7qxCX4+V9W55YQnPLfGpNfBx0vLnRvZWyNvl6ecWpNRE/PBacv0h9Lv0rGITtL0Pfi0ivV43mR9HMVSRGaGk0msbs8F5aLhOYYEV94ASTq4qsHNnus9mpyq7AAMX04MYkiRa+QTD2L4XUct4Iq593RocQVSShDVWPbBQ6LsP8Mako34Bt6kI7zJkxWD3pM67DuUNjFAIkA=="; } // 2. Create instance of SDK load settings with your license key diff --git a/examples/idbarcode/javascript/index.html b/examples/idbarcode/javascript/index.html index 2fb9b9c..d56980a 100644 --- a/examples/idbarcode/javascript/index.html +++ b/examples/idbarcode/javascript/index.html @@ -22,6 +22,6 @@

Loading...

- + diff --git a/examples/idbarcode/typescript/package.json b/examples/idbarcode/typescript/package.json index 255dd97..338c8f7 100644 --- a/examples/idbarcode/typescript/package.json +++ b/examples/idbarcode/typescript/package.json @@ -19,6 +19,6 @@ "typescript": "^3.9.5" }, "dependencies": { - "@microblink/blinkid-in-browser-sdk": "~6.11.0" + "@microblink/blinkid-in-browser-sdk": "~6.11.1" } } \ No newline at end of file diff --git a/examples/idbarcode/typescript/src/app.ts b/examples/idbarcode/typescript/src/app.ts index 6925361..23ab759 100644 --- a/examples/idbarcode/typescript/src/app.ts +++ b/examples/idbarcode/typescript/src/app.ts @@ -30,7 +30,7 @@ function main() { } // 1. It's possible to obtain a free trial license key on microblink.com - const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; // 2. Create instance of SDK load settings with your license key const loadSettings = new BlinkIDSDK.WasmSDKLoadSettings(licenseKey); diff --git a/examples/multi-side-file/javascript/app.js b/examples/multi-side-file/javascript/app.js index d0269d2..e248d08 100644 --- a/examples/multi-side-file/javascript/app.js +++ b/examples/multi-side-file/javascript/app.js @@ -30,11 +30,11 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; if (window.location.hostname === "blinkid.github.io") { - licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9hPYYlTvZbRmaDRoPhJOp2oExtMeLQkQgJgE+eDVhY3OTfpJcsDgROo8DnQUZ8RhkCGPZlokHeQgvTSPm6yRvotnaQV8AQP7HYR9IbHfodldfqlCGAWw+LtG0MMV9E/H4i0knaJZ9CfX6Ty2+dvqw8xPM1JWSrk/COOS34jJ57aovNd18+9qimphvJJlFSX2cnjnI41J0rlpG2vtX7+j/NlLuzxElSybEy5+480HFgus/RmUkSm2t1MM4m1WVMjOPQNqA4IP6gTUkNZ4NmV7IOuIMm6K2xEyJRx6Rtq2V2MW1pbHaA1fLtbwCzQIHXcaqAni8fx+TF/g=="; + licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9hPYYlTvZbRmaDxofhV1cqeyqVL4XAQwQ3RlqRTCXUaj+w3FBz3qZazWy5hmGRRHmvuxxn7frL1OQ6uFPvbdFZPOXHo0TmqT6cDMWFWIKVwERZW0/v7gwL0Le3KBavqDUO7qxCX4+V9W55YQnPLfGpNfBx0vLnRvZWyNvl6ecWpNRE/PBacv0h9Lv0rGITtL0Pfi0ivV43mR9HMVSRGaGk0msbs8F5aLhOYYEV94ASTq4qsHNnus9mpyq7AAMX04MYkiRa+QTD2L4XUct4Iq593RocQVSShDVWPbBQ6LsP8Mako34Bt6kI7zJkxWD3pM67DuUNjFAIkA=="; } // 2. Create instance of SDK load settings with your license key diff --git a/examples/multi-side-file/javascript/index.html b/examples/multi-side-file/javascript/index.html index 10579ad..9aeb692 100644 --- a/examples/multi-side-file/javascript/index.html +++ b/examples/multi-side-file/javascript/index.html @@ -30,6 +30,6 @@

Processing...

- + diff --git a/examples/multi-side-file/typescript/package.json b/examples/multi-side-file/typescript/package.json index 255dd97..338c8f7 100644 --- a/examples/multi-side-file/typescript/package.json +++ b/examples/multi-side-file/typescript/package.json @@ -19,6 +19,6 @@ "typescript": "^3.9.5" }, "dependencies": { - "@microblink/blinkid-in-browser-sdk": "~6.11.0" + "@microblink/blinkid-in-browser-sdk": "~6.11.1" } } \ No newline at end of file diff --git a/examples/multi-side-file/typescript/src/app.ts b/examples/multi-side-file/typescript/src/app.ts index 351b3b7..e259260 100644 --- a/examples/multi-side-file/typescript/src/app.ts +++ b/examples/multi-side-file/typescript/src/app.ts @@ -30,7 +30,7 @@ function main() { } // 1. It's possible to obtain a free trial license key on microblink.com - const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; // 2. Create instance of SDK load settings with your license key const loadSettings = new BlinkIDSDK.WasmSDKLoadSettings(licenseKey); diff --git a/examples/multi-side/javascript/app.js b/examples/multi-side/javascript/app.js index 08fb135..2b490a6 100644 --- a/examples/multi-side/javascript/app.js +++ b/examples/multi-side/javascript/app.js @@ -34,11 +34,11 @@ function main() } // 1. It's possible to obtain a free trial license key on microblink.com - let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + let licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; if (window.location.hostname === "blinkid.github.io") { - licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9hPYYlTvZbRmaDRoPhJOp2oExtMeLQkQgJgE+eDVhY3OTfpJcsDgROo8DnQUZ8RhkCGPZlokHeQgvTSPm6yRvotnaQV8AQP7HYR9IbHfodldfqlCGAWw+LtG0MMV9E/H4i0knaJZ9CfX6Ty2+dvqw8xPM1JWSrk/COOS34jJ57aovNd18+9qimphvJJlFSX2cnjnI41J0rlpG2vtX7+j/NlLuzxElSybEy5+480HFgus/RmUkSm2t1MM4m1WVMjOPQNqA4IP6gTUkNZ4NmV7IOuIMm6K2xEyJRx6Rtq2V2MW1pbHaA1fLtbwCzQIHXcaqAni8fx+TF/g=="; + licenseKey = "sRwAAAYRYmxpbmtpZC5naXRodWIuaW+qBF9hPYYlTvZbRmaDxofhV1cqeyqVL4XAQwQ3RlqRTCXUaj+w3FBz3qZazWy5hmGRRHmvuxxn7frL1OQ6uFPvbdFZPOXHo0TmqT6cDMWFWIKVwERZW0/v7gwL0Le3KBavqDUO7qxCX4+V9W55YQnPLfGpNfBx0vLnRvZWyNvl6ecWpNRE/PBacv0h9Lv0rGITtL0Pfi0ivV43mR9HMVSRGaGk0msbs8F5aLhOYYEV94ASTq4qsHNnus9mpyq7AAMX04MYkiRa+QTD2L4XUct4Iq593RocQVSShDVWPbBQ6LsP8Mako34Bt6kI7zJkxWD3pM67DuUNjFAIkA=="; } // 2. Create instance of SDK load settings with your license key diff --git a/examples/multi-side/javascript/index.html b/examples/multi-side/javascript/index.html index 0661a8c..6c17496 100644 --- a/examples/multi-side/javascript/index.html +++ b/examples/multi-side/javascript/index.html @@ -24,6 +24,6 @@

Loading...

- + diff --git a/examples/multi-side/typescript/package.json b/examples/multi-side/typescript/package.json index 255dd97..338c8f7 100644 --- a/examples/multi-side/typescript/package.json +++ b/examples/multi-side/typescript/package.json @@ -19,6 +19,6 @@ "typescript": "^3.9.5" }, "dependencies": { - "@microblink/blinkid-in-browser-sdk": "~6.11.0" + "@microblink/blinkid-in-browser-sdk": "~6.11.1" } } \ No newline at end of file diff --git a/examples/multi-side/typescript/src/app.ts b/examples/multi-side/typescript/src/app.ts index 5114b2e..60039b8 100644 --- a/examples/multi-side/typescript/src/app.ts +++ b/examples/multi-side/typescript/src/app.ts @@ -33,7 +33,7 @@ function main() { } // 1. It's possible to obtain a free trial license key on microblink.com - const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; // 2. Create instance of SDK load settings with your license key const loadSettings = new BlinkIDSDK.WasmSDKLoadSettings(licenseKey); diff --git a/examples/webpack/javascript/package.json b/examples/webpack/javascript/package.json index 2838f19..c6dec00 100644 --- a/examples/webpack/javascript/package.json +++ b/examples/webpack/javascript/package.json @@ -20,6 +20,6 @@ "webpack-cli": "^3.3.12" }, "dependencies": { - "@microblink/blinkid-in-browser-sdk": "~6.11.0" + "@microblink/blinkid-in-browser-sdk": "~6.11.1" } } \ No newline at end of file diff --git a/examples/webpack/typescript/package.json b/examples/webpack/typescript/package.json index 5b29ebf..9637ee8 100644 --- a/examples/webpack/typescript/package.json +++ b/examples/webpack/typescript/package.json @@ -22,6 +22,6 @@ "webpack-cli": "^3.3.12" }, "dependencies": { - "@microblink/blinkid-in-browser-sdk": "~6.11.0" + "@microblink/blinkid-in-browser-sdk": "~6.11.1" } } \ No newline at end of file diff --git a/examples/webpack/typescript/src/app.ts b/examples/webpack/typescript/src/app.ts index 7819837..b533ab4 100644 --- a/examples/webpack/typescript/src/app.ts +++ b/examples/webpack/typescript/src/app.ts @@ -33,7 +33,7 @@ function main() { } // 1. It's possible to obtain a free trial license key on microblink.com - const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLEs7Z/qbNS0Lv5S3LqXJYzeYizBDKYF9b5XOl6glXcFZ5hHh8eSSwlNO1U5gTfj1RR4+jDMhXh+uQXHrPtAT/hHO8l/aSlX/r6I5jdUONJ4p2k9I2lPHRYIRDn452bSkniyuTcDR83oL9ps9dbNXMmaQ25+tla5+wZ8Ubw2HMfEh+eZ8ROP/4j9y4AtK49cN4KxOI0ge6DqBG1YrfMP4BGu/YcDfwPRIMVeT0jecrPkd8Q191+PNJDUgWw2MroMCtX4R8MzA1A1+qmzCA4+1CQKgQhRY8JPV4WhtK2cEe/hnuk5n5eU/pvbwX6bHkyo="; + const licenseKey = "sRwAAAYJbG9jYWxob3N0r/lOPk4/w35CpJlWLMs/Z/cJ9XS3kubSfrmpNRirxIoFmhHWoap88E7Jy+o612Uc5zitmGgY6HmfzPVYOnsLpfkcq/+sTqOED8LdlmgFSb007s42kUL1ZdzS8fbscDricbCbiPJHpTLwnC0ggWOpdiBxqXU1NglRYGyvnHLbxPcr1jooddORxRS/Zlnb/Lxet85FwKEv/EBoZIJYI5224ko7g1HDoqFCboF6OnwXM2usq5CHsQk6EE5p+eRwJrcnhy6CVkQjNqBd53mTCyiRxHgZZ8eTO8uMe5a1U8GhSY+1nkhXmQZ9xPqq1/09CUZWYLhLWuMwE4mobbY="; // 2. Create instance of SDK load settings with your license key const loadSettings = new BlinkIDSDK.WasmSDKLoadSettings(licenseKey); diff --git a/oss-dependencies/npm.txt b/oss-dependencies/npm.txt index 068e636..7d8779e 100644 --- a/oss-dependencies/npm.txt +++ b/oss-dependencies/npm.txt @@ -733,10 +733,10 @@ │ ├─ email: justin@ridgewell.name │ ├─ path: node_modules/@jridgewell/trace-mapping │ └─ licenseFile: node_modules/@jridgewell/trace-mapping/LICENSE -├─ @microblink/blinkid-in-browser-sdk@6.11.0 +├─ @microblink/blinkid-in-browser-sdk@6.11.1 │ ├─ licenses: Custom: https://github.com/BlinkID/blinkid-in-browser │ ├─ repository: https://github.com/BlinkID/blinkid-in-browser -│ ├─ path: /opt/jenkins/android-arm64-huawei-p30-pro/root/E0/sdk-blinkid-in-browser/blinkid-in-browser +│ ├─ path: /opt/jenkins/root/E2/sdk-blinkid-in-browser/blinkid-in-browser │ └─ licenseFile: README.md ├─ @nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.2 │ ├─ licenses: MIT @@ -790,7 +790,7 @@ │ ├─ repository: https://github.com/DefinitelyTyped/DefinitelyTyped │ ├─ path: node_modules/@types/json-schema │ └─ licenseFile: node_modules/@types/json-schema/LICENSE -├─ @types/node@22.7.4 +├─ @types/node@22.7.5 │ ├─ licenses: MIT │ ├─ repository: https://github.com/DefinitelyTyped/DefinitelyTyped │ ├─ path: node_modules/@types/node @@ -1065,7 +1065,7 @@ │ ├─ url: sindresorhus.com │ ├─ path: node_modules/callsites │ └─ licenseFile: node_modules/callsites/license -├─ caniuse-lite@1.0.30001666 +├─ caniuse-lite@1.0.30001667 │ ├─ licenses: CC-BY-4.0 │ ├─ repository: https://github.com/browserslist/caniuse-lite │ ├─ publisher: Ben Briggs @@ -1274,7 +1274,7 @@ │ ├─ repository: https://github.com/eslint/doctrine │ ├─ path: node_modules/doctrine │ └─ licenseFile: node_modules/doctrine/LICENSE -├─ electron-to-chromium@1.5.31 +├─ electron-to-chromium@1.5.35 │ ├─ licenses: ISC │ ├─ repository: https://github.com/kilian/electron-to-chromium │ ├─ publisher: Kilian Valkhof @@ -2419,7 +2419,7 @@ │ ├─ url: https://ofcr.se/ │ ├─ path: node_modules/regjsgen │ └─ licenseFile: node_modules/regjsgen/LICENSE-MIT.txt -├─ regjsparser@0.11.0 +├─ regjsparser@0.11.1 │ ├─ licenses: BSD-2-Clause │ ├─ repository: https://github.com/jviereck/regjsparser │ ├─ publisher: 'Julian Viereck' diff --git a/package-lock.json b/package-lock.json index 54827c5..fc71642 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@microblink/blinkid-in-browser-sdk", - "version": "6.11.0", + "version": "6.11.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@microblink/blinkid-in-browser-sdk", - "version": "6.11.0", + "version": "6.11.1", "dependencies": { "is-mobile": "^4.0.0", "p-throttle": "^5.1.0", @@ -2001,9 +2001,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.7.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", - "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2665,9 +2665,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001666", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001666.tgz", - "integrity": "sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==", + "version": "1.0.30001667", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", + "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", "dev": true, "funding": [ { @@ -3092,9 +3092,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.31", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.31.tgz", - "integrity": "sha512-QcDoBbQeYt0+3CWcK/rEbuHvwpbT/8SV9T3OSgs6cX1FlcUAkgrkqbg9zLnDrMM/rLamzQwal4LYFCiWk861Tg==", + "version": "1.5.35", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.35.tgz", + "integrity": "sha512-hOSRInrIDm0Brzp4IHW2F/VM+638qOL2CzE0DgpnGzKW27C95IqqeqgKz/hxHGnvPxvQGpHUGD5qRVC9EZY2+A==", "dev": true, "license": "ISC" }, @@ -3122,6 +3122,7 @@ "version": "8.38.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", "integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", "dependencies": { @@ -5323,9 +5324,9 @@ "license": "MIT" }, "node_modules/regjsparser": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.0.tgz", - "integrity": "sha512-vTbzVAjQDzwQdKuvj7qEq6OlAprCjE656khuGQ4QaBLg7abQ9I9ISpmLuc6inWe7zP75AECjqUa4g4sdQvOXhg==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.1.tgz", + "integrity": "sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { diff --git a/package.json b/package.json index e718438..02c1b20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@microblink/blinkid-in-browser-sdk", - "version": "6.11.0", + "version": "6.11.1", "description": "A simple ID scanning library for WebAssembly-enabled browsers.", "homepage": "https://github.com/BlinkID/blinkid-in-browser", "repository": "github:BlinkID/blinkid-in-browser", diff --git a/resources/BlinkIDWasmSDK.worker.min.js b/resources/BlinkIDWasmSDK.worker.min.js index 3cee9dd..080c269 100644 --- a/resources/BlinkIDWasmSDK.worker.min.js +++ b/resources/BlinkIDWasmSDK.worker.min.js @@ -1 +1 @@ -!function(){"use strict";let e=0;class t{constructor(t){this.action=t,this.messageID=function(){const t=e;return e+=1,t}()}}class s extends t{constructor(e,t){super(s.action),this.wasmModuleName=e.wasmModuleName,this.licenseKey=e.licenseKey,this.userId=t,this.registerLoadCallback=null!==e.loadProgressCallback,this.allowHelloMessage=e.allowHelloMessage,this.engineLocation=e.engineLocation,this.wasmType=e.wasmType,this.initialMemory=e.initialMemory,this.blinkIDVariant=e.blinkIdVariant,this.numberOfWorkers=e.numberOfWorkers}}var n,r;s.action="init",function(e){e[e.Any=0]="Any",e[e.Recognizer=1]="Recognizer",e[e.RecognizerSettings=2]="RecognizerSettings",e[e.Callback=3]="Callback"}(n||(n={}));class i extends t{constructor(e,t){super(i.action),this.funcName=e,this.params=t}}i.action="invokeFunction";class a extends t{constructor(e,t){super(a.action),this.className=e,this.params=t}}a.action="createNewNativeObject";class o extends t{constructor(e,t,s){super(o.action),this.recognizerHandles=e,this.allowMultipleResults=t,this.registeredMetadataCallbacks=s}}o.action="createRecognizerRunner";class E extends t{constructor(e,t){super(E.action),this.recognizerHandles=e,this.allowMultipleResults=t}}E.action="reconfigureRecognizerRunner";class c extends t{constructor(){super(c.action)}}c.action="deleteRecognizerRunner";class R extends t{constructor(e,t,s){super(R.action),this.objectHandle=e,this.methodName=t,this.params=s}}R.action="invokeObject";class l extends t{constructor(e){super(l.action),this.frame=e}getTransferrables(){return[this.frame.imageData.data.buffer]}}l.action="processImage";class _ extends t{constructor(e){super(_.action),this.hardReset=e}}_.action="resetRecognizers";class I extends t{constructor(e){super(I.action),this.registeredMetadataCallbacks=e}}I.action="registerMetadataCallbacks";class N extends t{constructor(e){super(N.action),this.detectionOnlyMode=e}}N.action="setDetectionOnly";class u extends t{constructor(e){super(u.action),this.cameraPreviewMirrored=e}}u.action="setCameraPreviewMirrored";class d extends t{constructor(e){super(d.action),this.userId=e}}d.action="getProductIntegrationInfo";class O extends t{constructor(e){super(O.action),this.pingProxyUrl=e}}O.action="setPingProxyUrl";class h extends t{constructor(e){super(h.action),this.data=e}}h.action="setPingData";class g{constructor(e,t,s){this.success=!0,this.error=null,this.messageID=e,this.success=t,this.error=s}}class S{constructor(e,t,s,n){this.success=!0,this.showOverlay=!0,this.messageID=e,this.success=t,this.showOverlay=s,this.wasmType=n}}class A extends g{constructor(e,t){super(e,!0,null),this.result=t}}class D extends g{constructor(e,t){super(e,!0,null),this.objectHandle=t}}class m extends g{constructor(e,t){super(e,!0,null),this.recognitionState=t}}class C extends g{constructor(e,t){super(e,!0,null),this.result=t}}class f{constructor(e){this.isLoadProgressMessage=!0,this.progress=e}}!function(e){e[e.onDebugText=0]="onDebugText",e[e.onDetectionFailed=1]="onDetectionFailed",e[e.onQuadDetection=2]="onQuadDetection",e[e.onPointsDetection=3]="onPointsDetection",e[e.onFirstSideResult=4]="onFirstSideResult",e[e.recognizerCallback=5]="recognizerCallback"}(r||(r={}));class p{constructor(e,t){this.isCallbackMessage=!0,this.callbackType=e,this.callbackParameters=t}}function T(e,t){return t=t||"",""===(e=e||"")?t:e.endsWith("/")?t.startsWith("/")?e+t.substring(1):e+t:t.startsWith("/")?e+t:e+"/"+t}var L,M,w;function y(){return/iOS|iPhone|iPad|iPod/i.test(navigator.userAgent)}async function U(){if(!await(async e=>{try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])))return!1;if(!("importScripts"in self))throw Error("Not implemented");return!y()&&"Worker"in self}async function P(){const e=await(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))(),t=await U();return e?t?L.AdvancedWithThreads:L.Advanced:L.Basic}!function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS"}(L||(L={}));class b extends Error{constructor(e,t){if(super(),!e.code||!e.message)throw Error("Instance of SDKError is required to have code and message.");if(this.message=e.message,this.code=e.code,"details"in e){if("message"in e.details){const t=Error(e.details.message);"stack"in e.details&&(t.stack=e.details.stack),this.details=t}}else this.details=t}}class F{constructor(e,t){if(!e.code||!e.message)throw Error("Instance of SDKError is required to have code and message.");this.message=e.message,this.code=e.code,this.details=t instanceof Error?new K(t):t}}class K{constructor(e){this.message=e.message,this.name=e.name,this.stack=e.stack}}!function(e){e.WORKER_WASM_LOAD_FAILURE="WORKER_WASM_LOAD_FAILURE",e.WORKER_WASM_INIT_MISSING="WORKER_WASM_INIT_MISSING",e.WORKER_FUNCTION_INVOKE_FAILURE="WORKER_FUNCTION_INVOKE_FAILURE",e.WORKER_RECOGNIZER_CREATION_FAILURE="WORKER_RECOGNIZER_CREATION_FAILURE",e.WORKER_RUNNER_EXISTS="WORKER_RUNNER_EXISTS",e.WORKER_RUNNER_CREATION_FAILURE="WORKER_RUNNER_CREATION_FAILURE",e.WORKER_RUNNER_MISSING="WORKER_RUNNER_MISSING",e.WORKER_RUNNER_RECONFIGURE_FAILURE="WORKER_RUNNER_RECONFIGURE_FAILURE",e.WORKER_RUNNER_DELETED="WORKER_RUNNER_DELETED",e.WORKER_RUNNER_DELETE_FAILURE="WORKER_RUNNER_DELETE_FAILURE",e.WORKER_OBJECT_INVOKE_FAILURE="WORKER_OBJECT_INVOKE_FAILURE",e.WORKER_IMAGE_PROCESS_FAILURE="WORKER_IMAGE_PROCESS_FAILURE",e.WORKER_HANDLE_UNDEFINED="WORKER_HANDLE_UNDEFINED",e.WORKER_MESSAGE_ACTION_UNKNOWN="WORKER_MESSAGE_ACTION_UNKNOWN",e.WORKER_LICENSE_UNLOCK_ERROR="WORKER_LICENSE_UNLOCK_ERROR",e.WORKER_INTEGRATION_INFO_FAILURE="WORKER_INTEGRATION_INFO_FAILURE",e.LOCAL_SDK_RUNNER_MISSING="LOCAL_SDK_RUNNER_MISSING",e.LOCAL_SDK_RUNNER_EMPTY="LOCAL_SDK_RUNNER_EMPTY",e.LICENSE_UNLOCK_ERROR="LICENSE_UNLOCK_ERROR",e.FRAME_CAPTURE_SVG_UNSUPPORTED="FRAME_CAPTURE_SVG_UNSUPPORTED",e.FRAME_CAPTURE_CANVAS_MISSING="FRAME_CAPTURE_CANVAS_MISSING",e.SDK_WASM_SETTINGS_MISSING="SDK_WASM_SETTINGS_MISSING",e.SDK_LICENSE_KEY_MISSING="SDK_LICENSE_KEY_MISSING",e.SDK_WASM_MODULE_NAME_MISSING="SDK_WASM_MODULE_NAME_MISSING",e.SDK_ENGINE_LOCATION_INVALID="SDK_ENGINE_LOCATION_INVALID",e.SDK_WORKER_LOCATION_INVALID="SDK_WORKER_LOCATION_INVALID",e.SDK_MISSING="SDK_MISSING",e.SDK_RECOGNIZERS_MISSING="SDK_RECOGNIZERS_MISSING",e.VIDEO_RECOGNIZER_ELEMENT_MISSING="VIDEO_RECOGNIZER_ELEMENT_MISSING",e.VIDEO_RECOGNIZER_CAMERA_MISSING="VIDEO_RECOGNIZER_CAMERA_MISSING",e.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED",e.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE",e.VIDEO_RECOGNIZER_CAMERA_IN_USE="VIDEO_RECOGNIZER_CAMERA_IN_USE",e.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED",e.VIDEO_RECOGNIZER_FEED_RELEASED="VIDEO_RECOGNIZER_FEED_RELEASED",e.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="VIDEO_RECOGNIZER_FEED_NOT_PAUSED",e.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED",e.VIDEO_RECOGNIZER_FEED_PAUSED="VIDEO_RECOGNIZER_FEED_PAUSED",e.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE",e.VIDEO_RECOGNIZER_FEED_MISSING="VIDEO_RECOGNIZER_FEED_MISSING",e.INVALID_PING_PROXY_URL="INVALID_PROXY_URL",e.PING_PROXY_PERMISSION_NOT_GRANTED="PING_PROXY_PERMISSION_NOT_GRANTED",e.PING_DATA_KEYS_AMOUNT_EXCEEDED="PING_DATA_KEYS_AMOUNT_EXCEEDED",e.PING_DATA_KEY_LENGTH_EXCEEDED="PING_DATA_KEY_LENGTH_EXCEEDED",e.PING_DATA_VALUE_LENGTH_EXCEEDED="PING_DATA_VALUE_LENGTH_EXCEEDED"}(M||(M={})),function(e){e.WORKER_HANDLE_UNDEFINED="Cannot find object with handle: undefined",e.WORKER_WASM_LOAD_FAILURE="Failed to load WASM in web worker!",e.WORKER_WASM_INIT_MISSING="WASM module is not initialized!",e.WORKER_FUNCTION_INVOKE_FAILURE="Failed to invoke function!",e.WORKER_RECOGNIZER_CREATION_FAILURE="Failed to create new recognizer!",e.WORKER_RUNNER_EXISTS="Recognizer runner is already created! Multiple instances are not allowed!",e.WORKER_RUNNER_CREATION_FAILURE="Failed to create new recognizer runner!",e.WORKER_RUNNER_MISSING="Recognizer runner is not created! There is nothing to reconfigure!",e.WORKER_RUNNER_RECONFIGURE_FAILURE="Failed to reconfigure recognizer runner!",e.WORKER_RUNNER_DELETED="Recognizer runner is already deleted!",e.WORKER_RUNNER_DELETE_FAILURE="Failed to delete recognizer runner!",e.WORKER_OBJECT_INVOKE_FAILURE="Failed to invoke object!",e.WORKER_IMAGE_PROCESS_FAILURE="Recognizer runner is not initialized! Cannot process image!",e.WORKER_INTEGRATION_INFO_FAILURE="Failed to get product integration info!",e.LOCAL_SDK_RUNNER_MISSING="Property nativeRecognizerRunner is not available!",e.LOCAL_SDK_RUNNER_EMPTY="Native RecognizerRunner cannot be empty!",e.LICENSE_TOKEN_STATE_INCORRECT="Internal error (Incorrect token state)",e.LICENSE_PAYLOAD_VERIFICATION_FAILED="Failed to verify server permission's digital signature!",e.LICENSE_PAYLOAD_CORRUPTED="Server permission payload is corrupted!",e.LICENSE_PERMISSION_EXPIRED="Internal error (server permission expired)",e.LICENSE_REMOTE_LOCKED="Provided license key has been remotely locked. Please contact support for more information!",e.FRAME_CAPTURE_SVG_UNSUPPORTED="Recognition of SVG elements not supported!",e.FRAME_CAPTURE_CANVAS_MISSING="Could not get canvas 2d context!",e.SDK_WASM_SETTINGS_MISSING="Missing WASM load settings!",e.SDK_LICENSE_KEY_MISSING="Missing license key!",e.SDK_WASM_MODULE_NAME_MISSING="Missing WASM module name!",e.SDK_ENGINE_LOCATION_INVALID="Setting property 'engineLocation' must be a string!",e.SDK_WORKER_LOCATION_INVALID="Setting property 'workerLocation' must be a string!",e.SDK_MISSING="SDK is not provided!",e.SDK_RECOGNIZERS_MISSING="To create RecognizerRunner at least 1 recognizer is required.",e.VIDEO_RECOGNIZER_ELEMENT_MISSING="Video element, i.e. camera feed is not provided!",e.VIDEO_RECOGNIZER_CAMERA_MISSING="Camera not found!",e.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="Camera not allowed!",e.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="Camera not available!",e.VIDEO_RECOGNIZER_CAMERA_IN_USE="Camera in use!",e.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="Media devices not supported by browser.",e.VIDEO_RECOGNIZER_FEED_RELEASED="The associated video feed has been released!",e.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="The associated video feed is not paused. Use resumeRecognition instead!",e.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="The play() request was interrupted or prevented by browser security rules!",e.VIDEO_RECOGNIZER_FEED_PAUSED="Cannot resume recognition while video feed is paused! Use recognize or startRecognition",e.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="Could not reset recognizers!",e.VIDEO_RECOGNIZER_FEED_MISSING="Missing video feed!",e.INVALID_PING_PROXY_URL="Provided ping proxy URL is not a valid secure URL in format 'https://{host}:{port?}'.",e.PING_PROXY_PERMISSION_NOT_GRANTED="Allow ping proxy permission not found in license.",e.PING_DATA_KEYS_AMOUNT_EXCEEDED="Maximum number of ping data keys exceeded.",e.PING_DATA_KEY_LENGTH_EXCEEDED="Ping data key is too long.",e.PING_DATA_VALUE_LENGTH_EXCEEDED="Ping data value is too long."}(w||(w={}));const G={licenseTokenStateIncorrect:{code:M.LICENSE_UNLOCK_ERROR,message:w.LICENSE_TOKEN_STATE_INCORRECT},licensePayloadVerificationFailed:{code:M.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PAYLOAD_VERIFICATION_FAILED},licensePayloadCorrupted:{code:M.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PAYLOAD_CORRUPTED},licensePermissionExpired:{code:M.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PERMISSION_EXPIRED},licenseRemoteLocked:{code:M.LICENSE_UNLOCK_ERROR,message:w.LICENSE_REMOTE_LOCKED},licenseNetworkError:{code:M.LICENSE_UNLOCK_ERROR},licenseInvalid:{code:M.LICENSE_UNLOCK_ERROR}},k={imageProcessFailure:{message:w.WORKER_IMAGE_PROCESS_FAILURE,code:M.WORKER_IMAGE_PROCESS_FAILURE},objectInvokeFailure:{message:w.WORKER_OBJECT_INVOKE_FAILURE,code:M.WORKER_OBJECT_INVOKE_FAILURE},runnerDeleteFailure:{message:w.WORKER_RUNNER_DELETE_FAILURE,code:M.WORKER_RUNNER_DELETE_FAILURE},runnerDeleted:{message:w.WORKER_RUNNER_DELETED,code:M.WORKER_RUNNER_DELETED},runnerReconfigureFailure:{message:w.WORKER_RUNNER_RECONFIGURE_FAILURE,code:M.WORKER_RUNNER_RECONFIGURE_FAILURE},runnerMissing:{message:w.WORKER_RUNNER_MISSING,code:M.WORKER_RUNNER_MISSING},runnerCreationFailure:{message:w.WORKER_RUNNER_CREATION_FAILURE,code:M.WORKER_RUNNER_CREATION_FAILURE},runnerExists:{message:w.WORKER_RUNNER_EXISTS,code:M.WORKER_RUNNER_EXISTS},recognizerCreationFailure:{message:w.WORKER_RECOGNIZER_CREATION_FAILURE,code:M.WORKER_RECOGNIZER_CREATION_FAILURE},functionInvokeFailure:{message:w.WORKER_FUNCTION_INVOKE_FAILURE,code:M.WORKER_FUNCTION_INVOKE_FAILURE},wasmInitMissing:{message:w.WORKER_WASM_INIT_MISSING,code:M.WORKER_WASM_INIT_MISSING},wasmLoadFailure:{message:w.WORKER_WASM_LOAD_FAILURE,code:M.WORKER_WASM_LOAD_FAILURE},handleUndefined:{message:w.WORKER_HANDLE_UNDEFINED,code:M.WORKER_HANDLE_UNDEFINED},integrationInfoFailure:{message:w.WORKER_INTEGRATION_INFO_FAILURE,code:M.WORKER_INTEGRATION_INFO_FAILURE}},v={invalidProxyUrl:{message:w.INVALID_PING_PROXY_URL,code:M.INVALID_PING_PROXY_URL},permissionNotGranted:{message:w.PING_PROXY_PERMISSION_NOT_GRANTED,code:M.PING_PROXY_PERMISSION_NOT_GRANTED},dataKeysAmountExceeded:{message:w.PING_DATA_KEYS_AMOUNT_EXCEEDED,code:M.PING_DATA_KEYS_AMOUNT_EXCEEDED},dataKeyLengthExceeded:{message:w.PING_DATA_KEY_LENGTH_EXCEEDED,code:M.PING_DATA_KEY_LENGTH_EXCEEDED},dataValueLengthExceeded:{message:w.PING_DATA_VALUE_LENGTH_EXCEEDED,code:M.PING_DATA_VALUE_LENGTH_EXCEEDED}};var W,V;!function(e){e[e.Invalid=0]="Invalid",e[e.RequiresServerPermission=1]="RequiresServerPermission",e[e.Valid=2]="Valid"}(W||(W={})),function(e){e.LicenseTokenStateInvalid="LICENSE_TOKEN_STATE_INVALID",e.NetworkError="NETWORK_ERROR",e.RemoteLock="REMOTE_LOCK",e.PermissionExpired="PERMISSION_EXPIRED",e.PayloadCorrupted="PAYLOAD_CORRUPTED",e.PayloadSignatureVerificationFailed="PAYLOAD_SIGNATURE_VERIFICATION_FAILED",e.IncorrectTokenState="INCORRECT_TOKEN_STATE"}(V||(V={}));function x(e){return{licenseId:e.licenseId,licensee:e.licensee,applicationIds:e.applicationIds,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion}}var z;async function H(e,t){try{const s=await fetch("https://baltazar.microblink.com/api/v2/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(x(e))});if(s.ok){const e=""+await s.text();return t.submitServerPermission(e)}return{status:z.NetworkError,lease:0,networkErrorDescription:"Server responded with status "+s.status}}catch(e){return{status:z.NetworkError,lease:0,networkErrorDescription:"Unexpected error: "+JSON.stringify(e)}}}!function(e){e[e.Ok=0]="Ok",e[e.NetworkError=1]="NetworkError",e[e.RemoteLock=2]="RemoteLock",e[e.PermissionExpired=3]="PermissionExpired",e[e.PayloadCorrupted=4]="PayloadCorrupted",e[e.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",e[e.IncorrectTokenState=6]="IncorrectTokenState"}(z||(z={}));var Z=Q,Y=Q,X=Q;const j=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,B=/CrOS/,J=/android|ipad|playbook|silk/i;function Q(e){e||(e={});let t=e.ua;if(t||"undefined"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;let s=j.test(t)&&!B.test(t)||!!e.tablet&&J.test(t);return!s&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(s=!0),s}function q(e){return Math.ceil(1024*e*1024/64/1024)}Z.isMobile=Y,Z.default=X;const{port1:$,port2:ee}=new MessageChannel;ee.close();new class{constructor(){this.context=self,this.wasmModule=null,this.nativeRecognizerRunner=null,this.objects={},this.nextObjectHandle=0,this.metadataCallbacks={},this.context.onmessage=e=>{const t=e.data;switch(t.action){case s.action:this.processInitMessage(t);break;case i.action:this.processInvokeFunction(t);break;case a.action:this.processCreateNewRecognizer(t);break;case R.action:this.processInvokeObject(t);break;case o.action:this.processCreateRecognizerRunner(t);break;case E.action:this.processReconfigureRecognizerRunner(t);break;case c.action:this.processDeleteRecognizerRunner(t);break;case l.action:this.processImage(t);break;case _.action:this.resetRecognizers(t);break;case N.action:this.setDetectionOnly(t);break;case u.action:this.setCameraPreviewMirrored(t);break;case I.action:this.registerMetadataCallbacks(t);break;case d.action:this.processGetProductIntegrationInfo(t);break;case O.action:this.setPingProxyUrl(t);break;case h.action:this.setPingData(t);break;default:throw new b({code:M.WORKER_MESSAGE_ACTION_UNKNOWN,message:"Unknown message action: "+JSON.stringify(t.action)})}}}getNextObjectHandle(){const e=this.nextObjectHandle;return this.nextObjectHandle=this.nextObjectHandle+1,e}notifyError(e,t){this.context.postMessage(new g(e.messageID,!1,t))}notifySuccess(e){this.context.postMessage(new g(e.messageID,!0,null))}notifyInitSuccess(e,t,s){this.context.postMessage(new S(e.messageID,!0,t,s))}unwrapParameters(e){const t=[];for(const s of e.params){let r=s.parameter;s.type===n.Recognizer?(r=this.objects[r],void 0===r&&this.notifyError(e,new F(k.handleUndefined))):s.type===n.RecognizerSettings&&(r=this.restoreFunctions(r)),t.push(r)}return t}restoreFunctions(e){const t=Object.keys(e);for(const s of t){const t=e[s];"object"==typeof t&&null!==t&&"parameter"in t&&"type"in t&&t.type===n.Callback&&(e[s]=(...e)=>{const s=new p(r.recognizerCallback,[t.parameter].concat(e));this.context.postMessage(s)})}return e}scanForTransferrables(e){if("object"==typeof e){const t=Object.keys(e),s=[];for(const n of t){const t=e[n];t instanceof ImageData?s.push(t.data.buffer):t instanceof Uint8Array?s.push(t.buffer):null!==t&&"object"==typeof t&&s.push(...this.scanForTransferrables(t))}return s}return[]}registerHeartBeat(e){this.unregisterHeartBeat(),this.lease=e;let t=e-Math.floor(Date.now()/1e3);t>120?t-=120:t/=2,this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!0)}),1e3*t)}unregisterHeartBeat(){this.lease&&delete this.lease,this.inFlightHeartBeatTimeoutId&&(clearTimeout(this.inFlightHeartBeatTimeoutId),delete this.inFlightHeartBeatTimeoutId)}async obtainNewServerPermission(e){if(this.wasmModule){const t=this.wasmModule.getActiveLicenseTokenInfo(),s=await H(t,this.wasmModule);switch(s.status){case z.Ok:case z.RemoteLock:this.registerHeartBeat(s.lease);break;case z.NetworkError:case z.PayloadSignatureVerificationFailed:case z.PayloadCorrupted:e?(console.warn("Problem with obtaining server permission. Will attempt in 10 seconds "+z[s.status]),this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!1)}),1e4)):console.error("Problem with obtaining server permission. "+z[s.status]);break;case z.IncorrectTokenState:case z.PermissionExpired:console.error("Internal error: "+z[s.status])}return s.status}return console.error("Internal inconsistency! Wasm module not initialized where it's expected to be!"),z.IncorrectTokenState}willSoonExpire(){if(this.lease){if(this.wasmModule.getActiveLicenseTokenInfo().unlockResult===W.Valid){const e=Math.floor(Date.now()/1e3);return 30>this.lease-e}return!0}return!1}async calculateWasmBundle(e){const t=e.blinkIDVariant??(Y()?"lightweight":"full");return{wasmType:e.wasmType??await P(),blinkIDVariant:t}}calculateEngineLocationPrefix(e,t){const s=""===e.engineLocation?self.location.origin:e.engineLocation;console.log("Engine location is:",s);const n=T(s,function(e){let t="";return t=e.wasmType===L.AdvancedWithThreads?"advanced-threads":e.wasmType===L.Advanced?"advanced":"basic",`${e.blinkIDVariant}/${t}`}(t));return e.allowHelloMessage&&console.log("Engine location prefix is:",n),n}async processInitMessage(e){const t=await this.calculateWasmBundle(e),s=this.calculateEngineLocationPrefix(e,t);let n={locateFile:e=>T(s,e),noExitRuntime:!0},r=e.initialMemory;r||(r=y()?700:200);const i=new WebAssembly.Memory({initial:q(r),maximum:q(2048),shared:t.wasmType===L.AdvancedWithThreads});n.wasmMemory=i,e.registerLoadCallback&&(n=Object.assign(n,{setStatus:e=>{const t=new f(function(e){if("Running..."===e)return 100;if(0===e.length)return 0;const t=RegExp(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/).exec(e);if(t)return 100*parseInt(t[2])/parseInt(t[4]);return NaN}(e));this.context.postMessage(t)}}));try{const r=T(s,e.wasmModuleName+".js");n.mainScriptUrlOrBlob=r,importScripts(r);(0,self[e.wasmModuleName])(n).then((async s=>{const n=await async function(e,t,s,n){const r=n.initializeWithLicenseKey(e,s,t);switch(r.unlockResult){case W.Invalid:return{error:new b({...G.licenseInvalid,message:r.licenseError},{type:V.LicenseTokenStateInvalid})};case W.Valid:return{error:null,showOverlay:(i=r.isTrial,a=r.allowRemoveDemoOverlay,o=r.allowRemoveProductionOverlay,!(i&&a||!i&&o))};case W.RequiresServerPermission:{const e=await H(r,n);switch(e.status){case z.Ok:return{error:null,lease:e.lease};case z.NetworkError:{let t="";return e.networkErrorDescription&&(t=" "+e.networkErrorDescription),{error:new b({...G.licenseNetworkError,message:"There has been a network error while obtaining the server permission!"+t},{type:V.NetworkError})}}case z.RemoteLock:return{error:new b(G.licenseRemoteLocked,{type:V.RemoteLock}),lease:e.lease};case z.PermissionExpired:return{error:new b(G.licensePermissionExpired,{type:V.PermissionExpired}),lease:e.lease};case z.PayloadCorrupted:return{error:new b(G.licensePayloadCorrupted,{type:V.PayloadCorrupted}),lease:e.lease};case z.PayloadSignatureVerificationFailed:return{error:new b(G.licensePayloadVerificationFailed,{type:V.PayloadSignatureVerificationFailed}),lease:e.lease};case z.IncorrectTokenState:return{error:new b(G.licenseTokenStateIncorrect,{type:V.IncorrectTokenState}),lease:e.lease}}}}var i,a,o}(e.licenseKey,e.allowHelloMessage,e.userId,s);null===n.error?(this.wasmModule=s,n.lease?this.registerHeartBeat(n.lease):this.unregisterHeartBeat(),this.notifyInitSuccess(e,!!n.showOverlay,t.wasmType)):this.notifyError(e,new F(n.error,n.error.details))}),(t=>{this.notifyError(e,new F(k.wasmLoadFailure,t))}))}catch(t){this.notifyError(e,new F(k.wasmLoadFailure,t))}}processInvokeFunction(e){if(null===this.wasmModule)return void this.notifyError(e,new F(k.wasmInitMissing));const t=e.funcName,s=this.unwrapParameters(e);try{const n=this.wasmModule[t](...s);this.context.postMessage(new A(e.messageID,n))}catch(t){this.notifyError(e,new F(k.functionInvokeFailure,t))}}processCreateNewRecognizer(e){if(null===this.wasmModule)return void this.notifyError(e,new F(k.wasmInitMissing));const t=e.className,s=this.unwrapParameters(e);try{const n=new this.wasmModule[t](...s),r=this.getNextObjectHandle();this.objects[r]=n,this.context.postMessage(new D(e.messageID,r))}catch(t){this.notifyError(e,new F(k.recognizerCreationFailure,t))}}getRecognizers(e){const t=[];for(const s of e){t.push(this.objects[s])}return t}async processCreateRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,new F(k.wasmInitMissing));else if(null!==this.nativeRecognizerRunner)this.notifyError(e,new F(k.runnerExists));else{this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{if(this.willSoonExpire()){const t=await this.obtainNewServerPermission(!1);if(t!==z.Ok){const s=z[t];return void this.notifyError(e,new F({code:M.WORKER_LICENSE_UNLOCK_ERROR,message:"Cannot initialize recognizers because of invalid server permission:\n "+s},{type:V[s]}))}}const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner=new this.wasmModule.RecognizerRunner(t,e.allowMultipleResults,this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.runnerCreationFailure,t))}}}processReconfigureRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,new F(k.wasmInitMissing));else if(null===this.nativeRecognizerRunner)this.notifyError(e,new F(k.runnerMissing));else try{const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner.reconfigureRecognizers(t,e.allowMultipleResults),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.runnerReconfigureFailure,t))}}processDeleteRecognizerRunner(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.delete(),this.nativeRecognizerRunner=null,this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.runnerDeleteFailure,t))}else this.notifyError(e,new F(k.runnerDeleted))}wrapFunctions(e,t){if("object"!=typeof e)return e;const s={...e},r=Object.keys(s);for(const e of r){if("function"==typeof s[e]){s[e]={parameter:{recognizerHandle:t,callbackName:e},type:n.Callback}}}return s}processInvokeObject(e){try{const t=e.objectHandle,s=e.methodName,n=this.unwrapParameters(e),r=this.objects[t];if(void 0===r)this.notifyError(e,new F({message:"Cannot find object with handle: "+t,code:M.WORKER_HANDLE_UNDEFINED}));else{const i=this.wrapFunctions(r[s](...n),t),a=this.scanForTransferrables(i);"delete"===s&&delete this.objects[t],this.context.postMessage(new A(e.messageID,i),a)}}catch(t){this.notifyError(e,new F(k.objectInvokeFailure,t))}}processImage(e){if(null!==this.nativeRecognizerRunner)try{const t=this.nativeRecognizerRunner.processImage(e.frame);$.postMessage(e.frame.imageData.data,[e.frame.imageData.data.buffer]),this.context.postMessage(new m(e.messageID,t))}catch(t){this.notifyError(e,new F(k.imageProcessFailure,t))}else this.notifyError(e,new F(k.imageProcessFailure))}resetRecognizers(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.resetRecognizers(e.hardReset),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.imageProcessFailure,t))}else this.notifyError(e,new F(k.imageProcessFailure))}setPingProxyUrl(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setPingProxyUrl(e.pingProxyUrl),this.notifySuccess(e)}catch(t){this.notifyError(e,new F("cause"in t&&"PERMISSION_NOT_GRANTED"===t.cause?v.permissionNotGranted:k.runnerMissing,t))}else this.notifyError(e,new F(k.runnerMissing))}setPingData(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setPingData(e.data),this.notifySuccess(e)}catch(t){if("cause"in t)switch(console.log("there is cause in error",t.cause),t.cause){case"PING_EXTRAS_TOO_MANY_KEYS":this.notifyError(e,new F(v.dataKeysAmountExceeded,t));break;case"PING_EXTRAS_KEY_TOO_LONG":this.notifyError(e,new F(v.dataKeyLengthExceeded,t));break;case"PING_EXTRAS_VALUE_TOO_LONG":this.notifyError(e,new F(v.dataValueLengthExceeded,t));break;default:this.notifyError(e,new F(k.runnerMissing,t))}this.notifyError(e,new F(k.runnerMissing,t))}else this.notifyError(e,new F(k.runnerMissing))}setDetectionOnly(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setDetectionOnlyMode(e.detectionOnlyMode),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.imageProcessFailure,t))}else this.notifyError(e,new F(k.imageProcessFailure))}setCameraPreviewMirrored(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setCameraPreviewMirrored(e.cameraPreviewMirrored),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.imageProcessFailure,t))}else this.notifyError(e,new F(k.imageProcessFailure))}setupMetadataCallbacks(e){e.onDebugText?this.metadataCallbacks.onDebugText=e=>{const t=new p(r.onDebugText,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onDebugText,e.onDetectionFailed?this.metadataCallbacks.onDetectionFailed=()=>{const e=new p(r.onDetectionFailed,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onDetectionFailed,e.onPointsDetection?this.metadataCallbacks.onPointsDetection=e=>{const t=new p(r.onPointsDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onPointsDetection,e.onQuadDetection?this.metadataCallbacks.onQuadDetection=e=>{const t=new p(r.onQuadDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onQuadDetection,e.onFirstSideResult?this.metadataCallbacks.onFirstSideResult=()=>{const e=new p(r.onFirstSideResult,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onFirstSideResult}registerMetadataCallbacks(e){if(null!==this.nativeRecognizerRunner){this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{this.nativeRecognizerRunner.setJSDelegate(this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.imageProcessFailure,t))}}else this.notifyError(e,new F(k.imageProcessFailure))}processGetProductIntegrationInfo(e){if(null!==this.wasmModule)try{const t=this.wasmModule.getActiveLicenseTokenInfo(),s={userId:e.userId,licenseId:t.licenseId,licensee:t.licensee,productName:t.sdkName,productVersion:t.sdkVersion,platform:"Browser",device:self.navigator.userAgent,packageName:t.packageName};this.context.postMessage(new C(e.messageID,s))}catch(t){this.notifyError(e,new F(k.objectInvokeFailure,t))}else this.notifyError(e,new F(k.wasmInitMissing))}}}(); +!function(){"use strict";let e=0;class t{constructor(t){this.action=t,this.messageID=function(){const t=e;return e+=1,t}()}}class s extends t{constructor(e,t){super(s.action),this.wasmModuleName=e.wasmModuleName,this.licenseKey=e.licenseKey,this.userId=t,this.registerLoadCallback=null!==e.loadProgressCallback,this.allowHelloMessage=e.allowHelloMessage,this.engineLocation=e.engineLocation,this.wasmType=e.wasmType,this.initialMemory=e.initialMemory,this.blinkIDVariant=e.blinkIdVariant,this.numberOfWorkers=e.numberOfWorkers}}var n,r;s.action="init",function(e){e[e.Any=0]="Any",e[e.Recognizer=1]="Recognizer",e[e.RecognizerSettings=2]="RecognizerSettings",e[e.Callback=3]="Callback"}(n||(n={}));class i extends t{constructor(e,t){super(i.action),this.funcName=e,this.params=t}}i.action="invokeFunction";class a extends t{constructor(e,t){super(a.action),this.className=e,this.params=t}}a.action="createNewNativeObject";class o extends t{constructor(e,t,s){super(o.action),this.recognizerHandles=e,this.allowMultipleResults=t,this.registeredMetadataCallbacks=s}}o.action="createRecognizerRunner";class E extends t{constructor(e,t){super(E.action),this.recognizerHandles=e,this.allowMultipleResults=t}}E.action="reconfigureRecognizerRunner";class c extends t{constructor(){super(c.action)}}c.action="deleteRecognizerRunner";class R extends t{constructor(e,t,s){super(R.action),this.objectHandle=e,this.methodName=t,this.params=s}}R.action="invokeObject";class l extends t{constructor(e){super(l.action),this.frame=e}getTransferrables(){return[this.frame.imageData.data.buffer]}}l.action="processImage";class _ extends t{constructor(e){super(_.action),this.hardReset=e}}_.action="resetRecognizers";class I extends t{constructor(e){super(I.action),this.registeredMetadataCallbacks=e}}I.action="registerMetadataCallbacks";class u extends t{constructor(e){super(u.action),this.detectionOnlyMode=e}}u.action="setDetectionOnly";class N extends t{constructor(e){super(N.action),this.cameraPreviewMirrored=e}}N.action="setCameraPreviewMirrored";class d extends t{constructor(e){super(d.action),this.userId=e}}d.action="getProductIntegrationInfo";class O extends t{constructor(e){super(O.action),this.pingProxyUrl=e}}O.action="setPingProxyUrl";class h extends t{constructor(e){super(h.action),this.data=e}}h.action="setPingData";class g{constructor(e,t,s){this.success=!0,this.error=null,this.messageID=e,this.success=t,this.error=s}}class S{constructor(e,t,s,n){this.success=!0,this.showOverlay=!0,this.messageID=e,this.success=t,this.showOverlay=s,this.wasmType=n}}class A extends g{constructor(e,t){super(e,!0,null),this.result=t}}class D extends g{constructor(e,t){super(e,!0,null),this.objectHandle=t}}class m extends g{constructor(e,t){super(e,!0,null),this.recognitionState=t}}class C extends g{constructor(e,t){super(e,!0,null),this.result=t}}class f{constructor(e){this.isLoadProgressMessage=!0,this.progress=e}}!function(e){e[e.onDebugText=0]="onDebugText",e[e.onDetectionFailed=1]="onDetectionFailed",e[e.onQuadDetection=2]="onQuadDetection",e[e.onPointsDetection=3]="onPointsDetection",e[e.onFirstSideResult=4]="onFirstSideResult",e[e.recognizerCallback=5]="recognizerCallback"}(r||(r={}));class p{constructor(e,t){this.isCallbackMessage=!0,this.callbackType=e,this.callbackParameters=t}}function T(e,t){return t=t||"",""===(e=e||"")?t:e.endsWith("/")?t.startsWith("/")?e+t.substring(1):e+t:t.startsWith("/")?e+t:e+"/"+t}var L,M,w;function y(){return/iOS|iPhone|iPad|iPod/i.test(navigator.userAgent)}async function U(){if(!await(async e=>{try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])))return!1;if(!("importScripts"in self))throw Error("Not implemented");return!y()&&"Worker"in self}async function P(){const e=await(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))(),t=await U();return e?t?L.AdvancedWithThreads:L.Advanced:L.Basic}!function(e){e.Basic="BASIC",e.Advanced="ADVANCED",e.AdvancedWithThreads="ADVANCED_WITH_THREADS"}(L||(L={}));class b extends Error{constructor(e,t){if(super(),!e.code||!e.message)throw Error("Instance of SDKError is required to have code and message.");if(this.message=e.message,this.code=e.code,"details"in e){if("message"in e.details){const t=Error(e.details.message);"stack"in e.details&&(t.stack=e.details.stack),this.details=t}}else this.details=t}}class F{constructor(e,t){if(!e.code||!e.message)throw Error("Instance of SDKError is required to have code and message.");this.message=e.message,this.code=e.code,this.details=t instanceof Error?new K(t):t}}class K{constructor(e){this.message=e.message,this.name=e.name,this.stack=e.stack}}!function(e){e.WORKER_WASM_LOAD_FAILURE="WORKER_WASM_LOAD_FAILURE",e.WORKER_WASM_INIT_MISSING="WORKER_WASM_INIT_MISSING",e.WORKER_FUNCTION_INVOKE_FAILURE="WORKER_FUNCTION_INVOKE_FAILURE",e.WORKER_RECOGNIZER_CREATION_FAILURE="WORKER_RECOGNIZER_CREATION_FAILURE",e.WORKER_RUNNER_EXISTS="WORKER_RUNNER_EXISTS",e.WORKER_RUNNER_CREATION_FAILURE="WORKER_RUNNER_CREATION_FAILURE",e.WORKER_RUNNER_MISSING="WORKER_RUNNER_MISSING",e.WORKER_RUNNER_RECONFIGURE_FAILURE="WORKER_RUNNER_RECONFIGURE_FAILURE",e.WORKER_RUNNER_DELETED="WORKER_RUNNER_DELETED",e.WORKER_RUNNER_DELETE_FAILURE="WORKER_RUNNER_DELETE_FAILURE",e.WORKER_OBJECT_INVOKE_FAILURE="WORKER_OBJECT_INVOKE_FAILURE",e.WORKER_IMAGE_PROCESS_FAILURE="WORKER_IMAGE_PROCESS_FAILURE",e.WORKER_HANDLE_UNDEFINED="WORKER_HANDLE_UNDEFINED",e.WORKER_MESSAGE_ACTION_UNKNOWN="WORKER_MESSAGE_ACTION_UNKNOWN",e.WORKER_LICENSE_UNLOCK_ERROR="WORKER_LICENSE_UNLOCK_ERROR",e.WORKER_INTEGRATION_INFO_FAILURE="WORKER_INTEGRATION_INFO_FAILURE",e.LOCAL_SDK_RUNNER_MISSING="LOCAL_SDK_RUNNER_MISSING",e.LOCAL_SDK_RUNNER_EMPTY="LOCAL_SDK_RUNNER_EMPTY",e.LICENSE_UNLOCK_ERROR="LICENSE_UNLOCK_ERROR",e.FRAME_CAPTURE_SVG_UNSUPPORTED="FRAME_CAPTURE_SVG_UNSUPPORTED",e.FRAME_CAPTURE_CANVAS_MISSING="FRAME_CAPTURE_CANVAS_MISSING",e.SDK_WASM_SETTINGS_MISSING="SDK_WASM_SETTINGS_MISSING",e.SDK_LICENSE_KEY_MISSING="SDK_LICENSE_KEY_MISSING",e.SDK_WASM_MODULE_NAME_MISSING="SDK_WASM_MODULE_NAME_MISSING",e.SDK_ENGINE_LOCATION_INVALID="SDK_ENGINE_LOCATION_INVALID",e.SDK_WORKER_LOCATION_INVALID="SDK_WORKER_LOCATION_INVALID",e.SDK_MISSING="SDK_MISSING",e.SDK_RECOGNIZERS_MISSING="SDK_RECOGNIZERS_MISSING",e.VIDEO_RECOGNIZER_ELEMENT_MISSING="VIDEO_RECOGNIZER_ELEMENT_MISSING",e.VIDEO_RECOGNIZER_CAMERA_MISSING="VIDEO_RECOGNIZER_CAMERA_MISSING",e.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED",e.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE",e.VIDEO_RECOGNIZER_CAMERA_IN_USE="VIDEO_RECOGNIZER_CAMERA_IN_USE",e.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED",e.VIDEO_RECOGNIZER_FEED_RELEASED="VIDEO_RECOGNIZER_FEED_RELEASED",e.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="VIDEO_RECOGNIZER_FEED_NOT_PAUSED",e.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED",e.VIDEO_RECOGNIZER_FEED_PAUSED="VIDEO_RECOGNIZER_FEED_PAUSED",e.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE",e.VIDEO_RECOGNIZER_FEED_MISSING="VIDEO_RECOGNIZER_FEED_MISSING",e.INVALID_PING_PROXY_URL="INVALID_PROXY_URL",e.PING_PROXY_PERMISSION_NOT_GRANTED="PING_PROXY_PERMISSION_NOT_GRANTED",e.PING_DATA_KEYS_AMOUNT_EXCEEDED="PING_DATA_KEYS_AMOUNT_EXCEEDED",e.PING_DATA_KEY_LENGTH_EXCEEDED="PING_DATA_KEY_LENGTH_EXCEEDED",e.PING_DATA_VALUE_LENGTH_EXCEEDED="PING_DATA_VALUE_LENGTH_EXCEEDED"}(M||(M={})),function(e){e.WORKER_HANDLE_UNDEFINED="Cannot find object with handle: undefined",e.WORKER_WASM_LOAD_FAILURE="Failed to load WASM in web worker!",e.WORKER_WASM_INIT_MISSING="WASM module is not initialized!",e.WORKER_FUNCTION_INVOKE_FAILURE="Failed to invoke function!",e.WORKER_RECOGNIZER_CREATION_FAILURE="Failed to create new recognizer!",e.WORKER_RUNNER_EXISTS="Recognizer runner is already created! Multiple instances are not allowed!",e.WORKER_RUNNER_CREATION_FAILURE="Failed to create new recognizer runner!",e.WORKER_RUNNER_MISSING="Recognizer runner is not created! There is nothing to reconfigure!",e.WORKER_RUNNER_RECONFIGURE_FAILURE="Failed to reconfigure recognizer runner!",e.WORKER_RUNNER_DELETED="Recognizer runner is already deleted!",e.WORKER_RUNNER_DELETE_FAILURE="Failed to delete recognizer runner!",e.WORKER_OBJECT_INVOKE_FAILURE="Failed to invoke object!",e.WORKER_IMAGE_PROCESS_FAILURE="Recognizer runner is not initialized! Cannot process image!",e.WORKER_INTEGRATION_INFO_FAILURE="Failed to get product integration info!",e.LOCAL_SDK_RUNNER_MISSING="Property nativeRecognizerRunner is not available!",e.LOCAL_SDK_RUNNER_EMPTY="Native RecognizerRunner cannot be empty!",e.LICENSE_TOKEN_STATE_INCORRECT="Internal error (Incorrect token state)",e.LICENSE_PAYLOAD_VERIFICATION_FAILED="Failed to verify server permission's digital signature!",e.LICENSE_PAYLOAD_CORRUPTED="Server permission payload is corrupted!",e.LICENSE_PERMISSION_EXPIRED="Internal error (server permission expired)",e.LICENSE_REMOTE_LOCKED="Provided license key has been remotely locked. Please contact support for more information!",e.FRAME_CAPTURE_SVG_UNSUPPORTED="Recognition of SVG elements not supported!",e.FRAME_CAPTURE_CANVAS_MISSING="Could not get canvas 2d context!",e.SDK_WASM_SETTINGS_MISSING="Missing WASM load settings!",e.SDK_LICENSE_KEY_MISSING="Missing license key!",e.SDK_WASM_MODULE_NAME_MISSING="Missing WASM module name!",e.SDK_ENGINE_LOCATION_INVALID="Setting property 'engineLocation' must be a string!",e.SDK_WORKER_LOCATION_INVALID="Setting property 'workerLocation' must be a string!",e.SDK_MISSING="SDK is not provided!",e.SDK_RECOGNIZERS_MISSING="To create RecognizerRunner at least 1 recognizer is required.",e.VIDEO_RECOGNIZER_ELEMENT_MISSING="Video element, i.e. camera feed is not provided!",e.VIDEO_RECOGNIZER_CAMERA_MISSING="Camera not found!",e.VIDEO_RECOGNIZER_CAMERA_NOT_ALLOWED="Camera not allowed!",e.VIDEO_RECOGNIZER_CAMERA_UNAVAILABLE="Camera not available!",e.VIDEO_RECOGNIZER_CAMERA_IN_USE="Camera in use!",e.VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED="Media devices not supported by browser.",e.VIDEO_RECOGNIZER_FEED_RELEASED="The associated video feed has been released!",e.VIDEO_RECOGNIZER_FEED_NOT_PAUSED="The associated video feed is not paused. Use resumeRecognition instead!",e.VIDEO_RECOGNIZER_PLAY_REQUEST_INTERRUPTED="The play() request was interrupted or prevented by browser security rules!",e.VIDEO_RECOGNIZER_FEED_PAUSED="Cannot resume recognition while video feed is paused! Use recognize or startRecognition",e.VIDEO_RECOGNIZER_RECOGNIZERS_RESET_FAILURE="Could not reset recognizers!",e.VIDEO_RECOGNIZER_FEED_MISSING="Missing video feed!",e.INVALID_PING_PROXY_URL="Provided ping proxy URL is not a valid secure URL in format 'https://{host}:{port?}'.",e.PING_PROXY_PERMISSION_NOT_GRANTED="Allow ping proxy permission not found in license.",e.PING_DATA_KEYS_AMOUNT_EXCEEDED="Maximum number of ping data keys exceeded.",e.PING_DATA_KEY_LENGTH_EXCEEDED="Ping data key is too long.",e.PING_DATA_VALUE_LENGTH_EXCEEDED="Ping data value is too long."}(w||(w={}));const G={licenseTokenStateIncorrect:{code:M.LICENSE_UNLOCK_ERROR,message:w.LICENSE_TOKEN_STATE_INCORRECT},licensePayloadVerificationFailed:{code:M.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PAYLOAD_VERIFICATION_FAILED},licensePayloadCorrupted:{code:M.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PAYLOAD_CORRUPTED},licensePermissionExpired:{code:M.LICENSE_UNLOCK_ERROR,message:w.LICENSE_PERMISSION_EXPIRED},licenseRemoteLocked:{code:M.LICENSE_UNLOCK_ERROR,message:w.LICENSE_REMOTE_LOCKED},licenseNetworkError:{code:M.LICENSE_UNLOCK_ERROR},licenseInvalid:{code:M.LICENSE_UNLOCK_ERROR}},k={imageProcessFailure:{message:w.WORKER_IMAGE_PROCESS_FAILURE,code:M.WORKER_IMAGE_PROCESS_FAILURE},objectInvokeFailure:{message:w.WORKER_OBJECT_INVOKE_FAILURE,code:M.WORKER_OBJECT_INVOKE_FAILURE},runnerDeleteFailure:{message:w.WORKER_RUNNER_DELETE_FAILURE,code:M.WORKER_RUNNER_DELETE_FAILURE},runnerDeleted:{message:w.WORKER_RUNNER_DELETED,code:M.WORKER_RUNNER_DELETED},runnerReconfigureFailure:{message:w.WORKER_RUNNER_RECONFIGURE_FAILURE,code:M.WORKER_RUNNER_RECONFIGURE_FAILURE},runnerMissing:{message:w.WORKER_RUNNER_MISSING,code:M.WORKER_RUNNER_MISSING},runnerCreationFailure:{message:w.WORKER_RUNNER_CREATION_FAILURE,code:M.WORKER_RUNNER_CREATION_FAILURE},runnerExists:{message:w.WORKER_RUNNER_EXISTS,code:M.WORKER_RUNNER_EXISTS},recognizerCreationFailure:{message:w.WORKER_RECOGNIZER_CREATION_FAILURE,code:M.WORKER_RECOGNIZER_CREATION_FAILURE},functionInvokeFailure:{message:w.WORKER_FUNCTION_INVOKE_FAILURE,code:M.WORKER_FUNCTION_INVOKE_FAILURE},wasmInitMissing:{message:w.WORKER_WASM_INIT_MISSING,code:M.WORKER_WASM_INIT_MISSING},wasmLoadFailure:{message:w.WORKER_WASM_LOAD_FAILURE,code:M.WORKER_WASM_LOAD_FAILURE},handleUndefined:{message:w.WORKER_HANDLE_UNDEFINED,code:M.WORKER_HANDLE_UNDEFINED},integrationInfoFailure:{message:w.WORKER_INTEGRATION_INFO_FAILURE,code:M.WORKER_INTEGRATION_INFO_FAILURE}},v={invalidProxyUrl:{message:w.INVALID_PING_PROXY_URL,code:M.INVALID_PING_PROXY_URL},permissionNotGranted:{message:w.PING_PROXY_PERMISSION_NOT_GRANTED,code:M.PING_PROXY_PERMISSION_NOT_GRANTED},dataKeysAmountExceeded:{message:w.PING_DATA_KEYS_AMOUNT_EXCEEDED,code:M.PING_DATA_KEYS_AMOUNT_EXCEEDED},dataKeyLengthExceeded:{message:w.PING_DATA_KEY_LENGTH_EXCEEDED,code:M.PING_DATA_KEY_LENGTH_EXCEEDED},dataValueLengthExceeded:{message:w.PING_DATA_VALUE_LENGTH_EXCEEDED,code:M.PING_DATA_VALUE_LENGTH_EXCEEDED}};var W,V;!function(e){e[e.Invalid=0]="Invalid",e[e.RequiresServerPermission=1]="RequiresServerPermission",e[e.Valid=2]="Valid"}(W||(W={})),function(e){e.LicenseTokenStateInvalid="LICENSE_TOKEN_STATE_INVALID",e.NetworkError="NETWORK_ERROR",e.RemoteLock="REMOTE_LOCK",e.PermissionExpired="PERMISSION_EXPIRED",e.PayloadCorrupted="PAYLOAD_CORRUPTED",e.PayloadSignatureVerificationFailed="PAYLOAD_SIGNATURE_VERIFICATION_FAILED",e.IncorrectTokenState="INCORRECT_TOKEN_STATE"}(V||(V={}));function x(e){return{licenseId:e.licenseId,licensee:e.licensee,applicationIds:e.applicationIds,packageName:e.packageName,platform:"Browser",sdkName:e.sdkName,sdkVersion:e.sdkVersion}}var z;async function H(e,t){try{const s=await fetch("https://baltazar.microblink.com/api/v2/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(x(e))});if(s.ok){const e=""+await s.text();return t.submitServerPermission(e)}return{status:z.NetworkError,lease:0,networkErrorDescription:"Server responded with status "+s.status}}catch(e){return{status:z.NetworkError,lease:0,networkErrorDescription:"Unexpected error: "+JSON.stringify(e)}}}!function(e){e[e.Ok=0]="Ok",e[e.NetworkError=1]="NetworkError",e[e.RemoteLock=2]="RemoteLock",e[e.PermissionExpired=3]="PermissionExpired",e[e.PayloadCorrupted=4]="PayloadCorrupted",e[e.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",e[e.IncorrectTokenState=6]="IncorrectTokenState"}(z||(z={}));var Z=Q,Y=Q,X=Q;const j=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,B=/CrOS/,J=/android|ipad|playbook|silk/i;function Q(e){e||(e={});let t=e.ua;if(t||"undefined"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;let s=j.test(t)&&!B.test(t)||!!e.tablet&&J.test(t);return!s&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(s=!0),s}function q(e){return Math.ceil(1024*e*1024/64/1024)}function $(){const e=self.navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")}Z.isMobile=Y,Z.default=X;const{port1:ee,port2:te}=new MessageChannel;te.close(),$()&&ee.close();new class{constructor(){this.context=self,this.wasmModule=null,this.nativeRecognizerRunner=null,this.objects={},this.nextObjectHandle=0,this.metadataCallbacks={},this.context.onmessage=e=>{const t=e.data;switch(t.action){case s.action:this.processInitMessage(t);break;case i.action:this.processInvokeFunction(t);break;case a.action:this.processCreateNewRecognizer(t);break;case R.action:this.processInvokeObject(t);break;case o.action:this.processCreateRecognizerRunner(t);break;case E.action:this.processReconfigureRecognizerRunner(t);break;case c.action:this.processDeleteRecognizerRunner(t);break;case l.action:this.processImage(t);break;case _.action:this.resetRecognizers(t);break;case u.action:this.setDetectionOnly(t);break;case N.action:this.setCameraPreviewMirrored(t);break;case I.action:this.registerMetadataCallbacks(t);break;case d.action:this.processGetProductIntegrationInfo(t);break;case O.action:this.setPingProxyUrl(t);break;case h.action:this.setPingData(t);break;default:throw new b({code:M.WORKER_MESSAGE_ACTION_UNKNOWN,message:"Unknown message action: "+JSON.stringify(t.action)})}}}getNextObjectHandle(){const e=this.nextObjectHandle;return this.nextObjectHandle=this.nextObjectHandle+1,e}notifyError(e,t){this.context.postMessage(new g(e.messageID,!1,t))}notifySuccess(e){this.context.postMessage(new g(e.messageID,!0,null))}notifyInitSuccess(e,t,s){this.context.postMessage(new S(e.messageID,!0,t,s))}unwrapParameters(e){const t=[];for(const s of e.params){let r=s.parameter;s.type===n.Recognizer?(r=this.objects[r],void 0===r&&this.notifyError(e,new F(k.handleUndefined))):s.type===n.RecognizerSettings&&(r=this.restoreFunctions(r)),t.push(r)}return t}restoreFunctions(e){const t=Object.keys(e);for(const s of t){const t=e[s];"object"==typeof t&&null!==t&&"parameter"in t&&"type"in t&&t.type===n.Callback&&(e[s]=(...e)=>{const s=new p(r.recognizerCallback,[t.parameter].concat(e));this.context.postMessage(s)})}return e}scanForTransferrables(e){if("object"==typeof e){const t=Object.keys(e),s=[];for(const n of t){const t=e[n];t instanceof ImageData?s.push(t.data.buffer):t instanceof Uint8Array?s.push(t.buffer):null!==t&&"object"==typeof t&&s.push(...this.scanForTransferrables(t))}return s}return[]}registerHeartBeat(e){this.unregisterHeartBeat(),this.lease=e;let t=e-Math.floor(Date.now()/1e3);t>120?t-=120:t/=2,this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!0)}),1e3*t)}unregisterHeartBeat(){this.lease&&delete this.lease,this.inFlightHeartBeatTimeoutId&&(clearTimeout(this.inFlightHeartBeatTimeoutId),delete this.inFlightHeartBeatTimeoutId)}async obtainNewServerPermission(e){if(this.wasmModule){const t=this.wasmModule.getActiveLicenseTokenInfo(),s=await H(t,this.wasmModule);switch(s.status){case z.Ok:case z.RemoteLock:this.registerHeartBeat(s.lease);break;case z.NetworkError:case z.PayloadSignatureVerificationFailed:case z.PayloadCorrupted:e?(console.warn("Problem with obtaining server permission. Will attempt in 10 seconds "+z[s.status]),this.inFlightHeartBeatTimeoutId=setTimeout((()=>{this.obtainNewServerPermission(!1)}),1e4)):console.error("Problem with obtaining server permission. "+z[s.status]);break;case z.IncorrectTokenState:case z.PermissionExpired:console.error("Internal error: "+z[s.status])}return s.status}return console.error("Internal inconsistency! Wasm module not initialized where it's expected to be!"),z.IncorrectTokenState}willSoonExpire(){if(this.lease){if(this.wasmModule.getActiveLicenseTokenInfo().unlockResult===W.Valid){const e=Math.floor(Date.now()/1e3);return 30>this.lease-e}return!0}return!1}async calculateWasmBundle(e){const t=e.blinkIDVariant??(Y()?"lightweight":"full");return{wasmType:e.wasmType??await P(),blinkIDVariant:t}}calculateEngineLocationPrefix(e,t){const s=""===e.engineLocation?self.location.origin:e.engineLocation;console.log("Engine location is:",s);const n=T(s,function(e){let t="";return t=e.wasmType===L.AdvancedWithThreads?"advanced-threads":e.wasmType===L.Advanced?"advanced":"basic",`${e.blinkIDVariant}/${t}`}(t));return e.allowHelloMessage&&console.log("Engine location prefix is:",n),n}async processInitMessage(e){const t=await this.calculateWasmBundle(e),s=this.calculateEngineLocationPrefix(e,t);let n={locateFile:e=>T(s,e),noExitRuntime:!0},r=e.initialMemory;r||(r=y()?700:200);const i=new WebAssembly.Memory({initial:q(r),maximum:q(2048),shared:t.wasmType===L.AdvancedWithThreads});n.wasmMemory=i,e.registerLoadCallback&&(n=Object.assign(n,{setStatus:e=>{const t=new f(function(e){if("Running..."===e)return 100;if(0===e.length)return 0;const t=RegExp(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/).exec(e);if(t)return 100*parseInt(t[2])/parseInt(t[4]);return NaN}(e));this.context.postMessage(t)}}));try{const r=T(s,e.wasmModuleName+".js");n.mainScriptUrlOrBlob=r,importScripts(r);(0,self[e.wasmModuleName])(n).then((async s=>{const n=await async function(e,t,s,n){const r=n.initializeWithLicenseKey(e,s,t);switch(r.unlockResult){case W.Invalid:return{error:new b({...G.licenseInvalid,message:r.licenseError},{type:V.LicenseTokenStateInvalid})};case W.Valid:return{error:null,showOverlay:(i=r.isTrial,a=r.allowRemoveDemoOverlay,o=r.allowRemoveProductionOverlay,!(i&&a||!i&&o))};case W.RequiresServerPermission:{const e=await H(r,n);switch(e.status){case z.Ok:return{error:null,lease:e.lease};case z.NetworkError:{let t="";return e.networkErrorDescription&&(t=" "+e.networkErrorDescription),{error:new b({...G.licenseNetworkError,message:"There has been a network error while obtaining the server permission!"+t},{type:V.NetworkError})}}case z.RemoteLock:return{error:new b(G.licenseRemoteLocked,{type:V.RemoteLock}),lease:e.lease};case z.PermissionExpired:return{error:new b(G.licensePermissionExpired,{type:V.PermissionExpired}),lease:e.lease};case z.PayloadCorrupted:return{error:new b(G.licensePayloadCorrupted,{type:V.PayloadCorrupted}),lease:e.lease};case z.PayloadSignatureVerificationFailed:return{error:new b(G.licensePayloadVerificationFailed,{type:V.PayloadSignatureVerificationFailed}),lease:e.lease};case z.IncorrectTokenState:return{error:new b(G.licenseTokenStateIncorrect,{type:V.IncorrectTokenState}),lease:e.lease}}}}var i,a,o}(e.licenseKey,e.allowHelloMessage,e.userId,s);null===n.error?(this.wasmModule=s,n.lease?this.registerHeartBeat(n.lease):this.unregisterHeartBeat(),this.notifyInitSuccess(e,!!n.showOverlay,t.wasmType)):this.notifyError(e,new F(n.error,n.error.details))}),(t=>{this.notifyError(e,new F(k.wasmLoadFailure,t))}))}catch(t){this.notifyError(e,new F(k.wasmLoadFailure,t))}}processInvokeFunction(e){if(null===this.wasmModule)return void this.notifyError(e,new F(k.wasmInitMissing));const t=e.funcName,s=this.unwrapParameters(e);try{const n=this.wasmModule[t](...s);this.context.postMessage(new A(e.messageID,n))}catch(t){this.notifyError(e,new F(k.functionInvokeFailure,t))}}processCreateNewRecognizer(e){if(null===this.wasmModule)return void this.notifyError(e,new F(k.wasmInitMissing));const t=e.className,s=this.unwrapParameters(e);try{const n=new this.wasmModule[t](...s),r=this.getNextObjectHandle();this.objects[r]=n,this.context.postMessage(new D(e.messageID,r))}catch(t){this.notifyError(e,new F(k.recognizerCreationFailure,t))}}getRecognizers(e){const t=[];for(const s of e){t.push(this.objects[s])}return t}async processCreateRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,new F(k.wasmInitMissing));else if(null!==this.nativeRecognizerRunner)this.notifyError(e,new F(k.runnerExists));else{this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{if(this.willSoonExpire()){const t=await this.obtainNewServerPermission(!1);if(t!==z.Ok){const s=z[t];return void this.notifyError(e,new F({code:M.WORKER_LICENSE_UNLOCK_ERROR,message:"Cannot initialize recognizers because of invalid server permission:\n "+s},{type:V[s]}))}}const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner=new this.wasmModule.RecognizerRunner(t,e.allowMultipleResults,this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.runnerCreationFailure,t))}}}processReconfigureRecognizerRunner(e){if(null===this.wasmModule)this.notifyError(e,new F(k.wasmInitMissing));else if(null===this.nativeRecognizerRunner)this.notifyError(e,new F(k.runnerMissing));else try{const t=this.getRecognizers(e.recognizerHandles);this.nativeRecognizerRunner.reconfigureRecognizers(t,e.allowMultipleResults),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.runnerReconfigureFailure,t))}}processDeleteRecognizerRunner(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.delete(),this.nativeRecognizerRunner=null,this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.runnerDeleteFailure,t))}else this.notifyError(e,new F(k.runnerDeleted))}wrapFunctions(e,t){if("object"!=typeof e)return e;const s={...e},r=Object.keys(s);for(const e of r){if("function"==typeof s[e]){s[e]={parameter:{recognizerHandle:t,callbackName:e},type:n.Callback}}}return s}processInvokeObject(e){try{const t=e.objectHandle,s=e.methodName,n=this.unwrapParameters(e),r=this.objects[t];if(void 0===r)this.notifyError(e,new F({message:"Cannot find object with handle: "+t,code:M.WORKER_HANDLE_UNDEFINED}));else{const i=this.wrapFunctions(r[s](...n),t),a=this.scanForTransferrables(i);"delete"===s&&delete this.objects[t],this.context.postMessage(new A(e.messageID,i),a)}}catch(t){this.notifyError(e,new F(k.objectInvokeFailure,t))}}processImage(e){if(null!==this.nativeRecognizerRunner)try{const t=this.nativeRecognizerRunner.processImage(e.frame);$()||ee.postMessage(e.frame.imageData.data,[e.frame.imageData.data.buffer]),this.context.postMessage(new m(e.messageID,t))}catch(t){this.notifyError(e,new F(k.imageProcessFailure,t))}else this.notifyError(e,new F(k.imageProcessFailure))}resetRecognizers(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.resetRecognizers(e.hardReset),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.imageProcessFailure,t))}else this.notifyError(e,new F(k.imageProcessFailure))}setPingProxyUrl(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setPingProxyUrl(e.pingProxyUrl),this.notifySuccess(e)}catch(t){this.notifyError(e,new F("cause"in t&&"PERMISSION_NOT_GRANTED"===t.cause?v.permissionNotGranted:k.runnerMissing,t))}else this.notifyError(e,new F(k.runnerMissing))}setPingData(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setPingData(e.data),this.notifySuccess(e)}catch(t){if("cause"in t)switch(console.log("there is cause in error",t.cause),t.cause){case"PING_EXTRAS_TOO_MANY_KEYS":this.notifyError(e,new F(v.dataKeysAmountExceeded,t));break;case"PING_EXTRAS_KEY_TOO_LONG":this.notifyError(e,new F(v.dataKeyLengthExceeded,t));break;case"PING_EXTRAS_VALUE_TOO_LONG":this.notifyError(e,new F(v.dataValueLengthExceeded,t));break;default:this.notifyError(e,new F(k.runnerMissing,t))}this.notifyError(e,new F(k.runnerMissing,t))}else this.notifyError(e,new F(k.runnerMissing))}setDetectionOnly(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setDetectionOnlyMode(e.detectionOnlyMode),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.imageProcessFailure,t))}else this.notifyError(e,new F(k.imageProcessFailure))}setCameraPreviewMirrored(e){if(null!==this.nativeRecognizerRunner)try{this.nativeRecognizerRunner.setCameraPreviewMirrored(e.cameraPreviewMirrored),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.imageProcessFailure,t))}else this.notifyError(e,new F(k.imageProcessFailure))}setupMetadataCallbacks(e){e.onDebugText?this.metadataCallbacks.onDebugText=e=>{const t=new p(r.onDebugText,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onDebugText,e.onDetectionFailed?this.metadataCallbacks.onDetectionFailed=()=>{const e=new p(r.onDetectionFailed,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onDetectionFailed,e.onPointsDetection?this.metadataCallbacks.onPointsDetection=e=>{const t=new p(r.onPointsDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onPointsDetection,e.onQuadDetection?this.metadataCallbacks.onQuadDetection=e=>{const t=new p(r.onQuadDetection,[e]);this.context.postMessage(t)}:delete this.metadataCallbacks.onQuadDetection,e.onFirstSideResult?this.metadataCallbacks.onFirstSideResult=()=>{const e=new p(r.onFirstSideResult,[]);this.context.postMessage(e)}:delete this.metadataCallbacks.onFirstSideResult}registerMetadataCallbacks(e){if(null!==this.nativeRecognizerRunner){this.setupMetadataCallbacks(e.registeredMetadataCallbacks);try{this.nativeRecognizerRunner.setJSDelegate(this.metadataCallbacks),this.notifySuccess(e)}catch(t){this.notifyError(e,new F(k.imageProcessFailure,t))}}else this.notifyError(e,new F(k.imageProcessFailure))}processGetProductIntegrationInfo(e){if(null!==this.wasmModule)try{const t=this.wasmModule.getActiveLicenseTokenInfo(),s={userId:e.userId,licenseId:t.licenseId,licensee:t.licensee,productName:t.sdkName,productVersion:t.sdkVersion,platform:"Browser",device:self.navigator.userAgent,packageName:t.packageName};this.context.postMessage(new C(e.messageID,s))}catch(t){this.notifyError(e,new F(k.objectInvokeFailure,t))}else this.notifyError(e,new F(k.wasmInitMissing))}}}(); diff --git a/resources/full/advanced-threads/BlinkIDWasmSDK.js b/resources/full/advanced-threads/BlinkIDWasmSDK.js index ddce877..940a896 100644 --- a/resources/full/advanced-threads/BlinkIDWasmSDK.js +++ b/resources/full/advanced-threads/BlinkIDWasmSDK.js @@ -22,14 +22,14 @@ function(moduleArg = {}) { function h(){v.buffer!=aa.buffer&&ba();return aa}function w(){v.buffer!=aa.buffer&&ba();return ca}function x(){v.buffer!=aa.buffer&&ba();return da}function ea(){v.buffer!=aa.buffer&&ba();return fa}function A(){v.buffer!=aa.buffer&&ba();return ha}function B(){v.buffer!=aa.buffer&&ba();return ia}function ja(){v.buffer!=aa.buffer&&ba();return ka}var D=moduleArg,la,ma,readyPromise=new Promise((a,b)=>{la=a;ma=b});D.mc||(D.mc=0);D.mc++; D.ENVIRONMENT_IS_PTHREAD||D.$ww||function(a){function b(m,n,q){var p=new XMLHttpRequest;p.open("GET",m,!0);p.responseType="arraybuffer";p.onprogress=function(r){var k=n;r.total&&(k=r.total);if(r.loaded){p.Uc?D.Kb[m].loaded=r.loaded:(p.Uc=!0,D.Kb||(D.Kb={}),D.Kb[m]={loaded:r.loaded,total:k});var t=k=r=0,u;for(u in D.Kb){var z=D.Kb[u];r+=z.total;k+=z.loaded;t++}r=Math.ceil(r*D.mc/t);D.setStatus&&D.setStatus(`Downloading data... (${k}/${r})`)}else!D.Kb&&D.setStatus&&D.setStatus("Downloading data...")}; p.onerror=function(){throw Error("NetworkError for: "+m);};p.onload=function(){if(200==p.status||304==p.status||206==p.status||0==p.status&&p.response)q(p.response);else throw Error(p.statusText+" : "+p.responseURL);};p.send(null)}function c(m){console.error("package error:",m)}function d(){function m(r,k,t){this.start=r;this.end=k;this.audio=t}function n(r){if(!r)throw"Loading data file failed."+Error().stack;if(r.constructor.name!==ArrayBuffer.name)throw"bad input to processPackageData"+Error().stack; -r=new Uint8Array(r);m.prototype.Zc=r;r=a.files;for(var k=0;k{throw b;},qa="object"==typeof window,ra="function"==typeof importScripts,sa="object"==typeof process&&"object"==typeof process.Ld&&"string"==typeof process.Ld.node,F=D.ENVIRONMENT_IS_PTHREAD||!1,ta="";function ua(a){return D.locateFile?D.locateFile(a,ta):ta+a}var va,wa,xa; if(qa||ra)ra?ta=self.location.href:"undefined"!=typeof document&&document.currentScript&&(ta=document.currentScript.src),_scriptDir&&(ta=_scriptDir),ta=ta.startsWith("blob:")?"":ta.substr(0,ta.replace(/[?#].*/,"").lastIndexOf("/")+1),va=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ra&&(xa=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),wa=(a,b,c)=>{var d=new XMLHttpRequest;d.open("GET", @@ -40,8 +40,8 @@ Error("bad memory");ba();Ea=v.buffer.byteLength;var Fa=[],Ga=[],Ha=[],Ia=[],Ja=! function Ua(){Ra++;D.monitorRunDependencies?.(Ra)}function Va(){Ra--;D.monitorRunDependencies?.(Ra);if(0==Ra&&(null!==Sa&&(clearInterval(Sa),Sa=null),Ta)){var a=Ta;Ta=null;a()}}function Wa(a){D.onAbort?.(a);a="Aborted("+a+")";E(a);Ba=!0;Ca=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ma(a);throw a;}var Xa=a=>a.startsWith("data:application/octet-stream;base64,"),Ya;Ya="BlinkIDWasmSDK.wasm";Xa(Ya)||(Ya=ua(Ya)); function Za(a){if(a==Ya&&za)return new Uint8Array(za);if(xa)return xa(a);throw"both async and sync fetching of the wasm failed";}function ab(a){return za||!qa&&!ra||"function"!=typeof fetch?Promise.resolve().then(()=>Za(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Za(a))} function bb(a,b,c){return ab(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{E(`failed to asynchronously prepare wasm: ${d}`);Wa(d)})}function cb(a,b){var c=Ya;return za||"function"!=typeof WebAssembly.instantiateStreaming||Xa(c)||"function"!=typeof fetch?bb(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){E(`wasm streaming compile failed: ${e}`);E("falling back to ArrayBuffer instantiation");return bb(c,a,b)}))} -var G,H,db={339401:a=>{a=I(a);throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},339537:(a,b,c,d)=>{a=I(a);b=I(b);c=I(c);d=I(d);throw Error(a+b+c+d);},339753:(a,b)=>{a=I(a);b=I(b);throw Error(a+b);},339863:()=>{throw Error("Ping Proxy permission not found in license!",{cause:"PERMISSION_NOT_GRANTED"});},339966:a=>{throw Error(I(a));},340009:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},340092:()=>{throw Error("Unable to perform that operation while recognizer is in use!"); -},340175:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},340258:(a,b)=>{throw Error(I(a),{cause:I(b)});},340332:(a,b)=>{throw Error(I(a),{cause:I(b)});},340406:(a,b)=>{throw Error(I(a),{cause:I(b)});}};function eb(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} +var G,H,db={339417:a=>{a=I(a);throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},339553:(a,b,c,d)=>{a=I(a);b=I(b);c=I(c);d=I(d);throw Error(a+b+c+d);},339769:(a,b)=>{a=I(a);b=I(b);throw Error(a+b);},339879:()=>{throw Error("Ping Proxy permission not found in license!",{cause:"PERMISSION_NOT_GRANTED"});},339982:a=>{throw Error(I(a));},340025:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},340108:()=>{throw Error("Unable to perform that operation while recognizer is in use!"); +},340191:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},340274:(a,b)=>{throw Error(I(a),{cause:I(b)});},340348:(a,b)=>{throw Error(I(a),{cause:I(b)});},340422:(a,b)=>{throw Error(I(a),{cause:I(b)});}};function eb(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} var fb=a=>{a.terminate();a.onmessage=()=>{}},hb=a=>{0==J.Db.length&&(gb(),J.Hc(J.Db[0]));var b=J.Db.pop();if(!b)return 6;J.Hb.push(b);J.wb[a.Gb]=b;b.Gb=a.Gb;b.postMessage({cmd:"run",start_routine:a.Ed,arg:a.Vc,pthread_ptr:a.Gb},a.Jd);return 0},N=0,kb=a=>{var b=ib();a=a();jb(b);return a},lb=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,O=(a,b,...c)=>kb(()=>{for(var d=c.length,e=mb(8*d),f=e>>3,g=0;g{Ca=a;if(F)throw qb(a),"unwind";if(!(pb||0{Ua("loading-workers");yb(()=>Va("loading-workers"))})} function gb(){var a=ua("BlinkIDWasmSDK.worker.js");a=new Worker(a);J.Db.push(a)}function yb(a){F?a():Promise.all(J.Db.map(J.Hc)).then(a)} @@ -174,7 +174,7 @@ e?.(K)})},M=K=>{Ie(K,k,u,t,z)},L=(K,jf)=>{Le(K,jf.response,$a=>{--N;f(()=>{l?P(l wa:function(){var a=self.navigator.userAgent,b=Ub(a)+1,c=Je(b);Q(a,w(),c,b);return c},U:(a,b)=>{Pb(w().subarray(a,a+b));return 0},Q:ff,z:gf,R:hf,S:kf,a:v||D.wasmMemory,oa:$e,W:(a,b,c,d)=>$e(a,b,c,d)},Z=function(){function a(c,d){Z=c.exports;J.Tc.push(Z.Ia);Eb=Z.Ka;Ga.unshift(Z.Ba);Aa=d;Va("wasm-instantiate");return Z}var b={a:lf};Ua("wasm-instantiate");if(D.instantiateWasm)try{return D.instantiateWasm(b,a)}catch(c){E(`Module.instantiateWasm callback failed with error: ${c}`),ma(c)}cb(b,function(c){a(c.instance, c.module)}).catch(ma);return{}}(),Sd=a=>(Sd=Z.Ca)(a);D.__embind_initialize_bindings=()=>(D.__embind_initialize_bindings=Z.Da)();var Td=a=>(Td=Z.Ea)(a),Je=a=>(Je=Z.Fa)(a),Ab=D._pthread_self=()=>(Ab=D._pthread_self=Z.Ga)(),sb=a=>(sb=Z.Ha)(a);D.__emscripten_tls_init=()=>(D.__emscripten_tls_init=Z.Ia)();var bc=(a,b)=>(bc=Z.Ja)(a,b),rb=()=>(rb=Z.La)(),df=D.__emscripten_thread_init=(a,b,c,d,e,f)=>(df=D.__emscripten_thread_init=Z.Ma)(a,b,c,d,e,f); D.__emscripten_thread_crashed=()=>(D.__emscripten_thread_crashed=Z.Na)();var nb=(a,b,c,d,e)=>(nb=Z.Oa)(a,b,c,d,e),zb=a=>(zb=Z.Pa)(a),Fb=D.__emscripten_thread_exit=a=>(Fb=D.__emscripten_thread_exit=Z.Qa)(a),pe=()=>(pe=Z.Ra)(),mf=(a,b)=>(mf=Z.Sa)(a,b),ef=a=>(ef=Z.Ta)(a),Cb=(a,b)=>(Cb=Z.Ua)(a,b),jb=a=>(jb=Z.Va)(a),mb=a=>(mb=Z.Wa)(a),ib=()=>(ib=Z.Xa)();D.dynCall_ji=(a,b)=>(D.dynCall_ji=Z.Ya)(a,b);D.dynCall_jiji=(a,b,c,d,e)=>(D.dynCall_jiji=Z.Za)(a,b,c,d,e); -D.dynCall_viijii=(a,b,c,d,e,f,g)=>(D.dynCall_viijii=Z._a)(a,b,c,d,e,f,g);D.dynCall_iiiiij=(a,b,c,d,e,f,g)=>(D.dynCall_iiiiij=Z.$a)(a,b,c,d,e,f,g);D.dynCall_iiiiijj=(a,b,c,d,e,f,g,l,m)=>(D.dynCall_iiiiijj=Z.ab)(a,b,c,d,e,f,g,l,m);D.dynCall_iiiiiijj=(a,b,c,d,e,f,g,l,m,n)=>(D.dynCall_iiiiiijj=Z.bb)(a,b,c,d,e,f,g,l,m,n);D.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=95040;D.___start_em_js=338408;D.___stop_em_js=339401; +D.dynCall_viijii=(a,b,c,d,e,f,g)=>(D.dynCall_viijii=Z._a)(a,b,c,d,e,f,g);D.dynCall_iiiiij=(a,b,c,d,e,f,g)=>(D.dynCall_iiiiij=Z.$a)(a,b,c,d,e,f,g);D.dynCall_iiiiijj=(a,b,c,d,e,f,g,l,m)=>(D.dynCall_iiiiijj=Z.ab)(a,b,c,d,e,f,g,l,m);D.dynCall_iiiiiijj=(a,b,c,d,e,f,g,l,m,n)=>(D.dynCall_iiiiiijj=Z.bb)(a,b,c,d,e,f,g,l,m,n);D.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=95040;D.___start_em_js=338424;D.___stop_em_js=339417; function gf(a,b){var c=ib();try{P(a)(b)}catch(d){jb(c);if(d!==d+0)throw d;mf(1,0)}}function kf(a,b,c,d){var e=ib();try{P(a)(b,c,d)}catch(f){jb(e);if(f!==f+0)throw f;mf(1,0)}}function hf(a,b,c){var d=ib();try{P(a)(b,c)}catch(e){jb(d);if(e!==e+0)throw e;mf(1,0)}}function ff(a,b,c,d){var e=ib();try{return P(a)(b,c,d)}catch(f){jb(e);if(f!==f+0)throw f;mf(1,0)}}D.addRunDependency=Ua;D.removeRunDependency=Va;D.FS_createPath=Qc;D.FS_createLazyFile=Tc;D.FS_createDevice=Ma;D.wasmMemory=v; D.keepRuntimeAlive=()=>pb||0{aa=a;ba=b});k.Ob||(k.Ob=0);k.Ob++; k.ENVIRONMENT_IS_PTHREAD||k.$ww||function(a){function b(m,n,q){var p=new XMLHttpRequest;p.open("GET",m,!0);p.responseType="arraybuffer";p.onprogress=function(r){var h=n;r.total&&(h=r.total);if(r.loaded){p.rc?k.nb[m].loaded=r.loaded:(p.rc=!0,k.nb||(k.nb={}),k.nb[m]={loaded:r.loaded,total:h});var t=h=r=0,u;for(u in k.nb){var A=k.nb[u];r+=A.total;h+=A.loaded;t++}r=Math.ceil(r*k.Ob/t);k.setStatus&&k.setStatus(`Downloading data... (${h}/${r})`)}else!k.nb&&k.setStatus&&k.setStatus("Downloading data...")}; p.onerror=function(){throw Error("NetworkError for: "+m);};p.onload=function(){if(200==p.status||304==p.status||206==p.status||0==p.status&&p.response)q(p.response);else throw Error(p.statusText+" : "+p.responseURL);};p.send(null)}function c(m){console.error("package error:",m)}function d(){function m(r,h,t){this.start=r;this.end=h;this.audio=t}function n(r){if(!r)throw"Loading data file failed."+Error().stack;if(r.constructor.name!==ArrayBuffer.name)throw"bad input to processPackageData"+Error().stack; -r=new Uint8Array(r);m.prototype.vc=r;r=a.files;for(var h=0;h{throw b;},fa="object"==typeof window,ha="function"==typeof importScripts,ia="",ja,ka,la; if(fa||ha)ha?ia=self.location.href:"undefined"!=typeof document&&document.currentScript&&(ia=document.currentScript.src),_scriptDir&&(ia=_scriptDir),ia=ia.startsWith("blob:")?"":ia.substr(0,ia.replace(/[?#].*/,"").lastIndexOf("/")+1),ja=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ha&&(la=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ka=(a,b,c)=>{var d=new XMLHttpRequest;d.open("GET", a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var na=k.print||console.log.bind(console),v=k.printErr||console.error.bind(console);Object.assign(k,ca);ca=null;k.thisProgram&&(da=k.thisProgram);k.quit&&(ea=k.quit);var oa;k.wasmBinary&&(oa=k.wasmBinary);var pa,qa=!1,ra,w,x,y,sa,B,D,ta,ua; @@ -37,8 +37,8 @@ function va(){var a=pa.buffer;k.HEAP8=w=new Int8Array(a);k.HEAP16=y=new Int16Arr function Ca(){var a=k.preRun.shift();xa.unshift(a)}var Da=0,Ea=null,Fa=null;function Ga(){Da++;k.monitorRunDependencies?.(Da)}function Ha(){Da--;k.monitorRunDependencies?.(Da);if(0==Da&&(null!==Ea&&(clearInterval(Ea),Ea=null),Fa)){var a=Fa;Fa=null;a()}}function Ia(a){k.onAbort?.(a);a="Aborted("+a+")";v(a);qa=!0;ra=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Ja=a=>a.startsWith("data:application/octet-stream;base64,"),Ka;Ka="BlinkIDWasmSDK.wasm"; if(!Ja(Ka)){var La=Ka;Ka=k.locateFile?k.locateFile(La,ia):ia+La}function Ma(a){if(a==Ka&&oa)return new Uint8Array(oa);if(la)return la(a);throw"both async and sync fetching of the wasm failed";}function Na(a){return oa||!fa&&!ha||"function"!=typeof fetch?Promise.resolve().then(()=>Ma(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Ma(a))} function Oa(a,b,c){return Na(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{v(`failed to asynchronously prepare wasm: ${d}`);Ia(d)})}function Pa(a,b){var c=Ka;return oa||"function"!=typeof WebAssembly.instantiateStreaming||Ja(c)||"function"!=typeof fetch?Oa(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){v(`wasm streaming compile failed: ${e}`);v("falling back to ArrayBuffer instantiation");return Oa(c,a,b)}))} -var E,F,Qa={337685:a=>{a=a?G(x,a):"";throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},337821:(a,b,c,d)=>{a=a?G(x,a):"";b=b?G(x,b):"";c=c?G(x,c):"";d=d?G(x,d):"";throw Error(a+b+c+d);},338037:(a,b)=>{a=a?G(x,a):"";b=b?G(x,b):"";throw Error(a+b);},338147:()=>{throw Error("Ping Proxy permission not found in license!",{cause:"PERMISSION_NOT_GRANTED"});},338250:a=>{throw Error(a?G(x,a):"");},338293:()=>{throw Error("Unable to perform that operation while recognizer is in use!"); -},338376:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},338459:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},338542:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},338616:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},338690:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});}};function Ra(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} +var E,F,Qa={337669:a=>{a=a?G(x,a):"";throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},337805:(a,b,c,d)=>{a=a?G(x,a):"";b=b?G(x,b):"";c=c?G(x,c):"";d=d?G(x,d):"";throw Error(a+b+c+d);},338021:(a,b)=>{a=a?G(x,a):"";b=b?G(x,b):"";throw Error(a+b);},338131:()=>{throw Error("Ping Proxy permission not found in license!",{cause:"PERMISSION_NOT_GRANTED"});},338234:a=>{throw Error(a?G(x,a):"");},338277:()=>{throw Error("Unable to perform that operation while recognizer is in use!"); +},338360:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},338443:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},338526:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},338600:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},338674:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});}};function Ra(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} var Ta=a=>{for(;0>2];Wa+=4;return a} var Xa=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ya=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Xa(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Za=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.substr(0,b.length-1);return a+b},$a=a=>{if("/"=== a)return"/";a=Ya(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},ab=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);Ia("initRandomDevice")},bb=a=>(bb=ab())(a),cb=(...a)=>{for(var b="",c=!1,d=a.length-1;-1<=d&&!c;d--){c=0<=d?a[d]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=Xa(b.split("/").filter(e=>!!e),!c).join("/"); @@ -155,7 +155,7 @@ if(!n.Na.read)throw new L(28);var r="undefined"!=typeof q;if(!r)q=n.position;els 0>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)];B[e>>2]=F[0];B[e+4>>2]=F[1];f.Pb&&0===b&&0===d&&(f.Pb=null);return 0}catch(g){if("undefined"==typeof Q||"ErrnoError"!==g.name)throw g;return g.Xa}},y:function(a,b,c,d){try{a:{var e=Ob(a);a=b;for(var f,g=b=0;g>2],m=D[a+4>>2];a+=8;var n=dc(e,w,l,m,f);if(0>n){var q=-1;break a}b+=n;"undefined"!=typeof f&&(f+=n)}q=b}D[d>>2]=q;return 0}catch(p){if("undefined"==typeof Q||"ErrnoError"!==p.name)throw p;return p.Xa}}, da:function(){var a=stackTrace(),b=fb(a)+1,c=Pd(b);K(a,x,c,b);return c},ra:function(){var a=self.navigator.userAgent,b=fb(a)+1,c=Pd(b);K(a,x,c,b);return c},R:(a,b)=>{bb(x.subarray(a,a+b));return 0},N:ee,x:fe,O:ge,P:he,a:pa,ea:ae,T:(a,b,c,d)=>ae(a,b,c,d)},Z=function(){function a(c){Z=c.exports;Yc=Z.wa;ya.unshift(Z.sa);Ha("wasm-instantiate");return Z}var b={a:ie};Ga("wasm-instantiate");if(k.instantiateWasm)try{return k.instantiateWasm(b,a)}catch(c){v(`Module.instantiateWasm callback failed with error: ${c}`), ba(c)}Pa(b,function(c){a(c.instance)}).catch(ba);return{}}(),bd=a=>(bd=Z.ta)(a),cd=a=>(cd=Z.ua)(a),Pd=a=>(Pd=Z.va)(a),Rd=a=>(Rd=Z.xa)(a),Qd=()=>(Qd=Z.ya)(),nb=(a,b)=>(nb=Z.za)(a,b),je=(a,b)=>(je=Z.Aa)(a,b),de=a=>(de=Z.Ba)(a),ke=a=>(ke=Z.Ca)(a),le=()=>(le=Z.Da)();k.dynCall_ji=(a,b)=>(k.dynCall_ji=Z.Ea)(a,b);k.dynCall_jiji=(a,b,c,d,e)=>(k.dynCall_jiji=Z.Fa)(a,b,c,d,e);k.dynCall_viijii=(a,b,c,d,e,f,g)=>(k.dynCall_viijii=Z.Ga)(a,b,c,d,e,f,g); -k.dynCall_iiiiij=(a,b,c,d,e,f,g)=>(k.dynCall_iiiiij=Z.Ha)(a,b,c,d,e,f,g);k.dynCall_iiiiijj=(a,b,c,d,e,f,g,l,m)=>(k.dynCall_iiiiijj=Z.Ia)(a,b,c,d,e,f,g,l,m);k.dynCall_iiiiiijj=(a,b,c,d,e,f,g,l,m,n)=>(k.dynCall_iiiiiijj=Z.Ja)(a,b,c,d,e,f,g,l,m,n);k.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=1024;k.___start_em_js=336812;k.___stop_em_js=337685;function fe(a,b){var c=le();try{U(a)(b)}catch(d){ke(c);if(d!==d+0)throw d;je(1,0)}} +k.dynCall_iiiiij=(a,b,c,d,e,f,g)=>(k.dynCall_iiiiij=Z.Ha)(a,b,c,d,e,f,g);k.dynCall_iiiiijj=(a,b,c,d,e,f,g,l,m)=>(k.dynCall_iiiiijj=Z.Ia)(a,b,c,d,e,f,g,l,m);k.dynCall_iiiiiijj=(a,b,c,d,e,f,g,l,m,n)=>(k.dynCall_iiiiiijj=Z.Ja)(a,b,c,d,e,f,g,l,m,n);k.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=1024;k.___start_em_js=336796;k.___stop_em_js=337669;function fe(a,b){var c=le();try{U(a)(b)}catch(d){ke(c);if(d!==d+0)throw d;je(1,0)}} function he(a,b,c,d){var e=le();try{U(a)(b,c,d)}catch(f){ke(e);if(f!==f+0)throw f;je(1,0)}}function ge(a,b,c){var d=le();try{U(a)(b,c)}catch(e){ke(d);if(e!==e+0)throw e;je(1,0)}}function ee(a,b,c,d){var e=le();try{return U(a)(b,c,d)}catch(f){ke(e);if(f!==f+0)throw f;je(1,0)}}k.addRunDependency=Ga;k.removeRunDependency=Ha;k.FS_createPath=fc;k.FS_createLazyFile=jc;k.FS_createDevice=hc;k.FS_createPreloadedFile=yb;k.FS_createDataFile=xb;k.FS_unlink=Wb;var me;Fa=function ne(){me||oe();me||(Fa=ne)}; function oe(){function a(){if(!me&&(me=!0,k.calledRun=!0,!qa)){k.noFSInit||ec||(ec=!0,k.stdin=k.stdin,k.stdout=k.stdout,k.stderr=k.stderr,k.stdin?hc("/dev","stdin",k.stdin):Vb("/dev/tty","/dev/stdin"),k.stdout?hc("/dev","stdout",null,k.stdout):Vb("/dev/tty","/dev/stdout"),k.stderr?hc("/dev","stderr",null,k.stderr):Vb("/dev/tty1","/dev/stderr"),$b("/dev/stdin",0),$b("/dev/stdout",1),$b("/dev/stderr",1));Fb=!1;Ta(ya);aa(k);if(k.onRuntimeInitialized)k.onRuntimeInitialized();if(k.postRun)for("function"== typeof k.postRun&&(k.postRun=[k.postRun]);k.postRun.length;){var b=k.postRun.shift();Aa.unshift(b)}Ta(Aa)}}if(!(0{aa=a;ba=b});k.Mb||(k.Mb=0);k.Mb++; k.ENVIRONMENT_IS_PTHREAD||k.$ww||function(a){function b(m,n,q){var p=new XMLHttpRequest;p.open("GET",m,!0);p.responseType="arraybuffer";p.onprogress=function(r){var h=n;r.total&&(h=r.total);if(r.loaded){p.qc?k.mb[m].loaded=r.loaded:(p.qc=!0,k.mb||(k.mb={}),k.mb[m]={loaded:r.loaded,total:h});var t=h=r=0,u;for(u in k.mb){var A=k.mb[u];r+=A.total;h+=A.loaded;t++}r=Math.ceil(r*k.Mb/t);k.setStatus&&k.setStatus(`Downloading data... (${h}/${r})`)}else!k.mb&&k.setStatus&&k.setStatus("Downloading data...")}; p.onerror=function(){throw Error("NetworkError for: "+m);};p.onload=function(){if(200==p.status||304==p.status||206==p.status||0==p.status&&p.response)q(p.response);else throw Error(p.statusText+" : "+p.responseURL);};p.send(null)}function c(m){console.error("package error:",m)}function d(){function m(r,h,t){this.start=r;this.end=h;this.audio=t}function n(r){if(!r)throw"Loading data file failed."+Error().stack;if(r.constructor.name!==ArrayBuffer.name)throw"bad input to processPackageData"+Error().stack; -r=new Uint8Array(r);m.prototype.uc=r;r=a.files;for(var h=0;h{throw b;},fa="object"==typeof window,ha="function"==typeof importScripts,ia="",ja,ka,la; if(fa||ha)ha?ia=self.location.href:"undefined"!=typeof document&&document.currentScript&&(ia=document.currentScript.src),_scriptDir&&(ia=_scriptDir),ia=ia.startsWith("blob:")?"":ia.substr(0,ia.replace(/[?#].*/,"").lastIndexOf("/")+1),ja=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ha&&(la=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ka=(a,b,c)=>{var d=new XMLHttpRequest;d.open("GET", a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var na=k.print||console.log.bind(console),v=k.printErr||console.error.bind(console);Object.assign(k,ca);ca=null;k.thisProgram&&(da=k.thisProgram);k.quit&&(ea=k.quit);var oa;k.wasmBinary&&(oa=k.wasmBinary);var pa,qa=!1,ra,w,x,y,sa,B,D,ta,ua; @@ -37,8 +37,8 @@ function va(){var a=pa.buffer;k.HEAP8=w=new Int8Array(a);k.HEAP16=y=new Int16Arr function Ca(){var a=k.preRun.shift();xa.unshift(a)}var Da=0,Ea=null,Fa=null;function Ga(){Da++;k.monitorRunDependencies?.(Da)}function Ha(){Da--;k.monitorRunDependencies?.(Da);if(0==Da&&(null!==Ea&&(clearInterval(Ea),Ea=null),Fa)){var a=Fa;Fa=null;a()}}function Ia(a){k.onAbort?.(a);a="Aborted("+a+")";v(a);qa=!0;ra=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Ja=a=>a.startsWith("data:application/octet-stream;base64,"),Ka;Ka="BlinkIDWasmSDK.wasm"; if(!Ja(Ka)){var La=Ka;Ka=k.locateFile?k.locateFile(La,ia):ia+La}function Ma(a){if(a==Ka&&oa)return new Uint8Array(oa);if(la)return la(a);throw"both async and sync fetching of the wasm failed";}function Na(a){return oa||!fa&&!ha||"function"!=typeof fetch?Promise.resolve().then(()=>Ma(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Ma(a))} function Oa(a,b,c){return Na(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{v(`failed to asynchronously prepare wasm: ${d}`);Ia(d)})}function Pa(a,b){var c=Ka;return oa||"function"!=typeof WebAssembly.instantiateStreaming||Ja(c)||"function"!=typeof fetch?Oa(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){v(`wasm streaming compile failed: ${e}`);v("falling back to ArrayBuffer instantiation");return Oa(c,a,b)}))} -var E,F,Qa={337219:a=>{a=a?G(x,a):"";throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},337355:(a,b,c,d)=>{a=a?G(x,a):"";b=b?G(x,b):"";c=c?G(x,c):"";d=d?G(x,d):"";throw Error(a+b+c+d);},337571:(a,b)=>{a=a?G(x,a):"";b=b?G(x,b):"";throw Error(a+b);},337681:()=>{throw Error("Ping Proxy permission not found in license!",{cause:"PERMISSION_NOT_GRANTED"});},337784:a=>{throw Error(a?G(x,a):"");},337827:()=>{throw Error("Unable to perform that operation while recognizer is in use!"); -},337910:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},337993:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},338076:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},338150:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},338224:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});}};function Ra(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} +var E,F,Qa={337235:a=>{a=a?G(x,a):"";throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},337371:(a,b,c,d)=>{a=a?G(x,a):"";b=b?G(x,b):"";c=c?G(x,c):"";d=d?G(x,d):"";throw Error(a+b+c+d);},337587:(a,b)=>{a=a?G(x,a):"";b=b?G(x,b):"";throw Error(a+b);},337697:()=>{throw Error("Ping Proxy permission not found in license!",{cause:"PERMISSION_NOT_GRANTED"});},337800:a=>{throw Error(a?G(x,a):"");},337843:()=>{throw Error("Unable to perform that operation while recognizer is in use!"); +},337926:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},338009:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},338092:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},338166:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},338240:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});}};function Ra(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} var Ta=a=>{for(;0>2];Wa+=4;return a} var Xa=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ya=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Xa(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Za=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.substr(0,b.length-1);return a+b},$a=a=>{if("/"=== a)return"/";a=Ya(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},ab=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);Ia("initRandomDevice")},bb=a=>(bb=ab())(a),cb=(...a)=>{for(var b="",c=!1,d=a.length-1;-1<=d&&!c;d--){c=0<=d?a[d]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=Xa(b.split("/").filter(e=>!!e),!c).join("/"); @@ -155,7 +155,7 @@ typeof Q||"ErrnoError"!==A.name)throw A;return A.Wa}},K:function(a,b,c,d,e){b=c+ g=b=0;g>2],m=D[a+4>>2];a+=8;var n=dc(e,w,l,m,f);if(0>n){var q=-1;break a}b+=n;"undefined"!=typeof f&&(f+=n)}q=b}D[d>>2]=q;return 0}catch(p){if("undefined"==typeof Q||"ErrnoError"!==p.name)throw p;return p.Wa}},ca:function(){var a=stackTrace(),b=fb(a)+1,c=Pd(b);K(a,x,c,b);return c},qa:function(){var a=self.navigator.userAgent,b=fb(a)+1,c=Pd(b);K(a,x,c,b);return c},Q:(a,b)=>{bb(x.subarray(a,a+b));return 0},M:ee,x:fe,N:ge,O:he,a:pa,da:ae,S:(a,b,c,d)=>ae(a,b,c,d)},Z=function(){function a(c){Z= c.exports;Yc=Z.va;ya.unshift(Z.ra);Ha("wasm-instantiate");return Z}var b={a:ie};Ga("wasm-instantiate");if(k.instantiateWasm)try{return k.instantiateWasm(b,a)}catch(c){v(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Pa(b,function(c){a(c.instance)}).catch(ba);return{}}(),bd=a=>(bd=Z.sa)(a),cd=a=>(cd=Z.ta)(a),Pd=a=>(Pd=Z.ua)(a),Rd=a=>(Rd=Z.wa)(a),Qd=()=>(Qd=Z.xa)(),nb=(a,b)=>(nb=Z.ya)(a,b),je=(a,b)=>(je=Z.za)(a,b),de=a=>(de=Z.Aa)(a),ke=a=>(ke=Z.Ba)(a),le=()=>(le=Z.Ca)(); k.dynCall_ji=(a,b)=>(k.dynCall_ji=Z.Da)(a,b);k.dynCall_jiji=(a,b,c,d,e)=>(k.dynCall_jiji=Z.Ea)(a,b,c,d,e);k.dynCall_viijii=(a,b,c,d,e,f,g)=>(k.dynCall_viijii=Z.Fa)(a,b,c,d,e,f,g);k.dynCall_iiiiij=(a,b,c,d,e,f,g)=>(k.dynCall_iiiiij=Z.Ga)(a,b,c,d,e,f,g);k.dynCall_iiiiijj=(a,b,c,d,e,f,g,l,m)=>(k.dynCall_iiiiijj=Z.Ha)(a,b,c,d,e,f,g,l,m);k.dynCall_iiiiiijj=(a,b,c,d,e,f,g,l,m,n)=>(k.dynCall_iiiiiijj=Z.Ia)(a,b,c,d,e,f,g,l,m,n);k.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=1024; -k.___start_em_js=336796;k.___stop_em_js=337219;function fe(a,b){var c=le();try{V(a)(b)}catch(d){ke(c);if(d!==d+0)throw d;je(1,0)}}function he(a,b,c,d){var e=le();try{V(a)(b,c,d)}catch(f){ke(e);if(f!==f+0)throw f;je(1,0)}}function ge(a,b,c){var d=le();try{V(a)(b,c)}catch(e){ke(d);if(e!==e+0)throw e;je(1,0)}}function ee(a,b,c,d){var e=le();try{return V(a)(b,c,d)}catch(f){ke(e);if(f!==f+0)throw f;je(1,0)}}k.addRunDependency=Ga;k.removeRunDependency=Ha;k.FS_createPath=fc;k.FS_createLazyFile=jc; +k.___start_em_js=336812;k.___stop_em_js=337235;function fe(a,b){var c=le();try{V(a)(b)}catch(d){ke(c);if(d!==d+0)throw d;je(1,0)}}function he(a,b,c,d){var e=le();try{V(a)(b,c,d)}catch(f){ke(e);if(f!==f+0)throw f;je(1,0)}}function ge(a,b,c){var d=le();try{V(a)(b,c)}catch(e){ke(d);if(e!==e+0)throw e;je(1,0)}}function ee(a,b,c,d){var e=le();try{return V(a)(b,c,d)}catch(f){ke(e);if(f!==f+0)throw f;je(1,0)}}k.addRunDependency=Ga;k.removeRunDependency=Ha;k.FS_createPath=fc;k.FS_createLazyFile=jc; k.FS_createDevice=hc;k.FS_createPreloadedFile=yb;k.FS_createDataFile=xb;k.FS_unlink=Wb;var me;Fa=function ne(){me||oe();me||(Fa=ne)}; function oe(){function a(){if(!me&&(me=!0,k.calledRun=!0,!qa)){k.noFSInit||ec||(ec=!0,k.stdin=k.stdin,k.stdout=k.stdout,k.stderr=k.stderr,k.stdin?hc("/dev","stdin",k.stdin):Vb("/dev/tty","/dev/stdin"),k.stdout?hc("/dev","stdout",null,k.stdout):Vb("/dev/tty","/dev/stdout"),k.stderr?hc("/dev","stderr",null,k.stderr):Vb("/dev/tty1","/dev/stderr"),$b("/dev/stdin",0),$b("/dev/stdout",1),$b("/dev/stderr",1));Fb=!1;Ta(ya);aa(k);if(k.onRuntimeInitialized)k.onRuntimeInitialized();if(k.postRun)for("function"== typeof k.postRun&&(k.postRun=[k.postRun]);k.postRun.length;){var b=k.postRun.shift();Aa.unshift(b)}Ta(Aa)}}if(!(0{la=a;ma=b});D.mc||(D.mc=0);D.mc++; D.ENVIRONMENT_IS_PTHREAD||D.$ww||function(a){function b(m,n,q){var p=new XMLHttpRequest;p.open("GET",m,!0);p.responseType="arraybuffer";p.onprogress=function(r){var k=n;r.total&&(k=r.total);if(r.loaded){p.Uc?D.Kb[m].loaded=r.loaded:(p.Uc=!0,D.Kb||(D.Kb={}),D.Kb[m]={loaded:r.loaded,total:k});var t=k=r=0,u;for(u in D.Kb){var z=D.Kb[u];r+=z.total;k+=z.loaded;t++}r=Math.ceil(r*D.mc/t);D.setStatus&&D.setStatus(`Downloading data... (${k}/${r})`)}else!D.Kb&&D.setStatus&&D.setStatus("Downloading data...")}; p.onerror=function(){throw Error("NetworkError for: "+m);};p.onload=function(){if(200==p.status||304==p.status||206==p.status||0==p.status&&p.response)q(p.response);else throw Error(p.statusText+" : "+p.responseURL);};p.send(null)}function c(m){console.error("package error:",m)}function d(){function m(r,k,t){this.start=r;this.end=k;this.audio=t}function n(r){if(!r)throw"Loading data file failed."+Error().stack;if(r.constructor.name!==ArrayBuffer.name)throw"bad input to processPackageData"+Error().stack; -r=new Uint8Array(r);m.prototype.Zc=r;r=a.files;for(var k=0;k{aa=a;ba=b});k.Ob||(k.Ob=0);k.Ob++; k.ENVIRONMENT_IS_PTHREAD||k.$ww||function(a){function b(m,n,q){var p=new XMLHttpRequest;p.open("GET",m,!0);p.responseType="arraybuffer";p.onprogress=function(r){var h=n;r.total&&(h=r.total);if(r.loaded){p.rc?k.nb[m].loaded=r.loaded:(p.rc=!0,k.nb||(k.nb={}),k.nb[m]={loaded:r.loaded,total:h});var t=h=r=0,u;for(u in k.nb){var A=k.nb[u];r+=A.total;h+=A.loaded;t++}r=Math.ceil(r*k.Ob/t);k.setStatus&&k.setStatus(`Downloading data... (${h}/${r})`)}else!k.nb&&k.setStatus&&k.setStatus("Downloading data...")}; p.onerror=function(){throw Error("NetworkError for: "+m);};p.onload=function(){if(200==p.status||304==p.status||206==p.status||0==p.status&&p.response)q(p.response);else throw Error(p.statusText+" : "+p.responseURL);};p.send(null)}function c(m){console.error("package error:",m)}function d(){function m(r,h,t){this.start=r;this.end=h;this.audio=t}function n(r){if(!r)throw"Loading data file failed."+Error().stack;if(r.constructor.name!==ArrayBuffer.name)throw"bad input to processPackageData"+Error().stack; -r=new Uint8Array(r);m.prototype.vc=r;r=a.files;for(var h=0;h{throw b;},fa="object"==typeof window,ha="function"==typeof importScripts,ia="",ja,ka,la; +r=new Uint8Array(r);m.prototype.vc=r;r=a.files;for(var h=0;h{throw b;},fa="object"==typeof window,ha="function"==typeof importScripts,ia="",ja,ka,la; if(fa||ha)ha?ia=self.location.href:"undefined"!=typeof document&&document.currentScript&&(ia=document.currentScript.src),_scriptDir&&(ia=_scriptDir),ia=ia.startsWith("blob:")?"":ia.substr(0,ia.replace(/[?#].*/,"").lastIndexOf("/")+1),ja=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ha&&(la=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ka=(a,b,c)=>{var d=new XMLHttpRequest;d.open("GET", a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var na=k.print||console.log.bind(console),v=k.printErr||console.error.bind(console);Object.assign(k,ca);ca=null;k.thisProgram&&(da=k.thisProgram);k.quit&&(ea=k.quit);var oa;k.wasmBinary&&(oa=k.wasmBinary);var pa,qa=!1,ra,w,x,y,sa,B,D,ta,ua; function va(){var a=pa.buffer;k.HEAP8=w=new Int8Array(a);k.HEAP16=y=new Int16Array(a);k.HEAPU8=x=new Uint8Array(a);k.HEAPU16=sa=new Uint16Array(a);k.HEAP32=B=new Int32Array(a);k.HEAPU32=D=new Uint32Array(a);k.HEAPF32=ta=new Float32Array(a);k.HEAPF64=ua=new Float64Array(a)}var wa=k.INITIAL_MEMORY||209715200;pa=k.wasmMemory?k.wasmMemory:new WebAssembly.Memory({initial:wa/65536,maximum:32768});va();wa=pa.buffer.byteLength;var xa=[],ya=[],za=[],Aa=[],Ba=!1; diff --git a/resources/lightweight/advanced/BlinkIDWasmSDK.wasm b/resources/lightweight/advanced/BlinkIDWasmSDK.wasm index 399d576..823b3b8 100755 Binary files a/resources/lightweight/advanced/BlinkIDWasmSDK.wasm and b/resources/lightweight/advanced/BlinkIDWasmSDK.wasm differ diff --git a/resources/lightweight/basic/BlinkIDWasmSDK.js b/resources/lightweight/basic/BlinkIDWasmSDK.js index caf34ca..aeddf7a 100644 --- a/resources/lightweight/basic/BlinkIDWasmSDK.js +++ b/resources/lightweight/basic/BlinkIDWasmSDK.js @@ -22,23 +22,23 @@ function(moduleArg = {}) { var k=moduleArg,aa,ba,readyPromise=new Promise((a,b)=>{aa=a;ba=b});k.Mb||(k.Mb=0);k.Mb++; k.ENVIRONMENT_IS_PTHREAD||k.$ww||function(a){function b(m,n,q){var p=new XMLHttpRequest;p.open("GET",m,!0);p.responseType="arraybuffer";p.onprogress=function(r){var h=n;r.total&&(h=r.total);if(r.loaded){p.qc?k.mb[m].loaded=r.loaded:(p.qc=!0,k.mb||(k.mb={}),k.mb[m]={loaded:r.loaded,total:h});var t=h=r=0,u;for(u in k.mb){var A=k.mb[u];r+=A.total;h+=A.loaded;t++}r=Math.ceil(r*k.Mb/t);k.setStatus&&k.setStatus(`Downloading data... (${h}/${r})`)}else!k.mb&&k.setStatus&&k.setStatus("Downloading data...")}; p.onerror=function(){throw Error("NetworkError for: "+m);};p.onload=function(){if(200==p.status||304==p.status||206==p.status||0==p.status&&p.response)q(p.response);else throw Error(p.statusText+" : "+p.responseURL);};p.send(null)}function c(m){console.error("package error:",m)}function d(){function m(r,h,t){this.start=r;this.end=h;this.audio=t}function n(r){if(!r)throw"Loading data file failed."+Error().stack;if(r.constructor.name!==ArrayBuffer.name)throw"bad input to processPackageData"+Error().stack; -r=new Uint8Array(r);m.prototype.uc=r;r=a.files;for(var h=0;h{throw b;},fa="object"==typeof window,ha="function"==typeof importScripts,ia="",ja,ka,la; +r=new Uint8Array(r);m.prototype.uc=r;r=a.files;for(var h=0;h{throw b;},fa="object"==typeof window,ha="function"==typeof importScripts,ia="",ja,ka,la; if(fa||ha)ha?ia=self.location.href:"undefined"!=typeof document&&document.currentScript&&(ia=document.currentScript.src),_scriptDir&&(ia=_scriptDir),ia=ia.startsWith("blob:")?"":ia.substr(0,ia.replace(/[?#].*/,"").lastIndexOf("/")+1),ja=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ha&&(la=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ka=(a,b,c)=>{var d=new XMLHttpRequest;d.open("GET", a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var na=k.print||console.log.bind(console),v=k.printErr||console.error.bind(console);Object.assign(k,ca);ca=null;k.thisProgram&&(da=k.thisProgram);k.quit&&(ea=k.quit);var oa;k.wasmBinary&&(oa=k.wasmBinary);var pa,qa=!1,ra,w,x,y,sa,B,D,ta,ua; function va(){var a=pa.buffer;k.HEAP8=w=new Int8Array(a);k.HEAP16=y=new Int16Array(a);k.HEAPU8=x=new Uint8Array(a);k.HEAPU16=sa=new Uint16Array(a);k.HEAP32=B=new Int32Array(a);k.HEAPU32=D=new Uint32Array(a);k.HEAPF32=ta=new Float32Array(a);k.HEAPF64=ua=new Float64Array(a)}var wa=k.INITIAL_MEMORY||209715200;pa=k.wasmMemory?k.wasmMemory:new WebAssembly.Memory({initial:wa/65536,maximum:32768});va();wa=pa.buffer.byteLength;var xa=[],ya=[],za=[],Aa=[],Ba=!1; function Ca(){var a=k.preRun.shift();xa.unshift(a)}var Da=0,Ea=null,Fa=null;function Ga(){Da++;k.monitorRunDependencies?.(Da)}function Ha(){Da--;k.monitorRunDependencies?.(Da);if(0==Da&&(null!==Ea&&(clearInterval(Ea),Ea=null),Fa)){var a=Fa;Fa=null;a()}}function Ia(a){k.onAbort?.(a);a="Aborted("+a+")";v(a);qa=!0;ra=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Ja=a=>a.startsWith("data:application/octet-stream;base64,"),Ka;Ka="BlinkIDWasmSDK.wasm"; if(!Ja(Ka)){var La=Ka;Ka=k.locateFile?k.locateFile(La,ia):ia+La}function Ma(a){if(a==Ka&&oa)return new Uint8Array(oa);if(la)return la(a);throw"both async and sync fetching of the wasm failed";}function Na(a){return oa||!fa&&!ha||"function"!=typeof fetch?Promise.resolve().then(()=>Ma(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Ma(a))} function Oa(a,b,c){return Na(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{v(`failed to asynchronously prepare wasm: ${d}`);Ia(d)})}function Pa(a,b){var c=Ka;return oa||"function"!=typeof WebAssembly.instantiateStreaming||Ja(c)||"function"!=typeof fetch?Oa(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){v(`wasm streaming compile failed: ${e}`);v("falling back to ArrayBuffer instantiation");return Oa(c,a,b)}))} -var E,F,Qa={347363:a=>{a=a?G(x,a):"";throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},347499:(a,b,c,d)=>{a=a?G(x,a):"";b=b?G(x,b):"";c=c?G(x,c):"";d=d?G(x,d):"";throw Error(a+b+c+d);},347715:(a,b)=>{a=a?G(x,a):"";b=b?G(x,b):"";throw Error(a+b);},347825:()=>{throw Error("Ping Proxy permission not found in license!",{cause:"PERMISSION_NOT_GRANTED"});},347928:a=>{throw Error(a?G(x,a):"");},347971:()=>{throw Error("Unable to perform that operation while recognizer is in use!"); -},348054:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},348137:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},348220:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},348294:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},348368:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});}};function Ra(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} +var E,F,Qa={347347:a=>{a=a?G(x,a):"";throw Error("Failed to reconfigure RecognizerRunner due to following error: "+a);},347483:(a,b,c,d)=>{a=a?G(x,a):"";b=b?G(x,b):"";c=c?G(x,c):"";d=d?G(x,d):"";throw Error(a+b+c+d);},347699:(a,b)=>{a=a?G(x,a):"";b=b?G(x,b):"";throw Error(a+b);},347809:()=>{throw Error("Ping Proxy permission not found in license!",{cause:"PERMISSION_NOT_GRANTED"});},347912:a=>{throw Error(a?G(x,a):"");},347955:()=>{throw Error("Unable to perform that operation while recognizer is in use!"); +},348038:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},348121:()=>{throw Error("Unable to perform that operation while recognizer is in use!");},348204:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},348278:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});},348352:(a,b)=>{throw Error(a?G(x,a):"",{cause:b?G(x,b):""});}};function Ra(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a} var Ta=a=>{for(;0>2];Wa+=4;return a} var Xa=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ya=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Xa(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Za=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.substr(0,b.length-1);return a+b},$a=a=>{if("/"=== a)return"/";a=Ya(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},ab=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);Ia("initRandomDevice")},bb=a=>(bb=ab())(a),cb=(...a)=>{for(var b="",c=!1,d=a.length-1;-1<=d&&!c;d--){c=0<=d?a[d]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=Xa(b.split("/").filter(e=>!!e),!c).join("/"); @@ -155,7 +155,7 @@ typeof Q||"ErrnoError"!==A.name)throw A;return A.Wa}},K:function(a,b,c,d,e){b=c+ g=b=0;g>2],m=D[a+4>>2];a+=8;var n=dc(e,w,l,m,f);if(0>n){var q=-1;break a}b+=n;"undefined"!=typeof f&&(f+=n)}q=b}D[d>>2]=q;return 0}catch(p){if("undefined"==typeof Q||"ErrnoError"!==p.name)throw p;return p.Wa}},ca:function(){var a=stackTrace(),b=fb(a)+1,c=Pd(b);K(a,x,c,b);return c},qa:function(){var a=self.navigator.userAgent,b=fb(a)+1,c=Pd(b);K(a,x,c,b);return c},Q:(a,b)=>{bb(x.subarray(a,a+b));return 0},M:ee,y:fe,N:ge,O:he,a:pa,da:ae,S:(a,b,c,d)=>ae(a,b,c,d)},Z=function(){function a(c){Z= c.exports;Yc=Z.va;ya.unshift(Z.ra);Ha("wasm-instantiate");return Z}var b={a:ie};Ga("wasm-instantiate");if(k.instantiateWasm)try{return k.instantiateWasm(b,a)}catch(c){v(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Pa(b,function(c){a(c.instance)}).catch(ba);return{}}(),bd=a=>(bd=Z.sa)(a),cd=a=>(cd=Z.ta)(a),Pd=a=>(Pd=Z.ua)(a),Rd=a=>(Rd=Z.wa)(a),Qd=()=>(Qd=Z.xa)(),nb=(a,b)=>(nb=Z.ya)(a,b),je=(a,b)=>(je=Z.za)(a,b),de=a=>(de=Z.Aa)(a),ke=a=>(ke=Z.Ba)(a),le=()=>(le=Z.Ca)(); k.dynCall_ji=(a,b)=>(k.dynCall_ji=Z.Da)(a,b);k.dynCall_jiji=(a,b,c,d,e)=>(k.dynCall_jiji=Z.Ea)(a,b,c,d,e);k.dynCall_viijii=(a,b,c,d,e,f,g)=>(k.dynCall_viijii=Z.Fa)(a,b,c,d,e,f,g);k.dynCall_iiiiij=(a,b,c,d,e,f,g)=>(k.dynCall_iiiiij=Z.Ga)(a,b,c,d,e,f,g);k.dynCall_iiiiijj=(a,b,c,d,e,f,g,l,m)=>(k.dynCall_iiiiijj=Z.Ha)(a,b,c,d,e,f,g,l,m);k.dynCall_iiiiiijj=(a,b,c,d,e,f,g,l,m,n)=>(k.dynCall_iiiiiijj=Z.Ia)(a,b,c,d,e,f,g,l,m,n);k.__ZN2MB2NN28LinearDefragmentingAllocator10Allocation4nullE=1024; -k.___start_em_js=346940;k.___stop_em_js=347363;function fe(a,b){var c=le();try{V(a)(b)}catch(d){ke(c);if(d!==d+0)throw d;je(1,0)}}function he(a,b,c,d){var e=le();try{V(a)(b,c,d)}catch(f){ke(e);if(f!==f+0)throw f;je(1,0)}}function ge(a,b,c){var d=le();try{V(a)(b,c)}catch(e){ke(d);if(e!==e+0)throw e;je(1,0)}}function ee(a,b,c,d){var e=le();try{return V(a)(b,c,d)}catch(f){ke(e);if(f!==f+0)throw f;je(1,0)}}k.addRunDependency=Ga;k.removeRunDependency=Ha;k.FS_createPath=fc;k.FS_createLazyFile=jc; +k.___start_em_js=346924;k.___stop_em_js=347347;function fe(a,b){var c=le();try{V(a)(b)}catch(d){ke(c);if(d!==d+0)throw d;je(1,0)}}function he(a,b,c,d){var e=le();try{V(a)(b,c,d)}catch(f){ke(e);if(f!==f+0)throw f;je(1,0)}}function ge(a,b,c){var d=le();try{V(a)(b,c)}catch(e){ke(d);if(e!==e+0)throw e;je(1,0)}}function ee(a,b,c,d){var e=le();try{return V(a)(b,c,d)}catch(f){ke(e);if(f!==f+0)throw f;je(1,0)}}k.addRunDependency=Ga;k.removeRunDependency=Ha;k.FS_createPath=fc;k.FS_createLazyFile=jc; k.FS_createDevice=hc;k.FS_createPreloadedFile=yb;k.FS_createDataFile=xb;k.FS_unlink=Wb;var me;Fa=function ne(){me||oe();me||(Fa=ne)}; function oe(){function a(){if(!me&&(me=!0,k.calledRun=!0,!qa)){k.noFSInit||ec||(ec=!0,k.stdin=k.stdin,k.stdout=k.stdout,k.stderr=k.stderr,k.stdin?hc("/dev","stdin",k.stdin):Vb("/dev/tty","/dev/stdin"),k.stdout?hc("/dev","stdout",null,k.stdout):Vb("/dev/tty","/dev/stdout"),k.stderr?hc("/dev","stderr",null,k.stderr):Vb("/dev/tty1","/dev/stderr"),$b("/dev/stdin",0),$b("/dev/stdout",1),$b("/dev/stderr",1));Fb=!1;Ta(ya);aa(k);if(k.onRuntimeInitialized)k.onRuntimeInitialized();if(k.postRun)for("function"== typeof k.postRun&&(k.postRun=[k.postRun]);k.postRun.length;){var b=k.postRun.shift();Aa.unshift(b)}Ta(Aa)}}if(!(0 - + +