@outfoxx/sunday 1.1.0-beta.9 → 2.0.0-beta.1

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 (427) hide show
  1. package/README.md +2 -0
  2. package/build/date-time-types.d.ts +35 -0
  3. package/build/date-time-types.js +699 -0
  4. package/build/date-time-types.js.map +1 -0
  5. package/build/{esm/event-parser.d.ts → event-parser.d.ts} +1 -1
  6. package/build/{esm/event-parser.js → event-parser.js} +10 -12
  7. package/build/event-parser.js.map +1 -0
  8. package/build/{esm/fetch-event-source.d.ts → fetch-event-source.d.ts} +26 -18
  9. package/build/fetch-event-source.js +365 -0
  10. package/build/fetch-event-source.js.map +1 -0
  11. package/build/fetch-transport.d.ts +32 -0
  12. package/build/fetch-transport.js +311 -0
  13. package/build/fetch-transport.js.map +1 -0
  14. package/build/fetch.d.ts +9 -0
  15. package/build/fetch.js +140 -0
  16. package/build/fetch.js.map +1 -0
  17. package/build/{esnext/header-parameters.js → header-parameters.js} +31 -2
  18. package/build/header-parameters.js.map +1 -0
  19. package/build/index.d.ts +27 -0
  20. package/build/index.js +42 -0
  21. package/build/index.js.map +1 -0
  22. package/build/{main/logger.d.ts → logger.d.ts} +9 -0
  23. package/build/logger.js +36 -0
  24. package/build/logger.js.map +1 -0
  25. package/build/media-type-codecs/any-text-decoder.d.ts +7 -0
  26. package/build/{esm/media-type-codecs → media-type-codecs}/any-text-decoder.js +9 -9
  27. package/build/media-type-codecs/any-text-decoder.js.map +1 -0
  28. package/build/media-type-codecs/any-text-encoder.d.ts +6 -0
  29. package/build/{esm/media-type-codecs → media-type-codecs}/any-text-encoder.js +9 -5
  30. package/build/media-type-codecs/any-text-encoder.js.map +1 -0
  31. package/build/media-type-codecs/binary-decoder.d.ts +7 -0
  32. package/build/{esnext/media-type-codecs → media-type-codecs}/binary-decoder.js +13 -9
  33. package/build/media-type-codecs/binary-decoder.js.map +1 -0
  34. package/build/media-type-codecs/binary-encoder.d.ts +6 -0
  35. package/build/{esnext/media-type-codecs → media-type-codecs}/binary-encoder.js +12 -8
  36. package/build/media-type-codecs/binary-encoder.js.map +1 -0
  37. package/build/media-type-codecs/cbor-decoder.d.ts +13 -0
  38. package/build/media-type-codecs/cbor-decoder.js +38 -0
  39. package/build/media-type-codecs/cbor-decoder.js.map +1 -0
  40. package/build/media-type-codecs/cbor-encoder.d.ts +12 -0
  41. package/build/media-type-codecs/cbor-encoder.js +36 -0
  42. package/build/media-type-codecs/cbor-encoder.js.map +1 -0
  43. package/build/{esm/media-type-codecs → media-type-codecs}/cbor-tags.d.ts +2 -0
  44. package/build/{esnext/media-type-codecs → media-type-codecs}/cbor-tags.js +2 -0
  45. package/build/media-type-codecs/cbor-tags.js.map +1 -0
  46. package/build/media-type-codecs/default-policies.d.ts +3 -0
  47. package/build/media-type-codecs/default-policies.js +33 -0
  48. package/build/media-type-codecs/default-policies.js.map +1 -0
  49. package/build/media-type-codecs/json-decoder.d.ts +14 -0
  50. package/build/media-type-codecs/json-decoder.js +40 -0
  51. package/build/media-type-codecs/json-decoder.js.map +1 -0
  52. package/build/media-type-codecs/json-encoder.d.ts +13 -0
  53. package/build/media-type-codecs/json-encoder.js +43 -0
  54. package/build/media-type-codecs/json-encoder.js.map +1 -0
  55. package/build/media-type-codecs/media-type-decoder.d.ts +14 -0
  56. package/build/{esm/media-type-codecs → media-type-codecs}/media-type-decoder.js +1 -2
  57. package/build/media-type-codecs/media-type-decoder.js.map +1 -0
  58. package/build/{main/media-type-codecs → media-type-codecs}/media-type-decoders.d.ts +6 -8
  59. package/build/media-type-codecs/media-type-decoders.js +63 -0
  60. package/build/media-type-codecs/media-type-decoders.js.map +1 -0
  61. package/build/{main/media-type-codecs → media-type-codecs}/media-type-encoder.d.ts +3 -3
  62. package/build/{esnext/media-type-codecs → media-type-codecs}/media-type-encoder.js +2 -4
  63. package/build/media-type-codecs/media-type-encoder.js.map +1 -0
  64. package/build/{esnext/media-type-codecs → media-type-codecs}/media-type-encoders.d.ts +6 -8
  65. package/build/media-type-codecs/media-type-encoders.js +65 -0
  66. package/build/media-type-codecs/media-type-encoders.js.map +1 -0
  67. package/build/media-type-codecs/www-form-url-encoder.d.ts +31 -0
  68. package/build/media-type-codecs/www-form-url-encoder.js +281 -0
  69. package/build/media-type-codecs/www-form-url-encoder.js.map +1 -0
  70. package/build/{esm/media-type.js → media-type.js} +23 -23
  71. package/build/media-type.js.map +1 -0
  72. package/build/operation-response.d.ts +33 -0
  73. package/build/operation-response.js +140 -0
  74. package/build/operation-response.js.map +1 -0
  75. package/build/operation.d.ts +54 -0
  76. package/build/operation.js +87 -0
  77. package/build/operation.js.map +1 -0
  78. package/build/problem.d.ts +35 -0
  79. package/build/problem.js +122 -0
  80. package/build/problem.js.map +1 -0
  81. package/build/request-adapters.d.ts +23 -0
  82. package/build/request-adapters.js +53 -0
  83. package/build/request-adapters.js.map +1 -0
  84. package/build/schema-builtins.d.ts +21 -0
  85. package/build/schema-builtins.js +201 -0
  86. package/build/schema-builtins.js.map +1 -0
  87. package/build/schema-policy.d.ts +31 -0
  88. package/build/schema-policy.js +41 -0
  89. package/build/schema-policy.js.map +1 -0
  90. package/build/schema-runtime.d.ts +36 -0
  91. package/build/schema-runtime.js +77 -0
  92. package/build/schema-runtime.js.map +1 -0
  93. package/build/{esnext/sunday-error.d.ts → sunday-error.d.ts} +2 -3
  94. package/build/{esm/sunday-error.js → sunday-error.js} +9 -4
  95. package/build/sunday-error.js.map +1 -0
  96. package/build/transport.d.ts +39 -0
  97. package/build/{esnext/logger.js → transport.js} +1 -1
  98. package/build/transport.js.map +1 -0
  99. package/build/{esm/url-template.js → url-template.js} +5 -3
  100. package/build/url-template.js.map +1 -0
  101. package/build/util/async-iterables.d.ts +15 -0
  102. package/build/util/async-iterables.js +179 -0
  103. package/build/util/async-iterables.js.map +1 -0
  104. package/build/util/errors.js +65 -0
  105. package/build/util/errors.js.map +1 -0
  106. package/build/util/nullify.d.ts +5 -0
  107. package/build/util/nullify.js +37 -0
  108. package/build/util/nullify.js.map +1 -0
  109. package/build/util/numbers.d.ts +11 -0
  110. package/build/{esnext/util/temporal.js → util/numbers.js} +14 -4
  111. package/build/util/numbers.js.map +1 -0
  112. package/build/util/subscriptions.d.ts +16 -0
  113. package/build/util/subscriptions.js +78 -0
  114. package/build/util/subscriptions.js.map +1 -0
  115. package/build/{esm/util/any.js → util/unknowns.js} +2 -3
  116. package/build/util/unknowns.js.map +1 -0
  117. package/package.json +58 -58
  118. package/build/esm/any-type.d.ts +0 -4
  119. package/build/esm/any-type.js +0 -15
  120. package/build/esm/any-type.js.map +0 -1
  121. package/build/esm/class-type.d.ts +0 -2
  122. package/build/esm/class-type.js +0 -15
  123. package/build/esm/class-type.js.map +0 -1
  124. package/build/esm/date-time-types.d.ts +0 -2
  125. package/build/esm/date-time-types.js +0 -16
  126. package/build/esm/date-time-types.js.map +0 -1
  127. package/build/esm/event-parser.js.map +0 -1
  128. package/build/esm/fetch-event-source.js +0 -290
  129. package/build/esm/fetch-event-source.js.map +0 -1
  130. package/build/esm/fetch-request-factory.d.ts +0 -34
  131. package/build/esm/fetch-request-factory.js +0 -181
  132. package/build/esm/fetch-request-factory.js.map +0 -1
  133. package/build/esm/fetch.d.ts +0 -7
  134. package/build/esm/fetch.js +0 -90
  135. package/build/esm/fetch.js.map +0 -1
  136. package/build/esm/header-parameters.js +0 -53
  137. package/build/esm/header-parameters.js.map +0 -1
  138. package/build/esm/index.d.ts +0 -26
  139. package/build/esm/index.js +0 -40
  140. package/build/esm/index.js.map +0 -1
  141. package/build/esm/logger.d.ts +0 -8
  142. package/build/esm/logger.js +0 -15
  143. package/build/esm/logger.js.map +0 -1
  144. package/build/esm/media-type-codecs/any-text-decoder.d.ts +0 -7
  145. package/build/esm/media-type-codecs/any-text-decoder.js.map +0 -1
  146. package/build/esm/media-type-codecs/any-text-encoder.d.ts +0 -5
  147. package/build/esm/media-type-codecs/any-text-encoder.js.map +0 -1
  148. package/build/esm/media-type-codecs/binary-decoder.d.ts +0 -6
  149. package/build/esm/media-type-codecs/binary-decoder.js +0 -29
  150. package/build/esm/media-type-codecs/binary-decoder.js.map +0 -1
  151. package/build/esm/media-type-codecs/binary-encoder.d.ts +0 -5
  152. package/build/esm/media-type-codecs/binary-encoder.js +0 -26
  153. package/build/esm/media-type-codecs/binary-encoder.js.map +0 -1
  154. package/build/esm/media-type-codecs/cbor-decoder.d.ts +0 -39
  155. package/build/esm/media-type-codecs/cbor-decoder.js +0 -426
  156. package/build/esm/media-type-codecs/cbor-decoder.js.map +0 -1
  157. package/build/esm/media-type-codecs/cbor-encoder.d.ts +0 -43
  158. package/build/esm/media-type-codecs/cbor-encoder.js +0 -236
  159. package/build/esm/media-type-codecs/cbor-encoder.js.map +0 -1
  160. package/build/esm/media-type-codecs/cbor-tags.js +0 -18
  161. package/build/esm/media-type-codecs/cbor-tags.js.map +0 -1
  162. package/build/esm/media-type-codecs/json-decoder.d.ts +0 -39
  163. package/build/esm/media-type-codecs/json-decoder.js +0 -380
  164. package/build/esm/media-type-codecs/json-decoder.js.map +0 -1
  165. package/build/esm/media-type-codecs/json-encoder.d.ts +0 -44
  166. package/build/esm/media-type-codecs/json-encoder.js +0 -273
  167. package/build/esm/media-type-codecs/json-encoder.js.map +0 -1
  168. package/build/esm/media-type-codecs/media-type-decoder.d.ts +0 -11
  169. package/build/esm/media-type-codecs/media-type-decoder.js.map +0 -1
  170. package/build/esm/media-type-codecs/media-type-decoders.d.ts +0 -18
  171. package/build/esm/media-type-codecs/media-type-decoders.js +0 -58
  172. package/build/esm/media-type-codecs/media-type-decoders.js.map +0 -1
  173. package/build/esm/media-type-codecs/media-type-encoder.d.ts +0 -12
  174. package/build/esm/media-type-codecs/media-type-encoder.js +0 -24
  175. package/build/esm/media-type-codecs/media-type-encoder.js.map +0 -1
  176. package/build/esm/media-type-codecs/media-type-encoders.d.ts +0 -18
  177. package/build/esm/media-type-codecs/media-type-encoders.js +0 -60
  178. package/build/esm/media-type-codecs/media-type-encoders.js.map +0 -1
  179. package/build/esm/media-type-codecs/www-form-url-encoder.d.ts +0 -59
  180. package/build/esm/media-type-codecs/www-form-url-encoder.js +0 -192
  181. package/build/esm/media-type-codecs/www-form-url-encoder.js.map +0 -1
  182. package/build/esm/media-type.js.map +0 -1
  183. package/build/esm/problem.d.ts +0 -31
  184. package/build/esm/problem.js +0 -158
  185. package/build/esm/problem.js.map +0 -1
  186. package/build/esm/request-factory.d.ts +0 -44
  187. package/build/esm/request-factory.js +0 -15
  188. package/build/esm/request-factory.js.map +0 -1
  189. package/build/esm/result-response.d.ts +0 -4
  190. package/build/esm/result-response.js +0 -15
  191. package/build/esm/result-response.js.map +0 -1
  192. package/build/esm/sunday-error.d.ts +0 -11
  193. package/build/esm/sunday-error.js.map +0 -1
  194. package/build/esm/url-template.js.map +0 -1
  195. package/build/esm/util/any.js.map +0 -1
  196. package/build/esm/util/base64.d.ts +0 -5
  197. package/build/esm/util/base64.js +0 -77
  198. package/build/esm/util/base64.js.map +0 -1
  199. package/build/esm/util/error.js +0 -26
  200. package/build/esm/util/error.js.map +0 -1
  201. package/build/esm/util/hex.d.ts +0 -4
  202. package/build/esm/util/hex.js +0 -32
  203. package/build/esm/util/hex.js.map +0 -1
  204. package/build/esm/util/rxjs.d.ts +0 -5
  205. package/build/esm/util/rxjs.js +0 -31
  206. package/build/esm/util/rxjs.js.map +0 -1
  207. package/build/esm/util/stream-rxjs.d.ts +0 -2
  208. package/build/esm/util/stream-rxjs.js +0 -39
  209. package/build/esm/util/stream-rxjs.js.map +0 -1
  210. package/build/esm/util/temporal.d.ts +0 -2
  211. package/build/esm/util/temporal.js +0 -31
  212. package/build/esm/util/temporal.js.map +0 -1
  213. package/build/esnext/any-type.d.ts +0 -4
  214. package/build/esnext/any-type.js +0 -15
  215. package/build/esnext/any-type.js.map +0 -1
  216. package/build/esnext/class-type.d.ts +0 -2
  217. package/build/esnext/class-type.js +0 -15
  218. package/build/esnext/class-type.js.map +0 -1
  219. package/build/esnext/date-time-types.d.ts +0 -2
  220. package/build/esnext/date-time-types.js +0 -16
  221. package/build/esnext/date-time-types.js.map +0 -1
  222. package/build/esnext/event-parser.d.ts +0 -17
  223. package/build/esnext/event-parser.js +0 -153
  224. package/build/esnext/event-parser.js.map +0 -1
  225. package/build/esnext/fetch-event-source.d.ts +0 -58
  226. package/build/esnext/fetch-event-source.js +0 -290
  227. package/build/esnext/fetch-event-source.js.map +0 -1
  228. package/build/esnext/fetch-request-factory.d.ts +0 -34
  229. package/build/esnext/fetch-request-factory.js +0 -181
  230. package/build/esnext/fetch-request-factory.js.map +0 -1
  231. package/build/esnext/fetch.d.ts +0 -7
  232. package/build/esnext/fetch.js +0 -90
  233. package/build/esnext/fetch.js.map +0 -1
  234. package/build/esnext/header-parameters.d.ts +0 -3
  235. package/build/esnext/header-parameters.js.map +0 -1
  236. package/build/esnext/index.d.ts +0 -26
  237. package/build/esnext/index.js +0 -40
  238. package/build/esnext/index.js.map +0 -1
  239. package/build/esnext/logger.d.ts +0 -8
  240. package/build/esnext/logger.js.map +0 -1
  241. package/build/esnext/media-type-codecs/any-text-decoder.d.ts +0 -7
  242. package/build/esnext/media-type-codecs/any-text-decoder.js +0 -29
  243. package/build/esnext/media-type-codecs/any-text-decoder.js.map +0 -1
  244. package/build/esnext/media-type-codecs/any-text-encoder.d.ts +0 -5
  245. package/build/esnext/media-type-codecs/any-text-encoder.js +0 -23
  246. package/build/esnext/media-type-codecs/any-text-encoder.js.map +0 -1
  247. package/build/esnext/media-type-codecs/binary-decoder.d.ts +0 -6
  248. package/build/esnext/media-type-codecs/binary-decoder.js.map +0 -1
  249. package/build/esnext/media-type-codecs/binary-encoder.d.ts +0 -5
  250. package/build/esnext/media-type-codecs/binary-encoder.js.map +0 -1
  251. package/build/esnext/media-type-codecs/cbor-decoder.d.ts +0 -39
  252. package/build/esnext/media-type-codecs/cbor-decoder.js +0 -426
  253. package/build/esnext/media-type-codecs/cbor-decoder.js.map +0 -1
  254. package/build/esnext/media-type-codecs/cbor-encoder.d.ts +0 -43
  255. package/build/esnext/media-type-codecs/cbor-encoder.js +0 -236
  256. package/build/esnext/media-type-codecs/cbor-encoder.js.map +0 -1
  257. package/build/esnext/media-type-codecs/cbor-tags.d.ts +0 -4
  258. package/build/esnext/media-type-codecs/cbor-tags.js.map +0 -1
  259. package/build/esnext/media-type-codecs/json-decoder.d.ts +0 -39
  260. package/build/esnext/media-type-codecs/json-decoder.js +0 -380
  261. package/build/esnext/media-type-codecs/json-decoder.js.map +0 -1
  262. package/build/esnext/media-type-codecs/json-encoder.d.ts +0 -44
  263. package/build/esnext/media-type-codecs/json-encoder.js +0 -273
  264. package/build/esnext/media-type-codecs/json-encoder.js.map +0 -1
  265. package/build/esnext/media-type-codecs/media-type-decoder.d.ts +0 -11
  266. package/build/esnext/media-type-codecs/media-type-decoder.js +0 -19
  267. package/build/esnext/media-type-codecs/media-type-decoder.js.map +0 -1
  268. package/build/esnext/media-type-codecs/media-type-decoders.d.ts +0 -18
  269. package/build/esnext/media-type-codecs/media-type-decoders.js +0 -58
  270. package/build/esnext/media-type-codecs/media-type-decoders.js.map +0 -1
  271. package/build/esnext/media-type-codecs/media-type-encoder.d.ts +0 -12
  272. package/build/esnext/media-type-codecs/media-type-encoder.js.map +0 -1
  273. package/build/esnext/media-type-codecs/media-type-encoders.js +0 -60
  274. package/build/esnext/media-type-codecs/media-type-encoders.js.map +0 -1
  275. package/build/esnext/media-type-codecs/www-form-url-encoder.d.ts +0 -59
  276. package/build/esnext/media-type-codecs/www-form-url-encoder.js +0 -192
  277. package/build/esnext/media-type-codecs/www-form-url-encoder.js.map +0 -1
  278. package/build/esnext/media-type.d.ts +0 -94
  279. package/build/esnext/media-type.js +0 -305
  280. package/build/esnext/media-type.js.map +0 -1
  281. package/build/esnext/problem.d.ts +0 -31
  282. package/build/esnext/problem.js +0 -158
  283. package/build/esnext/problem.js.map +0 -1
  284. package/build/esnext/request-factory.d.ts +0 -44
  285. package/build/esnext/request-factory.js +0 -15
  286. package/build/esnext/request-factory.js.map +0 -1
  287. package/build/esnext/result-response.d.ts +0 -4
  288. package/build/esnext/result-response.js +0 -15
  289. package/build/esnext/result-response.js.map +0 -1
  290. package/build/esnext/sunday-error.js +0 -31
  291. package/build/esnext/sunday-error.js.map +0 -1
  292. package/build/esnext/url-template.d.ts +0 -6
  293. package/build/esnext/url-template.js +0 -31
  294. package/build/esnext/url-template.js.map +0 -1
  295. package/build/esnext/util/any.d.ts +0 -2
  296. package/build/esnext/util/any.js +0 -24
  297. package/build/esnext/util/any.js.map +0 -1
  298. package/build/esnext/util/base64.d.ts +0 -5
  299. package/build/esnext/util/base64.js +0 -77
  300. package/build/esnext/util/base64.js.map +0 -1
  301. package/build/esnext/util/error.d.ts +0 -2
  302. package/build/esnext/util/error.js +0 -26
  303. package/build/esnext/util/error.js.map +0 -1
  304. package/build/esnext/util/hex.d.ts +0 -4
  305. package/build/esnext/util/hex.js +0 -32
  306. package/build/esnext/util/hex.js.map +0 -1
  307. package/build/esnext/util/rxjs.d.ts +0 -5
  308. package/build/esnext/util/rxjs.js +0 -31
  309. package/build/esnext/util/rxjs.js.map +0 -1
  310. package/build/esnext/util/stream-rxjs.d.ts +0 -2
  311. package/build/esnext/util/stream-rxjs.js +0 -39
  312. package/build/esnext/util/stream-rxjs.js.map +0 -1
  313. package/build/esnext/util/temporal.d.ts +0 -2
  314. package/build/esnext/util/temporal.js.map +0 -1
  315. package/build/main/any-type.d.ts +0 -4
  316. package/build/main/any-type.js +0 -16
  317. package/build/main/any-type.js.map +0 -1
  318. package/build/main/class-type.d.ts +0 -2
  319. package/build/main/class-type.js +0 -16
  320. package/build/main/class-type.js.map +0 -1
  321. package/build/main/date-time-types.d.ts +0 -2
  322. package/build/main/date-time-types.js +0 -27
  323. package/build/main/date-time-types.js.map +0 -1
  324. package/build/main/event-parser.d.ts +0 -17
  325. package/build/main/event-parser.js +0 -157
  326. package/build/main/event-parser.js.map +0 -1
  327. package/build/main/fetch-event-source.d.ts +0 -58
  328. package/build/main/fetch-event-source.js +0 -294
  329. package/build/main/fetch-event-source.js.map +0 -1
  330. package/build/main/fetch-request-factory.d.ts +0 -34
  331. package/build/main/fetch-request-factory.js +0 -185
  332. package/build/main/fetch-request-factory.js.map +0 -1
  333. package/build/main/fetch.d.ts +0 -7
  334. package/build/main/fetch.js +0 -94
  335. package/build/main/fetch.js.map +0 -1
  336. package/build/main/header-parameters.d.ts +0 -3
  337. package/build/main/header-parameters.js +0 -56
  338. package/build/main/header-parameters.js.map +0 -1
  339. package/build/main/index.d.ts +0 -26
  340. package/build/main/index.js +0 -52
  341. package/build/main/index.js.map +0 -1
  342. package/build/main/logger.js +0 -16
  343. package/build/main/logger.js.map +0 -1
  344. package/build/main/media-type-codecs/any-text-decoder.d.ts +0 -7
  345. package/build/main/media-type-codecs/any-text-decoder.js +0 -33
  346. package/build/main/media-type-codecs/any-text-decoder.js.map +0 -1
  347. package/build/main/media-type-codecs/any-text-encoder.d.ts +0 -5
  348. package/build/main/media-type-codecs/any-text-encoder.js +0 -27
  349. package/build/main/media-type-codecs/any-text-encoder.js.map +0 -1
  350. package/build/main/media-type-codecs/binary-decoder.d.ts +0 -6
  351. package/build/main/media-type-codecs/binary-decoder.js +0 -33
  352. package/build/main/media-type-codecs/binary-decoder.js.map +0 -1
  353. package/build/main/media-type-codecs/binary-encoder.d.ts +0 -5
  354. package/build/main/media-type-codecs/binary-encoder.js +0 -30
  355. package/build/main/media-type-codecs/binary-encoder.js.map +0 -1
  356. package/build/main/media-type-codecs/cbor-decoder.d.ts +0 -39
  357. package/build/main/media-type-codecs/cbor-decoder.js +0 -430
  358. package/build/main/media-type-codecs/cbor-decoder.js.map +0 -1
  359. package/build/main/media-type-codecs/cbor-encoder.d.ts +0 -43
  360. package/build/main/media-type-codecs/cbor-encoder.js +0 -240
  361. package/build/main/media-type-codecs/cbor-encoder.js.map +0 -1
  362. package/build/main/media-type-codecs/cbor-tags.d.ts +0 -4
  363. package/build/main/media-type-codecs/cbor-tags.js +0 -21
  364. package/build/main/media-type-codecs/cbor-tags.js.map +0 -1
  365. package/build/main/media-type-codecs/json-decoder.d.ts +0 -39
  366. package/build/main/media-type-codecs/json-decoder.js +0 -384
  367. package/build/main/media-type-codecs/json-decoder.js.map +0 -1
  368. package/build/main/media-type-codecs/json-encoder.d.ts +0 -44
  369. package/build/main/media-type-codecs/json-encoder.js +0 -277
  370. package/build/main/media-type-codecs/json-encoder.js.map +0 -1
  371. package/build/main/media-type-codecs/media-type-decoder.d.ts +0 -11
  372. package/build/main/media-type-codecs/media-type-decoder.js +0 -23
  373. package/build/main/media-type-codecs/media-type-decoder.js.map +0 -1
  374. package/build/main/media-type-codecs/media-type-decoders.js +0 -62
  375. package/build/main/media-type-codecs/media-type-decoders.js.map +0 -1
  376. package/build/main/media-type-codecs/media-type-encoder.js +0 -29
  377. package/build/main/media-type-codecs/media-type-encoder.js.map +0 -1
  378. package/build/main/media-type-codecs/media-type-encoders.d.ts +0 -18
  379. package/build/main/media-type-codecs/media-type-encoders.js +0 -64
  380. package/build/main/media-type-codecs/media-type-encoders.js.map +0 -1
  381. package/build/main/media-type-codecs/www-form-url-encoder.d.ts +0 -59
  382. package/build/main/media-type-codecs/www-form-url-encoder.js +0 -196
  383. package/build/main/media-type-codecs/www-form-url-encoder.js.map +0 -1
  384. package/build/main/media-type.d.ts +0 -94
  385. package/build/main/media-type.js +0 -309
  386. package/build/main/media-type.js.map +0 -1
  387. package/build/main/problem.d.ts +0 -31
  388. package/build/main/problem.js +0 -161
  389. package/build/main/problem.js.map +0 -1
  390. package/build/main/request-factory.d.ts +0 -44
  391. package/build/main/request-factory.js +0 -16
  392. package/build/main/request-factory.js.map +0 -1
  393. package/build/main/result-response.d.ts +0 -4
  394. package/build/main/result-response.js +0 -16
  395. package/build/main/result-response.js.map +0 -1
  396. package/build/main/sunday-error.d.ts +0 -11
  397. package/build/main/sunday-error.js +0 -35
  398. package/build/main/sunday-error.js.map +0 -1
  399. package/build/main/url-template.d.ts +0 -6
  400. package/build/main/url-template.js +0 -35
  401. package/build/main/url-template.js.map +0 -1
  402. package/build/main/util/any.d.ts +0 -2
  403. package/build/main/util/any.js +0 -29
  404. package/build/main/util/any.js.map +0 -1
  405. package/build/main/util/base64.d.ts +0 -5
  406. package/build/main/util/base64.js +0 -80
  407. package/build/main/util/base64.js.map +0 -1
  408. package/build/main/util/error.d.ts +0 -2
  409. package/build/main/util/error.js +0 -31
  410. package/build/main/util/error.js.map +0 -1
  411. package/build/main/util/hex.d.ts +0 -4
  412. package/build/main/util/hex.js +0 -35
  413. package/build/main/util/hex.js.map +0 -1
  414. package/build/main/util/rxjs.d.ts +0 -5
  415. package/build/main/util/rxjs.js +0 -36
  416. package/build/main/util/rxjs.js.map +0 -1
  417. package/build/main/util/stream-rxjs.d.ts +0 -2
  418. package/build/main/util/stream-rxjs.js +0 -43
  419. package/build/main/util/stream-rxjs.js.map +0 -1
  420. package/build/main/util/temporal.d.ts +0 -2
  421. package/build/main/util/temporal.js +0 -36
  422. package/build/main/util/temporal.js.map +0 -1
  423. /package/build/{esm/header-parameters.d.ts → header-parameters.d.ts} +0 -0
  424. /package/build/{esm/media-type.d.ts → media-type.d.ts} +0 -0
  425. /package/build/{esm/url-template.d.ts → url-template.d.ts} +0 -0
  426. /package/build/{esm/util/error.d.ts → util/errors.d.ts} +0 -0
  427. /package/build/{esm/util/any.d.ts → util/unknowns.d.ts} +0 -0
