web-core-tcm 0.0.25 → 0.0.26

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 (308) hide show
  1. package/dist/node_modules/@alova/shared/dist/alova-shared.esm.js +134 -0
  2. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +70 -0
  3. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +14 -0
  4. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +6 -0
  5. package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +10 -0
  6. package/dist/node_modules/@bufbuild/protobuf/dist/esm/create.js +136 -0
  7. package/dist/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +7 -0
  8. package/dist/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +164 -0
  9. package/dist/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +6 -0
  10. package/dist/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +75 -0
  11. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +8 -0
  12. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +35 -0
  13. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +42 -0
  14. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +17 -0
  15. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +156 -0
  16. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +349 -0
  17. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +39 -0
  18. package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +72 -0
  19. package/dist/node_modules/@bufbuild/protobuf/dist/esm/registry.js +551 -0
  20. package/dist/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +159 -0
  21. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +58 -0
  22. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +350 -0
  23. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +25 -0
  24. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +145 -0
  25. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +110 -0
  26. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +107 -0
  27. package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +24 -0
  28. package/dist/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +556 -0
  29. package/dist/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +36 -0
  30. package/dist/node_modules/@vue/shared/dist/shared.esm-bundler.js +26 -0
  31. package/dist/node_modules/alova/dist/adapter/fetch.esm.js +55 -0
  32. package/dist/node_modules/alova/dist/alova.esm.js +414 -0
  33. package/dist/node_modules/alova/dist/clienthook/index.esm.js +89 -0
  34. package/dist/node_modules/builder-pattern/dist/index.js +22 -0
  35. package/dist/node_modules/jwt-decode/build/esm/index.js +52 -0
  36. package/dist/node_modules/pinyin/lib/esm/pinyin.js +242260 -0
  37. package/dist/node_modules/punycode/punycode.es6.js +139 -0
  38. package/dist/node_modules/quasar/src/composables/use-quasar/use-quasar.js +8 -0
  39. package/dist/node_modules/quasar/src/utils/private.symbols/symbols.js +4 -0
  40. package/dist/src/api/algorithm/comprehensiveAlgorithm.d.ts +4 -0
  41. package/dist/src/api/algorithm/comprehensiveAlgorithm.js +16 -0
  42. package/dist/src/api/algorithm/index.d.ts +10 -0
  43. package/dist/src/api/algorithm/index.js +62 -0
  44. package/dist/src/api/algorithm/inquiriesAlgorithm.d.ts +13 -0
  45. package/dist/src/api/algorithm/inquiriesAlgorithm.js +9 -0
  46. package/dist/src/api/algorithm/inspectionsAlgorithm.d.ts +2 -0
  47. package/dist/src/api/algorithm/inspectionsAlgorithm.js +10 -0
  48. package/dist/src/api/algorithm/lisemsAlgorithm.d.ts +2 -0
  49. package/dist/src/api/algorithm/lisemsAlgorithm.js +15 -0
  50. package/dist/src/api/algorithm/pulsationsAlgorithm.d.ts +4 -0
  51. package/dist/src/api/algorithm/pulsationsAlgorithm.js +8 -0
  52. package/dist/src/api/authorization/alova/apiDefinitions.d.ts +21 -0
  53. package/dist/src/api/authorization/alova/apiDefinitions.js +9 -0
  54. package/dist/src/api/authorization/alova/createApis.d.ts +10 -0
  55. package/dist/src/api/authorization/alova/createApis.js +51 -0
  56. package/dist/src/api/authorization/alova/implement/authorization.d.ts +4 -0
  57. package/dist/src/api/authorization/alova/implement/authorization.js +15 -0
  58. package/dist/src/api/authorization/alova/index.d.ts +5 -0
  59. package/dist/src/api/authorization/alova/index.js +18 -0
  60. package/dist/src/api/authorization/authorization.d.ts +8 -0
  61. package/dist/src/api/authorization/authorization.js +16 -0
  62. package/dist/src/api/authorization/index.js +9 -0
  63. package/dist/src/api/check/alova/apiDefinitions.d.ts +28 -0
  64. package/dist/src/api/check/alova/apiDefinitions.js +16 -0
  65. package/dist/src/api/check/alova/createApis.d.ts +10 -0
  66. package/dist/src/api/check/alova/createApis.js +51 -0
  67. package/dist/src/api/check/alova/implement/check.d.ts +27 -0
  68. package/dist/src/api/check/alova/implement/check.js +119 -0
  69. package/dist/src/api/check/alova/index.d.ts +5 -0
  70. package/dist/src/api/check/alova/index.js +21 -0
  71. package/dist/src/api/check/check.d.ts +54 -0
  72. package/dist/src/api/check/check.js +131 -0
  73. package/dist/src/api/check/index.js +11 -0
  74. package/dist/src/api/config/alova/index.d.ts +5 -0
  75. package/dist/src/api/config/alova/index.js +55 -0
  76. package/dist/src/api/config/index.d.ts +23 -0
  77. package/dist/src/api/config/index.js +106 -0
  78. package/dist/src/api/device/device.d.ts +5 -0
  79. package/dist/src/api/device/device.js +46 -0
  80. package/dist/src/api/doctor/alova/apiDefinitions.d.ts +26 -0
  81. package/dist/src/api/doctor/alova/apiDefinitions.js +14 -0
  82. package/dist/src/api/doctor/alova/createApis.d.ts +10 -0
  83. package/dist/src/api/doctor/alova/createApis.js +51 -0
  84. package/dist/src/api/doctor/alova/implement/doctor.d.ts +7 -0
  85. package/dist/src/api/doctor/alova/implement/doctor.js +42 -0
  86. package/dist/src/api/doctor/alova/index.d.ts +5 -0
  87. package/dist/src/api/doctor/alova/index.js +20 -0
  88. package/dist/src/api/doctor/doctor.d.ts +22 -0
  89. package/dist/src/api/doctor/doctor.js +29 -0
  90. package/dist/src/api/doctor/index.js +9 -0
  91. package/dist/src/api/metric/implement/metric.d.ts +24 -0
  92. package/dist/src/api/metric/implement/metric.js +80 -0
  93. package/dist/src/api/metric/index.js +6 -0
  94. package/dist/src/api/metric/metric.d.ts +28 -0
  95. package/dist/src/api/metric/metric.js +75 -0
  96. package/dist/src/api/oauth/alova/apiDefinitions.d.ts +24 -0
  97. package/dist/src/api/oauth/alova/apiDefinitions.js +12 -0
  98. package/dist/src/api/oauth/alova/createApis.d.ts +10 -0
  99. package/dist/src/api/oauth/alova/createApis.js +51 -0
  100. package/dist/src/api/oauth/alova/implement/oauth.d.ts +4 -0
  101. package/dist/src/api/oauth/alova/implement/oauth.js +15 -0
  102. package/dist/src/api/oauth/alova/index.d.ts +5 -0
  103. package/dist/src/api/oauth/alova/index.js +17 -0
  104. package/dist/src/api/oauth/index.js +9 -0
  105. package/dist/src/api/oauth/oauth.d.ts +7 -0
  106. package/dist/src/api/oauth/oauth.js +16 -0
  107. package/dist/src/api/outpatient/alova/apiDefinitions.d.ts +25 -0
  108. package/dist/src/api/outpatient/alova/apiDefinitions.js +13 -0
  109. package/dist/src/api/outpatient/alova/createApis.d.ts +10 -0
  110. package/dist/src/api/outpatient/alova/createApis.js +51 -0
  111. package/dist/src/api/outpatient/alova/implement/outpatient.d.ts +10 -0
  112. package/dist/src/api/outpatient/alova/implement/outpatient.js +71 -0
  113. package/dist/src/api/outpatient/alova/index.d.ts +5 -0
  114. package/dist/src/api/outpatient/alova/index.js +21 -0
  115. package/dist/src/api/outpatient/index.js +11 -0
  116. package/dist/src/api/outpatient/outpatient.d.ts +39 -0
  117. package/dist/src/api/outpatient/outpatient.js +45 -0
  118. package/dist/src/api/patient/alova/apiDefinitions.d.ts +39 -0
  119. package/dist/src/api/patient/alova/apiDefinitions.js +27 -0
  120. package/dist/src/api/patient/alova/createApis.d.ts +10 -0
  121. package/dist/src/api/patient/alova/createApis.js +51 -0
  122. package/dist/src/api/patient/alova/implement/meta.d.ts +113 -0
  123. package/dist/src/api/patient/alova/implement/meta.js +404 -0
  124. package/dist/src/api/patient/alova/implement/patient.d.ts +22 -0
  125. package/dist/src/api/patient/alova/implement/patient.js +72 -0
  126. package/dist/src/api/patient/alova/index.d.ts +5 -0
  127. package/dist/src/api/patient/alova/index.js +22 -0
  128. package/dist/src/api/patient/core.d.ts +50 -0
  129. package/dist/src/api/patient/core.js +109 -0
  130. package/dist/src/api/patient/index.js +46 -0
  131. package/dist/src/api/patient/meta.d.ts +238 -0
  132. package/dist/src/api/patient/meta.js +454 -0
  133. package/dist/src/api/patient/patient.d.ts +43 -0
  134. package/dist/src/api/patient/patient.js +42 -0
  135. package/dist/src/api/prescription/alova/apiDefinitions.d.ts +27 -0
  136. package/dist/src/api/prescription/alova/apiDefinitions.js +15 -0
  137. package/dist/src/api/prescription/alova/createApis.d.ts +10 -0
  138. package/dist/src/api/prescription/alova/createApis.js +51 -0
  139. package/dist/src/api/prescription/alova/implement/herbal.d.ts +15 -0
  140. package/dist/src/api/prescription/alova/implement/herbal.js +54 -0
  141. package/dist/src/api/prescription/alova/implement/prescription.d.ts +15 -0
  142. package/dist/src/api/prescription/alova/implement/prescription.js +49 -0
  143. package/dist/src/api/prescription/alova/index.d.ts +5 -0
  144. package/dist/src/api/prescription/alova/index.js +20 -0
  145. package/dist/src/api/prescription/herbal.d.ts +19 -0
  146. package/dist/src/api/prescription/herbal.js +34 -0
  147. package/dist/src/api/prescription/index.js +13 -0
  148. package/dist/src/api/prescription/prescription.d.ts +26 -0
  149. package/dist/src/api/prescription/prescription.js +49 -0
  150. package/dist/src/api/scientist/alova/apiDefinitions.d.ts +25 -0
  151. package/dist/src/api/scientist/alova/apiDefinitions.js +13 -0
  152. package/dist/src/api/scientist/alova/createApis.d.ts +10 -0
  153. package/dist/src/api/scientist/alova/createApis.js +51 -0
  154. package/dist/src/api/scientist/alova/implement/scientist.d.ts +6 -0
  155. package/dist/src/api/scientist/alova/implement/scientist.js +35 -0
  156. package/dist/src/api/scientist/alova/index.d.ts +6 -0
  157. package/dist/src/api/scientist/alova/index.js +21 -0
  158. package/dist/src/api/scientist/index.js +9 -0
  159. package/dist/src/api/scientist/scientist.d.ts +20 -0
  160. package/dist/src/api/scientist/scientist.js +37 -0
  161. package/dist/src/components/models.d.ts +7 -0
  162. package/dist/src/index.js +36 -0
  163. package/dist/src/pages/LoginPage.vue.d.ts +2 -0
  164. package/dist/src/proto/types/Images_pb.d.ts +34 -0
  165. package/dist/src/proto/types/Images_pb.js +10 -0
  166. package/dist/src/proto/types/WaveMap_pb.d.ts +48 -0
  167. package/dist/src/proto/types/WaveMap_pb.js +10 -0
  168. package/dist/src/router/index.d.ts +2 -0
  169. package/dist/src/router/routes.d.ts +3 -0
  170. package/dist/src/util/RichTextUtil.d.ts +1 -0
  171. package/dist/src/util/RichTextUtil.js +6 -0
  172. package/dist/src/util/datetime.d.ts +5 -0
  173. package/dist/src/util/export.d.ts +4 -0
  174. package/dist/src/util/helper.d.ts +65 -0
  175. package/dist/src/util/helper.js +46 -0
  176. package/dist/src/util/image.d.ts +2 -0
  177. package/dist/src/util/image.js +17 -0
  178. package/dist/src/util/number.d.ts +12 -0
  179. package/dist/src/util/s256.d.ts +2 -0
  180. package/dist/src/util/secret.d.ts +10 -0
  181. package/dist/src/util/string.d.ts +21 -0
  182. package/dist/src/util/string.js +10 -0
  183. package/package.json +4 -1
  184. package/.editorconfig +0 -7
  185. package/.github/workflows/test.yml +0 -29
  186. package/.prettierrc.json +0 -5
  187. package/.vscode/extensions.json +0 -15
  188. package/.vscode/settings.json +0 -9
  189. package/eslint.config.js +0 -83
  190. package/index.html +0 -24
  191. package/postcss.config.js +0 -29
  192. package/quasar.config.ts +0 -233
  193. package/src/App.vue +0 -7
  194. package/src/api/algorithm/comprehensiveAlgorithm.ts +0 -20
  195. package/src/api/algorithm/index.ts +0 -50
  196. package/src/api/algorithm/inquiriesAlgorithm.ts +0 -16
  197. package/src/api/algorithm/inspectionsAlgorithm.ts +0 -11
  198. package/src/api/algorithm/lisemsAlgorithm.ts +0 -16
  199. package/src/api/algorithm/pulsationsAlgorithm.ts +0 -8
  200. package/src/api/authorization/alova/apiDefinitions.ts +0 -23
  201. package/src/api/authorization/alova/createApis.ts +0 -114
  202. package/src/api/authorization/alova/globals.d.ts +0 -394
  203. package/src/api/authorization/alova/implement/authorization.ts +0 -14
  204. package/src/api/authorization/alova/index.ts +0 -22
  205. package/src/api/authorization/authorization.ts +0 -16
  206. package/src/api/check/alova/apiDefinitions.ts +0 -30
  207. package/src/api/check/alova/createApis.ts +0 -114
  208. package/src/api/check/alova/globals.d.ts +0 -1257
  209. package/src/api/check/alova/implement/check.ts +0 -165
  210. package/src/api/check/alova/index.ts +0 -22
  211. package/src/api/check/check.ts +0 -217
  212. package/src/api/config/alova/index.ts +0 -71
  213. package/src/api/config/index.ts +0 -132
  214. package/src/api/device/device.js +0 -58
  215. package/src/api/doctor/alova/apiDefinitions.ts +0 -28
  216. package/src/api/doctor/alova/createApis.ts +0 -114
  217. package/src/api/doctor/alova/globals.d.ts +0 -559
  218. package/src/api/doctor/alova/implement/doctor.ts +0 -51
  219. package/src/api/doctor/alova/index.ts +0 -23
  220. package/src/api/doctor/doctor.ts +0 -53
  221. package/src/api/metric/implement/metric.ts +0 -108
  222. package/src/api/metric/metric.ts +0 -114
  223. package/src/api/oauth/alova/apiDefinitions.ts +0 -26
  224. package/src/api/oauth/alova/createApis.ts +0 -114
  225. package/src/api/oauth/alova/globals.d.ts +0 -460
  226. package/src/api/oauth/alova/implement/oauth.ts +0 -24
  227. package/src/api/oauth/alova/index.ts +0 -21
  228. package/src/api/oauth/oauth.ts +0 -19
  229. package/src/api/outpatient/alova/apiDefinitions.ts +0 -27
  230. package/src/api/outpatient/alova/createApis.ts +0 -114
  231. package/src/api/outpatient/alova/globals.d.ts +0 -685
  232. package/src/api/outpatient/alova/implement/outpatient.ts +0 -91
  233. package/src/api/outpatient/alova/index.ts +0 -22
  234. package/src/api/outpatient/outpatient.ts +0 -67
  235. package/src/api/patient/alova/apiDefinitions.ts +0 -41
  236. package/src/api/patient/alova/createApis.ts +0 -114
  237. package/src/api/patient/alova/globals.d.ts +0 -1690
  238. package/src/api/patient/alova/implement/meta.ts +0 -517
  239. package/src/api/patient/alova/implement/patient.ts +0 -99
  240. package/src/api/patient/alova/index.ts +0 -22
  241. package/src/api/patient/core.ts +0 -133
  242. package/src/api/patient/meta.ts +0 -570
  243. package/src/api/patient/patient.ts +0 -98
  244. package/src/api/prescription/alova/apiDefinitions.ts +0 -29
  245. package/src/api/prescription/alova/createApis.ts +0 -114
  246. package/src/api/prescription/alova/globals.d.ts +0 -968
  247. package/src/api/prescription/alova/implement/herbal.ts +0 -68
  248. package/src/api/prescription/alova/implement/prescription.ts +0 -62
  249. package/src/api/prescription/alova/index.ts +0 -22
  250. package/src/api/prescription/herbal.ts +0 -51
  251. package/src/api/prescription/prescription.ts +0 -76
  252. package/src/api/scientist/alova/apiDefinitions.ts +0 -27
  253. package/src/api/scientist/alova/createApis.ts +0 -114
  254. package/src/api/scientist/alova/globals.d.ts +0 -447
  255. package/src/api/scientist/alova/implement/scientist.ts +0 -40
  256. package/src/api/scientist/alova/index.ts +0 -24
  257. package/src/api/scientist/scientist.ts +0 -49
  258. package/src/assets/quasar-logo-vertical.svg +0 -15
  259. package/src/boot/.gitkeep +0 -0
  260. package/src/components/ExampleComponent.vue +0 -37
  261. package/src/components/models.ts +0 -8
  262. package/src/css/app.scss +0 -1
  263. package/src/css/quasar.variables.scss +0 -25
  264. package/src/env.d.ts +0 -7
  265. package/src/layouts/UserLayout.vue +0 -108
  266. package/src/pages/LoginPage.vue +0 -29
  267. package/src/proto/Images.proto +0 -7
  268. package/src/proto/WaveMap.proto +0 -10
  269. package/src/proto/types/Images_pb.ts +0 -48
  270. package/src/proto/types/WaveMap_pb.ts +0 -59
  271. package/src/router/index.ts +0 -37
  272. package/src/router/routes.ts +0 -14
  273. package/src/util/RichTextUtil.ts +0 -5
  274. package/src/util/datetime.ts +0 -43
  275. package/src/util/export.ts +0 -46
  276. package/src/util/helper.ts +0 -159
  277. package/src/util/image.ts +0 -28
  278. package/src/util/number.ts +0 -146
  279. package/src/util/s256.js +0 -27
  280. package/src/util/secret.ts +0 -60
  281. package/src/util/string.ts +0 -121
  282. package/tsconfig.json +0 -7
  283. /package/{public → dist}/favicon.ico +0 -0
  284. /package/{public → dist}/icons/favicon-128x128.png +0 -0
  285. /package/{public → dist}/icons/favicon-16x16.png +0 -0
  286. /package/{public → dist}/icons/favicon-32x32.png +0 -0
  287. /package/{public → dist}/icons/favicon-96x96.png +0 -0
  288. /package/{src/api/authorization/alova/implement/index.ts → dist/src/api/authorization/alova/implement/index.d.ts} +0 -0
  289. /package/{src/api/authorization/index.ts → dist/src/api/authorization/index.d.ts} +0 -0
  290. /package/{src/api/check/alova/implement/index.ts → dist/src/api/check/alova/implement/index.d.ts} +0 -0
  291. /package/{src/api/check/index.ts → dist/src/api/check/index.d.ts} +0 -0
  292. /package/{src/api/doctor/alova/implement/index.ts → dist/src/api/doctor/alova/implement/index.d.ts} +0 -0
  293. /package/{src/api/doctor/index.ts → dist/src/api/doctor/index.d.ts} +0 -0
  294. /package/{src/api/index.ts → dist/src/api/index.d.ts} +0 -0
  295. /package/{src/api/metric/implement/index.ts → dist/src/api/metric/implement/index.d.ts} +0 -0
  296. /package/{src/api/metric/index.ts → dist/src/api/metric/index.d.ts} +0 -0
  297. /package/{src/api/oauth/alova/implement/index.ts → dist/src/api/oauth/alova/implement/index.d.ts} +0 -0
  298. /package/{src/api/oauth/index.ts → dist/src/api/oauth/index.d.ts} +0 -0
  299. /package/{src/api/outpatient/alova/implement/index.ts → dist/src/api/outpatient/alova/implement/index.d.ts} +0 -0
  300. /package/{src/api/outpatient/index.ts → dist/src/api/outpatient/index.d.ts} +0 -0
  301. /package/{src/api/patient/alova/implement/index.ts → dist/src/api/patient/alova/implement/index.d.ts} +0 -0
  302. /package/{src/api/patient/index.ts → dist/src/api/patient/index.d.ts} +0 -0
  303. /package/{src/api/prescription/alova/implement/index.ts → dist/src/api/prescription/alova/implement/index.d.ts} +0 -0
  304. /package/{src/api/prescription/index.ts → dist/src/api/prescription/index.d.ts} +0 -0
  305. /package/{src/api/scientist/alova/implement/index.ts → dist/src/api/scientist/alova/implement/index.d.ts} +0 -0
  306. /package/{src/api/scientist/index.ts → dist/src/api/scientist/index.d.ts} +0 -0
  307. /package/{src/index.ts → dist/src/index.d.ts} +0 -0
  308. /package/{src/proto/index.ts → dist/src/proto/index.d.ts} +0 -0
