@atxp/client 0.10.4 → 0.10.6

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 (315) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index11.js +2 -2
  3. package/dist/_virtual/index18.js +2 -2
  4. package/dist/_virtual/index19.js +2 -2
  5. package/dist/_virtual/index20.js +2 -2
  6. package/dist/_virtual/index4.js +2 -2
  7. package/dist/_virtual/index5.js +2 -2
  8. package/dist/_virtual/index8.js +2 -2
  9. package/dist/_virtual/index9.js +2 -2
  10. package/dist/atxpFetcher.d.ts.map +1 -1
  11. package/dist/atxpFetcher.js +16 -1
  12. package/dist/atxpFetcher.js.map +1 -1
  13. package/dist/index.cjs +23 -2
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.ts +3 -1
  16. package/dist/index.js +23 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js +1 -1
  19. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/index.js +1 -1
  20. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
  21. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
  22. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
  23. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
  24. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
  25. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
  26. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
  27. package/dist/oAuth.d.ts +3 -1
  28. package/dist/oAuth.d.ts.map +1 -1
  29. package/dist/oAuth.js +7 -1
  30. package/dist/oAuth.js.map +1 -1
  31. package/package.json +2 -2
  32. package/dist/_virtual/cache.js +0 -4
  33. package/dist/_virtual/cache.js.map +0 -1
  34. package/dist/_virtual/uri.all.js +0 -4
  35. package/dist/_virtual/uri.all.js.map +0 -1
  36. package/dist/atxpAccount.d.ts +0 -20
  37. package/dist/atxpAccount.d.ts.map +0 -1
  38. package/dist/atxpAccount.js +0 -161
  39. package/dist/atxpAccount.js.map +0 -1
  40. package/dist/base.cjs +0 -34
  41. package/dist/base.cjs.map +0 -1
  42. package/dist/base.d.ts +0 -4
  43. package/dist/base.d.ts.map +0 -1
  44. package/dist/base.js +0 -5
  45. package/dist/base.js.map +0 -1
  46. package/dist/baseAccount.d.ts +0 -20
  47. package/dist/baseAccount.d.ts.map +0 -1
  48. package/dist/baseAccount.js +0 -47
  49. package/dist/baseAccount.js.map +0 -1
  50. package/dist/baseConstants.d.ts +0 -10
  51. package/dist/baseConstants.d.ts.map +0 -1
  52. package/dist/baseConstants.js +0 -21
  53. package/dist/baseConstants.js.map +0 -1
  54. package/dist/basePaymentMaker.d.ts +0 -23
  55. package/dist/basePaymentMaker.d.ts.map +0 -1
  56. package/dist/basePaymentMaker.js +0 -169
  57. package/dist/basePaymentMaker.js.map +0 -1
  58. package/dist/node_modules/ajv/dist/ajv.js +0 -71
  59. package/dist/node_modules/ajv/dist/ajv.js.map +0 -1
  60. package/dist/node_modules/ajv/dist/compile/codegen/code.js +0 -169
  61. package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +0 -1
  62. package/dist/node_modules/ajv/dist/compile/codegen/index.js +0 -712
  63. package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +0 -1
  64. package/dist/node_modules/ajv/dist/compile/codegen/scope.js +0 -157
  65. package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +0 -1
  66. package/dist/node_modules/ajv/dist/compile/errors.js +0 -139
  67. package/dist/node_modules/ajv/dist/compile/errors.js.map +0 -1
  68. package/dist/node_modules/ajv/dist/compile/index.js +0 -259
  69. package/dist/node_modules/ajv/dist/compile/index.js.map +0 -1
  70. package/dist/node_modules/ajv/dist/compile/names.js +0 -40
  71. package/dist/node_modules/ajv/dist/compile/names.js.map +0 -1
  72. package/dist/node_modules/ajv/dist/compile/ref_error.js +0 -24
  73. package/dist/node_modules/ajv/dist/compile/ref_error.js.map +0 -1
  74. package/dist/node_modules/ajv/dist/compile/resolve.js +0 -169
  75. package/dist/node_modules/ajv/dist/compile/resolve.js.map +0 -1
  76. package/dist/node_modules/ajv/dist/compile/rules.js +0 -37
  77. package/dist/node_modules/ajv/dist/compile/rules.js.map +0 -1
  78. package/dist/node_modules/ajv/dist/compile/util.js +0 -191
  79. package/dist/node_modules/ajv/dist/compile/util.js.map +0 -1
  80. package/dist/node_modules/ajv/dist/compile/validate/applicability.js +0 -30
  81. package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +0 -1
  82. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -64
  83. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +0 -1
  84. package/dist/node_modules/ajv/dist/compile/validate/dataType.js +0 -219
  85. package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +0 -1
  86. package/dist/node_modules/ajv/dist/compile/validate/defaults.js +0 -48
  87. package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +0 -1
  88. package/dist/node_modules/ajv/dist/compile/validate/index.js +0 -541
  89. package/dist/node_modules/ajv/dist/compile/validate/index.js.map +0 -1
  90. package/dist/node_modules/ajv/dist/compile/validate/keyword.js +0 -139
  91. package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +0 -1
  92. package/dist/node_modules/ajv/dist/compile/validate/subschema.js +0 -94
  93. package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +0 -1
  94. package/dist/node_modules/ajv/dist/core.js +0 -642
  95. package/dist/node_modules/ajv/dist/core.js.map +0 -1
  96. package/dist/node_modules/ajv/dist/refs/data.json.js +0 -31
  97. package/dist/node_modules/ajv/dist/refs/data.json.js.map +0 -1
  98. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +0 -254
  99. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +0 -1
  100. package/dist/node_modules/ajv/dist/runtime/equal.js +0 -19
  101. package/dist/node_modules/ajv/dist/runtime/equal.js.map +0 -1
  102. package/dist/node_modules/ajv/dist/runtime/ucs2length.js +0 -35
  103. package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +0 -1
  104. package/dist/node_modules/ajv/dist/runtime/uri.js +0 -18
  105. package/dist/node_modules/ajv/dist/runtime/uri.js.map +0 -1
  106. package/dist/node_modules/ajv/dist/runtime/validation_error.js +0 -22
  107. package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +0 -1
  108. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -62
  109. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +0 -1
  110. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -121
  111. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +0 -1
  112. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -35
  113. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +0 -1
  114. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -24
  115. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +0 -1
  116. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -108
  117. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +0 -1
  118. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -101
  119. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +0 -1
  120. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -79
  121. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +0 -1
  122. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -71
  123. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +0 -1
  124. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -66
  125. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +0 -1
  126. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -45
  127. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +0 -1
  128. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -38
  129. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +0 -1
  130. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -73
  131. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +0 -1
  132. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -89
  133. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +0 -1
  134. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -24
  135. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +0 -1
  136. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -69
  137. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +0 -1
  138. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -51
  139. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +0 -1
  140. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -25
  141. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +0 -1
  142. package/dist/node_modules/ajv/dist/vocabularies/code.js +0 -145
  143. package/dist/node_modules/ajv/dist/vocabularies/code.js.map +0 -1
  144. package/dist/node_modules/ajv/dist/vocabularies/core/id.js +0 -21
  145. package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +0 -1
  146. package/dist/node_modules/ajv/dist/vocabularies/core/index.js +0 -29
  147. package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +0 -1
  148. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +0 -139
  149. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +0 -1
  150. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -120
  151. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +0 -1
  152. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -20
  153. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +0 -1
  154. package/dist/node_modules/ajv/dist/vocabularies/draft7.js +0 -33
  155. package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +0 -1
  156. package/dist/node_modules/ajv/dist/vocabularies/format/format.js +0 -104
  157. package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +0 -1
  158. package/dist/node_modules/ajv/dist/vocabularies/format/index.js +0 -18
  159. package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +0 -1
  160. package/dist/node_modules/ajv/dist/vocabularies/metadata.js +0 -29
  161. package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +0 -1
  162. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +0 -39
  163. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +0 -1
  164. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -62
  165. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +0 -1
  166. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +0 -54
  167. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +0 -1
  168. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -36
  169. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +0 -1
  170. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -41
  171. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +0 -1
  172. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -39
  173. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +0 -1
  174. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -36
  175. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +0 -1
  176. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -38
  177. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +0 -1
  178. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -37
  179. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +0 -1
  180. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +0 -93
  181. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +0 -1
  182. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -79
  183. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +0 -1
  184. package/dist/node_modules/ajv/lib/ajv.js +0 -531
  185. package/dist/node_modules/ajv/lib/ajv.js.map +0 -1
  186. package/dist/node_modules/ajv/lib/cache.js +0 -37
  187. package/dist/node_modules/ajv/lib/cache.js.map +0 -1
  188. package/dist/node_modules/ajv/lib/compile/async.js +0 -102
  189. package/dist/node_modules/ajv/lib/compile/async.js.map +0 -1
  190. package/dist/node_modules/ajv/lib/compile/error_classes.js +0 -46
  191. package/dist/node_modules/ajv/lib/compile/error_classes.js.map +0 -1
  192. package/dist/node_modules/ajv/lib/compile/formats.js +0 -154
  193. package/dist/node_modules/ajv/lib/compile/formats.js.map +0 -1
  194. package/dist/node_modules/ajv/lib/compile/index.js +0 -404
  195. package/dist/node_modules/ajv/lib/compile/index.js.map +0 -1
  196. package/dist/node_modules/ajv/lib/compile/resolve.js +0 -286
  197. package/dist/node_modules/ajv/lib/compile/resolve.js.map +0 -1
  198. package/dist/node_modules/ajv/lib/compile/rules.js +0 -79
  199. package/dist/node_modules/ajv/lib/compile/rules.js.map +0 -1
  200. package/dist/node_modules/ajv/lib/compile/schema_obj.js +0 -21
  201. package/dist/node_modules/ajv/lib/compile/schema_obj.js.map +0 -1
  202. package/dist/node_modules/ajv/lib/compile/ucs2length.js +0 -30
  203. package/dist/node_modules/ajv/lib/compile/ucs2length.js.map +0 -1
  204. package/dist/node_modules/ajv/lib/compile/util.js +0 -252
  205. package/dist/node_modules/ajv/lib/compile/util.js.map +0 -1
  206. package/dist/node_modules/ajv/lib/data.js +0 -59
  207. package/dist/node_modules/ajv/lib/data.js.map +0 -1
  208. package/dist/node_modules/ajv/lib/definition_schema.js +0 -49
  209. package/dist/node_modules/ajv/lib/definition_schema.js.map +0 -1
  210. package/dist/node_modules/ajv/lib/dotjs/_limit.js +0 -173
  211. package/dist/node_modules/ajv/lib/dotjs/_limit.js.map +0 -1
  212. package/dist/node_modules/ajv/lib/dotjs/_limitItems.js +0 -90
  213. package/dist/node_modules/ajv/lib/dotjs/_limitItems.js.map +0 -1
  214. package/dist/node_modules/ajv/lib/dotjs/_limitLength.js +0 -95
  215. package/dist/node_modules/ajv/lib/dotjs/_limitLength.js.map +0 -1
  216. package/dist/node_modules/ajv/lib/dotjs/_limitProperties.js +0 -90
  217. package/dist/node_modules/ajv/lib/dotjs/_limitProperties.js.map +0 -1
  218. package/dist/node_modules/ajv/lib/dotjs/allOf.js +0 -52
  219. package/dist/node_modules/ajv/lib/dotjs/allOf.js.map +0 -1
  220. package/dist/node_modules/ajv/lib/dotjs/anyOf.js +0 -83
  221. package/dist/node_modules/ajv/lib/dotjs/anyOf.js.map +0 -1
  222. package/dist/node_modules/ajv/lib/dotjs/comment.js +0 -24
  223. package/dist/node_modules/ajv/lib/dotjs/comment.js.map +0 -1
  224. package/dist/node_modules/ajv/lib/dotjs/const.js +0 -62
  225. package/dist/node_modules/ajv/lib/dotjs/const.js.map +0 -1
  226. package/dist/node_modules/ajv/lib/dotjs/contains.js +0 -91
  227. package/dist/node_modules/ajv/lib/dotjs/contains.js.map +0 -1
  228. package/dist/node_modules/ajv/lib/dotjs/custom.js +0 -238
  229. package/dist/node_modules/ajv/lib/dotjs/custom.js.map +0 -1
  230. package/dist/node_modules/ajv/lib/dotjs/dependencies.js +0 -178
  231. package/dist/node_modules/ajv/lib/dotjs/dependencies.js.map +0 -1
  232. package/dist/node_modules/ajv/lib/dotjs/enum.js +0 -72
  233. package/dist/node_modules/ajv/lib/dotjs/enum.js.map +0 -1
  234. package/dist/node_modules/ajv/lib/dotjs/format.js +0 -160
  235. package/dist/node_modules/ajv/lib/dotjs/format.js.map +0 -1
  236. package/dist/node_modules/ajv/lib/dotjs/if.js +0 -113
  237. package/dist/node_modules/ajv/lib/dotjs/if.js.map +0 -1
  238. package/dist/node_modules/ajv/lib/dotjs/index.js +0 -68
  239. package/dist/node_modules/ajv/lib/dotjs/index.js.map +0 -1
  240. package/dist/node_modules/ajv/lib/dotjs/items.js +0 -150
  241. package/dist/node_modules/ajv/lib/dotjs/items.js.map +0 -1
  242. package/dist/node_modules/ajv/lib/dotjs/multipleOf.js +0 -90
  243. package/dist/node_modules/ajv/lib/dotjs/multipleOf.js.map +0 -1
  244. package/dist/node_modules/ajv/lib/dotjs/not.js +0 -94
  245. package/dist/node_modules/ajv/lib/dotjs/not.js.map +0 -1
  246. package/dist/node_modules/ajv/lib/dotjs/oneOf.js +0 -83
  247. package/dist/node_modules/ajv/lib/dotjs/oneOf.js.map +0 -1
  248. package/dist/node_modules/ajv/lib/dotjs/pattern.js +0 -85
  249. package/dist/node_modules/ajv/lib/dotjs/pattern.js.map +0 -1
  250. package/dist/node_modules/ajv/lib/dotjs/properties.js +0 -345
  251. package/dist/node_modules/ajv/lib/dotjs/properties.js.map +0 -1
  252. package/dist/node_modules/ajv/lib/dotjs/propertyNames.js +0 -91
  253. package/dist/node_modules/ajv/lib/dotjs/propertyNames.js.map +0 -1
  254. package/dist/node_modules/ajv/lib/dotjs/ref.js +0 -134
  255. package/dist/node_modules/ajv/lib/dotjs/ref.js.map +0 -1
  256. package/dist/node_modules/ajv/lib/dotjs/required.js +0 -276
  257. package/dist/node_modules/ajv/lib/dotjs/required.js.map +0 -1
  258. package/dist/node_modules/ajv/lib/dotjs/uniqueItems.js +0 -96
  259. package/dist/node_modules/ajv/lib/dotjs/uniqueItems.js.map +0 -1
  260. package/dist/node_modules/ajv/lib/dotjs/validate.js +0 -492
  261. package/dist/node_modules/ajv/lib/dotjs/validate.js.map +0 -1
  262. package/dist/node_modules/ajv/lib/keyword.js +0 -159
  263. package/dist/node_modules/ajv/lib/keyword.js.map +0 -1
  264. package/dist/node_modules/ajv/lib/refs/data.json.js +0 -33
  265. package/dist/node_modules/ajv/lib/refs/data.json.js.map +0 -1
  266. package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json.js +0 -254
  267. package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json.js.map +0 -1
  268. package/dist/node_modules/fast-json-stable-stringify/index.js +0 -69
  269. package/dist/node_modules/fast-json-stable-stringify/index.js.map +0 -1
  270. package/dist/node_modules/json-schema-traverse/index.js +0 -104
  271. package/dist/node_modules/json-schema-traverse/index.js.map +0 -1
  272. package/dist/node_modules/uri-js/dist/es5/uri.all.js +0 -1418
  273. package/dist/node_modules/uri-js/dist/es5/uri.all.js.map +0 -1
  274. package/dist/node_modules/zod/v3/ZodError.js +0 -133
  275. package/dist/node_modules/zod/v3/ZodError.js.map +0 -1
  276. package/dist/node_modules/zod/v3/errors.js +0 -9
  277. package/dist/node_modules/zod/v3/errors.js.map +0 -1
  278. package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -9
  279. package/dist/node_modules/zod/v3/helpers/errorUtil.js.map +0 -1
  280. package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -112
  281. package/dist/node_modules/zod/v3/helpers/parseUtil.js.map +0 -1
  282. package/dist/node_modules/zod/v3/helpers/util.js +0 -136
  283. package/dist/node_modules/zod/v3/helpers/util.js.map +0 -1
  284. package/dist/node_modules/zod/v3/locales/en.js +0 -112
  285. package/dist/node_modules/zod/v3/locales/en.js.map +0 -1
  286. package/dist/node_modules/zod/v3/types.js +0 -3491
  287. package/dist/node_modules/zod/v3/types.js.map +0 -1
  288. package/dist/polygon.cjs +0 -39
  289. package/dist/polygon.cjs.map +0 -1
  290. package/dist/polygon.d.ts +0 -1
  291. package/dist/polygon.d.ts.map +0 -1
  292. package/dist/polygon.js +0 -2
  293. package/dist/polygon.js.map +0 -1
  294. package/dist/solana.cjs +0 -20
  295. package/dist/solana.cjs.map +0 -1
  296. package/dist/solana.d.ts +0 -2
  297. package/dist/solana.d.ts.map +0 -1
  298. package/dist/solana.js +0 -3
  299. package/dist/solana.js.map +0 -1
  300. package/dist/solanaAccount.d.ts +0 -13
  301. package/dist/solanaAccount.d.ts.map +0 -1
  302. package/dist/solanaAccount.js +0 -34
  303. package/dist/solanaAccount.js.map +0 -1
  304. package/dist/solanaPaymentMaker.d.ts +0 -25
  305. package/dist/solanaPaymentMaker.d.ts.map +0 -1
  306. package/dist/solanaPaymentMaker.js +0 -108
  307. package/dist/solanaPaymentMaker.js.map +0 -1
  308. package/dist/types.js +0 -152
  309. package/dist/types.js.map +0 -1
  310. package/dist/world.cjs +0 -39
  311. package/dist/world.cjs.map +0 -1
  312. package/dist/world.d.ts +0 -1
  313. package/dist/world.d.ts.map +0 -1
  314. package/dist/world.js +0 -2
  315. package/dist/world.js.map +0 -1
