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

dynamsoft-core

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamsoft-core - npm Package Compare versions

Comparing version 3.0.10-beta-202308171924 to 3.0.10-beta-202308180152

4

dist/core.esm.js

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

* @author Dynamsoft
* @version 3.0.10-beta-202308171924
* @version 3.0.10
* @fileoverview Dynamsoft JavaScript Library for Core
* More info on DC JS: https://www.dynamsoft.com/core/docs/programming/javascript/?ver=latest
*/
function _(_,E,I,C){if("a"===I&&!C)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof E?_!==E||!C:!E.has(_))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===I?C:"a"===I?C.call(_):C?C.value:E.get(_)}function E(_,E,I,C,A){if("m"===C)throw new TypeError("Private method is not writable");if("a"===C&&!A)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof E?_!==E||!A:!E.has(_))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===C?A.call(_,I):A?A.value=I:E.set(_,I),I}var I,C,A;"function"==typeof SuppressedError&&SuppressedError,function(_){_[_.BOPM_BLOCK=0]="BOPM_BLOCK",_[_.BOPM_UPDATE=1]="BOPM_UPDATE"}(I||(I={})),function(_){_[_.CCUT_AUTO=0]="CCUT_AUTO",_[_.CCUT_FULL_CHANNEL=1]="CCUT_FULL_CHANNEL",_[_.CCUT_Y_CHANNEL_ONLY=2]="CCUT_Y_CHANNEL_ONLY",_[_.CCUT_RGB_R_CHANNEL_ONLY=3]="CCUT_RGB_R_CHANNEL_ONLY",_[_.CCUT_RGB_G_CHANNEL_ONLY=4]="CCUT_RGB_G_CHANNEL_ONLY",_[_.CCUT_RGB_B_CHANNEL_ONLY=5]="CCUT_RGB_B_CHANNEL_ONLY"}(C||(C={})),function(_){_[_.IPF_BINARY=0]="IPF_BINARY",_[_.IPF_BINARYINVERTED=1]="IPF_BINARYINVERTED",_[_.IPF_GRAYSCALED=2]="IPF_GRAYSCALED",_[_.IPF_NV21=3]="IPF_NV21",_[_.IPF_RGB_565=4]="IPF_RGB_565",_[_.IPF_RGB_555=5]="IPF_RGB_555",_[_.IPF_RGB_888=6]="IPF_RGB_888",_[_.IPF_ARGB_8888=7]="IPF_ARGB_8888",_[_.IPF_RGB_161616=8]="IPF_RGB_161616",_[_.IPF_ARGB_16161616=9]="IPF_ARGB_16161616",_[_.IPF_ABGR_8888=10]="IPF_ABGR_8888",_[_.IPF_ABGR_16161616=11]="IPF_ABGR_16161616",_[_.IPF_BGR_888=12]="IPF_BGR_888",_[_.IPF_BINARY_8=13]="IPF_BINARY_8",_[_.IPF_NV12=14]="IPF_NV12"}(A||(A={}));const T=_=>Object.prototype.toString.call(_),R=_=>Array.isArray?Array.isArray(_):"[object Array]"===T(_),N=_=>"[object Boolean]"===T(_),e=_=>"number"==typeof _&&!Number.isNaN(_),D=_=>null!==_&&"object"==typeof _&&!Array.isArray(_),L=_=>!!D(_)&&(!!e(_.x)&&(!!e(_.y)&&(!!e(_.radius)&&(!(_.radius<0)&&(!!e(_.startAngle)&&!!e(_.endAngle)))))),t=_=>!!D(_)&&(!!R(_.points)&&(0!=_.points.length&&!_.points.some((_=>!r(_))))),O=_=>!!D(_)&&(_.bytes instanceof Uint8Array&&(!!e(_.width)&&(!(_.width<=0)&&(!!e(_.height)&&(!(_.height<=0)&&(!!e(_.stride)&&(!(_.stride<=0)&&("format"in _&&!("tag"in _&&!i(_.tag)))))))))),S=_=>!!D(_)&&(!!e(_.left)&&(!(_.left<0)&&(!!e(_.top)&&(!(_.top<0)&&(!!e(_.right)&&(!(_.right<0)&&(!!e(_.bottom)&&(!(_.bottom<0)&&(!(_.left>=_.right)&&(!(_.top>=_.bottom)&&!!N(_.isMeasuredInPercentage))))))))))),i=_=>!!D(_)&&(!!e(_.imageId)&&"type"in _),s=_=>!!D(_)&&(!!r(_.startPoint)&&(!!r(_.endPoint)&&(_.startPoint.x!=_.endPoint.x||_.startPoint.y!=_.endPoint.y))),r=_=>!!D(_)&&(!!e(_.x)&&!!e(_.y)),n=_=>!!D(_)&&(!!R(_.points)&&(0!=_.points.length&&!_.points.some((_=>!r(_))))),M=_=>!!D(_)&&(!!R(_.points)&&(0!=_.points.length&&4==_.points.length&&!_.points.some((_=>!r(_))))),a=_=>!!D(_)&&(!!e(_.x)&&(!!e(_.y)&&(!!e(_.width)&&(!(_.width<0)&&(!!e(_.height)&&(!(_.height<0)&&!("isMeasuredInPercentage"in _&&!N(_.isMeasuredInPercentage))))))));var G,U,P,o,F,h,f,B,V,c,d,l,u,g,m,Y,w,p,y;class H{constructor(){G.add(this),U.set(this,[]),P.set(this,1),o.set(this,I.BOPM_BLOCK),F.set(this,!1),h.set(this,void 0),f.set(this,C.CCUT_AUTO)}get _isFetchingStarted(){return _(this,F,"f")}addImageToBuffer(E){var C;if(!O(E))throw new TypeError("Invalid 'image'.");if((null===(C=E.tag)||void 0===C?void 0:C.hasOwnProperty("imageId"))&&"number"==typeof E.tag.imageId&&this.hasImage(E.tag.imageId))throw new Error("Existed imageId.");if(_(this,U,"f").length>=_(this,P,"f"))switch(_(this,o,"f")){case I.BOPM_BLOCK:break;case I.BOPM_UPDATE:if(_(this,U,"f").push(E),D(_(this,h,"f"))&&e(_(this,h,"f").imageId)&&1==_(this,h,"f").keepInBuffer)for(;_(this,U,"f").length>_(this,P,"f");){const E=_(this,U,"f").findIndex((E=>{var I;return(null===(I=E.tag)||void 0===I?void 0:I.imageId)!==_(this,h,"f").imageId}));_(this,U,"f").splice(E,1)}else _(this,U,"f").splice(0,_(this,U,"f").length-_(this,P,"f"))}else _(this,U,"f").push(E)}getImage(){if(0===_(this,U,"f").length)return null;let E;if(_(this,h,"f")&&e(_(this,h,"f").imageId)){const I=_(this,G,"m",B).call(this,_(this,h,"f").imageId);if(I<0)throw new Error(`Image with id ${_(this,h,"f").imageId} doesn't exist.`);E=_(this,U,"f").slice(I,I+1)[0]}else E=_(this,U,"f").pop();if([A.IPF_RGB_565,A.IPF_RGB_555,A.IPF_RGB_888,A.IPF_ARGB_8888,A.IPF_RGB_161616,A.IPF_ARGB_16161616,A.IPF_ABGR_8888,A.IPF_ABGR_16161616,A.IPF_BGR_888].includes(E.format)){if(_(this,f,"f")===C.CCUT_RGB_R_CHANNEL_ONLY){const _=new Uint8Array(E.width*E.height);for(let I=0;I<_.length;I++)switch(E.format){case A.IPF_RGB_565:case A.IPF_RGB_555:case A.IPF_RGB_888:case A.IPF_RGB_161616:_[I]=E.bytes[3*I+2];break;case A.IPF_ARGB_8888:case A.IPF_ARGB_16161616:_[I]=E.bytes[4*I+2];break;case A.IPF_BGR_888:_[I]=E.bytes[3*I];break;case A.IPF_ABGR_8888:case A.IPF_ABGR_16161616:_[I]=E.bytes[4*I]}E.bytes=_,E.stride=E.width,E.format=A.IPF_GRAYSCALED}else if(_(this,f,"f")===C.CCUT_RGB_G_CHANNEL_ONLY){const _=new Uint8Array(E.width*E.height);for(let I=0;I<_.length;I++)switch(E.format){case A.IPF_RGB_565:case A.IPF_RGB_555:case A.IPF_RGB_888:case A.IPF_RGB_161616:case A.IPF_BGR_888:_[I]=E.bytes[3*I+1];break;case A.IPF_ARGB_8888:case A.IPF_ARGB_16161616:case A.IPF_ABGR_8888:case A.IPF_ABGR_16161616:_[I]=E.bytes[4*I+1]}E.bytes=_,E.stride=E.width,E.format=A.IPF_GRAYSCALED}else if(_(this,f,"f")===C.CCUT_RGB_B_CHANNEL_ONLY){const _=new Uint8Array(E.width*E.height);for(let I=0;I<_.length;I++)switch(E.format){case A.IPF_RGB_565:case A.IPF_RGB_555:case A.IPF_RGB_888:case A.IPF_RGB_161616:_[I]=E.bytes[3*I];break;case A.IPF_ARGB_8888:case A.IPF_ARGB_16161616:_[I]=E.bytes[4*I];break;case A.IPF_BGR_888:_[I]=E.bytes[3*I+2];break;case A.IPF_ABGR_8888:case A.IPF_ABGR_16161616:_[I]=E.bytes[4*I+2]}E.bytes=_,E.stride=E.width,E.format=A.IPF_GRAYSCALED}}else[A.IPF_NV21,A.IPF_NV12].includes(E.format);return E}setNextImageToReturn(_,I){if(!((..._)=>0!==_.length&&_.every((_=>e(_))))(_))throw new TypeError("Invalid 'imageId'.");if(void 0!==I&&!N(I))throw new TypeError("Invalid 'keepInBuffer'.");E(this,h,{imageId:_,keepInBuffer:I},"f")}_resetNextReturnedImage(){E(this,h,null,"f")}hasImage(E){return _(this,G,"m",B).call(this,E)>=0}startFetching(){E(this,F,!0,"f")}stopFetching(){E(this,F,!1,"f")}setMaximumImageCount(I){if("number"!=typeof I)throw new TypeError("Invalid 'count'.");if(I<1||Math.round(I)!==I)throw new Error("Invalid 'count'.");for(E(this,P,I,"f");_(this,U,"f")&&_(this,U,"f").length>I;)_(this,U,"f").shift()}getMaximumImageCount(){return _(this,P,"f")}getImageCount(){return _(this,U,"f").length}clearBuffer(){_(this,U,"f").length=0}isBufferEmpty(){return 0===_(this,U,"f").length}setBufferOverflowProtectionMode(_){E(this,o,_,"f")}getBufferOverflowProtectionMode(){return _(this,o,"f")}setColourChannelUsageType(_){E(this,f,_,"f")}getColourChannelUsageType(){return _(this,f,"f")}}U=new WeakMap,P=new WeakMap,o=new WeakMap,F=new WeakMap,h=new WeakMap,f=new WeakMap,G=new WeakSet,B=function(E){if("number"!=typeof E)throw new TypeError("Invalid 'imageId'.");return _(this,U,"f").findIndex((_=>{var I;return(null===(I=_.tag)||void 0===I?void 0:I.imageId)===E}))};class X{static getVersion(){return"3.0.10-beta-202308171924"}}class v{constructor(){this.intermediateResultReceiverSet=new Set}addResultReceiver(_){if("object"!=typeof _)throw new Error("Invalid receiver.");this.intermediateResultReceiverSet.add(_)}removeResultReceiver(_){this.intermediateResultReceiverSet.delete(_)}async getOriginalImage(_){return null}}class Z{constructor(){this.onTaskResultsReceived=null,this.onPredetectedRegionsReceived=null,this.onDecodedBarcodesReceived=null,this.onRecognizedTextLinesReceived=null,this.onDetectedQuadsReceived=null,this.onNormalizedImagesReceived=null}}!function(_){_[_.CRIT_ORIGINAL_IMAGE=1]="CRIT_ORIGINAL_IMAGE",_[_.CRIT_BARCODE=2]="CRIT_BARCODE",_[_.CRIT_TEXT_LINE=4]="CRIT_TEXT_LINE",_[_.CRIT_DETECTED_QUAD=8]="CRIT_DETECTED_QUAD",_[_.CRIT_NORMALIZED_IMAGE=16]="CRIT_NORMALIZED_IMAGE",_[_.CRIT_PARSED_RESULT=32]="CRIT_PARSED_RESULT"}(V||(V={})),function(_){_[_.CT_NORMAL_INTERSECTED=0]="CT_NORMAL_INTERSECTED",_[_.CT_T_INTERSECTED=1]="CT_T_INTERSECTED",_[_.CT_CROSS_INTERSECTED=2]="CT_CROSS_INTERSECTED",_[_.CT_NOT_INTERSECTED=3]="CT_NOT_INTERSECTED"}(c||(c={})),function(_){_[_.EC_OK=0]="EC_OK",_[_.EC_UNKNOWN=-1e4]="EC_UNKNOWN",_[_.EC_NO_MEMORY=-10001]="EC_NO_MEMORY",_[_.EC_NULL_POINTER=-10002]="EC_NULL_POINTER",_[_.EC_LICENSE_INVALID=-10003]="EC_LICENSE_INVALID",_[_.EC_LICENSE_EXPIRED=-10004]="EC_LICENSE_EXPIRED",_[_.EC_FILE_NOT_FOUND=-10005]="EC_FILE_NOT_FOUND",_[_.EC_FILE_TYPE_NOT_SUPPORTED=-10006]="EC_FILE_TYPE_NOT_SUPPORTED",_[_.EC_BPP_NOT_SUPPORTED=-10007]="EC_BPP_NOT_SUPPORTED",_[_.EC_INDEX_INVALID=-10008]="EC_INDEX_INVALID",_[_.EC_CUSTOM_REGION_INVALID=-10010]="EC_CUSTOM_REGION_INVALID",_[_.EC_IMAGE_READ_FAILED=-10012]="EC_IMAGE_READ_FAILED",_[_.EC_TIFF_READ_FAILED=-10013]="EC_TIFF_READ_FAILED",_[_.EC_DIB_BUFFER_INVALID=-10018]="EC_DIB_BUFFER_INVALID",_[_.EC_PDF_READ_FAILED=-10021]="EC_PDF_READ_FAILED",_[_.EC_PDF_DLL_MISSING=-10022]="EC_PDF_DLL_MISSING",_[_.EC_PAGE_NUMBER_INVALID=-10023]="EC_PAGE_NUMBER_INVALID",_[_.EC_CUSTOM_SIZE_INVALID=-10024]="EC_CUSTOM_SIZE_INVALID",_[_.EC_TIMEOUT=-10026]="EC_TIMEOUT",_[_.EC_JSON_PARSE_FAILED=-10030]="EC_JSON_PARSE_FAILED",_[_.EC_JSON_TYPE_INVALID=-10031]="EC_JSON_TYPE_INVALID",_[_.EC_JSON_KEY_INVALID=-10032]="EC_JSON_KEY_INVALID",_[_.EC_JSON_VALUE_INVALID=-10033]="EC_JSON_VALUE_INVALID",_[_.EC_JSON_NAME_KEY_MISSING=-10034]="EC_JSON_NAME_KEY_MISSING",_[_.EC_JSON_NAME_VALUE_DUPLICATED=-10035]="EC_JSON_NAME_VALUE_DUPLICATED",_[_.EC_TEMPLATE_NAME_INVALID=-10036]="EC_TEMPLATE_NAME_INVALID",_[_.EC_JSON_NAME_REFERENCE_INVALID=-10037]="EC_JSON_NAME_REFERENCE_INVALID",_[_.EC_PARAMETER_VALUE_INVALID=-10038]="EC_PARAMETER_VALUE_INVALID",_[_.EC_DOMAIN_NOT_MATCH=-10039]="EC_DOMAIN_NOT_MATCH",_[_.EC_RESERVED_INFO_NOT_MATCH=-10040]="EC_RESERVED_INFO_NOT_MATCH",_[_.EC_LICENSE_KEY_NOT_MATCHED=-10043]="EC_LICENSE_KEY_NOT_MATCHED",_[_.EC_REQUEST_FAILED=-10044]="EC_REQUEST_FAILED",_[_.EC_LICENSE_INIT_FAILED=-10045]="EC_LICENSE_INIT_FAILED",_[_.EC_SET_MODE_ARGUMENT_ERROR=-10051]="EC_SET_MODE_ARGUMENT_ERROR",_[_.EC_LICENSE_CONTENT_INVALID=-10052]="EC_LICENSE_CONTENT_INVALID",_[_.EC_LICENSE_KEY_INVALID=-10053]="EC_LICENSE_KEY_INVALID",_[_.EC_LICENSE_DEVICE_RUNS_OUT=-10054]="EC_LICENSE_DEVICE_RUNS_OUT",_[_.EC_GET_MODE_ARGUMENT_ERROR=-10055]="EC_GET_MODE_ARGUMENT_ERROR",_[_.EC_IRT_LICENSE_INVALID=-10056]="EC_IRT_LICENSE_INVALID",_[_.EC_FILE_SAVE_FAILED=-10058]="EC_FILE_SAVE_FAILED",_[_.EC_STAGE_TYPE_INVALID=-10059]="EC_STAGE_TYPE_INVALID",_[_.EC_IMAGE_ORIENTATION_INVALID=-10060]="EC_IMAGE_ORIENTATION_INVALID",_[_.EC_CONVERT_COMPLEX_TEMPLATE_ERROR=-10061]="EC_CONVERT_COMPLEX_TEMPLATE_ERROR",_[_.EC_CALL_REJECTED_WHEN_CAPTURING=-10062]="EC_CALL_REJECTED_WHEN_CAPTURING",_[_.EC_NO_IMAGE_SOURCE=-10063]="EC_NO_IMAGE_SOURCE",_[_.EC_READ_DIRECTORY_FAILED=-10064]="EC_READ_DIRECTORY_FAILED",_[_.EC_MODULE_NOT_FOUND=-10065]="EC_MODULE_NOT_FOUND",_[_.EC_MULTI_PAGES_NOT_SUPPORTED=-10066]="EC_MULTI_PAGES_NOT_SUPPORTED",_[_.EC_NO_LICENSE=-2e4]="EC_NO_LICENSE",_[_.EC_HANDSHAKE_CODE_INVALID=-20001]="EC_HANDSHAKE_CODE_INVALID",_[_.EC_LICENSE_BUFFER_FAILED=-20002]="EC_LICENSE_BUFFER_FAILED",_[_.EC_LICENSE_SYNC_FAILED=-20003]="EC_LICENSE_SYNC_FAILED",_[_.EC_DEVICE_NOT_MATCH=-20004]="EC_DEVICE_NOT_MATCH",_[_.EC_BIND_DEVICE_FAILED=-20005]="EC_BIND_DEVICE_FAILED",_[_.EC_INSTANCE_COUNT_OVER_LIMIT=-20008]="EC_INSTANCE_COUNT_OVER_LIMIT",_[_.EC_TRIAL_LICENSE=-20010]="EC_TRIAL_LICENSE",_[_.EC_LICENSE_VERSION_NOT_MATCH=-20011]="EC_LICENSE_VERSION_NOT_MATCH",_[_.EC_FAILED_TO_REACH_DLS=-20200]="EC_FAILED_TO_REACH_DLS",_[_.EC_BARCODE_FORMAT_INVALID=-30009]="EC_BARCODE_FORMAT_INVALID",_[_.EC_QR_LICENSE_INVALID=-30016]="EC_QR_LICENSE_INVALID",_[_.EC_1D_LICENSE_INVALID=-30017]="EC_1D_LICENSE_INVALID",_[_.EC_PDF417_LICENSE_INVALID=-30019]="EC_PDF417_LICENSE_INVALID",_[_.EC_DATAMATRIX_LICENSE_INVALID=-30020]="EC_DATAMATRIX_LICENSE_INVALID",_[_.EC_CUSTOM_MODULESIZE_INVALID=-30025]="EC_CUSTOM_MODULESIZE_INVALID",_[_.EC_AZTEC_LICENSE_INVALID=-30041]="EC_AZTEC_LICENSE_INVALID",_[_.EC_PATCHCODE_LICENSE_INVALID=-30046]="EC_PATCHCODE_LICENSE_INVALID",_[_.EC_POSTALCODE_LICENSE_INVALID=-30047]="EC_POSTALCODE_LICENSE_INVALID",_[_.EC_DPM_LICENSE_INVALID=-30048]="EC_DPM_LICENSE_INVALID",_[_.EC_FRAME_DECODING_THREAD_EXISTS=-30049]="EC_FRAME_DECODING_THREAD_EXISTS",_[_.EC_STOP_DECODING_THREAD_FAILED=-30050]="EC_STOP_DECODING_THREAD_FAILED",_[_.EC_MAXICODE_LICENSE_INVALID=-30057]="EC_MAXICODE_LICENSE_INVALID",_[_.EC_GS1_DATABAR_LICENSE_INVALID=-30058]="EC_GS1_DATABAR_LICENSE_INVALID",_[_.EC_GS1_COMPOSITE_LICENSE_INVALID=-30059]="EC_GS1_COMPOSITE_LICENSE_INVALID",_[_.EC_DOTCODE_LICENSE_INVALID=-30061]="EC_DOTCODE_LICENSE_INVALID",_[_.EC_PHARMACODE_LICENSE_INVALID=-30062]="EC_PHARMACODE_LICENSE_INVALID",_[_.EC_CHARACTER_MODEL_FILE_NOT_FOUND=-40100]="EC_CHARACTER_MODEL_FILE_NOT_FOUND",_[_.EC_QUADRILATERAL_INVALID=-50057]="EC_QUADRILATERAL_INVALID",_[_.EC_CAMERA_MODULE_NOT_EXIST=-60003]="EC_CAMERA_MODULE_NOT_EXIST",_[_.EC_CAMERA_ID_NOT_EXIST=-60006]="EC_CAMERA_ID_NOT_EXIST",_[_.EC_NO_SENSOR=-60045]="EC_NO_SENSOR",_[_.EC_PANORAMA_LICENSE_INVALID=-70060]="EC_PANORAMA_LICENSE_INVALID",_[_.EC_RESOURCE_PATH_NOT_EXIST=-90001]="EC_RESOURCE_PATH_NOT_EXIST",_[_.EC_RESOURCE_LOAD_FAILED=-90002]="EC_RESOURCE_LOAD_FAILED",_[_.EC_CODE_SPECIFICATION_NOT_FOUND=-90003]="EC_CODE_SPECIFICATION_NOT_FOUND",_[_.EC_FULL_CODE_EMPTY=-90004]="EC_FULL_CODE_EMPTY",_[_.EC_FULL_CODE_PREPROCESS_FAILED=-90005]="EC_FULL_CODE_PREPROCESS_FAILED",_[_.EC_ZA_DL_LICENSE_INVALID=-90006]="EC_ZA_DL_LICENSE_INVALID",_[_.EC_AAMVA_DL_ID_LICENSE_INVALID=-90007]="EC_AAMVA_DL_ID_LICENSE_INVALID",_[_.EC_AADHAAR_LICENSE_INVALID=-90008]="EC_AADHAAR_LICENSE_INVALID",_[_.EC_MRTD_LICENSE_INVALID=-90009]="EC_MRTD_LICENSE_INVALID",_[_.EC_VIN_LICENSE_INVALID=-90010]="EC_VIN_LICENSE_INVALID",_[_.EC_CUSTOMIZED_CODE_TYPE_LICENSE_INVALID=-90011]="EC_CUSTOMIZED_CODE_TYPE_LICENSE_INVALID"}(d||(d={})),function(_){_[_.GEM_SKIP=0]="GEM_SKIP",_[_.GEM_AUTO=1]="GEM_AUTO",_[_.GEM_GENERAL=2]="GEM_GENERAL",_[_.GEM_GRAY_EQUALIZE=4]="GEM_GRAY_EQUALIZE",_[_.GEM_GRAY_SMOOTH=8]="GEM_GRAY_SMOOTH",_[_.GEM_SHARPEN_SMOOTH=16]="GEM_SHARPEN_SMOOTH",_[_.GEM_REV=-2147483648]="GEM_REV"}(l||(l={})),function(_){_[_.GTM_SKIP=0]="GTM_SKIP",_[_.GTM_INVERTED=1]="GTM_INVERTED",_[_.GTM_ORIGINAL=2]="GTM_ORIGINAL",_[_.GTM_AUTO=4]="GTM_AUTO",_[_.GTM_REV=-2147483648]="GTM_REV"}(u||(u={})),function(_){_[_.ITT_FILE_IMAGE=0]="ITT_FILE_IMAGE",_[_.ITT_VIDEO_FRAME=1]="ITT_VIDEO_FRAME"}(g||(g={})),function(_){_[_.PDFRM_VECTOR=1]="PDFRM_VECTOR",_[_.PDFRM_RASTER=2]="PDFRM_RASTER",_[_.PDFRM_REV=-2147483648]="PDFRM_REV"}(m||(m={})),function(_){_[_.RDS_RASTERIZED_PAGES=0]="RDS_RASTERIZED_PAGES",_[_.RDS_EXTRACTED_IMAGES=1]="RDS_EXTRACTED_IMAGES"}(Y||(Y={})),function(_){_[_.IRUT_NULL=0]="IRUT_NULL",_[_.IRUT_COLOUR_IMAGE=1]="IRUT_COLOUR_IMAGE",_[_.IRUT_SCALED_DOWN_COLOUR_IMAGE=2]="IRUT_SCALED_DOWN_COLOUR_IMAGE",_[_.IRUT_GRAYSCALE_IMAGE=4]="IRUT_GRAYSCALE_IMAGE",_[_.IRUT_TRANSOFORMED_GRAYSCALE_IMAGE=8]="IRUT_TRANSOFORMED_GRAYSCALE_IMAGE",_[_.IRUT_ENHANCED_GRAYSCALE_IMAGE=16]="IRUT_ENHANCED_GRAYSCALE_IMAGE",_[_.IRUT_PREDETECTED_REGIONS=32]="IRUT_PREDETECTED_REGIONS",_[_.IRUT_BINARY_IMAGE=64]="IRUT_BINARY_IMAGE",_[_.IRUT_TEXTURE_DETECTION_RESULT=128]="IRUT_TEXTURE_DETECTION_RESULT",_[_.IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE=256]="IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE",_[_.IRUT_TEXTURE_REMOVED_BINARY_IMAGE=512]="IRUT_TEXTURE_REMOVED_BINARY_IMAGE",_[_.IRUT_CONTOURS=1024]="IRUT_CONTOURS",_[_.IRUT_LINE_SEGMENTS=2048]="IRUT_LINE_SEGMENTS",_[_.IRUT_TEXT_ZONES=4096]="IRUT_TEXT_ZONES",_[_.IRUT_TEXT_REMOVED_BINARY_IMAGE=8192]="IRUT_TEXT_REMOVED_BINARY_IMAGE",_[_.IRUT_CANDIDATE_BARCODE_ZONES=16384]="IRUT_CANDIDATE_BARCODE_ZONES",_[_.IRUT_LOCALIZED_BARCODES=32768]="IRUT_LOCALIZED_BARCODES",_[_.IRUT_SCALED_UP_BARCODE_IMAGE=65536]="IRUT_SCALED_UP_BARCODE_IMAGE",_[_.IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE=131072]="IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE",_[_.IRUT_COMPLEMENTED_BARCODE_IMAGE=262144]="IRUT_COMPLEMENTED_BARCODE_IMAGE",_[_.IRUT_DECODED_BARCODES=524288]="IRUT_DECODED_BARCODES",_[_.IRUT_LONG_LINES=1048576]="IRUT_LONG_LINES",_[_.IRUT_CORNERS=2097152]="IRUT_CORNERS",_[_.IRUT_CANDIDATE_QUAD_EDGES=4194304]="IRUT_CANDIDATE_QUAD_EDGES",_[_.IRUT_DETECTED_QUADS=8388608]="IRUT_DETECTED_QUADS",_[_.IRUT_LOCALIZED_TEXT_LINES=16777216]="IRUT_LOCALIZED_TEXT_LINES",_[_.IRUT_RECOGNIZED_TEXT_LINES=33554432]="IRUT_RECOGNIZED_TEXT_LINES",_[_.IRUT_NORMALIZED_IMAGES=67108864]="IRUT_NORMALIZED_IMAGES",_[_.IRUT_ALL=134217727]="IRUT_ALL"}(w||(w={})),function(_){_[_.ROET_PREDETECTED_REGION=0]="ROET_PREDETECTED_REGION",_[_.ROET_LOCALIZED_BARCODE=1]="ROET_LOCALIZED_BARCODE",_[_.ROET_DECODED_BARCODE=2]="ROET_DECODED_BARCODE",_[_.ROET_LOCALIZED_TEXT_LINE=3]="ROET_LOCALIZED_TEXT_LINE",_[_.ROET_RECOGNIZED_TEXT_LINE=4]="ROET_RECOGNIZED_TEXT_LINE",_[_.ROET_DETECTED_QUAD=5]="ROET_DETECTED_QUAD",_[_.ROET_NORMALIZED_IMAGE=6]="ROET_NORMALIZED_IMAGE"}(p||(p={})),function(_){_[_.ST_NULL=0]="ST_NULL",_[_.ST_REGION_PREDETECTION=1]="ST_REGION_PREDETECTION",_[_.ST_BARCODE_LOCALIZATION=2]="ST_BARCODE_LOCALIZATION",_[_.ST_BARCODE_DECODING=3]="ST_BARCODE_DECODING",_[_.ST_TEXT_LINE_LOCALIZATION=4]="ST_TEXT_LINE_LOCALIZATION",_[_.ST_TEXT_LINE_RECOGNITION=5]="ST_TEXT_LINE_RECOGNITION",_[_.ST_DOCUMENT_DETECTION=6]="ST_DOCUMENT_DETECTION",_[_.ST_DOCUMENT_NORMALIZATION=7]="ST_DOCUMENT_NORMALIZATION"}(y||(y={}));export{X as CoreModule,I as EnumBufferOverflowProtectionMode,V as EnumCapturedResultItemType,C as EnumColourChannelUsageType,c as EnumCornerType,d as EnumErrorCode,l as EnumGrayscaleEnhancementMode,u as EnumGrayscaleTransformationMode,A as EnumImagePixelFormat,g as EnumImageTagType,w as EnumIntermediateResultUnitType,m as EnumPDFReadingMode,Y as EnumRasterDataSource,p as EnumRegionObjectElementType,y as EnumSectionType,H as ImageSourceAdapter,v as IntermediateResultManager,Z as IntermediateResultReceiver,L as _isArc,t as _isContour,O as _isDSImageData,S as _isDSRect,i as _isImageTag,s as _isLineSegment,r as _isPoint,n as _isPolygon,M as _isQuad,a as _isRect};
function _(_,E,I,C){if("a"===I&&!C)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof E?_!==E||!C:!E.has(_))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===I?C:"a"===I?C.call(_):C?C.value:E.get(_)}function E(_,E,I,C,A){if("m"===C)throw new TypeError("Private method is not writable");if("a"===C&&!A)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof E?_!==E||!A:!E.has(_))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===C?A.call(_,I):A?A.value=I:E.set(_,I),I}var I,C,A;"function"==typeof SuppressedError&&SuppressedError,function(_){_[_.BOPM_BLOCK=0]="BOPM_BLOCK",_[_.BOPM_UPDATE=1]="BOPM_UPDATE"}(I||(I={})),function(_){_[_.CCUT_AUTO=0]="CCUT_AUTO",_[_.CCUT_FULL_CHANNEL=1]="CCUT_FULL_CHANNEL",_[_.CCUT_Y_CHANNEL_ONLY=2]="CCUT_Y_CHANNEL_ONLY",_[_.CCUT_RGB_R_CHANNEL_ONLY=3]="CCUT_RGB_R_CHANNEL_ONLY",_[_.CCUT_RGB_G_CHANNEL_ONLY=4]="CCUT_RGB_G_CHANNEL_ONLY",_[_.CCUT_RGB_B_CHANNEL_ONLY=5]="CCUT_RGB_B_CHANNEL_ONLY"}(C||(C={})),function(_){_[_.IPF_BINARY=0]="IPF_BINARY",_[_.IPF_BINARYINVERTED=1]="IPF_BINARYINVERTED",_[_.IPF_GRAYSCALED=2]="IPF_GRAYSCALED",_[_.IPF_NV21=3]="IPF_NV21",_[_.IPF_RGB_565=4]="IPF_RGB_565",_[_.IPF_RGB_555=5]="IPF_RGB_555",_[_.IPF_RGB_888=6]="IPF_RGB_888",_[_.IPF_ARGB_8888=7]="IPF_ARGB_8888",_[_.IPF_RGB_161616=8]="IPF_RGB_161616",_[_.IPF_ARGB_16161616=9]="IPF_ARGB_16161616",_[_.IPF_ABGR_8888=10]="IPF_ABGR_8888",_[_.IPF_ABGR_16161616=11]="IPF_ABGR_16161616",_[_.IPF_BGR_888=12]="IPF_BGR_888",_[_.IPF_BINARY_8=13]="IPF_BINARY_8",_[_.IPF_NV12=14]="IPF_NV12"}(A||(A={}));const T=_=>Object.prototype.toString.call(_),R=_=>Array.isArray?Array.isArray(_):"[object Array]"===T(_),N=_=>"[object Boolean]"===T(_),e=_=>"number"==typeof _&&!Number.isNaN(_),D=_=>null!==_&&"object"==typeof _&&!Array.isArray(_),L=_=>!!D(_)&&(!!e(_.x)&&(!!e(_.y)&&(!!e(_.radius)&&(!(_.radius<0)&&(!!e(_.startAngle)&&!!e(_.endAngle)))))),t=_=>!!D(_)&&(!!R(_.points)&&(0!=_.points.length&&!_.points.some((_=>!r(_))))),O=_=>!!D(_)&&(_.bytes instanceof Uint8Array&&(!!e(_.width)&&(!(_.width<=0)&&(!!e(_.height)&&(!(_.height<=0)&&(!!e(_.stride)&&(!(_.stride<=0)&&("format"in _&&!("tag"in _&&!i(_.tag)))))))))),S=_=>!!D(_)&&(!!e(_.left)&&(!(_.left<0)&&(!!e(_.top)&&(!(_.top<0)&&(!!e(_.right)&&(!(_.right<0)&&(!!e(_.bottom)&&(!(_.bottom<0)&&(!(_.left>=_.right)&&(!(_.top>=_.bottom)&&!!N(_.isMeasuredInPercentage))))))))))),i=_=>!!D(_)&&(!!e(_.imageId)&&"type"in _),s=_=>!!D(_)&&(!!r(_.startPoint)&&(!!r(_.endPoint)&&(_.startPoint.x!=_.endPoint.x||_.startPoint.y!=_.endPoint.y))),r=_=>!!D(_)&&(!!e(_.x)&&!!e(_.y)),n=_=>!!D(_)&&(!!R(_.points)&&(0!=_.points.length&&!_.points.some((_=>!r(_))))),M=_=>!!D(_)&&(!!R(_.points)&&(0!=_.points.length&&4==_.points.length&&!_.points.some((_=>!r(_))))),a=_=>!!D(_)&&(!!e(_.x)&&(!!e(_.y)&&(!!e(_.width)&&(!(_.width<0)&&(!!e(_.height)&&(!(_.height<0)&&!("isMeasuredInPercentage"in _&&!N(_.isMeasuredInPercentage))))))));var G,U,P,o,F,h,f,B,V,c,d,l,u,g,m,Y,w,p,y;class H{constructor(){G.add(this),U.set(this,[]),P.set(this,1),o.set(this,I.BOPM_BLOCK),F.set(this,!1),h.set(this,void 0),f.set(this,C.CCUT_AUTO)}get _isFetchingStarted(){return _(this,F,"f")}addImageToBuffer(E){var C;if(!O(E))throw new TypeError("Invalid 'image'.");if((null===(C=E.tag)||void 0===C?void 0:C.hasOwnProperty("imageId"))&&"number"==typeof E.tag.imageId&&this.hasImage(E.tag.imageId))throw new Error("Existed imageId.");if(_(this,U,"f").length>=_(this,P,"f"))switch(_(this,o,"f")){case I.BOPM_BLOCK:break;case I.BOPM_UPDATE:if(_(this,U,"f").push(E),D(_(this,h,"f"))&&e(_(this,h,"f").imageId)&&1==_(this,h,"f").keepInBuffer)for(;_(this,U,"f").length>_(this,P,"f");){const E=_(this,U,"f").findIndex((E=>{var I;return(null===(I=E.tag)||void 0===I?void 0:I.imageId)!==_(this,h,"f").imageId}));_(this,U,"f").splice(E,1)}else _(this,U,"f").splice(0,_(this,U,"f").length-_(this,P,"f"))}else _(this,U,"f").push(E)}getImage(){if(0===_(this,U,"f").length)return null;let E;if(_(this,h,"f")&&e(_(this,h,"f").imageId)){const I=_(this,G,"m",B).call(this,_(this,h,"f").imageId);if(I<0)throw new Error(`Image with id ${_(this,h,"f").imageId} doesn't exist.`);E=_(this,U,"f").slice(I,I+1)[0]}else E=_(this,U,"f").pop();if([A.IPF_RGB_565,A.IPF_RGB_555,A.IPF_RGB_888,A.IPF_ARGB_8888,A.IPF_RGB_161616,A.IPF_ARGB_16161616,A.IPF_ABGR_8888,A.IPF_ABGR_16161616,A.IPF_BGR_888].includes(E.format)){if(_(this,f,"f")===C.CCUT_RGB_R_CHANNEL_ONLY){const _=new Uint8Array(E.width*E.height);for(let I=0;I<_.length;I++)switch(E.format){case A.IPF_RGB_565:case A.IPF_RGB_555:case A.IPF_RGB_888:case A.IPF_RGB_161616:_[I]=E.bytes[3*I+2];break;case A.IPF_ARGB_8888:case A.IPF_ARGB_16161616:_[I]=E.bytes[4*I+2];break;case A.IPF_BGR_888:_[I]=E.bytes[3*I];break;case A.IPF_ABGR_8888:case A.IPF_ABGR_16161616:_[I]=E.bytes[4*I]}E.bytes=_,E.stride=E.width,E.format=A.IPF_GRAYSCALED}else if(_(this,f,"f")===C.CCUT_RGB_G_CHANNEL_ONLY){const _=new Uint8Array(E.width*E.height);for(let I=0;I<_.length;I++)switch(E.format){case A.IPF_RGB_565:case A.IPF_RGB_555:case A.IPF_RGB_888:case A.IPF_RGB_161616:case A.IPF_BGR_888:_[I]=E.bytes[3*I+1];break;case A.IPF_ARGB_8888:case A.IPF_ARGB_16161616:case A.IPF_ABGR_8888:case A.IPF_ABGR_16161616:_[I]=E.bytes[4*I+1]}E.bytes=_,E.stride=E.width,E.format=A.IPF_GRAYSCALED}else if(_(this,f,"f")===C.CCUT_RGB_B_CHANNEL_ONLY){const _=new Uint8Array(E.width*E.height);for(let I=0;I<_.length;I++)switch(E.format){case A.IPF_RGB_565:case A.IPF_RGB_555:case A.IPF_RGB_888:case A.IPF_RGB_161616:_[I]=E.bytes[3*I];break;case A.IPF_ARGB_8888:case A.IPF_ARGB_16161616:_[I]=E.bytes[4*I];break;case A.IPF_BGR_888:_[I]=E.bytes[3*I+2];break;case A.IPF_ABGR_8888:case A.IPF_ABGR_16161616:_[I]=E.bytes[4*I+2]}E.bytes=_,E.stride=E.width,E.format=A.IPF_GRAYSCALED}}else[A.IPF_NV21,A.IPF_NV12].includes(E.format);return E}setNextImageToReturn(_,I){if(!((..._)=>0!==_.length&&_.every((_=>e(_))))(_))throw new TypeError("Invalid 'imageId'.");if(void 0!==I&&!N(I))throw new TypeError("Invalid 'keepInBuffer'.");E(this,h,{imageId:_,keepInBuffer:I},"f")}_resetNextReturnedImage(){E(this,h,null,"f")}hasImage(E){return _(this,G,"m",B).call(this,E)>=0}startFetching(){E(this,F,!0,"f")}stopFetching(){E(this,F,!1,"f")}setMaximumImageCount(I){if("number"!=typeof I)throw new TypeError("Invalid 'count'.");if(I<1||Math.round(I)!==I)throw new Error("Invalid 'count'.");for(E(this,P,I,"f");_(this,U,"f")&&_(this,U,"f").length>I;)_(this,U,"f").shift()}getMaximumImageCount(){return _(this,P,"f")}getImageCount(){return _(this,U,"f").length}clearBuffer(){_(this,U,"f").length=0}isBufferEmpty(){return 0===_(this,U,"f").length}setBufferOverflowProtectionMode(_){E(this,o,_,"f")}getBufferOverflowProtectionMode(){return _(this,o,"f")}setColourChannelUsageType(_){E(this,f,_,"f")}getColourChannelUsageType(){return _(this,f,"f")}}U=new WeakMap,P=new WeakMap,o=new WeakMap,F=new WeakMap,h=new WeakMap,f=new WeakMap,G=new WeakSet,B=function(E){if("number"!=typeof E)throw new TypeError("Invalid 'imageId'.");return _(this,U,"f").findIndex((_=>{var I;return(null===(I=_.tag)||void 0===I?void 0:I.imageId)===E}))};class X{static getVersion(){return"3.0.10"}}class v{constructor(){this.intermediateResultReceiverSet=new Set}addResultReceiver(_){if("object"!=typeof _)throw new Error("Invalid receiver.");this.intermediateResultReceiverSet.add(_)}removeResultReceiver(_){this.intermediateResultReceiverSet.delete(_)}async getOriginalImage(_){return null}}class Z{constructor(){this.onTaskResultsReceived=null,this.onPredetectedRegionsReceived=null,this.onDecodedBarcodesReceived=null,this.onRecognizedTextLinesReceived=null,this.onDetectedQuadsReceived=null,this.onNormalizedImagesReceived=null}}!function(_){_[_.CRIT_ORIGINAL_IMAGE=1]="CRIT_ORIGINAL_IMAGE",_[_.CRIT_BARCODE=2]="CRIT_BARCODE",_[_.CRIT_TEXT_LINE=4]="CRIT_TEXT_LINE",_[_.CRIT_DETECTED_QUAD=8]="CRIT_DETECTED_QUAD",_[_.CRIT_NORMALIZED_IMAGE=16]="CRIT_NORMALIZED_IMAGE",_[_.CRIT_PARSED_RESULT=32]="CRIT_PARSED_RESULT"}(V||(V={})),function(_){_[_.CT_NORMAL_INTERSECTED=0]="CT_NORMAL_INTERSECTED",_[_.CT_T_INTERSECTED=1]="CT_T_INTERSECTED",_[_.CT_CROSS_INTERSECTED=2]="CT_CROSS_INTERSECTED",_[_.CT_NOT_INTERSECTED=3]="CT_NOT_INTERSECTED"}(c||(c={})),function(_){_[_.EC_OK=0]="EC_OK",_[_.EC_UNKNOWN=-1e4]="EC_UNKNOWN",_[_.EC_NO_MEMORY=-10001]="EC_NO_MEMORY",_[_.EC_NULL_POINTER=-10002]="EC_NULL_POINTER",_[_.EC_LICENSE_INVALID=-10003]="EC_LICENSE_INVALID",_[_.EC_LICENSE_EXPIRED=-10004]="EC_LICENSE_EXPIRED",_[_.EC_FILE_NOT_FOUND=-10005]="EC_FILE_NOT_FOUND",_[_.EC_FILE_TYPE_NOT_SUPPORTED=-10006]="EC_FILE_TYPE_NOT_SUPPORTED",_[_.EC_BPP_NOT_SUPPORTED=-10007]="EC_BPP_NOT_SUPPORTED",_[_.EC_INDEX_INVALID=-10008]="EC_INDEX_INVALID",_[_.EC_CUSTOM_REGION_INVALID=-10010]="EC_CUSTOM_REGION_INVALID",_[_.EC_IMAGE_READ_FAILED=-10012]="EC_IMAGE_READ_FAILED",_[_.EC_TIFF_READ_FAILED=-10013]="EC_TIFF_READ_FAILED",_[_.EC_DIB_BUFFER_INVALID=-10018]="EC_DIB_BUFFER_INVALID",_[_.EC_PDF_READ_FAILED=-10021]="EC_PDF_READ_FAILED",_[_.EC_PDF_DLL_MISSING=-10022]="EC_PDF_DLL_MISSING",_[_.EC_PAGE_NUMBER_INVALID=-10023]="EC_PAGE_NUMBER_INVALID",_[_.EC_CUSTOM_SIZE_INVALID=-10024]="EC_CUSTOM_SIZE_INVALID",_[_.EC_TIMEOUT=-10026]="EC_TIMEOUT",_[_.EC_JSON_PARSE_FAILED=-10030]="EC_JSON_PARSE_FAILED",_[_.EC_JSON_TYPE_INVALID=-10031]="EC_JSON_TYPE_INVALID",_[_.EC_JSON_KEY_INVALID=-10032]="EC_JSON_KEY_INVALID",_[_.EC_JSON_VALUE_INVALID=-10033]="EC_JSON_VALUE_INVALID",_[_.EC_JSON_NAME_KEY_MISSING=-10034]="EC_JSON_NAME_KEY_MISSING",_[_.EC_JSON_NAME_VALUE_DUPLICATED=-10035]="EC_JSON_NAME_VALUE_DUPLICATED",_[_.EC_TEMPLATE_NAME_INVALID=-10036]="EC_TEMPLATE_NAME_INVALID",_[_.EC_JSON_NAME_REFERENCE_INVALID=-10037]="EC_JSON_NAME_REFERENCE_INVALID",_[_.EC_PARAMETER_VALUE_INVALID=-10038]="EC_PARAMETER_VALUE_INVALID",_[_.EC_DOMAIN_NOT_MATCH=-10039]="EC_DOMAIN_NOT_MATCH",_[_.EC_RESERVED_INFO_NOT_MATCH=-10040]="EC_RESERVED_INFO_NOT_MATCH",_[_.EC_LICENSE_KEY_NOT_MATCHED=-10043]="EC_LICENSE_KEY_NOT_MATCHED",_[_.EC_REQUEST_FAILED=-10044]="EC_REQUEST_FAILED",_[_.EC_LICENSE_INIT_FAILED=-10045]="EC_LICENSE_INIT_FAILED",_[_.EC_SET_MODE_ARGUMENT_ERROR=-10051]="EC_SET_MODE_ARGUMENT_ERROR",_[_.EC_LICENSE_CONTENT_INVALID=-10052]="EC_LICENSE_CONTENT_INVALID",_[_.EC_LICENSE_KEY_INVALID=-10053]="EC_LICENSE_KEY_INVALID",_[_.EC_LICENSE_DEVICE_RUNS_OUT=-10054]="EC_LICENSE_DEVICE_RUNS_OUT",_[_.EC_GET_MODE_ARGUMENT_ERROR=-10055]="EC_GET_MODE_ARGUMENT_ERROR",_[_.EC_IRT_LICENSE_INVALID=-10056]="EC_IRT_LICENSE_INVALID",_[_.EC_FILE_SAVE_FAILED=-10058]="EC_FILE_SAVE_FAILED",_[_.EC_STAGE_TYPE_INVALID=-10059]="EC_STAGE_TYPE_INVALID",_[_.EC_IMAGE_ORIENTATION_INVALID=-10060]="EC_IMAGE_ORIENTATION_INVALID",_[_.EC_CONVERT_COMPLEX_TEMPLATE_ERROR=-10061]="EC_CONVERT_COMPLEX_TEMPLATE_ERROR",_[_.EC_CALL_REJECTED_WHEN_CAPTURING=-10062]="EC_CALL_REJECTED_WHEN_CAPTURING",_[_.EC_NO_IMAGE_SOURCE=-10063]="EC_NO_IMAGE_SOURCE",_[_.EC_READ_DIRECTORY_FAILED=-10064]="EC_READ_DIRECTORY_FAILED",_[_.EC_MODULE_NOT_FOUND=-10065]="EC_MODULE_NOT_FOUND",_[_.EC_MULTI_PAGES_NOT_SUPPORTED=-10066]="EC_MULTI_PAGES_NOT_SUPPORTED",_[_.EC_NO_LICENSE=-2e4]="EC_NO_LICENSE",_[_.EC_HANDSHAKE_CODE_INVALID=-20001]="EC_HANDSHAKE_CODE_INVALID",_[_.EC_LICENSE_BUFFER_FAILED=-20002]="EC_LICENSE_BUFFER_FAILED",_[_.EC_LICENSE_SYNC_FAILED=-20003]="EC_LICENSE_SYNC_FAILED",_[_.EC_DEVICE_NOT_MATCH=-20004]="EC_DEVICE_NOT_MATCH",_[_.EC_BIND_DEVICE_FAILED=-20005]="EC_BIND_DEVICE_FAILED",_[_.EC_INSTANCE_COUNT_OVER_LIMIT=-20008]="EC_INSTANCE_COUNT_OVER_LIMIT",_[_.EC_TRIAL_LICENSE=-20010]="EC_TRIAL_LICENSE",_[_.EC_LICENSE_VERSION_NOT_MATCH=-20011]="EC_LICENSE_VERSION_NOT_MATCH",_[_.EC_FAILED_TO_REACH_DLS=-20200]="EC_FAILED_TO_REACH_DLS",_[_.EC_BARCODE_FORMAT_INVALID=-30009]="EC_BARCODE_FORMAT_INVALID",_[_.EC_QR_LICENSE_INVALID=-30016]="EC_QR_LICENSE_INVALID",_[_.EC_1D_LICENSE_INVALID=-30017]="EC_1D_LICENSE_INVALID",_[_.EC_PDF417_LICENSE_INVALID=-30019]="EC_PDF417_LICENSE_INVALID",_[_.EC_DATAMATRIX_LICENSE_INVALID=-30020]="EC_DATAMATRIX_LICENSE_INVALID",_[_.EC_CUSTOM_MODULESIZE_INVALID=-30025]="EC_CUSTOM_MODULESIZE_INVALID",_[_.EC_AZTEC_LICENSE_INVALID=-30041]="EC_AZTEC_LICENSE_INVALID",_[_.EC_PATCHCODE_LICENSE_INVALID=-30046]="EC_PATCHCODE_LICENSE_INVALID",_[_.EC_POSTALCODE_LICENSE_INVALID=-30047]="EC_POSTALCODE_LICENSE_INVALID",_[_.EC_DPM_LICENSE_INVALID=-30048]="EC_DPM_LICENSE_INVALID",_[_.EC_FRAME_DECODING_THREAD_EXISTS=-30049]="EC_FRAME_DECODING_THREAD_EXISTS",_[_.EC_STOP_DECODING_THREAD_FAILED=-30050]="EC_STOP_DECODING_THREAD_FAILED",_[_.EC_MAXICODE_LICENSE_INVALID=-30057]="EC_MAXICODE_LICENSE_INVALID",_[_.EC_GS1_DATABAR_LICENSE_INVALID=-30058]="EC_GS1_DATABAR_LICENSE_INVALID",_[_.EC_GS1_COMPOSITE_LICENSE_INVALID=-30059]="EC_GS1_COMPOSITE_LICENSE_INVALID",_[_.EC_DOTCODE_LICENSE_INVALID=-30061]="EC_DOTCODE_LICENSE_INVALID",_[_.EC_PHARMACODE_LICENSE_INVALID=-30062]="EC_PHARMACODE_LICENSE_INVALID",_[_.EC_CHARACTER_MODEL_FILE_NOT_FOUND=-40100]="EC_CHARACTER_MODEL_FILE_NOT_FOUND",_[_.EC_QUADRILATERAL_INVALID=-50057]="EC_QUADRILATERAL_INVALID",_[_.EC_CAMERA_MODULE_NOT_EXIST=-60003]="EC_CAMERA_MODULE_NOT_EXIST",_[_.EC_CAMERA_ID_NOT_EXIST=-60006]="EC_CAMERA_ID_NOT_EXIST",_[_.EC_NO_SENSOR=-60045]="EC_NO_SENSOR",_[_.EC_PANORAMA_LICENSE_INVALID=-70060]="EC_PANORAMA_LICENSE_INVALID",_[_.EC_RESOURCE_PATH_NOT_EXIST=-90001]="EC_RESOURCE_PATH_NOT_EXIST",_[_.EC_RESOURCE_LOAD_FAILED=-90002]="EC_RESOURCE_LOAD_FAILED",_[_.EC_CODE_SPECIFICATION_NOT_FOUND=-90003]="EC_CODE_SPECIFICATION_NOT_FOUND",_[_.EC_FULL_CODE_EMPTY=-90004]="EC_FULL_CODE_EMPTY",_[_.EC_FULL_CODE_PREPROCESS_FAILED=-90005]="EC_FULL_CODE_PREPROCESS_FAILED",_[_.EC_ZA_DL_LICENSE_INVALID=-90006]="EC_ZA_DL_LICENSE_INVALID",_[_.EC_AAMVA_DL_ID_LICENSE_INVALID=-90007]="EC_AAMVA_DL_ID_LICENSE_INVALID",_[_.EC_AADHAAR_LICENSE_INVALID=-90008]="EC_AADHAAR_LICENSE_INVALID",_[_.EC_MRTD_LICENSE_INVALID=-90009]="EC_MRTD_LICENSE_INVALID",_[_.EC_VIN_LICENSE_INVALID=-90010]="EC_VIN_LICENSE_INVALID",_[_.EC_CUSTOMIZED_CODE_TYPE_LICENSE_INVALID=-90011]="EC_CUSTOMIZED_CODE_TYPE_LICENSE_INVALID"}(d||(d={})),function(_){_[_.GEM_SKIP=0]="GEM_SKIP",_[_.GEM_AUTO=1]="GEM_AUTO",_[_.GEM_GENERAL=2]="GEM_GENERAL",_[_.GEM_GRAY_EQUALIZE=4]="GEM_GRAY_EQUALIZE",_[_.GEM_GRAY_SMOOTH=8]="GEM_GRAY_SMOOTH",_[_.GEM_SHARPEN_SMOOTH=16]="GEM_SHARPEN_SMOOTH",_[_.GEM_REV=-2147483648]="GEM_REV"}(l||(l={})),function(_){_[_.GTM_SKIP=0]="GTM_SKIP",_[_.GTM_INVERTED=1]="GTM_INVERTED",_[_.GTM_ORIGINAL=2]="GTM_ORIGINAL",_[_.GTM_AUTO=4]="GTM_AUTO",_[_.GTM_REV=-2147483648]="GTM_REV"}(u||(u={})),function(_){_[_.ITT_FILE_IMAGE=0]="ITT_FILE_IMAGE",_[_.ITT_VIDEO_FRAME=1]="ITT_VIDEO_FRAME"}(g||(g={})),function(_){_[_.PDFRM_VECTOR=1]="PDFRM_VECTOR",_[_.PDFRM_RASTER=2]="PDFRM_RASTER",_[_.PDFRM_REV=-2147483648]="PDFRM_REV"}(m||(m={})),function(_){_[_.RDS_RASTERIZED_PAGES=0]="RDS_RASTERIZED_PAGES",_[_.RDS_EXTRACTED_IMAGES=1]="RDS_EXTRACTED_IMAGES"}(Y||(Y={})),function(_){_[_.IRUT_NULL=0]="IRUT_NULL",_[_.IRUT_COLOUR_IMAGE=1]="IRUT_COLOUR_IMAGE",_[_.IRUT_SCALED_DOWN_COLOUR_IMAGE=2]="IRUT_SCALED_DOWN_COLOUR_IMAGE",_[_.IRUT_GRAYSCALE_IMAGE=4]="IRUT_GRAYSCALE_IMAGE",_[_.IRUT_TRANSOFORMED_GRAYSCALE_IMAGE=8]="IRUT_TRANSOFORMED_GRAYSCALE_IMAGE",_[_.IRUT_ENHANCED_GRAYSCALE_IMAGE=16]="IRUT_ENHANCED_GRAYSCALE_IMAGE",_[_.IRUT_PREDETECTED_REGIONS=32]="IRUT_PREDETECTED_REGIONS",_[_.IRUT_BINARY_IMAGE=64]="IRUT_BINARY_IMAGE",_[_.IRUT_TEXTURE_DETECTION_RESULT=128]="IRUT_TEXTURE_DETECTION_RESULT",_[_.IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE=256]="IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE",_[_.IRUT_TEXTURE_REMOVED_BINARY_IMAGE=512]="IRUT_TEXTURE_REMOVED_BINARY_IMAGE",_[_.IRUT_CONTOURS=1024]="IRUT_CONTOURS",_[_.IRUT_LINE_SEGMENTS=2048]="IRUT_LINE_SEGMENTS",_[_.IRUT_TEXT_ZONES=4096]="IRUT_TEXT_ZONES",_[_.IRUT_TEXT_REMOVED_BINARY_IMAGE=8192]="IRUT_TEXT_REMOVED_BINARY_IMAGE",_[_.IRUT_CANDIDATE_BARCODE_ZONES=16384]="IRUT_CANDIDATE_BARCODE_ZONES",_[_.IRUT_LOCALIZED_BARCODES=32768]="IRUT_LOCALIZED_BARCODES",_[_.IRUT_SCALED_UP_BARCODE_IMAGE=65536]="IRUT_SCALED_UP_BARCODE_IMAGE",_[_.IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE=131072]="IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE",_[_.IRUT_COMPLEMENTED_BARCODE_IMAGE=262144]="IRUT_COMPLEMENTED_BARCODE_IMAGE",_[_.IRUT_DECODED_BARCODES=524288]="IRUT_DECODED_BARCODES",_[_.IRUT_LONG_LINES=1048576]="IRUT_LONG_LINES",_[_.IRUT_CORNERS=2097152]="IRUT_CORNERS",_[_.IRUT_CANDIDATE_QUAD_EDGES=4194304]="IRUT_CANDIDATE_QUAD_EDGES",_[_.IRUT_DETECTED_QUADS=8388608]="IRUT_DETECTED_QUADS",_[_.IRUT_LOCALIZED_TEXT_LINES=16777216]="IRUT_LOCALIZED_TEXT_LINES",_[_.IRUT_RECOGNIZED_TEXT_LINES=33554432]="IRUT_RECOGNIZED_TEXT_LINES",_[_.IRUT_NORMALIZED_IMAGES=67108864]="IRUT_NORMALIZED_IMAGES",_[_.IRUT_ALL=134217727]="IRUT_ALL"}(w||(w={})),function(_){_[_.ROET_PREDETECTED_REGION=0]="ROET_PREDETECTED_REGION",_[_.ROET_LOCALIZED_BARCODE=1]="ROET_LOCALIZED_BARCODE",_[_.ROET_DECODED_BARCODE=2]="ROET_DECODED_BARCODE",_[_.ROET_LOCALIZED_TEXT_LINE=3]="ROET_LOCALIZED_TEXT_LINE",_[_.ROET_RECOGNIZED_TEXT_LINE=4]="ROET_RECOGNIZED_TEXT_LINE",_[_.ROET_DETECTED_QUAD=5]="ROET_DETECTED_QUAD",_[_.ROET_NORMALIZED_IMAGE=6]="ROET_NORMALIZED_IMAGE"}(p||(p={})),function(_){_[_.ST_NULL=0]="ST_NULL",_[_.ST_REGION_PREDETECTION=1]="ST_REGION_PREDETECTION",_[_.ST_BARCODE_LOCALIZATION=2]="ST_BARCODE_LOCALIZATION",_[_.ST_BARCODE_DECODING=3]="ST_BARCODE_DECODING",_[_.ST_TEXT_LINE_LOCALIZATION=4]="ST_TEXT_LINE_LOCALIZATION",_[_.ST_TEXT_LINE_RECOGNITION=5]="ST_TEXT_LINE_RECOGNITION",_[_.ST_DOCUMENT_DETECTION=6]="ST_DOCUMENT_DETECTION",_[_.ST_DOCUMENT_NORMALIZATION=7]="ST_DOCUMENT_NORMALIZATION"}(y||(y={}));export{X as CoreModule,I as EnumBufferOverflowProtectionMode,V as EnumCapturedResultItemType,C as EnumColourChannelUsageType,c as EnumCornerType,d as EnumErrorCode,l as EnumGrayscaleEnhancementMode,u as EnumGrayscaleTransformationMode,A as EnumImagePixelFormat,g as EnumImageTagType,w as EnumIntermediateResultUnitType,m as EnumPDFReadingMode,Y as EnumRasterDataSource,p as EnumRegionObjectElementType,y as EnumSectionType,H as ImageSourceAdapter,v as IntermediateResultManager,Z as IntermediateResultReceiver,L as _isArc,t as _isContour,O as _isDSImageData,S as _isDSRect,i as _isImageTag,s as _isLineSegment,r as _isPoint,n as _isPolygon,M as _isQuad,a as _isRect};

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

