Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dynamsoft-label-recognizer

Package Overview
Dependencies
Maintainers
4
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamsoft-label-recognizer - npm Package Compare versions

Comparing version 3.0.30-beta-202402011936 to 3.0.30-beta-202403290227

samples.url

15

dist/DLR-PresetTemplates.json

@@ -75,19 +75,24 @@ {

"Name": "tls-number-letter",
"CharacterModelName": "NumberLetter"
"CharacterModelName": "NumberLetter",
"OutputResults": 1
},
{
"Name": "tls-number",
"CharacterModelName": "Number"
"CharacterModelName": "Number",
"OutputResults": 1
},
{
"Name": "tls-letter",
"CharacterModelName": "Letter"
"CharacterModelName": "Letter",
"OutputResults": 1
},
{
"Name": "tls-uppercase",
"CharacterModelName": "Uppercase"
"CharacterModelName": "Uppercase",
"OutputResults": 1
},
{
"Name": "tls-number-uppercase",
"CharacterModelName": "NumberUppercase"
"CharacterModelName": "NumberUppercase",
"OutputResults": 1
}

@@ -94,0 +99,0 @@ ],

@@ -7,6 +7,6 @@ /*!

* @author Dynamsoft
* @version 3.0.30-beta-202402011936
* @version 3.0.30-beta-202403290227
* @fileoverview Dynamsoft JavaScript Library for Barcode Reader
* More info on dlr JS: https://www.dynamsoft.com/label-recognition/docs/web/programming/javascript/
*/
import{engineResourcePaths as t,workerAutoResources as e,mapPackageRegister as a,compareVersion as s,innerVersions as r,loadWasm as c,getNextTaskID as o,mapTaskCallBack as l,worker as n,CoreModule as i}from"dynamsoft-core";const h="undefined"==typeof self,u=(()=>{if(!h&&document.currentScript){let t=document.currentScript.src,e=t.indexOf("?");if(-1!=e)t=t.substring(0,e);else{let e=t.indexOf("#");-1!=e&&(t=t.substring(0,e))}return t.substring(0,t.lastIndexOf("/")+1)}return"./"})(),d=t=>{if(null==t&&(t="./"),h);else{let e=document.createElement("a");e.href=t,t=e.href}return t.endsWith("/")||(t+="/"),t};null==t.dlr&&(t.dlr=u),e.dlr={js:!0,wasm:!0},a.dlr={filterVINResult:function(t){let e="";if(18===t.characterResults.length){let e=t.characterResults[9].location.points[0].x-t.characterResults[8].location.points[1].x;e<2&&(e=2);let a=t.characterResults[1].location.points[0].x-t.characterResults[0].location.points[1].x,s=t.characterResults[17].location.points[0].x-t.characterResults[16].location.points[1].x,r=2===e?3:e;if(a-e>=r&&s-e<r)t.characterResults.shift();else if(s-e>=r&&a-e<r)t.characterResults.pop();else{t.characterResults[0].characterHConfidence>t.characterResults[17].characterHConfidence?t.characterResults.pop():t.characterResults.shift()}}else if(19===t.characterResults.length){let e=t.characterResults[10].location.points[0].x-t.characterResults[9].location.points[1].x;e<2&&(e=2);let a,s,r,c=t.characterResults[1].location.points[0].x-t.characterResults[0].location.points[1].x,o=t.characterResults[18].location.points[0].x-t.characterResults[17].location.points[1].x,l=t.characterResults[2].location.points[0].x-t.characterResults[1].location.points[1].x,n=t.characterResults[17].location.points[0].x-t.characterResults[16].location.points[1].x,i=2===e?3:e;if("1"===t.characterResults[1].characterH||"1"===t.characterResults[2].characterH||"1"===t.characterResults[16].characterH||"1"===t.characterResults[17].characterH){for(let e=9;e<t.characterResults.length;e++)if("1"!==t.characterResults[e].characterH){r=t.characterResults[e].location.points[1].x-t.characterResults[e].location.points[0].x;break}"1"===t.characterResults[1].characterH&&(a=r-(t.characterResults[1].location.points[1].x-t.characterResults[1].location.points[0].x)+3),"1"===t.characterResults[2].characterH&&(a=r-(t.characterResults[2].location.points[1].x-t.characterResults[2].location.points[0].x)+3),"1"===t.characterResults[16].characterH&&(s=r-(t.characterResults[16].location.points[1].x-t.characterResults[16].location.points[0].x)+3),"1"===t.characterResults[17].characterH&&(s=r-(t.characterResults[17].location.points[1].x-t.characterResults[17].location.points[0].x)+3)}if(l-e>=(a||i)&&n-e<(s||i))t.characterResults.splice(0,2);else if(n-e>=(s||i)&&l-e<(a||i))t.characterResults.splice(17,2);else if(c>e&&o>e)t.characterResults.pop(),t.characterResults.shift();else{let e=t.characterResults[0].characterHConfidence+t.characterResults[1].characterHConfidence,a=t.characterResults[17].characterHConfidence+t.characterResults[18].characterHConfidence,s=t.characterResults[0].characterHConfidence+t.characterResults[18].characterHConfidence,r=Math.min(e,a,s);r===e?t.characterResults.splice(0,2):r===a?t.characterResults.splice(17,2):r===s&&(t.characterResults.pop(),t.characterResults.shift())}}for(let a of t.characterResults)e+=a.characterH;return e}};const R="1.0.0";t.std.version&&s(t.std.version,R)<0&&(t.std.version=R,t.std.path=d(u+`../../dynamsoft-capture-vision-std@${R}/dist/`));const p="2.0.30";t.dip.version&&s(t.dip.version,p)<0&&(t.dip.version=p,t.dip.path=d(u+`../../dynamsoft-image-processing@${p}/dist/`));class f{static getVersion(){const t=r.dlr&&r.dlr.wasm,e=r.dlr&&r.dlr.worker;return`3.0.30-beta-202402011936(Worker: ${e||"Not Loaded"}, Wasm: ${t||"Not Loaded"})`}static async loadRecognitionData(t,e){return await c("dlr"),await new Promise(((a,s)=>{let r=o();l[r]=async t=>{if(t.success)return a();{let e=new Error(t.message);return e.stack=t.stack+"\n"+e.stack,s(e)}},e&&!e.endsWith("/")&&(e+="/"),n.postMessage({type:"dlr_appendCaffeModelBuffer",id:r,body:{dataName:t,dataPath:e||i.engineResourcePaths.dcm}})}))}}l[-1]=async t=>{f.onDataLoadProgressChanged&&f.onDataLoadProgressChanged(t.resourcesPath,t.tag,{loaded:t.loaded,total:t.total})};export{f as LabelRecognizerModule};
import{engineResourcePaths as t,workerAutoResources as e,mapPackageRegister as a,compareVersion as s,innerVersions as r,loadWasm as c,getNextTaskID as n,mapTaskCallBack as o,worker as l,CoreModule as i}from"dynamsoft-core";const h="undefined"==typeof self,u=(()=>{if(!h&&document.currentScript){let t=document.currentScript.src,e=t.indexOf("?");if(-1!=e)t=t.substring(0,e);else{let e=t.indexOf("#");-1!=e&&(t=t.substring(0,e))}return t.substring(0,t.lastIndexOf("/")+1)}return"./"})(),d=t=>{if(null==t&&(t="./"),h);else{let e=document.createElement("a");e.href=t,t=e.href}return t.endsWith("/")||(t+="/"),t};null==t.dlr&&(t.dlr=u),null==t.dlrData&&(t.dlrData=d(u+"../../dynamsoft-label-recognizer-data/dist/")),e.dlr={js:!0,wasm:!0,deps:["license","dip","dnn"]},e.dnn={wasm:!0},a.dlr={filterVINResult:function(t){let e="";if(18===t.characterResults.length){let e=t.characterResults[9].location.points[0].x-t.characterResults[8].location.points[1].x;e<2&&(e=2);let a=t.characterResults[1].location.points[0].x-t.characterResults[0].location.points[1].x,s=t.characterResults[17].location.points[0].x-t.characterResults[16].location.points[1].x,r=2===e?3:e;if(a-e>=r&&s-e<r)t.characterResults.shift();else if(s-e>=r&&a-e<r)t.characterResults.pop();else{t.characterResults[0].characterHConfidence>t.characterResults[17].characterHConfidence?t.characterResults.pop():t.characterResults.shift()}}else if(19===t.characterResults.length){let e=t.characterResults[10].location.points[0].x-t.characterResults[9].location.points[1].x;e<2&&(e=2);let a,s,r,c=t.characterResults[1].location.points[0].x-t.characterResults[0].location.points[1].x,n=t.characterResults[18].location.points[0].x-t.characterResults[17].location.points[1].x,o=t.characterResults[2].location.points[0].x-t.characterResults[1].location.points[1].x,l=t.characterResults[17].location.points[0].x-t.characterResults[16].location.points[1].x,i=2===e?3:e;if("1"===t.characterResults[1].characterH||"1"===t.characterResults[2].characterH||"1"===t.characterResults[16].characterH||"1"===t.characterResults[17].characterH){for(let e=9;e<t.characterResults.length;e++)if("1"!==t.characterResults[e].characterH){r=t.characterResults[e].location.points[1].x-t.characterResults[e].location.points[0].x;break}"1"===t.characterResults[1].characterH&&(a=r-(t.characterResults[1].location.points[1].x-t.characterResults[1].location.points[0].x)+3),"1"===t.characterResults[2].characterH&&(a=r-(t.characterResults[2].location.points[1].x-t.characterResults[2].location.points[0].x)+3),"1"===t.characterResults[16].characterH&&(s=r-(t.characterResults[16].location.points[1].x-t.characterResults[16].location.points[0].x)+3),"1"===t.characterResults[17].characterH&&(s=r-(t.characterResults[17].location.points[1].x-t.characterResults[17].location.points[0].x)+3)}if(o-e>=(a||i)&&l-e<(s||i))t.characterResults.splice(0,2);else if(l-e>=(s||i)&&o-e<(a||i))t.characterResults.splice(17,2);else if(c>e&&n>e)t.characterResults.pop(),t.characterResults.shift();else{let e=t.characterResults[0].characterHConfidence+t.characterResults[1].characterHConfidence,a=t.characterResults[17].characterHConfidence+t.characterResults[18].characterHConfidence,s=t.characterResults[0].characterHConfidence+t.characterResults[18].characterHConfidence,r=Math.min(e,a,s);r===e?t.characterResults.splice(0,2):r===a?t.characterResults.splice(17,2):r===s&&(t.characterResults.pop(),t.characterResults.shift())}}for(let a of t.characterResults)e+=a.characterH;return e}};const p="1.2.0";"string"!=typeof t.std&&s(t.std.version,p)<0&&(t.std={version:p,path:d(u+`../../dynamsoft-capture-vision-std@${p}/dist/`)});const R="2.2.10";(!t.dip||"string"!=typeof t.dip&&s(t.dip.version,R)<0)&&(t.dip={version:R,path:d(u+`../../dynamsoft-image-processing@${R}/dist/`)});const f="1.0.10";(!t.dnn||"string"!=typeof t.dnn&&s(t.dnn.version,f)<0)&&(t.dnn={version:R,path:d(u+`../../dynamsoft-capture-vision-dnn@${f}/dist/`)});class x{static getVersion(){const t=r.dlr&&r.dlr.wasm,e=r.dlr&&r.dlr.worker;return`3.0.30-beta-202403290227(Worker: ${e||"Not Loaded"}, Wasm: ${t||"Not Loaded"})`}static async loadRecognitionData(t,e){return await c("dlr"),await new Promise(((a,s)=>{let r=n();o[r]=async t=>{if(t.success)return a();{let e=new Error(t.message);return e.stack=t.stack+"\n"+e.stack,s(e)}},e&&!e.endsWith("/")&&(e+="/"),l.postMessage({type:"dlr_appendCaffeModelBuffer",id:r,body:{dataName:t,dataPath:e||i.engineResourcePaths.dlrData}})}))}}o[-1]=async t=>{x.onDataLoadProgressChanged&&x.onDataLoadProgressChanged(t.resourcesPath,t.tag,{loaded:t.loaded,total:t.total})};export{x as LabelRecognizerModule};