@@ -1,1418 +0,0 @@
1
- import { __module as uri_all$1 } from '../../../../_virtual/uri.all.js';
2
-
3
- /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
4
- var uri_all = uri_all$1.exports;
5
-
6
- var hasRequiredUri_all;
7
-
8
- function requireUri_all () {
9
- if (hasRequiredUri_all) return uri_all$1.exports;
10
- hasRequiredUri_all = 1;
11
- (function (module, exports) {
12
- (function (global, factory) {
13
- factory(exports) ;
14
- }(uri_all, (function (exports) {
15
- function merge() {
16
- for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
17
- sets[_key] = arguments[_key];
18
- }
19
-
20
- if (sets.length > 1) {
21
- sets[0] = sets[0].slice(0, -1);
22
- var xl = sets.length - 1;
23
- for (var x = 1; x < xl; ++x) {
24
- sets[x] = sets[x].slice(1, -1);
25
- }
26
- sets[xl] = sets[xl].slice(1);
27
- return sets.join('');
28
- } else {
29
- return sets[0];
30
- }
31
- }
32
- function subexp(str) {
33
- return "(?:" + str + ")";
34
- }
35
- function typeOf(o) {
36
- return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase();
37
- }
38
- function toUpperCase(str) {
39
- return str.toUpperCase();
40
- }
41
- function toArray(obj) {
42
- return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : [];
43
- }
44
- function assign(target, source) {
45
- var obj = target;
46
- if (source) {
47
- for (var key in source) {
48
- obj[key] = source[key];
49
- }
50
- }
51
- return obj;
52
- }
53
-
54
- function buildExps(isIRI) {
55
- var ALPHA$$ = "[A-Za-z]",
56
- DIGIT$$ = "[0-9]",
57
- HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"),
58
- PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)),
59
- //expanded
60
- GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]",
61
- SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",
62
- RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),
63
- UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]",
64
- //subset, excludes bidi control characters
65
- IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]",
66
- //subset
67
- UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$);
68
- subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*");
69
- subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*");
70
- var DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
71
- //relaxed parsing rules
72
- IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$),
73
- H16$ = subexp(HEXDIG$$ + "{1,4}"),
74
- LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$),
75
- IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$),
76
- // 6( h16 ":" ) ls32
77
- IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$),
78
- // "::" 5( h16 ":" ) ls32
79
- IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$),
80
- //[ h16 ] "::" 4( h16 ":" ) ls32
81
- IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$),
82
- //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
83
- IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$),
84
- //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
85
- IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$),
86
- //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
87
- IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$),
88
- //[ *4( h16 ":" ) h16 ] "::" ls32
89
- IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$),
90
- //[ *5( h16 ":" ) h16 ] "::" h16
91
- IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"),
92
- //[ *6( h16 ":" ) h16 ] "::"
93
- IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")),
94
- ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+");
95
- //RFC 6874, with relaxed parsing rules
96
- subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+");
97
- //RFC 6874
98
- subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*");
99
- var PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]"));
100
- subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+");
101
- subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*");
102
- return {
103
- NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
104
- NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
105
- NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
106
- NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
107
- NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
108
- NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
109
- NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
110
- ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
111
- UNRESERVED: new RegExp(UNRESERVED$$, "g"),
112
- OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
113
- PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
114
- IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
115
- IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
116
- };
117
- }
118
- var URI_PROTOCOL = buildExps(false);
119
-
120
- var IRI_PROTOCOL = buildExps(true);
121
-
122
- var slicedToArray = function () {
123
- function sliceIterator(arr, i) {
124
- var _arr = [];
125
- var _n = true;
126
- var _d = false;
127
- var _e = undefined;
128
-
129
- try {
130
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
131
- _arr.push(_s.value);
132
-
133
- if (i && _arr.length === i) break;
134
- }
135
- } catch (err) {
136
- _d = true;
137
- _e = err;
138
- } finally {
139
- try {
140
- if (!_n && _i["return"]) _i["return"]();
141
- } finally {
142
- if (_d) throw _e;
143
- }
144
- }
145
-
146
- return _arr;
147
- }
148
-
149
- return function (arr, i) {
150
- if (Array.isArray(arr)) {
151
- return arr;
152
- } else if (Symbol.iterator in Object(arr)) {
153
- return sliceIterator(arr, i);
154
- } else {
155
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
156
- }
157
- };
158
- }();
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
- var toConsumableArray = function (arr) {
173
- if (Array.isArray(arr)) {
174
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
175
-
176
- return arr2;
177
- } else {
178
- return Array.from(arr);
179
- }
180
- };
181
-
182
- /** Highest positive signed 32-bit float value */
183
-
184
- var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
185
-
186
- /** Bootstring parameters */
187
- var base = 36;
188
- var tMin = 1;
189
- var tMax = 26;
190
- var skew = 38;
191
- var damp = 700;
192
- var initialBias = 72;
193
- var initialN = 128; // 0x80
194
- var delimiter = '-'; // '\x2D'
195
-
196
- /** Regular expressions */
197
- var regexPunycode = /^xn--/;
198
- var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
199
- var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
200
-
201
- /** Error messages */
202
- var errors = {
203
- 'overflow': 'Overflow: input needs wider integers to process',
204
- 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
205
- 'invalid-input': 'Invalid input'
206
- };
207
-
208
- /** Convenience shortcuts */
209
- var baseMinusTMin = base - tMin;
210
- var floor = Math.floor;
211
- var stringFromCharCode = String.fromCharCode;
212
-
213
- /*--------------------------------------------------------------------------*/
214
-
215
- /**
216
- * A generic error utility function.
217
- * @private
218
- * @param {String} type The error type.
219
- * @returns {Error} Throws a `RangeError` with the applicable error message.
220
- */
221
- function error$1(type) {
222
- throw new RangeError(errors[type]);
223
- }
224
-
225
- /**
226
- * A generic `Array#map` utility function.
227
- * @private
228
- * @param {Array} array The array to iterate over.
229
- * @param {Function} callback The function that gets called for every array
230
- * item.
231
- * @returns {Array} A new array of values returned by the callback function.
232
- */
233
- function map(array, fn) {
234
- var result = [];
235
- var length = array.length;
236
- while (length--) {
237
- result[length] = fn(array[length]);
238
- }
239
- return result;
240
- }
241
-
242
- /**
243
- * A simple `Array#map`-like wrapper to work with domain name strings or email
244
- * addresses.
245
- * @private
246
- * @param {String} domain The domain name or email address.
247
- * @param {Function} callback The function that gets called for every
248
- * character.
249
- * @returns {Array} A new string of characters returned by the callback
250
- * function.
251
- */
252
- function mapDomain(string, fn) {
253
- var parts = string.split('@');
254
- var result = '';
255
- if (parts.length > 1) {
256
- // In email addresses, only the domain name should be punycoded. Leave
257
- // the local part (i.e. everything up to `@`) intact.
258
- result = parts[0] + '@';
259
- string = parts[1];
260
- }
261
- // Avoid `split(regex)` for IE8 compatibility. See #17.
262
- string = string.replace(regexSeparators, '\x2E');
263
- var labels = string.split('.');
264
- var encoded = map(labels, fn).join('.');
265
- return result + encoded;
266
- }
267
-
268
- /**
269
- * Creates an array containing the numeric code points of each Unicode
270
- * character in the string. While JavaScript uses UCS-2 internally,
271
- * this function will convert a pair of surrogate halves (each of which
272
- * UCS-2 exposes as separate characters) into a single code point,
273
- * matching UTF-16.
274
- * @see `punycode.ucs2.encode`
275
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
276
- * @memberOf punycode.ucs2
277
- * @name decode
278
- * @param {String} string The Unicode input string (UCS-2).
279
- * @returns {Array} The new array of code points.
280
- */
281
- function ucs2decode(string) {
282
- var output = [];
283
- var counter = 0;
284
- var length = string.length;
285
- while (counter < length) {
286
- var value = string.charCodeAt(counter++);
287
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
288
- // It's a high surrogate, and there is a next character.
289
- var extra = string.charCodeAt(counter++);
290
- if ((extra & 0xFC00) == 0xDC00) {
291
- // Low surrogate.
292
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
293
- } else {
294
- // It's an unmatched surrogate; only append this code unit, in case the
295
- // next code unit is the high surrogate of a surrogate pair.
296
- output.push(value);
297
- counter--;
298
- }
299
- } else {
300
- output.push(value);
301
- }
302
- }
303
- return output;
304
- }
305
-
306
- /**
307
- * Creates a string based on an array of numeric code points.
308
- * @see `punycode.ucs2.decode`
309
- * @memberOf punycode.ucs2
310
- * @name encode
311
- * @param {Array} codePoints The array of numeric code points.
312
- * @returns {String} The new Unicode string (UCS-2).
313
- */
314
- var ucs2encode = function ucs2encode(array) {
315
- return String.fromCodePoint.apply(String, toConsumableArray(array));
316
- };
317
-
318
- /**
319
- * Converts a basic code point into a digit/integer.
320
- * @see `digitToBasic()`
321
- * @private
322
- * @param {Number} codePoint The basic numeric code point value.
323
- * @returns {Number} The numeric value of a basic code point (for use in
324
- * representing integers) in the range `0` to `base - 1`, or `base` if
325
- * the code point does not represent a value.
326
- */
327
- var basicToDigit = function basicToDigit(codePoint) {
328
- if (codePoint - 0x30 < 0x0A) {
329
- return codePoint - 0x16;
330
- }
331
- if (codePoint - 0x41 < 0x1A) {
332
- return codePoint - 0x41;
333
- }
334
- if (codePoint - 0x61 < 0x1A) {
335
- return codePoint - 0x61;
336
- }
337
- return base;
338
- };
339
-
340
- /**
341
- * Converts a digit/integer into a basic code point.
342
- * @see `basicToDigit()`
343
- * @private
344
- * @param {Number} digit The numeric value of a basic code point.
345
- * @returns {Number} The basic code point whose value (when used for
346
- * representing integers) is `digit`, which needs to be in the range
347
- * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
348
- * used; else, the lowercase form is used. The behavior is undefined
349
- * if `flag` is non-zero and `digit` has no uppercase form.
350
- */
351
- var digitToBasic = function digitToBasic(digit, flag) {
352
- // 0..25 map to ASCII a..z or A..Z
353
- // 26..35 map to ASCII 0..9
354
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
355
- };
356
-
357
- /**
358
- * Bias adaptation function as per section 3.4 of RFC 3492.
359
- * https://tools.ietf.org/html/rfc3492#section-3.4
360
- * @private
361
- */
362
- var adapt = function adapt(delta, numPoints, firstTime) {
363
- var k = 0;
364
- delta = firstTime ? floor(delta / damp) : delta >> 1;
365
- delta += floor(delta / numPoints);
366
- for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {
367
- delta = floor(delta / baseMinusTMin);
368
- }
369
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
370
- };
371
-
372
- /**
373
- * Converts a Punycode string of ASCII-only symbols to a string of Unicode
374
- * symbols.
375
- * @memberOf punycode
376
- * @param {String} input The Punycode string of ASCII-only symbols.
377
- * @returns {String} The resulting string of Unicode symbols.
378
- */
379
- var decode = function decode(input) {
380
- // Don't use UCS-2.
381
- var output = [];
382
- var inputLength = input.length;
383
- var i = 0;
384
- var n = initialN;
385
- var bias = initialBias;
386
-
387
- // Handle the basic code points: let `basic` be the number of input code
388
- // points before the last delimiter, or `0` if there is none, then copy
389
- // the first basic code points to the output.
390
-
391
- var basic = input.lastIndexOf(delimiter);
392
- if (basic < 0) {
393
- basic = 0;
394
- }
395
-
396
- for (var j = 0; j < basic; ++j) {
397
- // if it's not a basic code point
398
- if (input.charCodeAt(j) >= 0x80) {
399
- error$1('not-basic');
400
- }
401
- output.push(input.charCodeAt(j));
402
- }
403
-
404
- // Main decoding loop: start just after the last delimiter if any basic code
405
- // points were copied; start at the beginning otherwise.
406
-
407
- for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{
408
-
409
- // `index` is the index of the next character to be consumed.
410
- // Decode a generalized variable-length integer into `delta`,
411
- // which gets added to `i`. The overflow checking is easier
412
- // if we increase `i` as we go, then subtract off its starting
413
- // value at the end to obtain `delta`.
414
- var oldi = i;
415
- for (var w = 1, k = base;; /* no condition */k += base) {
416
-
417
- if (index >= inputLength) {
418
- error$1('invalid-input');
419
- }
420
-
421
- var digit = basicToDigit(input.charCodeAt(index++));
422
-
423
- if (digit >= base || digit > floor((maxInt - i) / w)) {
424
- error$1('overflow');
425
- }
426
-
427
- i += digit * w;
428
- var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
429
-
430
- if (digit < t) {
431
- break;
432
- }
433
-
434
- var baseMinusT = base - t;
435
- if (w > floor(maxInt / baseMinusT)) {
436
- error$1('overflow');
437
- }
438
-
439
- w *= baseMinusT;
440
- }
441
-
442
- var out = output.length + 1;
443
- bias = adapt(i - oldi, out, oldi == 0);
444
-
445
- // `i` was supposed to wrap around from `out` to `0`,
446
- // incrementing `n` each time, so we'll fix that now:
447
- if (floor(i / out) > maxInt - n) {
448
- error$1('overflow');
449
- }
450
-
451
- n += floor(i / out);
452
- i %= out;
453
-
454
- // Insert `n` at position `i` of the output.
455
- output.splice(i++, 0, n);
456
- }
457
-
458
- return String.fromCodePoint.apply(String, output);
459
- };
460
-
461
- /**
462
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
463
- * Punycode string of ASCII-only symbols.
464
- * @memberOf punycode
465
- * @param {String} input The string of Unicode symbols.
466
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
467
- */
468
- var encode = function encode(input) {
469
- var output = [];
470
-
471
- // Convert the input in UCS-2 to an array of Unicode code points.
472
- input = ucs2decode(input);
473
-
474
- // Cache the length.
475
- var inputLength = input.length;
476
-
477
- // Initialize the state.
478
- var n = initialN;
479
- var delta = 0;
480
- var bias = initialBias;
481
-
482
- // Handle the basic code points.
483
- var _iteratorNormalCompletion = true;
484
- var _didIteratorError = false;
485
- var _iteratorError = undefined;
486
-
487
- try {
488
- for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
489
- var _currentValue2 = _step.value;
490
-
491
- if (_currentValue2 < 0x80) {
492
- output.push(stringFromCharCode(_currentValue2));
493
- }
494
- }
495
- } catch (err) {
496
- _didIteratorError = true;
497
- _iteratorError = err;
498
- } finally {
499
- try {
500
- if (!_iteratorNormalCompletion && _iterator.return) {
501
- _iterator.return();
502
- }
503
- } finally {
504
- if (_didIteratorError) {
505
- throw _iteratorError;
506
- }
507
- }
508
- }
509
-
510
- var basicLength = output.length;
511
- var handledCPCount = basicLength;
512
-
513
- // `handledCPCount` is the number of code points that have been handled;
514
- // `basicLength` is the number of basic code points.
515
-
516
- // Finish the basic string with a delimiter unless it's empty.
517
- if (basicLength) {
518
- output.push(delimiter);
519
- }
520
-
521
- // Main encoding loop:
522
- while (handledCPCount < inputLength) {
523
-
524
- // All non-basic code points < n have been handled already. Find the next
525
- // larger one:
526
- var m = maxInt;
527
- var _iteratorNormalCompletion2 = true;
528
- var _didIteratorError2 = false;
529
- var _iteratorError2 = undefined;
530
-
531
- try {
532
- for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
533
- var currentValue = _step2.value;
534
-
535
- if (currentValue >= n && currentValue < m) {
536
- m = currentValue;
537
- }
538
- }
539
-
540
- // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
541
- // but guard against overflow.
542
- } catch (err) {
543
- _didIteratorError2 = true;
544
- _iteratorError2 = err;
545
- } finally {
546
- try {
547
- if (!_iteratorNormalCompletion2 && _iterator2.return) {
548
- _iterator2.return();
549
- }
550
- } finally {
551
- if (_didIteratorError2) {
552
- throw _iteratorError2;
553
- }
554
- }
555
- }
556
-
557
- var handledCPCountPlusOne = handledCPCount + 1;
558
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
559
- error$1('overflow');
560
- }
561
-
562
- delta += (m - n) * handledCPCountPlusOne;
563
- n = m;
564
-
565
- var _iteratorNormalCompletion3 = true;
566
- var _didIteratorError3 = false;
567
- var _iteratorError3 = undefined;
568
-
569
- try {
570
- for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
571
- var _currentValue = _step3.value;
572
-
573
- if (_currentValue < n && ++delta > maxInt) {
574
- error$1('overflow');
575
- }
576
- if (_currentValue == n) {
577
- // Represent delta as a generalized variable-length integer.
578
- var q = delta;
579
- for (var k = base;; /* no condition */k += base) {
580
- var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
581
- if (q < t) {
582
- break;
583
- }
584
- var qMinusT = q - t;
585
- var baseMinusT = base - t;
586
- output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
587
- q = floor(qMinusT / baseMinusT);
588
- }
589
-
590
- output.push(stringFromCharCode(digitToBasic(q, 0)));
591
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
592
- delta = 0;
593
- ++handledCPCount;
594
- }
595
- }
596
- } catch (err) {
597
- _didIteratorError3 = true;
598
- _iteratorError3 = err;
599
- } finally {
600
- try {
601
- if (!_iteratorNormalCompletion3 && _iterator3.return) {
602
- _iterator3.return();
603
- }
604
- } finally {
605
- if (_didIteratorError3) {
606
- throw _iteratorError3;
607
- }
608
- }
609
- }
610
-
611
- ++delta;
612
- ++n;
613
- }
614
- return output.join('');
615
- };
616
-
617
- /**
618
- * Converts a Punycode string representing a domain name or an email address
619
- * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
620
- * it doesn't matter if you call it on a string that has already been
621
- * converted to Unicode.
622
- * @memberOf punycode
623
- * @param {String} input The Punycoded domain name or email address to
624
- * convert to Unicode.
625
- * @returns {String} The Unicode representation of the given Punycode
626
- * string.
627
- */
628
- var toUnicode = function toUnicode(input) {
629
- return mapDomain(input, function (string) {
630
- return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
631
- });
632
- };
633
-
634
- /**
635
- * Converts a Unicode string representing a domain name or an email address to
636
- * Punycode. Only the non-ASCII parts of the domain name will be converted,
637
- * i.e. it doesn't matter if you call it with a domain that's already in
638
- * ASCII.
639
- * @memberOf punycode
640
- * @param {String} input The domain name or email address to convert, as a
641
- * Unicode string.
642
- * @returns {String} The Punycode representation of the given domain name or
643
- * email address.
644
- */
645
- var toASCII = function toASCII(input) {
646
- return mapDomain(input, function (string) {
647
- return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
648
- });
649
- };
650
-
651
- /*--------------------------------------------------------------------------*/
652
-
653
- /** Define the public API */
654
- var punycode = {
655
- /**
656
- * A string representing the current Punycode.js version number.
657
- * @memberOf punycode
658
- * @type String
659
- */
660
- 'version': '2.1.0',
661
- /**
662
- * An object of methods to convert from JavaScript's internal character
663
- * representation (UCS-2) to Unicode code points, and back.
664
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
665
- * @memberOf punycode
666
- * @type Object
667
- */
668
- 'ucs2': {
669
- 'decode': ucs2decode,
670
- 'encode': ucs2encode
671
- },
672
- 'decode': decode,
673
- 'encode': encode,
674
- 'toASCII': toASCII,
675
- 'toUnicode': toUnicode
676
- };
677
-
678
- /**
679
- * URI.js
680
- *
681
- * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
682
- * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
683
- * @see http://github.com/garycourt/uri-js
684
- */
685
- /**
686
- * Copyright 2011 Gary Court. All rights reserved.
687
- *
688
- * Redistribution and use in source and binary forms, with or without modification, are
689
- * permitted provided that the following conditions are met:
690
- *
691
- * 1. Redistributions of source code must retain the above copyright notice, this list of
692
- * conditions and the following disclaimer.
693
- *
694
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
695
- * of conditions and the following disclaimer in the documentation and/or other materials
696
- * provided with the distribution.
697
- *
698
- * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
699
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
700
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
701
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
702
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
703
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
704
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
705
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
706
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
707
- *
708
- * The views and conclusions contained in the software and documentation are those of the
709
- * authors and should not be interpreted as representing official policies, either expressed
710
- * or implied, of Gary Court.
711
- */
712
- var SCHEMES = {};
713
- function pctEncChar(chr) {
714
- var c = chr.charCodeAt(0);
715
- var e = void 0;
716
- if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
717
- return e;
718
- }
719
- function pctDecChars(str) {
720
- var newStr = "";
721
- var i = 0;
722
- var il = str.length;
723
- while (i < il) {
724
- var c = parseInt(str.substr(i + 1, 2), 16);
725
- if (c < 128) {
726
- newStr += String.fromCharCode(c);
727
- i += 3;
728
- } else if (c >= 194 && c < 224) {
729
- if (il - i >= 6) {
730
- var c2 = parseInt(str.substr(i + 4, 2), 16);
731
- newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
732
- } else {
733
- newStr += str.substr(i, 6);
734
- }
735
- i += 6;
736
- } else if (c >= 224) {
737
- if (il - i >= 9) {
738
- var _c = parseInt(str.substr(i + 4, 2), 16);
739
- var c3 = parseInt(str.substr(i + 7, 2), 16);
740
- newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
741
- } else {
742
- newStr += str.substr(i, 9);
743
- }
744
- i += 9;
745
- } else {
746
- newStr += str.substr(i, 3);
747
- i += 3;
748
- }
749
- }
750
- return newStr;
751
- }
752
- function _normalizeComponentEncoding(components, protocol) {
753
- function decodeUnreserved(str) {
754
- var decStr = pctDecChars(str);
755
- return !decStr.match(protocol.UNRESERVED) ? str : decStr;
756
- }
757
- if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
758
- if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
759
- if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
760
- if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
761
- if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
762
- if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
763
- return components;
764
- }
765
-
766
- function _stripLeadingZeros(str) {
767
- return str.replace(/^0*(.*)/, "$1") || "0";
768
- }
769
- function _normalizeIPv4(host, protocol) {
770
- var matches = host.match(protocol.IPV4ADDRESS) || [];
771
-
772
- var _matches = slicedToArray(matches, 2),
773
- address = _matches[1];
774
-
775
- if (address) {
776
- return address.split(".").map(_stripLeadingZeros).join(".");
777
- } else {
778
- return host;
779
- }
780
- }
781
- function _normalizeIPv6(host, protocol) {
782
- var matches = host.match(protocol.IPV6ADDRESS) || [];
783
-
784
- var _matches2 = slicedToArray(matches, 3),
785
- address = _matches2[1],
786
- zone = _matches2[2];
787
-
788
- if (address) {
789
- var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(),
790
- _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2),
791
- last = _address$toLowerCase$2[0],
792
- first = _address$toLowerCase$2[1];
793
-
794
- var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
795
- var lastFields = last.split(":").map(_stripLeadingZeros);
796
- var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
797
- var fieldCount = isLastFieldIPv4Address ? 7 : 8;
798
- var lastFieldsStart = lastFields.length - fieldCount;
799
- var fields = Array(fieldCount);
800
- for (var x = 0; x < fieldCount; ++x) {
801
- fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';
802
- }
803
- if (isLastFieldIPv4Address) {
804
- fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
805
- }
806
- var allZeroFields = fields.reduce(function (acc, field, index) {
807
- if (!field || field === "0") {
808
- var lastLongest = acc[acc.length - 1];
809
- if (lastLongest && lastLongest.index + lastLongest.length === index) {
810
- lastLongest.length++;
811
- } else {
812
- acc.push({ index: index, length: 1 });
813
- }
814
- }
815
- return acc;
816
- }, []);
817
- var longestZeroFields = allZeroFields.sort(function (a, b) {
818
- return b.length - a.length;
819
- })[0];
820
- var newHost = void 0;
821
- if (longestZeroFields && longestZeroFields.length > 1) {
822
- var newFirst = fields.slice(0, longestZeroFields.index);
823
- var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
824
- newHost = newFirst.join(":") + "::" + newLast.join(":");
825
- } else {
826
- newHost = fields.join(":");
827
- }
828
- if (zone) {
829
- newHost += "%" + zone;
830
- }
831
- return newHost;
832
- } else {
833
- return host;
834
- }
835
- }
836
- var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
837
- var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined;
838
- function parse(uriString) {
839
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
840
-
841
- var components = {};
842
- var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
843
- if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
844
- var matches = uriString.match(URI_PARSE);
845
- if (matches) {
846
- if (NO_MATCH_IS_UNDEFINED) {
847
- //store each component
848
- components.scheme = matches[1];
849
- components.userinfo = matches[3];
850
- components.host = matches[4];
851
- components.port = parseInt(matches[5], 10);
852
- components.path = matches[6] || "";
853
- components.query = matches[7];
854
- components.fragment = matches[8];
855
- //fix port number
856
- if (isNaN(components.port)) {
857
- components.port = matches[5];
858
- }
859
- } else {
860
- //IE FIX for improper RegExp matching
861
- //store each component
862
- components.scheme = matches[1] || undefined;
863
- components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined;
864
- components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined;
865
- components.port = parseInt(matches[5], 10);
866
- components.path = matches[6] || "";
867
- components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined;
868
- components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined;
869
- //fix port number
870
- if (isNaN(components.port)) {
871
- components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined;
872
- }
873
- }
874
- if (components.host) {
875
- //normalize IP hosts
876
- components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
877
- }
878
- //determine reference type
879
- if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
880
- components.reference = "same-document";
881
- } else if (components.scheme === undefined) {
882
- components.reference = "relative";
883
- } else if (components.fragment === undefined) {
884
- components.reference = "absolute";
885
- } else {
886
- components.reference = "uri";
887
- }
888
- //check for reference errors
889
- if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
890
- components.error = components.error || "URI is not a " + options.reference + " reference.";
891
- }
892
- //find scheme handler
893
- var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
894
- //check if scheme can't handle IRIs
895
- if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
896
- //if host component is a domain name
897
- if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
898
- //convert Unicode IDN -> ASCII IDN
899
- try {
900
- components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
901
- } catch (e) {
902
- components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
903
- }
904
- }
905
- //convert IRI -> URI
906
- _normalizeComponentEncoding(components, URI_PROTOCOL);
907
- } else {
908
- //normalize encodings
909
- _normalizeComponentEncoding(components, protocol);
910
- }
911
- //perform scheme specific parsing
912
- if (schemeHandler && schemeHandler.parse) {
913
- schemeHandler.parse(components, options);
914
- }
915
- } else {
916
- components.error = components.error || "URI can not be parsed.";
917
- }
918
- return components;
919
- }
920
-
921
- function _recomposeAuthority(components, options) {
922
- var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
923
- var uriTokens = [];
924
- if (components.userinfo !== undefined) {
925
- uriTokens.push(components.userinfo);
926
- uriTokens.push("@");
927
- }
928
- if (components.host !== undefined) {
929
- //normalize IP hosts, add brackets and escape zone separator for IPv6
930
- uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) {
931
- return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
932
- }));
933
- }
934
- if (typeof components.port === "number" || typeof components.port === "string") {
935
- uriTokens.push(":");
936
- uriTokens.push(String(components.port));
937
- }
938
- return uriTokens.length ? uriTokens.join("") : undefined;
939
- }
940
-
941
- var RDS1 = /^\.\.?\//;
942
- var RDS2 = /^\/\.(\/|$)/;
943
- var RDS3 = /^\/\.\.(\/|$)/;
944
- var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
945
- function removeDotSegments(input) {
946
- var output = [];
947
- while (input.length) {
948
- if (input.match(RDS1)) {
949
- input = input.replace(RDS1, "");
950
- } else if (input.match(RDS2)) {
951
- input = input.replace(RDS2, "/");
952
- } else if (input.match(RDS3)) {
953
- input = input.replace(RDS3, "/");
954
- output.pop();
955
- } else if (input === "." || input === "..") {
956
- input = "";
957
- } else {
958
- var im = input.match(RDS5);
959
- if (im) {
960
- var s = im[0];
961
- input = input.slice(s.length);
962
- output.push(s);
963
- } else {
964
- throw new Error("Unexpected dot segment condition");
965
- }
966
- }
967
- }
968
- return output.join("");
969
- }
970
-
971
- function serialize(components) {
972
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
973
-
974
- var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
975
- var uriTokens = [];
976
- //find scheme handler
977
- var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
978
- //perform scheme specific serialization
979
- if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
980
- if (components.host) {
981
- //if host component is an IPv6 address
982
- if (protocol.IPV6ADDRESS.test(components.host)) ;
983
- //TODO: normalize IPv6 address as per RFC 5952
984
-
985
- //if host component is a domain name
986
- else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
987
- //convert IDN via punycode
988
- try {
989
- components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);
990
- } catch (e) {
991
- components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
992
- }
993
- }
994
- }
995
- //normalize encoding
996
- _normalizeComponentEncoding(components, protocol);
997
- if (options.reference !== "suffix" && components.scheme) {
998
- uriTokens.push(components.scheme);
999
- uriTokens.push(":");
1000
- }
1001
- var authority = _recomposeAuthority(components, options);
1002
- if (authority !== undefined) {
1003
- if (options.reference !== "suffix") {
1004
- uriTokens.push("//");
1005
- }
1006
- uriTokens.push(authority);
1007
- if (components.path && components.path.charAt(0) !== "/") {
1008
- uriTokens.push("/");
1009
- }
1010
- }
1011
- if (components.path !== undefined) {
1012
- var s = components.path;
1013
- if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
1014
- s = removeDotSegments(s);
1015
- }
1016
- if (authority === undefined) {
1017
- s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
1018
- }
1019
- uriTokens.push(s);
1020
- }
1021
- if (components.query !== undefined) {
1022
- uriTokens.push("?");
1023
- uriTokens.push(components.query);
1024
- }
1025
- if (components.fragment !== undefined) {
1026
- uriTokens.push("#");
1027
- uriTokens.push(components.fragment);
1028
- }
1029
- return uriTokens.join(""); //merge tokens into a string
1030
- }
1031
-
1032
- function resolveComponents(base, relative) {
1033
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1034
- var skipNormalization = arguments[3];
1035
-
1036
- var target = {};
1037
- if (!skipNormalization) {
1038
- base = parse(serialize(base, options), options); //normalize base components
1039
- relative = parse(serialize(relative, options), options); //normalize relative components
1040
- }
1041
- options = options || {};
1042
- if (!options.tolerant && relative.scheme) {
1043
- target.scheme = relative.scheme;
1044
- //target.authority = relative.authority;
1045
- target.userinfo = relative.userinfo;
1046
- target.host = relative.host;
1047
- target.port = relative.port;
1048
- target.path = removeDotSegments(relative.path || "");
1049
- target.query = relative.query;
1050
- } else {
1051
- if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
1052
- //target.authority = relative.authority;
1053
- target.userinfo = relative.userinfo;
1054
- target.host = relative.host;
1055
- target.port = relative.port;
1056
- target.path = removeDotSegments(relative.path || "");
1057
- target.query = relative.query;
1058
- } else {
1059
- if (!relative.path) {
1060
- target.path = base.path;
1061
- if (relative.query !== undefined) {
1062
- target.query = relative.query;
1063
- } else {
1064
- target.query = base.query;
1065
- }
1066
- } else {
1067
- if (relative.path.charAt(0) === "/") {
1068
- target.path = removeDotSegments(relative.path);
1069
- } else {
1070
- if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
1071
- target.path = "/" + relative.path;
1072
- } else if (!base.path) {
1073
- target.path = relative.path;
1074
- } else {
1075
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
1076
- }
1077
- target.path = removeDotSegments(target.path);
1078
- }
1079
- target.query = relative.query;
1080
- }
1081
- //target.authority = base.authority;
1082
- target.userinfo = base.userinfo;
1083
- target.host = base.host;
1084
- target.port = base.port;
1085
- }
1086
- target.scheme = base.scheme;
1087
- }
1088
- target.fragment = relative.fragment;
1089
- return target;
1090
- }
1091
-
1092
- function resolve(baseURI, relativeURI, options) {
1093
- var schemelessOptions = assign({ scheme: 'null' }, options);
1094
- return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
1095
- }
1096
-
1097
- function normalize(uri, options) {
1098
- if (typeof uri === "string") {
1099
- uri = serialize(parse(uri, options), options);
1100
- } else if (typeOf(uri) === "object") {
1101
- uri = parse(serialize(uri, options), options);
1102
- }
1103
- return uri;
1104
- }
1105
-
1106
- function equal(uriA, uriB, options) {
1107
- if (typeof uriA === "string") {
1108
- uriA = serialize(parse(uriA, options), options);
1109
- } else if (typeOf(uriA) === "object") {
1110
- uriA = serialize(uriA, options);
1111
- }
1112
- if (typeof uriB === "string") {
1113
- uriB = serialize(parse(uriB, options), options);
1114
- } else if (typeOf(uriB) === "object") {
1115
- uriB = serialize(uriB, options);
1116
- }
1117
- return uriA === uriB;
1118
- }
1119
-
1120
- function escapeComponent(str, options) {
1121
- return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
1122
- }
1123
-
1124
- function unescapeComponent(str, options) {
1125
- return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
1126
- }
1127
-
1128
- var handler = {
1129
- scheme: "http",
1130
- domainHost: true,
1131
- parse: function parse(components, options) {
1132
- //report missing host
1133
- if (!components.host) {
1134
- components.error = components.error || "HTTP URIs must have a host.";
1135
- }
1136
- return components;
1137
- },
1138
- serialize: function serialize(components, options) {
1139
- var secure = String(components.scheme).toLowerCase() === "https";
1140
- //normalize the default port
1141
- if (components.port === (secure ? 443 : 80) || components.port === "") {
1142
- components.port = undefined;
1143
- }
1144
- //normalize the empty path
1145
- if (!components.path) {
1146
- components.path = "/";
1147
- }
1148
- //NOTE: We do not parse query strings for HTTP URIs
1149
- //as WWW Form Url Encoded query strings are part of the HTML4+ spec,
1150
- //and not the HTTP spec.
1151
- return components;
1152
- }
1153
- };
1154
-
1155
- var handler$1 = {
1156
- scheme: "https",
1157
- domainHost: handler.domainHost,
1158
- parse: handler.parse,
1159
- serialize: handler.serialize
1160
- };
1161
-
1162
- function isSecure(wsComponents) {
1163
- return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
1164
- }
1165
- //RFC 6455
1166
- var handler$2 = {
1167
- scheme: "ws",
1168
- domainHost: true,
1169
- parse: function parse(components, options) {
1170
- var wsComponents = components;
1171
- //indicate if the secure flag is set
1172
- wsComponents.secure = isSecure(wsComponents);
1173
- //construct resouce name
1174
- wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');
1175
- wsComponents.path = undefined;
1176
- wsComponents.query = undefined;
1177
- return wsComponents;
1178
- },
1179
- serialize: function serialize(wsComponents, options) {
1180
- //normalize the default port
1181
- if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
1182
- wsComponents.port = undefined;
1183
- }
1184
- //ensure scheme matches secure flag
1185
- if (typeof wsComponents.secure === 'boolean') {
1186
- wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws';
1187
- wsComponents.secure = undefined;
1188
- }
1189
- //reconstruct path from resource name
1190
- if (wsComponents.resourceName) {
1191
- var _wsComponents$resourc = wsComponents.resourceName.split('?'),
1192
- _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2),
1193
- path = _wsComponents$resourc2[0],
1194
- query = _wsComponents$resourc2[1];
1195
-
1196
- wsComponents.path = path && path !== '/' ? path : undefined;
1197
- wsComponents.query = query;
1198
- wsComponents.resourceName = undefined;
1199
- }
1200
- //forbid fragment component
1201
- wsComponents.fragment = undefined;
1202
- return wsComponents;
1203
- }
1204
- };
1205
-
1206
- var handler$3 = {
1207
- scheme: "wss",
1208
- domainHost: handler$2.domainHost,
1209
- parse: handler$2.parse,
1210
- serialize: handler$2.serialize
1211
- };
1212
-
1213
- var O = {};
1214
- //RFC 3986
1215
- var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + ("\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" ) + "]";
1216
- var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
1217
- var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
1218
- //RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
1219
- //const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
1220
- //const WSP$$ = "[\\x20\\x09]";
1221
- //const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
1222
- //const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
1223
- //const VCHAR$$ = "[\\x21-\\x7E]";
1224
- //const WSP$$ = "[\\x20\\x09]";
1225
- //const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
1226
- //const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
1227
- //const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
1228
- //const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
1229
- var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
1230
- var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
1231
- var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]");
1232
- var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
1233
- var UNRESERVED = new RegExp(UNRESERVED$$, "g");
1234
- var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
1235
- var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
1236
- var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
1237
- var NOT_HFVALUE = NOT_HFNAME;
1238
- function decodeUnreserved(str) {
1239
- var decStr = pctDecChars(str);
1240
- return !decStr.match(UNRESERVED) ? str : decStr;
1241
- }
1242
- var handler$4 = {
1243
- scheme: "mailto",
1244
- parse: function parse$$1(components, options) {
1245
- var mailtoComponents = components;
1246
- var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
1247
- mailtoComponents.path = undefined;
1248
- if (mailtoComponents.query) {
1249
- var unknownHeaders = false;
1250
- var headers = {};
1251
- var hfields = mailtoComponents.query.split("&");
1252
- for (var x = 0, xl = hfields.length; x < xl; ++x) {
1253
- var hfield = hfields[x].split("=");
1254
- switch (hfield[0]) {
1255
- case "to":
1256
- var toAddrs = hfield[1].split(",");
1257
- for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
1258
- to.push(toAddrs[_x]);
1259
- }
1260
- break;
1261
- case "subject":
1262
- mailtoComponents.subject = unescapeComponent(hfield[1], options);
1263
- break;
1264
- case "body":
1265
- mailtoComponents.body = unescapeComponent(hfield[1], options);
1266
- break;
1267
- default:
1268
- unknownHeaders = true;
1269
- headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
1270
- break;
1271
- }
1272
- }
1273
- if (unknownHeaders) mailtoComponents.headers = headers;
1274
- }
1275
- mailtoComponents.query = undefined;
1276
- for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
1277
- var addr = to[_x2].split("@");
1278
- addr[0] = unescapeComponent(addr[0]);
1279
- if (!options.unicodeSupport) {
1280
- //convert Unicode IDN -> ASCII IDN
1281
- try {
1282
- addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
1283
- } catch (e) {
1284
- mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
1285
- }
1286
- } else {
1287
- addr[1] = unescapeComponent(addr[1], options).toLowerCase();
1288
- }
1289
- to[_x2] = addr.join("@");
1290
- }
1291
- return mailtoComponents;
1292
- },
1293
- serialize: function serialize$$1(mailtoComponents, options) {
1294
- var components = mailtoComponents;
1295
- var to = toArray(mailtoComponents.to);
1296
- if (to) {
1297
- for (var x = 0, xl = to.length; x < xl; ++x) {
1298
- var toAddr = String(to[x]);
1299
- var atIdx = toAddr.lastIndexOf("@");
1300
- var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
1301
- var domain = toAddr.slice(atIdx + 1);
1302
- //convert IDN via punycode
1303
- try {
1304
- domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
1305
- } catch (e) {
1306
- components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
1307
- }
1308
- to[x] = localPart + "@" + domain;
1309
- }
1310
- components.path = to.join(",");
1311
- }
1312
- var headers = mailtoComponents.headers = mailtoComponents.headers || {};
1313
- if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
1314
- if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
1315
- var fields = [];
1316
- for (var name in headers) {
1317
- if (headers[name] !== O[name]) {
1318
- fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
1319
- }
1320
- }
1321
- if (fields.length) {
1322
- components.query = fields.join("&");
1323
- }
1324
- return components;
1325
- }
1326
- };
1327
-
1328
- var URN_PARSE = /^([^\:]+)\:(.*)/;
1329
- //RFC 2141
1330
- var handler$5 = {
1331
- scheme: "urn",
1332
- parse: function parse$$1(components, options) {
1333
- var matches = components.path && components.path.match(URN_PARSE);
1334
- var urnComponents = components;
1335
- if (matches) {
1336
- var scheme = options.scheme || urnComponents.scheme || "urn";
1337
- var nid = matches[1].toLowerCase();
1338
- var nss = matches[2];
1339
- var urnScheme = scheme + ":" + (options.nid || nid);
1340
- var schemeHandler = SCHEMES[urnScheme];
1341
- urnComponents.nid = nid;
1342
- urnComponents.nss = nss;
1343
- urnComponents.path = undefined;
1344
- if (schemeHandler) {
1345
- urnComponents = schemeHandler.parse(urnComponents, options);
1346
- }
1347
- } else {
1348
- urnComponents.error = urnComponents.error || "URN can not be parsed.";
1349
- }
1350
- return urnComponents;
1351
- },
1352
- serialize: function serialize$$1(urnComponents, options) {
1353
- var scheme = options.scheme || urnComponents.scheme || "urn";
1354
- var nid = urnComponents.nid;
1355
- var urnScheme = scheme + ":" + (options.nid || nid);
1356
- var schemeHandler = SCHEMES[urnScheme];
1357
- if (schemeHandler) {
1358
- urnComponents = schemeHandler.serialize(urnComponents, options);
1359
- }
1360
- var uriComponents = urnComponents;
1361
- var nss = urnComponents.nss;
1362
- uriComponents.path = (nid || options.nid) + ":" + nss;
1363
- return uriComponents;
1364
- }
1365
- };
1366
-
1367
- var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
1368
- //RFC 4122
1369
- var handler$6 = {
1370
- scheme: "urn:uuid",
1371
- parse: function parse(urnComponents, options) {
1372
- var uuidComponents = urnComponents;
1373
- uuidComponents.uuid = uuidComponents.nss;
1374
- uuidComponents.nss = undefined;
1375
- if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
1376
- uuidComponents.error = uuidComponents.error || "UUID is not valid.";
1377
- }
1378
- return uuidComponents;
1379
- },
1380
- serialize: function serialize(uuidComponents, options) {
1381
- var urnComponents = uuidComponents;
1382
- //normalize UUID
1383
- urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
1384
- return urnComponents;
1385
- }
1386
- };
1387
-
1388
- SCHEMES[handler.scheme] = handler;
1389
- SCHEMES[handler$1.scheme] = handler$1;
1390
- SCHEMES[handler$2.scheme] = handler$2;
1391
- SCHEMES[handler$3.scheme] = handler$3;
1392
- SCHEMES[handler$4.scheme] = handler$4;
1393
- SCHEMES[handler$5.scheme] = handler$5;
1394
- SCHEMES[handler$6.scheme] = handler$6;
1395
-
1396
- exports.SCHEMES = SCHEMES;
1397
- exports.pctEncChar = pctEncChar;
1398
- exports.pctDecChars = pctDecChars;
1399
- exports.parse = parse;
1400
- exports.removeDotSegments = removeDotSegments;
1401
- exports.serialize = serialize;
1402
- exports.resolveComponents = resolveComponents;
1403
- exports.resolve = resolve;
1404
- exports.normalize = normalize;
1405
- exports.equal = equal;
1406
- exports.escapeComponent = escapeComponent;
1407
- exports.unescapeComponent = unescapeComponent;
1408
-
1409
- Object.defineProperty(exports, '__esModule', { value: true });
1410
-
1411
- })));
1412
-
1413
- } (uri_all$1, uri_all$1.exports));
1414
- return uri_all$1.exports;
1415
- }
1416
-
1417
- export { requireUri_all as __require };
1418
- //# sourceMappingURL=uri.all.js.map