sonic-widget 2.4.8 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +312 -312
- package/dist/index.js +1485 -1498
- package/dist/models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard1of5 +0 -0
- package/dist/models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard2of5 +0 -0
- package/dist/models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard3of5 +0 -0
- package/dist/models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard4of5 +0 -0
- package/dist/models/Tensorflow/coco_ssd_lite_mobilenet_v2/group1-shard5of5 +0 -0
- package/dist/models/Tensorflow/coco_ssd_lite_mobilenet_v2/model.json +21549 -0
- package/dist/service-worker.js +79 -76
- package/package.json +52 -52
- package/dist/models/TasksVision/object/float16/efficientdet_lite0.tflite +0 -0
package/dist/service-worker.js
CHANGED
|
@@ -1,77 +1,80 @@
|
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
"./models/
|
|
8
|
-
"./models/
|
|
9
|
-
"./models/
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
"./models/
|
|
13
|
-
"./models/
|
|
14
|
-
"./models/
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
//
|
|
22
|
-
"./models/TasksVision/
|
|
23
|
-
"./models/TasksVision/
|
|
24
|
-
// "
|
|
25
|
-
// "
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
+
|
|
16
|
+
// mask model
|
|
17
|
+
"./models/BKRMaskModel/model.json",
|
|
18
|
+
"./models/BKRMaskModel/metadata.json",
|
|
19
|
+
"./models/BKRMaskModel/weights.bin",
|
|
20
|
+
|
|
21
|
+
// tasks-vision model
|
|
22
|
+
// "./models/TasksVision/wasm/vision_wasm_internal.js",
|
|
23
|
+
// "./models/TasksVision/wasm/vision_wasm_internal.wasm",
|
|
24
|
+
// "./models/TasksVision/wasm/vision_wasm_nosimd_internal.js",
|
|
25
|
+
// "./models/TasksVision/wasm/vision_wasm_nosimd_internal.wasm",
|
|
26
|
+
"./models/TasksVision/face/float16/face_landmarker.task",
|
|
27
|
+
"./models/TasksVision/hand/float16/hand_landmarker.task",
|
|
28
|
+
// "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",
|
|
29
|
+
// "https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task"
|
|
30
|
+
// Add more model files if necessary
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
self.addEventListener('install', function(event) {
|
|
34
|
+
// Perform install steps
|
|
35
|
+
event.waitUntil(
|
|
36
|
+
caches.open(CACHE_NAME)
|
|
37
|
+
.then(function(cache) {
|
|
38
|
+
console.log('Opened cache');
|
|
39
|
+
return cache.addAll(urlsToCache);
|
|
40
|
+
})
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
self.addEventListener('fetch', function(event) {
|
|
45
|
+
const request = event.request;
|
|
46
|
+
// Skip caching for requests from browser extensions
|
|
47
|
+
if (request.url.startsWith('chrome-extension://')) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
event.respondWith(
|
|
51
|
+
caches.match(event.request)
|
|
52
|
+
.then(function(response) {
|
|
53
|
+
// Cache hit - return response
|
|
54
|
+
if (response) {
|
|
55
|
+
return response;
|
|
56
|
+
}
|
|
57
|
+
// Clone the request
|
|
58
|
+
var fetchRequest = event.request.clone();
|
|
59
|
+
|
|
60
|
+
return fetch(fetchRequest).then(
|
|
61
|
+
function(response) {
|
|
62
|
+
// Check if we received a valid response
|
|
63
|
+
if(!response || response.status !== 200 || response.type !== 'basic') {
|
|
64
|
+
return response;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Clone the response
|
|
68
|
+
var responseToCache = response.clone();
|
|
69
|
+
|
|
70
|
+
caches.open(CACHE_NAME)
|
|
71
|
+
.then(function(cache) {
|
|
72
|
+
cache.put(event.request, responseToCache);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
return response;
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
})
|
|
79
|
+
);
|
|
77
80
|
});
|
package/package.json
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sonic-widget",
|
|
3
|
-
"version": "2.
|
|
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.6.4",
|
|
29
|
-
"prop-types": "^15.8.1",
|
|
30
|
-
"public-ip": "^6.0.1",
|
|
31
|
-
"react": "^18.2.0",
|
|
32
|
-
"react-cropper": "^2.3.3",
|
|
33
|
-
"react-device-detect": "^2.2.3",
|
|
34
|
-
"react-dom": "^18.2.0",
|
|
35
|
-
"react-ga4": "^2.1.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
|
-
"recordrtc": "^5.6.2",
|
|
42
|
-
"regenerator-runtime": "^0.14.1",
|
|
43
|
-
"speak-tts": "^2.0.8"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@types/react": "^18.0.17",
|
|
47
|
-
"@types/react-dom": "^18.2.18",
|
|
48
|
-
"@vitejs/plugin-react": "^4.2.1",
|
|
49
|
-
"vite": "^5.0.11",
|
|
50
|
-
"vite-plugin-css-injected-by-js": "^3.3.1"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "sonic-widget",
|
|
3
|
+
"version": "2.5.1",
|
|
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.6.4",
|
|
29
|
+
"prop-types": "^15.8.1",
|
|
30
|
+
"public-ip": "^6.0.1",
|
|
31
|
+
"react": "^18.2.0",
|
|
32
|
+
"react-cropper": "^2.3.3",
|
|
33
|
+
"react-device-detect": "^2.2.3",
|
|
34
|
+
"react-dom": "^18.2.0",
|
|
35
|
+
"react-ga4": "^2.1.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
|
+
"recordrtc": "^5.6.2",
|
|
42
|
+
"regenerator-runtime": "^0.14.1",
|
|
43
|
+
"speak-tts": "^2.0.8"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/react": "^18.0.17",
|
|
47
|
+
"@types/react-dom": "^18.2.18",
|
|
48
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
49
|
+
"vite": "^5.0.11",
|
|
50
|
+
"vite-plugin-css-injected-by-js": "^3.3.1"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
Binary file
|