@@ -1,158 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
- return c > 3 && r && Object.defineProperty(target, key, r), r;
19
- };
20
- var __metadata = (this && this.__metadata) || function (k, v) {
21
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
22
- };
23
- var Problem_1;
24
- import { ResponseExample } from './fetch';
25
- import { JsonAnyGetter, JsonAnySetter, JsonClassType, JsonCreator, JsonCreatorMode, JsonIgnore, JsonProperty, } from '@outfoxx/jackson-js';
26
- let Problem = Problem_1 = class Problem extends Error {
27
- constructor(spec) {
28
- var _a;
29
- super(`${spec.status.toString()} ${spec.type} - ${spec.title}`);
30
- const src = spec;
31
- const json = Object.assign({}, src);
32
- this.type = (_a = Problem_1.parseURL(json.type)) !== null && _a !== void 0 ? _a : new URL('about:blank');
33
- delete json.type;
34
- this.status = json.status;
35
- delete json.status;
36
- this.title = json.title;
37
- delete json.title;
38
- this.detail = json.detail;
39
- delete json.detail;
40
- this.instance = Problem_1.parseURL(json.instance);
41
- delete json.instance;
42
- if (Object.keys(json).length != 0) {
43
- this._parameters = json;
44
- }
45
- }
46
- get parameters() {
47
- return this._parameters;
48
- }
49
- setParameter(key, value) {
50
- var _a;
51
- this._parameters = (_a = this._parameters) !== null && _a !== void 0 ? _a : {};
52
- this._parameters[key] = value;
53
- }
54
- toString() {
55
- var _a, _b;
56
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
- const self = this;
58
- const url = self.request ? (_a = self.request) === null || _a === void 0 ? void 0 : _a.url : undefined;
59
- const response = (_b = self.response) === null || _b === void 0 ? void 0 : _b.example;
60
- return JSON.stringify({
61
- type: this.type,
62
- status: this.status,
63
- title: this.title,
64
- detail: this.detail,
65
- instance: this.instance,
66
- url,
67
- response,
68
- });
69
- }
70
- static fromStatus(status, title) {
71
- return new Problem_1({
72
- type: 'about:blank',
73
- title,
74
- status,
75
- });
76
- }
77
- static async fromResponse(response) {
78
- const [bodyExcerpt, body] = await ResponseExample.bodyExcerpt(response, 256);
79
- return new Problem_1({
80
- type: 'about:blank',
81
- title: response.statusText,
82
- status: response.status,
83
- request: {
84
- url: response.url,
85
- },
86
- response: {
87
- headers: response.headers,
88
- ok: response.ok,
89
- redirected: response.redirected,
90
- status: response.status,
91
- statusText: response.statusText,
92
- type: response.type,
93
- url: response.url,
94
- body,
95
- example: ResponseExample.build(response, bodyExcerpt),
96
- },
97
- });
98
- }
99
- static parseURL(value) {
100
- if (value == null) {
101
- return undefined;
102
- }
103
- if (value instanceof URL) {
104
- return value;
105
- }
106
- if (typeof value == 'string') {
107
- return new URL(value);
108
- }
109
- return new URL(`${value}`);
110
- }
111
- };
112
- __decorate([
113
- JsonProperty(),
114
- JsonClassType({ type: () => [URL] }),
115
- __metadata("design:type", URL)
116
- ], Problem.prototype, "type", void 0);
117
- __decorate([
118
- JsonProperty(),
119
- JsonClassType({ type: () => [String] }),
120
- __metadata("design:type", String)
121
- ], Problem.prototype, "title", void 0);
122
- __decorate([
123
- JsonProperty(),
124
- JsonClassType({ type: () => [Number] }),
125
- __metadata("design:type", Number)
126
- ], Problem.prototype, "status", void 0);
127
- __decorate([
128
- JsonProperty(),
129
- JsonClassType({ type: () => [String] }),
130
- __metadata("design:type", String)
131
- ], Problem.prototype, "detail", void 0);
132
- __decorate([
133
- JsonProperty(),
134
- JsonClassType({ type: () => [URL] }),
135
- __metadata("design:type", URL)
136
- ], Problem.prototype, "instance", void 0);
137
- __decorate([
138
- JsonIgnore(),
139
- __metadata("design:type", Object)
140
- ], Problem.prototype, "_parameters", void 0);
141
- __decorate([
142
- JsonClassType({ type: () => [Object] }),
143
- JsonAnyGetter(),
144
- __metadata("design:type", Object),
145
- __metadata("design:paramtypes", [])
146
- ], Problem.prototype, "parameters", null);
147
- __decorate([
148
- JsonAnySetter(),
149
- __metadata("design:type", Function),
150
- __metadata("design:paramtypes", [String, Object]),
151
- __metadata("design:returntype", void 0)
152
- ], Problem.prototype, "setParameter", null);
153
- Problem = Problem_1 = __decorate([
154
- JsonCreator({ mode: JsonCreatorMode.DELEGATING }),
155
- __metadata("design:paramtypes", [Object])
156
- ], Problem);
157
- export { Problem };
158
- //# sourceMappingURL=problem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"problem.js","sourceRoot":"","sources":["../../src/problem.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,WAAW,EACX,eAAe,EACf,UAAU,EACV,YAAY,GACb,MAAM,qBAAqB,CAAC;AAqB7B,IAAa,OAAO,eAApB,MAAa,OAAQ,SAAQ,KAAK;IAoChC,YAAY,IAAiB;;QAC3B,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAEhE,MAAM,GAAG,GAAG,IAA0C,CAAC;QAEvD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QAEpC,IAAI,CAAC,IAAI,GAAG,MAAA,SAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,mCAAI,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC,IAAI,CAAC;QAEjB,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AC,KAAK,CAAC,CAAC;SACvB;QACD,OAAO,IAAI,GAAG,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;CACF,CAAA;AA3HC;IAFC,YAAY,EAAE;IACd,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;8BACxB,GAAG;qCAAC;AAIjB;IAFC,YAAY,EAAE;IACd,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;sCACnB;AAIrB;IAFC,YAAY,EAAE;IACd,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;uCAClB;AAItB;IAFC,YAAY,EAAE;IACd,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;uCACjB;AAIvB;IAFC,YAAY,EAAE;IACd,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;8BACnB,GAAG;yCAAC;AAGtB;IADC,UAAU,EAAE;;4CACiC;AAI9C;IAFC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACvC,aAAa,EAAE;;;yCAGf;AAGD;IADC,aAAa,EAAE;;;;2CAIf;AAlCU,OAAO;IADnB,WAAW,CAAC,EAAE,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,CAAC;;GACrC,OAAO,CA8HnB;SA9HY,OAAO"}
@@ -1,44 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { AnyType } from './any-type';
3
- import { ClassType, ConstructableClassType } from './class-type';
4
- import { MediaType } from './media-type';
5
- import { TextMediaTypeDecoder } from './media-type-codecs/media-type-decoder';
6
- import { Problem } from './problem';
7
- import { ResultResponse } from './result-response';
8
- import { URLTemplate } from './url-template';
9
- import { Logger } from './logger';
10
- export interface RequestFactory {
11
- readonly baseUrl: URLTemplate;
12
- registerProblem(type: URL | string, problemType: ConstructableClassType<Problem>): void;
13
- request(requestSpec: RequestSpec<unknown>): Observable<Request>;
14
- response(request: Request, dataExpected?: boolean): Observable<Response>;
15
- response<B>(requestSpec: RequestSpec<B>, dataExpected?: boolean): Observable<Response>;
16
- resultResponse<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<R>]): Observable<ResultResponse<R>>;
17
- resultResponse<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<Array<unknown>>, ClassType<R>]): Observable<ResultResponse<Array<R>>>;
18
- resultResponse<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<Set<unknown>>, ClassType<R>]): Observable<ResultResponse<Set<R>>>;
19
- resultResponse<B, R>(requestSpec: RequestSpec<B>, resultType: AnyType): Observable<ResultResponse<R>>;
20
- resultResponse<B>(requestSpec: RequestSpec<B>): Observable<ResultResponse<void>>;
21
- result<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<R>]): Observable<R>;
22
- result<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<Array<unknown>>, ClassType<R>]): Observable<Array<R>>;
23
- result<B, R>(requestSpec: RequestSpec<B>, resultType: [ClassType<Set<unknown>>, ClassType<R>]): Observable<Set<R>>;
24
- result<B, R>(requestSpec: RequestSpec<B>, resultType: AnyType): Observable<R>;
25
- result<B>(requestSpec: RequestSpec<B>): Observable<void>;
26
- eventSource(requestSpec: RequestSpec<void>): ExtEventSource;
27
- eventStream<E>(requestSpec: RequestSpec<void>, decoder: (decoder: TextMediaTypeDecoder, event: string | undefined, id: string | undefined, data: string, logger?: Logger) => E | undefined): Observable<E>;
28
- }
29
- export interface ExtEventSource extends EventSource {
30
- connect(): void;
31
- }
32
- export declare type RequestMethod = 'GET' | 'PUT' | 'POST' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
33
- export interface RequestSpec<B> {
34
- method: RequestMethod;
35
- pathTemplate: string;
36
- pathParameters?: Record<string, unknown>;
37
- queryParameters?: Record<string, unknown>;
38
- body?: B;
39
- bodyType?: AnyType;
40
- contentTypes?: MediaType[];
41
- acceptTypes?: MediaType[];
42
- headers?: Record<string, unknown>;
43
- }
44
- export declare type RequestAdapter = (request: Request) => Observable<Request>;
@@ -1,15 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- export {};
15
- //# sourceMappingURL=request-factory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request-factory.js","sourceRoot":"","sources":["../../src/request-factory.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
@@ -1,4 +0,0 @@
1
- export interface ResultResponse<R> {
2
- readonly result: R;
3
- readonly response: Response;
4
- }
@@ -1,15 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- export {};
15
- //# sourceMappingURL=result-response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"result-response.js","sourceRoot":"","sources":["../../src/result-response.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
@@ -1,31 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- import { ResponseExample } from './fetch';
15
- export class SundayError extends Error {
16
- constructor(message, url, httpVersion, status, statusText, headers, body, responseExample) {
17
- super(message);
18
- this.url = url;
19
- this.httpVersion = httpVersion;
20
- this.status = status;
21
- this.statusText = statusText;
22
- this.headers = headers;
23
- this.body = body;
24
- this.responseExample = responseExample;
25
- }
26
- static async fromResponse(message, response) {
27
- const [bodyExcerpt, body] = await ResponseExample.bodyExcerpt(response, 256);
28
- return new SundayError(message, response.url, '?.?', response.status, response.statusText, response.headers, body, ResponseExample.build(response, bodyExcerpt));
29
- }
30
- }
31
- //# sourceMappingURL=sunday-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sunday-error.js","sourceRoot":"","sources":["../../src/sunday-error.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpC,YACE,OAAe,EACR,GAAW,EACX,WAAmB,EACnB,MAAc,EACd,UAAkB,EAClB,OAAgB,EAChB,IAAyB,EACzB,eAAuB;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAC;QARR,QAAG,GAAH,GAAG,CAAQ;QACX,gBAAW,GAAX,WAAW,CAAQ;QACnB,WAAM,GAAN,MAAM,CAAQ;QACd,eAAU,GAAV,UAAU,CAAQ;QAClB,YAAO,GAAP,OAAO,CAAS;QAChB,SAAI,GAAJ,IAAI,CAAqB;QACzB,oBAAe,GAAf,eAAe,CAAQ;IAGhC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,YAAY,CACvB,OAAe,EACf,QAAkB;QAElB,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,MAAM,eAAe,CAAC,WAAW,CAC3D,QAAQ,EACR,GAAG,CACJ,CAAC;QAEF,OAAO,IAAI,WAAW,CACpB,OAAO,EACP,QAAQ,CAAC,GAAG,EACZ,KAAK,EACL,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,UAAU,EACnB,QAAQ,CAAC,OAAO,EAChB,IAAI,EACJ,eAAe,CAAC,KAAK,CAAC,QAAQ,EAAE,WAAW,CAAC,CAC7C,CAAC;IACJ,CAAC;CACF"}
@@ -1,6 +0,0 @@
1
- export declare class URLTemplate {
2
- template: string;
3
- parameters: Record<string, unknown>;
4
- constructor(template: string, parameters?: Record<string, unknown>);
5
- complete(relativeTemplate: string, parameters: Record<string, unknown>): URL;
6
- }
@@ -1,31 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- import { URI } from 'uri-template-lite';
15
- export class URLTemplate {
16
- constructor(template, parameters = {}) {
17
- this.template = template;
18
- this.parameters = parameters;
19
- }
20
- complete(relativeTemplate, parameters) {
21
- const allParameters = Object.assign({}, this.parameters, parameters);
22
- const baseTempl = this.template.endsWith('/')
23
- ? this.template.slice(0, -1)
24
- : this.template;
25
- const relTempl = relativeTemplate.startsWith('/') || !relativeTemplate.length
26
- ? relativeTemplate
27
- : `/${relativeTemplate}`;
28
- return new URL(URI.expand(baseTempl + relTempl, allParameters));
29
- }
30
- }
31
- //# sourceMappingURL=url-template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"url-template.js","sourceRoot":"","sources":["../../src/url-template.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,MAAM,OAAO,WAAW;IACtB,YACS,QAAgB,EAChB,aAAsC,EAAE;QADxC,aAAQ,GAAR,QAAQ,CAAQ;QAChB,eAAU,GAAV,UAAU,CAA8B;IAC9C,CAAC;IAEJ,QAAQ,CAAC,gBAAwB,EAAE,UAAmC;QACpE,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACrE,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;YAC3C,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC5B,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;QAClB,MAAM,QAAQ,GACZ,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM;YAC1D,CAAC,CAAC,gBAAgB;YAClB,CAAC,CAAC,IAAI,gBAAgB,EAAE,CAAC;QAE7B,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IAClE,CAAC;CACF"}
@@ -1,2 +0,0 @@
1
- export declare function unknownGet<T = unknown>(obj: unknown, key: string): T;
2
- export declare function unknownSet<T>(obj: unknown, key: string, value: T): void;
@@ -1,24 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- export function unknownGet(obj, key) {
15
- var _a;
16
- return (_a = obj) === null || _a === void 0 ? void 0 : _a[key];
17
- }
18
- export function unknownSet(obj, key, value) {
19
- if (obj == null) {
20
- return;
21
- }
22
- obj[key] = value;
23
- }
24
- //# sourceMappingURL=any.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"any.js","sourceRoot":"","sources":["../../../src/util/any.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,MAAM,UAAU,UAAU,CAAc,GAAY,EAAE,GAAW;;IAC/D,OAAO,MAAC,GAA+B,0CAAG,GAAG,CAAM,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,UAAU,CAAI,GAAY,EAAE,GAAW,EAAE,KAAQ;IAC/D,IAAI,GAAG,IAAI,IAAI,EAAE;QACf,OAAO;KACR;IACA,GAA+B,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChD,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare namespace Base64 {
2
- function encode(buffer: ArrayBufferLike): string;
3
- function encodeSlice(buffer: ArrayBufferLike, offset: number, length: number): string;
4
- function decode(base64: string): ArrayBuffer;
5
- }
@@ -1,77 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
15
- /* tslint:disable:no-bitwise */
16
- // Use a lookup table to find the index.
17
- const lookup = new Uint8Array(256);
18
- for (let i = 0; i < chars.length; i++) {
19
- lookup[chars.charCodeAt(i)] = i;
20
- }
21
- export var Base64;
22
- (function (Base64) {
23
- function encode(buffer) {
24
- return encodeSlice(buffer, 0, buffer.byteLength);
25
- }
26
- Base64.encode = encode;
27
- function encodeSlice(buffer, offset, length) {
28
- const bytes = new Uint8Array(buffer, offset, length);
29
- const len = bytes.length;
30
- let base64 = '';
31
- for (let i = 0; i < len; i += 3) {
32
- base64 += chars[bytes[i] >> 2];
33
- base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
34
- base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
35
- base64 += chars[bytes[i + 2] & 63];
36
- }
37
- if (len % 3 === 2) {
38
- base64 = base64.substring(0, base64.length - 1) + '=';
39
- }
40
- else if (len % 3 === 1) {
41
- base64 = base64.substring(0, base64.length - 2) + '==';
42
- }
43
- return base64;
44
- }
45
- Base64.encodeSlice = encodeSlice;
46
- function decode(base64) {
47
- base64 = base64.replace(/[ \n]+/g, '');
48
- const length = base64.length;
49
- let bufferLength = Math.floor(length * 0.75);
50
- let i;
51
- let p = 0;
52
- let encoded1;
53
- let encoded2;
54
- let encoded3;
55
- let encoded4;
56
- if (base64[length - 1] === '=') {
57
- bufferLength--;
58
- if (base64[length - 2] === '=') {
59
- bufferLength--;
60
- }
61
- }
62
- const arrayBuffer = new ArrayBuffer(bufferLength);
63
- const bytes = new Uint8Array(arrayBuffer);
64
- for (i = 0; i < length; i += 4) {
65
- encoded1 = lookup[base64.charCodeAt(i)];
66
- encoded2 = lookup[base64.charCodeAt(i + 1)];
67
- encoded3 = lookup[base64.charCodeAt(i + 2)];
68
- encoded4 = lookup[base64.charCodeAt(i + 3)];
69
- bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
70
- bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
71
- bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
72
- }
73
- return arrayBuffer;
74
- }
75
- Base64.decode = decode;
76
- })(Base64 || (Base64 = {}));
77
- //# sourceMappingURL=base64.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../src/util/base64.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACp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AAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;QAE1C,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;YAC9B,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACxC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC5C,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC5C,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAE5C,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;YAC/C,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;YACtD,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;SACtD;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAlCe,aAAM,SAkCrB,CAAA;AACH,CAAC,EAjEgB,MAAM,KAAN,MAAM,QAiEtB"}
@@ -1,2 +0,0 @@
1
- export declare function isError(value: unknown): value is Error;
2
- export declare function errorToMessage(value: unknown, defMsg?: string): string;
@@ -1,26 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- export function isError(value) {
15
- return value instanceof Error;
16
- }
17
- export function errorToMessage(value, defMsg) {
18
- return isError(value) ? value.message : defMsg !== null && defMsg !== void 0 ? defMsg : `${fmtMsg(value)}`;
19
- }
20
- function fmtMsg(value) {
21
- if (value instanceof Object) {
22
- return JSON.stringify(value);
23
- }
24
- return `${value}`;
25
- }
26
- //# sourceMappingURL=error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/util/error.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,MAAM,UAAU,OAAO,CAAC,KAAc;IACpC,OAAO,KAAK,YAAY,KAAK,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,MAAe;IAC5D,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACvE,CAAC;AAED,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,KAAK,YAAY,MAAM,EAAE;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;KAC9B;IACD,OAAO,GAAG,KAAK,EAAE,CAAC;AACpB,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare namespace Hex {
2
- function decode(hex: string): ArrayBuffer;
3
- function encode(buffer: ArrayBuffer, separator?: string): string;
4
- }
@@ -1,32 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- export var Hex;
15
- (function (Hex) {
16
- function decode(hex) {
17
- hex = hex.replace(/^0x/, '').replace(/\s/g, '');
18
- const values = hex.match(/[\da-f]{2}/gi);
19
- if (!values || values.length != hex.length / 2) {
20
- throw Error(`Invalid hex string`);
21
- }
22
- return new Uint8Array(values.map((b) => parseInt(b, 16))).buffer;
23
- }
24
- Hex.decode = decode;
25
- function encode(buffer, separator = '') {
26
- return Array.from(new Uint8Array(buffer))
27
- .map((value) => value.toString(16).padStart(2, '0'))
28
- .join(separator);
29
- }
30
- Hex.encode = encode;
31
- })(Hex || (Hex = {}));
32
- //# sourceMappingURL=hex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hex.js","sourceRoot":"","sources":["../../../src/util/hex.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,MAAM,KAAW,GAAG,CAenB;AAfD,WAAiB,GAAG;IAClB,SAAgB,MAAM,CAAC,GAAW;QAChC,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9C,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;SACnC;QACD,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACnE,CAAC;IAPe,UAAM,SAOrB,CAAA;IAED,SAAgB,MAAM,CAAC,MAAmB,EAAE,SAAS,GAAG,EAAE;QACxD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;aACtC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;aACnD,IAAI,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC;IAJe,UAAM,SAIrB,CAAA;AACH,CAAC,EAfgB,GAAG,KAAH,GAAG,QAenB"}
@@ -1,5 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { ClassType } from '../class-type';
3
- import { Problem } from '../problem';
4
- export declare function nullifyNotFound<T>(): (source: Observable<T>) => Observable<T | null>;
5
- export declare function nullifyResponse<T>(statuses: number[], problemTypes: ClassType<Problem>[]): (source: Observable<T>) => Observable<T | null>;
@@ -1,31 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- import { catchError, from, throwError } from 'rxjs';
15
- import { Problem } from '../problem';
16
- export function nullifyNotFound() {
17
- return nullifyResponse([404], []);
18
- }
19
- export function nullifyResponse(statuses, problemTypes) {
20
- return function (source) {
21
- return source.pipe(catchError((error) => {
22
- const errorType = error.constructor;
23
- if (error instanceof Problem &&
24
- (statuses.includes(error.status) || problemTypes.includes(errorType))) {
25
- return from([null]);
26
- }
27
- return throwError(() => error);
28
- }));
29
- };
30
- }
31
- //# sourceMappingURL=rxjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rxjs.js","sourceRoot":"","sources":["../../../src/util/rxjs.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAc,UAAU,EAAE,MAAM,MAAM,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,UAAU,eAAe;IAG7B,OAAO,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,QAAkB,EAClB,YAAkC;IAElC,OAAO,UAAa,MAAqB;QACvC,OAAO,MAAM,CAAC,IAAI,CAChB,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE;YACnB,MAAM,SAAS,GAAG,KAAK,CAAC,WAAiC,CAAC;YAC1D,IACE,KAAK,YAAY,OAAO;gBACxB,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EACrE;gBACA,OAAO,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;aACrB;YACD,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- export declare function fromStream(stream: ReadableStream<Uint8Array>): Observable<ArrayBuffer>;
@@ -1,39 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- import { Observable } from 'rxjs';
15
- export function fromStream(stream) {
16
- return new Observable((subscriber) => {
17
- let reader;
18
- (async function readLoop() {
19
- try {
20
- reader = stream.getReader();
21
- while (true) {
22
- const { done, value } = await reader.read();
23
- if (value !== undefined) {
24
- subscriber.next(value);
25
- }
26
- if (done) {
27
- subscriber.complete();
28
- return;
29
- }
30
- }
31
- }
32
- catch (e) {
33
- subscriber.error(e);
34
- }
35
- })();
36
- return () => reader === null || reader === void 0 ? void 0 : reader.cancel();
37
- });
38
- }
39
- //# sourceMappingURL=stream-rxjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream-rxjs.js","sourceRoot":"","sources":["../../../src/util/stream-rxjs.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,UAAU,UAAU,CACxB,MAAkC;IAElC,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QACnC,IAAI,MAA+C,CAAC;QACpD,CAAC,KAAK,UAAU,QAAQ;YACtB,IAAI;gBACF,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;gBAC5B,OAAO,IAAI,EAAE;oBACX,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;oBAC5C,IAAI,KAAK,KAAK,SAAS,EAAE;wBACvB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;qBACxB;oBAED,IAAI,IAAI,EAAE;wBACR,UAAU,CAAC,QAAQ,EAAE,CAAC;wBACtB,OAAO;qBACR;iBACF;aACF;YAAC,OAAO,CAAC,EAAE;gBACV,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;aACrB;QACH,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,GAAG,EAAE,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC"}