@verdocs/web-sdk 1.4.0 → 1.4.2

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 (354) hide show
  1. package/dist/cjs/Auth-adc80bd4.js +68 -0
  2. package/dist/cjs/{Token-b86e5335.js → Token-1ec62bd3.js} +2 -135
  3. package/dist/{verdocs-web-sdk/buffer-es6-5cef4368.js → cjs/buffer-es6-bc8199b1.js} +47 -14
  4. package/dist/cjs/index-589f3be8.js +1356 -0
  5. package/dist/cjs/loader.cjs.js +3 -19
  6. package/dist/cjs/{index-9c6e5f50.js → popper-71bf3058.js} +0 -186
  7. package/dist/cjs/verdocs-auth.cjs.entry.js +7 -199
  8. package/dist/cjs/verdocs-button_2.cjs.entry.js +105 -0
  9. package/dist/cjs/{verdocs-view.cjs.entry.js → verdocs-dropdown_12.cjs.entry.js} +3313 -50
  10. package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +2 -2
  12. package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +2 -2
  14. package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +2 -2
  16. package/dist/cjs/verdocs-search-activity_2.cjs.entry.js +228 -0
  17. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +2 -2
  18. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-sign.cjs.entry.js +3 -1511
  20. package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +2 -2
  21. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +4 -90
  22. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  23. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +2 -2
  26. package/dist/cjs/verdocs-web-sdk.cjs.js +5 -117
  27. package/dist/collection/collection-manifest.json +1 -1
  28. package/dist/collection/components/controls/verdocs-button/verdocs-button.css +1 -1
  29. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.css +1 -1
  30. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.css +2 -2
  31. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.css +4 -4
  32. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +2 -2
  33. package/dist/collection/components/elements/verdocs-field-attachment/verdocs-field-attachment.css +2 -4
  34. package/dist/collection/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.css +1 -3
  35. package/dist/collection/components/elements/verdocs-field-date/verdocs-field-date.css +1 -3
  36. package/dist/collection/components/elements/verdocs-field-dropdown/verdocs-field-dropdown.css +1 -3
  37. package/dist/collection/components/elements/verdocs-field-initial/verdocs-field-initial.css +1 -3
  38. package/dist/collection/components/elements/verdocs-field-payment/verdocs-field-payment.css +1 -3
  39. package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.css +1 -3
  40. package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.css +1 -3
  41. package/dist/collection/components/elements/verdocs-field-textarea/verdocs-field-textarea.css +1 -3
  42. package/dist/collection/components/elements/verdocs-field-textbox/verdocs-field-textbox.css +1 -3
  43. package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.css +1 -3
  44. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.css +1 -3
  45. package/dist/collection/components/elements/verdocs-search-box/verdocs-search-box.css +1 -3
  46. package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.css +1 -0
  47. package/dist/components/Auth.js +0 -93
  48. package/dist/components/Token.js +1 -134
  49. package/dist/components/buffer-es6.js +39 -14
  50. package/dist/components/index.js +0 -4
  51. package/dist/components/{index3.js → popper.js} +0 -186
  52. package/dist/components/verdocs-auth.js +2 -193
  53. package/dist/components/verdocs-button2.js +2 -2
  54. package/dist/components/verdocs-dropdown2.js +2 -2
  55. package/dist/components/verdocs-field-attachment2.js +2 -2
  56. package/dist/components/verdocs-field-checkbox2.js +2 -2
  57. package/dist/components/verdocs-field-date2.js +2 -214
  58. package/dist/components/verdocs-field-dropdown2.js +2 -2
  59. package/dist/components/verdocs-field-initial2.js +2 -2
  60. package/dist/components/verdocs-field-payment2.js +2 -2
  61. package/dist/components/verdocs-field-radio-button2.js +2 -2
  62. package/dist/components/verdocs-field-signature2.js +2 -2
  63. package/dist/components/verdocs-field-textarea2.js +2 -2
  64. package/dist/components/verdocs-field-textbox2.js +2 -2
  65. package/dist/components/verdocs-initial-dialog2.js +1 -1
  66. package/dist/components/verdocs-kba-dialog.js +2 -2
  67. package/dist/components/verdocs-loader2.js +1 -1
  68. package/dist/components/verdocs-ok-dialog2.js +2 -2
  69. package/dist/components/verdocs-organization-card.js +1 -1
  70. package/dist/components/verdocs-quick-functions.js +2 -2
  71. package/dist/components/verdocs-search-activity2.js +16 -104
  72. package/dist/components/verdocs-search-box2.js +2 -2
  73. package/dist/components/verdocs-search-tabs.js +2 -2
  74. package/dist/components/verdocs-search.js +1 -1
  75. package/dist/components/verdocs-sign.js +1 -1508
  76. package/dist/components/verdocs-signature-dialog2.js +2 -2
  77. package/dist/components/verdocs-status-indicator.js +3 -88
  78. package/dist/components/verdocs-template-card.js +1 -1
  79. package/dist/components/verdocs-template-tags.js +1 -1
  80. package/dist/components/verdocs-text-input2.js +1 -1
  81. package/dist/components/verdocs-toggle.js +1 -1
  82. package/dist/components/verdocs-upload-dialog2.js +2 -2
  83. package/dist/components/verdocs-view2.js +6 -33
  84. package/dist/docs.json +2 -2
  85. package/dist/esm/Auth-ff6040be.js +64 -0
  86. package/dist/{verdocs-web-sdk/Token-29eea56d.js → esm/Token-a587e3ad.js} +1 -134
  87. package/dist/{cjs/buffer-es6-b2c1c885.js → esm/buffer-es6-136673c8.js} +38 -15
  88. package/dist/esm/index-859bc689.js +1327 -0
  89. package/dist/esm/loader.js +3 -19
  90. package/dist/esm/{index-432c65a6.js → popper-93ecb064.js} +0 -186
  91. package/dist/esm/verdocs-auth.entry.js +4 -196
  92. package/dist/esm/verdocs-button_2.entry.js +100 -0
  93. package/dist/esm/{verdocs-view.entry.js → verdocs-dropdown_12.entry.js} +3286 -34
  94. package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
  95. package/dist/esm/verdocs-kba-dialog.entry.js +2 -2
  96. package/dist/esm/verdocs-loader.entry.js +1 -1
  97. package/dist/esm/verdocs-ok-dialog.entry.js +2 -2
  98. package/dist/esm/verdocs-organization-card.entry.js +1 -1
  99. package/dist/esm/verdocs-quick-functions.entry.js +2 -2
  100. package/dist/esm/verdocs-search-activity_2.entry.js +223 -0
  101. package/dist/esm/verdocs-search-tabs.entry.js +2 -2
  102. package/dist/esm/verdocs-search.entry.js +1 -1
  103. package/dist/esm/verdocs-sign.entry.js +3 -1511
  104. package/dist/esm/verdocs-signature-dialog.entry.js +2 -2
  105. package/dist/esm/verdocs-status-indicator.entry.js +3 -89
  106. package/dist/esm/verdocs-template-card.entry.js +1 -1
  107. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  108. package/dist/esm/verdocs-toggle.entry.js +1 -1
  109. package/dist/esm/verdocs-upload-dialog.entry.js +2 -2
  110. package/dist/esm/verdocs-web-sdk.js +5 -117
  111. package/dist/esm-es5/Auth-ff6040be.js +1 -0
  112. package/dist/esm-es5/Token-a587e3ad.js +1 -0
  113. package/dist/esm-es5/buffer-es6-136673c8.js +7 -0
  114. package/dist/esm-es5/index-859bc689.js +2 -0
  115. package/dist/esm-es5/loader.js +1 -1
  116. package/dist/esm-es5/popper-93ecb064.js +1 -0
  117. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-button_2.entry.js +1 -0
  119. package/dist/esm-es5/verdocs-dropdown_12.entry.js +23 -0
  120. package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-loader.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-search-activity_2.entry.js +1 -0
  127. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  128. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -11
  132. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  133. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  134. package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  137. package/dist/verdocs-web-sdk/index.esm.js +0 -1
  138. package/dist/verdocs-web-sdk/p-0353c423.entry.js +1 -0
  139. package/dist/verdocs-web-sdk/p-11bc03a5.js +1 -0
  140. package/dist/verdocs-web-sdk/p-144e0842.system.entry.js +1 -0
  141. package/dist/verdocs-web-sdk/p-15b7ed4d.entry.js +1 -0
  142. package/dist/verdocs-web-sdk/p-1f55d8ac.system.entry.js +1 -0
  143. package/dist/verdocs-web-sdk/p-2bc58746.js +2 -0
  144. package/dist/verdocs-web-sdk/p-34bb9854.system.entry.js +1 -0
  145. package/dist/verdocs-web-sdk/p-3d1eb63d.system.entry.js +1 -0
  146. package/dist/verdocs-web-sdk/p-3f437456.system.entry.js +1 -0
  147. package/dist/verdocs-web-sdk/p-432c3151.system.entry.js +1 -0
  148. package/dist/verdocs-web-sdk/p-466cf9bf.system.entry.js +1 -0
  149. package/dist/verdocs-web-sdk/p-4c66f794.js +1 -0
  150. package/dist/verdocs-web-sdk/{index.system.js → p-50ea2036.system.js} +0 -0
  151. package/dist/verdocs-web-sdk/p-5dfd73f9.system.js +7 -0
  152. package/dist/verdocs-web-sdk/p-6348272c.js +1 -0
  153. package/dist/verdocs-web-sdk/p-6393b2b4.entry.js +1 -0
  154. package/dist/verdocs-web-sdk/p-66b19637.entry.js +1 -0
  155. package/dist/verdocs-web-sdk/p-6802ef91.system.entry.js +1 -0
  156. package/dist/verdocs-web-sdk/p-6ac9e6f8.entry.js +1 -0
  157. package/dist/verdocs-web-sdk/p-6d65d54e.system.entry.js +1 -0
  158. package/dist/verdocs-web-sdk/p-6fa6fb3c.entry.js +1 -0
  159. package/dist/verdocs-web-sdk/p-829b235c.entry.js +1 -0
  160. package/dist/verdocs-web-sdk/p-8795dbe8.entry.js +1 -0
  161. package/dist/verdocs-web-sdk/p-88a300c5.system.js +1 -0
  162. package/dist/verdocs-web-sdk/p-8c6db319.entry.js +1 -0
  163. package/dist/verdocs-web-sdk/p-8c6e29a5.entry.js +1 -0
  164. package/dist/verdocs-web-sdk/p-92632d8e.system.entry.js +1 -0
  165. package/dist/verdocs-web-sdk/p-96c0bf40.system.js +1 -0
  166. package/dist/verdocs-web-sdk/p-98d72550.system.entry.js +23 -0
  167. package/dist/verdocs-web-sdk/p-9b34c794.entry.js +1 -0
  168. package/dist/verdocs-web-sdk/p-9fbb3fc2.entry.js +1 -0
  169. package/dist/verdocs-web-sdk/p-a1fcf0c4.entry.js +23 -0
  170. package/dist/verdocs-web-sdk/p-b1cd24f7.entry.js +1 -0
  171. package/dist/verdocs-web-sdk/p-bf2620cb.entry.js +1 -0
  172. package/dist/verdocs-web-sdk/p-c2f97ef9.system.entry.js +1 -0
  173. package/dist/verdocs-web-sdk/p-caed7818.system.js +2 -0
  174. package/dist/verdocs-web-sdk/p-cc127684.system.entry.js +1 -0
  175. package/dist/verdocs-web-sdk/p-cd6d1fe5.system.entry.js +1 -0
  176. package/dist/verdocs-web-sdk/p-d6206c17.system.entry.js +1 -0
  177. package/dist/verdocs-web-sdk/p-da667373.entry.js +1 -0
  178. package/dist/verdocs-web-sdk/p-e2e643c5.system.entry.js +1 -0
  179. package/dist/verdocs-web-sdk/p-e3659c64.system.js +1 -0
  180. package/dist/verdocs-web-sdk/p-e609b2ee.system.js +1 -0
  181. package/dist/verdocs-web-sdk/p-e719f9ca.system.entry.js +1 -0
  182. package/dist/verdocs-web-sdk/p-ed5baeb4.entry.js +1 -0
  183. package/dist/verdocs-web-sdk/p-ef932a87.js +1 -0
  184. package/dist/verdocs-web-sdk/p-f0d0f959.system.entry.js +1 -0
  185. package/dist/verdocs-web-sdk/p-f7e26fbd.entry.js +1 -0
  186. package/dist/verdocs-web-sdk/p-f814d5cc.system.entry.js +1 -0
  187. package/dist/verdocs-web-sdk/p-f9d431ef.entry.js +1 -0
  188. package/dist/verdocs-web-sdk/verdocs-web-sdk.css +1 -57
  189. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -129
  190. package/dist/verdocs-web-sdk/verdocs-web-sdk.js +2 -1
  191. package/package.json +4 -4
  192. package/dist/cjs/Auth-0146ddd8.js +0 -161
  193. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  194. package/dist/cjs/css-shim-e9231523.js +0 -6
  195. package/dist/cjs/dom-7fb93981.js +0 -75
  196. package/dist/cjs/index-a24f3b6a.js +0 -3096
  197. package/dist/cjs/index-b5a86b04.js +0 -4
  198. package/dist/cjs/index-c4be37e1.js +0 -54
  199. package/dist/cjs/shadow-css-abc19485.js +0 -389
  200. package/dist/cjs/verdocs-button.cjs.entry.js +0 -49
  201. package/dist/cjs/verdocs-dropdown.cjs.entry.js +0 -80
  202. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +0 -59
  203. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +0 -39
  204. package/dist/cjs/verdocs-field-date.cjs.entry.js +0 -2968
  205. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +0 -59
  206. package/dist/cjs/verdocs-field-initial.cjs.entry.js +0 -52
  207. package/dist/cjs/verdocs-field-payment.cjs.entry.js +0 -86
  208. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +0 -48
  209. package/dist/cjs/verdocs-field-signature.cjs.entry.js +0 -52
  210. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +0 -63
  211. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +0 -63
  212. package/dist/cjs/verdocs-search-activity.cjs.entry.js +0 -263
  213. package/dist/cjs/verdocs-search-box.cjs.entry.js +0 -60
  214. package/dist/cjs/verdocs-text-input.cjs.entry.js +0 -62
  215. package/dist/components/index2.js +0 -1
  216. package/dist/components/index4.js +0 -47
  217. package/dist/custom-elements.json +0 -830
  218. package/dist/esm/Auth-4b21fced.js +0 -157
  219. package/dist/esm/Token-29eea56d.js +0 -2458
  220. package/dist/esm/app-globals-0f993ce5.js +0 -3
  221. package/dist/esm/buffer-es6-5cef4368.js +0 -1985
  222. package/dist/esm/css-shim-60f618b9.js +0 -4
  223. package/dist/esm/dom-4eeb3fee.js +0 -73
  224. package/dist/esm/index-97ec070b.js +0 -47
  225. package/dist/esm/index-ddbd60b5.js +0 -3059
  226. package/dist/esm/index-ef172650.js +0 -1
  227. package/dist/esm/shadow-css-02866686.js +0 -387
  228. package/dist/esm/verdocs-button.entry.js +0 -45
  229. package/dist/esm/verdocs-dropdown.entry.js +0 -76
  230. package/dist/esm/verdocs-field-attachment.entry.js +0 -55
  231. package/dist/esm/verdocs-field-checkbox.entry.js +0 -35
  232. package/dist/esm/verdocs-field-date.entry.js +0 -2964
  233. package/dist/esm/verdocs-field-dropdown.entry.js +0 -55
  234. package/dist/esm/verdocs-field-initial.entry.js +0 -48
  235. package/dist/esm/verdocs-field-payment.entry.js +0 -82
  236. package/dist/esm/verdocs-field-radio-button.entry.js +0 -44
  237. package/dist/esm/verdocs-field-signature.entry.js +0 -48
  238. package/dist/esm/verdocs-field-textarea.entry.js +0 -59
  239. package/dist/esm/verdocs-field-textbox.entry.js +0 -59
  240. package/dist/esm/verdocs-search-activity.entry.js +0 -259
  241. package/dist/esm/verdocs-search-box.entry.js +0 -56
  242. package/dist/esm/verdocs-text-input.entry.js +0 -58
  243. package/dist/esm-es5/Auth-4b21fced.js +0 -1
  244. package/dist/esm-es5/Token-29eea56d.js +0 -1
  245. package/dist/esm-es5/app-globals-0f993ce5.js +0 -1
  246. package/dist/esm-es5/buffer-es6-5cef4368.js +0 -7
  247. package/dist/esm-es5/css-shim-60f618b9.js +0 -1
  248. package/dist/esm-es5/dom-4eeb3fee.js +0 -21
  249. package/dist/esm-es5/index-432c65a6.js +0 -1
  250. package/dist/esm-es5/index-97ec070b.js +0 -1
  251. package/dist/esm-es5/index-ddbd60b5.js +0 -2
  252. package/dist/esm-es5/index-ef172650.js +0 -1
  253. package/dist/esm-es5/shadow-css-02866686.js +0 -12
  254. package/dist/esm-es5/verdocs-button.entry.js +0 -1
  255. package/dist/esm-es5/verdocs-dropdown.entry.js +0 -1
  256. package/dist/esm-es5/verdocs-field-attachment.entry.js +0 -1
  257. package/dist/esm-es5/verdocs-field-checkbox.entry.js +0 -1
  258. package/dist/esm-es5/verdocs-field-date.entry.js +0 -1
  259. package/dist/esm-es5/verdocs-field-dropdown.entry.js +0 -1
  260. package/dist/esm-es5/verdocs-field-initial.entry.js +0 -1
  261. package/dist/esm-es5/verdocs-field-payment.entry.js +0 -1
  262. package/dist/esm-es5/verdocs-field-radio-button.entry.js +0 -1
  263. package/dist/esm-es5/verdocs-field-signature.entry.js +0 -1
  264. package/dist/esm-es5/verdocs-field-textarea.entry.js +0 -1
  265. package/dist/esm-es5/verdocs-field-textbox.entry.js +0 -1
  266. package/dist/esm-es5/verdocs-search-activity.entry.js +0 -1
  267. package/dist/esm-es5/verdocs-search-box.entry.js +0 -1
  268. package/dist/esm-es5/verdocs-text-input.entry.js +0 -1
  269. package/dist/esm-es5/verdocs-view.entry.js +0 -23
  270. package/dist/verdocs-web-sdk/Auth-4b21fced.js +0 -157
  271. package/dist/verdocs-web-sdk/Auth-82e38539.system.js +0 -1
  272. package/dist/verdocs-web-sdk/Token-c1cf309e.system.js +0 -1
  273. package/dist/verdocs-web-sdk/app-globals-0f993ce5.js +0 -3
  274. package/dist/verdocs-web-sdk/app-globals-497eb362.system.js +0 -1
  275. package/dist/verdocs-web-sdk/buffer-es6-aa11181b.system.js +0 -7
  276. package/dist/verdocs-web-sdk/css-shim-60f618b9.js +0 -4
  277. package/dist/verdocs-web-sdk/css-shim-e41ceccc.system.js +0 -1
  278. package/dist/verdocs-web-sdk/dom-4eeb3fee.js +0 -73
  279. package/dist/verdocs-web-sdk/dom-89b5deb7.system.js +0 -21
  280. package/dist/verdocs-web-sdk/index-027b383e.system.js +0 -1
  281. package/dist/verdocs-web-sdk/index-06e036a1.system.js +0 -1
  282. package/dist/verdocs-web-sdk/index-432c65a6.js +0 -1974
  283. package/dist/verdocs-web-sdk/index-5d49316f.system.js +0 -1
  284. package/dist/verdocs-web-sdk/index-6465280a.system.js +0 -2
  285. package/dist/verdocs-web-sdk/index-97ec070b.js +0 -47
  286. package/dist/verdocs-web-sdk/index-ddbd60b5.js +0 -3059
  287. package/dist/verdocs-web-sdk/index-ef172650.js +0 -1
  288. package/dist/verdocs-web-sdk/shadow-css-02866686.js +0 -387
  289. package/dist/verdocs-web-sdk/shadow-css-6207e159.system.js +0 -13
  290. package/dist/verdocs-web-sdk/verdocs-auth.entry.js +0 -302
  291. package/dist/verdocs-web-sdk/verdocs-auth.system.entry.js +0 -1
  292. package/dist/verdocs-web-sdk/verdocs-button.entry.js +0 -45
  293. package/dist/verdocs-web-sdk/verdocs-button.system.entry.js +0 -1
  294. package/dist/verdocs-web-sdk/verdocs-dropdown.entry.js +0 -76
  295. package/dist/verdocs-web-sdk/verdocs-dropdown.system.entry.js +0 -1
  296. package/dist/verdocs-web-sdk/verdocs-field-attachment.entry.js +0 -55
  297. package/dist/verdocs-web-sdk/verdocs-field-attachment.system.entry.js +0 -1
  298. package/dist/verdocs-web-sdk/verdocs-field-checkbox.entry.js +0 -35
  299. package/dist/verdocs-web-sdk/verdocs-field-checkbox.system.entry.js +0 -1
  300. package/dist/verdocs-web-sdk/verdocs-field-date.entry.js +0 -2964
  301. package/dist/verdocs-web-sdk/verdocs-field-date.system.entry.js +0 -1
  302. package/dist/verdocs-web-sdk/verdocs-field-dropdown.entry.js +0 -55
  303. package/dist/verdocs-web-sdk/verdocs-field-dropdown.system.entry.js +0 -1
  304. package/dist/verdocs-web-sdk/verdocs-field-initial.entry.js +0 -48
  305. package/dist/verdocs-web-sdk/verdocs-field-initial.system.entry.js +0 -1
  306. package/dist/verdocs-web-sdk/verdocs-field-payment.entry.js +0 -82
  307. package/dist/verdocs-web-sdk/verdocs-field-payment.system.entry.js +0 -1
  308. package/dist/verdocs-web-sdk/verdocs-field-radio-button.entry.js +0 -44
  309. package/dist/verdocs-web-sdk/verdocs-field-radio-button.system.entry.js +0 -1
  310. package/dist/verdocs-web-sdk/verdocs-field-signature.entry.js +0 -48
  311. package/dist/verdocs-web-sdk/verdocs-field-signature.system.entry.js +0 -1
  312. package/dist/verdocs-web-sdk/verdocs-field-textarea.entry.js +0 -59
  313. package/dist/verdocs-web-sdk/verdocs-field-textarea.system.entry.js +0 -1
  314. package/dist/verdocs-web-sdk/verdocs-field-textbox.entry.js +0 -59
  315. package/dist/verdocs-web-sdk/verdocs-field-textbox.system.entry.js +0 -1
  316. package/dist/verdocs-web-sdk/verdocs-initial-dialog.entry.js +0 -239
  317. package/dist/verdocs-web-sdk/verdocs-initial-dialog.system.entry.js +0 -1
  318. package/dist/verdocs-web-sdk/verdocs-kba-dialog.entry.js +0 -77
  319. package/dist/verdocs-web-sdk/verdocs-kba-dialog.system.entry.js +0 -1
  320. package/dist/verdocs-web-sdk/verdocs-loader.entry.js +0 -15
  321. package/dist/verdocs-web-sdk/verdocs-loader.system.entry.js +0 -1
  322. package/dist/verdocs-web-sdk/verdocs-ok-dialog.entry.js +0 -44
  323. package/dist/verdocs-web-sdk/verdocs-ok-dialog.system.entry.js +0 -1
  324. package/dist/verdocs-web-sdk/verdocs-organization-card.entry.js +0 -18
  325. package/dist/verdocs-web-sdk/verdocs-organization-card.system.entry.js +0 -1
  326. package/dist/verdocs-web-sdk/verdocs-quick-functions.entry.js +0 -27
  327. package/dist/verdocs-web-sdk/verdocs-quick-functions.system.entry.js +0 -1
  328. package/dist/verdocs-web-sdk/verdocs-search-activity.entry.js +0 -259
  329. package/dist/verdocs-web-sdk/verdocs-search-activity.system.entry.js +0 -1
  330. package/dist/verdocs-web-sdk/verdocs-search-box.entry.js +0 -56
  331. package/dist/verdocs-web-sdk/verdocs-search-box.system.entry.js +0 -1
  332. package/dist/verdocs-web-sdk/verdocs-search-tabs.entry.js +0 -16
  333. package/dist/verdocs-web-sdk/verdocs-search-tabs.system.entry.js +0 -1
  334. package/dist/verdocs-web-sdk/verdocs-search.entry.js +0 -15
  335. package/dist/verdocs-web-sdk/verdocs-search.system.entry.js +0 -1
  336. package/dist/verdocs-web-sdk/verdocs-sign.entry.js +0 -1995
  337. package/dist/verdocs-web-sdk/verdocs-sign.system.entry.js +0 -1
  338. package/dist/verdocs-web-sdk/verdocs-signature-dialog.entry.js +0 -235
  339. package/dist/verdocs-web-sdk/verdocs-signature-dialog.system.entry.js +0 -1
  340. package/dist/verdocs-web-sdk/verdocs-status-indicator.entry.js +0 -7611
  341. package/dist/verdocs-web-sdk/verdocs-status-indicator.system.entry.js +0 -1
  342. package/dist/verdocs-web-sdk/verdocs-template-card.entry.js +0 -34
  343. package/dist/verdocs-web-sdk/verdocs-template-card.system.entry.js +0 -1
  344. package/dist/verdocs-web-sdk/verdocs-template-tags.entry.js +0 -16
  345. package/dist/verdocs-web-sdk/verdocs-template-tags.system.entry.js +0 -1
  346. package/dist/verdocs-web-sdk/verdocs-text-input.entry.js +0 -58
  347. package/dist/verdocs-web-sdk/verdocs-text-input.system.entry.js +0 -1
  348. package/dist/verdocs-web-sdk/verdocs-toggle.entry.js +0 -32
  349. package/dist/verdocs-web-sdk/verdocs-toggle.system.entry.js +0 -1
  350. package/dist/verdocs-web-sdk/verdocs-upload-dialog.entry.js +0 -119
  351. package/dist/verdocs-web-sdk/verdocs-upload-dialog.system.entry.js +0 -1
  352. package/dist/verdocs-web-sdk/verdocs-view.entry.js +0 -16118
  353. package/dist/verdocs-web-sdk/verdocs-view.system.entry.js +0 -23
  354. package/dist/verdocs-web-sdk/verdocs-web-sdk.system.js +0 -1
