@verdocs/web-sdk 1.2.0 → 1.4.0

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 (475) hide show
  1. package/dist/cjs/Auth-0146ddd8.js +161 -0
  2. package/dist/cjs/{Token-1ea6d834.js → Token-b86e5335.js} +554 -156
  3. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  4. package/dist/cjs/{buffer-es6-ce0cdd81.js → buffer-es6-b2c1c885.js} +13 -0
  5. package/dist/cjs/css-shim-e9231523.js +6 -0
  6. package/dist/cjs/dom-7fb93981.js +75 -0
  7. package/dist/cjs/index-9c6e5f50.js +1976 -0
  8. package/dist/cjs/index-a24f3b6a.js +3096 -0
  9. package/dist/cjs/index-b5a86b04.js +4 -0
  10. package/dist/cjs/{index-4bf5cc66.js → index-c4be37e1.js} +9 -1
  11. package/dist/cjs/loader.cjs.js +19 -3
  12. package/dist/cjs/shadow-css-abc19485.js +389 -0
  13. package/dist/cjs/verdocs-auth.cjs.entry.js +201 -9
  14. package/dist/cjs/verdocs-button.cjs.entry.js +49 -0
  15. package/dist/cjs/verdocs-dropdown.cjs.entry.js +80 -0
  16. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +59 -0
  17. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +39 -0
  18. package/dist/cjs/verdocs-field-date.cjs.entry.js +2968 -0
  19. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +59 -0
  20. package/dist/cjs/verdocs-field-initial.cjs.entry.js +52 -0
  21. package/dist/cjs/verdocs-field-payment.cjs.entry.js +86 -0
  22. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +48 -0
  23. package/dist/cjs/verdocs-field-signature.cjs.entry.js +52 -0
  24. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +63 -0
  25. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +63 -0
  26. package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +3 -3
  27. package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +81 -0
  28. package/dist/cjs/verdocs-loader.cjs.entry.js +2 -2
  29. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +3 -3
  30. package/dist/cjs/verdocs-organization-card.cjs.entry.js +3 -3
  31. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +2 -2
  32. package/dist/cjs/{verdocs-search-activity_2.cjs.entry.js → verdocs-search-activity.cjs.entry.js} +116 -63
  33. package/dist/cjs/verdocs-search-box.cjs.entry.js +60 -0
  34. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +2 -2
  35. package/dist/cjs/verdocs-search.cjs.entry.js +3 -3
  36. package/dist/cjs/verdocs-sign.cjs.entry.js +1523 -19
  37. package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +4 -4
  38. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +7615 -0
  39. package/dist/cjs/verdocs-template-card.cjs.entry.js +3 -3
  40. package/dist/cjs/verdocs-template-tags.cjs.entry.js +3 -3
  41. package/dist/cjs/verdocs-text-input.cjs.entry.js +62 -0
  42. package/dist/cjs/verdocs-toggle.cjs.entry.js +3 -3
  43. package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +3 -3
  44. package/dist/cjs/{verdocs-dropdown_12.cjs.entry.js → verdocs-view.cjs.entry.js} +52 -5098
  45. package/dist/cjs/verdocs-web-sdk.cjs.js +117 -5
  46. package/dist/collection/collection-manifest.json +4 -3
  47. package/dist/collection/components/controls/verdocs-button/verdocs-button.css +110 -34
  48. package/dist/collection/components/controls/verdocs-button/verdocs-button.js +85 -13
  49. package/dist/collection/components/controls/verdocs-button/verdocs-button.stories.js +41 -2
  50. package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.css +7 -10
  51. package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js +1 -15
  52. package/dist/collection/components/controls/verdocs-loader/verdocs-loader.js +3 -0
  53. package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.css +4 -6
  54. package/dist/collection/components/controls/verdocs-status-indicator/accepted-dark.svg +4 -0
  55. package/dist/collection/components/controls/verdocs-status-indicator/accepted-light.svg +4 -0
  56. package/dist/collection/components/controls/verdocs-status-indicator/arrowright.svg +3 -0
  57. package/dist/collection/components/controls/verdocs-status-indicator/canceled-dark.svg +3 -0
  58. package/dist/collection/components/controls/verdocs-status-indicator/canceled-light.svg +3 -0
  59. package/dist/collection/components/controls/verdocs-status-indicator/complete-dark.svg +3 -0
  60. package/dist/collection/components/controls/verdocs-status-indicator/complete-light.svg +3 -0
  61. package/dist/collection/components/controls/verdocs-status-indicator/declined-dark.svg +3 -0
  62. package/dist/collection/components/controls/verdocs-status-indicator/declined-light.svg +3 -0
  63. package/dist/collection/components/controls/verdocs-status-indicator/in-progress-dark.svg +3 -0
  64. package/dist/collection/components/controls/verdocs-status-indicator/in-progress-light.svg +3 -0
  65. package/dist/collection/components/controls/verdocs-status-indicator/opened-dark.svg +4 -0
  66. package/dist/collection/components/controls/verdocs-status-indicator/opened-light.svg +4 -0
  67. package/dist/collection/components/controls/verdocs-status-indicator/pending-dark.svg +3 -0
  68. package/dist/collection/components/controls/verdocs-status-indicator/pending-light.svg +3 -0
  69. package/dist/collection/components/controls/verdocs-status-indicator/recipient-flow.js +218 -0
  70. package/dist/collection/components/controls/verdocs-status-indicator/signed-dark.svg +4 -0
  71. package/dist/collection/components/controls/verdocs-status-indicator/signed-light.svg +4 -0
  72. package/dist/collection/components/controls/verdocs-status-indicator/some-signed-dark.svg +3 -0
  73. package/dist/collection/components/controls/verdocs-status-indicator/some-signed-light.svg +3 -0
  74. package/dist/collection/components/controls/verdocs-status-indicator/submitted-dark.svg +3 -0
  75. package/dist/collection/components/controls/verdocs-status-indicator/submitted-light.svg +3 -0
  76. package/dist/collection/components/controls/verdocs-status-indicator/verdocs-status-indicator.css +48 -0
  77. package/dist/collection/components/controls/verdocs-status-indicator/verdocs-status-indicator.js +344 -0
  78. package/dist/collection/components/controls/verdocs-status-indicator/verdocs-status-indicator.stories.js +69 -0
  79. package/dist/collection/components/controls/verdocs-template-card/verdocs-template-card.css +5 -7
  80. package/dist/collection/components/controls/verdocs-template-tags/verdocs-template-tags.css +5 -7
  81. package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.css +4 -6
  82. package/dist/collection/components/controls/verdocs-toggle/verdocs-toggle.css +4 -6
  83. package/dist/collection/components/controls/verdocs-toggle/verdocs-toggle.stories.js +1 -1
  84. package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.css +3 -4
  85. package/dist/collection/components/dialogs/verdocs-kba-dialog/question.svg +4 -0
  86. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.css +95 -0
  87. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js +292 -0
  88. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.stories.js +36 -0
  89. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.css +1 -2
  90. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.css +1 -2
  91. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +2 -2
  92. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +1 -2
  93. package/dist/collection/components/elements/verdocs-field-attachment/verdocs-field-attachment.stories.js +1 -1
  94. package/dist/collection/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.stories.js +1 -1
  95. package/dist/collection/components/elements/verdocs-field-date/verdocs-field-date.stories.js +1 -1
  96. package/dist/collection/components/elements/verdocs-field-dropdown/verdocs-field-dropdown.stories.js +1 -1
  97. package/dist/collection/components/elements/verdocs-field-initial/verdocs-field-initial.stories.js +1 -1
  98. package/dist/collection/components/elements/verdocs-field-payment/verdocs-field-payment.stories.js +1 -1
  99. package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.stories.js +1 -1
  100. package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.stories.js +1 -1
  101. package/dist/collection/components/elements/verdocs-field-textarea/verdocs-field-textarea.stories.js +1 -1
  102. package/dist/collection/components/elements/verdocs-field-textbox/verdocs-field-textbox.stories.js +1 -1
  103. package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.stories.js +1 -1
  104. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.stories.js +1 -1
  105. package/dist/collection/components/elements/verdocs-search-box/verdocs-search-box.stories.js +1 -1
  106. package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.stories.js +1 -1
  107. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +3 -5
  108. package/dist/collection/components/embeds/verdocs-search/verdocs-search.css +2 -4
  109. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +2 -3
  110. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +2 -5
  111. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +2 -2
  112. package/dist/collection/components/embeds/verdocs-view/verdocs-view.css +1 -3
  113. package/dist/components/Auth.js +157 -0
  114. package/dist/{esm/Token-b82a8ea3.js → components/Token.js} +554 -156
  115. package/dist/{esm/buffer-es6-681a33da.js → components/buffer-es6.js} +13 -0
  116. package/dist/components/index.d.ts +53 -0
  117. package/dist/components/index.js +37 -0
  118. package/dist/components/index2.js +1 -0
  119. package/dist/components/index3.js +1974 -0
  120. package/dist/{esm/index-2b1938ea.js → components/index4.js} +10 -2
  121. package/dist/components/verdocs-auth.d.ts +11 -0
  122. package/dist/components/verdocs-auth.js +347 -0
  123. package/dist/components/verdocs-button.d.ts +11 -0
  124. package/dist/components/verdocs-button.js +6 -0
  125. package/dist/components/verdocs-button2.js +68 -0
  126. package/dist/components/verdocs-dropdown.d.ts +11 -0
  127. package/dist/components/verdocs-dropdown.js +6 -0
  128. package/dist/components/verdocs-dropdown2.js +94 -0
  129. package/dist/components/verdocs-field-attachment.d.ts +11 -0
  130. package/dist/components/verdocs-field-attachment.js +6 -0
  131. package/dist/components/verdocs-field-attachment2.js +88 -0
  132. package/dist/components/verdocs-field-checkbox.d.ts +11 -0
  133. package/dist/components/verdocs-field-checkbox.js +6 -0
  134. package/dist/components/verdocs-field-checkbox2.js +55 -0
  135. package/dist/components/verdocs-field-date.d.ts +11 -0
  136. package/dist/components/verdocs-field-date.js +6 -0
  137. package/dist/components/verdocs-field-date2.js +2987 -0
  138. package/dist/components/verdocs-field-dropdown.d.ts +11 -0
  139. package/dist/components/verdocs-field-dropdown.js +6 -0
  140. package/dist/components/verdocs-field-dropdown2.js +78 -0
  141. package/dist/components/verdocs-field-initial.d.ts +11 -0
  142. package/dist/components/verdocs-field-initial.js +6 -0
  143. package/dist/components/verdocs-field-initial2.js +86 -0
  144. package/dist/components/verdocs-field-payment.d.ts +11 -0
  145. package/dist/components/verdocs-field-payment.js +6 -0
  146. package/dist/components/verdocs-field-payment2.js +114 -0
  147. package/dist/components/verdocs-field-radio-button.d.ts +11 -0
  148. package/dist/components/verdocs-field-radio-button.js +6 -0
  149. package/dist/components/verdocs-field-radio-button2.js +66 -0
  150. package/dist/components/verdocs-field-signature.d.ts +11 -0
  151. package/dist/components/verdocs-field-signature.js +6 -0
  152. package/dist/components/verdocs-field-signature2.js +86 -0
  153. package/dist/components/verdocs-field-textarea.d.ts +11 -0
  154. package/dist/components/verdocs-field-textarea.js +6 -0
  155. package/dist/components/verdocs-field-textarea2.js +82 -0
  156. package/dist/components/verdocs-field-textbox.d.ts +11 -0
  157. package/dist/components/verdocs-field-textbox.js +6 -0
  158. package/dist/components/verdocs-field-textbox2.js +82 -0
  159. package/dist/components/verdocs-initial-dialog.d.ts +11 -0
  160. package/dist/components/verdocs-initial-dialog.js +6 -0
  161. package/dist/components/verdocs-initial-dialog2.js +272 -0
  162. package/dist/components/verdocs-kba-dialog.d.ts +11 -0
  163. package/dist/components/verdocs-kba-dialog.js +112 -0
  164. package/dist/components/verdocs-loader.d.ts +11 -0
  165. package/dist/components/verdocs-loader.js +6 -0
  166. package/dist/components/verdocs-loader2.js +30 -0
  167. package/dist/components/verdocs-ok-dialog.d.ts +11 -0
  168. package/dist/components/verdocs-ok-dialog.js +6 -0
  169. package/dist/components/verdocs-ok-dialog2.js +70 -0
  170. package/dist/components/verdocs-organization-card.d.ts +11 -0
  171. package/dist/components/verdocs-organization-card.js +38 -0
  172. package/dist/components/verdocs-quick-functions.d.ts +11 -0
  173. package/dist/components/verdocs-quick-functions.js +45 -0
  174. package/dist/components/verdocs-search-activity.d.ts +11 -0
  175. package/dist/components/verdocs-search-activity.js +6 -0
  176. package/dist/components/verdocs-search-activity2.js +281 -0
  177. package/dist/components/verdocs-search-box.d.ts +11 -0
  178. package/dist/components/verdocs-search-box.js +6 -0
  179. package/dist/components/verdocs-search-box2.js +75 -0
  180. package/dist/components/verdocs-search-tabs.d.ts +11 -0
  181. package/dist/components/verdocs-search-tabs.js +36 -0
  182. package/dist/components/verdocs-search.d.ts +11 -0
  183. package/dist/components/verdocs-search.js +45 -0
  184. package/dist/components/verdocs-sign.d.ts +11 -0
  185. package/dist/components/verdocs-sign.js +2135 -0
  186. package/dist/components/verdocs-signature-dialog.d.ts +11 -0
  187. package/dist/components/verdocs-signature-dialog.js +6 -0
  188. package/dist/components/verdocs-signature-dialog2.js +268 -0
  189. package/dist/components/verdocs-status-indicator.d.ts +11 -0
  190. package/dist/components/verdocs-status-indicator.js +7635 -0
  191. package/dist/components/verdocs-template-card.d.ts +11 -0
  192. package/dist/components/verdocs-template-card.js +54 -0
  193. package/dist/components/verdocs-template-tags.d.ts +11 -0
  194. package/dist/components/verdocs-template-tags.js +36 -0
  195. package/dist/components/verdocs-text-input.d.ts +11 -0
  196. package/dist/components/verdocs-text-input.js +6 -0
  197. package/dist/components/verdocs-text-input2.js +81 -0
  198. package/dist/components/verdocs-toggle.d.ts +11 -0
  199. package/dist/components/verdocs-toggle.js +53 -0
  200. package/dist/components/verdocs-upload-dialog.d.ts +11 -0
  201. package/dist/components/verdocs-upload-dialog.js +6 -0
  202. package/dist/components/verdocs-upload-dialog2.js +144 -0
  203. package/dist/components/verdocs-view.d.ts +11 -0
  204. package/dist/components/verdocs-view.js +6 -0
  205. package/dist/{custom-elements/index.js → components/verdocs-view2.js} +63 -11001
  206. package/dist/custom-elements.json +830 -0
  207. package/dist/docs.d.ts +3 -0
  208. package/dist/docs.json +407 -60
  209. package/dist/esm/Auth-4b21fced.js +157 -0
  210. package/dist/esm/Token-29eea56d.js +2458 -0
  211. package/dist/esm/app-globals-0f993ce5.js +3 -0
  212. package/dist/esm/buffer-es6-5cef4368.js +1985 -0
  213. package/dist/esm/css-shim-60f618b9.js +4 -0
  214. package/dist/esm/dom-4eeb3fee.js +73 -0
  215. package/dist/esm/index-432c65a6.js +1974 -0
  216. package/dist/esm/index-97ec070b.js +47 -0
  217. package/dist/esm/index-ddbd60b5.js +3059 -0
  218. package/dist/esm/index-ef172650.js +1 -0
  219. package/dist/esm/loader.js +19 -3
  220. package/dist/esm/polyfills/css-shim.js +1 -1
  221. package/dist/esm/shadow-css-02866686.js +387 -0
  222. package/dist/esm/verdocs-auth.entry.js +198 -6
  223. package/dist/esm/verdocs-button.entry.js +45 -0
  224. package/dist/esm/verdocs-dropdown.entry.js +76 -0
  225. package/dist/esm/verdocs-field-attachment.entry.js +55 -0
  226. package/dist/esm/verdocs-field-checkbox.entry.js +35 -0
  227. package/dist/esm/verdocs-field-date.entry.js +2964 -0
  228. package/dist/esm/verdocs-field-dropdown.entry.js +55 -0
  229. package/dist/esm/verdocs-field-initial.entry.js +48 -0
  230. package/dist/esm/verdocs-field-payment.entry.js +82 -0
  231. package/dist/esm/verdocs-field-radio-button.entry.js +44 -0
  232. package/dist/esm/verdocs-field-signature.entry.js +48 -0
  233. package/dist/esm/verdocs-field-textarea.entry.js +59 -0
  234. package/dist/esm/verdocs-field-textbox.entry.js +59 -0
  235. package/dist/esm/verdocs-initial-dialog.entry.js +3 -3
  236. package/dist/esm/verdocs-kba-dialog.entry.js +77 -0
  237. package/dist/esm/verdocs-loader.entry.js +2 -2
  238. package/dist/esm/verdocs-ok-dialog.entry.js +3 -3
  239. package/dist/esm/verdocs-organization-card.entry.js +3 -3
  240. package/dist/esm/verdocs-quick-functions.entry.js +2 -2
  241. package/dist/esm/{verdocs-search-activity_2.entry.js → verdocs-search-activity.entry.js} +117 -63
  242. package/dist/esm/verdocs-search-box.entry.js +56 -0
  243. package/dist/esm/verdocs-search-tabs.entry.js +2 -2
  244. package/dist/esm/verdocs-search.entry.js +3 -3
  245. package/dist/esm/verdocs-sign.entry.js +1523 -19
  246. package/dist/esm/verdocs-signature-dialog.entry.js +4 -4
  247. package/dist/esm/verdocs-status-indicator.entry.js +7611 -0
  248. package/dist/esm/verdocs-template-card.entry.js +3 -3
  249. package/dist/esm/verdocs-template-tags.entry.js +3 -3
  250. package/dist/esm/verdocs-text-input.entry.js +58 -0
  251. package/dist/esm/verdocs-toggle.entry.js +3 -3
  252. package/dist/esm/verdocs-upload-dialog.entry.js +3 -3
  253. package/dist/esm/{verdocs-dropdown_12.entry.js → verdocs-view.entry.js} +36 -5071
  254. package/dist/esm/verdocs-web-sdk.js +117 -5
  255. package/dist/esm-es5/Auth-4b21fced.js +1 -0
  256. package/dist/esm-es5/Token-29eea56d.js +1 -0
  257. package/dist/esm-es5/app-globals-0f993ce5.js +1 -0
  258. package/dist/esm-es5/buffer-es6-5cef4368.js +7 -0
  259. package/dist/esm-es5/css-shim-60f618b9.js +1 -0
  260. package/dist/esm-es5/dom-4eeb3fee.js +21 -0
  261. package/dist/esm-es5/index-432c65a6.js +1 -0
  262. package/dist/esm-es5/index-97ec070b.js +1 -0
  263. package/dist/esm-es5/index-ddbd60b5.js +2 -0
  264. package/dist/esm-es5/index-ef172650.js +1 -0
  265. package/dist/esm-es5/loader.js +1 -1
  266. package/dist/esm-es5/shadow-css-02866686.js +12 -0
  267. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  268. package/dist/esm-es5/verdocs-button.entry.js +1 -0
  269. package/dist/esm-es5/verdocs-dropdown.entry.js +1 -0
  270. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -0
  271. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -0
  272. package/dist/esm-es5/verdocs-field-date.entry.js +1 -0
  273. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -0
  274. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -0
  275. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -0
  276. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -0
  277. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -0
  278. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -0
  279. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -0
  280. package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
  281. package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -0
  282. package/dist/esm-es5/verdocs-loader.entry.js +1 -1
  283. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  284. package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
  285. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  286. package/dist/esm-es5/verdocs-search-activity.entry.js +1 -0
  287. package/dist/esm-es5/verdocs-search-box.entry.js +1 -0
  288. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  289. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  290. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  291. package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
  292. package/dist/esm-es5/verdocs-status-indicator.entry.js +11 -0
  293. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  294. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  295. package/dist/esm-es5/verdocs-text-input.entry.js +1 -0
  296. package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
  297. package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
  298. package/dist/esm-es5/verdocs-view.entry.js +23 -0
  299. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  300. package/dist/types/components/controls/verdocs-button/verdocs-button.d.ts +26 -6
  301. package/dist/types/components/controls/verdocs-button/verdocs-button.stories.d.ts +4 -1
  302. package/dist/types/components/controls/verdocs-dropdown/verdocs-dropdown.d.ts +0 -14
  303. package/dist/types/components/controls/verdocs-loader/verdocs-loader.d.ts +3 -0
  304. package/dist/types/components/controls/verdocs-status-indicator/recipient-flow.d.ts +4 -0
  305. package/dist/types/components/controls/verdocs-status-indicator/verdocs-status-indicator.d.ts +42 -0
  306. package/dist/types/components/controls/{verdocs-document-status/verdocs-document-status.stories.d.ts → verdocs-status-indicator/verdocs-status-indicator.stories.d.ts} +4 -1
  307. package/dist/types/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.d.ts +57 -0
  308. package/dist/types/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.stories.d.ts +15 -0
  309. package/dist/types/components.d.ts +307 -74
  310. package/dist/verdocs-web-sdk/Auth-4b21fced.js +157 -0
  311. package/dist/verdocs-web-sdk/Auth-82e38539.system.js +1 -0
  312. package/dist/verdocs-web-sdk/Token-29eea56d.js +2458 -0
  313. package/dist/verdocs-web-sdk/Token-c1cf309e.system.js +1 -0
  314. package/dist/verdocs-web-sdk/app-globals-0f993ce5.js +3 -0
  315. package/dist/verdocs-web-sdk/app-globals-497eb362.system.js +1 -0
  316. package/dist/verdocs-web-sdk/buffer-es6-5cef4368.js +1985 -0
  317. package/dist/verdocs-web-sdk/buffer-es6-aa11181b.system.js +7 -0
  318. package/dist/verdocs-web-sdk/css-shim-60f618b9.js +4 -0
  319. package/dist/verdocs-web-sdk/css-shim-e41ceccc.system.js +1 -0
  320. package/dist/verdocs-web-sdk/dom-4eeb3fee.js +73 -0
  321. package/dist/verdocs-web-sdk/dom-89b5deb7.system.js +21 -0
  322. package/dist/verdocs-web-sdk/index-027b383e.system.js +1 -0
  323. package/dist/verdocs-web-sdk/index-06e036a1.system.js +1 -0
  324. package/dist/verdocs-web-sdk/index-432c65a6.js +1974 -0
  325. package/dist/verdocs-web-sdk/index-5d49316f.system.js +1 -0
  326. package/dist/verdocs-web-sdk/index-6465280a.system.js +2 -0
  327. package/dist/verdocs-web-sdk/index-97ec070b.js +47 -0
  328. package/dist/verdocs-web-sdk/index-ddbd60b5.js +3059 -0
  329. package/dist/verdocs-web-sdk/index-ef172650.js +1 -0
  330. package/dist/verdocs-web-sdk/index.esm.js +1 -0
  331. package/dist/verdocs-web-sdk/{p-50ea2036.system.js → index.system.js} +0 -0
  332. package/dist/verdocs-web-sdk/shadow-css-02866686.js +387 -0
  333. package/dist/verdocs-web-sdk/shadow-css-6207e159.system.js +13 -0
  334. package/dist/verdocs-web-sdk/verdocs-auth.entry.js +302 -0
  335. package/dist/verdocs-web-sdk/verdocs-auth.system.entry.js +1 -0
  336. package/dist/verdocs-web-sdk/verdocs-button.entry.js +45 -0
  337. package/dist/verdocs-web-sdk/verdocs-button.system.entry.js +1 -0
  338. package/dist/verdocs-web-sdk/verdocs-dropdown.entry.js +76 -0
  339. package/dist/verdocs-web-sdk/verdocs-dropdown.system.entry.js +1 -0
  340. package/dist/verdocs-web-sdk/verdocs-field-attachment.entry.js +55 -0
  341. package/dist/verdocs-web-sdk/verdocs-field-attachment.system.entry.js +1 -0
  342. package/dist/verdocs-web-sdk/verdocs-field-checkbox.entry.js +35 -0
  343. package/dist/verdocs-web-sdk/verdocs-field-checkbox.system.entry.js +1 -0
  344. package/dist/verdocs-web-sdk/verdocs-field-date.entry.js +2964 -0
  345. package/dist/verdocs-web-sdk/verdocs-field-date.system.entry.js +1 -0
  346. package/dist/verdocs-web-sdk/verdocs-field-dropdown.entry.js +55 -0
  347. package/dist/verdocs-web-sdk/verdocs-field-dropdown.system.entry.js +1 -0
  348. package/dist/verdocs-web-sdk/verdocs-field-initial.entry.js +48 -0
  349. package/dist/verdocs-web-sdk/verdocs-field-initial.system.entry.js +1 -0
  350. package/dist/verdocs-web-sdk/verdocs-field-payment.entry.js +82 -0
  351. package/dist/verdocs-web-sdk/verdocs-field-payment.system.entry.js +1 -0
  352. package/dist/verdocs-web-sdk/verdocs-field-radio-button.entry.js +44 -0
  353. package/dist/verdocs-web-sdk/verdocs-field-radio-button.system.entry.js +1 -0
  354. package/dist/verdocs-web-sdk/verdocs-field-signature.entry.js +48 -0
  355. package/dist/verdocs-web-sdk/verdocs-field-signature.system.entry.js +1 -0
  356. package/dist/verdocs-web-sdk/verdocs-field-textarea.entry.js +59 -0
  357. package/dist/verdocs-web-sdk/verdocs-field-textarea.system.entry.js +1 -0
  358. package/dist/verdocs-web-sdk/verdocs-field-textbox.entry.js +59 -0
  359. package/dist/verdocs-web-sdk/verdocs-field-textbox.system.entry.js +1 -0
  360. package/dist/verdocs-web-sdk/verdocs-initial-dialog.entry.js +239 -0
  361. package/dist/verdocs-web-sdk/verdocs-initial-dialog.system.entry.js +1 -0
  362. package/dist/verdocs-web-sdk/verdocs-kba-dialog.entry.js +77 -0
  363. package/dist/verdocs-web-sdk/verdocs-kba-dialog.system.entry.js +1 -0
  364. package/dist/verdocs-web-sdk/verdocs-loader.entry.js +15 -0
  365. package/dist/verdocs-web-sdk/verdocs-loader.system.entry.js +1 -0
  366. package/dist/verdocs-web-sdk/verdocs-ok-dialog.entry.js +44 -0
  367. package/dist/verdocs-web-sdk/verdocs-ok-dialog.system.entry.js +1 -0
  368. package/dist/verdocs-web-sdk/verdocs-organization-card.entry.js +18 -0
  369. package/dist/verdocs-web-sdk/verdocs-organization-card.system.entry.js +1 -0
  370. package/dist/verdocs-web-sdk/verdocs-quick-functions.entry.js +27 -0
  371. package/dist/verdocs-web-sdk/verdocs-quick-functions.system.entry.js +1 -0
  372. package/dist/verdocs-web-sdk/verdocs-search-activity.entry.js +259 -0
  373. package/dist/verdocs-web-sdk/verdocs-search-activity.system.entry.js +1 -0
  374. package/dist/verdocs-web-sdk/verdocs-search-box.entry.js +56 -0
  375. package/dist/verdocs-web-sdk/verdocs-search-box.system.entry.js +1 -0
  376. package/dist/verdocs-web-sdk/verdocs-search-tabs.entry.js +16 -0
  377. package/dist/verdocs-web-sdk/verdocs-search-tabs.system.entry.js +1 -0
  378. package/dist/verdocs-web-sdk/verdocs-search.entry.js +15 -0
  379. package/dist/verdocs-web-sdk/verdocs-search.system.entry.js +1 -0
  380. package/dist/verdocs-web-sdk/verdocs-sign.entry.js +1995 -0
  381. package/dist/verdocs-web-sdk/verdocs-sign.system.entry.js +1 -0
  382. package/dist/verdocs-web-sdk/verdocs-signature-dialog.entry.js +235 -0
  383. package/dist/verdocs-web-sdk/verdocs-signature-dialog.system.entry.js +1 -0
  384. package/dist/verdocs-web-sdk/verdocs-status-indicator.entry.js +7611 -0
  385. package/dist/verdocs-web-sdk/verdocs-status-indicator.system.entry.js +1 -0
  386. package/dist/verdocs-web-sdk/verdocs-template-card.entry.js +34 -0
  387. package/dist/verdocs-web-sdk/verdocs-template-card.system.entry.js +1 -0
  388. package/dist/verdocs-web-sdk/verdocs-template-tags.entry.js +16 -0
  389. package/dist/verdocs-web-sdk/verdocs-template-tags.system.entry.js +1 -0
  390. package/dist/verdocs-web-sdk/verdocs-text-input.entry.js +58 -0
  391. package/dist/verdocs-web-sdk/verdocs-text-input.system.entry.js +1 -0
  392. package/dist/verdocs-web-sdk/verdocs-toggle.entry.js +32 -0
  393. package/dist/verdocs-web-sdk/verdocs-toggle.system.entry.js +1 -0
  394. package/dist/verdocs-web-sdk/verdocs-upload-dialog.entry.js +119 -0
  395. package/dist/verdocs-web-sdk/verdocs-upload-dialog.system.entry.js +1 -0
  396. package/dist/verdocs-web-sdk/verdocs-view.entry.js +16118 -0
  397. package/dist/verdocs-web-sdk/verdocs-view.system.entry.js +23 -0
  398. package/dist/verdocs-web-sdk/verdocs-web-sdk.css +57 -1
  399. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +129 -1
  400. package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
  401. package/dist/verdocs-web-sdk/verdocs-web-sdk.system.js +1 -0
  402. package/package.json +34 -31
  403. package/dist/cjs/Auth-0ba9a04b.js +0 -68
  404. package/dist/cjs/index-01e27102.js +0 -1287
  405. package/dist/cjs/verdocs-button_2.cjs.entry.js +0 -98
  406. package/dist/cjs/verdocs-document-status.cjs.entry.js +0 -54
  407. package/dist/collection/components/controls/verdocs-document-status/check.svg +0 -3
  408. package/dist/collection/components/controls/verdocs-document-status/pending.svg +0 -1
  409. package/dist/collection/components/controls/verdocs-document-status/stop.svg +0 -1
  410. package/dist/collection/components/controls/verdocs-document-status/verdocs-document-status.css +0 -18
  411. package/dist/collection/components/controls/verdocs-document-status/verdocs-document-status.js +0 -70
  412. package/dist/collection/components/controls/verdocs-document-status/verdocs-document-status.stories.js +0 -15
  413. package/dist/collection/components/controls/verdocs-document-status/x.svg +0 -1
  414. package/dist/custom-elements/index.d.ts +0 -225
  415. package/dist/esm/Auth-16761ea6.js +0 -64
  416. package/dist/esm/index-ade0ef1e.js +0 -1259
  417. package/dist/esm/verdocs-button_2.entry.js +0 -93
  418. package/dist/esm/verdocs-document-status.entry.js +0 -50
  419. package/dist/esm-es5/Auth-16761ea6.js +0 -1
  420. package/dist/esm-es5/Token-b82a8ea3.js +0 -1
  421. package/dist/esm-es5/buffer-es6-681a33da.js +0 -7
  422. package/dist/esm-es5/index-2b1938ea.js +0 -1
  423. package/dist/esm-es5/index-ade0ef1e.js +0 -1
  424. package/dist/esm-es5/verdocs-button_2.entry.js +0 -1
  425. package/dist/esm-es5/verdocs-document-status.entry.js +0 -1
  426. package/dist/esm-es5/verdocs-dropdown_12.entry.js +0 -23
  427. package/dist/esm-es5/verdocs-search-activity_2.entry.js +0 -1
  428. package/dist/types/components/controls/verdocs-document-status/verdocs-document-status.d.ts +0 -11
  429. package/dist/verdocs-web-sdk/p-063c4c71.entry.js +0 -1
  430. package/dist/verdocs-web-sdk/p-10e7c953.system.entry.js +0 -1
  431. package/dist/verdocs-web-sdk/p-183c7338.entry.js +0 -1
  432. package/dist/verdocs-web-sdk/p-25a138c4.entry.js +0 -1
  433. package/dist/verdocs-web-sdk/p-28b3017f.entry.js +0 -1
  434. package/dist/verdocs-web-sdk/p-29abe078.js +0 -1
  435. package/dist/verdocs-web-sdk/p-2ec1d8d8.entry.js +0 -1
  436. package/dist/verdocs-web-sdk/p-3ced6e3a.system.js +0 -1
  437. package/dist/verdocs-web-sdk/p-41383ebc.system.entry.js +0 -1
  438. package/dist/verdocs-web-sdk/p-44b75396.system.js +0 -1
  439. package/dist/verdocs-web-sdk/p-48b73707.system.entry.js +0 -1
  440. package/dist/verdocs-web-sdk/p-4bfe13e6.system.entry.js +0 -1
  441. package/dist/verdocs-web-sdk/p-556f577f.system.js +0 -1
  442. package/dist/verdocs-web-sdk/p-6e95da9d.js +0 -1
  443. package/dist/verdocs-web-sdk/p-6ef8ca10.system.entry.js +0 -1
  444. package/dist/verdocs-web-sdk/p-72ebb6e3.system.entry.js +0 -1
  445. package/dist/verdocs-web-sdk/p-817302a8.entry.js +0 -1
  446. package/dist/verdocs-web-sdk/p-8a1b9ad0.entry.js +0 -1
  447. package/dist/verdocs-web-sdk/p-91f87fa8.system.entry.js +0 -1
  448. package/dist/verdocs-web-sdk/p-95880bac.entry.js +0 -1
  449. package/dist/verdocs-web-sdk/p-9e0a07a7.js +0 -1
  450. package/dist/verdocs-web-sdk/p-a0fcbe6e.system.entry.js +0 -1
  451. package/dist/verdocs-web-sdk/p-ae37b970.entry.js +0 -1
  452. package/dist/verdocs-web-sdk/p-b3c30059.system.js +0 -1
  453. package/dist/verdocs-web-sdk/p-b567001f.entry.js +0 -1
  454. package/dist/verdocs-web-sdk/p-b8f5af91.system.entry.js +0 -1
  455. package/dist/verdocs-web-sdk/p-bc61d0ce.entry.js +0 -23
  456. package/dist/verdocs-web-sdk/p-c4add613.entry.js +0 -1
  457. package/dist/verdocs-web-sdk/p-ccad2089.system.entry.js +0 -1
  458. package/dist/verdocs-web-sdk/p-cec7e9ea.js +0 -1
  459. package/dist/verdocs-web-sdk/p-cfb1cad1.system.entry.js +0 -1
  460. package/dist/verdocs-web-sdk/p-d3a4e22e.system.entry.js +0 -1
  461. package/dist/verdocs-web-sdk/p-d3ae5318.system.entry.js +0 -1
  462. package/dist/verdocs-web-sdk/p-d9474f48.system.js +0 -7
  463. package/dist/verdocs-web-sdk/p-dc1f3572.entry.js +0 -1
  464. package/dist/verdocs-web-sdk/p-dcf25d2c.system.entry.js +0 -23
  465. package/dist/verdocs-web-sdk/p-df4ae522.entry.js +0 -1
  466. package/dist/verdocs-web-sdk/p-e0091c19.system.entry.js +0 -1
  467. package/dist/verdocs-web-sdk/p-e1887a75.system.entry.js +0 -1
  468. package/dist/verdocs-web-sdk/p-e9f5d6a6.js +0 -1
  469. package/dist/verdocs-web-sdk/p-ee14709c.system.js +0 -1
  470. package/dist/verdocs-web-sdk/p-efffddab.system.entry.js +0 -1
  471. package/dist/verdocs-web-sdk/p-f0d20c75.entry.js +0 -1
  472. package/dist/verdocs-web-sdk/p-f35c796c.entry.js +0 -1
  473. package/dist/verdocs-web-sdk/p-f5109d69.entry.js +0 -1
  474. package/dist/verdocs-web-sdk/p-f6938563.system.entry.js +0 -1
  475. package/dist/verdocs-web-sdk/p-fa8ae849.entry.js +0 -1
