sonic-widget 2.9.9 → 2.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,86 +1,86 @@
1
- const CACHE_NAME = 'ai-ml-cache-v1';
2
- const urlsToCache = [
3
- // coco ssd
4
- // 'https://storage.googleapis.com/tfjs-models/savedmodel/ssdlite_mobilenet_v2/model.json',
5
- "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/model.json",
6
- "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard1of5",
7
- "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard2of5",
8
- "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard3of5",
9
- "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard4of5",
10
- "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard5of5",
11
- // document model
12
- // "./models/BKRDocumentModel/model.json",
13
- // "./models/BKRDocumentModel/metadata.json",
14
- // "./models/BKRDocumentModel/weights.bin",
15
- "./models/RFNDocumentModel/model.json",
16
- "./models/RFNDocumentModel/metadata.json",
17
- "./models/RFNDocumentModel/weights.bin",
18
-
19
- // mask model
20
- // "./models/BKRMaskModel/model.json",
21
- // "./models/BKRMaskModel/metadata.json",
22
- // "./models/BKRMaskModel/weights.bin",
23
- "./models/RFNMaskModel/model.json",
24
- "./models/RFNMaskModel/metadata.json",
25
- "./models/RFNMaskModel/weights.bin",
26
-
27
- // tasks-vision model
28
- // "./models/TasksVision/wasm/vision_wasm_internal.js",
29
- // "./models/TasksVision/wasm/vision_wasm_internal.wasm",
30
- // "./models/TasksVision/wasm/vision_wasm_nosimd_internal.js",
31
- // "./models/TasksVision/wasm/vision_wasm_nosimd_internal.wasm",
32
- "./models/TasksVision/face/float16/face_landmarker.task",
33
- "./models/TasksVision/hand/float16/hand_landmarker.task",
34
- // "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",
35
- // "https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task"
36
- // Add more model files if necessary
37
- ];
38
-
39
- self.addEventListener('install', function(event) {
40
- // Perform install steps
41
- event.waitUntil(
42
- caches.open(CACHE_NAME)
43
- .then(function(cache) {
44
- console.log('Opened cache');
45
- return cache.addAll(urlsToCache);
46
- })
47
- );
48
- });
49
-
50
- self.addEventListener('fetch', function(event) {
51
- const request = event.request;
52
- // Skip caching for requests from browser extensions
53
- if (request.url.startsWith('chrome-extension://')) {
54
- return;
55
- }
56
- event.respondWith(
57
- caches.match(event.request)
58
- .then(function(response) {
59
- // Cache hit - return response
60
- if (response) {
61
- return response;
62
- }
63
- // Clone the request
64
- var fetchRequest = event.request.clone();
65
-
66
- return fetch(fetchRequest).then(
67
- function(response) {
68
- // Check if we received a valid response
69
- if(!response || response.status !== 200 || response.type !== 'basic') {
70
- return response;
71
- }
72
-
73
- // Clone the response
74
- var responseToCache = response.clone();
75
-
76
- caches.open(CACHE_NAME)
77
- .then(function(cache) {
78
- cache.put(event.request, responseToCache);
79
- });
80
-
81
- return response;
82
- }
83
- );
84
- })
85
- );
1
+ const CACHE_NAME = 'ai-ml-cache-v1';
2
+ const urlsToCache = [
3
+ // coco ssd
4
+ // 'https://storage.googleapis.com/tfjs-models/savedmodel/ssdlite_mobilenet_v2/model.json',
5
+ "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/model.json",
6
+ "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard1of5",
7
+ "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard2of5",
8
+ "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard3of5",
9
+ "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard4of5",
10
+ "./models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard5of5",
11
+ // document model
12
+ // "./models/BKRDocumentModel/model.json",
13
+ // "./models/BKRDocumentModel/metadata.json",
14
+ // "./models/BKRDocumentModel/weights.bin",
15
+ "./models/RFNDocumentModel/model.json",
16
+ "./models/RFNDocumentModel/metadata.json",
17
+ "./models/RFNDocumentModel/weights.bin",
18
+
19
+ // mask model
20
+ // "./models/BKRMaskModel/model.json",
21
+ // "./models/BKRMaskModel/metadata.json",
22
+ // "./models/BKRMaskModel/weights.bin",
23
+ "./models/RFNMaskModel/model.json",
24
+ "./models/RFNMaskModel/metadata.json",
25
+ "./models/RFNMaskModel/weights.bin",
26
+
27
+ // tasks-vision model
28
+ // "./models/TasksVision/wasm/vision_wasm_internal.js",
29
+ // "./models/TasksVision/wasm/vision_wasm_internal.wasm",
30
+ // "./models/TasksVision/wasm/vision_wasm_nosimd_internal.js",
31
+ // "./models/TasksVision/wasm/vision_wasm_nosimd_internal.wasm",
32
+ "./models/TasksVision/face/float16/face_landmarker.task",
33
+ "./models/TasksVision/hand/float16/hand_landmarker.task",
34
+ // "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",
35
+ // "https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task"
36
+ // Add more model files if necessary
37
+ ];
38
+
39
+ self.addEventListener('install', function(event) {
40
+ // Perform install steps
41
+ event.waitUntil(
42
+ caches.open(CACHE_NAME)
43
+ .then(function(cache) {
44
+ console.log('Opened cache');
45
+ return cache.addAll(urlsToCache);
46
+ })
47
+ );
48
+ });
49
+
50
+ self.addEventListener('fetch', function(event) {
51
+ const request = event.request;
52
+ // Skip caching for requests from browser extensions
53
+ if (request.url.startsWith('chrome-extension://')) {
54
+ return;
55
+ }
56
+ event.respondWith(
57
+ caches.match(event.request)
58
+ .then(function(response) {
59
+ // Cache hit - return response
60
+ if (response) {
61
+ return response;
62
+ }
63
+ // Clone the request
64
+ var fetchRequest = event.request.clone();
65
+
66
+ return fetch(fetchRequest).then(
67
+ function(response) {
68
+ // Check if we received a valid response
69
+ if(!response || response.status !== 200 || response.type !== 'basic') {
70
+ return response;
71
+ }
72
+
73
+ // Clone the response
74
+ var responseToCache = response.clone();
75
+
76
+ caches.open(CACHE_NAME)
77
+ .then(function(cache) {
78
+ cache.put(event.request, responseToCache);
79
+ });
80
+
81
+ return response;
82
+ }
83
+ );
84
+ })
85
+ );
86
86
  });
package/package.json CHANGED
@@ -1,53 +1,53 @@
1
- {
2
- "name": "sonic-widget",
3
- "version": "2.9.9",
4
- "description": "Sonic widget library for doing E-KYC",
5
- "main": "dist/index.js",
6
- "type": "module",
7
- "files": [
8
- "dist"
9
- ],
10
- "author": "Shankaresh",
11
- "license": "MIT",
12
- "scripts": {
13
- "dev": "vite",
14
- "build": "vite build",
15
- "preview": "vite preview"
16
- },
17
- "dependencies": {
18
- "@emotion/react": "^11.10.4",
19
- "@emotion/styled": "^11.10.4",
20
- "@fingerprintjs/fingerprintjs": "3.4.1",
21
- "@mediapipe/tasks-vision": "^0.10.12",
22
- "@mui/icons-material": "^5.14.1",
23
- "@mui/lab": "^5.0.0-alpha.128",
24
- "@mui/material": "^5.14.2",
25
- "@teachablemachine/image": "^0.8.5",
26
- "@tensorflow-models/coco-ssd": "^2.2.3",
27
- "@tensorflow/tfjs": "^4.15.0",
28
- "axios": "^1.8.4",
29
- "moment": "^2.30.1",
30
- "prop-types": "^15.8.1",
31
- "public-ip": "^6.0.1",
32
- "react": "^18.2.0",
33
- "react-cropper": "^2.3.3",
34
- "react-device-detect": "^2.2.3",
35
- "react-dom": "^18.2.0",
36
- "react-internet-meter": "^1.1.1",
37
- "react-player": "^2.12.0",
38
- "react-router-dom": "^6.14.2",
39
- "react-speech-recognition": "^3.10.0",
40
- "react-webcam": "^7.0.1",
41
- "recaptcha-v3": "^1.11.3",
42
- "recordrtc": "^5.6.2",
43
- "regenerator-runtime": "^0.14.1",
44
- "speak-tts": "^2.0.8"
45
- },
46
- "devDependencies": {
47
- "@types/react": "^18.0.17",
48
- "@types/react-dom": "^18.2.18",
49
- "@vitejs/plugin-react": "^4.2.1",
50
- "vite": "^6.2.6",
51
- "vite-plugin-css-injected-by-js": "^3.3.1"
52
- }
53
- }
1
+ {
2
+ "name": "sonic-widget",
3
+ "version": "2.9.10",
4
+ "description": "Sonic widget library for doing E-KYC",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "author": "Shankaresh",
11
+ "license": "MIT",
12
+ "scripts": {
13
+ "dev": "vite",
14
+ "build": "vite build",
15
+ "preview": "vite preview"
16
+ },
17
+ "dependencies": {
18
+ "@emotion/react": "^11.10.4",
19
+ "@emotion/styled": "^11.10.4",
20
+ "@fingerprintjs/fingerprintjs": "3.4.1",
21
+ "@mediapipe/tasks-vision": "^0.10.12",
22
+ "@mui/icons-material": "^5.14.1",
23
+ "@mui/lab": "^5.0.0-alpha.128",
24
+ "@mui/material": "^5.14.2",
25
+ "@teachablemachine/image": "^0.8.5",
26
+ "@tensorflow-models/coco-ssd": "^2.2.3",
27
+ "@tensorflow/tfjs": "^4.15.0",
28
+ "axios": "^1.8.4",
29
+ "moment": "^2.30.1",
30
+ "prop-types": "^15.8.1",
31
+ "public-ip": "^6.0.1",
32
+ "react": "^18.2.0",
33
+ "react-cropper": "^2.3.3",
34
+ "react-device-detect": "^2.2.3",
35
+ "react-dom": "^18.2.0",
36
+ "react-internet-meter": "^1.1.1",
37
+ "react-player": "^2.12.0",
38
+ "react-router-dom": "^6.14.2",
39
+ "react-speech-recognition": "^3.10.0",
40
+ "react-webcam": "^7.0.1",
41
+ "recaptcha-v3": "^1.11.3",
42
+ "recordrtc": "^5.6.2",
43
+ "regenerator-runtime": "^0.14.1",
44
+ "speak-tts": "^2.0.8"
45
+ },
46
+ "devDependencies": {
47
+ "@types/react": "^18.0.17",
48
+ "@types/react-dom": "^18.2.18",
49
+ "@vitejs/plugin-react": "^4.2.1",
50
+ "vite": "^6.2.6",
51
+ "vite-plugin-css-injected-by-js": "^3.3.1"
52
+ }
53
+ }