@@ -1,2458 +0,0 @@
1
- import { p as process_1 } from './index-97ec070b.js';
2
- import { B as Buffer } from './buffer-es6-5cef4368.js';
3
-
4
- 'use strict';
5
-
6
- var bind = function bind(fn, thisArg) {
7
- return function wrap() {
8
- var args = new Array(arguments.length);
9
- for (var i = 0; i < args.length; i++) {
10
- args[i] = arguments[i];
11
- }
12
- return fn.apply(thisArg, args);
13
- };
14
- };
15
-
16
- 'use strict';
17
-
18
-
19
-
20
- // utils is a library of generic helper functions non-specific to axios
21
-
22
- var toString = Object.prototype.toString;
23
-
24
- // eslint-disable-next-line func-names
25
- var kindOf = (function(cache) {
26
- // eslint-disable-next-line func-names
27
- return function(thing) {
28
- var str = toString.call(thing);
29
- return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
30
- };
31
- })(Object.create(null));
32
-
33
- function kindOfTest(type) {
34
- type = type.toLowerCase();
35
- return function isKindOf(thing) {
36
- return kindOf(thing) === type;
37
- };
38
- }
39
-
40
- /**
41
- * Determine if a value is an Array
42
- *
43
- * @param {Object} val The value to test
44
- * @returns {boolean} True if value is an Array, otherwise false
45
- */
46
- function isArray(val) {
47
- return Array.isArray(val);
48
- }
49
-
50
- /**
51
- * Determine if a value is undefined
52
- *
53
- * @param {Object} val The value to test
54
- * @returns {boolean} True if the value is undefined, otherwise false
55
- */
56
- function isUndefined(val) {
57
- return typeof val === 'undefined';
58
- }
59
-
60
- /**
61
- * Determine if a value is a Buffer
62
- *
63
- * @param {Object} val The value to test
64
- * @returns {boolean} True if value is a Buffer, otherwise false
65
- */
66
- function isBuffer(val) {
67
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
68
- && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
69
- }
70
-
71
- /**
72
- * Determine if a value is an ArrayBuffer
73
- *
74
- * @function
75
- * @param {Object} val The value to test
76
- * @returns {boolean} True if value is an ArrayBuffer, otherwise false
77
- */
78
- var isArrayBuffer = kindOfTest('ArrayBuffer');
79
-
80
-
81
- /**
82
- * Determine if a value is a view on an ArrayBuffer
83
- *
84
- * @param {Object} val The value to test
85
- * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
86
- */
87
- function isArrayBufferView(val) {
88
- var result;
89
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
90
- result = ArrayBuffer.isView(val);
91
- } else {
92
- result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
93
- }
94
- return result;
95
- }
96
-
97
- /**
98
- * Determine if a value is a String
99
- *
100
- * @param {Object} val The value to test
101
- * @returns {boolean} True if value is a String, otherwise false
102
- */
103
- function isString(val) {
104
- return typeof val === 'string';
105
- }
106
-
107
- /**
108
- * Determine if a value is a Number
109
- *
110
- * @param {Object} val The value to test
111
- * @returns {boolean} True if value is a Number, otherwise false
112
- */
113
- function isNumber(val) {
114
- return typeof val === 'number';
115
- }
116
-
117
- /**
118
- * Determine if a value is an Object
119
- *
120
- * @param {Object} val The value to test
121
- * @returns {boolean} True if value is an Object, otherwise false
122
- */
123
- function isObject(val) {
124
- return val !== null && typeof val === 'object';
125
- }
126
-
127
- /**
128
- * Determine if a value is a plain Object
129
- *
130
- * @param {Object} val The value to test
131
- * @return {boolean} True if value is a plain Object, otherwise false
132
- */
133
- function isPlainObject(val) {
134
- if (kindOf(val) !== 'object') {
135
- return false;
136
- }
137
-
138
- var prototype = Object.getPrototypeOf(val);
139
- return prototype === null || prototype === Object.prototype;
140
- }
141
-
142
- /**
143
- * Determine if a value is a Date
144
- *
145
- * @function
146
- * @param {Object} val The value to test
147
- * @returns {boolean} True if value is a Date, otherwise false
148
- */
149
- var isDate = kindOfTest('Date');
150
-
151
- /**
152
- * Determine if a value is a File
153
- *
154
- * @function
155
- * @param {Object} val The value to test
156
- * @returns {boolean} True if value is a File, otherwise false
157
- */
158
- var isFile = kindOfTest('File');
159
-
160
- /**
161
- * Determine if a value is a Blob
162
- *
163
- * @function
164
- * @param {Object} val The value to test
165
- * @returns {boolean} True if value is a Blob, otherwise false
166
- */
167
- var isBlob = kindOfTest('Blob');
168
-
169
- /**
170
- * Determine if a value is a FileList
171
- *
172
- * @function
173
- * @param {Object} val The value to test
174
- * @returns {boolean} True if value is a File, otherwise false
175
- */
176
- var isFileList = kindOfTest('FileList');
177
-
178
- /**
179
- * Determine if a value is a Function
180
- *
181
- * @param {Object} val The value to test
182
- * @returns {boolean} True if value is a Function, otherwise false
183
- */
184
- function isFunction(val) {
185
- return toString.call(val) === '[object Function]';
186
- }
187
-
188
- /**
189
- * Determine if a value is a Stream
190
- *
191
- * @param {Object} val The value to test
192
- * @returns {boolean} True if value is a Stream, otherwise false
193
- */
194
- function isStream(val) {
195
- return isObject(val) && isFunction(val.pipe);
196
- }
197
-
198
- /**
199
- * Determine if a value is a FormData
200
- *
201
- * @param {Object} thing The value to test
202
- * @returns {boolean} True if value is an FormData, otherwise false
203
- */
204
- function isFormData(thing) {
205
- var pattern = '[object FormData]';
206
- return thing && (
207
- (typeof FormData === 'function' && thing instanceof FormData) ||
208
- toString.call(thing) === pattern ||
209
- (isFunction(thing.toString) && thing.toString() === pattern)
210
- );
211
- }
212
-
213
- /**
214
- * Determine if a value is a URLSearchParams object
215
- * @function
216
- * @param {Object} val The value to test
217
- * @returns {boolean} True if value is a URLSearchParams object, otherwise false
218
- */
219
- var isURLSearchParams = kindOfTest('URLSearchParams');
220
-
221
- /**
222
- * Trim excess whitespace off the beginning and end of a string
223
- *
224
- * @param {String} str The String to trim
225
- * @returns {String} The String freed of excess whitespace
226
- */
227
- function trim(str) {
228
- return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
229
- }
230
-
231
- /**
232
- * Determine if we're running in a standard browser environment
233
- *
234
- * This allows axios to run in a web worker, and react-native.
235
- * Both environments support XMLHttpRequest, but not fully standard globals.
236
- *
237
- * web workers:
238
- * typeof window -> undefined
239
- * typeof document -> undefined
240
- *
241
- * react-native:
242
- * navigator.product -> 'ReactNative'
243
- * nativescript
244
- * navigator.product -> 'NativeScript' or 'NS'
245
- */
246
- function isStandardBrowserEnv() {
247
- if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
248
- navigator.product === 'NativeScript' ||
249
- navigator.product === 'NS')) {
250
- return false;
251
- }
252
- return (
253
- typeof window !== 'undefined' &&
254
- typeof document !== 'undefined'
255
- );
256
- }
257
-
258
- /**
259
- * Iterate over an Array or an Object invoking a function for each item.
260
- *
261
- * If `obj` is an Array callback will be called passing
262
- * the value, index, and complete array for each item.
263
- *
264
- * If 'obj' is an Object callback will be called passing
265
- * the value, key, and complete object for each property.
266
- *
267
- * @param {Object|Array} obj The object to iterate
268
- * @param {Function} fn The callback to invoke for each item
269
- */
270
- function forEach(obj, fn) {
271
- // Don't bother if no value provided
272
- if (obj === null || typeof obj === 'undefined') {
273
- return;
274
- }
275
-
276
- // Force an array if not already something iterable
277
- if (typeof obj !== 'object') {
278
- /*eslint no-param-reassign:0*/
279
- obj = [obj];
280
- }
281
-
282
- if (isArray(obj)) {
283
- // Iterate over array values
284
- for (var i = 0, l = obj.length; i < l; i++) {
285
- fn.call(null, obj[i], i, obj);
286
- }
287
- } else {
288
- // Iterate over object keys
289
- for (var key in obj) {
290
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
291
- fn.call(null, obj[key], key, obj);
292
- }
293
- }
294
- }
295
- }
296
-
297
- /**
298
- * Accepts varargs expecting each argument to be an object, then
299
- * immutably merges the properties of each object and returns result.
300
- *
301
- * When multiple objects contain the same key the later object in
302
- * the arguments list will take precedence.
303
- *
304
- * Example:
305
- *
306
- * ```js
307
- * var result = merge({foo: 123}, {foo: 456});
308
- * console.log(result.foo); // outputs 456
309
- * ```
310
- *
311
- * @param {Object} obj1 Object to merge
312
- * @returns {Object} Result of all merge properties
313
- */
314
- function merge(/* obj1, obj2, obj3, ... */) {
315
- var result = {};
316
- function assignValue(val, key) {
317
- if (isPlainObject(result[key]) && isPlainObject(val)) {
318
- result[key] = merge(result[key], val);
319
- } else if (isPlainObject(val)) {
320
- result[key] = merge({}, val);
321
- } else if (isArray(val)) {
322
- result[key] = val.slice();
323
- } else {
324
- result[key] = val;
325
- }
326
- }
327
-
328
- for (var i = 0, l = arguments.length; i < l; i++) {
329
- forEach(arguments[i], assignValue);
330
- }
331
- return result;
332
- }
333
-
334
- /**
335
- * Extends object a by mutably adding to it the properties of object b.
336
- *
337
- * @param {Object} a The object to be extended
338
- * @param {Object} b The object to copy properties from
339
- * @param {Object} thisArg The object to bind function to
340
- * @return {Object} The resulting value of object a
341
- */
342
- function extend(a, b, thisArg) {
343
- forEach(b, function assignValue(val, key) {
344
- if (thisArg && typeof val === 'function') {
345
- a[key] = bind(val, thisArg);
346
- } else {
347
- a[key] = val;
348
- }
349
- });
350
- return a;
351
- }
352
-
353
- /**
354
- * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
355
- *
356
- * @param {string} content with BOM
357
- * @return {string} content value without BOM
358
- */
359
- function stripBOM(content) {
360
- if (content.charCodeAt(0) === 0xFEFF) {
361
- content = content.slice(1);
362
- }
363
- return content;
364
- }
365
-
366
- /**
367
- * Inherit the prototype methods from one constructor into another
368
- * @param {function} constructor
369
- * @param {function} superConstructor
370
- * @param {object} [props]
371
- * @param {object} [descriptors]
372
- */
373
-
374
- function inherits(constructor, superConstructor, props, descriptors) {
375
- constructor.prototype = Object.create(superConstructor.prototype, descriptors);
376
- constructor.prototype.constructor = constructor;
377
- props && Object.assign(constructor.prototype, props);
378
- }
379
-
380
- /**
381
- * Resolve object with deep prototype chain to a flat object
382
- * @param {Object} sourceObj source object
383
- * @param {Object} [destObj]
384
- * @param {Function} [filter]
385
- * @returns {Object}
386
- */
387
-
388
- function toFlatObject(sourceObj, destObj, filter) {
389
- var props;
390
- var i;
391
- var prop;
392
- var merged = {};
393
-
394
- destObj = destObj || {};
395
-
396
- do {
397
- props = Object.getOwnPropertyNames(sourceObj);
398
- i = props.length;
399
- while (i-- > 0) {
400
- prop = props[i];
401
- if (!merged[prop]) {
402
- destObj[prop] = sourceObj[prop];
403
- merged[prop] = true;
404
- }
405
- }
406
- sourceObj = Object.getPrototypeOf(sourceObj);
407
- } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
408
-
409
- return destObj;
410
- }
411
-
412
- /*
413
- * determines whether a string ends with the characters of a specified string
414
- * @param {String} str
415
- * @param {String} searchString
416
- * @param {Number} [position= 0]
417
- * @returns {boolean}
418
- */
419
- function endsWith(str, searchString, position) {
420
- str = String(str);
421
- if (position === undefined || position > str.length) {
422
- position = str.length;
423
- }
424
- position -= searchString.length;
425
- var lastIndex = str.indexOf(searchString, position);
426
- return lastIndex !== -1 && lastIndex === position;
427
- }
428
-
429
-
430
- /**
431
- * Returns new array from array like object
432
- * @param {*} [thing]
433
- * @returns {Array}
434
- */
435
- function toArray(thing) {
436
- if (!thing) return null;
437
- var i = thing.length;
438
- if (isUndefined(i)) return null;
439
- var arr = new Array(i);
440
- while (i-- > 0) {
441
- arr[i] = thing[i];
442
- }
443
- return arr;
444
- }
445
-
446
- // eslint-disable-next-line func-names
447
- var isTypedArray = (function(TypedArray) {
448
- // eslint-disable-next-line func-names
449
- return function(thing) {
450
- return TypedArray && thing instanceof TypedArray;
451
- };
452
- })(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));
453
-
454
- var utils = {
455
- isArray: isArray,
456
- isArrayBuffer: isArrayBuffer,
457
- isBuffer: isBuffer,
458
- isFormData: isFormData,
459
- isArrayBufferView: isArrayBufferView,
460
- isString: isString,
461
- isNumber: isNumber,
462
- isObject: isObject,
463
- isPlainObject: isPlainObject,
464
- isUndefined: isUndefined,
465
- isDate: isDate,
466
- isFile: isFile,
467
- isBlob: isBlob,
468
- isFunction: isFunction,
469
- isStream: isStream,
470
- isURLSearchParams: isURLSearchParams,
471
- isStandardBrowserEnv: isStandardBrowserEnv,
472
- forEach: forEach,
473
- merge: merge,
474
- extend: extend,
475
- trim: trim,
476
- stripBOM: stripBOM,
477
- inherits: inherits,
478
- toFlatObject: toFlatObject,
479
- kindOf: kindOf,
480
- kindOfTest: kindOfTest,
481
- endsWith: endsWith,
482
- toArray: toArray,
483
- isTypedArray: isTypedArray,
484
- isFileList: isFileList
485
- };
486
-
487
- 'use strict';
488
-
489
-
490
-
491
- function encode(val) {
492
- return encodeURIComponent(val).
493
- replace(/%3A/gi, ':').
494
- replace(/%24/g, '$').
495
- replace(/%2C/gi, ',').
496
- replace(/%20/g, '+').
497
- replace(/%5B/gi, '[').
498
- replace(/%5D/gi, ']');
499
- }
500
-
501
- /**
502
- * Build a URL by appending params to the end
503
- *
504
- * @param {string} url The base of the url (e.g., http://www.google.com)
505
- * @param {object} [params] The params to be appended
506
- * @returns {string} The formatted url
507
- */
508
- var buildURL = function buildURL(url, params, paramsSerializer) {
509
- /*eslint no-param-reassign:0*/
510
- if (!params) {
511
- return url;
512
- }
513
-
514
- var serializedParams;
515
- if (paramsSerializer) {
516
- serializedParams = paramsSerializer(params);
517
- } else if (utils.isURLSearchParams(params)) {
518
- serializedParams = params.toString();
519
- } else {
520
- var parts = [];
521
-
522
- utils.forEach(params, function serialize(val, key) {
523
- if (val === null || typeof val === 'undefined') {
524
- return;
525
- }
526
-
527
- if (utils.isArray(val)) {
528
- key = key + '[]';
529
- } else {
530
- val = [val];
531
- }
532
-
533
- utils.forEach(val, function parseValue(v) {
534
- if (utils.isDate(v)) {
535
- v = v.toISOString();
536
- } else if (utils.isObject(v)) {
537
- v = JSON.stringify(v);
538
- }
539
- parts.push(encode(key) + '=' + encode(v));
540
- });
541
- });
542
-
543
- serializedParams = parts.join('&');
544
- }
545
-
546
- if (serializedParams) {
547
- var hashmarkIndex = url.indexOf('#');
548
- if (hashmarkIndex !== -1) {
549
- url = url.slice(0, hashmarkIndex);
550
- }
551
-
552
- url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
553
- }
554
-
555
- return url;
556
- };
557
-
558
- 'use strict';
559
-
560
-
561
-
562
- function InterceptorManager() {
563
- this.handlers = [];
564
- }
565
-
566
- /**
567
- * Add a new interceptor to the stack
568
- *
569
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
570
- * @param {Function} rejected The function to handle `reject` for a `Promise`
571
- *
572
- * @return {Number} An ID used to remove interceptor later
573
- */
574
- InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
575
- this.handlers.push({
576
- fulfilled: fulfilled,
577
- rejected: rejected,
578
- synchronous: options ? options.synchronous : false,
579
- runWhen: options ? options.runWhen : null
580
- });
581
- return this.handlers.length - 1;
582
- };
583
-
584
- /**
585
- * Remove an interceptor from the stack
586
- *
587
- * @param {Number} id The ID that was returned by `use`
588
- */
589
- InterceptorManager.prototype.eject = function eject(id) {
590
- if (this.handlers[id]) {
591
- this.handlers[id] = null;
592
- }
593
- };
594
-
595
- /**
596
- * Iterate over all the registered interceptors
597
- *
598
- * This method is particularly useful for skipping over any
599
- * interceptors that may have become `null` calling `eject`.
600
- *
601
- * @param {Function} fn The function to call for each interceptor
602
- */
603
- InterceptorManager.prototype.forEach = function forEach(fn) {
604
- utils.forEach(this.handlers, function forEachHandler(h) {
605
- if (h !== null) {
606
- fn(h);
607
- }
608
- });
609
- };
610
-
611
- var InterceptorManager_1 = InterceptorManager;
612
-
613
- 'use strict';
614
-
615
-
616
-
617
- var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
618
- utils.forEach(headers, function processHeader(value, name) {
619
- if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
620
- headers[normalizedName] = value;
621
- delete headers[name];
622
- }
623
- });
624
- };
625
-
626
- 'use strict';
627
-
628
-
629
-
630
- /**
631
- * Create an Error with the specified message, config, error code, request and response.
632
- *
633
- * @param {string} message The error message.
634
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
635
- * @param {Object} [config] The config.
636
- * @param {Object} [request] The request.
637
- * @param {Object} [response] The response.
638
- * @returns {Error} The created error.
639
- */
640
- function AxiosError(message, code, config, request, response) {
641
- Error.call(this);
642
- this.message = message;
643
- this.name = 'AxiosError';
644
- code && (this.code = code);
645
- config && (this.config = config);
646
- request && (this.request = request);
647
- response && (this.response = response);
648
- }
649
-
650
- utils.inherits(AxiosError, Error, {
651
- toJSON: function toJSON() {
652
- return {
653
- // Standard
654
- message: this.message,
655
- name: this.name,
656
- // Microsoft
657
- description: this.description,
658
- number: this.number,
659
- // Mozilla
660
- fileName: this.fileName,
661
- lineNumber: this.lineNumber,
662
- columnNumber: this.columnNumber,
663
- stack: this.stack,
664
- // Axios
665
- config: this.config,
666
- code: this.code,
667
- status: this.response && this.response.status ? this.response.status : null
668
- };
669
- }
670
- });
671
-
672
- var prototype = AxiosError.prototype;
673
- var descriptors = {};
674
-
675
- [
676
- 'ERR_BAD_OPTION_VALUE',
677
- 'ERR_BAD_OPTION',
678
- 'ECONNABORTED',
679
- 'ETIMEDOUT',
680
- 'ERR_NETWORK',
681
- 'ERR_FR_TOO_MANY_REDIRECTS',
682
- 'ERR_DEPRECATED',
683
- 'ERR_BAD_RESPONSE',
684
- 'ERR_BAD_REQUEST',
685
- 'ERR_CANCELED'
686
- // eslint-disable-next-line func-names
687
- ].forEach(function(code) {
688
- descriptors[code] = {value: code};
689
- });
690
-
691
- Object.defineProperties(AxiosError, descriptors);
692
- Object.defineProperty(prototype, 'isAxiosError', {value: true});
693
-
694
- // eslint-disable-next-line func-names
695
- AxiosError.from = function(error, code, config, request, response, customProps) {
696
- var axiosError = Object.create(prototype);
697
-
698
- utils.toFlatObject(error, axiosError, function filter(obj) {
699
- return obj !== Error.prototype;
700
- });
701
-
702
- AxiosError.call(axiosError, error.message, code, config, request, response);
703
-
704
- axiosError.name = error.name;
705
-
706
- customProps && Object.assign(axiosError, customProps);
707
-
708
- return axiosError;
709
- };
710
-
711
- var AxiosError_1 = AxiosError;
712
-
713
- 'use strict';
714
-
715
- var transitional = {
716
- silentJSONParsing: true,
717
- forcedJSONParsing: true,
718
- clarifyTimeoutError: false
719
- };
720
-
721
- 'use strict';
722
-
723
-
724
-
725
- /**
726
- * Convert a data object to FormData
727
- * @param {Object} obj
728
- * @param {?Object} [formData]
729
- * @returns {Object}
730
- **/
731
-
732
- function toFormData(obj, formData) {
733
- // eslint-disable-next-line no-param-reassign
734
- formData = formData || new FormData();
735
-
736
- var stack = [];
737
-
738
- function convertValue(value) {
739
- if (value === null) return '';
740
-
741
- if (utils.isDate(value)) {
742
- return value.toISOString();
743
- }
744
-
745
- if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
746
- return typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
747
- }
748
-
749
- return value;
750
- }
751
-
752
- function build(data, parentKey) {
753
- if (utils.isPlainObject(data) || utils.isArray(data)) {
754
- if (stack.indexOf(data) !== -1) {
755
- throw Error('Circular reference detected in ' + parentKey);
756
- }
757
-
758
- stack.push(data);
759
-
760
- utils.forEach(data, function each(value, key) {
761
- if (utils.isUndefined(value)) return;
762
- var fullKey = parentKey ? parentKey + '.' + key : key;
763
- var arr;
764
-
765
- if (value && !parentKey && typeof value === 'object') {
766
- if (utils.endsWith(key, '{}')) {
767
- // eslint-disable-next-line no-param-reassign
768
- value = JSON.stringify(value);
769
- } else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {
770
- // eslint-disable-next-line func-names
771
- arr.forEach(function(el) {
772
- !utils.isUndefined(el) && formData.append(fullKey, convertValue(el));
773
- });
774
- return;
775
- }
776
- }
777
-
778
- build(value, fullKey);
779
- });
780
-
781
- stack.pop();
782
- } else {
783
- formData.append(parentKey, convertValue(data));
784
- }
785
- }
786
-
787
- build(obj);
788
-
789
- return formData;
790
- }
791
-
792
- var toFormData_1 = toFormData;
793
-
794
- 'use strict';
795
-
796
-
797
-
798
- /**
799
- * Resolve or reject a Promise based on response status.
800
- *
801
- * @param {Function} resolve A function that resolves the promise.
802
- * @param {Function} reject A function that rejects the promise.
803
- * @param {object} response The response.
804
- */
805
- var settle = function settle(resolve, reject, response) {
806
- var validateStatus = response.config.validateStatus;
807
- if (!response.status || !validateStatus || validateStatus(response.status)) {
808
- resolve(response);
809
- } else {
810
- reject(new AxiosError_1(
811
- 'Request failed with status code ' + response.status,
812
- [AxiosError_1.ERR_BAD_REQUEST, AxiosError_1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
813
- response.config,
814
- response.request,
815
- response
816
- ));
817
- }
818
- };
819
-
820
- 'use strict';
821
-
822
-
823
-
824
- var cookies = (
825
- utils.isStandardBrowserEnv() ?
826
-
827
- // Standard browser envs support document.cookie
828
- (function standardBrowserEnv() {
829
- return {
830
- write: function write(name, value, expires, path, domain, secure) {
831
- var cookie = [];
832
- cookie.push(name + '=' + encodeURIComponent(value));
833
-
834
- if (utils.isNumber(expires)) {
835
- cookie.push('expires=' + new Date(expires).toGMTString());
836
- }
837
-
838
- if (utils.isString(path)) {
839
- cookie.push('path=' + path);
840
- }
841
-
842
- if (utils.isString(domain)) {
843
- cookie.push('domain=' + domain);
844
- }
845
-
846
- if (secure === true) {
847
- cookie.push('secure');
848
- }
849
-
850
- document.cookie = cookie.join('; ');
851
- },
852
-
853
- read: function read(name) {
854
- var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
855
- return (match ? decodeURIComponent(match[3]) : null);
856
- },
857
-
858
- remove: function remove(name) {
859
- this.write(name, '', Date.now() - 86400000);
860
- }
861
- };
862
- })() :
863
-
864
- // Non standard browser env (web workers, react-native) lack needed support.
865
- (function nonStandardBrowserEnv() {
866
- return {
867
- write: function write() {},
868
- read: function read() { return null; },
869
- remove: function remove() {}
870
- };
871
- })()
872
- );
873
-
874
- 'use strict';
875
-
876
- /**
877
- * Determines whether the specified URL is absolute
878
- *
879
- * @param {string} url The URL to test
880
- * @returns {boolean} True if the specified URL is absolute, otherwise false
881
- */
882
- var isAbsoluteURL = function isAbsoluteURL(url) {
883
- // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
884
- // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
885
- // by any combination of letters, digits, plus, period, or hyphen.
886
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
887
- };
888
-
889
- 'use strict';
890
-
891
- /**
892
- * Creates a new URL by combining the specified URLs
893
- *
894
- * @param {string} baseURL The base URL
895
- * @param {string} relativeURL The relative URL
896
- * @returns {string} The combined URL
897
- */
898
- var combineURLs = function combineURLs(baseURL, relativeURL) {
899
- return relativeURL
900
- ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
901
- : baseURL;
902
- };
903
-
904
- 'use strict';
905
-
906
-
907
-
908
-
909
- /**
910
- * Creates a new URL by combining the baseURL with the requestedURL,
911
- * only when the requestedURL is not already an absolute URL.
912
- * If the requestURL is absolute, this function returns the requestedURL untouched.
913
- *
914
- * @param {string} baseURL The base URL
915
- * @param {string} requestedURL Absolute or relative URL to combine
916
- * @returns {string} The combined full path
917
- */
918
- var buildFullPath = function buildFullPath(baseURL, requestedURL) {
919
- if (baseURL && !isAbsoluteURL(requestedURL)) {
920
- return combineURLs(baseURL, requestedURL);
921
- }
922
- return requestedURL;
923
- };
924
-
925
- 'use strict';
926
-
927
-
928
-
929
- // Headers whose duplicates are ignored by node
930
- // c.f. https://nodejs.org/api/http.html#http_message_headers
931
- var ignoreDuplicateOf = [
932
- 'age', 'authorization', 'content-length', 'content-type', 'etag',
933
- 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
934
- 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
935
- 'referer', 'retry-after', 'user-agent'
936
- ];
937
-
938
- /**
939
- * Parse headers into an object
940
- *
941
- * ```
942
- * Date: Wed, 27 Aug 2014 08:58:49 GMT
943
- * Content-Type: application/json
944
- * Connection: keep-alive
945
- * Transfer-Encoding: chunked
946
- * ```
947
- *
948
- * @param {String} headers Headers needing to be parsed
949
- * @returns {Object} Headers parsed into an object
950
- */
951
- var parseHeaders = function parseHeaders(headers) {
952
- var parsed = {};
953
- var key;
954
- var val;
955
- var i;
956
-
957
- if (!headers) { return parsed; }
958
-
959
- utils.forEach(headers.split('\n'), function parser(line) {
960
- i = line.indexOf(':');
961
- key = utils.trim(line.substr(0, i)).toLowerCase();
962
- val = utils.trim(line.substr(i + 1));
963
-
964
- if (key) {
965
- if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
966
- return;
967
- }
968
- if (key === 'set-cookie') {
969
- parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
970
- } else {
971
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
972
- }
973
- }
974
- });
975
-
976
- return parsed;
977
- };
978
-
979
- 'use strict';
980
-
981
-
982
-
983
- var isURLSameOrigin = (
984
- utils.isStandardBrowserEnv() ?
985
-
986
- // Standard browser envs have full support of the APIs needed to test
987
- // whether the request URL is of the same origin as current location.
988
- (function standardBrowserEnv() {
989
- var msie = /(msie|trident)/i.test(navigator.userAgent);
990
- var urlParsingNode = document.createElement('a');
991
- var originURL;
992
-
993
- /**
994
- * Parse a URL to discover it's components
995
- *
996
- * @param {String} url The URL to be parsed
997
- * @returns {Object}
998
- */
999
- function resolveURL(url) {
1000
- var href = url;
1001
-
1002
- if (msie) {
1003
- // IE needs attribute set twice to normalize properties
1004
- urlParsingNode.setAttribute('href', href);
1005
- href = urlParsingNode.href;
1006
- }
1007
-
1008
- urlParsingNode.setAttribute('href', href);
1009
-
1010
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
1011
- return {
1012
- href: urlParsingNode.href,
1013
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
1014
- host: urlParsingNode.host,
1015
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
1016
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
1017
- hostname: urlParsingNode.hostname,
1018
- port: urlParsingNode.port,
1019
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
1020
- urlParsingNode.pathname :
1021
- '/' + urlParsingNode.pathname
1022
- };
1023
- }
1024
-
1025
- originURL = resolveURL(window.location.href);
1026
-
1027
- /**
1028
- * Determine if a URL shares the same origin as the current location
1029
- *
1030
- * @param {String} requestURL The URL to test
1031
- * @returns {boolean} True if URL shares the same origin, otherwise false
1032
- */
1033
- return function isURLSameOrigin(requestURL) {
1034
- var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
1035
- return (parsed.protocol === originURL.protocol &&
1036
- parsed.host === originURL.host);
1037
- };
1038
- })() :
1039
-
1040
- // Non standard browser envs (web workers, react-native) lack needed support.
1041
- (function nonStandardBrowserEnv() {
1042
- return function isURLSameOrigin() {
1043
- return true;
1044
- };
1045
- })()
1046
- );
1047
-
1048
- 'use strict';
1049
-
1050
-
1051
-
1052
-
1053
- /**
1054
- * A `CanceledError` is an object that is thrown when an operation is canceled.
1055
- *
1056
- * @class
1057
- * @param {string=} message The message.
1058
- */
1059
- function CanceledError(message) {
1060
- // eslint-disable-next-line no-eq-null,eqeqeq
1061
- AxiosError_1.call(this, message == null ? 'canceled' : message, AxiosError_1.ERR_CANCELED);
1062
- this.name = 'CanceledError';
1063
- }
1064
-
1065
- utils.inherits(CanceledError, AxiosError_1, {
1066
- __CANCEL__: true
1067
- });
1068
-
1069
- var CanceledError_1 = CanceledError;
1070
-
1071
- 'use strict';
1072
-
1073
- var parseProtocol = function parseProtocol(url) {
1074
- var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
1075
- return match && match[1] || '';
1076
- };
1077
-
1078
- 'use strict';
1079
-
1080
-
1081
-
1082
-
1083
-
1084
-
1085
-
1086
-
1087
-
1088
-
1089
-
1090
-
1091
-
1092
- var xhr = function xhrAdapter(config) {
1093
- return new Promise(function dispatchXhrRequest(resolve, reject) {
1094
- var requestData = config.data;
1095
- var requestHeaders = config.headers;
1096
- var responseType = config.responseType;
1097
- var onCanceled;
1098
- function done() {
1099
- if (config.cancelToken) {
1100
- config.cancelToken.unsubscribe(onCanceled);
1101
- }
1102
-
1103
- if (config.signal) {
1104
- config.signal.removeEventListener('abort', onCanceled);
1105
- }
1106
- }
1107
-
1108
- if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
1109
- delete requestHeaders['Content-Type']; // Let the browser set it
1110
- }
1111
-
1112
- var request = new XMLHttpRequest();
1113
-
1114
- // HTTP basic authentication
1115
- if (config.auth) {
1116
- var username = config.auth.username || '';
1117
- var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
1118
- requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
1119
- }
1120
-
1121
- var fullPath = buildFullPath(config.baseURL, config.url);
1122
-
1123
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
1124
-
1125
- // Set the request timeout in MS
1126
- request.timeout = config.timeout;
1127
-
1128
- function onloadend() {
1129
- if (!request) {
1130
- return;
1131
- }
1132
- // Prepare the response
1133
- var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
1134
- var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
1135
- request.responseText : request.response;
1136
- var response = {
1137
- data: responseData,
1138
- status: request.status,
1139
- statusText: request.statusText,
1140
- headers: responseHeaders,
1141
- config: config,
1142
- request: request
1143
- };
1144
-
1145
- settle(function _resolve(value) {
1146
- resolve(value);
1147
- done();
1148
- }, function _reject(err) {
1149
- reject(err);
1150
- done();
1151
- }, response);
1152
-
1153
- // Clean up request
1154
- request = null;
1155
- }
1156
-
1157
- if ('onloadend' in request) {
1158
- // Use onloadend if available
1159
- request.onloadend = onloadend;
1160
- } else {
1161
- // Listen for ready state to emulate onloadend
1162
- request.onreadystatechange = function handleLoad() {
1163
- if (!request || request.readyState !== 4) {
1164
- return;
1165
- }
1166
-
1167
- // The request errored out and we didn't get a response, this will be
1168
- // handled by onerror instead
1169
- // With one exception: request that using file: protocol, most browsers
1170
- // will return status as 0 even though it's a successful request
1171
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
1172
- return;
1173
- }
1174
- // readystate handler is calling before onerror or ontimeout handlers,
1175
- // so we should call onloadend on the next 'tick'
1176
- setTimeout(onloadend);
1177
- };
1178
- }
1179
-
1180
- // Handle browser request cancellation (as opposed to a manual cancellation)
1181
- request.onabort = function handleAbort() {
1182
- if (!request) {
1183
- return;
1184
- }
1185
-
1186
- reject(new AxiosError_1('Request aborted', AxiosError_1.ECONNABORTED, config, request));
1187
-
1188
- // Clean up request
1189
- request = null;
1190
- };
1191
-
1192
- // Handle low level network errors
1193
- request.onerror = function handleError() {
1194
- // Real errors are hidden from us by the browser
1195
- // onerror should only fire if it's a network error
1196
- reject(new AxiosError_1('Network Error', AxiosError_1.ERR_NETWORK, config, request, request));
1197
-
1198
- // Clean up request
1199
- request = null;
1200
- };
1201
-
1202
- // Handle timeout
1203
- request.ontimeout = function handleTimeout() {
1204
- var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
1205
- var transitional$1 = config.transitional || transitional;
1206
- if (config.timeoutErrorMessage) {
1207
- timeoutErrorMessage = config.timeoutErrorMessage;
1208
- }
1209
- reject(new AxiosError_1(
1210
- timeoutErrorMessage,
1211
- transitional$1.clarifyTimeoutError ? AxiosError_1.ETIMEDOUT : AxiosError_1.ECONNABORTED,
1212
- config,
1213
- request));
1214
-
1215
- // Clean up request
1216
- request = null;
1217
- };
1218
-
1219
- // Add xsrf header
1220
- // This is only done if running in a standard browser environment.
1221
- // Specifically not if we're in a web worker, or react-native.
1222
- if (utils.isStandardBrowserEnv()) {
1223
- // Add xsrf header
1224
- var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
1225
- cookies.read(config.xsrfCookieName) :
1226
- undefined;
1227
-
1228
- if (xsrfValue) {
1229
- requestHeaders[config.xsrfHeaderName] = xsrfValue;
1230
- }
1231
- }
1232
-
1233
- // Add headers to the request
1234
- if ('setRequestHeader' in request) {
1235
- utils.forEach(requestHeaders, function setRequestHeader(val, key) {
1236
- if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
1237
- // Remove Content-Type if data is undefined
1238
- delete requestHeaders[key];
1239
- } else {
1240
- // Otherwise add header to the request
1241
- request.setRequestHeader(key, val);
1242
- }
1243
- });
1244
- }
1245
-
1246
- // Add withCredentials to request if needed
1247
- if (!utils.isUndefined(config.withCredentials)) {
1248
- request.withCredentials = !!config.withCredentials;
1249
- }
1250
-
1251
- // Add responseType to request if needed
1252
- if (responseType && responseType !== 'json') {
1253
- request.responseType = config.responseType;
1254
- }
1255
-
1256
- // Handle progress if needed
1257
- if (typeof config.onDownloadProgress === 'function') {
1258
- request.addEventListener('progress', config.onDownloadProgress);
1259
- }
1260
-
1261
- // Not all browsers support upload events
1262
- if (typeof config.onUploadProgress === 'function' && request.upload) {
1263
- request.upload.addEventListener('progress', config.onUploadProgress);
1264
- }
1265
-
1266
- if (config.cancelToken || config.signal) {
1267
- // Handle cancellation
1268
- // eslint-disable-next-line func-names
1269
- onCanceled = function(cancel) {
1270
- if (!request) {
1271
- return;
1272
- }
1273
- reject(!cancel || (cancel && cancel.type) ? new CanceledError_1() : cancel);
1274
- request.abort();
1275
- request = null;
1276
- };
1277
-
1278
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
1279
- if (config.signal) {
1280
- config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
1281
- }
1282
- }
1283
-
1284
- if (!requestData) {
1285
- requestData = null;
1286
- }
1287
-
1288
- var protocol = parseProtocol(fullPath);
1289
-
1290
- if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) {
1291
- reject(new AxiosError_1('Unsupported protocol ' + protocol + ':', AxiosError_1.ERR_BAD_REQUEST, config));
1292
- return;
1293
- }
1294
-
1295
-
1296
- // Send the request
1297
- request.send(requestData);
1298
- });
1299
- };
1300
-
1301
- // eslint-disable-next-line strict
1302
- var _null = null;
1303
-
1304
- 'use strict';
1305
-
1306
-
1307
-
1308
-
1309
-
1310
-
1311
-
1312
- var DEFAULT_CONTENT_TYPE = {
1313
- 'Content-Type': 'application/x-www-form-urlencoded'
1314
- };
1315
-
1316
- function setContentTypeIfUnset(headers, value) {
1317
- if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
1318
- headers['Content-Type'] = value;
1319
- }
1320
- }
1321
-
1322
- function getDefaultAdapter() {
1323
- var adapter;
1324
- if (typeof XMLHttpRequest !== 'undefined') {
1325
- // For browsers use XHR adapter
1326
- adapter = xhr;
1327
- } else if (typeof process_1 !== 'undefined' && Object.prototype.toString.call(process_1) === '[object process]') {
1328
- // For node use HTTP adapter
1329
- adapter = xhr;
1330
- }
1331
- return adapter;
1332
- }
1333
-
1334
- function stringifySafely(rawValue, parser, encoder) {
1335
- if (utils.isString(rawValue)) {
1336
- try {
1337
- (parser || JSON.parse)(rawValue);
1338
- return utils.trim(rawValue);
1339
- } catch (e) {
1340
- if (e.name !== 'SyntaxError') {
1341
- throw e;
1342
- }
1343
- }
1344
- }
1345
-
1346
- return (encoder || JSON.stringify)(rawValue);
1347
- }
1348
-
1349
- var defaults = {
1350
-
1351
- transitional: transitional,
1352
-
1353
- adapter: getDefaultAdapter(),
1354
-
1355
- transformRequest: [function transformRequest(data, headers) {
1356
- normalizeHeaderName(headers, 'Accept');
1357
- normalizeHeaderName(headers, 'Content-Type');
1358
-
1359
- if (utils.isFormData(data) ||
1360
- utils.isArrayBuffer(data) ||
1361
- utils.isBuffer(data) ||
1362
- utils.isStream(data) ||
1363
- utils.isFile(data) ||
1364
- utils.isBlob(data)
1365
- ) {
1366
- return data;
1367
- }
1368
- if (utils.isArrayBufferView(data)) {
1369
- return data.buffer;
1370
- }
1371
- if (utils.isURLSearchParams(data)) {
1372
- setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
1373
- return data.toString();
1374
- }
1375
-
1376
- var isObjectPayload = utils.isObject(data);
1377
- var contentType = headers && headers['Content-Type'];
1378
-
1379
- var isFileList;
1380
-
1381
- if ((isFileList = utils.isFileList(data)) || (isObjectPayload && contentType === 'multipart/form-data')) {
1382
- var _FormData = this.env && this.env.FormData;
1383
- return toFormData_1(isFileList ? {'files[]': data} : data, _FormData && new _FormData());
1384
- } else if (isObjectPayload || contentType === 'application/json') {
1385
- setContentTypeIfUnset(headers, 'application/json');
1386
- return stringifySafely(data);
1387
- }
1388
-
1389
- return data;
1390
- }],
1391
-
1392
- transformResponse: [function transformResponse(data) {
1393
- var transitional = this.transitional || defaults.transitional;
1394
- var silentJSONParsing = transitional && transitional.silentJSONParsing;
1395
- var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1396
- var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
1397
-
1398
- if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
1399
- try {
1400
- return JSON.parse(data);
1401
- } catch (e) {
1402
- if (strictJSONParsing) {
1403
- if (e.name === 'SyntaxError') {
1404
- throw AxiosError_1.from(e, AxiosError_1.ERR_BAD_RESPONSE, this, null, this.response);
1405
- }
1406
- throw e;
1407
- }
1408
- }
1409
- }
1410
-
1411
- return data;
1412
- }],
1413
-
1414
- /**
1415
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
1416
- * timeout is not created.
1417
- */
1418
- timeout: 0,
1419
-
1420
- xsrfCookieName: 'XSRF-TOKEN',
1421
- xsrfHeaderName: 'X-XSRF-TOKEN',
1422
-
1423
- maxContentLength: -1,
1424
- maxBodyLength: -1,
1425
-
1426
- env: {
1427
- FormData: _null
1428
- },
1429
-
1430
- validateStatus: function validateStatus(status) {
1431
- return status >= 200 && status < 300;
1432
- },
1433
-
1434
- headers: {
1435
- common: {
1436
- 'Accept': 'application/json, text/plain, */*'
1437
- }
1438
- }
1439
- };
1440
-
1441
- utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
1442
- defaults.headers[method] = {};
1443
- });
1444
-
1445
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1446
- defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
1447
- });
1448
-
1449
- var defaults_1 = defaults;
1450
-
1451
- 'use strict';
1452
-
1453
-
1454
-
1455
-
1456
- /**
1457
- * Transform the data for a request or a response
1458
- *
1459
- * @param {Object|String} data The data to be transformed
1460
- * @param {Array} headers The headers for the request or response
1461
- * @param {Array|Function} fns A single function or Array of functions
1462
- * @returns {*} The resulting transformed data
1463
- */
1464
- var transformData = function transformData(data, headers, fns) {
1465
- var context = this || defaults_1;
1466
- /*eslint no-param-reassign:0*/
1467
- utils.forEach(fns, function transform(fn) {
1468
- data = fn.call(context, data, headers);
1469
- });
1470
-
1471
- return data;
1472
- };
1473
-
1474
- 'use strict';
1475
-
1476
- var isCancel = function isCancel(value) {
1477
- return !!(value && value.__CANCEL__);
1478
- };
1479
-
1480
- 'use strict';
1481
-
1482
-
1483
-
1484
-
1485
-
1486
-
1487
-
1488
- /**
1489
- * Throws a `CanceledError` if cancellation has been requested.
1490
- */
1491
- function throwIfCancellationRequested(config) {
1492
- if (config.cancelToken) {
1493
- config.cancelToken.throwIfRequested();
1494
- }
1495
-
1496
- if (config.signal && config.signal.aborted) {
1497
- throw new CanceledError_1();
1498
- }
1499
- }
1500
-
1501
- /**
1502
- * Dispatch a request to the server using the configured adapter.
1503
- *
1504
- * @param {object} config The config that is to be used for the request
1505
- * @returns {Promise} The Promise to be fulfilled
1506
- */
1507
- var dispatchRequest = function dispatchRequest(config) {
1508
- throwIfCancellationRequested(config);
1509
-
1510
- // Ensure headers exist
1511
- config.headers = config.headers || {};
1512
-
1513
- // Transform request data
1514
- config.data = transformData.call(
1515
- config,
1516
- config.data,
1517
- config.headers,
1518
- config.transformRequest
1519
- );
1520
-
1521
- // Flatten headers
1522
- config.headers = utils.merge(
1523
- config.headers.common || {},
1524
- config.headers[config.method] || {},
1525
- config.headers
1526
- );
1527
-
1528
- utils.forEach(
1529
- ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
1530
- function cleanHeaderConfig(method) {
1531
- delete config.headers[method];
1532
- }
1533
- );
1534
-
1535
- var adapter = config.adapter || defaults_1.adapter;
1536
-
1537
- return adapter(config).then(function onAdapterResolution(response) {
1538
- throwIfCancellationRequested(config);
1539
-
1540
- // Transform response data
1541
- response.data = transformData.call(
1542
- config,
1543
- response.data,
1544
- response.headers,
1545
- config.transformResponse
1546
- );
1547
-
1548
- return response;
1549
- }, function onAdapterRejection(reason) {
1550
- if (!isCancel(reason)) {
1551
- throwIfCancellationRequested(config);
1552
-
1553
- // Transform response data
1554
- if (reason && reason.response) {
1555
- reason.response.data = transformData.call(
1556
- config,
1557
- reason.response.data,
1558
- reason.response.headers,
1559
- config.transformResponse
1560
- );
1561
- }
1562
- }
1563
-
1564
- return Promise.reject(reason);
1565
- });
1566
- };
1567
-
1568
- 'use strict';
1569
-
1570
-
1571
-
1572
- /**
1573
- * Config-specific merge-function which creates a new config-object
1574
- * by merging two configuration objects together.
1575
- *
1576
- * @param {Object} config1
1577
- * @param {Object} config2
1578
- * @returns {Object} New object resulting from merging config2 to config1
1579
- */
1580
- var mergeConfig = function mergeConfig(config1, config2) {
1581
- // eslint-disable-next-line no-param-reassign
1582
- config2 = config2 || {};
1583
- var config = {};
1584
-
1585
- function getMergedValue(target, source) {
1586
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
1587
- return utils.merge(target, source);
1588
- } else if (utils.isPlainObject(source)) {
1589
- return utils.merge({}, source);
1590
- } else if (utils.isArray(source)) {
1591
- return source.slice();
1592
- }
1593
- return source;
1594
- }
1595
-
1596
- // eslint-disable-next-line consistent-return
1597
- function mergeDeepProperties(prop) {
1598
- if (!utils.isUndefined(config2[prop])) {
1599
- return getMergedValue(config1[prop], config2[prop]);
1600
- } else if (!utils.isUndefined(config1[prop])) {
1601
- return getMergedValue(undefined, config1[prop]);
1602
- }
1603
- }
1604
-
1605
- // eslint-disable-next-line consistent-return
1606
- function valueFromConfig2(prop) {
1607
- if (!utils.isUndefined(config2[prop])) {
1608
- return getMergedValue(undefined, config2[prop]);
1609
- }
1610
- }
1611
-
1612
- // eslint-disable-next-line consistent-return
1613
- function defaultToConfig2(prop) {
1614
- if (!utils.isUndefined(config2[prop])) {
1615
- return getMergedValue(undefined, config2[prop]);
1616
- } else if (!utils.isUndefined(config1[prop])) {
1617
- return getMergedValue(undefined, config1[prop]);
1618
- }
1619
- }
1620
-
1621
- // eslint-disable-next-line consistent-return
1622
- function mergeDirectKeys(prop) {
1623
- if (prop in config2) {
1624
- return getMergedValue(config1[prop], config2[prop]);
1625
- } else if (prop in config1) {
1626
- return getMergedValue(undefined, config1[prop]);
1627
- }
1628
- }
1629
-
1630
- var mergeMap = {
1631
- 'url': valueFromConfig2,
1632
- 'method': valueFromConfig2,
1633
- 'data': valueFromConfig2,
1634
- 'baseURL': defaultToConfig2,
1635
- 'transformRequest': defaultToConfig2,
1636
- 'transformResponse': defaultToConfig2,
1637
- 'paramsSerializer': defaultToConfig2,
1638
- 'timeout': defaultToConfig2,
1639
- 'timeoutMessage': defaultToConfig2,
1640
- 'withCredentials': defaultToConfig2,
1641
- 'adapter': defaultToConfig2,
1642
- 'responseType': defaultToConfig2,
1643
- 'xsrfCookieName': defaultToConfig2,
1644
- 'xsrfHeaderName': defaultToConfig2,
1645
- 'onUploadProgress': defaultToConfig2,
1646
- 'onDownloadProgress': defaultToConfig2,
1647
- 'decompress': defaultToConfig2,
1648
- 'maxContentLength': defaultToConfig2,
1649
- 'maxBodyLength': defaultToConfig2,
1650
- 'beforeRedirect': defaultToConfig2,
1651
- 'transport': defaultToConfig2,
1652
- 'httpAgent': defaultToConfig2,
1653
- 'httpsAgent': defaultToConfig2,
1654
- 'cancelToken': defaultToConfig2,
1655
- 'socketPath': defaultToConfig2,
1656
- 'responseEncoding': defaultToConfig2,
1657
- 'validateStatus': mergeDirectKeys
1658
- };
1659
-
1660
- utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
1661
- var merge = mergeMap[prop] || mergeDeepProperties;
1662
- var configValue = merge(prop);
1663
- (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
1664
- });
1665
-
1666
- return config;
1667
- };
1668
-
1669
- var data = {
1670
- "version": "0.27.2"
1671
- };
1672
-
1673
- 'use strict';
1674
-
1675
- var VERSION = data.version;
1676
-
1677
-
1678
- var validators$1 = {};
1679
-
1680
- // eslint-disable-next-line func-names
1681
- ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
1682
- validators$1[type] = function validator(thing) {
1683
- return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
1684
- };
1685
- });
1686
-
1687
- var deprecatedWarnings = {};
1688
-
1689
- /**
1690
- * Transitional option validator
1691
- * @param {function|boolean?} validator - set to false if the transitional option has been removed
1692
- * @param {string?} version - deprecated version / removed since version
1693
- * @param {string?} message - some message with additional info
1694
- * @returns {function}
1695
- */
1696
- validators$1.transitional = function transitional(validator, version, message) {
1697
- function formatMessage(opt, desc) {
1698
- return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
1699
- }
1700
-
1701
- // eslint-disable-next-line func-names
1702
- return function(value, opt, opts) {
1703
- if (validator === false) {
1704
- throw new AxiosError_1(
1705
- formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
1706
- AxiosError_1.ERR_DEPRECATED
1707
- );
1708
- }
1709
-
1710
- if (version && !deprecatedWarnings[opt]) {
1711
- deprecatedWarnings[opt] = true;
1712
- // eslint-disable-next-line no-console
1713
- console.warn(
1714
- formatMessage(
1715
- opt,
1716
- ' has been deprecated since v' + version + ' and will be removed in the near future'
1717
- )
1718
- );
1719
- }
1720
-
1721
- return validator ? validator(value, opt, opts) : true;
1722
- };
1723
- };
1724
-
1725
- /**
1726
- * Assert object's properties type
1727
- * @param {object} options
1728
- * @param {object} schema
1729
- * @param {boolean?} allowUnknown
1730
- */
1731
-
1732
- function assertOptions(options, schema, allowUnknown) {
1733
- if (typeof options !== 'object') {
1734
- throw new AxiosError_1('options must be an object', AxiosError_1.ERR_BAD_OPTION_VALUE);
1735
- }
1736
- var keys = Object.keys(options);
1737
- var i = keys.length;
1738
- while (i-- > 0) {
1739
- var opt = keys[i];
1740
- var validator = schema[opt];
1741
- if (validator) {
1742
- var value = options[opt];
1743
- var result = value === undefined || validator(value, opt, options);
1744
- if (result !== true) {
1745
- throw new AxiosError_1('option ' + opt + ' must be ' + result, AxiosError_1.ERR_BAD_OPTION_VALUE);
1746
- }
1747
- continue;
1748
- }
1749
- if (allowUnknown !== true) {
1750
- throw new AxiosError_1('Unknown option ' + opt, AxiosError_1.ERR_BAD_OPTION);
1751
- }
1752
- }
1753
- }
1754
-
1755
- var validator = {
1756
- assertOptions: assertOptions,
1757
- validators: validators$1
1758
- };
1759
-
1760
- 'use strict';
1761
-
1762
-
1763
-
1764
-
1765
-
1766
-
1767
-
1768
-
1769
-
1770
- var validators = validator.validators;
1771
- /**
1772
- * Create a new instance of Axios
1773
- *
1774
- * @param {Object} instanceConfig The default config for the instance
1775
- */
1776
- function Axios(instanceConfig) {
1777
- this.defaults = instanceConfig;
1778
- this.interceptors = {
1779
- request: new InterceptorManager_1(),
1780
- response: new InterceptorManager_1()
1781
- };
1782
- }
1783
-
1784
- /**
1785
- * Dispatch a request
1786
- *
1787
- * @param {Object} config The config specific for this request (merged with this.defaults)
1788
- */
1789
- Axios.prototype.request = function request(configOrUrl, config) {
1790
- /*eslint no-param-reassign:0*/
1791
- // Allow for axios('example/url'[, config]) a la fetch API
1792
- if (typeof configOrUrl === 'string') {
1793
- config = config || {};
1794
- config.url = configOrUrl;
1795
- } else {
1796
- config = configOrUrl || {};
1797
- }
1798
-
1799
- config = mergeConfig(this.defaults, config);
1800
-
1801
- // Set config.method
1802
- if (config.method) {
1803
- config.method = config.method.toLowerCase();
1804
- } else if (this.defaults.method) {
1805
- config.method = this.defaults.method.toLowerCase();
1806
- } else {
1807
- config.method = 'get';
1808
- }
1809
-
1810
- var transitional = config.transitional;
1811
-
1812
- if (transitional !== undefined) {
1813
- validator.assertOptions(transitional, {
1814
- silentJSONParsing: validators.transitional(validators.boolean),
1815
- forcedJSONParsing: validators.transitional(validators.boolean),
1816
- clarifyTimeoutError: validators.transitional(validators.boolean)
1817
- }, false);
1818
- }
1819
-
1820
- // filter out skipped interceptors
1821
- var requestInterceptorChain = [];
1822
- var synchronousRequestInterceptors = true;
1823
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
1824
- if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
1825
- return;
1826
- }
1827
-
1828
- synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
1829
-
1830
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
1831
- });
1832
-
1833
- var responseInterceptorChain = [];
1834
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
1835
- responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
1836
- });
1837
-
1838
- var promise;
1839
-
1840
- if (!synchronousRequestInterceptors) {
1841
- var chain = [dispatchRequest, undefined];
1842
-
1843
- Array.prototype.unshift.apply(chain, requestInterceptorChain);
1844
- chain = chain.concat(responseInterceptorChain);
1845
-
1846
- promise = Promise.resolve(config);
1847
- while (chain.length) {
1848
- promise = promise.then(chain.shift(), chain.shift());
1849
- }
1850
-
1851
- return promise;
1852
- }
1853
-
1854
-
1855
- var newConfig = config;
1856
- while (requestInterceptorChain.length) {
1857
- var onFulfilled = requestInterceptorChain.shift();
1858
- var onRejected = requestInterceptorChain.shift();
1859
- try {
1860
- newConfig = onFulfilled(newConfig);
1861
- } catch (error) {
1862
- onRejected(error);
1863
- break;
1864
- }
1865
- }
1866
-
1867
- try {
1868
- promise = dispatchRequest(newConfig);
1869
- } catch (error) {
1870
- return Promise.reject(error);
1871
- }
1872
-
1873
- while (responseInterceptorChain.length) {
1874
- promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
1875
- }
1876
-
1877
- return promise;
1878
- };
1879
-
1880
- Axios.prototype.getUri = function getUri(config) {
1881
- config = mergeConfig(this.defaults, config);
1882
- var fullPath = buildFullPath(config.baseURL, config.url);
1883
- return buildURL(fullPath, config.params, config.paramsSerializer);
1884
- };
1885
-
1886
- // Provide aliases for supported request methods
1887
- utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
1888
- /*eslint func-names:0*/
1889
- Axios.prototype[method] = function(url, config) {
1890
- return this.request(mergeConfig(config || {}, {
1891
- method: method,
1892
- url: url,
1893
- data: (config || {}).data
1894
- }));
1895
- };
1896
- });
1897
-
1898
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1899
- /*eslint func-names:0*/
1900
-
1901
- function generateHTTPMethod(isForm) {
1902
- return function httpMethod(url, data, config) {
1903
- return this.request(mergeConfig(config || {}, {
1904
- method: method,
1905
- headers: isForm ? {
1906
- 'Content-Type': 'multipart/form-data'
1907
- } : {},
1908
- url: url,
1909
- data: data
1910
- }));
1911
- };
1912
- }
1913
-
1914
- Axios.prototype[method] = generateHTTPMethod();
1915
-
1916
- Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
1917
- });
1918
-
1919
- var Axios_1 = Axios;
1920
-
1921
- 'use strict';
1922
-
1923
-
1924
-
1925
- /**
1926
- * A `CancelToken` is an object that can be used to request cancellation of an operation.
1927
- *
1928
- * @class
1929
- * @param {Function} executor The executor function.
1930
- */
1931
- function CancelToken(executor) {
1932
- if (typeof executor !== 'function') {
1933
- throw new TypeError('executor must be a function.');
1934
- }
1935
-
1936
- var resolvePromise;
1937
-
1938
- this.promise = new Promise(function promiseExecutor(resolve) {
1939
- resolvePromise = resolve;
1940
- });
1941
-
1942
- var token = this;
1943
-
1944
- // eslint-disable-next-line func-names
1945
- this.promise.then(function(cancel) {
1946
- if (!token._listeners) return;
1947
-
1948
- var i;
1949
- var l = token._listeners.length;
1950
-
1951
- for (i = 0; i < l; i++) {
1952
- token._listeners[i](cancel);
1953
- }
1954
- token._listeners = null;
1955
- });
1956
-
1957
- // eslint-disable-next-line func-names
1958
- this.promise.then = function(onfulfilled) {
1959
- var _resolve;
1960
- // eslint-disable-next-line func-names
1961
- var promise = new Promise(function(resolve) {
1962
- token.subscribe(resolve);
1963
- _resolve = resolve;
1964
- }).then(onfulfilled);
1965
-
1966
- promise.cancel = function reject() {
1967
- token.unsubscribe(_resolve);
1968
- };
1969
-
1970
- return promise;
1971
- };
1972
-
1973
- executor(function cancel(message) {
1974
- if (token.reason) {
1975
- // Cancellation has already been requested
1976
- return;
1977
- }
1978
-
1979
- token.reason = new CanceledError_1(message);
1980
- resolvePromise(token.reason);
1981
- });
1982
- }
1983
-
1984
- /**
1985
- * Throws a `CanceledError` if cancellation has been requested.
1986
- */
1987
- CancelToken.prototype.throwIfRequested = function throwIfRequested() {
1988
- if (this.reason) {
1989
- throw this.reason;
1990
- }
1991
- };
1992
-
1993
- /**
1994
- * Subscribe to the cancel signal
1995
- */
1996
-
1997
- CancelToken.prototype.subscribe = function subscribe(listener) {
1998
- if (this.reason) {
1999
- listener(this.reason);
2000
- return;
2001
- }
2002
-
2003
- if (this._listeners) {
2004
- this._listeners.push(listener);
2005
- } else {
2006
- this._listeners = [listener];
2007
- }
2008
- };
2009
-
2010
- /**
2011
- * Unsubscribe from the cancel signal
2012
- */
2013
-
2014
- CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
2015
- if (!this._listeners) {
2016
- return;
2017
- }
2018
- var index = this._listeners.indexOf(listener);
2019
- if (index !== -1) {
2020
- this._listeners.splice(index, 1);
2021
- }
2022
- };
2023
-
2024
- /**
2025
- * Returns an object that contains a new `CancelToken` and a function that, when called,
2026
- * cancels the `CancelToken`.
2027
- */
2028
- CancelToken.source = function source() {
2029
- var cancel;
2030
- var token = new CancelToken(function executor(c) {
2031
- cancel = c;
2032
- });
2033
- return {
2034
- token: token,
2035
- cancel: cancel
2036
- };
2037
- };
2038
-
2039
- var CancelToken_1 = CancelToken;
2040
-
2041
- 'use strict';
2042
-
2043
- /**
2044
- * Syntactic sugar for invoking a function and expanding an array for arguments.
2045
- *
2046
- * Common use case would be to use `Function.prototype.apply`.
2047
- *
2048
- * ```js
2049
- * function f(x, y, z) {}
2050
- * var args = [1, 2, 3];
2051
- * f.apply(null, args);
2052
- * ```
2053
- *
2054
- * With `spread` this example can be re-written.
2055
- *
2056
- * ```js
2057
- * spread(function(x, y, z) {})([1, 2, 3]);
2058
- * ```
2059
- *
2060
- * @param {Function} callback
2061
- * @returns {Function}
2062
- */
2063
- var spread = function spread(callback) {
2064
- return function wrap(arr) {
2065
- return callback.apply(null, arr);
2066
- };
2067
- };
2068
-
2069
- 'use strict';
2070
-
2071
-
2072
-
2073
- /**
2074
- * Determines whether the payload is an error thrown by Axios
2075
- *
2076
- * @param {*} payload The value to test
2077
- * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
2078
- */
2079
- var isAxiosError = function isAxiosError(payload) {
2080
- return utils.isObject(payload) && (payload.isAxiosError === true);
2081
- };
2082
-
2083
- 'use strict';
2084
-
2085
-
2086
-
2087
-
2088
-
2089
-
2090
-
2091
- /**
2092
- * Create an instance of Axios
2093
- *
2094
- * @param {Object} defaultConfig The default config for the instance
2095
- * @return {Axios} A new instance of Axios
2096
- */
2097
- function createInstance(defaultConfig) {
2098
- var context = new Axios_1(defaultConfig);
2099
- var instance = bind(Axios_1.prototype.request, context);
2100
-
2101
- // Copy axios.prototype to instance
2102
- utils.extend(instance, Axios_1.prototype, context);
2103
-
2104
- // Copy context to instance
2105
- utils.extend(instance, context);
2106
-
2107
- // Factory for creating new instances
2108
- instance.create = function create(instanceConfig) {
2109
- return createInstance(mergeConfig(defaultConfig, instanceConfig));
2110
- };
2111
-
2112
- return instance;
2113
- }
2114
-
2115
- // Create the default instance to be exported
2116
- var axios$1 = createInstance(defaults_1);
2117
-
2118
- // Expose Axios class to allow class inheritance
2119
- axios$1.Axios = Axios_1;
2120
-
2121
- // Expose Cancel & CancelToken
2122
- axios$1.CanceledError = CanceledError_1;
2123
- axios$1.CancelToken = CancelToken_1;
2124
- axios$1.isCancel = isCancel;
2125
- axios$1.VERSION = data.version;
2126
- axios$1.toFormData = toFormData_1;
2127
-
2128
- // Expose AxiosError class
2129
- axios$1.AxiosError = AxiosError_1;
2130
-
2131
- // alias for CanceledError for backward compatibility
2132
- axios$1.Cancel = axios$1.CanceledError;
2133
-
2134
- // Expose all/spread
2135
- axios$1.all = function all(promises) {
2136
- return Promise.all(promises);
2137
- };
2138
- axios$1.spread = spread;
2139
-
2140
- // Expose isAxiosError
2141
- axios$1.isAxiosError = isAxiosError;
2142
-
2143
- var axios_1 = axios$1;
2144
-
2145
- // Allow use of default import syntax in TypeScript
2146
- var _default = axios$1;
2147
- axios_1.default = _default;
2148
-
2149
- var axios = axios_1;
2150
-
2151
- var requestLogger = function (r) {
2152
- // tslint:disable-next-line
2153
- console.debug("[JS-SDK] ".concat(r.method.toUpperCase(), " ").concat(r.baseURL).concat(r.url), r.data ? JSON.stringify(r.data) : '');
2154
- return r;
2155
- };
2156
- /**
2157
- * VerdocsEndpoint is a class wrapper for a specific connection and authorization context for calling the Verdocs APIs.
2158
- * Endpoints can be used for isolated session tasks.
2159
- * For instance, ephemeral signing sessions may be created independently of a caller's status as an authenticated user.
2160
- * In that case, an Endpoint can be created and authenticated, used for calls related to signing operations, then
2161
- * discarded once signing is complete.
2162
- *
2163
- * Note that endpoint configuration functions return the instance, so they can be chained, e.g.
2164
- *
2165
- * ```typescript
2166
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
2167
- *
2168
- * const endpoint = new VerdocsEndpoint();
2169
- * endpoint
2170
- * .logRequests(true)
2171
- * .setClientID('1234)
2172
- * .setTimeout(5000);
2173
- * ```
2174
- */
2175
- var VerdocsEndpoint = /** @class */ (function () {
2176
- /**
2177
- * Create a new VerdocsEndpoint to call Verdocs platform services.
2178
- *
2179
- * ```typescript
2180
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
2181
- * const endpoint = new VerdocsEndpoint();
2182
- * ```
2183
- */
2184
- function VerdocsEndpoint() {
2185
- this.requestLoggerId = null;
2186
- this.api = axios.create({ baseURL: 'https://api.verdocs.com', timeout: 3000 });
2187
- }
2188
- /**
2189
- * Set the timeout for API calls in milliseconds. 2000-4000ms is recommended for most purposes. 3000ms is the default.
2190
- *
2191
- * ```typescript
2192
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
2193
- *
2194
- * const endpoint = new VerdocsEndpoint();
2195
- * endpoint.setTimeout(3000);
2196
- * ```
2197
- */
2198
- VerdocsEndpoint.prototype.setTimeout = function (timeout) {
2199
- this.api.defaults.timeout = timeout;
2200
- return this;
2201
- };
2202
- /**
2203
- * Set the Client ID for Verdocs API calls.
2204
- *
2205
- * ```typescript
2206
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
2207
- *
2208
- * const endpoint = new VerdocsEndpoint();
2209
- * endpoint.setClientID('1234);
2210
- * ```
2211
- */
2212
- VerdocsEndpoint.prototype.setClientID = function (clientID) {
2213
- this.api.defaults.headers.common['X-Client-ID'] = clientID;
2214
- return this;
2215
- };
2216
- /**
2217
- * Set the auth token that will be used for Verdocs API calls.
2218
- *
2219
- * ```typescript
2220
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
2221
- *
2222
- * const endpoint = new VerdocsEndpoint();
2223
- * endpoint.setAuthorization(accessToken);
2224
- * ```
2225
- */
2226
- VerdocsEndpoint.prototype.setAuthorization = function (accessToken) {
2227
- if (accessToken) {
2228
- this.api.defaults.headers.common.Authorization = "Bearer ".concat(accessToken);
2229
- }
2230
- else {
2231
- delete this.api.defaults.headers.common.Authorization;
2232
- }
2233
- return this;
2234
- };
2235
- /**
2236
- * Set the auth token used for signing sessions. Separating user from signing auth allows the same endpoint to be
2237
- * used for multiple operations, although it is recommended that a separate endpoint be created for each operation.
2238
- *
2239
- * ```typescript
2240
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
2241
- *
2242
- * const endpoint = new VerdocsEndpoint();
2243
- * endpoint.setSigningAuthorization(accessToken);
2244
- * ```
2245
- */
2246
- VerdocsEndpoint.prototype.setSigningAuthorization = function (accessToken) {
2247
- if (accessToken) {
2248
- this.api.defaults.headers.common.signer = "Bearer ".concat(accessToken);
2249
- }
2250
- else {
2251
- delete this.api.defaults.headers.common.signer;
2252
- }
2253
- return this;
2254
- };
2255
- /**
2256
- * Set the base URL for API calls. May also be set via the constructor.
2257
- *
2258
- * ```typescript
2259
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
2260
- *
2261
- * const endpoint = new VerdocsEndpoint();
2262
- * endpoint.setBaseURL('https://api.verdocs.com');
2263
- * ```
2264
- */
2265
- VerdocsEndpoint.prototype.setBaseURL = function (url) {
2266
- this.api.defaults.baseURL = url;
2267
- return this;
2268
- };
2269
- /**
2270
- * Enable or disable request logging. This may expose sensitive data in the console log, so it should only be used for debugging.
2271
- *
2272
- * ```typescript
2273
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
2274
- *
2275
- * const endpoint = new VerdocsEndpoint();
2276
- * endpoint.logRequests(true);
2277
- * ```
2278
- */
2279
- VerdocsEndpoint.prototype.logRequests = function (enable) {
2280
- if (enable && this.requestLoggerId === null) {
2281
- this.requestLoggerId = this.api.interceptors.request.use(requestLogger);
2282
- }
2283
- else if (!enable && this.requestLoggerId !== null) {
2284
- this.api.interceptors.request.eject(this.requestLoggerId);
2285
- }
2286
- return this;
2287
- };
2288
- return VerdocsEndpoint;
2289
- }());
2290
-
2291
- "use strict";
2292
- // This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
2293
- // an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
2294
- // (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
2295
- // tokens only need to be tracked in one place). The trouble is, one of those libraries is based on
2296
- // StencilJS and is compiling its modules into Web Components. Because of how module resolution works,
2297
- // when those Components load js-sdk they get a separate instance. Without messy options like having to
2298
- // pass raw data from the caller to each Component, or pass around references to a common Endpoint, they
2299
- // have no way to access authenticated sessions unless we make the Endpoint a true global.
2300
- //
2301
- // @credit https://github.com/medikoo/es5-ext/blob/master/global.js
2302
- // @credit https://mathiasbynens.be/notes/globalthis
2303
- var naiveFallback = function () {
2304
- if (typeof self === 'object' && self)
2305
- return self;
2306
- if (typeof window === 'object' && window)
2307
- return window;
2308
- throw new Error('Unable to resolve global `this`');
2309
- };
2310
- var globalThis_1 = (function () {
2311
- if (this)
2312
- return this;
2313
- // Unexpected strict mode (may happen if e.g. bundled into ESM module)
2314
- // Fallback to standard globalThis if available
2315
- if (typeof globalThis === 'object' && globalThis)
2316
- return globalThis;
2317
- // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
2318
- // In all ES5+ engines global object inherits from Object.prototype
2319
- // (if you approached one that doesn't please report)
2320
- try {
2321
- Object.defineProperty(Object.prototype, '__global__', {
2322
- get: function () {
2323
- return this;
2324
- },
2325
- configurable: true,
2326
- });
2327
- }
2328
- catch (error) {
2329
- // Unfortunate case of updates to Object.prototype being restricted
2330
- // via preventExtensions, seal or freeze
2331
- return naiveFallback();
2332
- }
2333
- try {
2334
- // Safari case (window.__global__ works, but __global__ does not)
2335
- if (!__global__)
2336
- return naiveFallback();
2337
- return __global__;
2338
- }
2339
- finally {
2340
- delete Object.prototype.__global__;
2341
- }
2342
- })();
2343
-
2344
- /**
2345
- * The Transport is a global singleton used to call Verdocs APIs. There can only be one Transport per application, and
2346
- * its configuration settings are shared for all callers. This is a simplified form of the Endpoint class where most
2347
- * tasks such as general session-token-management are handled automatically for the caller.
2348
- *
2349
- * @module
2350
- */
2351
- // @credit https://derickbailey.com/2016/03/09/creating-a-true-singleton-in-node-js-with-es6-symbols/
2352
- // Also see globalThis for comments about why we're doing this in the first place.
2353
- var ENDPOINT_KEY = Symbol.for('verdocs-api-endpoint');
2354
- if (!globalThis_1[ENDPOINT_KEY]) {
2355
- globalThis_1[ENDPOINT_KEY] = new VerdocsEndpoint();
2356
- }
2357
- var globalEndpoint = globalThis_1[ENDPOINT_KEY];
2358
- var activeEndpoint = globalEndpoint;
2359
- /**
2360
- * Helper to get the endpoint for direct access to HTTP functions.
2361
- *
2362
- * ```typescript
2363
- * import {Transport} from '@verdocs/js-sdk/HTTP';
2364
- *
2365
- * console.log('Current timeout', Transport.getEndpoint().defaults.timeout);
2366
- * ```
2367
- */
2368
- var getEndpoint = function () {
2369
- return activeEndpoint;
2370
- };
2371
- /**
2372
- * Change the endpoint that will be used when making calls to Verdocs. Only one endpoint may be active at a time.
2373
- * Authorization and other configuration data is specific to each endpoint, and will not be carried over when the
2374
- * endpoint is changed. The typical use-case is to change to a sandboxed endpoint for signing sessions, then revert
2375
- * to the global endpoint when the signing session is complete. To revert, pass `null` as the endpoint to use.
2376
- *
2377
- * ```typescript
2378
- * import {Transport} from '@verdocs/js-sdk/HTTP';
2379
- *
2380
- * const mySigningEndpoint = new VerdocsEndpoint();
2381
- * setActiveEndpoint(mySigningEndpoint);
2382
- * ... [Perform signing operations]
2383
- * setActiveEndpoint(null);
2384
- * ```
2385
- */
2386
- var setActiveEndpoint = function (e) {
2387
- activeEndpoint = e || globalEndpoint;
2388
- };
2389
-
2390
- /* tslint:disable:no-bitwise */
2391
- var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
2392
- // Regular expression to check formal correctness of base64 encoded strings
2393
- var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
2394
- /**
2395
- * Simplified, Node/Browser-safe alternative to atob() for base64 decoding.
2396
- * Modified from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
2397
- */
2398
- var AtoB = function (str) {
2399
- // atob can work with strings with whitespaces, even inside the encoded part,
2400
- // but only \t, \n, \f, \r and ' ', which can be stripped.
2401
- str = String(str).replace(/[\t\n\f\r ]+/g, '');
2402
- if (!b64re.test(str))
2403
- throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
2404
- // Adding the padding if missing, for semplicity
2405
- str += '=='.slice(2 - (str.length & 3));
2406
- var bitmap;
2407
- var result = '';
2408
- var r1;
2409
- var r2;
2410
- var i = 0;
2411
- for (; i < str.length;) {
2412
- bitmap =
2413
- (b64.indexOf(str.charAt(i++)) << 18) |
2414
- (b64.indexOf(str.charAt(i++)) << 12) |
2415
- ((r1 = b64.indexOf(str.charAt(i++))) << 6) |
2416
- (r2 = b64.indexOf(str.charAt(i++)));
2417
- result +=
2418
- r1 === 64
2419
- ? String.fromCharCode((bitmap >> 16) & 255)
2420
- : r2 === 64
2421
- ? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
2422
- : String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
2423
- }
2424
- return result;
2425
- };
2426
- /**
2427
- * Decode the body of a JWT. This helper may allow front-end applications to avoid a dependency on `jsonwebtoken` in
2428
- * many cases. Note that this should only be used for true JWTs. Opaque tokens will cause this to throw.
2429
- */
2430
- var decodeTokenBody = function (token) { return JSON.parse(AtoB((token || '').split('.')[1] || '')); };
2431
- /**
2432
- * Decode the body of an Verdocs access token. Note that raw tokens contain namespaced fields, e.g.
2433
- * `https://verdocs.com/profile_id`. To make these tokens easier to use in front-end code, this name-spacing
2434
- * will be removed. Note that user and signing sessions have different access token formats. The calling
2435
- * application should distinguish between the two based on the context of the authenticated session, or by
2436
- * the presence of the `document_id` field, which will only be present for signing sessions.
2437
- */
2438
- var decodeAccessTokenBody = function (token) {
2439
- var decoded;
2440
- try {
2441
- decoded = decodeTokenBody(token);
2442
- if (decoded === null) {
2443
- return null;
2444
- }
2445
- }
2446
- catch (e) {
2447
- return null;
2448
- }
2449
- Object.keys(decoded).forEach(function (key) {
2450
- if (typeof key === 'string' && key.startsWith('https://verdocs.com/')) {
2451
- decoded[key.replace('https://verdocs.com/', '')] = decoded[key];
2452
- delete decoded[key];
2453
- }
2454
- });
2455
- return decoded;
2456
- };
2457
-
2458
- export { VerdocsEndpoint as V, decodeAccessTokenBody as d, getEndpoint as g, setActiveEndpoint as s };