{"version":3,"sources":["jsdelivr-header.js","/npm/capacitor-webnativeview@0.0.83/dist/esm/definitions.js","/npm/capacitor-webnativeview@0.0.83/dist/esm/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,wGCNO,MAAM,cACT,WAAA,CAAY,EAAS,GACjB,KAAK,QAAU,EACf,KAAK,SAAW,CACxB,CACI,MAAA,CAAO,EAAK,GACR,OAAO,KAAK,QAAQ,OAAO,CAAE,OAAQ,EAAI,OAAQ,SAAU,KAAK,SAAU,OAAQ,GAC1F,EAEO,MAAM,oBAAoB,OAC7B,WAAA,CAAY,EAAQ,GAChB,QACA,KAAK,OAAS,EACd,KAAK,QAAU,EACf,KAAK,WAAa,GAClB,KAAK,QAAU,GACf,KAAK,KAAO,KACR,KAAK,QAAQ,YAAY,CAAE,OAAQ,KAAK,SAAU,MAAM,IACpD,IAAI,EAAU,IAAI,kBAAkB,EAAK,MACrC,EAAY,IAAI,UAAU,EAAS,EAAK,MAAO,EAAK,QACxD,KAAK,UAAU,aAAa,EAAW,EAAG,EAAE,GAC9C,EAEN,KAAK,OAAS,SAAS,cAAc,UACrC,KAAK,UAAY,KAAK,OAAO,WAAW,MACxC,EAAQ,YAAY,cAAc,SAAU,GACxC,QAAQ,IAAI,EACxB,GACA,CACI,cAAA,CAAe,GACX,IAAK,IAAI,EAAI,EAAG,EAAI,EAAI,OAAQ,IAAK,CACjC,KAAK,WAAW,KAAK,IAAI,cAAc,KAAK,QAAS,IACrD,IAAI,EAAM,KACV,KAAK,QAAQ,EAAI,GAAG,MAAQ,WACxB,OAAO,EAAI,WAAW,GAAG,OAAO,EAAK,MAAM,KAAK,WAChE,CACA,CACA,CACI,UAAA,GACI,KAAK,QAAQ,QAAQ,CAAE,OAAQ,KAAK,OAAQ,MAAO,KAAK,OAAO,MAAO,OAAQ,KAAK,OAAO,QAClG,EAEO,eAAe,WAAW,EAAG,GAChC,IAAI,QAAY,EAAE,WAAW,CAAE,KAAM,IACjC,EAAO,IAAI,YAAY,EAAI,OAAQ,GAGvC,OAFA,EAAK,eAAe,EAAI,SACxB,QAAQ,IAAI,GACL,CACX,CC/CK,MAAC,cAAgB,oBAAe,gBAAiB,I","file":"/npm/capacitor-webnativeview@0.0.83/dist/plugin.cjs.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/capacitor-webnativeview@0.0.83/dist/plugin.cjs.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","export class AndroidMethod {\r\n    constructor(context, methodId) {\r\n        this.context = context;\r\n        this.methodId = methodId;\r\n    }\r\n    invoke(obj, args) {\r\n        return this.context.invoke({ viewId: obj.viewId, methodId: this.methodId, params: args });\r\n    }\r\n}\r\nexport class AndroidView extends Object {\r\n    constructor(viewId, context) {\r\n        super();\r\n        this.viewId = viewId;\r\n        this.context = context;\r\n        this.methodList = [];\r\n        this.methods = {};\r\n        this.draw = () => {\r\n            this.context.getViewData({ viewId: this.viewId }).then((data) => {\r\n                var imgData = new Uint8ClampedArray(data.data);\r\n                var imageData = new ImageData(imgData, data.width, data.height);\r\n                this.context2d.putImageData(imageData, 0, 0);\r\n            });\r\n        };\r\n        this.canvas = document.createElement('canvas');\r\n        this.context2d = this.canvas.getContext('2d');\r\n        context.addListener('invalidate', function (info) {\r\n            console.log(info);\r\n        });\r\n    }\r\n    loadMethodList(arr) {\r\n        for (let i = 0; i < arr.length; i++) {\r\n            this.methodList.push(new AndroidMethod(this.context, i));\r\n            var ref = this;\r\n            this.methods[arr[i].name] = function () {\r\n                return ref.methodList[i].invoke(ref, Array.from(arguments));\r\n            };\r\n        }\r\n    }\r\n    updateSize() {\r\n        this.context.setSize({ viewId: this.viewId, width: this.canvas.width, height: this.canvas.height });\r\n    }\r\n}\r\nexport async function createView(p, name) {\r\n    var obj = await p.createView({ name: name });\r\n    var view = new AndroidView(obj.viewId, p);\r\n    view.loadMethodList(obj.methods);\r\n    console.log(obj);\r\n    return view;\r\n}\r\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\r\nconst WebNativeView = registerPlugin('WebNativeView', {});\r\nexport * from './definitions';\r\nexport { WebNativeView };\r\n//# sourceMappingURL=index.js.map"]}