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