@@ -1,56 +1,7 @@
1
- import { p as process_1 } from './index-2b1938ea.js';
1
+ import { p as process_1 } from './index4.js';
2
+ import { B as Buffer } from './buffer-es6.js';
2
3
 
3
- // This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
4
- // an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
5
- // (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
6
- // tokens only need to be tracked in one place). The trouble is, one of those libraries is based on
7
- // StencilJS and is compiling its modules into Web Components. Because of how module resolution works,
8
- // when those Components load js-sdk they get a separate instance. Without messy options like having to
9
- // pass raw data from the caller to each Component, or pass around references to a common Endpoint, they
10
- // have no way to access authenticated sessions unless we make the Endpoint a true global.
11
- //
12
- // @credit https://github.com/medikoo/es5-ext/blob/master/global.js
13
- // @credit https://mathiasbynens.be/notes/globalthis
14
- var naiveFallback = function () {
15
- if (typeof self === 'object' && self)
16
- return self;
17
- if (typeof window === 'object' && window)
18
- return window;
19
- throw new Error('Unable to resolve global `this`');
20
- };
21
- var globalThis_1 = (function () {
22
- if (this)
23
- return this;
24
- // Unexpected strict mode (may happen if e.g. bundled into ESM module)
25
- // Fallback to standard globalThis if available
26
- if (typeof globalThis === 'object' && globalThis)
27
- return globalThis;
28
- // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
29
- // In all ES5+ engines global object inherits from Object.prototype
30
- // (if you approached one that doesn't please report)
31
- try {
32
- Object.defineProperty(Object.prototype, '__global__', {
33
- get: function () {
34
- return this;
35
- },
36
- configurable: true,
37
- });
38
- }
39
- catch (error) {
40
- // Unfortunate case of updates to Object.prototype being restricted
41
- // via preventExtensions, seal or freeze
42
- return naiveFallback();
43
- }
44
- try {
45
- // Safari case (window.__global__ works, but __global__ does not)
46
- if (!__global__)
47
- return naiveFallback();
48
- return __global__;
49
- }
50
- finally {
51
- delete Object.prototype.__global__;
52
- }
53
- })();
4
+ 'use strict';
54
5
 