@@ -7,6 +7,6 @@ /*!

* @author Dynamsoft
* @version 3.0.30-beta-202402011936
* @version 3.0.30-beta-202403290227
* @fileoverview Dynamsoft JavaScript Library for Barcode Reader
* More info on dlr JS: https://www.dynamsoft.com/label-recognition/docs/web/programming/javascript/
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("dynamsoft-core")):"function"==typeof define&&define.amd?define(["exports","dynamsoft-core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Dynamsoft=e.Dynamsoft||{},e.Dynamsoft.DLR={}),e.Dynamsoft.Core)}(this,(function(e,t){"use strict";const s="undefined"==typeof self,a=(()=>{if(!s&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"})(),r=e=>{if(null==e&&(e="./"),s);else{let t=document.createElement("a");t.href=e,e=t.href}return e.endsWith("/")||(e+="/"),e};null==t.engineResourcePaths.dlr&&(t.engineResourcePaths.dlr=a),t.workerAutoResources.dlr={js:!0,wasm:!0},t.mapPackageRegister.dlr={filterVINResult:function(e){let t="";if(18===e.characterResults.length){let t=e.characterResults[9].location.points[0].x-e.characterResults[8].location.points[1].x;t<2&&(t=2);let s=e.characterResults[1].location.points[0].x-e.characterResults[0].location.points[1].x,a=e.characterResults[17].location.points[0].x-e.characterResults[16].location.points[1].x,r=2===t?3:t;if(s-t>=r&&a-t<r)e.characterResults.shift();else if(a-t>=r&&s-t<r)e.characterResults.pop();else{e.characterResults[0].characterHConfidence>e.characterResults[17].characterHConfidence?e.characterResults.pop():e.characterResults.shift()}}else if(19===e.characterResults.length){let t=e.characterResults[10].location.points[0].x-e.characterResults[9].location.points[1].x;t<2&&(t=2);let s,a,r,c=e.characterResults[1].location.points[0].x-e.characterResults[0].location.points[1].x,o=e.characterResults[18].location.points[0].x-e.characterResults[17].location.points[1].x,n=e.characterResults[2].location.points[0].x-e.characterResults[1].location.points[1].x,i=e.characterResults[17].location.points[0].x-e.characterResults[16].location.points[1].x,l=2===t?3:t;if("1"===e.characterResults[1].characterH||"1"===e.characterResults[2].characterH||"1"===e.characterResults[16].characterH||"1"===e.characterResults[17].characterH){for(let t=9;t<e.characterResults.length;t++)if("1"!==e.characterResults[t].characterH){r=e.characterResults[t].location.points[1].x-e.characterResults[t].location.points[0].x;break}"1"===e.characterResults[1].characterH&&(s=r-(e.characterResults[1].location.points[1].x-e.characterResults[1].location.points[0].x)+3),"1"===e.characterResults[2].characterH&&(s=r-(e.characterResults[2].location.points[1].x-e.characterResults[2].location.points[0].x)+3),"1"===e.characterResults[16].characterH&&(a=r-(e.characterResults[16].location.points[1].x-e.characterResults[16].location.points[0].x)+3),"1"===e.characterResults[17].characterH&&(a=r-(e.characterResults[17].location.points[1].x-e.characterResults[17].location.points[0].x)+3)}if(n-t>=(s||l)&&i-t<(a||l))e.characterResults.splice(0,2);else if(i-t>=(a||l)&&n-t<(s||l))e.characterResults.splice(17,2);else if(c>t&&o>t)e.characterResults.pop(),e.characterResults.shift();else{let t=e.characterResults[0].characterHConfidence+e.characterResults[1].characterHConfidence,s=e.characterResults[17].characterHConfidence+e.characterResults[18].characterHConfidence,a=e.characterResults[0].characterHConfidence+e.characterResults[18].characterHConfidence,r=Math.min(t,s,a);r===t?e.characterResults.splice(0,2):r===s?e.characterResults.splice(17,2):r===a&&(e.characterResults.pop(),e.characterResults.shift())}}for(let s of e.characterResults)t+=s.characterH;return t}};const c="1.0.0";t.engineResourcePaths.std.version&&t.compareVersion(t.engineResourcePaths.std.version,c)<0&&(t.engineResourcePaths.std.version=c,t.engineResourcePaths.std.path=r(a+`../../dynamsoft-capture-vision-std@${c}/dist/`));const o="2.0.30";t.engineResourcePaths.dip.version&&t.compareVersion(t.engineResourcePaths.dip.version,o)<0&&(t.engineResourcePaths.dip.version=o,t.engineResourcePaths.dip.path=r(a+`../../dynamsoft-image-processing@${o}/dist/`));class n{static getVersion(){const e=t.innerVersions.dlr&&t.innerVersions.dlr.wasm,s=t.innerVersions.dlr&&t.innerVersions.dlr.worker;return`3.0.30-beta-202402011936(Worker: ${s||"Not Loaded"}, Wasm: ${e||"Not Loaded"})`}static async loadRecognitionData(e,s){return await t.loadWasm("dlr"),await new Promise(((a,r)=>{let c=t.getNextTaskID();t.mapTaskCallBack[c]=async e=>{if(e.success)return a();{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,r(t)}},s&&!s.endsWith("/")&&(s+="/"),t.worker.postMessage({type:"dlr_appendCaffeModelBuffer",id:c,body:{dataName:e,dataPath:s||t.CoreModule.engineResourcePaths.dcm}})}))}}t.mapTaskCallBack[-1]=async e=>{n.onDataLoadProgressChanged&&n.onDataLoadProgressChanged(e.resourcesPath,e.tag,{loaded:e.loaded,total:e.total})},e.LabelRecognizerModule=n,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("dynamsoft-core")):"function"==typeof define&&define.amd?define(["exports","dynamsoft-core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Dynamsoft=e.Dynamsoft||{},e.Dynamsoft.DLR={}),e.Dynamsoft.Core)}(this,(function(e,t){"use strict";const s="undefined"==typeof self,a=(()=>{if(!s&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"})(),r=e=>{if(null==e&&(e="./"),s);else{let t=document.createElement("a");t.href=e,e=t.href}return e.endsWith("/")||(e+="/"),e};null==t.engineResourcePaths.dlr&&(t.engineResourcePaths.dlr=a),null==t.engineResourcePaths.dlrData&&(t.engineResourcePaths.dlrData=r(a+"../../dynamsoft-label-recognizer-data/dist/")),t.workerAutoResources.dlr={js:!0,wasm:!0,deps:["license","dip","dnn"]},t.workerAutoResources.dnn={wasm:!0},t.mapPackageRegister.dlr={filterVINResult:function(e){let t="";if(18===e.characterResults.length){let t=e.characterResults[9].location.points[0].x-e.characterResults[8].location.points[1].x;t<2&&(t=2);let s=e.characterResults[1].location.points[0].x-e.characterResults[0].location.points[1].x,a=e.characterResults[17].location.points[0].x-e.characterResults[16].location.points[1].x,r=2===t?3:t;if(s-t>=r&&a-t<r)e.characterResults.shift();else if(a-t>=r&&s-t<r)e.characterResults.pop();else{e.characterResults[0].characterHConfidence>e.characterResults[17].characterHConfidence?e.characterResults.pop():e.characterResults.shift()}}else if(19===e.characterResults.length){let t=e.characterResults[10].location.points[0].x-e.characterResults[9].location.points[1].x;t<2&&(t=2);let s,a,r,c=e.characterResults[1].location.points[0].x-e.characterResults[0].location.points[1].x,n=e.characterResults[18].location.points[0].x-e.characterResults[17].location.points[1].x,o=e.characterResults[2].location.points[0].x-e.characterResults[1].location.points[1].x,i=e.characterResults[17].location.points[0].x-e.characterResults[16].location.points[1].x,l=2===t?3:t;if("1"===e.characterResults[1].characterH||"1"===e.characterResults[2].characterH||"1"===e.characterResults[16].characterH||"1"===e.characterResults[17].characterH){for(let t=9;t<e.characterResults.length;t++)if("1"!==e.characterResults[t].characterH){r=e.characterResults[t].location.points[1].x-e.characterResults[t].location.points[0].x;break}"1"===e.characterResults[1].characterH&&(s=r-(e.characterResults[1].location.points[1].x-e.characterResults[1].location.points[0].x)+3),"1"===e.characterResults[2].characterH&&(s=r-(e.characterResults[2].location.points[1].x-e.characterResults[2].location.points[0].x)+3),"1"===e.characterResults[16].characterH&&(a=r-(e.characterResults[16].location.points[1].x-e.characterResults[16].location.points[0].x)+3),"1"===e.characterResults[17].characterH&&(a=r-(e.characterResults[17].location.points[1].x-e.characterResults[17].location.points[0].x)+3)}if(o-t>=(s||l)&&i-t<(a||l))e.characterResults.splice(0,2);else if(i-t>=(a||l)&&o-t<(s||l))e.characterResults.splice(17,2);else if(c>t&&n>t)e.characterResults.pop(),e.characterResults.shift();else{let t=e.characterResults[0].characterHConfidence+e.characterResults[1].characterHConfidence,s=e.characterResults[17].characterHConfidence+e.characterResults[18].characterHConfidence,a=e.characterResults[0].characterHConfidence+e.characterResults[18].characterHConfidence,r=Math.min(t,s,a);r===t?e.characterResults.splice(0,2):r===s?e.characterResults.splice(17,2):r===a&&(e.characterResults.pop(),e.characterResults.shift())}}for(let s of e.characterResults)t+=s.characterH;return t}};const c="1.2.0";"string"!=typeof t.engineResourcePaths.std&&t.compareVersion(t.engineResourcePaths.std.version,c)<0&&(t.engineResourcePaths.std={version:c,path:r(a+`../../dynamsoft-capture-vision-std@${c}/dist/`)});const n="2.2.10";(!t.engineResourcePaths.dip||"string"!=typeof t.engineResourcePaths.dip&&t.compareVersion(t.engineResourcePaths.dip.version,n)<0)&&(t.engineResourcePaths.dip={version:n,path:r(a+`../../dynamsoft-image-processing@${n}/dist/`)});const o="1.0.10";(!t.engineResourcePaths.dnn||"string"!=typeof t.engineResourcePaths.dnn&&t.compareVersion(t.engineResourcePaths.dnn.version,o)<0)&&(t.engineResourcePaths.dnn={version:n,path:r(a+`../../dynamsoft-capture-vision-dnn@${o}/dist/`)});class i{static getVersion(){const e=t.innerVersions.dlr&&t.innerVersions.dlr.wasm,s=t.innerVersions.dlr&&t.innerVersions.dlr.worker;return`3.0.30-beta-202403290227(Worker: ${s||"Not Loaded"}, Wasm: ${e||"Not Loaded"})`}static async loadRecognitionData(e,s){return await t.loadWasm("dlr"),await new Promise(((a,r)=>{let c=t.getNextTaskID();t.mapTaskCallBack[c]=async e=>{if(e.success)return a();{let t=new Error(e.message);return t.stack=e.stack+"\n"+t.stack,r(t)}},s&&!s.endsWith("/")&&(s+="/"),t.worker.postMessage({type:"dlr_appendCaffeModelBuffer",id:c,body:{dataName:e,dataPath:s||t.CoreModule.engineResourcePaths.dlrData}})}))}}t.mapTaskCallBack[-1]=async e=>{i.onDataLoadProgressChanged&&i.onDataLoadProgressChanged(e.resourcesPath,e.tag,{loaded:e.loaded,total:e.total})},e.LabelRecognizerModule=i,Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -7,6 +7,6 @@ /*!

* @author Dynamsoft
* @version 3.0.30-beta-202402011936
* @version 3.0.30-beta-202403290227
* @fileoverview Dynamsoft JavaScript Library for Barcode Reader
* More info on dlr JS: https://www.dynamsoft.com/label-recognition/docs/web/programming/javascript/
*/
!function(){"use strict";let e={};const t=self;t.dlrWorkerVersion="3.0.30-beta-202402011936";const o=t.checkAndAutoLoadCaffeModel=async(t,o)=>{if(!e[t]){let r;o?"@engineResourcePath"===o&&(o=engineResourcePaths.dlr):o="",postMessage({type:"event",id:-1,body:{loaded:0,total:0,tag:"starting",resourcesPath:o+t+".data"}}),e[t]=(async()=>{try{let a,s,n;const d=new TextDecoder,l=o+t+".data",f=await new Promise(((e,t)=>{const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onload=()=>{e({ok:!0,arrayBuffer:()=>o.response})},o.onerror=o.timeout=o.onabort=()=>{t({ok:!1,status:o.status})};let a=Date.now();o.onprogress=e=>{if(r=e.total,e.lengthComputable){const t=Date.now();a+500<t&&(postMessage({type:"event",id:-1,body:{loaded:e.loaded,total:e.total,tag:"in progress",resourcesPath:l}}),a=t)}},o.open("GET",l,!0),o.send()}));if(!f.ok)throw new Error(`Network error. Status: ${f.status}.`);a=await f.arrayBuffer();{if(!d.decode(new Uint8Array(a,0,8)).startsWith("DLR_MDL"))throw new Error("Model data type incorrect.");let e=0;const t=new Uint8Array(a,8,8);for(let o=7;o>=0;--o)e=256*e+t[o];const o=d.decode(new Uint8Array(a,16,e));s=JSON.parse(o),n=16+e}let c=e=>{const t=s[e];if(!t)throw new Error(`File name '${e}' not found.`);return new Uint8Array(a,n+t[0],t[1])},i=JSON.parse(d.decode(c(t+".config.json")));const p=i.mainModel,u=i.assistModels,m=i.modelFilter;{const e=c(p+".prototxt"),o=c(p+".txt"),r=c(p+".caffemodel");ep(),wasmImports.emscripten_bind_DlrWasm_appendCaffeModelBuffer_7(es(t),setBufferIntoWasm(e,0),e.length,setBufferIntoWasm(o,1),o.length,setBufferIntoWasm(r,2),r.length)}if(u)for(let e of u){const o=t+e,r=p+e,a=c(r+".prototxt"),s=c(r+".txt"),n=c(r+".caffemodel");wasmImports.emscripten_bind_DlrWasm_appendCaffeModelBuffer_7(o,a,a.length,s,s.length,n,n.length)}if(m){const e=c(m+".txt");wasmImports.emscripten_bind_DlrWasm_appendModelFilterFileBuffer_3(t,e,e.length)}return e[t]=!0,postMessage({type:"event",id:-1,body:{loaded:r,total:r,tag:"completed",resourcesPath:o+t+".data"}}),!0}catch(o){throw delete e[t],o}})()}await e[t]};Object.assign(mapController,{dlr_appendCaffeModelBuffer:async(e,t)=>{try{await o(e.dataName,e.dataPath),handleTaskRes(t,{success:!0})}catch(e){return void handleTaskErr(t,e)}}})}();
!function(){"use strict";let e={};const t=self;t.dlrWorkerVersion="3.0.30-beta-202403290227";const r=t.checkAndAutoLoadCaffeModel=async(t,r)=>{if(!e[t]){let o={Letter:2711347,Number:2626880,NumberLetter:2733480,NumberUppercase:2679209,Uppercase:2659096,MRZ:2681184,VIN:2679232}[t];e[t]=(async()=>{try{let a,s,n;const d=new TextDecoder,l=r+t+".data",f=await new Promise(((e,a)=>{const s=new XMLHttpRequest;s.responseType="arraybuffer",s.onload=()=>{e({ok:!0,arrayBuffer:()=>s.response})},s.onerror=s.onabort=()=>{a({ok:!1,status:s.status})},s.onloadstart=()=>{postMessage({type:"event",id:-1,body:{loaded:0,total:o||0,tag:"starting",resourcesPath:r+t+".data"}})},s.onloadend=()=>{postMessage({type:"event",id:-1,body:{loaded:o||0,total:o||0,tag:"completed",resourcesPath:r+t+".data"}})};let n=Date.now();s.onprogress=e=>{if(e.lengthComputable&&(o=e.total),o){const t=Date.now();n+500<t&&(postMessage({type:"event",id:-1,body:{total:o,loaded:e.loaded,tag:"in progress",resourcesPath:l}}),n=t)}},s.open("GET",l,!0),s.send()}));if(!f.ok)throw new Error(`Network error. Status: ${f.status}.`);a=await f.arrayBuffer();{if(!d.decode(new Uint8Array(a,0,8)).startsWith("DLR_MDL"))throw new Error("Model data type incorrect.");let e=0;const t=new Uint8Array(a,8,8);for(let r=7;r>=0;--r)e=256*e+t[r];const r=d.decode(new Uint8Array(a,16,e));s=JSON.parse(r),n=16+e}let c=e=>{const t=s[e];if(!t)throw new Error(`File name '${e}' not found.`);return new Uint8Array(a,n+t[0],t[1])},i=JSON.parse(d.decode(c(t+".config.json")));const p=i.mainModel,u=i.assistModels,m=i.modelFilter;{const e=c(p+".prototxt"),r=c(p+".txt"),o=c(p+".caffemodel");ep(),wasmImports.emscripten_bind_DlrWasm_appendCaffeModelBuffer_7(es(t),setBufferIntoWasm(e,0),e.length,setBufferIntoWasm(r,1),r.length,setBufferIntoWasm(o,2),o.length)}if(u)for(let e of u){const r=t+e,o=p+e,a=c(o+".prototxt"),s=c(o+".txt"),n=c(o+".caffemodel");wasmImports.emscripten_bind_DlrWasm_appendCaffeModelBuffer_7(r,a,a.length,s,s.length,n,n.length)}if(m){const e=c(m+".txt");wasmImports.emscripten_bind_DlrWasm_appendModelFilterFileBuffer_3(t,e,e.length)}return e[t]=!0}catch(r){throw delete e[t],r}})()}await e[t]};Object.assign(mapController,{dlr_appendCaffeModelBuffer:async(e,t)=>{try{await r(e.dataName,e.dataPath),handleTaskRes(t,{success:!0})}catch(e){return void handleTaskErr(t,e)}}})}();
{
"name": "dynamsoft-label-recognizer",
"version": "3.0.30-beta-202402011936",
"version": "3.0.30-beta-202403290227",
"description": "Dynamsoft Label Recognizer (DLR) is an SDK designed to recognize meaningful zonal text or symbols in an image (Label). Common scenarios include price tags in supermarkets, inventory labels in warehouses, VIN codes on car windshields, driver licenses, passports, visas, ID cards, etc.",

@@ -78,6 +78,8 @@ "files": [

"easyPublish": "npm run update:dev && npm i @dynamsoft/dynamsoft-core@latest && npm run build && npm publish",
"ep-no-core": "npm run update:dev && npm run build && npm publish"
"ep-no-core": "npm run update:dev && npm run build && npm publish",
"overridesCore:prod": "npm pkg delete overrides.dynamsoft-core && npm pkg set dependencies.dynamsoft-core=\"^3.2.10\"",
"overridesCore:dev": "npm pkg set overrides.dynamsoft-core=$dynamsoft-core && npm pkg set dependencies.dynamsoft-core=npm:@dynamsoft/dynamsoft-core@latest && npm update dynamsoft-core --no-package-lock"
},
"devDependencies": {
"@dynamsoft/rd2-scripts": "^0.1.14",
"@dynamsoft/rd2-scripts": "^0.1.15",
"@rollup/plugin-node-resolve": "^15.0.1",

@@ -95,4 +97,5 @@ "@rollup/plugin-replace": "^5.0.2",

"dependencies": {
"dynamsoft-core": "^3.0.31"
}
"dynamsoft-core": "^3.2.10"
},
"overrides": {}
}

@@ -419,3 +419,3 @@ # Label Recognizer for Your Website - User Guide

Check out [CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/core/basic-structures/captured-result-receiver.html) for more information.
Check out [CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/captured-result-receiver.html) for more information.

@@ -449,2 +449,4 @@ #### Start the process

Read more on the [preset CaptureVisionTemplates](./preset-templates.md).
### Customize the process

@@ -451,0 +453,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc