react-native-executorch 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (518) hide show
  1. package/android/CMakeLists.txt +24 -0
  2. package/android/build.gradle +1 -0
  3. package/android/src/main/cpp/CMakeLists.txt +25 -0
  4. package/android/src/main/java/com/swmansion/rnexecutorch/RnExecutorchPackage.kt +1 -13
  5. package/common/rnexecutorch/RnExecutorchInstaller.cpp +52 -18
  6. package/common/rnexecutorch/RnExecutorchInstaller.h +0 -25
  7. package/common/rnexecutorch/TokenizerModule.cpp +1 -1
  8. package/common/rnexecutorch/TokenizerModule.h +4 -1
  9. package/common/rnexecutorch/data_processing/FileUtils.h +2 -2
  10. package/common/rnexecutorch/data_processing/ImageProcessing.cpp +5 -5
  11. package/common/rnexecutorch/data_processing/ImageProcessing.h +2 -2
  12. package/common/rnexecutorch/data_processing/Numerical.cpp +13 -0
  13. package/common/rnexecutorch/host_objects/JsiConversions.h +43 -62
  14. package/common/rnexecutorch/host_objects/ModelHostObject.h +43 -24
  15. package/common/rnexecutorch/metaprogramming/ConstructorHelpers.h +8 -6
  16. package/common/rnexecutorch/metaprogramming/FunctionHelpers.h +1 -1
  17. package/common/rnexecutorch/models/BaseModel.cpp +2 -2
  18. package/common/rnexecutorch/models/BaseModel.h +5 -0
  19. package/common/rnexecutorch/models/EncoderDecoderBase.cpp +2 -2
  20. package/common/rnexecutorch/models/EncoderDecoderBase.h +2 -2
  21. package/common/rnexecutorch/models/classification/Classification.cpp +6 -6
  22. package/common/rnexecutorch/models/classification/Classification.h +5 -0
  23. package/common/rnexecutorch/models/classification/Constants.h +3 -3
  24. package/common/rnexecutorch/models/embeddings/BaseEmbeddings.cpp +2 -2
  25. package/common/rnexecutorch/models/embeddings/BaseEmbeddings.h +2 -2
  26. package/common/rnexecutorch/models/embeddings/image/ImageEmbeddings.cpp +3 -3
  27. package/common/rnexecutorch/models/embeddings/image/ImageEmbeddings.h +5 -0
  28. package/common/rnexecutorch/models/embeddings/text/TextEmbeddings.cpp +2 -2
  29. package/common/rnexecutorch/models/embeddings/text/TextEmbeddings.h +6 -1
  30. package/common/rnexecutorch/models/image_segmentation/Constants.h +3 -3
  31. package/common/rnexecutorch/models/image_segmentation/ImageSegmentation.cpp +6 -5
  32. package/common/rnexecutorch/models/image_segmentation/ImageSegmentation.h +8 -1
  33. package/common/rnexecutorch/models/llm/LLM.cpp +58 -0
  34. package/common/rnexecutorch/models/llm/LLM.h +35 -0
  35. package/common/rnexecutorch/models/object_detection/Constants.h +3 -3
  36. package/common/rnexecutorch/models/object_detection/ObjectDetection.cpp +8 -8
  37. package/common/rnexecutorch/models/object_detection/ObjectDetection.h +11 -5
  38. package/common/rnexecutorch/models/object_detection/Types.h +13 -0
  39. package/common/rnexecutorch/models/object_detection/Utils.cpp +13 -11
  40. package/common/rnexecutorch/models/object_detection/Utils.h +7 -13
  41. package/common/rnexecutorch/models/ocr/CTCLabelConverter.cpp +2 -2
  42. package/common/rnexecutorch/models/ocr/CTCLabelConverter.h +2 -2
  43. package/common/rnexecutorch/models/ocr/Constants.h +33 -26
  44. package/common/rnexecutorch/models/ocr/Detector.cpp +20 -22
  45. package/common/rnexecutorch/models/ocr/Detector.h +4 -4
  46. package/common/rnexecutorch/models/ocr/OCR.cpp +9 -8
  47. package/common/rnexecutorch/models/ocr/OCR.h +11 -3
  48. package/common/rnexecutorch/models/ocr/RecognitionHandler.cpp +20 -19
  49. package/common/rnexecutorch/models/ocr/RecognitionHandler.h +9 -7
  50. package/common/rnexecutorch/models/ocr/Recognizer.cpp +7 -7
  51. package/common/rnexecutorch/models/ocr/Recognizer.h +2 -2
  52. package/common/rnexecutorch/models/ocr/Types.h +4 -6
  53. package/common/rnexecutorch/models/ocr/{DetectorUtils.cpp → utils/DetectorUtils.cpp} +70 -63
  54. package/common/rnexecutorch/models/ocr/{DetectorUtils.h → utils/DetectorUtils.h} +12 -11
  55. package/common/rnexecutorch/models/ocr/{RecognitionHandlerUtils.cpp → utils/RecognitionHandlerUtils.cpp} +14 -11
  56. package/common/rnexecutorch/models/ocr/{RecognitionHandlerUtils.h → utils/RecognitionHandlerUtils.h} +5 -5
  57. package/common/rnexecutorch/models/ocr/{RecognizerUtils.cpp → utils/RecognizerUtils.cpp} +28 -26
  58. package/common/rnexecutorch/models/ocr/{RecognizerUtils.h → utils/RecognizerUtils.h} +15 -14
  59. package/common/rnexecutorch/models/speech_to_text/SpeechToText.cpp +2 -2
  60. package/common/rnexecutorch/models/speech_to_text/SpeechToText.h +9 -2
  61. package/common/rnexecutorch/models/speech_to_text/SpeechToTextStrategy.h +2 -2
  62. package/common/rnexecutorch/models/speech_to_text/WhisperStrategy.cpp +2 -2
  63. package/common/rnexecutorch/models/speech_to_text/WhisperStrategy.h +2 -2
  64. package/common/rnexecutorch/models/style_transfer/StyleTransfer.cpp +5 -5
  65. package/common/rnexecutorch/models/style_transfer/StyleTransfer.h +6 -0
  66. package/common/rnexecutorch/models/vertical_ocr/VerticalDetector.cpp +23 -22
  67. package/common/rnexecutorch/models/vertical_ocr/VerticalDetector.h +4 -4
  68. package/common/rnexecutorch/models/vertical_ocr/VerticalOCR.cpp +34 -34
  69. package/common/rnexecutorch/models/vertical_ocr/VerticalOCR.h +27 -20
  70. package/{third-party/ios/ExecutorchLib/ExecutorchLib/sampler → common/runner}/sampler.cpp +3 -2
  71. package/{third-party/ios/ExecutorchLib/ExecutorchLib/sampler → common/runner}/sampler.h +3 -2
  72. package/ios/libs/executorch/libbackend_coreml_ios.a +0 -0
  73. package/ios/libs/executorch/libbackend_coreml_simulator.a +0 -0
  74. package/{third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/ios-arm64 → ios/libs/executorch}/libbackend_mps_ios.a +0 -0
  75. package/{third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/ios-arm64-simulator → ios/libs/executorch}/libbackend_mps_simulator.a +0 -0
  76. package/ios/libs/executorch/libbackend_xnnpack_ios.a +0 -0
  77. package/ios/libs/executorch/libbackend_xnnpack_simulator.a +0 -0
  78. package/ios/libs/executorch/libexecutorch_ios.a +0 -0
  79. package/ios/libs/executorch/libexecutorch_simulator.a +0 -0
  80. package/ios/libs/executorch/libkernels_custom_ios.a +0 -0
  81. package/ios/libs/executorch/libkernels_custom_simulator.a +0 -0
  82. package/ios/libs/executorch/libkernels_optimized_ios.a +0 -0
  83. package/ios/libs/executorch/libkernels_optimized_simulator.a +0 -0
  84. package/ios/libs/executorch/libkernels_portable_ios.a +0 -0
  85. package/ios/libs/executorch/libkernels_portable_simulator.a +0 -0
  86. package/ios/libs/executorch/libkernels_quantized_ios.a +0 -0
  87. package/ios/libs/executorch/libkernels_quantized_simulator.a +0 -0
  88. package/ios/libs/tokenizers-cpp/physical-arm64-release/libsentencepiece.a +0 -0
  89. package/ios/{ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib → libs/tokenizers-cpp/physical-arm64-release/libtokenizers_c.a} +0 -0
  90. package/ios/libs/tokenizers-cpp/physical-arm64-release/libtokenizers_cpp.a +0 -0
  91. package/ios/libs/tokenizers-cpp/simulator-arm64-debug/libsentencepiece.a +0 -0
  92. package/ios/{ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib → libs/tokenizers-cpp/simulator-arm64-debug/libtokenizers_c.a} +0 -0
  93. package/ios/libs/tokenizers-cpp/simulator-arm64-debug/libtokenizers_cpp.a +0 -0
  94. package/lib/Error.js +9 -6
  95. package/lib/ThreadPool.d.ts +10 -0
  96. package/lib/ThreadPool.js +28 -0
  97. package/lib/constants/modelUrls.js +1 -1
  98. package/lib/controllers/OCRController.js +9 -14
  99. package/lib/controllers/VerticalOCRController.js +9 -14
  100. package/lib/hooks/computer_vision/useOCR.js +7 -8
  101. package/lib/hooks/computer_vision/useVerticalOCR.js +3 -5
  102. package/lib/index.d.ts +0 -2
  103. package/lib/index.js +1 -3
  104. package/lib/module/controllers/LLMController.js +6 -10
  105. package/lib/module/controllers/LLMController.js.map +1 -1
  106. package/lib/module/hooks/computer_vision/useClassification.js +2 -2
  107. package/lib/module/hooks/computer_vision/useClassification.js.map +1 -1
  108. package/lib/module/hooks/computer_vision/useImageEmbeddings.js +2 -2
  109. package/lib/module/hooks/computer_vision/useImageEmbeddings.js.map +1 -1
  110. package/lib/module/hooks/computer_vision/useImageSegmentation.js +2 -2
  111. package/lib/module/hooks/computer_vision/useImageSegmentation.js.map +1 -1
  112. package/lib/module/hooks/computer_vision/useObjectDetection.js +2 -2
  113. package/lib/module/hooks/computer_vision/useObjectDetection.js.map +1 -1
  114. package/lib/module/hooks/computer_vision/useStyleTransfer.js +2 -2
  115. package/lib/module/hooks/computer_vision/useStyleTransfer.js.map +1 -1
  116. package/lib/module/hooks/general/useExecutorchModule.js +2 -2
  117. package/lib/module/hooks/general/useExecutorchModule.js.map +1 -1
  118. package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js +2 -2
  119. package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js.map +1 -1
  120. package/lib/module/hooks/useModule.js +13 -9
  121. package/lib/module/hooks/useModule.js.map +1 -1
  122. package/lib/module/index.js +1 -1
  123. package/lib/module/index.js.map +1 -1
  124. package/lib/module/modules/BaseModule.js +9 -17
  125. package/lib/module/modules/BaseModule.js.map +1 -1
  126. package/lib/module/modules/computer_vision/ClassificationModule.js +2 -2
  127. package/lib/module/modules/computer_vision/ClassificationModule.js.map +1 -1
  128. package/lib/module/modules/computer_vision/ImageEmbeddingsModule.js +2 -2
  129. package/lib/module/modules/computer_vision/ImageEmbeddingsModule.js.map +1 -1
  130. package/lib/module/modules/computer_vision/ImageSegmentationModule.js +2 -2
  131. package/lib/module/modules/computer_vision/ImageSegmentationModule.js.map +1 -1
  132. package/lib/module/modules/computer_vision/ObjectDetectionModule.js +2 -2
  133. package/lib/module/modules/computer_vision/ObjectDetectionModule.js.map +1 -1
  134. package/lib/module/modules/computer_vision/StyleTransferModule.js +2 -2
  135. package/lib/module/modules/computer_vision/StyleTransferModule.js.map +1 -1
  136. package/lib/module/modules/general/ExecutorchModule.js +2 -2
  137. package/lib/module/modules/general/ExecutorchModule.js.map +1 -1
  138. package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js +2 -2
  139. package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js.map +1 -1
  140. package/lib/module/native/RnExecutorchModules.js +1 -2
  141. package/lib/module/native/RnExecutorchModules.js.map +1 -1
  142. package/lib/module/utils/SpeechToTextModule/ASR.js +3 -3
  143. package/lib/module/utils/SpeechToTextModule/ASR.js.map +1 -1
  144. package/lib/modules/computer_vision/OCRModule.d.ts +4 -5
  145. package/lib/modules/computer_vision/OCRModule.js +9 -12
  146. package/lib/modules/computer_vision/VerticalOCRModule.d.ts +4 -5
  147. package/lib/modules/computer_vision/VerticalOCRModule.js +9 -12
  148. package/lib/native/RnExecutorchModules.d.ts +5 -1
  149. package/lib/native/RnExecutorchModules.js +3 -1
  150. package/lib/tsconfig.tsbuildinfo +1 -0
  151. package/lib/types/common.d.ts +1 -0
  152. package/lib/typescript/controllers/LLMController.d.ts +1 -1
  153. package/lib/typescript/controllers/LLMController.d.ts.map +1 -1
  154. package/lib/typescript/hooks/useModule.d.ts +8 -5
  155. package/lib/typescript/hooks/useModule.d.ts.map +1 -1
  156. package/lib/typescript/index.d.ts +1 -0
  157. package/lib/typescript/index.d.ts.map +1 -1
  158. package/lib/typescript/modules/BaseModule.d.ts +7 -6
  159. package/lib/typescript/modules/BaseModule.d.ts.map +1 -1
  160. package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts +2 -2
  161. package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts.map +1 -1
  162. package/lib/typescript/modules/computer_vision/ImageEmbeddingsModule.d.ts +2 -2
  163. package/lib/typescript/modules/computer_vision/ImageEmbeddingsModule.d.ts.map +1 -1
  164. package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts +2 -2
  165. package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts.map +1 -1
  166. package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts +2 -2
  167. package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts.map +1 -1
  168. package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts +2 -2
  169. package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts.map +1 -1
  170. package/lib/typescript/modules/general/ExecutorchModule.d.ts +2 -2
  171. package/lib/typescript/modules/general/ExecutorchModule.d.ts.map +1 -1
  172. package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts +2 -2
  173. package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts.map +1 -1
  174. package/lib/typescript/native/RnExecutorchModules.d.ts +1 -3
  175. package/lib/typescript/native/RnExecutorchModules.d.ts.map +1 -1
  176. package/lib/utils/ResourceFetcherUtils.js +0 -1
  177. package/lib/utils/llm.js +0 -1
  178. package/package.json +1 -2
  179. package/react-native-executorch.podspec +47 -44
  180. package/src/controllers/LLMController.ts +8 -13
  181. package/src/hooks/computer_vision/useClassification.ts +2 -2
  182. package/src/hooks/computer_vision/useImageEmbeddings.ts +2 -2
  183. package/src/hooks/computer_vision/useImageSegmentation.ts +2 -2
  184. package/src/hooks/computer_vision/useObjectDetection.ts +2 -2
  185. package/src/hooks/computer_vision/useStyleTransfer.ts +2 -2
  186. package/src/hooks/general/useExecutorchModule.ts +2 -2
  187. package/src/hooks/natural_language_processing/useTextEmbeddings.ts +2 -2
  188. package/src/hooks/useModule.ts +23 -13
  189. package/src/index.ts +3 -2
  190. package/src/modules/BaseModule.ts +17 -28
  191. package/src/modules/computer_vision/ClassificationModule.ts +2 -2
  192. package/src/modules/computer_vision/ImageEmbeddingsModule.ts +2 -2
  193. package/src/modules/computer_vision/ImageSegmentationModule.ts +2 -2
  194. package/src/modules/computer_vision/ObjectDetectionModule.ts +2 -2
  195. package/src/modules/computer_vision/StyleTransferModule.ts +2 -2
  196. package/src/modules/general/ExecutorchModule.ts +2 -2
  197. package/src/modules/natural_language_processing/TextEmbeddingsModule.ts +2 -2
  198. package/src/native/RnExecutorchModules.ts +1 -5
  199. package/src/utils/SpeechToTextModule/ASR.ts +4 -4
  200. package/third-party/android/libs/cpuinfo/arm64-v8a/libcpuinfo.so +0 -0
  201. package/third-party/android/libs/pthreadpool/arm64-v8a/libpthreadpool.so +0 -0
  202. package/third-party/include/cpuinfo/cpuinfo.h +2305 -0
  203. package/third-party/include/executorch/extension/threadpool/cpuinfo_utils.h +26 -0
  204. package/third-party/include/executorch/extension/threadpool/threadpool.h +94 -0
  205. package/third-party/include/pthreadpool/pthreadpool.h +2236 -0
  206. package/android/src/main/java/com/swmansion/rnexecutorch/LLM.kt +0 -63
  207. package/ios/ExecutorchLib.xcframework/Info.plist +0 -43
  208. package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/ETModel.h +0 -27
  209. package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +0 -14
  210. package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/LLaMARunner.h +0 -32
  211. package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist +0 -0
  212. package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/ETModel.h +0 -27
  213. package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +0 -14
  214. package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/LLaMARunner.h +0 -32
  215. package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist +0 -0
  216. package/ios/RnExecutorch/LLM.h +0 -5
  217. package/ios/RnExecutorch/LLM.mm +0 -78
  218. package/lib/Error.d.ts +0 -30
  219. package/lib/constants/directories.d.ts +0 -1
  220. package/lib/constants/ocr/symbols.d.ts +0 -75
  221. package/lib/controllers/OCRController.d.ts +0 -23
  222. package/lib/controllers/VerticalOCRController.d.ts +0 -25
  223. package/lib/hooks/useModule.d.ts +0 -17
  224. package/lib/module/modules/BaseNonStaticModule.js +0 -17
  225. package/lib/module/modules/BaseNonStaticModule.js.map +0 -1
  226. package/lib/module/native/NativeLLM.js +0 -5
  227. package/lib/module/native/NativeLLM.js.map +0 -1
  228. package/lib/modules/BaseModule.d.ts +0 -8
  229. package/lib/modules/BaseNonStaticModule.d.ts +0 -9
  230. package/lib/native/NativeETInstaller.d.ts +0 -6
  231. package/lib/native/NativeOCR.d.ts +0 -8
  232. package/lib/native/NativeVerticalOCR.d.ts +0 -8
  233. package/lib/types/imageSegmentation.d.ts +0 -24
  234. package/lib/types/objectDetection.d.ts +0 -104
  235. package/lib/types/ocr.d.ts +0 -11
  236. package/lib/typescript/modules/BaseNonStaticModule.d.ts +0 -10
  237. package/lib/typescript/modules/BaseNonStaticModule.d.ts.map +0 -1
  238. package/lib/typescript/native/NativeLLM.d.ts +0 -12
  239. package/lib/typescript/native/NativeLLM.d.ts.map +0 -1
  240. package/lib/utils/stt.d.ts +0 -1
  241. package/src/modules/BaseNonStaticModule.ts +0 -26
  242. package/src/native/NativeLLM.ts +0 -14
  243. package/third-party/include/tokenizers-cpp/tokenizers_c.h +0 -61
  244. package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.h +0 -27
  245. package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.mm +0 -249
  246. package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/HuggingFaceTokenizer.h +0 -14
  247. package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/HuggingFaceTokenizer.mm +0 -80
  248. package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/LLaMARunner.h +0 -32
  249. package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/LLaMARunner.mm +0 -95
  250. package/third-party/ios/ExecutorchLib/ExecutorchLib/InputType.h +0 -12
  251. package/third-party/ios/ExecutorchLib/ExecutorchLib/Utils.hpp +0 -217
  252. package/third-party/ios/ExecutorchLib/ExecutorchLib/model/Model.cpp +0 -11
  253. package/third-party/ios/ExecutorchLib/ExecutorchLib/model/Model.h +0 -11
  254. package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/base64.h +0 -202
  255. package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/bpe_tokenizer.cpp +0 -313
  256. package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/bpe_tokenizer.h +0 -57
  257. package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/llama_tiktoken.cpp +0 -78
  258. package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/llama_tiktoken.h +0 -23
  259. package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tiktoken.cpp +0 -427
  260. package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tiktoken.h +0 -87
  261. package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tokenizer.h +0 -76
  262. package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.pbxproj +0 -683
  263. package/third-party/ios/ExecutorchLib/build.sh +0 -44
  264. package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/Info.plist +0 -43
  265. package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/ios-arm64/libbackend_coreml_ios.a +0 -0
  266. package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/ios-arm64-simulator/libbackend_coreml_simulator.a +0 -0
  267. package/third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/Info.plist +0 -43
  268. package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/Info.plist +0 -43
  269. package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/ios-arm64/libbackend_xnnpack_ios.a +0 -0
  270. package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/ios-arm64-simulator/libbackend_xnnpack_simulator.a +0 -0
  271. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/Info.plist +0 -47
  272. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/macros/Export.h +0 -163
  273. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/macros/Macros.h +0 -497
  274. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16-inl.h +0 -342
  275. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16-math.h +0 -266
  276. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16.h +0 -125
  277. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/Half-inl.h +0 -347
  278. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/Half.h +0 -416
  279. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/TypeSafeSignMath.h +0 -133
  280. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/bit_cast.h +0 -43
  281. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/floating_point_utils.h +0 -33
  282. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/irange.h +0 -107
  283. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorch.h +0 -13
  284. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchError.h +0 -16
  285. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchLog.h +0 -76
  286. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchModule.h +0 -286
  287. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchTensor.h +0 -742
  288. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchValue.h +0 -219
  289. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/module/module.h +0 -492
  290. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor.h +0 -13
  291. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_accessor.h +0 -190
  292. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_ptr.h +0 -347
  293. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_ptr_maker.h +0 -653
  294. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/backend_execution_context.h +0 -71
  295. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/backend_init_context.h +0 -72
  296. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/interface.h +0 -166
  297. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/array_ref.h +0 -235
  298. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/data_loader.h +0 -136
  299. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/defines.h +0 -20
  300. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/error.h +0 -229
  301. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/evalue.h +0 -521
  302. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer.h +0 -565
  303. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer_hooks.h +0 -323
  304. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer_hooks_delegate.h +0 -197
  305. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/exec_aten.h +0 -147
  306. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/dim_order_util.h +0 -263
  307. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/scalar_type_util.h +0 -1331
  308. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h +0 -21
  309. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_shape_to_c_string.h +0 -69
  310. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_util.h +0 -1250
  311. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/freeable_buffer.h +0 -107
  312. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/hierarchical_allocator.h +0 -107
  313. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/memory_allocator.h +0 -198
  314. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/named_data_map.h +0 -86
  315. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bfloat16.h +0 -27
  316. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bfloat16_math.h +0 -14
  317. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bits_types.h +0 -83
  318. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Export.h +0 -163
  319. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h +0 -497
  320. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-inl.h +0 -342
  321. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-math.h +0 -266
  322. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16.h +0 -125
  323. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half-inl.h +0 -347
  324. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half.h +0 -416
  325. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/TypeSafeSignMath.h +0 -133
  326. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/bit_cast.h +0 -43
  327. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/floating_point_utils.h +0 -33
  328. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/irange.h +0 -107
  329. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/complex.h +0 -44
  330. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/device.h +0 -70
  331. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/half.h +0 -27
  332. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/optional.h +0 -36
  333. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/qint_types.h +0 -83
  334. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/scalar.h +0 -110
  335. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/scalar_type.h +0 -154
  336. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/string_view.h +0 -29
  337. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor.h +0 -142
  338. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor_impl.h +0 -261
  339. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor_options.h +0 -60
  340. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/result.h +0 -258
  341. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/span.h +0 -93
  342. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tag.h +0 -71
  343. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tensor_layout.h +0 -79
  344. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tensor_shape_dynamism.h +0 -39
  345. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/memory_manager.h +0 -113
  346. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/method.h +0 -387
  347. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/method_meta.h +0 -251
  348. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/program.h +0 -320
  349. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/pte_data_map.h +0 -144
  350. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/tensor_parser.h +0 -156
  351. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/kernel/kernel_runtime_context.h +0 -122
  352. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/kernel/operator_registry.h +0 -278
  353. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/abort.h +0 -36
  354. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/assert.h +0 -119
  355. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/clock.h +0 -43
  356. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/compat_unistd.h +0 -75
  357. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/compiler.h +0 -191
  358. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/log.h +0 -177
  359. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/platform.h +0 -133
  360. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/profiler.h +0 -292
  361. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/runtime.h +0 -35
  362. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/system.h +0 -49
  363. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/types.h +0 -24
  364. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/schema/extended_header.h +0 -76
  365. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/module.modulemap +0 -5
  366. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/libexecutorch_ios.a +0 -0
  367. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/macros/Export.h +0 -163
  368. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/macros/Macros.h +0 -497
  369. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16-inl.h +0 -342
  370. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16-math.h +0 -266
  371. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16.h +0 -125
  372. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/Half-inl.h +0 -347
  373. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/Half.h +0 -416
  374. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/TypeSafeSignMath.h +0 -133
  375. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/bit_cast.h +0 -43
  376. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/floating_point_utils.h +0 -33
  377. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/irange.h +0 -107
  378. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorch.h +0 -13
  379. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchError.h +0 -16
  380. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchLog.h +0 -76
  381. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchModule.h +0 -286
  382. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchTensor.h +0 -742
  383. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchValue.h +0 -219
  384. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/module/module.h +0 -492
  385. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor.h +0 -13
  386. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_accessor.h +0 -190
  387. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_ptr.h +0 -347
  388. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_ptr_maker.h +0 -653
  389. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/backend_execution_context.h +0 -71
  390. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/backend_init_context.h +0 -72
  391. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/interface.h +0 -166
  392. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/array_ref.h +0 -235
  393. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/data_loader.h +0 -136
  394. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/defines.h +0 -20
  395. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/error.h +0 -229
  396. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/evalue.h +0 -521
  397. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer.h +0 -565
  398. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer_hooks.h +0 -323
  399. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer_hooks_delegate.h +0 -197
  400. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/exec_aten.h +0 -147
  401. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/dim_order_util.h +0 -263
  402. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/scalar_type_util.h +0 -1331
  403. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h +0 -21
  404. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_shape_to_c_string.h +0 -69
  405. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_util.h +0 -1250
  406. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/freeable_buffer.h +0 -107
  407. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/hierarchical_allocator.h +0 -107
  408. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/memory_allocator.h +0 -198
  409. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/named_data_map.h +0 -86
  410. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bfloat16.h +0 -27
  411. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bfloat16_math.h +0 -14
  412. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bits_types.h +0 -83
  413. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Export.h +0 -163
  414. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h +0 -497
  415. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-inl.h +0 -342
  416. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-math.h +0 -266
  417. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16.h +0 -125
  418. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half-inl.h +0 -347
  419. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half.h +0 -416
  420. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/TypeSafeSignMath.h +0 -133
  421. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/bit_cast.h +0 -43
  422. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/floating_point_utils.h +0 -33
  423. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/irange.h +0 -107
  424. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/complex.h +0 -44
  425. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/device.h +0 -70
  426. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/half.h +0 -27
  427. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/optional.h +0 -36
  428. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/qint_types.h +0 -83
  429. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/scalar.h +0 -110
  430. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/scalar_type.h +0 -154
  431. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/string_view.h +0 -29
  432. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor.h +0 -142
  433. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor_impl.h +0 -261
  434. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor_options.h +0 -60
  435. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/result.h +0 -258
  436. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/span.h +0 -93
  437. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tag.h +0 -71
  438. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tensor_layout.h +0 -79
  439. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tensor_shape_dynamism.h +0 -39
  440. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/memory_manager.h +0 -113
  441. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/method.h +0 -387
  442. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/method_meta.h +0 -251
  443. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/program.h +0 -320
  444. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/pte_data_map.h +0 -144
  445. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/tensor_parser.h +0 -156
  446. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/kernel/kernel_runtime_context.h +0 -122
  447. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/kernel/operator_registry.h +0 -278
  448. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/abort.h +0 -36
  449. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/assert.h +0 -119
  450. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/clock.h +0 -43
  451. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/compat_unistd.h +0 -75
  452. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/compiler.h +0 -191
  453. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/log.h +0 -177
  454. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/platform.h +0 -133
  455. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/profiler.h +0 -292
  456. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/runtime.h +0 -35
  457. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/system.h +0 -49
  458. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/types.h +0 -24
  459. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/schema/extended_header.h +0 -76
  460. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/module.modulemap +0 -5
  461. package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/libexecutorch_simulator.a +0 -0
  462. package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/Info.plist +0 -43
  463. package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/ios-arm64/libkernels_custom_ios.a +0 -0
  464. package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/ios-arm64-simulator/libkernels_custom_simulator.a +0 -0
  465. package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/Info.plist +0 -43
  466. package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/ios-arm64/libkernels_optimized_ios.a +0 -0
  467. package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/ios-arm64-simulator/libkernels_optimized_simulator.a +0 -0
  468. package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/Info.plist +0 -43
  469. package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/ios-arm64/libkernels_portable_ios.a +0 -0
  470. package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/ios-arm64-simulator/libkernels_portable_simulator.a +0 -0
  471. package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/Info.plist +0 -43
  472. package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/ios-arm64/libkernels_quantized_ios.a +0 -0
  473. package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/ios-arm64-simulator/libkernels_quantized_simulator.a +0 -0
  474. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/Info.plist +0 -43
  475. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/bitmap256.h +0 -82
  476. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/filtered_re2.h +0 -111
  477. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/pod_array.h +0 -43
  478. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prefilter.h +0 -130
  479. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prefilter_tree.h +0 -139
  480. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prog.h +0 -483
  481. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/re2.h +0 -994
  482. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/regexp.h +0 -692
  483. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/set.h +0 -85
  484. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/sparse_array.h +0 -367
  485. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/sparse_set.h +0 -241
  486. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/stringpiece.h +0 -205
  487. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/unicode_casefold.h +0 -78
  488. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/unicode_groups.h +0 -64
  489. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/walker-inl.h +0 -235
  490. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Info.plist +0 -26
  491. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/re2 +0 -0
  492. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/bitmap256.h +0 -82
  493. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/filtered_re2.h +0 -111
  494. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/pod_array.h +0 -43
  495. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prefilter.h +0 -130
  496. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prefilter_tree.h +0 -139
  497. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prog.h +0 -483
  498. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/re2.h +0 -994
  499. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/regexp.h +0 -692
  500. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/set.h +0 -85
  501. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/sparse_array.h +0 -367
  502. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/sparse_set.h +0 -241
  503. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/stringpiece.h +0 -205
  504. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/unicode_casefold.h +0 -78
  505. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/unicode_groups.h +0 -64
  506. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/walker-inl.h +0 -235
  507. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Info.plist +0 -26
  508. package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/re2 +0 -0
  509. /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/irunner.h +0 -0
  510. /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/runner.cpp +0 -0
  511. /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/runner.h +0 -0
  512. /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/stats.h +0 -0
  513. /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_decoder_runner.cpp +0 -0
  514. /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_decoder_runner.h +0 -0
  515. /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_prefiller.cpp +0 -0
  516. /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_prefiller.h +0 -0
  517. /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_token_generator.h +0 -0
  518. /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/util.h +0 -0
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- import { useNonStaticModule } from '../useNonStaticModule';
3
+ import { useModule } from '../useModule';
4
4
  import { ImageSegmentationModule } from '../../modules/computer_vision/ImageSegmentationModule';