55
6
  var bind = function bind(fn, thisArg) {
56
7
  return function wrap() {
@@ -62,10 +13,30 @@ var bind = function bind(fn, thisArg) {
62
13
  };
63
14
  };
64
15
 
16
+ 'use strict';
17
+
18
+
19
+
65
20
  // utils is a library of generic helper functions non-specific to axios
66
21
 
67
22
  var toString = Object.prototype.toString;
68
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
+
69
40
  /**
70
41
  * Determine if a value is an Array
71
42
  *
@@ -100,22 +71,12 @@ function isBuffer(val) {
100
71
  /**
101
72
  * Determine if a value is an ArrayBuffer
102
73
  *
74
+ * @function
103
75
  * @param {Object} val The value to test
104
76
  * @returns {boolean} True if value is an ArrayBuffer, otherwise false
105
77
  */
106
- function isArrayBuffer(val) {
107
- return toString.call(val) === '[object ArrayBuffer]';
108
- }
78
+ var isArrayBuffer = kindOfTest('ArrayBuffer');
109
79
 
110
- /**
111
- * Determine if a value is a FormData
112
- *
113
- * @param {Object} val The value to test
114
- * @returns {boolean} True if value is an FormData, otherwise false
115
- */
116
- function isFormData(val) {
117
- return toString.call(val) === '[object FormData]';
118
- }
119
80
 
120
81
  /**
121
82
  * Determine if a value is a view on an ArrayBuffer
@@ -170,7 +131,7 @@ function isObject(val) {
170
131
  * @return {boolean} True if value is a plain Object, otherwise false
171
132
  */
172
133
  function isPlainObject(val) {
173
- if (toString.call(val) !== '[object Object]') {
134
+ if (kindOf(val) !== 'object') {
174
135
  return false;
175
136
  }
176
137
 
@@ -181,32 +142,38 @@ function isPlainObject(val) {
181
142
  /**
182
143
  * Determine if a value is a Date
183
144
  *
145
+ * @function
184
146
  * @param {Object} val The value to test
185
147
  * @returns {boolean} True if value is a Date, otherwise false
186
148
  */
187
- function isDate(val) {
188
- return toString.call(val) === '[object Date]';
189
- }
149
+ var isDate = kindOfTest('Date');
190
150
 
191
151
  /**
192
152
  * Determine if a value is a File
193
153
  *
154
+ * @function
194
155
  * @param {Object} val The value to test
195
156
  * @returns {boolean} True if value is a File, otherwise false
196
157
  */
197
- function isFile(val) {
198
- return toString.call(val) === '[object File]';
199
- }
158
+ var isFile = kindOfTest('File');
200
159
 
201
160
  /**
202
161
  * Determine if a value is a Blob
203
162
  *
163
+ * @function
204
164
  * @param {Object} val The value to test
205
165
  * @returns {boolean} True if value is a Blob, otherwise false
206
166
  */
207
- function isBlob(val) {
208
- return toString.call(val) === '[object Blob]';
209
- }
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');
210
177
 
211
178
  /**
212
179
  * Determine if a value is a Function
@@ -229,14 +196,27 @@ function isStream(val) {
229
196
  }
230
197
 
231
198
  /**
232
- * Determine if a value is a URLSearchParams object
199
+ * Determine if a value is a FormData
233
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
234
216
  * @param {Object} val The value to test
235
217
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
236
218
  */
237
- function isURLSearchParams(val) {
238
- return toString.call(val) === '[object URLSearchParams]';
239
- }
219
+ var isURLSearchParams = kindOfTest('URLSearchParams');
240
220
 
241
221
  /**
242
222
  * Trim excess whitespace off the beginning and end of a string
@@ -383,6 +363,94 @@ function stripBOM(content) {
383
363
  return content;
384
364
  }
385
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
+
386
454
  var utils = {
387
455
  isArray: isArray,
388
456
  isArrayBuffer: isArrayBuffer,
@@ -405,9 +473,21 @@ var utils = {
405
473
  merge: merge,
406
474
  extend: extend,
407
475
  trim: trim,
408
- stripBOM: stripBOM
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
409
485
  };
410
486
 
487
+ 'use strict';
488
+
489
+
490
+
411
491
  function encode(val) {
412
492
  return encodeURIComponent(val).
413
493
  replace(/%3A/gi, ':').
@@ -475,6 +555,10 @@ var buildURL = function buildURL(url, params, paramsSerializer) {
475
555
  return url;
476
556
  };
477
557
 
558
+ 'use strict';
559
+
560
+
561
+
478
562
  function InterceptorManager() {
479
563
  this.handlers = [];
480
564
  }
@@ -526,6 +610,10 @@ InterceptorManager.prototype.forEach = function forEach(fn) {
526
610
 
527
611
  var InterceptorManager_1 = InterceptorManager;
528
612
 
613
+ 'use strict';
614
+
615
+
616
+
529
617
  var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
530
618
  utils.forEach(headers, function processHeader(value, name) {
531
619
  if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
@@ -535,27 +623,32 @@ var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName)
535
623
  });
536
624
  };
537
625
 
626
+ 'use strict';
627
+
628
+
629
+
538
630
  /**
539
- * Update an Error with the specified config, error code, and response.
631
+ * Create an Error with the specified message, config, error code, request and response.
540
632
  *
541
- * @param {Error} error The error to update.
542
- * @param {Object} config The config.
633
+ * @param {string} message The error message.
543
634
  * @param {string} [code] The error code (for example, 'ECONNABORTED').
635
+ * @param {Object} [config] The config.
544
636
  * @param {Object} [request] The request.
545
637
  * @param {Object} [response] The response.
546
- * @returns {Error} The error.
638
+ * @returns {Error} The created error.
547
639
  */
548
- var enhanceError = function enhanceError(error, config, code, request, response) {
549
- error.config = config;
550
- if (code) {
551
- error.code = code;
552
- }
553
-
554
- error.request = request;
555
- error.response = response;
556
- error.isAxiosError = true;
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
+ }
557
649
 
558
- error.toJSON = function toJSON() {
650
+ utils.inherits(AxiosError, Error, {
651
+ toJSON: function toJSON() {
559
652
  return {
560
653
  // Standard
561
654
  message: this.message,
@@ -573,25 +666,135 @@ var enhanceError = function enhanceError(error, config, code, request, response)
573
666
  code: this.code,
574
667
  status: this.response && this.response.status ? this.response.status : null
575
668
  };
576
- };
577
- return error;
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;
578
709
  };
579
710
 
580
- /**
581
- * Create an Error with the specified message, config, error code, request and response.
582
- *
583
- * @param {string} message The error message.
584
- * @param {Object} config The config.
585
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
586
- * @param {Object} [request] The request.
587
- * @param {Object} [response] The response.
588
- * @returns {Error} The created error.
589
- */
590
- var createError = function createError(message, config, code, request, response) {
591
- var error = new Error(message);
592
- return enhanceError(error, config, code, request, response);
711
+ var AxiosError_1 = AxiosError;
712
+
713
+ 'use strict';
714
+
715
+ var transitional = {
716
+ silentJSONParsing: true,
717
+ forcedJSONParsing: true,
718
+ clarifyTimeoutError: false
593
719
  };
594
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
+
595
798
  /**
596
799
  * Resolve or reject a Promise based on response status.
597
800
  *
@@ -604,16 +807,20 @@ var settle = function settle(resolve, reject, response) {
604
807
  if (!response.status || !validateStatus || validateStatus(response.status)) {
605
808
  resolve(response);
606
809
  } else {
607
- reject(createError(
810
+ reject(new AxiosError_1(
608
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],
609
813
  response.config,
610
- null,
611
814
  response.request,
612
815
  response
613
816
  ));
614
817
  }
615
818
  };
616
819
 
820
+ 'use strict';
821
+
822
+
823
+
617
824
  var cookies = (
618
825
  utils.isStandardBrowserEnv() ?
619
826
 
@@ -664,6 +871,8 @@ var cookies = (
664
871
  })()
665
872
  );
666
873
 
874
+ 'use strict';
875
+
667
876
  /**
668
877
  * Determines whether the specified URL is absolute
669
878
  *
@@ -677,6 +886,8 @@ var isAbsoluteURL = function isAbsoluteURL(url) {
677
886
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
678
887
  };
679
888
 
889
+ 'use strict';
890
+
680
891
  /**
681
892
  * Creates a new URL by combining the specified URLs
682
893
  *
@@ -690,6 +901,11 @@ var combineURLs = function combineURLs(baseURL, relativeURL) {
690
901
  : baseURL;
691
902
  };
692
903
 
904
+ 'use strict';
905
+
906
+
907
+
908
+
693
909
  /**
694
910
  * Creates a new URL by combining the baseURL with the requestedURL,
695
911
  * only when the requestedURL is not already an absolute URL.
@@ -706,6 +922,10 @@ var buildFullPath = function buildFullPath(baseURL, requestedURL) {
706
922
  return requestedURL;
707
923
  };
708
924
 
925
+ 'use strict';
926
+
927
+
928
+
709
929
  // Headers whose duplicates are ignored by node
710
930
  // c.f. https://nodejs.org/api/http.html#http_message_headers
711
931
  var ignoreDuplicateOf = [
@@ -756,6 +976,10 @@ var parseHeaders = function parseHeaders(headers) {
756
976
  return parsed;
757
977
  };
758
978
 
979
+ 'use strict';
980
+
981
+
982
+
759
983
  var isURLSameOrigin = (
760
984
  utils.isStandardBrowserEnv() ?
761
985
 
@@ -821,23 +1045,49 @@ var isURLSameOrigin = (
821
1045
  })()
822
1046
  );
823
1047
 
1048
+ 'use strict';
1049
+
1050
+
1051
+
1052
+
824
1053
  /**
825
- * A `Cancel` is an object that is thrown when an operation is canceled.
1054
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
826
1055
  *
827
1056
  * @class
828
1057
  * @param {string=} message The message.
829
1058
  */
830
- function Cancel(message) {
831
- this.message = message;
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';
832
1063
  }
833
1064
 
834
- Cancel.prototype.toString = function toString() {
835
- return 'Cancel' + (this.message ? ': ' + this.message : '');
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] || '';
836
1076
  };
837
1077
 
838
- Cancel.prototype.__CANCEL__ = true;
1078
+ 'use strict';
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+
1085
+
1086
+
1087
+
1088
+
1089
+
839
1090
 
840
- var Cancel_1 = Cancel;
841
1091
 
842
1092
  var xhr = function xhrAdapter(config) {
843
1093
  return new Promise(function dispatchXhrRequest(resolve, reject) {
@@ -855,7 +1105,7 @@ var xhr = function xhrAdapter(config) {
855
1105
  }
856
1106
  }
857
1107
 
858
- if (utils.isFormData(requestData)) {
1108
+ if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
859
1109
  delete requestHeaders['Content-Type']; // Let the browser set it
860
1110
  }
861
1111
 
@@ -869,6 +1119,7 @@ var xhr = function xhrAdapter(config) {
869
1119
  }
870
1120
 
871
1121
  var fullPath = buildFullPath(config.baseURL, config.url);
1122
+
872
1123
  request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
873
1124
 
874
1125
  // Set the request timeout in MS
@@ -932,7 +1183,7 @@ var xhr = function xhrAdapter(config) {
932
1183
  return;
933
1184
  }
934
1185
 
935
- reject(createError('Request aborted', config, 'ECONNABORTED', request));
1186
+ reject(new AxiosError_1('Request aborted', AxiosError_1.ECONNABORTED, config, request));
936
1187
 
937
1188
  // Clean up request
938
1189
  request = null;
@@ -942,7 +1193,7 @@ var xhr = function xhrAdapter(config) {
942
1193
  request.onerror = function handleError() {
943
1194
  // Real errors are hidden from us by the browser
944
1195
  // onerror should only fire if it's a network error
945
- reject(createError('Network Error', config, null, request));
1196
+ reject(new AxiosError_1('Network Error', AxiosError_1.ERR_NETWORK, config, request, request));
946
1197
 
947
1198
  // Clean up request
948
1199
  request = null;
@@ -951,14 +1202,14 @@ var xhr = function xhrAdapter(config) {
951
1202
  // Handle timeout
952
1203
  request.ontimeout = function handleTimeout() {
953
1204
  var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
954
- var transitional = config.transitional || defaults_1.transitional;
1205
+ var transitional$1 = config.transitional || transitional;
955
1206
  if (config.timeoutErrorMessage) {
956
1207
  timeoutErrorMessage = config.timeoutErrorMessage;
957
1208
  }
958
- reject(createError(
1209
+ reject(new AxiosError_1(
959
1210
  timeoutErrorMessage,
1211
+ transitional$1.clarifyTimeoutError ? AxiosError_1.ETIMEDOUT : AxiosError_1.ECONNABORTED,
960
1212
  config,
961
- transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
962
1213
  request));
963
1214
 
964
1215
  // Clean up request
@@ -1019,7 +1270,7 @@ var xhr = function xhrAdapter(config) {
1019
1270
  if (!request) {
1020
1271
  return;
1021
1272
  }
1022
- reject(!cancel || (cancel && cancel.type) ? new Cancel_1('canceled') : cancel);
1273
+ reject(!cancel || (cancel && cancel.type) ? new CanceledError_1() : cancel);
1023
1274
  request.abort();
1024
1275
  request = null;
1025
1276
  };
@@ -1034,11 +1285,30 @@ var xhr = function xhrAdapter(config) {
1034
1285
  requestData = null;
1035
1286
  }
1036
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
+
1037
1296
  // Send the request
1038
1297
  request.send(requestData);
1039
1298
  });
1040
1299
  };
1041
1300
 
1301
+ // eslint-disable-next-line strict
1302
+ var _null = null;
1303
+
1304
+ 'use strict';
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+
1311
+
1042
1312
  var DEFAULT_CONTENT_TYPE = {
1043
1313
  'Content-Type': 'application/x-www-form-urlencoded'
1044
1314
  };
@@ -1078,11 +1348,7 @@ function stringifySafely(rawValue, parser, encoder) {
1078
1348
 
1079
1349
  var defaults = {
1080
1350
 
1081
- transitional: {
1082
- silentJSONParsing: true,
1083
- forcedJSONParsing: true,
1084
- clarifyTimeoutError: false
1085
- },
1351
+ transitional: transitional,
1086
1352
 
1087
1353
  adapter: getDefaultAdapter(),
1088
1354
 
@@ -1106,10 +1372,20 @@ var defaults = {
1106
1372
  setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
1107
1373
  return data.toString();
1108
1374
  }
1109
- if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
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') {
1110
1385
  setContentTypeIfUnset(headers, 'application/json');
1111
1386
  return stringifySafely(data);
1112
1387
  }
1388
+
1113
1389
  return data;
1114
1390
  }],
1115
1391
 
@@ -1125,7 +1401,7 @@ var defaults = {
1125
1401
  } catch (e) {
1126
1402
  if (strictJSONParsing) {
1127
1403
  if (e.name === 'SyntaxError') {
1128
- throw enhanceError(e, this, 'E_JSON_PARSE');
1404
+ throw AxiosError_1.from(e, AxiosError_1.ERR_BAD_RESPONSE, this, null, this.response);
1129
1405
  }
1130
1406
  throw e;
1131
1407
  }
@@ -1147,6 +1423,10 @@ var defaults = {
1147
1423
  maxContentLength: -1,
1148
1424
  maxBodyLength: -1,
1149
1425
 
1426
+ env: {
1427
+ FormData: _null
1428
+ },
1429
+
1150
1430
  validateStatus: function validateStatus(status) {
1151
1431
  return status >= 200 && status < 300;
1152
1432
  },
@@ -1168,6 +1448,11 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1168
1448
 
1169
1449
  var defaults_1 = defaults;
1170
1450
 
1451
+ 'use strict';
1452
+
1453
+
1454
+
1455
+
1171
1456
  /**
1172
1457
  * Transform the data for a request or a response
1173
1458
  *
@@ -1186,12 +1471,22 @@ var transformData = function transformData(data, headers, fns) {
1186
1471
  return data;
1187
1472
  };
1188
1473
 
1474
+ 'use strict';
1475
+
1189
1476
  var isCancel = function isCancel(value) {
1190
1477
  return !!(value && value.__CANCEL__);
1191
1478
  };
1192
1479
 
1480
+ 'use strict';
1481
+
1482
+
1483
+
1484
+
1485
+
1486
+
1487
+
1193
1488
  /**
1194
- * Throws a `Cancel` if cancellation has been requested.
1489
+ * Throws a `CanceledError` if cancellation has been requested.
1195
1490
  */
1196
1491
  function throwIfCancellationRequested(config) {
1197
1492
  if (config.cancelToken) {
@@ -1199,7 +1494,7 @@ function throwIfCancellationRequested(config) {
1199
1494
  }
1200
1495
 
1201
1496
  if (config.signal && config.signal.aborted) {
1202
- throw new Cancel_1('canceled');
1497
+ throw new CanceledError_1();
1203
1498
  }
1204
1499
  }
1205
1500
 
@@ -1270,6 +1565,10 @@ var dispatchRequest = function dispatchRequest(config) {
1270
1565
  });
1271
1566
  };
1272
1567
 
1568
+ 'use strict';
1569
+
1570
+
1571
+
1273
1572
  /**
1274
1573
  * Config-specific merge-function which creates a new config-object
1275
1574
  * by merging two configuration objects together.
@@ -1348,6 +1647,7 @@ var mergeConfig = function mergeConfig(config1, config2) {
1348
1647
  'decompress': defaultToConfig2,
1349
1648
  'maxContentLength': defaultToConfig2,
1350
1649
  'maxBodyLength': defaultToConfig2,
1650
+ 'beforeRedirect': defaultToConfig2,
1351
1651
  'transport': defaultToConfig2,
1352
1652
  'httpAgent': defaultToConfig2,
1353
1653
  'httpsAgent': defaultToConfig2,
@@ -1367,11 +1667,14 @@ var mergeConfig = function mergeConfig(config1, config2) {
1367
1667
  };
1368
1668
 
1369
1669
  var data = {
1370
- "version": "0.25.0"
1670
+ "version": "0.27.2"
1371
1671
  };
1372
1672
 
1673
+ 'use strict';
1674
+
1373
1675
  var VERSION = data.version;
1374
1676
 
1677
+
1375
1678
  var validators$1 = {};
1376
1679
 
1377
1680
  // eslint-disable-next-line func-names
@@ -1398,7 +1701,10 @@ validators$1.transitional = function transitional(validator, version, message) {
1398
1701
  // eslint-disable-next-line func-names
1399
1702
  return function(value, opt, opts) {
1400
1703
  if (validator === false) {
1401
- throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
1704
+ throw new AxiosError_1(
1705
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
1706
+ AxiosError_1.ERR_DEPRECATED
1707
+ );
1402
1708
  }
1403
1709
 
1404
1710
  if (version && !deprecatedWarnings[opt]) {
@@ -1425,7 +1731,7 @@ validators$1.transitional = function transitional(validator, version, message) {
1425
1731
 
1426
1732
  function assertOptions(options, schema, allowUnknown) {
1427
1733
  if (typeof options !== 'object') {
1428
- throw new TypeError('options must be an object');
1734
+ throw new AxiosError_1('options must be an object', AxiosError_1.ERR_BAD_OPTION_VALUE);
1429
1735
  }
1430
1736
  var keys = Object.keys(options);
1431
1737
  var i = keys.length;
@@ -1436,12 +1742,12 @@ function assertOptions(options, schema, allowUnknown) {
1436
1742
  var value = options[opt];
1437
1743
  var result = value === undefined || validator(value, opt, options);
1438
1744
  if (result !== true) {
1439
- throw new TypeError('option ' + opt + ' must be ' + result);
1745
+ throw new AxiosError_1('option ' + opt + ' must be ' + result, AxiosError_1.ERR_BAD_OPTION_VALUE);
1440
1746
  }
1441
1747
  continue;
1442
1748
  }
1443
1749
  if (allowUnknown !== true) {
1444
- throw Error('Unknown option ' + opt);
1750
+ throw new AxiosError_1('Unknown option ' + opt, AxiosError_1.ERR_BAD_OPTION);
1445
1751
  }
1446
1752
  }
1447
1753
  }
@@ -1451,6 +1757,16 @@ var validator = {
1451
1757
  validators: validators$1
1452
1758
  };
1453
1759
 
1760
+ 'use strict';
1761
+
1762
+
1763
+
1764
+
1765
+
1766
+
1767
+
1768
+
1769
+
1454
1770
  var validators = validator.validators;
1455
1771
  /**
1456
1772
  * Create a new instance of Axios
@@ -1480,10 +1796,6 @@ Axios.prototype.request = function request(configOrUrl, config) {
1480
1796
  config = configOrUrl || {};
1481
1797
  }
1482
1798
 
1483
- if (!config.url) {
1484
- throw new Error('Provided config url is not valid');
1485
- }
1486
-
1487
1799
  config = mergeConfig(this.defaults, config);
1488
1800
 
1489
1801
  // Set config.method
@@ -1566,11 +1878,9 @@ Axios.prototype.request = function request(configOrUrl, config) {
1566
1878
  };
1567
1879
 
1568
1880
  Axios.prototype.getUri = function getUri(config) {
1569
- if (!config.url) {
1570
- throw new Error('Provided config url is not valid');
1571
- }
1572
1881
  config = mergeConfig(this.defaults, config);
1573
- return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
1882
+ var fullPath = buildFullPath(config.baseURL, config.url);
1883
+ return buildURL(fullPath, config.params, config.paramsSerializer);
1574
1884
  };
1575
1885
 
1576
1886
  // Provide aliases for supported request methods
@@ -1587,17 +1897,31 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
1587
1897
 
1588
1898
  utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1589
1899
  /*eslint func-names:0*/
1590
- Axios.prototype[method] = function(url, data, config) {
1591
- return this.request(mergeConfig(config || {}, {
1592
- method: method,
1593
- url: url,
1594
- data: data
1595
- }));
1596
- };
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);
1597
1917
  });
1598
1918
 
1599
1919
  var Axios_1 = Axios;
1600
1920
 
1921
+ 'use strict';
1922
+
1923
+
1924
+
1601
1925
  /**
1602
1926
  * A `CancelToken` is an object that can be used to request cancellation of an operation.
1603
1927
  *
@@ -1652,13 +1976,13 @@ function CancelToken(executor) {
1652
1976
  return;
1653
1977
  }
1654
1978
 
1655
- token.reason = new Cancel_1(message);
1979
+ token.reason = new CanceledError_1(message);
1656
1980
  resolvePromise(token.reason);
1657
1981
  });
1658
1982
  }
1659
1983
 
1660
1984
  /**
1661
- * Throws a `Cancel` if cancellation has been requested.
1985
+ * Throws a `CanceledError` if cancellation has been requested.
1662
1986
  */
1663
1987
  CancelToken.prototype.throwIfRequested = function throwIfRequested() {
1664
1988
  if (this.reason) {
@@ -1714,6 +2038,8 @@ CancelToken.source = function source() {
1714
2038
 
1715
2039
  var CancelToken_1 = CancelToken;
1716
2040
 
2041
+ 'use strict';
2042
+
1717
2043
  /**
1718
2044
  * Syntactic sugar for invoking a function and expanding an array for arguments.
1719
2045
  *
@@ -1740,6 +2066,10 @@ var spread = function spread(callback) {
1740
2066
  };
1741
2067
  };
1742
2068
 
2069
+ 'use strict';
2070
+
2071
+
2072
+
1743
2073
  /**
1744
2074
  * Determines whether the payload is an error thrown by Axios
1745
2075
  *
@@ -1750,6 +2080,14 @@ var isAxiosError = function isAxiosError(payload) {
1750
2080
  return utils.isObject(payload) && (payload.isAxiosError === true);
1751
2081
  };
1752
2082
 
2083
+ 'use strict';
2084
+
2085
+
2086
+
2087
+
2088
+
2089
+
2090
+
1753
2091
  /**
1754
2092
  * Create an instance of Axios
1755
2093
  *
@@ -1781,10 +2119,17 @@ var axios$1 = createInstance(defaults_1);
1781
2119
  axios$1.Axios = Axios_1;
1782
2120
 
1783
2121
  // Expose Cancel & CancelToken
1784
- axios$1.Cancel = Cancel_1;
2122
+ axios$1.CanceledError = CanceledError_1;
1785
2123
  axios$1.CancelToken = CancelToken_1;
1786
2124
  axios$1.isCancel = isCancel;
1787
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;
1788
2133
 
1789
2134
  // Expose all/spread
1790
2135
  axios$1.all = function all(promises) {
@@ -1943,6 +2288,59 @@ var VerdocsEndpoint = /** @class */ (function () {
1943
2288
  return VerdocsEndpoint;
1944
2289
  }());
1945
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
+
1946
2344
  /**
1947
2345
  * The Transport is a global singleton used to call Verdocs APIs. There can only be one Transport per application, and
1948
2346
  * its configuration settings are shared for all callers. This is a simplified form of the Endpoint class where most