@@ -0,0 +1,551 @@
1
+ import { ScalarType as k } from "./descriptors.js";
2
+ import { parseTextFormatScalarValue as j, parseTextFormatEnumValue as O } from "./wire/text-format.js";
3
+ import { nestedTypes as Y } from "./reflect/nested-types.js";
4
+ import { unsafeIsSetExplicit as _ } from "./reflect/unsafe.js";
5
+ import { safeObjectProperty as h, protoCamelCase as T } from "./reflect/names.js";
6
+ function ye(...e) {
7
+ const n = U();
8
+ if (!e.length)
9
+ return n;
10
+ if ("$typeName" in e[0] && e[0].$typeName == "google.protobuf.FileDescriptorSet") {
11
+ for (const i of e[0].file)
12
+ V(i, n);
13
+ return n;
14
+ }
15
+ if ("$typeName" in e[0]) {
16
+ let a = function(u) {
17
+ const o = [];
18
+ for (const l of u.dependency) {
19
+ if (n.getFile(l) != null || s.has(l))
20
+ continue;
21
+ const d = t(l);
22
+ if (!d)
23
+ throw new Error(`Unable to resolve ${l}, imported by ${u.name}`);
24
+ "kind" in d ? n.addFile(d, !1, !0) : (s.add(d.name), o.push(d));
25
+ }
26
+ return o.concat(...o.map(a));
27
+ };
28
+ const i = e[0], t = e[1], s = /* @__PURE__ */ new Set();
29
+ for (const u of [i, ...a(i)].reverse())
30
+ V(u, n);
31
+ } else
32
+ for (const i of e)
33
+ for (const t of i.files)
34
+ n.addFile(t);
35
+ return n;
36
+ }
37
+ function U() {
38
+ const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
39
+ return {
40
+ kind: "registry",
41
+ types: e,
42
+ extendees: n,
43
+ [Symbol.iterator]() {
44
+ return e.values();
45
+ },
46
+ get files() {
47
+ return i.values();
48
+ },
49
+ addFile(t, s, a) {
50
+ if (i.set(t.proto.name, t), !s)
51
+ for (const u of Y(t))
52
+ this.add(u);
53
+ if (a)
54
+ for (const u of t.dependencies)
55
+ this.addFile(u, s, a);
56
+ },
57
+ add(t) {
58
+ if (t.kind == "extension") {
59
+ let s = n.get(t.extendee.typeName);
60
+ s || n.set(
61
+ t.extendee.typeName,
62
+ // biome-ignore lint/suspicious/noAssignInExpressions: no
63
+ s = /* @__PURE__ */ new Map()
64
+ ), s.set(t.number, t);
65
+ }
66
+ e.set(t.typeName, t);
67
+ },
68
+ get(t) {
69
+ return e.get(t);
70
+ },
71
+ getFile(t) {
72
+ return i.get(t);
73
+ },
74
+ getMessage(t) {
75
+ const s = e.get(t);
76
+ return s?.kind == "message" ? s : void 0;
77
+ },
78
+ getEnum(t) {
79
+ const s = e.get(t);
80
+ return s?.kind == "enum" ? s : void 0;
81
+ },
82
+ getExtension(t) {
83
+ const s = e.get(t);
84
+ return s?.kind == "extension" ? s : void 0;
85
+ },
86
+ getExtensionFor(t, s) {
87
+ var a;
88
+ return (a = n.get(t.typeName)) === null || a === void 0 ? void 0 : a.get(s);
89
+ },
90
+ getService(t) {
91
+ const s = e.get(t);
92
+ return s?.kind == "service" ? s : void 0;
93
+ }
94
+ };
95
+ }
96
+ const B = 998, G = 999, W = 9, b = 10, E = 11, Q = 12, M = 14, F = 3, J = 2, I = 1, X = 0, x = 1, K = 2, Z = 3, q = 1, z = 2, H = 1, R = {
97
+ // EDITION_PROTO2
98
+ 998: {
99
+ fieldPresence: 1,
100
+ // EXPLICIT,
101
+ enumType: 2,
102
+ // CLOSED,
103
+ repeatedFieldEncoding: 2,
104
+ // EXPANDED,
105
+ utf8Validation: 3,
106
+ // NONE,
107
+ messageEncoding: 1,
108
+ // LENGTH_PREFIXED,
109
+ jsonFormat: 2,
110
+ // LEGACY_BEST_EFFORT,
111
+ enforceNamingStyle: 2,
112
+ // STYLE_LEGACY,
113
+ defaultSymbolVisibility: 1
114
+ // EXPORT_ALL,
115
+ },
116
+ // EDITION_PROTO3
117
+ 999: {
118
+ fieldPresence: 2,
119
+ // IMPLICIT,
120
+ enumType: 1,
121
+ // OPEN,
122
+ repeatedFieldEncoding: 1,
123
+ // PACKED,
124
+ utf8Validation: 2,
125
+ // VERIFY,
126
+ messageEncoding: 1,
127
+ // LENGTH_PREFIXED,
128
+ jsonFormat: 1,
129
+ // ALLOW,
130
+ enforceNamingStyle: 2,
131
+ // STYLE_LEGACY,
132
+ defaultSymbolVisibility: 1
133
+ // EXPORT_ALL,
134
+ },
135
+ // EDITION_2023
136
+ 1e3: {
137
+ fieldPresence: 1,
138
+ // EXPLICIT,
139
+ enumType: 1,
140
+ // OPEN,
141
+ repeatedFieldEncoding: 1,
142
+ // PACKED,
143
+ utf8Validation: 2,
144
+ // VERIFY,
145
+ messageEncoding: 1,
146
+ // LENGTH_PREFIXED,
147
+ jsonFormat: 1,
148
+ // ALLOW,
149
+ enforceNamingStyle: 2,
150
+ // STYLE_LEGACY,
151
+ defaultSymbolVisibility: 1
152
+ // EXPORT_ALL,
153
+ },
154
+ // EDITION_2024
155
+ 1001: {
156
+ fieldPresence: 1,
157
+ // EXPLICIT,
158
+ enumType: 1,
159
+ // OPEN,
160
+ repeatedFieldEncoding: 1,
161
+ // PACKED,
162
+ utf8Validation: 2,
163
+ // VERIFY,
164
+ messageEncoding: 1,
165
+ // LENGTH_PREFIXED,
166
+ jsonFormat: 1,
167
+ // ALLOW,
168
+ enforceNamingStyle: 1,
169
+ // STYLE2024,
170
+ defaultSymbolVisibility: 2
171
+ // EXPORT_TOP_LEVEL,
172
+ }
173
+ };
174
+ function V(e, n) {
175
+ var i, t;
176
+ const s = {
177
+ kind: "file",
178
+ proto: e,
179
+ deprecated: (t = (i = e.options) === null || i === void 0 ? void 0 : i.deprecated) !== null && t !== void 0 ? t : !1,
180
+ edition: ie(e),
181
+ name: e.name.replace(/\.proto$/, ""),
182
+ dependencies: se(e, n),
183
+ enums: [],
184
+ messages: [],
185
+ extensions: [],
186
+ services: [],
187
+ toString() {
188
+ return `file ${e.name}`;
189
+ }
190
+ }, a = /* @__PURE__ */ new Map(), u = {
191
+ get(o) {
192
+ return a.get(o);
193
+ },
194
+ add(o) {
195
+ var l;
196
+ m(((l = o.proto.options) === null || l === void 0 ? void 0 : l.mapEntry) === !0), a.set(o.typeName, o);
197
+ }
198
+ };
199
+ for (const o of e.enumType)
200
+ C(o, s, void 0, n);
201
+ for (const o of e.messageType)
202
+ A(o, s, void 0, n, u);
203
+ for (const o of e.service)
204
+ ee(o, s, n);
205
+ $(s, n);
206
+ for (const o of a.values())
207
+ P(o, n, u);
208
+ for (const o of s.messages)
209
+ P(o, n, u), $(o, n);
210
+ n.addFile(s, !0);
211
+ }
212
+ function $(e, n) {
213
+ switch (e.kind) {
214
+ case "file":
215
+ for (const i of e.proto.extension) {
216
+ const t = w(i, e, n);
217
+ e.extensions.push(t), n.add(t);
218
+ }
219
+ break;
220
+ case "message":
221
+ for (const i of e.proto.extension) {
222
+ const t = w(i, e, n);
223
+ e.nestedExtensions.push(t), n.add(t);
224
+ }
225
+ for (const i of e.nestedMessages)
226
+ $(i, n);
227
+ break;
228
+ }
229
+ }
230
+ function P(e, n, i) {
231
+ const t = e.proto.oneofDecl.map((a) => te(a, e)), s = /* @__PURE__ */ new Set();
232
+ for (const a of e.proto.field) {
233
+ const u = oe(a, t), o = w(a, e, n, u, i);
234
+ e.fields.push(o), e.field[o.localName] = o, u === void 0 ? e.members.push(o) : (u.fields.push(o), s.has(u) || (s.add(u), e.members.push(u)));
235
+ }
236
+ for (const a of t.filter((u) => s.has(u)))
237
+ e.oneofs.push(a);
238
+ for (const a of e.nestedMessages)
239
+ P(a, n, i);
240
+ }
241
+ function C(e, n, i, t) {
242
+ var s, a, u, o, l;
243
+ const d = de(e.name, e.value), r = {
244
+ kind: "enum",
245
+ proto: e,
246
+ deprecated: (a = (s = e.options) === null || s === void 0 ? void 0 : s.deprecated) !== null && a !== void 0 ? a : !1,
247
+ file: n,
248
+ parent: i,
249
+ open: !0,
250
+ name: e.name,
251
+ typeName: S(e, i, n),
252
+ value: {},
253
+ values: [],
254
+ sharedPrefix: d,
255
+ toString() {
256
+ return `enum ${this.typeName}`;
257
+ }
258
+ };
259
+ r.open = fe(r), t.add(r);
260
+ for (const f of e.value) {
261
+ const v = f.name;
262
+ r.values.push(
263
+ // biome-ignore lint/suspicious/noAssignInExpressions: no
264
+ r.value[f.number] = {
265
+ kind: "enum_value",
266
+ proto: f,
267
+ deprecated: (o = (u = f.options) === null || u === void 0 ? void 0 : u.deprecated) !== null && o !== void 0 ? o : !1,
268
+ parent: r,
269
+ name: v,
270
+ localName: h(d == null ? v : v.substring(d.length)),
271
+ number: f.number,
272
+ toString() {
273
+ return `enum value ${r.typeName}.${v}`;
274
+ }
275
+ }
276
+ );
277
+ }
278
+ ((l = i?.nestedEnums) !== null && l !== void 0 ? l : n.enums).push(r);
279
+ }
280
+ function A(e, n, i, t, s) {
281
+ var a, u, o, l;
282
+ const d = {
283
+ kind: "message",
284
+ proto: e,
285
+ deprecated: (u = (a = e.options) === null || a === void 0 ? void 0 : a.deprecated) !== null && u !== void 0 ? u : !1,
286
+ file: n,
287
+ parent: i,
288
+ name: e.name,
289
+ typeName: S(e, i, n),
290
+ fields: [],
291
+ field: {},
292
+ oneofs: [],
293
+ members: [],
294
+ nestedEnums: [],
295
+ nestedMessages: [],
296
+ nestedExtensions: [],
297
+ toString() {
298
+ return `message ${this.typeName}`;
299
+ }
300
+ };
301
+ ((o = e.options) === null || o === void 0 ? void 0 : o.mapEntry) === !0 ? s.add(d) : (((l = i?.nestedMessages) !== null && l !== void 0 ? l : n.messages).push(d), t.add(d));
302
+ for (const r of e.enumType)
303
+ C(r, n, d, t);
304
+ for (const r of e.nestedType)
305
+ A(r, n, d, t, s);
306
+ }
307
+ function ee(e, n, i) {
308
+ var t, s;
309
+ const a = {
310
+ kind: "service",
311
+ proto: e,
312
+ deprecated: (s = (t = e.options) === null || t === void 0 ? void 0 : t.deprecated) !== null && s !== void 0 ? s : !1,
313
+ file: n,
314
+ name: e.name,
315
+ typeName: S(e, void 0, n),
316
+ methods: [],
317
+ method: {},
318
+ toString() {
319
+ return `service ${this.typeName}`;
320
+ }
321
+ };
322
+ n.services.push(a), i.add(a);
323
+ for (const u of e.method) {
324
+ const o = ne(u, a, i);
325
+ a.methods.push(o), a.method[o.localName] = o;
326
+ }
327
+ }
328
+ function ne(e, n, i) {
329
+ var t, s, a, u;
330
+ let o;
331
+ e.clientStreaming && e.serverStreaming ? o = "bidi_streaming" : e.clientStreaming ? o = "client_streaming" : e.serverStreaming ? o = "server_streaming" : o = "unary";
332
+ const l = i.getMessage(p(e.inputType)), d = i.getMessage(p(e.outputType));
333
+ m(l, `invalid MethodDescriptorProto: input_type ${e.inputType} not found`), m(d, `invalid MethodDescriptorProto: output_type ${e.inputType} not found`);
334
+ const r = e.name;
335
+ return {
336
+ kind: "rpc",
337
+ proto: e,
338
+ deprecated: (s = (t = e.options) === null || t === void 0 ? void 0 : t.deprecated) !== null && s !== void 0 ? s : !1,
339
+ parent: n,
340
+ name: r,
341
+ localName: h(r.length ? h(r[0].toLowerCase() + r.substring(1)) : r),
342
+ methodKind: o,
343
+ input: l,
344
+ output: d,
345
+ idempotency: (u = (a = e.options) === null || a === void 0 ? void 0 : a.idempotencyLevel) !== null && u !== void 0 ? u : X,
346
+ toString() {
347
+ return `rpc ${n.typeName}.${r}`;
348
+ }
349
+ };
350
+ }
351
+ function te(e, n) {
352
+ return {
353
+ kind: "oneof",
354
+ proto: e,
355
+ deprecated: !1,
356
+ parent: n,
357
+ fields: [],
358
+ name: e.name,
359
+ localName: h(T(e.name)),
360
+ toString() {
361
+ return `oneof ${n.typeName}.${this.name}`;
362
+ }
363
+ };
364
+ }
365
+ function w(e, n, i, t, s) {
366
+ var a, u, o;
367
+ const l = s === void 0, d = {
368
+ kind: "field",
369
+ proto: e,
370
+ deprecated: (u = (a = e.options) === null || a === void 0 ? void 0 : a.deprecated) !== null && u !== void 0 ? u : !1,
371
+ name: e.name,
372
+ number: e.number,
373
+ scalar: void 0,
374
+ message: void 0,
375
+ enum: void 0,
376
+ presence: ue(e, t, l, n),
377
+ listKind: void 0,
378
+ mapKind: void 0,
379
+ mapKey: void 0,
380
+ delimitedEncoding: void 0,
381
+ packed: void 0,
382
+ longAsString: !1,
383
+ getDefaultValue: void 0
384
+ };
385
+ if (l) {
386
+ const c = n.kind == "file" ? n : n.file, N = n.kind == "file" ? void 0 : n, g = S(e, N, c);
387
+ d.kind = "extension", d.file = c, d.parent = N, d.oneof = void 0, d.typeName = g, d.jsonName = `[${g}]`, d.toString = () => `extension ${g}`;
388
+ const D = i.getMessage(p(e.extendee));
389
+ m(D, `invalid FieldDescriptorProto: extendee ${e.extendee} not found`), d.extendee = D;
390
+ } else {
391
+ const c = n;
392
+ m(c.kind == "message"), d.parent = c, d.oneof = t, d.localName = t ? T(e.name) : h(T(e.name)), d.jsonName = e.jsonName, d.toString = () => `field ${c.typeName}.${e.name}`;
393
+ }
394
+ const r = e.label, f = e.type, v = (o = e.options) === null || o === void 0 ? void 0 : o.jstype;
395
+ if (r === F) {
396
+ const c = f == E ? s?.get(p(e.typeName)) : void 0;
397
+ if (c) {
398
+ d.fieldKind = "map";
399
+ const { key: N, value: g } = re(c);
400
+ return d.mapKey = N.scalar, d.mapKind = g.fieldKind, d.message = g.message, d.delimitedEncoding = !1, d.enum = g.enum, d.scalar = g.scalar, d;
401
+ }
402
+ switch (d.fieldKind = "list", f) {
403
+ case E:
404
+ case b:
405
+ d.listKind = "message", d.message = i.getMessage(p(e.typeName)), m(d.message), d.delimitedEncoding = L(e, n);
406
+ break;
407
+ case M:
408
+ d.listKind = "enum", d.enum = i.getEnum(p(e.typeName)), m(d.enum);
409
+ break;
410
+ default:
411
+ d.listKind = "scalar", d.scalar = f, d.longAsString = v == I;
412
+ break;
413
+ }
414
+ return d.packed = le(e, n), d;
415
+ }
416
+ switch (f) {
417
+ case E:
418
+ case b:
419
+ d.fieldKind = "message", d.message = i.getMessage(p(e.typeName)), m(d.message, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), d.delimitedEncoding = L(e, n), d.getDefaultValue = () => {
420
+ };
421
+ break;
422
+ case M: {
423
+ const c = i.getEnum(p(e.typeName));
424
+ m(c !== void 0, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), d.fieldKind = "enum", d.enum = i.getEnum(p(e.typeName)), d.getDefaultValue = () => _(e, "defaultValue") ? O(c, e.defaultValue) : void 0;
425
+ break;
426
+ }
427
+ default: {
428
+ d.fieldKind = "scalar", d.scalar = f, d.longAsString = v == I, d.getDefaultValue = () => _(e, "defaultValue") ? j(f, e.defaultValue) : void 0;
429
+ break;
430
+ }
431
+ }
432
+ return d;
433
+ }
434
+ function ie(e) {
435
+ switch (e.syntax) {
436
+ case "":
437
+ case "proto2":
438
+ return B;
439
+ case "proto3":
440
+ return G;
441
+ case "editions":
442
+ if (e.edition in R)
443
+ return e.edition;
444
+ throw new Error(`${e.name}: unsupported edition`);
445
+ default:
446
+ throw new Error(`${e.name}: unsupported syntax "${e.syntax}"`);
447
+ }
448
+ }
449
+ function se(e, n) {
450
+ return e.dependency.map((i) => {
451
+ const t = n.getFile(i);
452
+ if (!t)
453
+ throw new Error(`Cannot find ${i}, imported by ${e.name}`);
454
+ return t;
455
+ });
456
+ }
457
+ function de(e, n) {
458
+ const i = ae(e) + "_";
459
+ for (const t of n) {
460
+ if (!t.name.toLowerCase().startsWith(i))
461
+ return;
462
+ const s = t.name.substring(i.length);
463
+ if (s.length == 0 || /^\d/.test(s))
464
+ return;
465
+ }
466
+ return i;
467
+ }
468
+ function ae(e) {
469
+ return (e.substring(0, 1) + e.substring(1).replace(/[A-Z]/g, (n) => "_" + n)).toLowerCase();
470
+ }
471
+ function S(e, n, i) {
472
+ let t;
473
+ return n ? t = `${n.typeName}.${e.name}` : i.proto.package.length > 0 ? t = `${i.proto.package}.${e.name}` : t = `${e.name}`, t;
474
+ }
475
+ function p(e) {
476
+ return e.startsWith(".") ? e.substring(1) : e;
477
+ }
478
+ function oe(e, n) {
479
+ if (!_(e, "oneofIndex") || e.proto3Optional)
480
+ return;
481
+ const i = n[e.oneofIndex];
482
+ return m(i, `invalid FieldDescriptorProto: oneof #${e.oneofIndex} for field #${e.number} not found`), i;
483
+ }
484
+ function ue(e, n, i, t) {
485
+ if (e.label == J)
486
+ return Z;
487
+ if (e.label == F)
488
+ return K;
489
+ if (n || e.proto3Optional || i)
490
+ return x;
491
+ const s = y("fieldPresence", { proto: e, parent: t });
492
+ return s == K && (e.type == E || e.type == b) ? x : s;
493
+ }
494
+ function le(e, n) {
495
+ if (e.label != F)
496
+ return !1;
497
+ switch (e.type) {
498
+ case W:
499
+ case Q:
500
+ case b:
501
+ case E:
502
+ return !1;
503
+ }
504
+ const i = e.options;
505
+ return i && _(i, "packed") ? i.packed : q == y("repeatedFieldEncoding", {
506
+ proto: e,
507
+ parent: n
508
+ });
509
+ }
510
+ function re(e) {
511
+ const n = e.fields.find((t) => t.number === 1), i = e.fields.find((t) => t.number === 2);
512
+ return m(n && n.fieldKind == "scalar" && n.scalar != k.BYTES && n.scalar != k.FLOAT && n.scalar != k.DOUBLE && i && i.fieldKind != "list" && i.fieldKind != "map"), { key: n, value: i };
513
+ }
514
+ function fe(e) {
515
+ var n;
516
+ return H == y("enumType", {
517
+ proto: e.proto,
518
+ parent: (n = e.parent) !== null && n !== void 0 ? n : e.file
519
+ });
520
+ }
521
+ function L(e, n) {
522
+ return e.type == b ? !0 : z == y("messageEncoding", {
523
+ proto: e,
524
+ parent: n
525
+ });
526
+ }
527
+ function y(e, n) {
528
+ var i, t;
529
+ const s = (i = n.proto.options) === null || i === void 0 ? void 0 : i.features;
530
+ if (s) {
531
+ const a = s[e];
532
+ if (a != 0)
533
+ return a;
534
+ }
535
+ if ("kind" in n) {
536
+ if (n.kind == "message")
537
+ return y(e, (t = n.parent) !== null && t !== void 0 ? t : n.file);
538
+ const a = R[n.edition];
539
+ if (!a)
540
+ throw new Error(`feature default for edition ${n.edition} not found`);
541
+ return a[e];
542
+ }
543
+ return y(e, n.parent);
544
+ }
545
+ function m(e, n) {
546
+ if (!e)
547
+ throw new Error(n);
548
+ }
549
+ export {
550
+ ye as createFileRegistry
551
+ };
@@ -0,0 +1,159 @@
1
+ import { reflect as p } from "./reflect/reflect.js";
2
+ import { BinaryWriter as E, WireType as s } from "./wire/binary-encoding.js";
3
+ import { ScalarType as c } from "./descriptors.js";
4
+ const I = 3, k = {
5
+ writeUnknownFields: !0
6
+ };
7
+ function g(e) {
8
+ return e ? Object.assign(Object.assign({}, k), e) : k;
9
+ }
10
+ function L(e, o, n) {
11
+ return b(new E(), g(n), p(e, o)).finish();
12
+ }
13
+ function b(e, o, n) {
14
+ var t;
15
+ for (const a of n.sortedFields) {
16
+ if (!n.isSet(a)) {
17
+ if (a.presence == I)
18
+ throw new Error(`cannot encode ${a} to binary: required field not set`);
19
+ continue;
20
+ }
21
+ T(e, o, n, a);
22
+ }
23
+ if (o.writeUnknownFields)
24
+ for (const { no: a, wireType: r, data: i } of (t = n.getUnknown()) !== null && t !== void 0 ? t : [])
25
+ e.tag(a, r).raw(i);
26
+ return e;
27
+ }
28
+ function T(e, o, n, t) {
29
+ var a;
30
+ switch (t.fieldKind) {
31
+ case "scalar":
32
+ case "enum":
33
+ m(e, n.desc.typeName, t.name, (a = t.scalar) !== null && a !== void 0 ? a : c.INT32, t.number, n.get(t));
34
+ break;
35
+ case "list":
36
+ y(e, o, t, n.get(t));
37
+ break;
38
+ case "message":
39
+ u(e, o, t, n.get(t));
40
+ break;
41
+ case "map":
42
+ for (const [r, i] of n.get(t))
43
+ D(e, o, t, r, i);
44
+ break;
45
+ }
46
+ }
47
+ function m(e, o, n, t, a, r) {
48
+ f(e.tag(a, F(t)), o, n, t, r);
49
+ }
50
+ function u(e, o, n, t) {
51
+ n.delimitedEncoding ? b(e.tag(n.number, s.StartGroup), o, t).tag(n.number, s.EndGroup) : b(e.tag(n.number, s.LengthDelimited).fork(), o, t).join();
52
+ }
53
+ function y(e, o, n, t) {
54
+ var a;
55
+ if (n.listKind == "message") {
56
+ for (const i of t)
57
+ u(e, o, n, i);
58
+ return;
59
+ }
60
+ const r = (a = n.scalar) !== null && a !== void 0 ? a : c.INT32;
61
+ if (n.packed) {
62
+ if (!t.size)
63
+ return;
64
+ e.tag(n.number, s.LengthDelimited).fork();
65
+ for (const i of t)
66
+ f(e, n.parent.typeName, n.name, r, i);
67
+ e.join();
68
+ return;
69
+ }
70
+ for (const i of t)
71
+ m(e, n.parent.typeName, n.name, r, n.number, i);
72
+ }
73
+ function D(e, o, n, t, a) {
74
+ var r;
75
+ switch (e.tag(n.number, s.LengthDelimited).fork(), m(e, n.parent.typeName, n.name, n.mapKey, 1, t), n.mapKind) {
76
+ case "scalar":
77
+ case "enum":
78
+ m(e, n.parent.typeName, n.name, (r = n.scalar) !== null && r !== void 0 ? r : c.INT32, 2, a);
79
+ break;
80
+ case "message":
81
+ b(e.tag(2, s.LengthDelimited).fork(), o, a).join();
82
+ break;
83
+ }
84
+ e.join();
85
+ }
86
+ function f(e, o, n, t, a) {
87
+ try {
88
+ switch (t) {
89
+ case c.STRING:
90
+ e.string(a);
91
+ break;
92
+ case c.BOOL:
93
+ e.bool(a);
94
+ break;
95
+ case c.DOUBLE:
96
+ e.double(a);
97
+ break;
98
+ case c.FLOAT:
99
+ e.float(a);
100
+ break;
101
+ case c.INT32:
102
+ e.int32(a);
103
+ break;
104
+ case c.INT64:
105
+ e.int64(a);
106
+ break;
107
+ case c.UINT64:
108
+ e.uint64(a);
109
+ break;
110
+ case c.FIXED64:
111
+ e.fixed64(a);
112
+ break;
113
+ case c.BYTES:
114
+ e.bytes(a);
115
+ break;
116
+ case c.FIXED32:
117
+ e.fixed32(a);
118
+ break;
119
+ case c.SFIXED32:
120
+ e.sfixed32(a);
121
+ break;
122
+ case c.SFIXED64:
123
+ e.sfixed64(a);
124
+ break;
125
+ case c.SINT64:
126
+ e.sint64(a);
127
+ break;
128
+ case c.UINT32:
129
+ e.uint32(a);
130
+ break;
131
+ case c.SINT32:
132
+ e.sint32(a);
133
+ break;
134
+ }
135
+ } catch (r) {
136
+ throw r instanceof Error ? new Error(`cannot encode field ${o}.${n} to binary: ${r.message}`) : r;
137
+ }
138
+ }
139
+ function F(e) {
140
+ switch (e) {
141
+ case c.BYTES:
142
+ case c.STRING:
143
+ return s.LengthDelimited;
144
+ case c.DOUBLE:
145
+ case c.FIXED64:
146
+ case c.SFIXED64:
147
+ return s.Bit64;
148
+ case c.FIXED32:
149
+ case c.SFIXED32:
150
+ case c.FLOAT:
151
+ return s.Bit32;
152
+ default:
153
+ return s.Varint;
154
+ }
155
+ }
156
+ export {
157
+ L as toBinary,
158
+ T as writeField
159
+ };