5
5
  export const useImageSegmentation = ({
6
6
  model,
7
7
  preventLoad = false
8
- }) => useNonStaticModule({
8
+ }) => useModule({
9
9
  module: ImageSegmentationModule,
10
10
  model,
11
11
  preventLoad
@@ -1 +1 @@
1
- {"version":3,"names":["useNonStaticModule","ImageSegmentationModule","useImageSegmentation","model","preventLoad","module"],"sourceRoot":"../../../../src","sources":["hooks/computer_vision/useImageSegmentation.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,uBAAuB;AAC1D,SAASC,uBAAuB,QAAQ,uDAAuD;AAQ/F,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW,GAAG;AAAa,CAAC,KACxEJ,kBAAkB,CAAC;EACjBK,MAAM,EAAEJ,uBAAuB;EAC/BE,KAAK;EACLC;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useModule","ImageSegmentationModule","useImageSegmentation","model","preventLoad","module"],"sourceRoot":"../../../../src","sources":["hooks/computer_vision/useImageSegmentation.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,cAAc;AACxC,SAASC,uBAAuB,QAAQ,uDAAuD;AAQ/F,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW,GAAG;AAAa,CAAC,KACxEJ,SAAS,CAAC;EACRK,MAAM,EAAEJ,uBAAuB;EAC/BE,KAAK;EACLC;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- import { useNonStaticModule } from '../useNonStaticModule';
3
+ import { useModule } from '../useModule';
4
4
  import { ObjectDetectionModule } from '../../modules/computer_vision/ObjectDetectionModule';
5
5
  export const useObjectDetection = ({
6
6
  model,
7
7
  preventLoad = false
8
- }) => useNonStaticModule({
8
+ }) => useModule({
9
9
  module: ObjectDetectionModule,
10
10
  model,
11
11
  preventLoad: preventLoad
@@ -1 +1 @@
1
- {"version":3,"names":["useNonStaticModule","ObjectDetectionModule","useObjectDetection","model","preventLoad","module"],"sourceRoot":"../../../../src","sources":["hooks/computer_vision/useObjectDetection.ts"],"mappings":";;AACA,SAASA,kBAAkB,QAAQ,uBAAuB;AAC1D,SAASC,qBAAqB,QAAQ,qDAAqD;AAO3F,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW,GAAG;AAAa,CAAC,KACtEJ,kBAAkB,CAAC;EACjBK,MAAM,EAAEJ,qBAAqB;EAC7BE,KAAK;EACLC,WAAW,EAAEA;AACf,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useModule","ObjectDetectionModule","useObjectDetection","model","preventLoad","module"],"sourceRoot":"../../../../src","sources":["hooks/computer_vision/useObjectDetection.ts"],"mappings":";;AACA,SAASA,SAAS,QAAQ,cAAc;AACxC,SAASC,qBAAqB,QAAQ,qDAAqD;AAO3F,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW,GAAG;AAAa,CAAC,KACtEJ,SAAS,CAAC;EACRK,MAAM,EAAEJ,qBAAqB;EAC7BE,KAAK;EACLC,WAAW,EAAEA;AACf,CAAC,CAAC","ignoreList":[]}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- import { useNonStaticModule } from '../useNonStaticModule';
3
+ import { useModule } from '../useModule';
4
4
  import { StyleTransferModule } from '../../modules/computer_vision/StyleTransferModule';
5
5
  export const useStyleTransfer = ({
6
6
  model,
7
7
  preventLoad = false
8
- }) => useNonStaticModule({
8
+ }) => useModule({
9
9
  module: StyleTransferModule,
10
10
  model,
11
11
  preventLoad: preventLoad
@@ -1 +1 @@
1
- {"version":3,"names":["useNonStaticModule","StyleTransferModule","useStyleTransfer","model","preventLoad","module"],"sourceRoot":"../../../../src","sources":["hooks/computer_vision/useStyleTransfer.ts"],"mappings":";;AACA,SAASA,kBAAkB,QAAQ,uBAAuB;AAC1D,SAASC,mBAAmB,QAAQ,mDAAmD;AAOvF,OAAO,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW,GAAG;AAAa,CAAC,KACpEJ,kBAAkB,CAAC;EACjBK,MAAM,EAAEJ,mBAAmB;EAC3BE,KAAK;EACLC,WAAW,EAAEA;AACf,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useModule","StyleTransferModule","useStyleTransfer","model","preventLoad","module"],"sourceRoot":"../../../../src","sources":["hooks/computer_vision/useStyleTransfer.ts"],"mappings":";;AACA,SAASA,SAAS,QAAQ,cAAc;AACxC,SAASC,mBAAmB,QAAQ,mDAAmD;AAOvF,OAAO,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW,GAAG;AAAa,CAAC,KACpEJ,SAAS,CAAC;EACRK,MAAM,EAAEJ,mBAAmB;EAC3BE,KAAK;EACLC,WAAW,EAAEA;AACf,CAAC,CAAC","ignoreList":[]}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  import { ExecutorchModule } from '../../modules/general/ExecutorchModule';
4
- import { useNonStaticModule } from '../useNonStaticModule';
4
+ import { useModule } from '../useModule';
5
5
  export const useExecutorchModule = ({
6
6
  modelSource,
7
7
  preventLoad = false
8
- }) => useNonStaticModule({
8
+ }) => useModule({
9
9
  module: ExecutorchModule,
10
10
  model: {
11
11
  modelSource
@@ -1 +1 @@
1
- {"version":3,"names":["ExecutorchModule","useNonStaticModule","useExecutorchModule","modelSource","preventLoad","module","model"],"sourceRoot":"../../../../src","sources":["hooks/general/useExecutorchModule.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,wCAAwC;AAEzE,SAASC,kBAAkB,QAAQ,uBAAuB;AAO1D,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,WAAW;EACXC,WAAW,GAAG;AACT,CAAC,KACNH,kBAAkB,CAAC;EACjBI,MAAM,EAAEL,gBAAgB;EACxBM,KAAK,EAAE;IAAEH;EAAY,CAAC;EACtBC;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["ExecutorchModule","useModule","useExecutorchModule","modelSource","preventLoad","module","model"],"sourceRoot":"../../../../src","sources":["hooks/general/useExecutorchModule.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,wCAAwC;AAEzE,SAASC,SAAS,QAAQ,cAAc;AAOxC,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,WAAW;EACXC,WAAW,GAAG;AACT,CAAC,KACNH,SAAS,CAAC;EACRI,MAAM,EAAEL,gBAAgB;EACxBM,KAAK,EAAE;IAAEH;EAAY,CAAC;EACtBC;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  import { TextEmbeddingsModule } from '../../modules/natural_language_processing/TextEmbeddingsModule';
4
- import { useNonStaticModule } from '../useNonStaticModule';
4
+ import { useModule } from '../useModule';
5
5
  export const useTextEmbeddings = ({
6
6
  model,
7
7
  preventLoad = false
8
- }) => useNonStaticModule({
8
+ }) => useModule({
9
9
  module: TextEmbeddingsModule,
10
10
  model,
11
11
  preventLoad
@@ -1 +1 @@
1
- {"version":3,"names":["TextEmbeddingsModule","useNonStaticModule","useTextEmbeddings","model","preventLoad","module"],"sourceRoot":"../../../../src","sources":["hooks/natural_language_processing/useTextEmbeddings.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,gEAAgE;AAErG,SAASC,kBAAkB,QAAQ,uBAAuB;AAU1D,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW,GAAG;AAAa,CAAC,KACrEH,kBAAkB,CAAC;EACjBI,MAAM,EAAEL,oBAAoB;EAC5BG,KAAK;EACLC;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TextEmbeddingsModule","useModule","useTextEmbeddings","model","preventLoad","module"],"sourceRoot":"../../../../src","sources":["hooks/natural_language_processing/useTextEmbeddings.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,gEAAgE;AAErG,SAASC,SAAS,QAAQ,cAAc;AAUxC,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW,GAAG;AAAa,CAAC,KACrEH,SAAS,CAAC;EACRI,MAAM,EAAEL,oBAAoB;EAC5BG,KAAK;EACLC;AACF,CAAC,CAAC","ignoreList":[]}
@@ -4,35 +4,39 @@ import { useEffect, useState } from 'react';
4
4
  import { ETError, getError } from '../Error';
5
5
  export const useModule = ({
6
6
  module,
7
- loadArgs,
7
+ model,
8
8
  preventLoad = false
9
9
  }) => {
10
10
  const [error, setError] = useState(null);
11
11
  const [isReady, setIsReady] = useState(false);
12
12
  const [isGenerating, setIsGenerating] = useState(false);
13
13
  const [downloadProgress, setDownloadProgress] = useState(0);
14
+ const [moduleInstance] = useState(() => new module());
14
15
  useEffect(() => {
15
- const loadModule = async () => {
16
+ if (preventLoad) return;
17
+ (async () => {
18
+ setDownloadProgress(0);
19
+ setError(null);
16
20
  try {
17
21
  setIsReady(false);
18
- module.onDownloadProgress(setDownloadProgress);
19
- await module.load(...loadArgs);
22
+ await moduleInstance.load(model, setDownloadProgress);
20
23
  setIsReady(true);
21
24
  } catch (err) {
22
25
  setError(err.message);
23
26
  }
27
+ })();
28
+ return () => {
29
+ moduleInstance.delete();
24
30
  };
25
- if (!preventLoad) {
26
- loadModule();
27
- }
31
+
28
32
  // eslint-disable-next-line react-hooks/exhaustive-deps
29
- }, [...loadArgs, preventLoad]);
33
+ }, [moduleInstance, ...Object.values(model), preventLoad]);
30
34
  const forward = async (...input) => {
31
35
  if (!isReady) throw new Error(getError(ETError.ModuleNotLoaded));
32
36
  if (isGenerating) throw new Error(getError(ETError.ModelGenerating));
33
37
  try {
34
38
  setIsGenerating(true);
35
- return await module.forward(...input);
39
+ return await moduleInstance.forward(...input);
36
40
  } finally {
37
41
  setIsGenerating(false);
38
42
  }
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useState","ETError","getError","useModule","module","loadArgs","preventLoad","error","setError","isReady","setIsReady","isGenerating","setIsGenerating","downloadProgress","setDownloadProgress","loadModule","onDownloadProgress","load","err","message","forward","input","Error","ModuleNotLoaded","ModelGenerating"],"sourceRoot":"../../../src","sources":["hooks/useModule.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,OAAO,EAAEC,QAAQ,QAAQ,UAAU;AAQ5C,OAAO,MAAMC,SAAS,GAAGA,CAKvB;EACAC,MAAM;EACNC,QAAQ;EACRC,WAAW,GAAG;AAKhB,CAAC,KAAK;EACJ,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGR,QAAQ,CAAgB,IAAI,CAAC;EACvD,MAAM,CAACS,OAAO,EAAEC,UAAU,CAAC,GAAGV,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM,CAACW,YAAY,EAAEC,eAAe,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EACvD,MAAM,CAACa,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGd,QAAQ,CAAC,CAAC,CAAC;EAE3DD,SAAS,CAAC,MAAM;IACd,MAAMgB,UAAU,GAAG,MAAAA,CAAA,KAAY;MAC7B,IAAI;QACFL,UAAU,CAAC,KAAK,CAAC;QACjBN,MAAM,CAACY,kBAAkB,CAACF,mBAAmB,CAAC;QAC9C,MAAMV,MAAM,CAACa,IAAI,CAAC,GAAGZ,QAAQ,CAAC;QAC9BK,UAAU,CAAC,IAAI,CAAC;MAClB,CAAC,CAAC,OAAOQ,GAAG,EAAE;QACZV,QAAQ,CAAEU,GAAG,CAAWC,OAAO,CAAC;MAClC;IACF,CAAC;IACD,IAAI,CAACb,WAAW,EAAE;MAChBS,UAAU,CAAC,CAAC;IACd;IACA;EACF,CAAC,EAAE,CAAC,GAAGV,QAAQ,EAAEC,WAAW,CAAC,CAAC;EAE9B,MAAMc,OAAO,GAAG,MAAAA,CAAO,GAAGC,KAAkB,KAA6B;IACvE,IAAI,CAACZ,OAAO,EAAE,MAAM,IAAIa,KAAK,CAACpB,QAAQ,CAACD,OAAO,CAACsB,eAAe,CAAC,CAAC;IAChE,IAAIZ,YAAY,EAAE,MAAM,IAAIW,KAAK,CAACpB,QAAQ,CAACD,OAAO,CAACuB,eAAe,CAAC,CAAC;IACpE,IAAI;MACFZ,eAAe,CAAC,IAAI,CAAC;MACrB,OAAO,MAAMR,MAAM,CAACgB,OAAO,CAAC,GAAGC,KAAK,CAAC;IACvC,CAAC,SAAS;MACRT,eAAe,CAAC,KAAK,CAAC;IACxB;EACF,CAAC;EAED,OAAO;IACLL,KAAK;IACLE,OAAO;IACPE,YAAY;IACZE,gBAAgB;IAChBO;EACF,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useState","ETError","getError","useModule","module","model","preventLoad","error","setError","isReady","setIsReady","isGenerating","setIsGenerating","downloadProgress","setDownloadProgress","moduleInstance","load","err","message","delete","Object","values","forward","input","Error","ModuleNotLoaded","ModelGenerating"],"sourceRoot":"../../../src","sources":["hooks/useModule.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,OAAO,EAAEC,QAAQ,QAAQ,UAAU;AAY5C,OAAO,MAAMC,SAAS,GAAGA,CAKvB;EACAC,MAAM;EACNC,KAAK;EACLC,WAAW,GAAG;AAKhB,CAAC,KAAK;EACJ,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGR,QAAQ,CAAgB,IAAI,CAAC;EACvD,MAAM,CAACS,OAAO,EAAEC,UAAU,CAAC,GAAGV,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM,CAACW,YAAY,EAAEC,eAAe,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EACvD,MAAM,CAACa,gBAAgB,EAAE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@ -5,7 +5,7 @@ import { ETInstallerNativeModule } from './native/RnExecutorchModules';
5
5
  // eslint-disable no-var
6
6
 
7
7
  // eslint-disable no-var
8
- if (global.loadStyleTransfer == null || global.loadImageSegmentation == null || global.loadExecutorchModule == null || global.loadClassification == null || global.loadObjectDetection == null || global.loadTokenizerModule == null || global.loadTextEmbeddings == null || global.loadImageEmbeddings == null || global.loadSpeechToText == null || global.loadOCR == null || global.loadVerticalOCR == null || global.loadImageEmbeddings == null) {
8
+ if (global.loadStyleTransfer == null || global.loadImageSegmentation == null || global.loadExecutorchModule == null || global.loadClassification == null || global.loadObjectDetection == null || global.loadTokenizerModule == null || global.loadTextEmbeddings == null || global.loadImageEmbeddings == null || global.loadLLM == null || global.loadSpeechToText == null || global.loadOCR == null || global.loadVerticalOCR == null) {
9
9
  if (!ETInstallerNativeModule) {
10
10
  throw new Error(`Failed to install react-native-executorch: The native module could not be found.`);
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"names":["ETInstallerNativeModule","global","loadStyleTransfer","loadImageSegmentation","loadExecutorchModule","loadClassification","loadObjectDetection","loadTokenizerModule","loadTextEmbeddings","loadImageEmbeddings","loadSpeechToText","loadOCR","loadVerticalOCR","Error","install","SpeechToTextLanguage","SpeechToTextModelConfig","DecodingOptions"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,8BAA8B;;AAEtE;;AA8BA;AACA,IACEC,MAAM,CAACC,iBAAiB,IAAI,IAAI,IAChCD,MAAM,CAACE,qBAAqB,IAAI,IAAI,IACpCF,MAAM,CAACG,oBAAoB,IAAI,IAAI,IACnCH,MAAM,CAACI,kBAAkB,IAAI,IAAI,IACjCJ,MAAM,CAACK,mBAAmB,IAAI,IAAI,IAClCL,MAAM,CAACM,mBAAmB,IAAI,IAAI,IAClCN,MAAM,CAACO,kBAAkB,IAAI,IAAI,IACjCP,MAAM,CAACQ,mBAAmB,IAAI,IAAI,IAClCR,MAAM,CAACS,gBAAgB,IAAI,IAAI,IAC/BT,MAAM,CAACU,OAAO,IAAI,IAAI,IACtBV,MAAM,CAACW,eAAe,IAAI,IAAI,IAC9BX,MAAM,CAACQ,mBAAmB,IAAI,IAAI,EAClC;EACA,IAAI,CAACT,uBAAuB,EAAE;IAC5B,MAAM,IAAIa,KAAK,CACb,kFACF,CAAC;EACH;EACAb,uBAAuB,CAACc,OAAO,CAAC,CAAC;AACnC;;AAEA;AACA,cAAc,2CAA2C;AACzD,cAAc,4CAA4C;AAC1D,cAAc,0CAA0C;AACxD,cAAc,8CAA8C;AAC5D,cAAc,gCAAgC;AAC9C,cAAc,wCAAwC;AACtD,cAAc,4CAA4C;AAE1D,cAAc,4CAA4C;AAC1D,cAAc,qDAAqD;AACnE,cAAc,uDAAuD;AACrE,cAAc,kDAAkD;AAEhE,cAAc,qCAAqC;;AAEnD;AACA,cAAc,gDAAgD;AAC9D,cAAc,iDAAiD;AAC/D,cAAc,+CAA+C;AAC7D,cAAc,mDAAmD;AACjE,cAAc,qCAAqC;AACnD,cAAc,6CAA6C;AAC3D,cAAc,oCAAoC;AAClD,cAAc,iDAAiD;AAE/D,cAAc,iDAAiD;AAC/D,cAAc,0DAA0D;AACxE,cAAc,4DAA4D;AAC1E,cAAc,uDAAuD;;AAErE;AACA,cAAc,yBAAyB;AACvC,cAAc,aAAa;;AAE3B;AACA,cAAc,yBAAyB;AACvC,cAAc,aAAa;AAC3B,cAAc,2BAA2B;AACzC,cAAc,aAAa;AAC3B,cAAc,gBAAgB;AAC9B,SACEC,oBAAoB,EACpBC,uBAAuB,EACvBC,eAAe,QACV,aAAa;;AAEpB;AACA,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,yBAAyB","ignoreList":[]}
1
+ {"version":3,"names":["ETInstallerNativeModule","global","loadStyleTransfer","loadImageSegmentation","loadExecutorchModule","loadClassification","loadObjectDetection","loadTokenizerModule","loadTextEmbeddings","loadImageEmbeddings","loadLLM","loadSpeechToText","loadOCR","loadVerticalOCR","Error","install","SpeechToTextLanguage","SpeechToTextModelConfig","DecodingOptions"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,8BAA8B;;AAEtE;;AA+BA;AACA,IACEC,MAAM,CAACC,iBAAiB,IAAI,IAAI,IAChCD,MAAM,CAACE,qBAAqB,IAAI,IAAI,IACpCF,MAAM,CAACG,oBAAoB,IAAI,IAAI,IACnCH,MAAM,CAACI,kBAAkB,IAAI,IAAI,IACjCJ,MAAM,CAACK,mBAAmB,IAAI,IAAI,IAClCL,MAAM,CAACM,mBAAmB,IAAI,IAAI,IAClCN,MAAM,CAACO,kBAAkB,IAAI,IAAI,IACjCP,MAAM,CAACQ,mBAAmB,IAAI,IAAI,IAClCR,MAAM,CAACS,OAAO,IAAI,IAAI,IACtBT,MAAM,CAACU,gBAAgB,IAAI,IAAI,IAC/BV,MAAM,CAACW,OAAO,IAAI,IAAI,IACtBX,MAAM,CAACY,eAAe,IAAI,IAAI,EAC9B;EACA,IAAI,CAACb,uBAAuB,EAAE;IAC5B,MAAM,IAAIc,KAAK,CACb,kFACF,CAAC;EACH;EACAd,uBAAuB,CAACe,OAAO,CAAC,CAAC;AACnC;;AAEA;AACA,cAAc,2CAA2C;AACzD,cAAc,4CAA4C;AAC1D,cAAc,0CAA0C;AACxD,cAAc,8CAA8C;AAC5D,cAAc,gCAAgC;AAC9C,cAAc,wCAAwC;AACtD,cAAc,4CAA4C;AAE1D,cAAc,4CAA4C;AAC1D,cAAc,qDAAqD;AACnE,cAAc,uDAAuD;AACrE,cAAc,kDAAkD;AAEhE,cAAc,qCAAqC;;AAEnD;AACA,cAAc,gDAAgD;AAC9D,cAAc,iDAAiD;AAC/D,cAAc,+CAA+C;AAC7D,cAAc,mDAAmD;AACjE,cAAc,qCAAqC;AACnD,cAAc,6CAA6C;AAC3D,cAAc,oCAAoC;AAClD,cAAc,iDAAiD;AAE/D,cAAc,iDAAiD;AAC/D,cAAc,0DAA0D;AACxE,cAAc,4DAA4D;AAC1E,cAAc,uDAAuD;;AAErE;AACA,cAAc,yBAAyB;AACvC,cAAc,aAAa;;AAE3B;AACA,cAAc,yBAAyB;AACvC,cAAc,aAAa;AAC3B,cAAc,2BAA2B;AACzC,cAAc,aAAa;AAC3B,cAAc,gBAAgB;AAC9B,SACEC,oBAAoB,EACpBC,uBAAuB,EACvBC,eAAe,QACV,aAAa;;AAEpB;AACA,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,yBAAyB","ignoreList":[]}
@@ -1,25 +1,17 @@
1
1
  "use strict";
2
2
 
3
- import { ResourceFetcher } from '../utils/ResourceFetcher';
4
- import { getError } from '../Error';
5
3
  export class BaseModule {
6
- static onDownloadProgressCallback = () => {};
7
- static async load(sources, ...loadArgs) {
8
- try {
9
- const paths = await ResourceFetcher.fetch(this.onDownloadProgressCallback, ...sources);
10
- if (paths === null || paths.length < sources.length) {
11
- throw new Error('Download interrupted.');
12
- }
13
- await this.nativeModule.loadModule(...paths, ...loadArgs);
14
- } catch (error) {
15
- throw new Error(getError(error));
16
- }
4
+ nativeModule = null;
5
+ async forwardET(inputTensor) {
6
+ return await this.nativeModule.forward(inputTensor);
17
7
  }
18
- static async forward(..._args) {
19
- throw new Error('forward method is not implemented in the BaseModule class. Please implement it in the derived class.');
8
+ async getInputShape(methodName, index) {
9
+ return this.nativeModule.getInputShape(methodName, index);
20
10
  }
21
- static onDownloadProgress(callback) {
22
- this.onDownloadProgressCallback = callback;
11
+ delete() {
12
+ if (this.nativeModule !== null) {
13
+ this.nativeModule.unload();
14
+ }
23
15
  }
24
16
  }
25
17
  //# sourceMappingURL=BaseModule.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ResourceFetcher","getError","BaseModule","onDownloadProgressCallback","load","sources","loadArgs","paths","fetch","length","Error","nativeModule","loadModule","error","forward","_args","onDownloadProgress","callback"],"sourceRoot":"../../../src","sources":["modules/BaseModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,QAAQ,QAAQ,UAAU;AAGnC,OAAO,MAAMC,UAAU,CAAC;EAEtB,OAAOC,0BAA0B,GAC/BA,CAAA,KAAM,CAAC,CAAC;EAEV,aAAaC,IAAIA,CACfC,OAAyB,EACzB,GAAGC,QAAe,EACH;IACf,IAAI;MACF,MAAMC,KAAK,GAAG,MAAMP,eAAe,CAACQ,KAAK,CACvC,IAAI,CAACL,0BAA0B,EAC/B,GAAGE,OACL,CAAC;MACD,IAAIE,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACE,MAAM,GAAGJ,OAAO,CAACI,MAAM,EAAE;QACnD,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;MAC1C;MACA,MAAM,IAAI,CAACC,YAAY,CAACC,UAAU,CAAC,GAAGL,KAAK,EAAE,GAAGD,QAAQ,CAAC;IAC3D,CAAC,CAAC,OAAOO,KAAK,EAAE;MACd,MAAM,IAAIH,KAAK,CAACT,QAAQ,CAACY,KAAK,CAAC,CAAC;IAClC;EACF;EAEA,aAAuBC,OAAOA,CAAC,GAAGC,KAAY,EAAgB;IAC5D,MAAM,IAAIL,KAAK,CACb,sGACF,CAAC;EACH;EAEA,OAAOM,kBAAkBA,CAACC,QAA4C,EAAE;IACtE,IAAI,CAACd,0BAA0B,GAAGc,QAAQ;EAC5C;AACF","ignoreList":[]}
1
+ {"version":3,"names":["BaseModule","nativeModule","forwardET","inputTensor","forward","getInputShape","methodName","index","delete","unload"],"sourceRoot":"../../../src","sources":["modules/BaseModule.ts"],"mappings":";;AAGA,OAAO,MAAeA,UAAU,CAAC;EAC/BC,YAAY,GAAQ,IAAI;EAQxB,MAAgBC,SAASA,CAACC,WAAwB,EAAwB;IACxE,OAAO,MAAM,IAAI,CAACF,YAAY,CAACG,OAAO,CAACD,WAAW,CAAC;EACrD;EAEA,MAAME,aAAaA,CAACC,UAAkB,EAAEC,KAAa,EAAqB;IACxE,OAAO,IAAI,CAACN,YAAY,CAACI,aAAa,CAACC,UAAU,EAAEC,KAAK,CAAC;EAC3D;EAEAC,MAAMA,CAAA,EAAG;IACP,IAAI,IAAI,CAACP,YAAY,KAAK,IAAI,EAAE;MAC9B,IAAI,CAACA,YAAY,CAACQ,MAAM,CAAC,CAAC;IAC5B;EACF;AACF","ignoreList":[]}
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { ResourceFetcher } from '../../utils/ResourceFetcher';
4
4
  import { ETError, getError } from '../../Error';
5
- import { BaseNonStaticModule } from '../BaseNonStaticModule';
6
- export class ClassificationModule extends BaseNonStaticModule {
5
+ import { BaseModule } from '../BaseModule';
6
+ export class ClassificationModule extends BaseModule {
7
7
  async load(model, onDownloadProgressCallback = () => {}) {
8
8
  const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
9
9
  if (paths === null || paths.length < 1) {
@@ -1 +1 @@
1
- {"version":3,"names":["ResourceFetcher","ETError","getError","BaseNonStaticModule","ClassificationModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadClassification","forward","imageSource","ModuleNotLoaded","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ClassificationModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,mBAAmB,QAAQ,wBAAwB;AAE5D,OAAO,MAAMC,oBAAoB,SAASD,mBAAmB,CAAC;EAC5D,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,kBAAkB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAC/D;EAEA,MAAMQ,OAAOA,CAACC,WAAmB,EAAE;IACjC,IAAI,IAAI,CAACJ,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACiB,eAAe,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,CAACL,YAAY,CAACM,QAAQ,CAACF,WAAW,CAAC;EACtD;AACF","ignoreList":[]}
1
+ {"version":3,"names":["ResourceFetcher","ETError","getError","BaseModule","ClassificationModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadClassification","forward","imageSource","ModuleNotLoaded","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ClassificationModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,oBAAoB,SAASD,UAAU,CAAC;EACnD,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,kBAAkB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAC/D;EAEA,MAAMQ,OAAOA,CAACC,WAAmB,EAAE;IACjC,IAAI,IAAI,CAACJ,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACiB,eAAe,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,CAACL,YAAY,CAACM,QAAQ,CAACF,WAAW,CAAC;EACtD;AACF","ignoreList":[]}
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { ResourceFetcher } from '../../utils/ResourceFetcher';
4
4
  import { ETError, getError } from '../../Error';
5
- import { BaseNonStaticModule } from '../BaseNonStaticModule';
6
- export class ImageEmbeddingsModule extends BaseNonStaticModule {
5
+ import { BaseModule } from '../BaseModule';
6
+ export class ImageEmbeddingsModule extends BaseModule {
7
7
  async load(model, onDownloadProgressCallback = () => {}) {
8
8
  const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
9
9
  if (paths === null || paths.length < 1) {
@@ -1 +1 @@
1
- {"version":3,"names":["ResourceFetcher","ETError","getError","BaseNonStaticModule","ImageEmbeddingsModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadImageEmbeddings","forward","imageSource","ModuleNotLoaded","Float32Array","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ImageEmbeddingsModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,mBAAmB,QAAQ,wBAAwB;AAE5D,OAAO,MAAMC,qBAAqB,SAASD,mBAAmB,CAAC;EAC7D,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,mBAAmB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAChE;EAEA,MAAMQ,OAAOA,CAACC,WAAmB,EAAyB;IACxD,IAAI,IAAI,CAACJ,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACiB,eAAe,CAAC,CAAC;IACpD,OAAO,IAAIC,YAAY,CAAC,MAAM,IAAI,CAACN,YAAY,CAACO,QAAQ,CAACH,WAAW,CAAC,CAAC;EACxE;AACF","ignoreList":[]}
1
+ {"version":3,"names":["ResourceFetcher","ETError","getError","BaseModule","ImageEmbeddingsModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadImageEmbeddings","forward","imageSource","ModuleNotLoaded","Float32Array","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ImageEmbeddingsModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,qBAAqB,SAASD,UAAU,CAAC;EACpD,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,mBAAmB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAChE;EAEA,MAAMQ,OAAOA,CAACC,WAAmB,EAAyB;IACxD,IAAI,IAAI,CAACJ,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACiB,eAAe,CAAC,CAAC;IACpD,OAAO,IAAIC,YAAY,CAAC,MAAM,IAAI,CAACN,YAAY,CAACO,QAAQ,CAACH,WAAW,CAAC,CAAC;EACxE;AACF","ignoreList":[]}
@@ -3,8 +3,8 @@
3
3
  import { ResourceFetcher } from '../../utils/ResourceFetcher';
4
4
  import { DeeplabLabel } from '../../types/imageSegmentation';
5
5
  import { ETError, getError } from '../../Error';
6
- import { BaseNonStaticModule } from '../BaseNonStaticModule';
7
- export class ImageSegmentationModule extends BaseNonStaticModule {
6
+ import { BaseModule } from '../BaseModule';
7
+ export class ImageSegmentationModule extends BaseModule {
8
8
  async load(model, onDownloadProgressCallback = () => {}) {
9
9
  const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
10
10
  if (paths === null || paths.length < 1) {
@@ -1 +1 @@
1
- {"version":3,"names":["ResourceFetcher","DeeplabLabel","ETError","getError","BaseNonStaticModule","ImageSegmentationModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadImageSegmentation","forward","imageSource","classesOfInterest","resize","ModuleNotLoaded","stringDict","generate","map","label","enumDict","key","enumKey"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ImageSegmentationModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,mBAAmB,QAAQ,wBAAwB;AAE5D,OAAO,MAAMC,uBAAuB,SAASD,mBAAmB,CAAC;EAC/D,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMT,eAAe,CAACU,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,qBAAqB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAClE;EAEA,MAAMQ,OAAOA,CACXC,WAAmB,EACnBC,iBAAkC,EAClCC,MAAgB,EAC+B;IAC/C,IAAI,IAAI,CAACN,YAAY,IAAI,IAAI,EAAE;MAC7B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACmB,eAAe,CAAC,CAAC;IACpD;IAEA,MAAMC,UAAU,GAAG,MAAM,IAAI,CAACR,YAAY,CAACS,QAAQ,CACjDL,WAAW,EACX,CAACC,iBAAiB,IAAI,EAAE,EAAEK,GAAG,CAAEC,KAAK,IAAKxB,YAAY,CAACwB,KAAK,CAAC,CAAC,EAC7DL,MAAM,IAAI,KACZ,CAAC;IAED,IAAIM,QAA8C,GAAG,CAAC,CAAC;IAEvD,KAAK,MAAMC,GAAG,IAAIL,UAAU,EAAE;MAC5B,IAAIK,GAAG,IAAI1B,YAAY,EAAE;QACvB,MAAM2B,OAAO,GAAG3B,YAAY,CAAC0B,GAAG,CAA8B;QAC9DD,QAAQ,CAACE,OAAO,CAAC,GAAGN,UAAU,CAACK,GAAG,CAAC;MACrC;IACF;IACA,OAAOD,QAAQ;EACjB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["ResourceFetcher","DeeplabLabel","ETError","getError","BaseModule","ImageSegmentationModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadImageSegmentation","forward","imageSource","classesOfInterest","resize","ModuleNotLoaded","stringDict","generate","map","label","enumDict","key","enumKey"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ImageSegmentationModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAASC,OAAO,EAA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 +2,8 @@
2
2
 
3
3
  import { ResourceFetcher } from '../../utils/ResourceFetcher';
4
4
  import { ETError, getError } from '../../Error';
5
- import { BaseNonStaticModule } from '../BaseNonStaticModule';
6
- export class ObjectDetectionModule extends BaseNonStaticModule {
5
+ import { BaseModule } from '../BaseModule';
6
+ export class ObjectDetectionModule extends BaseModule {
7
7
  async load(model, onDownloadProgressCallback = () => {}) {
8
8
  const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
9
9
  if (paths === null || paths.length < 1) {
@@ -1 +1 @@
1
- {"version":3,"names":["ResourceFetcher","ETError","getError","BaseNonStaticModule","ObjectDetectionModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadObjectDetection","forward","imageSource","detectionThreshold","ModuleNotLoaded","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ObjectDetectionModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAG7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,mBAAmB,QAAQ,wBAAwB;AAE5D,OAAO,MAAMC,qBAAqB,SAASD,mBAAmB,CAAC;EAC7D,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,mBAAmB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAChE;EAEA,MAAMQ,OAAOA,CACXC,WAAmB,EACnBC,kBAA0B,GAAG,GAAG,EACV;IACtB,IAAI,IAAI,CAACL,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACkB,eAAe,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,CAACN,YAAY,CAACO,QAAQ,CAACH,WAAW,EAAEC,kBAAkB,CAAC;EAC1E;AACF","ignoreList":[]}
1
+ {"version":3,"names":["ResourceFetcher","ETError","getError","BaseModule","ObjectDetectionModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadObjectDetection","forward","imageSource","detectionThreshold","ModuleNotLoaded","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/ObjectDetectionModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAG7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,qBAAqB,SAASD,UAAU,CAAC;EACpD,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,mBAAmB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAChE;EAEA,MAAMQ,OAAOA,CACXC,WAAmB,EACnBC,kBAA0B,GAAG,GAAG,EACV;IACtB,IAAI,IAAI,CAACL,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACkB,eAAe,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,CAACN,YAAY,CAACO,QAAQ,CAACH,WAAW,EAAEC,kBAAkB,CAAC;EAC1E;AACF","ignoreList":[]}
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { ResourceFetcher } from '../../utils/ResourceFetcher';
4
4
  import { ETError, getError } from '../../Error';
5
- import { BaseNonStaticModule } from '../BaseNonStaticModule';
6
- export class StyleTransferModule extends BaseNonStaticModule {
5
+ import { BaseModule } from '../BaseModule';
6
+ export class StyleTransferModule extends BaseModule {
7
7
  async load(model, onDownloadProgressCallback = () => {}) {
8
8
  const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
9
9
  if (paths === null || paths.length < 1) {
@@ -1 +1 @@
1
- {"version":3,"names":["ResourceFetcher","ETError","getError","BaseNonStaticModule","StyleTransferModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadStyleTransfer","forward","imageSource","ModuleNotLoaded","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/StyleTransferModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,mBAAmB,QAAQ,wBAAwB;AAE5D,OAAO,MAAMC,mBAAmB,SAASD,mBAAmB,CAAC;EAC3D,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,iBAAiB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAC9D;EAEA,MAAMQ,OAAOA,CAACC,WAAmB,EAAmB;IAClD,IAAI,IAAI,CAACJ,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACiB,eAAe,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,CAACL,YAAY,CAACM,QAAQ,CAACF,WAAW,CAAC;EACtD;AACF","ignoreList":[]}
1
+ {"version":3,"names":["ResourceFetcher","ETError","getError","BaseModule","StyleTransferModule","load","model","onDownloadProgressCallback","paths","fetch","modelSource","length","Error","nativeModule","global","loadStyleTransfer","forward","imageSource","ModuleNotLoaded","generate"],"sourceRoot":"../../../../src","sources":["modules/computer_vision/StyleTransferModule.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,OAAO,EAAEC,QAAQ,QAAQ,aAAa;AAC/C,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,mBAAmB,SAASD,UAAU,CAAC;EAClD,MAAME,IAAIA,CACRC,KAAsC,EACtCC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAMR,eAAe,CAACS,KAAK,CACvCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,IAAIF,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,iBAAiB,CAACP,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAC9D;EAEA,MAAMQ,OAAOA,CAACC,WAAmB,EAAmB;IAClD,IAAI,IAAI,CAACJ,YAAY,IAAI,IAAI,EAC3B,MAAM,IAAID,KAAK,CAACV,QAAQ,CAACD,OAAO,CAACiB,eAAe,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,CAACL,YAAY,CAACM,QAAQ,CAACF,WAAW,CAAC;EACtD;AACF","ignoreList":[]}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
- import { BaseNonStaticModule } from '../BaseNonStaticModule';
3
+ import { BaseModule } from '../BaseModule';
4
4
  import { ResourceFetcher } from '../../utils/ResourceFetcher';
5
- export class ExecutorchModule extends BaseNonStaticModule {
5
+ export class ExecutorchModule extends BaseModule {
6
6
  async load(modelSource, onDownloadProgressCallback = () => {}) {
7
7
  const paths = await ResourceFetcher.fetch(onDownloadProgressCallback, modelSource);
8
8
  if (paths === null || paths.length < 1) {
@@ -1 +1 @@
1
- {"version":3,"names":["BaseNonStaticModule","ResourceFetcher","ExecutorchModule","load","modelSource","onDownloadProgressCallback","paths","fetch","length","Error","nativeModule","global","loadExecutorchModule","forward","inputTensor","forwardET"],"sourceRoot":"../../../../src","sources":["modules/general/ExecutorchModule.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,wBAAwB;AAE5D,SAASC,eAAe,QAAQ,6BAA6B;AAE7D,OAAO,MAAMC,gBAAgB,SAASF,mBAAmB,CAAC;EACxD,MAAMG,IAAIA,CACRC,WAA2B,EAC3BC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAML,eAAe,CAACM,KAAK,CACvCF,0BAA0B,EAC1BD,WACF,CAAC;IACD,IAAIE,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACE,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,oBAAoB,CAACN,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EACjE;EAEA,MAAMO,OAAOA,CAACC,WAAwB,EAAwB;IAC5D,OAAO,MAAM,IAAI,CAACC,SAAS,CAACD,WAAW,CAAC;EAC1C;AACF","ignoreList":[]}
1
+ {"version":3,"names":["BaseModule","ResourceFetcher","ExecutorchModule","load","modelSource","onDownloadProgressCallback","paths","fetch","length","Error","nativeModule","global","loadExecutorchModule","forward","inputTensor","forwardET"],"sourceRoot":"../../../../src","sources":["modules/general/ExecutorchModule.ts"],"mappings":";;AACA,SAASA,UAAU,QAAQ,eAAe;AAE1C,SAASC,eAAe,QAAQ,6BAA6B;AAE7D,OAAO,MAAMC,gBAAgB,SAASF,UAAU,CAAC;EAC/C,MAAMG,IAAIA,CACRC,WAA2B,EAC3BC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,KAAK,GAAG,MAAML,eAAe,CAACM,KAAK,CACvCF,0BAA0B,EAC1BD,WACF,CAAC;IACD,IAAIE,KAAK,KAAK,IAAI,IAAIA,KAAK,CAACE,MAAM,GAAG,CAAC,EAAE;MACtC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,oBAAoB,CAACN,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EACjE;EAEA,MAAMO,OAAOA,CAACC,WAAwB,EAAwB;IAC5D,OAAO,MAAM,IAAI,CAACC,SAAS,CAACD,WAAW,CAAC;EAC1C;AACF","ignoreList":[]}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import { ResourceFetcher } from '../../utils/ResourceFetcher';
4
- import { BaseNonStaticModule } from '../BaseNonStaticModule';
5
- export class TextEmbeddingsModule extends BaseNonStaticModule {
4
+ import { BaseModule } from '../BaseModule';
5
+ export class TextEmbeddingsModule extends BaseModule {
6
6
  async load(model, onDownloadProgressCallback = () => {}) {
7
7
  const modelPromise = ResourceFetcher.fetch(onDownloadProgressCallback, model.modelSource);
8
8
  const tokenizerPromise = ResourceFetcher.fetch(undefined, model.tokenizerSource);
@@ -1 +1 @@
1
- {"version":3,"names":["ResourceFetcher","BaseNonStaticModule","TextEmbeddingsModule","load","model","onDownloadProgressCallback","modelPromise","fetch","modelSource","tokenizerPromise","undefined","tokenizerSource","modelResult","tokenizerResult","Promise","all","modelPath","tokenizerPath","Error","nativeModule","global","loadTextEmbeddings","forward","input","Float32Array","generate"],"sourceRoot":"../../../../src","sources":["modules/natural_language_processing/TextEmbeddingsModule.ts"],"mappings":";;AACA,SAASA,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,mBAAmB,QAAQ,wBAAwB;AAE5D,OAAO,MAAMC,oBAAoB,SAASD,mBAAmB,CAAC;EAC5D,MAAME,IAAIA,CACRC,KAAuE,EACvEC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,YAAY,GAAGN,eAAe,CAACO,KAAK,CACxCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,MAAMC,gBAAgB,GAAGT,eAAe,CAACO,KAAK,CAC5CG,SAAS,EACTN,KAAK,CAACO,eACR,CAAC;IACD,MAAM,CAACC,WAAW,EAAEC,eAAe,CAAC,GAAG,MAAMC,OAAO,CAACC,GAAG,CAAC,CACvDT,YAAY,EACZG,gBAAgB,CACjB,CAAC;IACF,MAAMO,SAAS,GAAGJ,WAAW,GAAG,CAAC,CAAC;IAClC,MAAMK,aAAa,GAAGJ,eAAe,GAAG,CAAC,CAAC;IAC1C,IAAI,CAACG,SAAS,IAAI,CAACC,aAAa,EAAE;MAChC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,kBAAkB,CAACL,SAAS,EAAEC,aAAa,CAAC;EACzE;EAEA,MAAMK,OAAOA,CAACC,KAAa,EAAyB;IAClD,OAAO,IAAIC,YAAY,CAAC,MAAM,IAAI,CAACL,YAAY,CAACM,QAAQ,CAACF,KAAK,CAAC,CAAC;EAClE;AACF","ignoreList":[]}
1
+ {"version":3,"names":["ResourceFetcher","BaseModule","TextEmbeddingsModule","load","model","onDownloadProgressCallback","modelPromise","fetch","modelSource","tokenizerPromise","undefined","tokenizerSource","modelResult","tokenizerResult","Promise","all","modelPath","tokenizerPath","Error","nativeModule","global","loadTextEmbeddings","forward","input","Float32Array","generate"],"sourceRoot":"../../../../src","sources":["modules/natural_language_processing/TextEmbeddingsModule.ts"],"mappings":";;AACA,SAASA,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,oBAAoB,SAASD,UAAU,CAAC;EACnD,MAAME,IAAIA,CACRC,KAAuE,EACvEC,0BAAsD,GAAGA,CAAA,KAAM,CAAC,CAAC,EAClD;IACf,MAAMC,YAAY,GAAGN,eAAe,CAACO,KAAK,CACxCF,0BAA0B,EAC1BD,KAAK,CAACI,WACR,CAAC;IACD,MAAMC,gBAAgB,GAAGT,eAAe,CAACO,KAAK,CAC5CG,SAAS,EACTN,KAAK,CAACO,eACR,CAAC;IACD,MAAM,CAACC,WAAW,EAAEC,eAAe,CAAC,GAAG,MAAMC,OAAO,CAACC,GAAG,CAAC,CACvDT,YAAY,EACZG,gBAAgB,CACjB,CAAC;IACF,MAAMO,SAAS,GAAGJ,WAAW,GAAG,CAAC,CAAC;IAClC,MAAMK,aAAa,GAAGJ,eAAe,GAAG,CAAC,CAAC;IAC1C,IAAI,CAACG,SAAS,IAAI,CAACC,aAAa,EAAE;MAChC,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;IAC1C;IACA,IAAI,CAACC,YAAY,GAAGC,MAAM,CAACC,kBAAkB,CAACL,SAAS,EAAEC,aAAa,CAAC;EACzE;EAEA,MAAMK,OAAOA,CAACC,KAAa,EAAyB;IAClD,OAAO,IAAIC,YAAY,CAAC,MAAM,IAAI,CAACL,YAAY,CAACM,QAAQ,CAACF,KAAK,CAAC,CAAC;EAClE;AACF","ignoreList":[]}
@@ -13,6 +13,5 @@ function returnSpecOrThrowLinkingError(spec) {
13
13
  });
14
14
  }
15
15
  const ETInstallerNativeModule = returnSpecOrThrowLinkingError(require('./NativeETInstaller').default);
16
- const LLMNativeModule = returnSpecOrThrowLinkingError(require('./NativeLLM').default);
17
- export { LLMNativeModule, ETInstallerNativeModule };
16
+ export { ETInstallerNativeModule };
18
17
  //# sourceMappingURL=RnExecutorchModules.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","LINKING_ERROR","select","ios","default","returnSpecOrThrowLinkingError","spec","Proxy","get","Error","ETInstallerNativeModule","require","LLMNativeModule"],"sourceRoot":"../../../src","sources":["native/RnExecutorchModules.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAIvC,MAAMC,aAAa,GACjB,kFAAkF,GAClFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,SAASC,6BAA6BA,CAACC,IAAS,EAAE;EAChD,OAAOA,IAAI,GACPA,IAAI,GACJ,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;IACEC,GAAGA,CAAA,EAAG;MACJ,MAAM,IAAIC,KAAK,CAACR,aAAa,CAAC;IAChC;EACF,CACF,CAAC;AACP;AAEA,MAAMS,uBAA6C,GACjDL,6BAA6B,CAACM,OAAO,CAAC,qBAAqB,CAAC,CAACP,OAAO,CAAC;AACvE,MAAMQ,eAA6B,GAAGP,6BAA6B,CACjEM,OAAO,CAAC,aAAa,CAAC,CAACP,OACzB,CAAC;AAED,SAASQ,eAAe,EAAEF,uBAAuB","ignoreList":[]}
1
+ {"version":3,"names":["Platform","LINKING_ERROR","select","ios","default","returnSpecOrThrowLinkingError","spec","Proxy","get","Error","ETInstallerNativeModule","require"],"sourceRoot":"../../../src","sources":["native/RnExecutorchModules.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAGvC,MAAMC,aAAa,GACjB,kFAAkF,GAClFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,SAASC,6BAA6BA,CAACC,IAAS,EAAE;EAChD,OAAOA,IAAI,GACPA,IAAI,GACJ,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;IACEC,GAAGA,CAAA,EAAG;MACJ,MAAM,IAAIC,KAAK,CAACR,aAAa,CAAC;IAChC;EACF,CACF,CAAC;AACP;AAEA,MAAMS,uBAA6C,GACjDL,6BAA6B,CAACM,OAAO,CAAC,qBAAqB,CAAC,CAACP,OAAO,CAAC;AAEvE,SAASM,uBAAuB","ignoreList":[]}
@@ -126,14 +126,14 @@ export class ASR {
126
126
  }
127
127
  return segments;
128
128
  }
129
- async estimateWordTimestampsLinear(tokens, start, end) {
130
- const duration = (end - start) * this.timePrecision;
129
+ async estimateWordTimestampsLinear(tokens, timestampStart, timestampEnd) {
130
+ const duration = (timestampEnd - timestampStart) * this.timePrecision;
131
131
  const segmentText = (await this.tokenizerModule.decode(tokens)).trim();
132
132
  const words = segmentText.split(' ').map(w => ` ${w}`);
133
133
  const numOfCharacters = words.reduce((acc, word) => acc + word.length, 0);
134
134
  const timePerCharacter = duration / numOfCharacters;
135
135
  const wordObjects = [];
136
- const startTimeOffset = (start - this.timestampBeginToken) * this.timePrecision;
136
+ const startTimeOffset = (timestampStart - this.timestampBeginToken) * this.timePrecision;
137
137
  let prevCharNum = 0;
138
138
  for (let j = 0; j < words.length; j++) {
139
139
  const word = words[j];
@@ -1 +1 @@
1
- {"version":3,"names":["TokenizerModule","ResourceFetcher","ASR","tokenizerModule","timePrecision","maxDecodeLength","chunkSize","minChunkSamples","samplingRate","load","model","onDownloadProgressCallback","tokenizerLoadPromise","encoderDecoderPromise","fetch","encoderSource","decoderSource","_","encoderDecoderResults","Promise","all","Error","nativeModule","global","loadSpeechToText","startOfTranscriptToken","tokenToId","endOfTextToken","timestampBeginToken","getInitialSequence","options","initialSequence","language","languageToken","taskToken","push","generate","audio","temperature","encode","Float32Array","sequencesIds","scores","length","logits","softmaxWithTemperature","Array","from","decode","nextTokenId","indexOf","Math","max","sampleFromDistribution","nextTokenProb","slice","exps","map","logit","exp","sum","reduce","a","b","probs","r","random","cumulative","i","generateWithFallback","temperatures","generatedTokens","result","tokens","seqLen","cumLogProb","acc","score","log","avgLogProb","calculateWordLevelTimestamps","segments","prevTimestamp","start","end","wordObjects","estimateWordTimestampsLinear","words","at","scalingFactor","segment","word","duration","segmentText","trim","split","w","numOfCharacters","timePerCharacter","startTimeOffset","prevCharNum","j","transcribe","seek","allSegments","chunk","lastTimeStamp","tsWords","o","segmentsEndTs","res","waveform"],"sourceRoot":"../../../../src","sources":["utils/SpeechToTextModule/ASR.ts"],"mappings":";;AAAA;;AAEA,SAASA,eAAe,QAAQ,2DAA2D;AAQ3F,SAASC,eAAe,QAAQ,oBAAoB;AAEpD,OAAO,MAAMC,GAAG,CAAC;EAEPC,eAAe,GAAoB,IAAIH,eAAe,CAAC,CAAC;EAExDI,aAAa,GAAW,IAAI,CAAC,CAAC;EAC9BC,eAAe,GAAW,GAAG;EAC7BC,SAAS,GAAW,EAAE,CAAC,CAAC;EACxBC,eAAe,GAAW,CAAC,GAAG,KAAK,CAAC,CAAC;EACrCC,YAAY,GAAW,KAAK;EAMpC,MAAaC,IAAIA,CACfC,KAA8B,EAC9BC,0BAAsD,EACtD;IACA,MAAMC,oBAAoB,GAAG,IAAI,CAACT,eAAe,CAACM,IAAI,CAACC,KAAK,CAAC;IAC7D,MAAMG,qBAAqB,GAAGZ,eAAe,CAACa,KAAK,CACjDH,0BAA0B,EAC1BD,KAAK,CAACK,aAAa,EACnBL,KAAK,CAACM,aACR,CAAC;IACD,MAAM,CAACC,CAAC,EAAEC,qBAAqB,CAAC,GAAG,MAAMC,OAAO,CAACC,GAAG,CAAC,CACnDR,oBAAoB,EACpBC,qBAAqB,CACtB,CAAC;IACF,MAAME,aAAa,GAAGG,qBAAqB,GAAG,CAAC,CAAC;IAChD,MAAMF,aAAa,GAAGE,qBAAqB,GAAG,CAAC,CAAC;IAChD,IAAI,CAACH,aAAa,IAAI,CAACC,aAAa,EAAE;MACp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K,CAACC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAEJ,GAAG;MACxDmB,IAAI,GAAGG,aAAa;IACtB;IAEA,OAAOF,WAAW;EACpB;EAEOG,OAAOA,CAAC1B,QAAmB,EAAe;IAC/C,MAAM2B,CAAc,GAAG,EAAE;IACzB,KAAK,MAAMlB,OAAO,IAAIT,QAAQ,EAAE;MAC9B,KAAK,MAAMU,IAAI,IAAID,OAAO,CAACH,KAAK,EAAE;QAChCqB,CAAC,CAACzE,IAAI,CAAC,CAACwD,IAAI,CAACR,KAAK,EAAEQ,IAAI,CAACP,GAAG,EAAEO,IAAI,CAACA,IAAI,CAAC,CAAC;MAC3C;IACF;IACA,OAAOiB,CAAC;EACV;EAEOC,aAAaA,CAACC,GAAc,EAAE;IACnC,OAAOA,GAAG,CAACrD,GAAG,CAAEiC,OAAO,IAAKA,OAAO,CAACH,KAAK,CAACC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAEJ,GAAG,CAAC;EACxD;EAEA,MAAa7C,MAAMA,CAACwE,QAAsB,EAAiB;IACzD,MAAM,IAAI,CAACzF,YAAY,CAACiB,MAAM,CAACwE,QAAQ,CAAC;EAC1C;EAEA,MAAa/D,MAAMA,CAACyB,MAAgB,EAAyB;IAC3D,OAAO,IAAIjC,YAAY,CAAC,MAAM,IAAI,CAAClB,YAAY,CAAC0B,MAAM,CAACyB,MAAM,CAAC,CAAC;EACjE;AACF","ignoreList":[]}
1
+ {"version":3,"names":["TokenizerModule","ResourceFetcher","ASR","tokenizerModule","timePrecision","maxDecodeLength","chunkSize","minChunkSamples","samplingRate","load","model","onDownloadProgressCallback","tokenizerLoadPromise","encoderDecoderPromise","fetch","encoderSource","decoderSource","_","encoderDecoderResults","Promise","all","Error","nativeModule","global","loadSpeechToText","startOfTranscriptToken","tokenToId","endOfTextToken","timestampBeginToken","getInitialSequence","options","initialSequence","language","languageToken","taskToken","push","generate","audio","temperature","encode","Float32Array","sequencesIds","scores","length","logits","softmaxWithTemperature","Array","from","decode","nextTokenId","indexOf","Math","max","sampleFromDistribution","nextTokenProb","slice","exps","map","logit","exp","sum","reduce","a","b","probs","r","random","cumulative","i","generateWithFallback","temperatures","generatedTokens","result","tokens","seqLen","cumLogProb","acc","score","log","avgLogProb","calculateWordLevelTimestamps","segments","prevTimestamp","start","end","wordObjects","estimateWordTimestampsLinear","words","at","scalingFactor","segment","word","timestampStart","timestampEnd","duration","segmentText","trim","split","w","numOfCharacters","timePerCharacter","startTimeOffset","prevCharNum","j","transcribe","seek","allSegments","chunk","lastTimeStamp","tsWords","o","segmentsEndTs","res","waveform"],"sourceRoot":"../../../../src","sources":["utils/SpeechToTextModule/ASR.ts"],"mappings":";;AAAA;;AAEA,SAASA,eAAe,QAAQ,2DAA2D;AAQ3F,SAASC,eAAe,QAAQ,oBAAoB;AAEpD,OAAO,MAAMC,GAAG,CAAC;EAEPC,eAAe,GAAoB,IAAIH,eAAe,CAAC,CAAC;EAExDI,aAAa,GAAW,IAAI,CAAC,CAAC;EAC9BC,eAAe,GAAW,GAAG;EAC7BC,SAAS,GAAW,EAAE,CAAC,CAAC;EACxBC,eAAe,GAAW,CAAC,GAAG,KAAK,CAAC,CAAC;EACrCC,YAAY,GAAW,KAAK;EAMpC,MAAaC,IAAIA,CACfC,KAA8B,EAC9BC,0BAAsD,EACtD;IACA,MAAMC,oBAAoB,GAAG,IAAI,CAACT,eAAe,CAACM,IAAI,CAACC,KAAK,CAAC;IAC7D,MAAMG,qBAAqB,GAAGZ,eAAe,CAACa,KAAK,CACjDH,0BAA0B,EAC1BD,KAAK,CAACK,aAAa,EACnBL,KAAK,CAACM,aACR,CAAC;IACD,MAAM,CAACC,CAAC,EAAEC,qBAAqB,CAAC,GAAG,MAAMC,OAAO,CAACC,GAAG,CAAC,CACnDR,oBAAoB,EACpBC,qBAAqB,CACtB,CAAC;IACF,MAAME,aAAa,GAAGG,qBAAqB,GAAG,CAAC,CAAC;IAChD,MAAMF,aAAa,GAAGE,qBAAqB,GAAG,CAAC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AAG3B,QAAQ,CAACO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAED,KAAK,CAACC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAEJ,GAAG;MACxDqB,IAAI,GAAGG,aAAa;IACtB;IAEA,OAAOF,WAAW;EACpB;EAEOG,OAAOA,CAAC5B,QAAmB,EAAe;IAC/C,MAAM6B,CAAc,GAAG,EAAE;IACzB,KAAK,MAAMpB,OAAO,IAAIT,QAAQ,EAAE;MAC9B,KAAK,MAAMU,IAAI,IAAID,OAAO,CAACH,KAAK,EAAE;QAChCuB,CAAC,CAAC3E,IAAI,CAAC,CAACwD,IAAI,CAACR,KAAK,EAAEQ,IAAI,CAACP,GAAG,EAAEO,IAAI,CAACA,IAAI,CAAC,CAAC;MAC3C;IACF;IACA,OAAOmB,CAAC;EACV;EAEOC,aAAaA,CAACC,GAAc,EAAE;IACnC,OAAOA,GAAG,CAACvD,GAAG,CAAEiC,OAAO,IAAKA,OAAO,CAACH,KAAK,CAACC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAEJ,GAAG,CAAC;EACxD;EAEA,MAAa7C,MAAMA,CAAC0E,QAAsB,EAAiB;IACzD,MAAM,IAAI,CAAC3F,YAAY,CAACiB,MAAM,CAAC0E,QAAQ,CAAC;EAC1C;EAEA,MAAajE,MAAMA,CAACyB,MAAgB,EAAyB;IAC3D,OAAO,IAAIjC,YAAY,CAAC,MAAM,IAAI,CAAClB,YAAY,CAAC0B,MAAM,CAACyB,MAAM,CAAC,CAAC;EACjE;AACF","ignoreList":[]}
@@ -1,15 +1,14 @@
1
+ import { OCRController } from '../../controllers/OCRController';
1
2
  import { ResourceSource } from '../../types/common';
2
3
  import { OCRLanguage } from '../../types/ocr';
3
4
  export declare class OCRModule {
4
- private controller;
5
- constructor();
6
- load(model: {
5
+ static module: OCRController;
6
+ static load(model: {
7
7
  detectorSource: ResourceSource;
8
8
  recognizerLarge: ResourceSource;
9
9
  recognizerMedium: ResourceSource;
10
10
  recognizerSmall: ResourceSource;
11
11
  language: OCRLanguage;
12
12
  }, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
13
- forward(input: string): Promise<any>;
14
- delete(): void;
13
+ static forward(input: string): Promise<import("../../types/ocr").OCRDetection[]>;
15
14
  }
@@ -1,20 +1,17 @@
1
1
  import { OCRController } from '../../controllers/OCRController';
2
2
  export class OCRModule {
3
- controller;
4
- constructor() {
5
- this.controller = new OCRController();
6
- }
7
- async load(model, onDownloadProgressCallback = () => { }) {
8
- await this.controller.load(model.detectorSource, {
3
+ static module;
4
+ static async load(model, onDownloadProgressCallback = () => { }) {
5
+ this.module = new OCRController({
6
+ modelDownloadProgressCallback: onDownloadProgressCallback,
7
+ });
8
+ await this.module.loadModel(model.detectorSource, {
9
9
  recognizerLarge: model.recognizerLarge,
10
10
  recognizerMedium: model.recognizerMedium,
11
11
  recognizerSmall: model.recognizerSmall,
12
- }, model.language, onDownloadProgressCallback);
13
- }
14
- async forward(input) {
15
- return await this.controller.forward(input);
12
+ }, model.language);
16
13
  }
17
- delete() {
18
- this.controller.delete();
14
+ static async forward(input) {
15
+ return await this.module.forward(input);
19
16
  }
20
17
  }
@@ -1,15 +1,14 @@
1
+ import { VerticalOCRController } from '../../controllers/VerticalOCRController';
1
2
  import { ResourceSource } from '../../types/common';
2
3
  import { OCRLanguage } from '../../types/ocr';
3
4
  export declare class VerticalOCRModule {
4
- private controller;
5
- constructor();
6
- load(model: {
5
+ static module: VerticalOCRController;
6
+ static load(model: {
7
7
  detectorLarge: ResourceSource;
8
8
  detectorNarrow: ResourceSource;
9
9
  recognizerLarge: ResourceSource;
10
10
  recognizerSmall: ResourceSource;
11
11
  language: OCRLanguage;
12
12
  }, independentCharacters: boolean, onDownloadProgressCallback?: (progress: number) => void): Promise<void>;
13
- forward(input: string): Promise<any>;
14
- delete(): void;
13
+ static forward(input: string): Promise<import("../../types/ocr").OCRDetection[]>;
15
14
  }
@@ -1,22 +1,19 @@
1
1
  import { VerticalOCRController } from '../../controllers/VerticalOCRController';
2
2
  export class VerticalOCRModule {
3
- controller;
4
- constructor() {
5
- this.controller = new VerticalOCRController();
6
- }
7
- async load(model, independentCharacters, onDownloadProgressCallback = () => { }) {
8
- await this.controller.load({
3
+ static module;
4
+ static async load(model, independentCharacters, onDownloadProgressCallback = () => { }) {
5
+ this.module = new VerticalOCRController({
6
+ modelDownloadProgressCallback: onDownloadProgressCallback,
7
+ });
8
+ await this.module.loadModel({
9
9
  detectorLarge: model.detectorLarge,
10
10
  detectorNarrow: model.detectorNarrow,
11
11
  }, {
12
12
  recognizerLarge: model.recognizerLarge,
13
13
  recognizerSmall: model.recognizerSmall,
14
- }, model.language, independentCharacters, onDownloadProgressCallback);
15
- }
16
- async forward(input) {
17
- return await this.controller.forward(input);
14
+ }, model.language, independentCharacters);
18
15
  }
19
- delete() {
20
- this.controller.delete();
16
+ static async forward(input) {
17
+ return await this.module.forward(input);
21
18
  }
22
19
  }