mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 19:11:02 +00:00
1 line
13 KiB
Plaintext
1 line
13 KiB
Plaintext
{"dependencies":[],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n exports.base64toBlob = base64toBlob;\n exports.blobToBase64Async = blobToBase64Async;\n exports.htmlToPlainText = htmlToPlainText;\n exports.getImageSizeFromBlobAsync = getImageSizeFromBlobAsync;\n exports.findImageInClipboardAsync = findImageInClipboardAsync;\n exports.findHtmlInClipboardAsync = findHtmlInClipboardAsync;\n exports.isClipboardPermissionDeniedAsync = isClipboardPermissionDeniedAsync;\n /**\n * Converts base64-encoded data to a `Blob` object.\n * @see https://stackoverflow.com/a/20151856\n */\n function base64toBlob(base64Data, contentType) {\n contentType = contentType || '';\n const sliceSize = 1024;\n const byteCharacters = atob(base64Data);\n const bytesLength = byteCharacters.length;\n const slicesCount = Math.ceil(bytesLength / sliceSize);\n const byteArrays = new Array(slicesCount);\n for (let sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {\n const begin = sliceIndex * sliceSize;\n const end = Math.min(begin + sliceSize, bytesLength);\n const bytes = new Array(end - begin);\n for (let offset = begin, i = 0; offset < end; ++i, ++offset) {\n bytes[i] = byteCharacters[offset].charCodeAt(0);\n }\n byteArrays[sliceIndex] = new Uint8Array(bytes);\n }\n // I cannot use `@ts-expect-error` here because some environments consider this correct:\n // expo-module build - OK,\n // expo-module test - error\n // @ts-ignore `Blob` from `lib.dom.d.ts` and the one from `@types/react-native` differ somehow\n return new Blob(byteArrays, {\n type: contentType\n });\n }\n /**\n * Converts blob to base64-encoded string with Data-URL prefix.\n */\n function blobToBase64Async(blob) {\n return new Promise((resolve, _) => {\n const reader = new FileReader();\n reader.onloadend = () => resolve(reader.result);\n reader.readAsDataURL(blob);\n });\n }\n function htmlToPlainText(html) {\n const tempDivElement = document.createElement('div');\n tempDivElement.innerHTML = html;\n return tempDivElement.textContent || tempDivElement.innerText || '';\n }\n function getImageSizeFromBlobAsync(blob) {\n return new Promise((resolve, _) => {\n const blobUrl = URL.createObjectURL(blob);\n const img = document.createElement('img');\n img.src = blobUrl;\n img.onload = function () {\n resolve({\n width: img.width,\n height: img.height\n });\n };\n });\n }\n async function findImageInClipboardAsync(items) {\n for (const clipboardItem of items) {\n // first look for png\n if (clipboardItem.types.some(type => type === 'image/png')) {\n return await clipboardItem.getType('image/png');\n }\n // alternatively, an image might be a jpeg\n // NOTE: Currently, this is not supported by browsers yet. They only support PNG now\n if (clipboardItem.types.some(type => type === 'image/jpeg')) {\n return await clipboardItem.getType('image/jpeg');\n }\n }\n return null;\n }\n async function findHtmlInClipboardAsync(items) {\n for (const clipboardItem of items) {\n if (clipboardItem.types.some(type => type === 'text/html')) {\n return await clipboardItem.getType('text/html');\n }\n }\n return null;\n }\n async function isClipboardPermissionDeniedAsync() {\n const queryOpts = {\n name: 'clipboard-read'\n };\n const permissionStatus = await navigator.permissions.query(queryOpts);\n return permissionStatus.state === 'denied';\n }\n});","lineCount":99,"map":[[7,2,5,0,"exports"],[7,9,5,0],[7,10,5,0,"base64toBlob"],[7,22,5,0],[7,25,5,0,"base64toBlob"],[7,37,5,0],[8,2,30,0,"exports"],[8,9,30,0],[8,10,30,0,"blobToBase64Async"],[8,27,30,0],[8,30,30,0,"blobToBase64Async"],[8,47,30,0],[9,2,37,0,"exports"],[9,9,37,0],[9,10,37,0,"htmlToPlainText"],[9,25,37,0],[9,28,37,0,"htmlToPlainText"],[9,43,37,0],[10,2,42,0,"exports"],[10,9,42,0],[10,10,42,0,"getImageSizeFromBlobAsync"],[10,35,42,0],[10,38,42,0,"getImageSizeFromBlobAsync"],[10,63,42,0],[11,2,52,0,"exports"],[11,9,52,0],[11,10,52,0,"findImageInClipboardAsync"],[11,35,52,0],[11,38,52,0,"findImageInClipboardAsync"],[11,63,52,0],[12,2,66,0,"exports"],[12,9,66,0],[12,10,66,0,"findHtmlInClipboardAsync"],[12,34,66,0],[12,37,66,0,"findHtmlInClipboardAsync"],[12,61,66,0],[13,2,74,0,"exports"],[13,9,74,0],[13,10,74,0,"isClipboardPermissionDeniedAsync"],[13,42,74,0],[13,45,74,0,"isClipboardPermissionDeniedAsync"],[13,77,74,0],[14,2,1,0],[15,0,2,0],[16,0,3,0],[17,0,4,0],[18,2,5,7],[18,11,5,16,"base64toBlob"],[18,23,5,28,"base64toBlob"],[18,24,5,29,"base64Data"],[18,34,5,39],[18,36,5,41,"contentType"],[18,47,5,52],[18,49,5,54],[19,4,6,4,"contentType"],[19,15,6,15],[19,18,6,18,"contentType"],[19,29,6,29],[19,33,6,33],[19,35,6,35],[20,4,7,4],[20,10,7,10,"sliceSize"],[20,19,7,19],[20,22,7,22],[20,26,7,26],[21,4,8,4],[21,10,8,10,"byteCharacters"],[21,24,8,24],[21,27,8,27,"atob"],[21,31,8,31],[21,32,8,32,"base64Data"],[21,42,8,42],[21,43,8,43],[22,4,9,4],[22,10,9,10,"bytesLength"],[22,21,9,21],[22,24,9,24,"byteCharacters"],[22,38,9,38],[22,39,9,39,"length"],[22,45,9,45],[23,4,10,4],[23,10,10,10,"slicesCount"],[23,21,10,21],[23,24,10,24,"Math"],[23,28,10,28],[23,29,10,29,"ceil"],[23,33,10,33],[23,34,10,34,"bytesLength"],[23,45,10,45],[23,48,10,48,"sliceSize"],[23,57,10,57],[23,58,10,58],[24,4,11,4],[24,10,11,10,"byteArrays"],[24,20,11,20],[24,23,11,23],[24,27,11,27,"Array"],[24,32,11,32],[24,33,11,33,"slicesCount"],[24,44,11,44],[24,45,11,45],[25,4,12,4],[25,9,12,9],[25,13,12,13,"sliceIndex"],[25,23,12,23],[25,26,12,26],[25,27,12,27],[25,29,12,29,"sliceIndex"],[25,39,12,39],[25,42,12,42,"slicesCount"],[25,53,12,53],[25,55,12,55],[25,57,12,57,"sliceIndex"],[25,67,12,67],[25,69,12,69],[26,6,13,8],[26,12,13,14,"begin"],[26,17,13,19],[26,20,13,22,"sliceIndex"],[26,30,13,32],[26,33,13,35,"sliceSize"],[26,42,13,44],[27,6,14,8],[27,12,14,14,"end"],[27,15,14,17],[27,18,14,20,"Math"],[27,22,14,24],[27,23,14,25,"min"],[27,26,14,28],[27,27,14,29,"begin"],[27,32,14,34],[27,35,14,37,"sliceSize"],[27,44,14,46],[27,46,14,48,"bytesLength"],[27,57,14,59],[27,58,14,60],[28,6,15,8],[28,12,15,14,"bytes"],[28,17,15,19],[28,20,15,22],[28,24,15,26,"Array"],[28,29,15,31],[28,30,15,32,"end"],[28,33,15,35],[28,36,15,38,"begin"],[28,41,15,43],[28,42,15,44],[29,6,16,8],[29,11,16,13],[29,15,16,17,"offset"],[29,21,16,23],[29,24,16,26,"begin"],[29,29,16,31],[29,31,16,33,"i"],[29,32,16,34],[29,35,16,37],[29,36,16,38],[29,38,16,40,"offset"],[29,44,16,46],[29,47,16,49,"end"],[29,50,16,52],[29,52,16,54],[29,54,16,56,"i"],[29,55,16,57],[29,57,16,59],[29,59,16,61,"offset"],[29,65,16,67],[29,67,16,69],[30,8,17,12,"bytes"],[30,13,17,17],[30,14,17,18,"i"],[30,15,17,19],[30,16,17,20],[30,19,17,23,"byteCharacters"],[30,33,17,37],[30,34,17,38,"offset"],[30,40,17,44],[30,41,17,45],[30,42,17,46,"charCodeAt"],[30,52,17,56],[30,53,17,57],[30,54,17,58],[30,55,17,59],[31,6,18,8],[32,6,19,8,"byteArrays"],[32,16,19,18],[32,17,19,19,"sliceIndex"],[32,27,19,29],[32,28,19,30],[32,31,19,33],[32,35,19,37,"Uint8Array"],[32,45,19,47],[32,46,19,48,"bytes"],[32,51,19,53],[32,52,19,54],[33,4,20,4],[34,4,21,4],[35,4,22,4],[36,4,23,4],[37,4,24,4],[38,4,25,4],[38,11,25,11],[38,15,25,15,"Blob"],[38,19,25,19],[38,20,25,20,"byteArrays"],[38,30,25,30],[38,32,25,32],[39,6,25,34,"type"],[39,10,25,38],[39,12,25,40,"contentType"],[40,4,25,52],[40,5,25,53],[40,6,25,54],[41,2,26,0],[42,2,27,0],[43,0,28,0],[44,0,29,0],[45,2,30,7],[45,11,30,16,"blobToBase64Async"],[45,28,30,33,"blobToBase64Async"],[45,29,30,34,"blob"],[45,33,30,38],[45,35,30,40],[46,4,31,4],[46,11,31,11],[46,15,31,15,"Promise"],[46,22,31,22],[46,23,31,23],[46,24,31,24,"resolve"],[46,31,31,31],[46,33,31,33,"_"],[46,34,31,34],[46,39,31,39],[47,6,32,8],[47,12,32,14,"reader"],[47,18,32,20],[47,21,32,23],[47,25,32,27,"FileReader"],[47,35,32,37],[47,36,32,38],[47,37,32,39],[48,6,33,8,"reader"],[48,12,33,14],[48,13,33,15,"onloadend"],[48,22,33,24],[48,25,33,27],[48,31,33,33,"resolve"],[48,38,33,40],[48,39,33,41,"reader"],[48,45,33,47],[48,46,33,48,"result"],[48,52,33,54],[48,53,33,55],[49,6,34,8,"reader"],[49,12,34,14],[49,13,34,15,"readAsDataURL"],[49,26,34,28],[49,27,34,29,"blob"],[49,31,34,33],[49,32,34,34],[50,4,35,4],[50,5,35,5],[50,6,35,6],[51,2,36,0],[52,2,37,7],[52,11,37,16,"htmlToPlainText"],[52,26,37,31,"htmlToPlainText"],[52,27,37,32,"html"],[52,31,37,36],[52,33,37,38],[53,4,38,4],[53,10,38,10,"tempDivElement"],[53,24,38,24],[53,27,38,27,"document"],[53,35,38,35],[53,36,38,36,"createElement"],[53,49,38,49],[53,50,38,50],[53,55,38,55],[53,56,38,56],[54,4,39,4,"tempDivElement"],[54,18,39,18],[54,19,39,19,"innerHTML"],[54,28,39,28],[54,31,39,31,"html"],[54,35,39,35],[55,4,40,4],[55,11,40,11,"tempDivElement"],[55,25,40,25],[55,26,40,26,"textContent"],[55,37,40,37],[55,41,40,41,"tempDivElement"],[55,55,40,55],[55,56,40,56,"innerText"],[55,65,40,65],[55,69,40,69],[55,71,40,71],[56,2,41,0],[57,2,42,7],[57,11,42,16,"getImageSizeFromBlobAsync"],[57,36,42,41,"getImageSizeFromBlobAsync"],[57,37,42,42,"blob"],[57,41,42,46],[57,43,42,48],[58,4,43,4],[58,11,43,11],[58,15,43,15,"Promise"],[58,22,43,22],[58,23,43,23],[58,24,43,24,"resolve"],[58,31,43,31],[58,33,43,33,"_"],[58,34,43,34],[58,39,43,39],[59,6,44,8],[59,12,44,14,"blobUrl"],[59,19,44,21],[59,22,44,24,"URL"],[59,25,44,27],[59,26,44,28,"createObjectURL"],[59,41,44,43],[59,42,44,44,"blob"],[59,46,44,48],[59,47,44,49],[60,6,45,8],[60,12,45,14,"img"],[60,15,45,17],[60,18,45,20,"document"],[60,26,45,28],[60,27,45,29,"createElement"],[60,40,45,42],[60,41,45,43],[60,46,45,48],[60,47,45,49],[61,6,46,8,"img"],[61,9,46,11],[61,10,46,12,"src"],[61,13,46,15],[61,16,46,18,"blobUrl"],[61,23,46,25],[62,6,47,8,"img"],[62,9,47,11],[62,10,47,12,"onload"],[62,16,47,18],[62,19,47,21],[62,31,47,33],[63,8,48,12,"resolve"],[63,15,48,19],[63,16,48,20],[64,10,48,22,"width"],[64,15,48,27],[64,17,48,29,"img"],[64,20,48,32],[64,21,48,33,"width"],[64,26,48,38],[65,10,48,40,"height"],[65,16,48,46],[65,18,48,48,"img"],[65,21,48,51],[65,22,48,52,"height"],[66,8,48,59],[66,9,48,60],[66,10,48,61],[67,6,49,8],[67,7,49,9],[68,4,50,4],[68,5,50,5],[68,6,50,6],[69,2,51,0],[70,2,52,7],[70,17,52,22,"findImageInClipboardAsync"],[70,42,52,47,"findImageInClipboardAsync"],[70,43,52,48,"items"],[70,48,52,53],[70,50,52,55],[71,4,53,4],[71,9,53,9],[71,15,53,15,"clipboardItem"],[71,28,53,28],[71,32,53,32,"items"],[71,37,53,37],[71,39,53,39],[72,6,54,8],[73,6,55,8],[73,10,55,12,"clipboardItem"],[73,23,55,25],[73,24,55,26,"types"],[73,29,55,31],[73,30,55,32,"some"],[73,34,55,36],[73,35,55,38,"type"],[73,39,55,42],[73,43,55,47,"type"],[73,47,55,51],[73,52,55,56],[73,63,55,67],[73,64,55,68],[73,66,55,70],[74,8,56,12],[74,15,56,19],[74,21,56,25,"clipboardItem"],[74,34,56,38],[74,35,56,39,"getType"],[74,42,56,46],[74,43,56,47],[74,54,56,58],[74,55,56,59],[75,6,57,8],[76,6,58,8],[77,6,59,8],[78,6,60,8],[78,10,60,12,"clipboardItem"],[78,23,60,25],[78,24,60,26,"types"],[78,29,60,31],[78,30,60,32,"some"],[78,34,60,36],[78,35,60,38,"type"],[78,39,60,42],[78,43,60,47,"type"],[78,47,60,51],[78,52,60,56],[78,64,60,68],[78,65,60,69],[78,67,60,71],[79,8,61,12],[79,15,61,19],[79,21,61,25,"clipboardItem"],[79,34,61,38],[79,35,61,39,"getType"],[79,42,61,46],[79,43,61,47],[79,55,61,59],[79,56,61,60],[80,6,62,8],[81,4,63,4],[82,4,64,4],[82,11,64,11],[82,15,64,15],[83,2,65,0],[84,2,66,7],[84,17,66,22,"findHtmlInClipboardAsync"],[84,41,66,46,"findHtmlInClipboardAsync"],[84,42,66,47,"items"],[84,47,66,52],[84,49,66,54],[85,4,67,4],[85,9,67,9],[85,15,67,15,"clipboardItem"],[85,28,67,28],[85,32,67,32,"items"],[85,37,67,37],[85,39,67,39],[86,6,68,8],[86,10,68,12,"clipboardItem"],[86,23,68,25],[86,24,68,26,"types"],[86,29,68,31],[86,30,68,32,"some"],[86,34,68,36],[86,35,68,38,"type"],[86,39,68,42],[86,43,68,47,"type"],[86,47,68,51],[86,52,68,56],[86,63,68,67],[86,64,68,68],[86,66,68,70],[87,8,69,12],[87,15,69,19],[87,21,69,25,"clipboardItem"],[87,34,69,38],[87,35,69,39,"getType"],[87,42,69,46],[87,43,69,47],[87,54,69,58],[87,55,69,59],[88,6,70,8],[89,4,71,4],[90,4,72,4],[90,11,72,11],[90,15,72,15],[91,2,73,0],[92,2,74,7],[92,17,74,22,"isClipboardPermissionDeniedAsync"],[92,49,74,54,"isClipboardPermissionDeniedAsync"],[92,50,74,54],[92,52,74,57],[93,4,75,4],[93,10,75,10,"queryOpts"],[93,19,75,19],[93,22,75,22],[94,6,75,24,"name"],[94,10,75,28],[94,12,75,30],[95,4,75,47],[95,5,75,48],[96,4,76,4],[96,10,76,10,"permissionStatus"],[96,26,76,26],[96,29,76,29],[96,35,76,35,"navigator"],[96,44,76,44],[96,45,76,45,"permissions"],[96,56,76,56],[96,57,76,57,"query"],[96,62,76,62],[96,63,76,63,"queryOpts"],[96,72,76,72],[96,73,76,73],[97,4,77,4],[97,11,77,11,"permissionStatus"],[97,27,77,27],[97,28,77,28,"state"],[97,33,77,33],[97,38,77,38],[97,46,77,46],[98,2,78,0],[99,0,78,1],[99,3]],"functionMap":{"names":["<global>","base64toBlob","blobToBase64Async","Promise$argument_0","reader.onloadend","htmlToPlainText","getImageSizeFromBlobAsync","img.onload","findImageInClipboardAsync","clipboardItem.types.some$argument_0","findHtmlInClipboardAsync","isClipboardPermissionDeniedAsync"],"mappings":"AAA;OCI;CDqB;OEI;uBCC;2BCE,4BD;KDE;CFC;OKC;CLI;OMC;uBHC;qBII;SJE;KGC;CNC;OQC;qCCG,8BD;qCCK,+BD;CRK;OUC;qCDE,8BC;CVK;OWC;CXI"},"hasCjsExports":false},"type":"js/module"}]} |