* @author Dynamsoft
* @version 3.0.10-beta-202308171924
* @version 3.0.10
* @fileoverview Dynamsoft JavaScript Library for Core
* More info on DC JS: https://www.dynamsoft.com/core/docs/programming/javascript/?ver=latest
*/
!function(E,_){"object"==typeof exports&&"undefined"!=typeof module?_(exports):"function"==typeof define&&define.amd?define(["exports"],_):_(((E="undefined"!=typeof globalThis?globalThis:E||self).Dynamsoft=E.Dynamsoft||{},E.Dynamsoft.Core={}))}(this,(function(E){"use strict";function _(E,_,I,e){if("a"===I&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof _?E!==_||!e:!_.has(E))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===I?e:"a"===I?e.call(E):e?e.value:_.get(E)}function I(E,_,I,e,C){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!C)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof _?E!==_||!C:!_.has(E))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?C.call(E,I):C?C.value=I:_.set(E,I),I}var e,C,T;"function"==typeof SuppressedError&&SuppressedError,E.EnumBufferOverflowProtectionMode=void 0,(e=E.EnumBufferOverflowProtectionMode||(E.EnumBufferOverflowProtectionMode={}))[e.BOPM_BLOCK=0]="BOPM_BLOCK",e[e.BOPM_UPDATE=1]="BOPM_UPDATE",E.EnumColourChannelUsageType=void 0,(C=E.EnumColourChannelUsageType||(E.EnumColourChannelUsageType={}))[C.CCUT_AUTO=0]="CCUT_AUTO",C[C.CCUT_FULL_CHANNEL=1]="CCUT_FULL_CHANNEL",C[C.CCUT_Y_CHANNEL_ONLY=2]="CCUT_Y_CHANNEL_ONLY",C[C.CCUT_RGB_R_CHANNEL_ONLY=3]="CCUT_RGB_R_CHANNEL_ONLY",C[C.CCUT_RGB_G_CHANNEL_ONLY=4]="CCUT_RGB_G_CHANNEL_ONLY",C[C.CCUT_RGB_B_CHANNEL_ONLY=5]="CCUT_RGB_B_CHANNEL_ONLY",E.EnumImagePixelFormat=void 0,(T=E.EnumImagePixelFormat||(E.EnumImagePixelFormat={}))[T.IPF_BINARY=0]="IPF_BINARY",T[T.IPF_BINARYINVERTED=1]="IPF_BINARYINVERTED",T[T.IPF_GRAYSCALED=2]="IPF_GRAYSCALED",T[T.IPF_NV21=3]="IPF_NV21",T[T.IPF_RGB_565=4]="IPF_RGB_565",T[T.IPF_RGB_555=5]="IPF_RGB_555",T[T.IPF_RGB_888=6]="IPF_RGB_888",T[T.IPF_ARGB_8888=7]="IPF_ARGB_8888",T[T.IPF_RGB_161616=8]="IPF_RGB_161616",T[T.IPF_ARGB_16161616=9]="IPF_ARGB_16161616",T[T.IPF_ABGR_8888=10]="IPF_ABGR_8888",T[T.IPF_ABGR_16161616=11]="IPF_ABGR_16161616",T[T.IPF_BGR_888=12]="IPF_BGR_888",T[T.IPF_BINARY_8=13]="IPF_BINARY_8",T[T.IPF_NV12=14]="IPF_NV12";const A=E=>Object.prototype.toString.call(E),R=E=>Array.isArray?Array.isArray(E):"[object Array]"===A(E),t=E=>"[object Boolean]"===A(E),N=E=>"number"==typeof E&&!Number.isNaN(E),D=E=>null!==E&&"object"==typeof E&&!Array.isArray(E),L=E=>!!D(E)&&(E.bytes instanceof Uint8Array&&(!!N(E.width)&&(!(E.width<=0)&&(!!N(E.height)&&(!(E.height<=0)&&(!!N(E.stride)&&(!(E.stride<=0)&&("format"in E&&!("tag"in E&&!O(E.tag)))))))))),O=E=>!!D(E)&&(!!N(E.imageId)&&"type"in E),n=E=>!!D(E)&&(!!N(E.x)&&!!N(E.y));var a,i,r,o,S,s,m,P,M,u,F,U,G,l,d,f,h,g,c;i=new WeakMap,r=new WeakMap,o=new WeakMap,S=new WeakMap,s=new WeakMap,m=new WeakMap,a=new WeakSet,P=function(E){if("number"!=typeof E)throw new TypeError("Invalid 'imageId'.");return _(this,i,"f").findIndex((_=>{var I;return(null===(I=_.tag)||void 0===I?void 0:I.imageId)===E}))};E.EnumCapturedResultItemType=void 0,(M=E.EnumCapturedResultItemType||(E.EnumCapturedResultItemType={}))[M.CRIT_ORIGINAL_IMAGE=1]="CRIT_ORIGINAL_IMAGE",M[M.CRIT_BARCODE=2]="CRIT_BARCODE",M[M.CRIT_TEXT_LINE=4]="CRIT_TEXT_LINE",M[M.CRIT_DETECTED_QUAD=8]="CRIT_DETECTED_QUAD",M[M.CRIT_NORMALIZED_IMAGE=16]="CRIT_NORMALIZED_IMAGE",M[M.CRIT_PARSED_RESULT=32]="CRIT_PARSED_RESULT",E.EnumCornerType=void 0,(u=E.EnumCornerType||(E.EnumCornerType={}))[u.CT_NORMAL_INTERSECTED=0]="CT_NORMAL_INTERSECTED",u[u.CT_T_INTERSECTED=1]="CT_T_INTERSECTED",u[u.CT_CROSS_INTERSECTED=2]="CT_CROSS_INTERSECTED",u[u.CT_NOT_INTERSECTED=3]="CT_NOT_INTERSECTED",E.EnumErrorCode=void 0,(F=E.EnumErrorCode||(E.EnumErrorCode={}))[F.EC_OK=0]="EC_OK",F[F.EC_UNKNOWN=-1e4]="EC_UNKNOWN",F[F.EC_NO_MEMORY=-10001]="EC_NO_MEMORY",F[F.EC_NULL_POINTER=-10002]="EC_NULL_POINTER",F[F.EC_LICENSE_INVALID=-10003]="EC_LICENSE_INVALID",F[F.EC_LICENSE_EXPIRED=-10004]="EC_LICENSE_EXPIRED",F[F.EC_FILE_NOT_FOUND=-10005]="EC_FILE_NOT_FOUND",F[F.EC_FILE_TYPE_NOT_SUPPORTED=-10006]="EC_FILE_TYPE_NOT_SUPPORTED",F[F.EC_BPP_NOT_SUPPORTED=-10007]="EC_BPP_NOT_SUPPORTED",F[F.EC_INDEX_INVALID=-10008]="EC_INDEX_INVALID",F[F.EC_CUSTOM_REGION_INVALID=-10010]="EC_CUSTOM_REGION_INVALID",F[F.EC_IMAGE_READ_FAILED=-10012]="EC_IMAGE_READ_FAILED",F[F.EC_TIFF_READ_FAILED=-10013]="EC_TIFF_READ_FAILED",F[F.EC_DIB_BUFFER_INVALID=-10018]="EC_DIB_BUFFER_INVALID",F[F.EC_PDF_READ_FAILED=-10021]="EC_PDF_READ_FAILED",F[F.EC_PDF_DLL_MISSING=-10022]="EC_PDF_DLL_MISSING",F[F.EC_PAGE_NUMBER_INVALID=-10023]="EC_PAGE_NUMBER_INVALID",F[F.EC_CUSTOM_SIZE_INVALID=-10024]="EC_CUSTOM_SIZE_INVALID",F[F.EC_TIMEOUT=-10026]="EC_TIMEOUT",F[F.EC_JSON_PARSE_FAILED=-10030]="EC_JSON_PARSE_FAILED",F[F.EC_JSON_TYPE_INVALID=-10031]="EC_JSON_TYPE_INVALID",F[F.EC_JSON_KEY_INVALID=-10032]="EC_JSON_KEY_INVALID",F[F.EC_JSON_VALUE_INVALID=-10033]="EC_JSON_VALUE_INVALID",F[F.EC_JSON_NAME_KEY_MISSING=-10034]="EC_JSON_NAME_KEY_MISSING",F[F.EC_JSON_NAME_VALUE_DUPLICATED=-10035]="EC_JSON_NAME_VALUE_DUPLICATED",F[F.EC_TEMPLATE_NAME_INVALID=-10036]="EC_TEMPLATE_NAME_INVALID",F[F.EC_JSON_NAME_REFERENCE_INVALID=-10037]="EC_JSON_NAME_REFERENCE_INVALID",F[F.EC_PARAMETER_VALUE_INVALID=-10038]="EC_PARAMETER_VALUE_INVALID",F[F.EC_DOMAIN_NOT_MATCH=-10039]="EC_DOMAIN_NOT_MATCH",F[F.EC_RESERVED_INFO_NOT_MATCH=-10040]="EC_RESERVED_INFO_NOT_MATCH",F[F.EC_LICENSE_KEY_NOT_MATCHED=-10043]="EC_LICENSE_KEY_NOT_MATCHED",F[F.EC_REQUEST_FAILED=-10044]="EC_REQUEST_FAILED",F[F.EC_LICENSE_INIT_FAILED=-10045]="EC_LICENSE_INIT_FAILED",F[F.EC_SET_MODE_ARGUMENT_ERROR=-10051]="EC_SET_MODE_ARGUMENT_ERROR",F[F.EC_LICENSE_CONTENT_INVALID=-10052]="EC_LICENSE_CONTENT_INVALID",F[F.EC_LICENSE_KEY_INVALID=-10053]="EC_LICENSE_KEY_INVALID",F[F.EC_LICENSE_DEVICE_RUNS_OUT=-10054]="EC_LICENSE_DEVICE_RUNS_OUT",F[F.EC_GET_MODE_ARGUMENT_ERROR=-10055]="EC_GET_MODE_ARGUMENT_ERROR",F[F.EC_IRT_LICENSE_INVALID=-10056]="EC_IRT_LICENSE_INVALID",F[F.EC_FILE_SAVE_FAILED=-10058]="EC_FILE_SAVE_FAILED",F[F.EC_STAGE_TYPE_INVALID=-10059]="EC_STAGE_TYPE_INVALID",F[F.EC_IMAGE_ORIENTATION_INVALID=-10060]="EC_IMAGE_ORIENTATION_INVALID",F[F.EC_CONVERT_COMPLEX_TEMPLATE_ERROR=-10061]="EC_CONVERT_COMPLEX_TEMPLATE_ERROR",F[F.EC_CALL_REJECTED_WHEN_CAPTURING=-10062]="EC_CALL_REJECTED_WHEN_CAPTURING",F[F.EC_NO_IMAGE_SOURCE=-10063]="EC_NO_IMAGE_SOURCE",F[F.EC_READ_DIRECTORY_FAILED=-10064]="EC_READ_DIRECTORY_FAILED",F[F.EC_MODULE_NOT_FOUND=-10065]="EC_MODULE_NOT_FOUND",F[F.EC_MULTI_PAGES_NOT_SUPPORTED=-10066]="EC_MULTI_PAGES_NOT_SUPPORTED",F[F.EC_NO_LICENSE=-2e4]="EC_NO_LICENSE",F[F.EC_HANDSHAKE_CODE_INVALID=-20001]="EC_HANDSHAKE_CODE_INVALID",F[F.EC_LICENSE_BUFFER_FAILED=-20002]="EC_LICENSE_BUFFER_FAILED",F[F.EC_LICENSE_SYNC_FAILED=-20003]="EC_LICENSE_SYNC_FAILED",F[F.EC_DEVICE_NOT_MATCH=-20004]="EC_DEVICE_NOT_MATCH",F[F.EC_BIND_DEVICE_FAILED=-20005]="EC_BIND_DEVICE_FAILED",F[F.EC_INSTANCE_COUNT_OVER_LIMIT=-20008]="EC_INSTANCE_COUNT_OVER_LIMIT",F[F.EC_TRIAL_LICENSE=-20010]="EC_TRIAL_LICENSE",F[F.EC_LICENSE_VERSION_NOT_MATCH=-20011]="EC_LICENSE_VERSION_NOT_MATCH",F[F.EC_FAILED_TO_REACH_DLS=-20200]="EC_FAILED_TO_REACH_DLS",F[F.EC_BARCODE_FORMAT_INVALID=-30009]="EC_BARCODE_FORMAT_INVALID",F[F.EC_QR_LICENSE_INVALID=-30016]="EC_QR_LICENSE_INVALID",F[F.EC_1D_LICENSE_INVALID=-30017]="EC_1D_LICENSE_INVALID",F[F.EC_PDF417_LICENSE_INVALID=-30019]="EC_PDF417_LICENSE_INVALID",F[F.EC_DATAMATRIX_LICENSE_INVALID=-30020]="EC_DATAMATRIX_LICENSE_INVALID",F[F.EC_CUSTOM_MODULESIZE_INVALID=-30025]="EC_CUSTOM_MODULESIZE_INVALID",F[F.EC_AZTEC_LICENSE_INVALID=-30041]="EC_AZTEC_LICENSE_INVALID",F[F.EC_PATCHCODE_LICENSE_INVALID=-30046]="EC_PATCHCODE_LICENSE_INVALID",F[F.EC_POSTALCODE_LICENSE_INVALID=-30047]="EC_POSTALCODE_LICENSE_INVALID",F[F.EC_DPM_LICENSE_INVALID=-30048]="EC_DPM_LICENSE_INVALID",F[F.EC_FRAME_DECODING_THREAD_EXISTS=-30049]="EC_FRAME_DECODING_THREAD_EXISTS",F[F.EC_STOP_DECODING_THREAD_FAILED=-30050]="EC_STOP_DECODING_THREAD_FAILED",F[F.EC_MAXICODE_LICENSE_INVALID=-30057]="EC_MAXICODE_LICENSE_INVALID",F[F.EC_GS1_DATABAR_LICENSE_INVALID=-30058]="EC_GS1_DATABAR_LICENSE_INVALID",F[F.EC_GS1_COMPOSITE_LICENSE_INVALID=-30059]="EC_GS1_COMPOSITE_LICENSE_INVALID",F[F.EC_DOTCODE_LICENSE_INVALID=-30061]="EC_DOTCODE_LICENSE_INVALID",F[F.EC_PHARMACODE_LICENSE_INVALID=-30062]="EC_PHARMACODE_LICENSE_INVALID",F[F.EC_CHARACTER_MODEL_FILE_NOT_FOUND=-40100]="EC_CHARACTER_MODEL_FILE_NOT_FOUND",F[F.EC_QUADRILATERAL_INVALID=-50057]="EC_QUADRILATERAL_INVALID",F[F.EC_CAMERA_MODULE_NOT_EXIST=-60003]="EC_CAMERA_MODULE_NOT_EXIST",F[F.EC_CAMERA_ID_NOT_EXIST=-60006]="EC_CAMERA_ID_NOT_EXIST",F[F.EC_NO_SENSOR=-60045]="EC_NO_SENSOR",F[F.EC_PANORAMA_LICENSE_INVALID=-70060]="EC_PANORAMA_LICENSE_INVALID",F[F.EC_RESOURCE_PATH_NOT_EXIST=-90001]="EC_RESOURCE_PATH_NOT_EXIST",F[F.EC_RESOURCE_LOAD_FAILED=-90002]="EC_RESOURCE_LOAD_FAILED",F[F.EC_CODE_SPECIFICATION_NOT_FOUND=-90003]="EC_CODE_SPECIFICATION_NOT_FOUND",F[F.EC_FULL_CODE_EMPTY=-90004]="EC_FULL_CODE_EMPTY",F[F.EC_FULL_CODE_PREPROCESS_FAILED=-90005]="EC_FULL_CODE_PREPROCESS_FAILED",F[F.EC_ZA_DL_LICENSE_INVALID=-90006]="EC_ZA_DL_LICENSE_INVALID",F[F.EC_AAMVA_DL_ID_LICENSE_INVALID=-90007]="EC_AAMVA_DL_ID_LICENSE_INVALID",F[F.EC_AADHAAR_LICENSE_INVALID=-90008]="EC_AADHAAR_LICENSE_INVALID",F[F.EC_MRTD_LICENSE_INVALID=-90009]="EC_MRTD_LICENSE_INVALID",F[F.EC_VIN_LICENSE_INVALID=-90010]="EC_VIN_LICENSE_INVALID",F[F.EC_CUSTOMIZED_CODE_TYPE_LICENSE_INVALID=-90011]="EC_CUSTOMIZED_CODE_TYPE_LICENSE_INVALID",E.EnumGrayscaleEnhancementMode=void 0,(U=E.EnumGrayscaleEnhancementMode||(E.EnumGrayscaleEnhancementMode={}))[U.GEM_SKIP=0]="GEM_SKIP",U[U.GEM_AUTO=1]="GEM_AUTO",U[U.GEM_GENERAL=2]="GEM_GENERAL",U[U.GEM_GRAY_EQUALIZE=4]="GEM_GRAY_EQUALIZE",U[U.GEM_GRAY_SMOOTH=8]="GEM_GRAY_SMOOTH",U[U.GEM_SHARPEN_SMOOTH=16]="GEM_SHARPEN_SMOOTH",U[U.GEM_REV=-2147483648]="GEM_REV",E.EnumGrayscaleTransformationMode=void 0,(G=E.EnumGrayscaleTransformationMode||(E.EnumGrayscaleTransformationMode={}))[G.GTM_SKIP=0]="GTM_SKIP",G[G.GTM_INVERTED=1]="GTM_INVERTED",G[G.GTM_ORIGINAL=2]="GTM_ORIGINAL",G[G.GTM_AUTO=4]="GTM_AUTO",G[G.GTM_REV=-2147483648]="GTM_REV",E.EnumImageTagType=void 0,(l=E.EnumImageTagType||(E.EnumImageTagType={}))[l.ITT_FILE_IMAGE=0]="ITT_FILE_IMAGE",l[l.ITT_VIDEO_FRAME=1]="ITT_VIDEO_FRAME",E.EnumPDFReadingMode=void 0,(d=E.EnumPDFReadingMode||(E.EnumPDFReadingMode={}))[d.PDFRM_VECTOR=1]="PDFRM_VECTOR",d[d.PDFRM_RASTER=2]="PDFRM_RASTER",d[d.PDFRM_REV=-2147483648]="PDFRM_REV",E.EnumRasterDataSource=void 0,(f=E.EnumRasterDataSource||(E.EnumRasterDataSource={}))[f.RDS_RASTERIZED_PAGES=0]="RDS_RASTERIZED_PAGES",f[f.RDS_EXTRACTED_IMAGES=1]="RDS_EXTRACTED_IMAGES",E.EnumIntermediateResultUnitType=void 0,(h=E.EnumIntermediateResultUnitType||(E.EnumIntermediateResultUnitType={}))[h.IRUT_NULL=0]="IRUT_NULL",h[h.IRUT_COLOUR_IMAGE=1]="IRUT_COLOUR_IMAGE",h[h.IRUT_SCALED_DOWN_COLOUR_IMAGE=2]="IRUT_SCALED_DOWN_COLOUR_IMAGE",h[h.IRUT_GRAYSCALE_IMAGE=4]="IRUT_GRAYSCALE_IMAGE",h[h.IRUT_TRANSOFORMED_GRAYSCALE_IMAGE=8]="IRUT_TRANSOFORMED_GRAYSCALE_IMAGE",h[h.IRUT_ENHANCED_GRAYSCALE_IMAGE=16]="IRUT_ENHANCED_GRAYSCALE_IMAGE",h[h.IRUT_PREDETECTED_REGIONS=32]="IRUT_PREDETECTED_REGIONS",h[h.IRUT_BINARY_IMAGE=64]="IRUT_BINARY_IMAGE",h[h.IRUT_TEXTURE_DETECTION_RESULT=128]="IRUT_TEXTURE_DETECTION_RESULT",h[h.IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE=256]="IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE",h[h.IRUT_TEXTURE_REMOVED_BINARY_IMAGE=512]="IRUT_TEXTURE_REMOVED_BINARY_IMAGE",h[h.IRUT_CONTOURS=1024]="IRUT_CONTOURS",h[h.IRUT_LINE_SEGMENTS=2048]="IRUT_LINE_SEGMENTS",h[h.IRUT_TEXT_ZONES=4096]="IRUT_TEXT_ZONES",h[h.IRUT_TEXT_REMOVED_BINARY_IMAGE=8192]="IRUT_TEXT_REMOVED_BINARY_IMAGE",h[h.IRUT_CANDIDATE_BARCODE_ZONES=16384]="IRUT_CANDIDATE_BARCODE_ZONES",h[h.IRUT_LOCALIZED_BARCODES=32768]="IRUT_LOCALIZED_BARCODES",h[h.IRUT_SCALED_UP_BARCODE_IMAGE=65536]="IRUT_SCALED_UP_BARCODE_IMAGE",h[h.IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE=131072]="IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE",h[h.IRUT_COMPLEMENTED_BARCODE_IMAGE=262144]="IRUT_COMPLEMENTED_BARCODE_IMAGE",h[h.IRUT_DECODED_BARCODES=524288]="IRUT_DECODED_BARCODES",h[h.IRUT_LONG_LINES=1048576]="IRUT_LONG_LINES",h[h.IRUT_CORNERS=2097152]="IRUT_CORNERS",h[h.IRUT_CANDIDATE_QUAD_EDGES=4194304]="IRUT_CANDIDATE_QUAD_EDGES",h[h.IRUT_DETECTED_QUADS=8388608]="IRUT_DETECTED_QUADS",h[h.IRUT_LOCALIZED_TEXT_LINES=16777216]="IRUT_LOCALIZED_TEXT_LINES",h[h.IRUT_RECOGNIZED_TEXT_LINES=33554432]="IRUT_RECOGNIZED_TEXT_LINES",h[h.IRUT_NORMALIZED_IMAGES=67108864]="IRUT_NORMALIZED_IMAGES",h[h.IRUT_ALL=134217727]="IRUT_ALL",E.EnumRegionObjectElementType=void 0,(g=E.EnumRegionObjectElementType||(E.EnumRegionObjectElementType={}))[g.ROET_PREDETECTED_REGION=0]="ROET_PREDETECTED_REGION",g[g.ROET_LOCALIZED_BARCODE=1]="ROET_LOCALIZED_BARCODE",g[g.ROET_DECODED_BARCODE=2]="ROET_DECODED_BARCODE",g[g.ROET_LOCALIZED_TEXT_LINE=3]="ROET_LOCALIZED_TEXT_LINE",g[g.ROET_RECOGNIZED_TEXT_LINE=4]="ROET_RECOGNIZED_TEXT_LINE",g[g.ROET_DETECTED_QUAD=5]="ROET_DETECTED_QUAD",g[g.ROET_NORMALIZED_IMAGE=6]="ROET_NORMALIZED_IMAGE",E.EnumSectionType=void 0,(c=E.EnumSectionType||(E.EnumSectionType={}))[c.ST_NULL=0]="ST_NULL",c[c.ST_REGION_PREDETECTION=1]="ST_REGION_PREDETECTION",c[c.ST_BARCODE_LOCALIZATION=2]="ST_BARCODE_LOCALIZATION",c[c.ST_BARCODE_DECODING=3]="ST_BARCODE_DECODING",c[c.ST_TEXT_LINE_LOCALIZATION=4]="ST_TEXT_LINE_LOCALIZATION",c[c.ST_TEXT_LINE_RECOGNITION=5]="ST_TEXT_LINE_RECOGNITION",c[c.ST_DOCUMENT_DETECTION=6]="ST_DOCUMENT_DETECTION",c[c.ST_DOCUMENT_NORMALIZATION=7]="ST_DOCUMENT_NORMALIZATION",E.CoreModule=class{static getVersion(){return"3.0.10-beta-202308171924"}},E.ImageSourceAdapter=class{constructor(){a.add(this),i.set(this,[]),r.set(this,1),o.set(this,E.EnumBufferOverflowProtectionMode.BOPM_BLOCK),S.set(this,!1),s.set(this,void 0),m.set(this,E.EnumColourChannelUsageType.CCUT_AUTO)}get _isFetchingStarted(){return _(this,S,"f")}addImageToBuffer(I){var e;if(!L(I))throw new TypeError("Invalid 'image'.");if((null===(e=I.tag)||void 0===e?void 0:e.hasOwnProperty("imageId"))&&"number"==typeof I.tag.imageId&&this.hasImage(I.tag.imageId))throw new Error("Existed imageId.");if(_(this,i,"f").length>=_(this,r,"f"))switch(_(this,o,"f")){case E.EnumBufferOverflowProtectionMode.BOPM_BLOCK:break;case E.EnumBufferOverflowProtectionMode.BOPM_UPDATE:if(_(this,i,"f").push(I),D(_(this,s,"f"))&&N(_(this,s,"f").imageId)&&1==_(this,s,"f").keepInBuffer)for(;_(this,i,"f").length>_(this,r,"f");){const E=_(this,i,"f").findIndex((E=>{var I;return(null===(I=E.tag)||void 0===I?void 0:I.imageId)!==_(this,s,"f").imageId}));_(this,i,"f").splice(E,1)}else _(this,i,"f").splice(0,_(this,i,"f").length-_(this,r,"f"))}else _(this,i,"f").push(I)}getImage(){if(0===_(this,i,"f").length)return null;let I;if(_(this,s,"f")&&N(_(this,s,"f").imageId)){const E=_(this,a,"m",P).call(this,_(this,s,"f").imageId);if(E<0)throw new Error(`Image with id ${_(this,s,"f").imageId} doesn't exist.`);I=_(this,i,"f").slice(E,E+1)[0]}else I=_(this,i,"f").pop();if([E.EnumImagePixelFormat.IPF_RGB_565,E.EnumImagePixelFormat.IPF_RGB_555,E.EnumImagePixelFormat.IPF_RGB_888,E.EnumImagePixelFormat.IPF_ARGB_8888,E.EnumImagePixelFormat.IPF_RGB_161616,E.EnumImagePixelFormat.IPF_ARGB_16161616,E.EnumImagePixelFormat.IPF_ABGR_8888,E.EnumImagePixelFormat.IPF_ABGR_16161616,E.EnumImagePixelFormat.IPF_BGR_888].includes(I.format)){if(_(this,m,"f")===E.EnumColourChannelUsageType.CCUT_RGB_R_CHANNEL_ONLY){const _=new Uint8Array(I.width*I.height);for(let e=0;e<_.length;e++)switch(I.format){case E.EnumImagePixelFormat.IPF_RGB_565:case E.EnumImagePixelFormat.IPF_RGB_555:case E.EnumImagePixelFormat.IPF_RGB_888:case E.EnumImagePixelFormat.IPF_RGB_161616:_[e]=I.bytes[3*e+2];break;case E.EnumImagePixelFormat.IPF_ARGB_8888:case E.EnumImagePixelFormat.IPF_ARGB_16161616:_[e]=I.bytes[4*e+2];break;case E.EnumImagePixelFormat.IPF_BGR_888:_[e]=I.bytes[3*e];break;case E.EnumImagePixelFormat.IPF_ABGR_8888:case E.EnumImagePixelFormat.IPF_ABGR_16161616:_[e]=I.bytes[4*e]}I.bytes=_,I.stride=I.width,I.format=E.EnumImagePixelFormat.IPF_GRAYSCALED}else if(_(this,m,"f")===E.EnumColourChannelUsageType.CCUT_RGB_G_CHANNEL_ONLY){const _=new Uint8Array(I.width*I.height);for(let e=0;e<_.length;e++)switch(I.format){case E.EnumImagePixelFormat.IPF_RGB_565:case E.EnumImagePixelFormat.IPF_RGB_555:case E.EnumImagePixelFormat.IPF_RGB_888:case E.EnumImagePixelFormat.IPF_RGB_161616:case E.EnumImagePixelFormat.IPF_BGR_888:_[e]=I.bytes[3*e+1];break;case E.EnumImagePixelFormat.IPF_ARGB_8888:case E.EnumImagePixelFormat.IPF_ARGB_16161616:case E.EnumImagePixelFormat.IPF_ABGR_8888:case E.EnumImagePixelFormat.IPF_ABGR_16161616:_[e]=I.bytes[4*e+1]}I.bytes=_,I.stride=I.width,I.format=E.EnumImagePixelFormat.IPF_GRAYSCALED}else if(_(this,m,"f")===E.EnumColourChannelUsageType.CCUT_RGB_B_CHANNEL_ONLY){const _=new Uint8Array(I.width*I.height);for(let e=0;e<_.length;e++)switch(I.format){case E.EnumImagePixelFormat.IPF_RGB_565:case E.EnumImagePixelFormat.IPF_RGB_555:case E.EnumImagePixelFormat.IPF_RGB_888:case E.EnumImagePixelFormat.IPF_RGB_161616:_[e]=I.bytes[3*e];break;case E.EnumImagePixelFormat.IPF_ARGB_8888:case E.EnumImagePixelFormat.IPF_ARGB_16161616:_[e]=I.bytes[4*e];break;case E.EnumImagePixelFormat.IPF_BGR_888:_[e]=I.bytes[3*e+2];break;case E.EnumImagePixelFormat.IPF_ABGR_8888:case E.EnumImagePixelFormat.IPF_ABGR_16161616:_[e]=I.bytes[4*e+2]}I.bytes=_,I.stride=I.width,I.format=E.EnumImagePixelFormat.IPF_GRAYSCALED}}else[E.EnumImagePixelFormat.IPF_NV21,E.EnumImagePixelFormat.IPF_NV12].includes(I.format);return I}setNextImageToReturn(E,_){if(!((...E)=>0!==E.length&&E.every((E=>N(E))))(E))throw new TypeError("Invalid 'imageId'.");if(void 0!==_&&!t(_))throw new TypeError("Invalid 'keepInBuffer'.");I(this,s,{imageId:E,keepInBuffer:_},"f")}_resetNextReturnedImage(){I(this,s,null,"f")}hasImage(E){return _(this,a,"m",P).call(this,E)>=0}startFetching(){I(this,S,!0,"f")}stopFetching(){I(this,S,!1,"f")}setMaximumImageCount(E){if("number"!=typeof E)throw new TypeError("Invalid 'count'.");if(E<1||Math.round(E)!==E)throw new Error("Invalid 'count'.");for(I(this,r,E,"f");_(this,i,"f")&&_(this,i,"f").length>E;)_(this,i,"f").shift()}getMaximumImageCount(){return _(this,r,"f")}getImageCount(){return _(this,i,"f").length}clearBuffer(){_(this,i,"f").length=0}isBufferEmpty(){return 0===_(this,i,"f").length}setBufferOverflowProtectionMode(E){I(this,o,E,"f")}getBufferOverflowProtectionMode(){return _(this,o,"f")}setColourChannelUsageType(E){I(this,m,E,"f")}getColourChannelUsageType(){return _(this,m,"f")}},E.IntermediateResultManager=class{constructor(){this.intermediateResultReceiverSet=new Set}addResultReceiver(E){if("object"!=typeof E)throw new Error("Invalid receiver.");this.intermediateResultReceiverSet.add(E)}removeResultReceiver(E){this.intermediateResultReceiverSet.delete(E)}async getOriginalImage(E){return null}},E.IntermediateResultReceiver=class{constructor(){this.onTaskResultsReceived=null,this.onPredetectedRegionsReceived=null,this.onDecodedBarcodesReceived=null,this.onRecognizedTextLinesReceived=null,this.onDetectedQuadsReceived=null,this.onNormalizedImagesReceived=null}},E._isArc=E=>!!D(E)&&(!!N(E.x)&&(!!N(E.y)&&(!!N(E.radius)&&(!(E.radius<0)&&(!!N(E.startAngle)&&!!N(E.endAngle)))))),E._isContour=E=>!!D(E)&&(!!R(E.points)&&(0!=E.points.length&&!E.points.some((E=>!n(E))))),E._isDSImageData=L,E._isDSRect=E=>!!D(E)&&(!!N(E.left)&&(!(E.left<0)&&(!!N(E.top)&&(!(E.top<0)&&(!!N(E.right)&&(!(E.right<0)&&(!!N(E.bottom)&&(!(E.bottom<0)&&(!(E.left>=E.right)&&(!(E.top>=E.bottom)&&!!t(E.isMeasuredInPercentage))))))))))),E._isImageTag=O,E._isLineSegment=E=>!!D(E)&&(!!n(E.startPoint)&&(!!n(E.endPoint)&&(E.startPoint.x!=E.endPoint.x||E.startPoint.y!=E.endPoint.y))),E._isPoint=n,E._isPolygon=E=>!!D(E)&&(!!R(E.points)&&(0!=E.points.length&&!E.points.some((E=>!n(E))))),E._isQuad=E=>!!D(E)&&(!!R(E.points)&&(0!=E.points.length&&4==E.points.length&&!E.points.some((E=>!n(E))))),E._isRect=E=>!!D(E)&&(!!N(E.x)&&(!!N(E.y)&&(!!N(E.width)&&(!(E.width<0)&&(!!N(E.height)&&(!(E.height<0)&&!("isMeasuredInPercentage"in E&&!t(E.isMeasuredInPercentage)))))))),Object.defineProperty(E,"__esModule",{value:!0})}));
!function(E,_){"object"==typeof exports&&"undefined"!=typeof module?_(exports):"function"==typeof define&&define.amd?define(["exports"],_):_(((E="undefined"!=typeof globalThis?globalThis:E||self).Dynamsoft=E.Dynamsoft||{},E.Dynamsoft.Core={}))}(this,(function(E){"use strict";function _(E,_,I,e){if("a"===I&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof _?E!==_||!e:!_.has(E))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===I?e:"a"===I?e.call(E):e?e.value:_.get(E)}function I(E,_,I,e,C){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!C)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof _?E!==_||!C:!_.has(E))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?C.call(E,I):C?C.value=I:_.set(E,I),I}var e,C,T;"function"==typeof SuppressedError&&SuppressedError,E.EnumBufferOverflowProtectionMode=void 0,(e=E.EnumBufferOverflowProtectionMode||(E.EnumBufferOverflowProtectionMode={}))[e.BOPM_BLOCK=0]="BOPM_BLOCK",e[e.BOPM_UPDATE=1]="BOPM_UPDATE",E.EnumColourChannelUsageType=void 0,(C=E.EnumColourChannelUsageType||(E.EnumColourChannelUsageType={}))[C.CCUT_AUTO=0]="CCUT_AUTO",C[C.CCUT_FULL_CHANNEL=1]="CCUT_FULL_CHANNEL",C[C.CCUT_Y_CHANNEL_ONLY=2]="CCUT_Y_CHANNEL_ONLY",C[C.CCUT_RGB_R_CHANNEL_ONLY=3]="CCUT_RGB_R_CHANNEL_ONLY",C[C.CCUT_RGB_G_CHANNEL_ONLY=4]="CCUT_RGB_G_CHANNEL_ONLY",C[C.CCUT_RGB_B_CHANNEL_ONLY=5]="CCUT_RGB_B_CHANNEL_ONLY",E.EnumImagePixelFormat=void 0,(T=E.EnumImagePixelFormat||(E.EnumImagePixelFormat={}))[T.IPF_BINARY=0]="IPF_BINARY",T[T.IPF_BINARYINVERTED=1]="IPF_BINARYINVERTED",T[T.IPF_GRAYSCALED=2]="IPF_GRAYSCALED",T[T.IPF_NV21=3]="IPF_NV21",T[T.IPF_RGB_565=4]="IPF_RGB_565",T[T.IPF_RGB_555=5]="IPF_RGB_555",T[T.IPF_RGB_888=6]="IPF_RGB_888",T[T.IPF_ARGB_8888=7]="IPF_ARGB_8888",T[T.IPF_RGB_161616=8]="IPF_RGB_161616",T[T.IPF_ARGB_16161616=9]="IPF_ARGB_16161616",T[T.IPF_ABGR_8888=10]="IPF_ABGR_8888",T[T.IPF_ABGR_16161616=11]="IPF_ABGR_16161616",T[T.IPF_BGR_888=12]="IPF_BGR_888",T[T.IPF_BINARY_8=13]="IPF_BINARY_8",T[T.IPF_NV12=14]="IPF_NV12";const A=E=>Object.prototype.toString.call(E),R=E=>Array.isArray?Array.isArray(E):"[object Array]"===A(E),t=E=>"[object Boolean]"===A(E),N=E=>"number"==typeof E&&!Number.isNaN(E),D=E=>null!==E&&"object"==typeof E&&!Array.isArray(E),L=E=>!!D(E)&&(E.bytes instanceof Uint8Array&&(!!N(E.width)&&(!(E.width<=0)&&(!!N(E.height)&&(!(E.height<=0)&&(!!N(E.stride)&&(!(E.stride<=0)&&("format"in E&&!("tag"in E&&!O(E.tag)))))))))),O=E=>!!D(E)&&(!!N(E.imageId)&&"type"in E),n=E=>!!D(E)&&(!!N(E.x)&&!!N(E.y));var a,i,r,o,S,s,m,P,M,u,F,U,G,l,d,f,h,g,c;i=new WeakMap,r=new WeakMap,o=new WeakMap,S=new WeakMap,s=new WeakMap,m=new WeakMap,a=new WeakSet,P=function(E){if("number"!=typeof E)throw new TypeError("Invalid 'imageId'.");return _(this,i,"f").findIndex((_=>{var I;return(null===(I=_.tag)||void 0===I?void 0:I.imageId)===E}))};E.EnumCapturedResultItemType=void 0,(M=E.EnumCapturedResultItemType||(E.EnumCapturedResultItemType={}))[M.CRIT_ORIGINAL_IMAGE=1]="CRIT_ORIGINAL_IMAGE",M[M.CRIT_BARCODE=2]="CRIT_BARCODE",M[M.CRIT_TEXT_LINE=4]="CRIT_TEXT_LINE",M[M.CRIT_DETECTED_QUAD=8]="CRIT_DETECTED_QUAD",M[M.CRIT_NORMALIZED_IMAGE=16]="CRIT_NORMALIZED_IMAGE",M[M.CRIT_PARSED_RESULT=32]="CRIT_PARSED_RESULT",E.EnumCornerType=void 0,(u=E.EnumCornerType||(E.EnumCornerType={}))[u.CT_NORMAL_INTERSECTED=0]="CT_NORMAL_INTERSECTED",u[u.CT_T_INTERSECTED=1]="CT_T_INTERSECTED",u[u.CT_CROSS_INTERSECTED=2]="CT_CROSS_INTERSECTED",u[u.CT_NOT_INTERSECTED=3]="CT_NOT_INTERSECTED",E.EnumErrorCode=void 0,(F=E.EnumErrorCode||(E.EnumErrorCode={}))[F.EC_OK=0]="EC_OK",F[F.EC_UNKNOWN=-1e4]="EC_UNKNOWN",F[F.EC_NO_MEMORY=-10001]="EC_NO_MEMORY",F[F.EC_NULL_POINTER=-10002]="EC_NULL_POINTER",F[F.EC_LICENSE_INVALID=-10003]="EC_LICENSE_INVALID",F[F.EC_LICENSE_EXPIRED=-10004]="EC_LICENSE_EXPIRED",F[F.EC_FILE_NOT_FOUND=-10005]="EC_FILE_NOT_FOUND",F[F.EC_FILE_TYPE_NOT_SUPPORTED=-10006]="EC_FILE_TYPE_NOT_SUPPORTED",F[F.EC_BPP_NOT_SUPPORTED=-10007]="EC_BPP_NOT_SUPPORTED",F[F.EC_INDEX_INVALID=-10008]="EC_INDEX_INVALID",F[F.EC_CUSTOM_REGION_INVALID=-10010]="EC_CUSTOM_REGION_INVALID",F[F.EC_IMAGE_READ_FAILED=-10012]="EC_IMAGE_READ_FAILED",F[F.EC_TIFF_READ_FAILED=-10013]="EC_TIFF_READ_FAILED",F[F.EC_DIB_BUFFER_INVALID=-10018]="EC_DIB_BUFFER_INVALID",F[F.EC_PDF_READ_FAILED=-10021]="EC_PDF_READ_FAILED",F[F.EC_PDF_DLL_MISSING=-10022]="EC_PDF_DLL_MISSING",F[F.EC_PAGE_NUMBER_INVALID=-10023]="EC_PAGE_NUMBER_INVALID",F[F.EC_CUSTOM_SIZE_INVALID=-10024]="EC_CUSTOM_SIZE_INVALID",F[F.EC_TIMEOUT=-10026]="EC_TIMEOUT",F[F.EC_JSON_PARSE_FAILED=-10030]="EC_JSON_PARSE_FAILED",F[F.EC_JSON_TYPE_INVALID=-10031]="EC_JSON_TYPE_INVALID",F[F.EC_JSON_KEY_INVALID=-10032]="EC_JSON_KEY_INVALID",F[F.EC_JSON_VALUE_INVALID=-10033]="EC_JSON_VALUE_INVALID",F[F.EC_JSON_NAME_KEY_MISSING=-10034]="EC_JSON_NAME_KEY_MISSING",F[F.EC_JSON_NAME_VALUE_DUPLICATED=-10035]="EC_JSON_NAME_VALUE_DUPLICATED",F[F.EC_TEMPLATE_NAME_INVALID=-10036]="EC_TEMPLATE_NAME_INVALID",F[F.EC_JSON_NAME_REFERENCE_INVALID=-10037]="EC_JSON_NAME_REFERENCE_INVALID",F[F.EC_PARAMETER_VALUE_INVALID=-10038]="EC_PARAMETER_VALUE_INVALID",F[F.EC_DOMAIN_NOT_MATCH=-10039]="EC_DOMAIN_NOT_MATCH",F[F.EC_RESERVED_INFO_NOT_MATCH=-10040]="EC_RESERVED_INFO_NOT_MATCH",F[F.EC_LICENSE_KEY_NOT_MATCHED=-10043]="EC_LICENSE_KEY_NOT_MATCHED",F[F.EC_REQUEST_FAILED=-10044]="EC_REQUEST_FAILED",F[F.EC_LICENSE_INIT_FAILED=-10045]="EC_LICENSE_INIT_FAILED",F[F.EC_SET_MODE_ARGUMENT_ERROR=-10051]="EC_SET_MODE_ARGUMENT_ERROR",F[F.EC_LICENSE_CONTENT_INVALID=-10052]="EC_LICENSE_CONTENT_INVALID",F[F.EC_LICENSE_KEY_INVALID=-10053]="EC_LICENSE_KEY_INVALID",F[F.EC_LICENSE_DEVICE_RUNS_OUT=-10054]="EC_LICENSE_DEVICE_RUNS_OUT",F[F.EC_GET_MODE_ARGUMENT_ERROR=-10055]="EC_GET_MODE_ARGUMENT_ERROR",F[F.EC_IRT_LICENSE_INVALID=-10056]="EC_IRT_LICENSE_INVALID",F[F.EC_FILE_SAVE_FAILED=-10058]="EC_FILE_SAVE_FAILED",F[F.EC_STAGE_TYPE_INVALID=-10059]="EC_STAGE_TYPE_INVALID",F[F.EC_IMAGE_ORIENTATION_INVALID=-10060]="EC_IMAGE_ORIENTATION_INVALID",F[F.EC_CONVERT_COMPLEX_TEMPLATE_ERROR=-10061]="EC_CONVERT_COMPLEX_TEMPLATE_ERROR",F[F.EC_CALL_REJECTED_WHEN_CAPTURING=-10062]="EC_CALL_REJECTED_WHEN_CAPTURING",F[F.EC_NO_IMAGE_SOURCE=-10063]="EC_NO_IMAGE_SOURCE",F[F.EC_READ_DIRECTORY_FAILED=-10064]="EC_READ_DIRECTORY_FAILED",F[F.EC_MODULE_NOT_FOUND=-10065]="EC_MODULE_NOT_FOUND",F[F.EC_MULTI_PAGES_NOT_SUPPORTED=-10066]="EC_MULTI_PAGES_NOT_SUPPORTED",F[F.EC_NO_LICENSE=-2e4]="EC_NO_LICENSE",F[F.EC_HANDSHAKE_CODE_INVALID=-20001]="EC_HANDSHAKE_CODE_INVALID",F[F.EC_LICENSE_BUFFER_FAILED=-20002]="EC_LICENSE_BUFFER_FAILED",F[F.EC_LICENSE_SYNC_FAILED=-20003]="EC_LICENSE_SYNC_FAILED",F[F.EC_DEVICE_NOT_MATCH=-20004]="EC_DEVICE_NOT_MATCH",F[F.EC_BIND_DEVICE_FAILED=-20005]="EC_BIND_DEVICE_FAILED",F[F.EC_INSTANCE_COUNT_OVER_LIMIT=-20008]="EC_INSTANCE_COUNT_OVER_LIMIT",F[F.EC_TRIAL_LICENSE=-20010]="EC_TRIAL_LICENSE",F[F.EC_LICENSE_VERSION_NOT_MATCH=-20011]="EC_LICENSE_VERSION_NOT_MATCH",F[F.EC_FAILED_TO_REACH_DLS=-20200]="EC_FAILED_TO_REACH_DLS",F[F.EC_BARCODE_FORMAT_INVALID=-30009]="EC_BARCODE_FORMAT_INVALID",F[F.EC_QR_LICENSE_INVALID=-30016]="EC_QR_LICENSE_INVALID",F[F.EC_1D_LICENSE_INVALID=-30017]="EC_1D_LICENSE_INVALID",F[F.EC_PDF417_LICENSE_INVALID=-30019]="EC_PDF417_LICENSE_INVALID",F[F.EC_DATAMATRIX_LICENSE_INVALID=-30020]="EC_DATAMATRIX_LICENSE_INVALID",F[F.EC_CUSTOM_MODULESIZE_INVALID=-30025]="EC_CUSTOM_MODULESIZE_INVALID",F[F.EC_AZTEC_LICENSE_INVALID=-30041]="EC_AZTEC_LICENSE_INVALID",F[F.EC_PATCHCODE_LICENSE_INVALID=-30046]="EC_PATCHCODE_LICENSE_INVALID",F[F.EC_POSTALCODE_LICENSE_INVALID=-30047]="EC_POSTALCODE_LICENSE_INVALID",F[F.EC_DPM_LICENSE_INVALID=-30048]="EC_DPM_LICENSE_INVALID",F[F.EC_FRAME_DECODING_THREAD_EXISTS=-30049]="EC_FRAME_DECODING_THREAD_EXISTS",F[F.EC_STOP_DECODING_THREAD_FAILED=-30050]="EC_STOP_DECODING_THREAD_FAILED",F[F.EC_MAXICODE_LICENSE_INVALID=-30057]="EC_MAXICODE_LICENSE_INVALID",F[F.EC_GS1_DATABAR_LICENSE_INVALID=-30058]="EC_GS1_DATABAR_LICENSE_INVALID",F[F.EC_GS1_COMPOSITE_LICENSE_INVALID=-30059]="EC_GS1_COMPOSITE_LICENSE_INVALID",F[F.EC_DOTCODE_LICENSE_INVALID=-30061]="EC_DOTCODE_LICENSE_INVALID",F[F.EC_PHARMACODE_LICENSE_INVALID=-30062]="EC_PHARMACODE_LICENSE_INVALID",F[F.EC_CHARACTER_MODEL_FILE_NOT_FOUND=-40100]="EC_CHARACTER_MODEL_FILE_NOT_FOUND",F[F.EC_QUADRILATERAL_INVALID=-50057]="EC_QUADRILATERAL_INVALID",F[F.EC_CAMERA_MODULE_NOT_EXIST=-60003]="EC_CAMERA_MODULE_NOT_EXIST",F[F.EC_CAMERA_ID_NOT_EXIST=-60006]="EC_CAMERA_ID_NOT_EXIST",F[F.EC_NO_SENSOR=-60045]="EC_NO_SENSOR",F[F.EC_PANORAMA_LICENSE_INVALID=-70060]="EC_PANORAMA_LICENSE_INVALID",F[F.EC_RESOURCE_PATH_NOT_EXIST=-90001]="EC_RESOURCE_PATH_NOT_EXIST",F[F.EC_RESOURCE_LOAD_FAILED=-90002]="EC_RESOURCE_LOAD_FAILED",F[F.EC_CODE_SPECIFICATION_NOT_FOUND=-90003]="EC_CODE_SPECIFICATION_NOT_FOUND",F[F.EC_FULL_CODE_EMPTY=-90004]="EC_FULL_CODE_EMPTY",F[F.EC_FULL_CODE_PREPROCESS_FAILED=-90005]="EC_FULL_CODE_PREPROCESS_FAILED",F[F.EC_ZA_DL_LICENSE_INVALID=-90006]="EC_ZA_DL_LICENSE_INVALID",F[F.EC_AAMVA_DL_ID_LICENSE_INVALID=-90007]="EC_AAMVA_DL_ID_LICENSE_INVALID",F[F.EC_AADHAAR_LICENSE_INVALID=-90008]="EC_AADHAAR_LICENSE_INVALID",F[F.EC_MRTD_LICENSE_INVALID=-90009]="EC_MRTD_LICENSE_INVALID",F[F.EC_VIN_LICENSE_INVALID=-90010]="EC_VIN_LICENSE_INVALID",F[F.EC_CUSTOMIZED_CODE_TYPE_LICENSE_INVALID=-90011]="EC_CUSTOMIZED_CODE_TYPE_LICENSE_INVALID",E.EnumGrayscaleEnhancementMode=void 0,(U=E.EnumGrayscaleEnhancementMode||(E.EnumGrayscaleEnhancementMode={}))[U.GEM_SKIP=0]="GEM_SKIP",U[U.GEM_AUTO=1]="GEM_AUTO",U[U.GEM_GENERAL=2]="GEM_GENERAL",U[U.GEM_GRAY_EQUALIZE=4]="GEM_GRAY_EQUALIZE",U[U.GEM_GRAY_SMOOTH=8]="GEM_GRAY_SMOOTH",U[U.GEM_SHARPEN_SMOOTH=16]="GEM_SHARPEN_SMOOTH",U[U.GEM_REV=-2147483648]="GEM_REV",E.EnumGrayscaleTransformationMode=void 0,(G=E.EnumGrayscaleTransformationMode||(E.EnumGrayscaleTransformationMode={}))[G.GTM_SKIP=0]="GTM_SKIP",G[G.GTM_INVERTED=1]="GTM_INVERTED",G[G.GTM_ORIGINAL=2]="GTM_ORIGINAL",G[G.GTM_AUTO=4]="GTM_AUTO",G[G.GTM_REV=-2147483648]="GTM_REV",E.EnumImageTagType=void 0,(l=E.EnumImageTagType||(E.EnumImageTagType={}))[l.ITT_FILE_IMAGE=0]="ITT_FILE_IMAGE",l[l.ITT_VIDEO_FRAME=1]="ITT_VIDEO_FRAME",E.EnumPDFReadingMode=void 0,(d=E.EnumPDFReadingMode||(E.EnumPDFReadingMode={}))[d.PDFRM_VECTOR=1]="PDFRM_VECTOR",d[d.PDFRM_RASTER=2]="PDFRM_RASTER",d[d.PDFRM_REV=-2147483648]="PDFRM_REV",E.EnumRasterDataSource=void 0,(f=E.EnumRasterDataSource||(E.EnumRasterDataSource={}))[f.RDS_RASTERIZED_PAGES=0]="RDS_RASTERIZED_PAGES",f[f.RDS_EXTRACTED_IMAGES=1]="RDS_EXTRACTED_IMAGES",E.EnumIntermediateResultUnitType=void 0,(h=E.EnumIntermediateResultUnitType||(E.EnumIntermediateResultUnitType={}))[h.IRUT_NULL=0]="IRUT_NULL",h[h.IRUT_COLOUR_IMAGE=1]="IRUT_COLOUR_IMAGE",h[h.IRUT_SCALED_DOWN_COLOUR_IMAGE=2]="IRUT_SCALED_DOWN_COLOUR_IMAGE",h[h.IRUT_GRAYSCALE_IMAGE=4]="IRUT_GRAYSCALE_IMAGE",h[h.IRUT_TRANSOFORMED_GRAYSCALE_IMAGE=8]="IRUT_TRANSOFORMED_GRAYSCALE_IMAGE",h[h.IRUT_ENHANCED_GRAYSCALE_IMAGE=16]="IRUT_ENHANCED_GRAYSCALE_IMAGE",h[h.IRUT_PREDETECTED_REGIONS=32]="IRUT_PREDETECTED_REGIONS",h[h.IRUT_BINARY_IMAGE=64]="IRUT_BINARY_IMAGE",h[h.IRUT_TEXTURE_DETECTION_RESULT=128]="IRUT_TEXTURE_DETECTION_RESULT",h[h.IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE=256]="IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE",h[h.IRUT_TEXTURE_REMOVED_BINARY_IMAGE=512]="IRUT_TEXTURE_REMOVED_BINARY_IMAGE",h[h.IRUT_CONTOURS=1024]="IRUT_CONTOURS",h[h.IRUT_LINE_SEGMENTS=2048]="IRUT_LINE_SEGMENTS",h[h.IRUT_TEXT_ZONES=4096]="IRUT_TEXT_ZONES",h[h.IRUT_TEXT_REMOVED_BINARY_IMAGE=8192]="IRUT_TEXT_REMOVED_BINARY_IMAGE",h[h.IRUT_CANDIDATE_BARCODE_ZONES=16384]="IRUT_CANDIDATE_BARCODE_ZONES",h[h.IRUT_LOCALIZED_BARCODES=32768]="IRUT_LOCALIZED_BARCODES",h[h.IRUT_SCALED_UP_BARCODE_IMAGE=65536]="IRUT_SCALED_UP_BARCODE_IMAGE",h[h.IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE=131072]="IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE",h[h.IRUT_COMPLEMENTED_BARCODE_IMAGE=262144]="IRUT_COMPLEMENTED_BARCODE_IMAGE",h[h.IRUT_DECODED_BARCODES=524288]="IRUT_DECODED_BARCODES",h[h.IRUT_LONG_LINES=1048576]="IRUT_LONG_LINES",h[h.IRUT_CORNERS=2097152]="IRUT_CORNERS",h[h.IRUT_CANDIDATE_QUAD_EDGES=4194304]="IRUT_CANDIDATE_QUAD_EDGES",h[h.IRUT_DETECTED_QUADS=8388608]="IRUT_DETECTED_QUADS",h[h.IRUT_LOCALIZED_TEXT_LINES=16777216]="IRUT_LOCALIZED_TEXT_LINES",h[h.IRUT_RECOGNIZED_TEXT_LINES=33554432]="IRUT_RECOGNIZED_TEXT_LINES",h[h.IRUT_NORMALIZED_IMAGES=67108864]="IRUT_NORMALIZED_IMAGES",h[h.IRUT_ALL=134217727]="IRUT_ALL",E.EnumRegionObjectElementType=void 0,(g=E.EnumRegionObjectElementType||(E.EnumRegionObjectElementType={}))[g.ROET_PREDETECTED_REGION=0]="ROET_PREDETECTED_REGION",g[g.ROET_LOCALIZED_BARCODE=1]="ROET_LOCALIZED_BARCODE",g[g.ROET_DECODED_BARCODE=2]="ROET_DECODED_BARCODE",g[g.ROET_LOCALIZED_TEXT_LINE=3]="ROET_LOCALIZED_TEXT_LINE",g[g.ROET_RECOGNIZED_TEXT_LINE=4]="ROET_RECOGNIZED_TEXT_LINE",g[g.ROET_DETECTED_QUAD=5]="ROET_DETECTED_QUAD",g[g.ROET_NORMALIZED_IMAGE=6]="ROET_NORMALIZED_IMAGE",E.EnumSectionType=void 0,(c=E.EnumSectionType||(E.EnumSectionType={}))[c.ST_NULL=0]="ST_NULL",c[c.ST_REGION_PREDETECTION=1]="ST_REGION_PREDETECTION",c[c.ST_BARCODE_LOCALIZATION=2]="ST_BARCODE_LOCALIZATION",c[c.ST_BARCODE_DECODING=3]="ST_BARCODE_DECODING",c[c.ST_TEXT_LINE_LOCALIZATION=4]="ST_TEXT_LINE_LOCALIZATION",c[c.ST_TEXT_LINE_RECOGNITION=5]="ST_TEXT_LINE_RECOGNITION",c[c.ST_DOCUMENT_DETECTION=6]="ST_DOCUMENT_DETECTION",c[c.ST_DOCUMENT_NORMALIZATION=7]="ST_DOCUMENT_NORMALIZATION",E.CoreModule=class{static getVersion(){return"3.0.10"}},E.ImageSourceAdapter=class{constructor(){a.add(this),i.set(this,[]),r.set(this,1),o.set(this,E.EnumBufferOverflowProtectionMode.BOPM_BLOCK),S.set(this,!1),s.set(this,void 0),m.set(this,E.EnumColourChannelUsageType.CCUT_AUTO)}get _isFetchingStarted(){return _(this,S,"f")}addImageToBuffer(I){var e;if(!L(I))throw new TypeError("Invalid 'image'.");if((null===(e=I.tag)||void 0===e?void 0:e.hasOwnProperty("imageId"))&&"number"==typeof I.tag.imageId&&this.hasImage(I.tag.imageId))throw new Error("Existed imageId.");if(_(this,i,"f").length>=_(this,r,"f"))switch(_(this,o,"f")){case E.EnumBufferOverflowProtectionMode.BOPM_BLOCK:break;case E.EnumBufferOverflowProtectionMode.BOPM_UPDATE:if(_(this,i,"f").push(I),D(_(this,s,"f"))&&N(_(this,s,"f").imageId)&&1==_(this,s,"f").keepInBuffer)for(;_(this,i,"f").length>_(this,r,"f");){const E=_(this,i,"f").findIndex((E=>{var I;return(null===(I=E.tag)||void 0===I?void 0:I.imageId)!==_(this,s,"f").imageId}));_(this,i,"f").splice(E,1)}else _(this,i,"f").splice(0,_(this,i,"f").length-_(this,r,"f"))}else _(this,i,"f").push(I)}getImage(){if(0===_(this,i,"f").length)return null;let I;if(_(this,s,"f")&&N(_(this,s,"f").imageId)){const E=_(this,a,"m",P).call(this,_(this,s,"f").imageId);if(E<0)throw new Error(`Image with id ${_(this,s,"f").imageId} doesn't exist.`);I=_(this,i,"f").slice(E,E+1)[0]}else I=_(this,i,"f").pop();if([E.EnumImagePixelFormat.IPF_RGB_565,E.EnumImagePixelFormat.IPF_RGB_555,E.EnumImagePixelFormat.IPF_RGB_888,E.EnumImagePixelFormat.IPF_ARGB_8888,E.EnumImagePixelFormat.IPF_RGB_161616,E.EnumImagePixelFormat.IPF_ARGB_16161616,E.EnumImagePixelFormat.IPF_ABGR_8888,E.EnumImagePixelFormat.IPF_ABGR_16161616,E.EnumImagePixelFormat.IPF_BGR_888].includes(I.format)){if(_(this,m,"f")===E.EnumColourChannelUsageType.CCUT_RGB_R_CHANNEL_ONLY){const _=new Uint8Array(I.width*I.height);for(let e=0;e<_.length;e++)switch(I.format){case E.EnumImagePixelFormat.IPF_RGB_565:case E.EnumImagePixelFormat.IPF_RGB_555:case E.EnumImagePixelFormat.IPF_RGB_888:case E.EnumImagePixelFormat.IPF_RGB_161616:_[e]=I.bytes[3*e+2];break;case E.EnumImagePixelFormat.IPF_ARGB_8888:case E.EnumImagePixelFormat.IPF_ARGB_16161616:_[e]=I.bytes[4*e+2];break;case E.EnumImagePixelFormat.IPF_BGR_888:_[e]=I.bytes[3*e];break;case E.EnumImagePixelFormat.IPF_ABGR_8888:case E.EnumImagePixelFormat.IPF_ABGR_16161616:_[e]=I.bytes[4*e]}I.bytes=_,I.stride=I.width,I.format=E.EnumImagePixelFormat.IPF_GRAYSCALED}else if(_(this,m,"f")===E.EnumColourChannelUsageType.CCUT_RGB_G_CHANNEL_ONLY){const _=new Uint8Array(I.width*I.height);for(let e=0;e<_.length;e++)switch(I.format){case E.EnumImagePixelFormat.IPF_RGB_565:case E.EnumImagePixelFormat.IPF_RGB_555:case E.EnumImagePixelFormat.IPF_RGB_888:case E.EnumImagePixelFormat.IPF_RGB_161616:case E.EnumImagePixelFormat.IPF_BGR_888:_[e]=I.bytes[3*e+1];break;case E.EnumImagePixelFormat.IPF_ARGB_8888:case E.EnumImagePixelFormat.IPF_ARGB_16161616:case E.EnumImagePixelFormat.IPF_ABGR_8888:case E.EnumImagePixelFormat.IPF_ABGR_16161616:_[e]=I.bytes[4*e+1]}I.bytes=_,I.stride=I.width,I.format=E.EnumImagePixelFormat.IPF_GRAYSCALED}else if(_(this,m,"f")===E.EnumColourChannelUsageType.CCUT_RGB_B_CHANNEL_ONLY){const _=new Uint8Array(I.width*I.height);for(let e=0;e<_.length;e++)switch(I.format){case E.EnumImagePixelFormat.IPF_RGB_565:case E.EnumImagePixelFormat.IPF_RGB_555:case E.EnumImagePixelFormat.IPF_RGB_888:case E.EnumImagePixelFormat.IPF_RGB_161616:_[e]=I.bytes[3*e];break;case E.EnumImagePixelFormat.IPF_ARGB_8888:case E.EnumImagePixelFormat.IPF_ARGB_16161616:_[e]=I.bytes[4*e];break;case E.EnumImagePixelFormat.IPF_BGR_888:_[e]=I.bytes[3*e+2];break;case E.EnumImagePixelFormat.IPF_ABGR_8888:case E.EnumImagePixelFormat.IPF_ABGR_16161616:_[e]=I.bytes[4*e+2]}I.bytes=_,I.stride=I.width,I.format=E.EnumImagePixelFormat.IPF_GRAYSCALED}}else[E.EnumImagePixelFormat.IPF_NV21,E.EnumImagePixelFormat.IPF_NV12].includes(I.format);return I}setNextImageToReturn(E,_){if(!((...E)=>0!==E.length&&E.every((E=>N(E))))(E))throw new TypeError("Invalid 'imageId'.");if(void 0!==_&&!t(_))throw new TypeError("Invalid 'keepInBuffer'.");I(this,s,{imageId:E,keepInBuffer:_},"f")}_resetNextReturnedImage(){I(this,s,null,"f")}hasImage(E){return _(this,a,"m",P).call(this,E)>=0}startFetching(){I(this,S,!0,"f")}stopFetching(){I(this,S,!1,"f")}setMaximumImageCount(E){if("number"!=typeof E)throw new TypeError("Invalid 'count'.");if(E<1||Math.round(E)!==E)throw new Error("Invalid 'count'.");for(I(this,r,E,"f");_(this,i,"f")&&_(this,i,"f").length>E;)_(this,i,"f").shift()}getMaximumImageCount(){return _(this,r,"f")}getImageCount(){return _(this,i,"f").length}clearBuffer(){_(this,i,"f").length=0}isBufferEmpty(){return 0===_(this,i,"f").length}setBufferOverflowProtectionMode(E){I(this,o,E,"f")}getBufferOverflowProtectionMode(){return _(this,o,"f")}setColourChannelUsageType(E){I(this,m,E,"f")}getColourChannelUsageType(){return _(this,m,"f")}},E.IntermediateResultManager=class{constructor(){this.intermediateResultReceiverSet=new Set}addResultReceiver(E){if("object"!=typeof E)throw new Error("Invalid receiver.");this.intermediateResultReceiverSet.add(E)}removeResultReceiver(E){this.intermediateResultReceiverSet.delete(E)}async getOriginalImage(E){return null}},E.IntermediateResultReceiver=class{constructor(){this.onTaskResultsReceived=null,this.onPredetectedRegionsReceived=null,this.onDecodedBarcodesReceived=null,this.onRecognizedTextLinesReceived=null,this.onDetectedQuadsReceived=null,this.onNormalizedImagesReceived=null}},E._isArc=E=>!!D(E)&&(!!N(E.x)&&(!!N(E.y)&&(!!N(E.radius)&&(!(E.radius<0)&&(!!N(E.startAngle)&&!!N(E.endAngle)))))),E._isContour=E=>!!D(E)&&(!!R(E.points)&&(0!=E.points.length&&!E.points.some((E=>!n(E))))),E._isDSImageData=L,E._isDSRect=E=>!!D(E)&&(!!N(E.left)&&(!(E.left<0)&&(!!N(E.top)&&(!(E.top<0)&&(!!N(E.right)&&(!(E.right<0)&&(!!N(E.bottom)&&(!(E.bottom<0)&&(!(E.left>=E.right)&&(!(E.top>=E.bottom)&&!!t(E.isMeasuredInPercentage))))))))))),E._isImageTag=O,E._isLineSegment=E=>!!D(E)&&(!!n(E.startPoint)&&(!!n(E.endPoint)&&(E.startPoint.x!=E.endPoint.x||E.startPoint.y!=E.endPoint.y))),E._isPoint=n,E._isPolygon=E=>!!D(E)&&(!!R(E.points)&&(0!=E.points.length&&!E.points.some((E=>!n(E))))),E._isQuad=E=>!!D(E)&&(!!R(E.points)&&(0!=E.points.length&&4==E.points.length&&!E.points.some((E=>!n(E))))),E._isRect=E=>!!D(E)&&(!!N(E.x)&&(!!N(E.y)&&(!!N(E.width)&&(!(E.width<0)&&(!!N(E.height)&&(!(E.height<0)&&!("isMeasuredInPercentage"in E&&!t(E.isMeasuredInPercentage)))))))),Object.defineProperty(E,"__esModule",{value:!0})}));
{
"name": "dynamsoft-core",
"version": "3.0.10-beta-202308171924",
"version": "3.0.10-beta-202308180152",
"description": "Dynamsoft Core encompasses the shared interface and enumeration definitions of the Dynamsoft Capture Vision (DCV) architecture. It is a prerequisite for using the full functionality of DCV.",

@@ -5,0 +5,0 @@ "homepage": "https://dynamsoft.com/capture-vision/docs/web/programming/javascript/?ver=latest",

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