@scandit/web-datacapture-barcode
Version:
Scandit Data Capture SDK for the Web
1 lines • 1 kB
JavaScript
import {a}from'./chunk-LLMMR2TB.js';import {a as a$1}from'./chunk-DCUKY2F4.js';var y=class{constructor(){this.properties={};this.symbologies={};this._arucoDictionary=null;}get enabledSymbologies(){return Object.keys(this.symbologies).filter(o=>this.symbologies[o].isEnabled)}settingsForSymbology(o){if(!this.symbologies[o]){let i=a.SymbologySettings[o];i._symbology=o,this.symbologies[o]=i;}return this.symbologies[o]}setProperty(o,i){this.properties[o]=i;}getProperty(o){return this.properties[o]}enableSymbologies(o){for(let i of o)this.enableSymbology(i,true);}enableSymbology(o,i){this.settingsForSymbology(o).isEnabled=i,o==="aruco"&&(this._arucoDictionary=a$1.fromPreset("5X5_50"));}setArucoDictionary(o){this._arucoDictionary=o;}toJSONObject(){var o,i;return {properties:this.properties,symbologies:Object.keys(this.symbologies).reduce((t,e)=>(t[e]=this.symbologies[e].toJSONObject(),t),{}),arucoDictionary:(i=(o=this._arucoDictionary)==null?void 0:o.toJSONObject())!=null?i:null}}};export{y as a};