{"version":3,"sources":["jsdelivr-header.js","/npm/@orders.co/epson-tm-epos-sdk@0.1.4/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNS,cAAe,mBAAoB,aAAgB,eAE5D,MAAM,UAAE,WAAc,cAEtB,IAAK,UACD,MAAM,IAAI,MAAM,iEAIpB,MAAM,aAAe,IAAI,mBAAmB,WAE5C,MAAM,QACF,WAAA,GACI,KAAK,SAAW,EACpB,CAEA,gBAAM,CAAW,EAAe,SAAU,EAAkB,UAAU,SAClE,IAEI,aADM,UAAU,qBACT,CACX,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,WAAM,GACF,IAEI,aADM,UAAU,gBACT,CACX,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,aAAM,CAAQ,GACV,IAEI,aADM,UAAU,QAAQ,GACjB,IACX,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,kBAAM,CAAa,GACf,IAEI,aADM,UAAU,aAAa,GACtB,IACX,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,iBAAM,CAAY,EAAO,GACrB,IAEI,aADM,UAAU,YAAY,EAAO,GAC5B,IACX,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,iBAAM,CAAY,GACd,IAEI,aADM,UAAU,YAAY,GACrB,IACX,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,mBAAM,CAAc,GAChB,IAEI,aADM,UAAU,cAAc,GACvB,IACX,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,aAAM,GACF,IAEI,aADM,UAAU,UACT,IACX,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,iBAAM,CAAY,GACd,IAEI,aADM,UAAU,YAAY,GACrB,IACX,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,YAAM,CAAO,EAAU,UAAU,UAC7B,IAEI,aADM,UAAU,OAAO,GAChB,IACX,CAAE,MAAO,GACL,MAAM,CACV,CACJ,CAEA,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U,UAAU,eAC1B,MAAM,QAAU,UAAU,eAC1B,MAAM,QAAU,UAAU,eAC1B,MAAM,QAAU,UAAU,eAE1B,MAAM,wBAA0B,UAAU,+BAC1C,MAAM,wBAA0B,UAAU,+BAC1C,MAAM,wBAA0B,UAAU,+BAC1C,MAAM,wBAA0B,UAAU,uCAElC","file":"/npm/@orders.co/epson-tm-epos-sdk@0.1.4/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@orders.co/epson-tm-epos-sdk@0.1.4/src/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { NativeModules, NativeEventEmitter, Platform } from 'react-native';\n\nconst { EposPrint } = NativeModules;\n\nif (!EposPrint) {\n    throw new Error(`The package 'react-native-epos-print' is not linked properly.`);\n}\n\n// Create event emitter for status change events\nconst eventEmitter = new NativeEventEmitter(EposPrint);\n\nclass Builder {\n    constructor() {\n        this.commands = [];\n    }\n\n    async initialize(printerModel = 'TM-m30', printerLanguage = EposPrint.LANG_EN) {\n        try {\n            await EposPrint.initializeBuilder();\n            return true;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async clear() {\n        try {\n            await EposPrint.clearBuilder();\n            return true;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addText(text) {\n        try {\n            await EposPrint.addText(text);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addTextAlign(align) {\n        try {\n            await EposPrint.addTextAlign(align);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addTextSize(width, height) {\n        try {\n            await EposPrint.addTextSize(width, height);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addTextFont(font) {\n        try {\n            await EposPrint.addTextFont(font);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addTextSmooth(smooth) {\n        try {\n            await EposPrint.addTextSmooth(smooth);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addFeed() {\n        try {\n            await EposPrint.addFeed();\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addFeedLine(line) {\n        try {\n            await EposPrint.addFeedLine(line);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addCut(cutType = EposPrint.CUT_FEED) {\n        try {\n            await EposPrint.addCut(cutType);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addBarcode(data, symbology, height, width, hri) {\n        try {\n            await EposPrint.addBarcode(data, symbology, height, width, hri);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addSymbol(data, type, level, width, height) {\n        try {\n            await EposPrint.addSymbol(data, type, level, width, height);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async addImage(base64Image, x, y, width, height) {\n        try {\n            await EposPrint.addImage(base64Image, x, y, width, height);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async beginPageMode(x, y, width, height, direction) {\n        try {\n            await EposPrint.beginPageMode(x, y, width, height, direction);\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async endPageMode() {\n        try {\n            await EposPrint.endPageMode();\n            return this;\n        } catch (error) {\n            throw error;\n        }\n    }\n}\n\nclass EposPrintSdk {\n    static async initialize() {\n        try {\n            await EposPrint.initializePrinter();\n            return true;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    static async openPrinter(config) {\n        try {\n            await EposPrint.openPrinter(config);\n            return true;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    static async closePrinter() {\n        try {\n            await EposPrint.closePrinter();\n            return true;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    static async getPrinterStatus() {\n        try {\n            const status = await EposPrint.getPrinterStatus();\n            return status;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    static async sendData(builder) {\n        try {\n            const result = await EposPrint.sendData();\n            return result;\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    static addStatusListener(callback) {\n        return eventEmitter.addListener('onStatusChange', callback);\n    }\n\n    static addBatteryStatusListener(callback) {\n        return eventEmitter.addListener('onBatteryStatusChange', callback);\n    }\n\n    static removeStatusListener(subscription) {\n        subscription.remove();\n    }\n\n    static removeBatteryStatusListener(subscription) {\n        subscription.remove();\n    }\n\n    static createBuilder() {\n        return new Builder();\n    }\n}\n\n// Export constants from native module\nexport const DEVTYPE_TCP = EposPrint.DEVTYPE_TCP;\nexport const DEVTYPE_BLUETOOTH = EposPrint.DEVTYPE_BLUETOOTH;\nexport const DEVTYPE_USB = EposPrint.DEVTYPE_USB;\n\nexport const LANG_EN = EposPrint.LANG_EN;\nexport const LANG_JA = EposPrint.LANG_JA;\nexport const LANG_ZH_CN = EposPrint.LANG_ZH_CN;\nexport const LANG_ZH_TW = EposPrint.LANG_ZH_TW;\nexport const LANG_KO = EposPrint.LANG_KO;\nexport const LANG_TH = EposPrint.LANG_TH;\nexport const LANG_VI = EposPrint.LANG_VI;\n\nexport const ALIGN_LEFT = EposPrint.ALIGN_LEFT;\nexport const ALIGN_CENTER = EposPrint.ALIGN_CENTER;\nexport const ALIGN_RIGHT = EposPrint.ALIGN_RIGHT;\n\nexport const FONT_A = EposPrint.FONT_A;\nexport const FONT_B = EposPrint.FONT_B;\nexport const FONT_C = EposPrint.FONT_C;\n\nexport const CUT_FEED = EposPrint.CUT_FEED;\nexport const CUT_NO_FEED = EposPrint.CUT_NO_FEED;\n\nexport const BARCODE_UPC_A = EposPrint.BARCODE_UPC_A;\nexport const BARCODE_UPC_E = EposPrint.BARCODE_UPC_E;\nexport const BARCODE_EAN13 = EposPrint.BARCODE_EAN13;\nexport const BARCODE_JAN13 = EposPrint.BARCODE_JAN13;\nexport const BARCODE_EAN8 = EposPrint.BARCODE_EAN8;\nexport const BARCODE_JAN8 = EposPrint.BARCODE_JAN8;\nexport const BARCODE_CODE39 = EposPrint.BARCODE_CODE39;\nexport const BARCODE_ITF = EposPrint.BARCODE_ITF;\nexport const BARCODE_CODABAR = EposPrint.BARCODE_CODABAR;\nexport const BARCODE_CODE93 = EposPrint.BARCODE_CODE93;\nexport const BARCODE_CODE128 = EposPrint.BARCODE_CODE128;\nexport const BARCODE_GS1_128 = EposPrint.BARCODE_GS1_128;\nexport const BARCODE_GS1_DATABAR_OMNIDIRECTIONAL = EposPrint.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL;\nexport const BARCODE_GS1_DATABAR_TRUNCATED = EposPrint.BARCODE_GS1_DATABAR_TRUNCATED;\nexport const BARCODE_GS1_DATABAR_LIMITED = EposPrint.BARCODE_GS1_DATABAR_LIMITED;\nexport const BARCODE_GS1_DATABAR_EXPANDED = EposPrint.BARCODE_GS1_DATABAR_EXPANDED;\n\nexport const HRI_NONE = EposPrint.HRI_NONE;\nexport const HRI_ABOVE = EposPrint.HRI_ABOVE;\nexport const HRI_BELOW = EposPrint.HRI_BELOW;\nexport const HRI_BOTH = EposPrint.HRI_BOTH;\n\nexport const SYMBOL_PDF417_STANDARD = EposPrint.SYMBOL_PDF417_STANDARD;\nexport const SYMBOL_PDF417_TRUNCATED = EposPrint.SYMBOL_PDF417_TRUNCATED;\nexport const SYMBOL_QRCODE_MODEL_1 = EposPrint.SYMBOL_QRCODE_MODEL_1;\nexport const SYMBOL_QRCODE_MODEL_2 = EposPrint.SYMBOL_QRCODE_MODEL_2;\nexport const SYMBOL_QRCODE_MICRO = EposPrint.SYMBOL_QRCODE_MICRO;\n\nexport const LEVEL_L = EposPrint.LEVEL_L;\nexport const LEVEL_M = EposPrint.LEVEL_M;\nexport const LEVEL_Q = EposPrint.LEVEL_Q;\nexport const LEVEL_H = EposPrint.LEVEL_H;\n\nexport const DIRECTION_LEFT_TO_RIGHT = EposPrint.DIRECTION_LEFT_TO_RIGHT;\nexport const DIRECTION_BOTTOM_TO_TOP = EposPrint.DIRECTION_BOTTOM_TO_TOP;\nexport const DIRECTION_RIGHT_TO_LEFT = EposPrint.DIRECTION_RIGHT_TO_LEFT;\nexport const DIRECTION_TOP_TO_BOTTOM = EposPrint.DIRECTION_TOP_TO_BOTTOM;\n\nexport default EposPrintSdk; "]}