@verdocs/web-sdk 2.3.9 → 2.3.10

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 (174) hide show
  1. package/dist/cjs/{Profiles-54271244.js → Profiles-1a26e4eb.js} +0 -34
  2. package/dist/cjs/{TemplateStore-5a4a177f.js → TemplateStore-1adfba8c.js} +1 -1
  3. package/dist/cjs/{VerdocsEndpoint-feb02bbc.js → VerdocsEndpoint-b9ed9603.js} +0 -24
  4. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-auth.cjs.entry.js +4 -27
  8. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  9. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +2 -2
  10. package/dist/cjs/verdocs-contact-picker_3.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +2 -1
  19. package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -2
  20. package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +26 -4
  23. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-sign.cjs.entry.js +6 -4
  25. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -2
  27. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  28. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  29. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  30. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  31. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +20 -1
  32. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +2 -27
  33. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +6 -3
  34. package/dist/components/VerdocsEndpoint.js +0 -24
  35. package/dist/components/verdocs-auth.js +8 -39
  36. package/dist/components/verdocs-ok-dialog2.js +3 -1
  37. package/dist/components/verdocs-settings-organization2.js +22 -1
  38. package/dist/components/verdocs-sign.js +6 -3
  39. package/dist/docs.json +18 -13
  40. package/dist/esm/{Profiles-4cc942ef.js → Profiles-d4df4d1c.js} +1 -32
  41. package/dist/esm/{TemplateStore-14f723bf.js → TemplateStore-09d1ae9f.js} +1 -1
  42. package/dist/esm/{VerdocsEndpoint-a59ded42.js → VerdocsEndpoint-3add43eb.js} +0 -24
  43. package/dist/esm/ipc-test.entry.js +2 -2
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  46. package/dist/esm/verdocs-auth.entry.js +4 -27
  47. package/dist/esm/verdocs-build.entry.js +2 -2
  48. package/dist/esm/verdocs-button-panel_2.entry.js +2 -2
  49. package/dist/esm/verdocs-contact-picker_3.entry.js +1 -1
  50. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  51. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  52. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  53. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  54. package/dist/esm/verdocs-field-textarea.entry.js +1 -1
  55. package/dist/esm/verdocs-field-textbox.entry.js +1 -1
  56. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  57. package/dist/esm/verdocs-ok-dialog.entry.js +2 -1
  58. package/dist/esm/verdocs-preview_8.entry.js +2 -2
  59. package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
  60. package/dist/esm/verdocs-search.entry.js +1 -1
  61. package/dist/esm/verdocs-settings-api-keys_4.entry.js +24 -2
  62. package/dist/esm/verdocs-settings.entry.js +1 -1
  63. package/dist/esm/verdocs-sign.entry.js +6 -4
  64. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  65. package/dist/esm/verdocs-template-fields_4.entry.js +2 -2
  66. package/dist/esm/verdocs-template-star.entry.js +1 -1
  67. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  68. package/dist/esm/verdocs-view.entry.js +1 -1
  69. package/dist/esm/verdocs-web-sdk.js +1 -1
  70. package/dist/esm-es5/Profiles-d4df4d1c.js +1 -0
  71. package/dist/esm-es5/{TemplateStore-14f723bf.js → TemplateStore-09d1ae9f.js} +1 -1
  72. package/dist/esm-es5/{VerdocsEndpoint-a59ded42.js → VerdocsEndpoint-3add43eb.js} +1 -1
  73. package/dist/esm-es5/ipc-test.entry.js +1 -1
  74. package/dist/esm-es5/loader.js +1 -1
  75. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-contact-picker_3.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  83. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  84. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  85. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  86. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  87. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  88. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  89. package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
  90. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  91. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  92. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  93. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  94. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  95. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  96. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  97. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  98. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  99. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  100. package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +4 -0
  101. package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +0 -2
  102. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
  103. package/dist/types/components.d.ts +8 -0
  104. package/dist/types/utils/utils.d.ts +1 -1
  105. package/dist/verdocs-web-sdk/{p-4c5ce44f.system.entry.js → p-048cfdb5.system.entry.js} +1 -1
  106. package/dist/verdocs-web-sdk/{p-9c80493a.js → p-0bf08021.js} +1 -1
  107. package/dist/verdocs-web-sdk/{p-d5cb5e29.system.js → p-0cf6b69a.system.js} +1 -1
  108. package/dist/verdocs-web-sdk/{p-9efafb64.system.entry.js → p-13936429.system.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-a04c9aa5.system.entry.js → p-13ae6d98.system.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-cddce91f.entry.js → p-15b3184c.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-072714e2.system.entry.js → p-2fc54023.system.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-b00e0b8f.entry.js → p-30fecb02.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/p-315e20ac.system.entry.js +1 -0
  114. package/dist/verdocs-web-sdk/p-318a7887.entry.js +1 -0
  115. package/dist/verdocs-web-sdk/{p-b20e7165.entry.js → p-33077795.entry.js} +1 -1
  116. package/dist/verdocs-web-sdk/{p-023787bb.system.entry.js → p-387580cd.system.entry.js} +1 -1
  117. package/dist/verdocs-web-sdk/{p-d97c481a.entry.js → p-3950200c.entry.js} +1 -1
  118. package/dist/verdocs-web-sdk/p-3e607686.js +1 -0
  119. package/dist/verdocs-web-sdk/{p-c2498224.entry.js → p-3edde2fa.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/{p-5e45b8a2.entry.js → p-4490750d.entry.js} +1 -1
  121. package/dist/verdocs-web-sdk/{p-5b003315.entry.js → p-459510cf.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/{p-81c9f299.system.entry.js → p-45bc9865.system.entry.js} +1 -1
  123. package/dist/verdocs-web-sdk/{p-32285d2e.system.entry.js → p-52cd4ee2.system.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/{p-c771e768.entry.js → p-532e4fc1.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/{p-cb04a8a5.system.entry.js → p-5ba1045a.system.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/{p-458a3445.system.js → p-5d1fecb5.system.js} +1 -1
  127. package/dist/verdocs-web-sdk/{p-627c6d20.entry.js → p-66507ccf.entry.js} +1 -1
  128. package/dist/verdocs-web-sdk/{p-bca93ee8.entry.js → p-6ce14c63.entry.js} +1 -1
  129. package/dist/verdocs-web-sdk/{p-4ee0a68f.entry.js → p-73cbe09b.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/{p-2e5e0966.system.entry.js → p-76cadb98.system.entry.js} +1 -1
  131. package/dist/verdocs-web-sdk/p-7bad61b5.system.entry.js +1 -0
  132. package/dist/verdocs-web-sdk/{p-488a92e4.system.entry.js → p-87040b70.system.entry.js} +1 -1
  133. package/dist/verdocs-web-sdk/{p-043e7ab7.entry.js → p-a1ef2dd4.entry.js} +1 -1
  134. package/dist/verdocs-web-sdk/{p-55af24a2.system.entry.js → p-a4749aeb.system.entry.js} +1 -1
  135. package/dist/verdocs-web-sdk/{p-066729d2.system.entry.js → p-a4cec3d0.system.entry.js} +1 -1
  136. package/dist/verdocs-web-sdk/p-a4e0b977.entry.js +1 -0
  137. package/dist/verdocs-web-sdk/{p-b5f563b7.entry.js → p-b33ab87b.entry.js} +1 -1
  138. package/dist/verdocs-web-sdk/{p-089a9c0e.system.entry.js → p-b4c4335f.system.entry.js} +1 -1
  139. package/dist/verdocs-web-sdk/{p-f4567d98.entry.js → p-b63fb3e8.entry.js} +1 -1
  140. package/dist/verdocs-web-sdk/{p-5d17a274.system.entry.js → p-b70ad4db.system.entry.js} +1 -1
  141. package/dist/verdocs-web-sdk/{p-94abe272.entry.js → p-c4140ec7.entry.js} +1 -1
  142. package/dist/verdocs-web-sdk/{p-650acfb1.entry.js → p-c50a3992.entry.js} +1 -1
  143. package/dist/verdocs-web-sdk/{p-79650407.entry.js → p-c8135ff6.entry.js} +1 -1
  144. package/dist/verdocs-web-sdk/p-c9ad6362.entry.js +1 -0
  145. package/dist/verdocs-web-sdk/p-cd20fb77.system.js +1 -0
  146. package/dist/verdocs-web-sdk/{p-1c03ac0b.system.entry.js → p-d0acae0f.system.entry.js} +1 -1
  147. package/dist/verdocs-web-sdk/{p-013d1556.system.entry.js → p-d1ea580b.system.entry.js} +1 -1
  148. package/dist/verdocs-web-sdk/{p-3b582da3.system.entry.js → p-d8fc5f12.system.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-845e40ca.system.entry.js → p-dcb0e6ae.system.entry.js} +1 -1
  150. package/dist/verdocs-web-sdk/p-e2ae3679.entry.js +1 -0
  151. package/dist/verdocs-web-sdk/{p-79cec67a.js → p-e429f3bd.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-9ef5c58b.system.entry.js → p-e5cf9dd1.system.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/{p-ee316cf1.entry.js → p-e7755198.entry.js} +1 -1
  154. package/dist/verdocs-web-sdk/{p-352b68e9.entry.js → p-eccbfc3a.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  156. package/dist/verdocs-web-sdk/{p-cfde5c2b.entry.js → p-f07340cd.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-cd38f66f.system.entry.js → p-f2aec486.system.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-09b15e4b.system.entry.js → p-f368f4f3.system.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/{p-7b392b3f.entry.js → p-f5778ebb.entry.js} +1 -1
  160. package/dist/verdocs-web-sdk/p-f7510858.system.entry.js +1 -0
  161. package/dist/verdocs-web-sdk/{p-d3c8a413.system.entry.js → p-ff80d211.system.entry.js} +1 -1
  162. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  163. package/package.json +2 -2
  164. package/dist/components/Organizations.js +0 -32
  165. package/dist/esm-es5/Profiles-4cc942ef.js +0 -1
  166. package/dist/verdocs-web-sdk/p-04580be0.entry.js +0 -1
  167. package/dist/verdocs-web-sdk/p-22776bcd.system.entry.js +0 -1
  168. package/dist/verdocs-web-sdk/p-22cc7e6f.system.entry.js +0 -1
  169. package/dist/verdocs-web-sdk/p-4efdd0a7.system.entry.js +0 -1
  170. package/dist/verdocs-web-sdk/p-5b1271df.entry.js +0 -1
  171. package/dist/verdocs-web-sdk/p-91485eb2.entry.js +0 -1
  172. package/dist/verdocs-web-sdk/p-983da2f6.js +0 -1
  173. package/dist/verdocs-web-sdk/p-f65a1b9e.system.js +0 -1
  174. package/dist/verdocs-web-sdk/p-fde4ec0a.entry.js +0 -1
@@ -1 +1 @@
1
- import{d as t}from"./p-05788c2b.js";var e,n;!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(e||(e={})),function(t){t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(n||(n={}));var r,o=function(t,e,r){var o,s;if(!r&&!e.includes("create"))return{canPerform:!1,message:"Missing required template object"};var u=(null==t?void 0:t.profile_id)||"BOGUS";if(!u)return{canPerform:!1,message:"Active session required"};var c=(null==r?void 0:r.profile_id)===u,a=(null==r?void 0:r.organization_id)===((null==t?void 0:t.organization_id)||"BOGUS"),l=null!==(o=null==r?void 0:r.is_personal)&&void 0!==o&&o,f=null!==(s=null==r?void 0:r.is_public)&&void 0!==s&&s,h=[];switch(e){case"create_personal":h.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":h.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":c||(!l&&a||!f)&&h.push(n.TEMPLATE_MEMBER_READ);break;case"write":c||(h.push(n.TEMPLATE_MEMBER_READ),h.push(n.TEMPLATE_MEMBER_WRITE));break;case"change_visibility_personal":h.push(c?n.TEMPLATE_CREATOR_CREATE_PERSONAL:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_org":h.push(c?n.TEMPLATE_CREATOR_CREATE_ORG:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_public":c?(h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC),h.push(n.TEMPLATE_CREATOR_VISIBILITY)):h.push(n.TEMPLATE_MEMBER_VISIBILITY);break;case"delete":h.push(c?n.TEMPLATE_CREATOR_DELETE:n.TEMPLATE_MEMBER_DELETE);break;default:return{canPerform:!1,message:"Action is not defined"}}return i(t,h)?{canPerform:!0,message:""}:{canPerform:!1,message:"Insufficient access to perform '".concat(e,"'. Needed permissions: ").concat(h.toString())}},i=function(t,e){return e.every((function(e){return((null==t?void 0:t.permissions)||[]).includes(e)}))},s=function(t,e){return t.api.get("/templates/".concat(e)).then((function(t){return t.data}))},u=["name","is_personal","is_public","sender","description","roles","fields"],c=function(t,e,n){var r={timeout:12e4,onUploadProgress:function(t){var e=t.total||1,r=t.loaded||0;null==n||n(Math.floor(100*r/(e||1)),r,e||1)}};if(e.documents&&e.documents[0]instanceof File){var o=new FormData;return u.forEach((function(t){void 0!==e[t]&&o.append(t,e[t])})),e.documents.forEach((function(t){o.append("documents",t,t.name)})),t.api.post("/v2/templates",o,r).then((function(t){return t.data}))}return t.api.post("/v2/templates",e,r).then((function(t){return t.data}))},a=function(t,e,n){return t.api.put("/templates/".concat(e),n).then((function(t){return t.data}))},l=function(t,e){return t.api.delete("/templates/".concat(e)).then((function(t){return t.data}))};!function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(r||(r={}));var f,h,d,m,p,b,_=function(t,e){return void 0===e&&(e={}),n=void 0,r=void 0,i=function(){return function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){s.label=u[1];break}if(6===u[0]&&s.label<o[1]){s.label=o[1],o=u;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(u);break}o[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}(this,(function(){return[2,t.api.post("/templates/list",e).then((function(t){return t.data}))]}))},new((o=void 0)||(o=Promise))((function(t,e){function s(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(s,u)}c((i=i.apply(n,r||[])).next())}));var n,r,o,i};!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(f||(f={})),function(t){t.CREATE_PERSONAL="create_personal",t.CREATE_ORG="create_org",t.CREATE_PUBLIC="create_public",t.READ="read",t.WRITE="write",t.DELETE="delete",t.CHANGE_VISIBILITY_PERSONAL="change_visibility_personal",t.CHANGE_VISIBILITY_ORG="change_visibility_org",t.CHANGE_VISIBILITY_PUBLIC="change_visibility_public"}(h||(h={})),function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(d||(d={})),function(t){t.RCOMMON="rcommon:access",t.RFORM_ACCESS="rform:access",t.ORG_CREATE="org:create",t.ORG_VIEW="org:view",t.ORG_UPDATE="org:update",t.ORG_DELETE="org:delete",t.ORG_TRANSFER="org:transfer",t.ORG_LIST="org:list",t.OWNER_ADD="owner:add",t.OWNER_REMOVE="owner:remove",t.ADMIN_ADD="admin:add",t.ADMIN_REMOVE="admin:remove",t.MEMBER_VIEW="member:view",t.MEMBER_ADD="member:add",t.MEMBER_REMOVE="member:remove",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(m||(m={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(p||(p={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(b||(b={}));const E=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function w(t){return!t.response&&!!t.code&&!["ERR_CANCELED","ECONNABORTED"].includes(t.code)&&(t=>!E.has(t&&t.code))(t)}const y=["get","head","options"],R=y.concat(["put","delete"]);function v(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function g(t){return!!t.config?.method&&v(t)&&-1!==R.indexOf(t.config.method)}function O(t){return w(t)||g(t)}const T={retries:3,retryCondition:O,retryDelay:function(){return 0},shouldResetTimeout:!1,onRetry:()=>{}};function S(t,e){const n=function(t,e){return{...T,...e,...t["axios-retry"]}}(t,e||{});return n.retryCount=n.retryCount||0,n.lastRequestTime=n.lastRequestTime||Date.now(),t["axios-retry"]=n,n}const A=(t,e)=>({requestInterceptorId:t.interceptors.request.use((t=>(S(t,e),t))),responseInterceptorId:t.interceptors.response.use(null,(async n=>{const{config:r}=n;if(!r)return Promise.reject(n);const o=S(r,e);if(await async function(t,e){const{retries:n,retryCondition:r}=t,o=(t.retryCount||0)<n&&r(e);if("object"==typeof o)try{return!1!==await o}catch(t){return!1}return o}(o,n)){o.retryCount+=1;const{retryDelay:e,shouldResetTimeout:i,onRetry:s}=o,u=e(o.retryCount,n);if(function(t,e){t.defaults.agent===e.agent&&delete e.agent,t.defaults.httpAgent===e.httpAgent&&delete e.httpAgent,t.defaults.httpsAgent===e.httpsAgent&&delete e.httpsAgent}(t,r),!i&&r.timeout&&o.lastRequestTime){const t=Date.now()-o.lastRequestTime,e=r.timeout-t-u;if(e<=0)return Promise.reject(n);r.timeout=e}return r.transformRequest=[t=>t],await s(o.retryCount,n,r),new Promise((e=>{setTimeout((()=>e(t(r))),u)}))}return Promise.reject(n)}))});function N(t,e){return function(){return t.apply(e,arguments)}}A.isNetworkError=w,A.isSafeRequestError=function(t){return!!t.config?.method&&v(t)&&-1!==y.indexOf(t.config.method)},A.isIdempotentRequestError=g,A.isNetworkOrIdempotentRequestError=O,A.exponentialDelay=function(t=0,e,n=100){const r=2**t*n;return r+.2*r*Math.random()},A.isRetryableError=v;const{toString:C}=Object.prototype,{getPrototypeOf:D}=Object,j=(L=Object.create(null),t=>{const e=C.call(t);return L[e]||(L[e]=e.slice(8,-1).toLowerCase())});var L;const P=t=>(t=t.toLowerCase(),e=>j(e)===t),U=t=>e=>typeof e===t,{isArray:I}=Array,F=U("undefined"),B=P("ArrayBuffer"),x=U("string"),k=U("function"),M=U("number"),q=t=>null!==t&&"object"==typeof t,H=t=>{if("object"!==j(t))return!1;const e=D(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},G=P("Date"),z=P("File"),J=P("Blob"),K=P("FileList"),V=P("URLSearchParams");function X(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),I(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let s;for(r=0;r<i;r++)s=o[r],e.call(null,t[s],s,t)}}function $(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,W=t=>!F(t)&&t!==Y,Z=(Q="undefined"!=typeof Uint8Array&&D(Uint8Array),t=>Q&&t instanceof Q);var Q;const tt=P("HTMLFormElement"),et=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),nt=P("RegExp"),rt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};X(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},ot="abcdefghijklmnopqrstuvwxyz",it={DIGIT:"0123456789",ALPHA:ot,ALPHA_DIGIT:ot+ot.toUpperCase()+"0123456789"},st=P("AsyncFunction"),ut={isArray:I,isArrayBuffer:B,isBuffer:function(t){return null!==t&&!F(t)&&null!==t.constructor&&!F(t.constructor)&&k(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||k(t.append)&&("formdata"===(e=j(t))||"object"===e&&k(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&B(t.buffer),e},isString:x,isNumber:M,isBoolean:t=>!0===t||!1===t,isObject:q,isPlainObject:H,isUndefined:F,isDate:G,isFile:z,isBlob:J,isRegExp:nt,isFunction:k,isStream:t=>q(t)&&k(t.pipe),isURLSearchParams:V,isTypedArray:Z,isFileList:K,forEach:X,merge:function t(){const{caseless:e}=W(this)&&this||{},n={},r=(r,o)=>{const i=e&&$(n,o)||o;n[i]=H(n[i])&&H(r)?t(n[i],r):H(r)?t({},r):I(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&X(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(X(e,((e,r)=>{t[r]=n&&k(e)?N(e,n):e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,s;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],r&&!r(s,t,e)||u[s]||(e[s]=t[s],u[s]=!0);t=!1!==n&&D(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:j,kindOfTest:P,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length);const r=t.indexOf(e,n-=e.length);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(I(t))return t;let e=t.length;if(!M(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:tt,hasOwnProperty:et,hasOwnProp:et,reduceDescriptors:rt,freezeMethods:t=>{rt(t,((e,n)=>{if(k(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;k(t[n])&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return I(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:$,global:Y,isContextDefined:W,ALPHABET:it,generateString:(t=16,e=it.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&k(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(q(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=I(t)?[]:{};return X(t,((t,e)=>{const i=n(t,r+1);!F(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:st,isThenable:t=>t&&(q(t)||k(t))&&k(t.then)&&k(t.catch)};function ct(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}ut.inherits(ct,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ut.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const at=ct.prototype,lt={};function ft(t){return ut.isPlainObject(t)||ut.isArray(t)}function ht(t){return ut.endsWith(t,"[]")?t.slice(0,-2):t}function dt(t,e,n){return t?t.concat(e).map((function(t,e){return t=ht(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{lt[t]={value:t}})),Object.defineProperties(ct,lt),Object.defineProperty(at,"isAxiosError",{value:!0}),ct.from=(t,e,n,r,o,i)=>{const s=Object.create(at);return ut.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ct.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const mt=ut.toFlatObject(ut,{},null,(function(t){return/^is[A-Z]/.test(t)}));function pt(t,e,n){if(!ut.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=ut.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ut.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ut.isSpecCompliantForm(e);if(!ut.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(ut.isDate(t))return t.toISOString();if(!u&&ut.isBlob(t))throw new ct("Blob is not supported. Use a Buffer instead.");return ut.isArrayBuffer(t)||ut.isTypedArray(t)?u&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function a(t,n,o){let u=t;if(t&&!o&&"object"==typeof t)if(ut.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(ut.isArray(t)&&function(t){return ut.isArray(t)&&!t.some(ft)}(t)||(ut.isFileList(t)||ut.endsWith(n,"[]"))&&(u=ut.toArray(t)))return n=ht(n),u.forEach((function(t,r){!ut.isUndefined(t)&&null!==t&&e.append(!0===s?dt([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!ft(t)||(e.append(dt(o,n,i),c(t)),!1)}const l=[],f=Object.assign(mt,{defaultVisitor:a,convertValue:c,isVisitable:ft});if(!ut.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!ut.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),ut.forEach(n,(function(n,i){!0===(!(ut.isUndefined(n)||null===n)&&o.call(e,n,ut.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function bt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function _t(t,e){this._pairs=[],t&&pt(t,this,e)}const Et=_t.prototype;function wt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yt(t,e,n){if(!e)return t;const r=n&&n.encode||wt,o=n&&n.serialize;let i;if(i=o?o(e,n):ut.isURLSearchParams(e)?e.toString():new _t(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}Et.append=function(t,e){this._pairs.push([t,e])},Et.toString=function(t){const e=t?function(e){return t.call(this,e,bt)}:bt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Rt{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ut.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const vt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:_t,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ot="undefined"!=typeof window&&"undefined"!=typeof document,Tt=(St="undefined"!=typeof navigator&&navigator.product,Ot&&["ReactNative","NativeScript","NS"].indexOf(St)<0);var St;const At="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Nt={...Object.freeze({__proto__:null,hasBrowserEnv:Ot,hasStandardBrowserWebWorkerEnv:At,hasStandardBrowserEnv:Tt}),...gt};function Ct(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&ut.isArray(r)?r.length:i,u?(r[i]=ut.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&ut.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&ut.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!s)}if(ut.isFormData(t)&&ut.isFunction(t.entries)){const n={};return ut.forEachEntry(t,((t,r)=>{e(function(t){return ut.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Dt={transitional:vt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=ut.isObject(t);if(o&&ut.isHTMLForm(t)&&(t=new FormData(t)),ut.isFormData(t))return r&&r?JSON.stringify(Ct(t)):t;if(ut.isArrayBuffer(t)||ut.isBuffer(t)||ut.isStream(t)||ut.isFile(t)||ut.isBlob(t))return t;if(ut.isArrayBufferView(t))return t.buffer;if(ut.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return pt(t,new Nt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Nt.isNode&&ut.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=ut.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return pt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(ut.isString(t))try{return(0,JSON.parse)(t),ut.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Dt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&ut.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw ct.from(t,ct.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ut.forEach(["delete","get","head","post","put","patch"],(t=>{Dt.headers[t]={}}));const jt=ut.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Lt=Symbol("internals");function Pt(t){return t&&String(t).trim().toLowerCase()}function Ut(t){return!1===t||null==t?t:ut.isArray(t)?t.map(Ut):String(t)}function It(t,e,n,r,o){return ut.isFunction(r)?r.call(this,e,n):(o&&(e=n),ut.isString(e)?ut.isString(r)?-1!==e.indexOf(r):ut.isRegExp(r)?r.test(e):void 0:void 0)}class Ft{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Pt(e);if(!o)throw new Error("header name must be a non-empty string");const i=ut.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Ut(t))}const i=(t,e)=>ut.forEach(t,((t,n)=>o(t,n,e)));return ut.isPlainObject(t)||t instanceof this.constructor?i(t,e):ut.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&jt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=Pt(t)){const n=ut.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(ut.isFunction(e))return e.call(this,t,n);if(ut.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Pt(t)){const n=ut.findKey(this,t);return!(!n||void 0===this[n]||e&&!It(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Pt(t)){const o=ut.findKey(n,t);!o||e&&!It(0,n[o],o,e)||(delete n[o],r=!0)}}return ut.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!It(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return ut.forEach(this,((r,o)=>{const i=ut.findKey(n,o);if(i)return e[i]=Ut(r),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete e[o],e[s]=Ut(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ut.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&ut.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Lt]=this[Lt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Pt(t);e[r]||(function(t,e){const n=ut.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return ut.isArray(t)?t.forEach(r):r(t),this}}function Bt(t,e){const n=this||Dt,r=e||n,o=Ft.from(r.headers);let i=r.data;return ut.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function xt(t){return!(!t||!t.__CANCEL__)}function kt(t,e,n){ct.call(this,null==t?"canceled":t,ct.ERR_CANCELED,e,n),this.name="CanceledError"}Ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ut.reduceDescriptors(Ft.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),ut.freezeMethods(Ft),ut.inherits(kt,ct,{__CANCEL__:!0});const Mt=Nt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];ut.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ut.isString(r)&&s.push("path="+r),ut.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function qt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Ht=Nt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=ut.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Gt(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(u){const c=Date.now(),a=r[s];o||(o=c),n[i]=u,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const h=a&&c-a;return h?Math.round(1e3*f/h):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=i-n,c=r(u);n=i;const a={loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};a[e?"download":"upload"]=!0,t(a)}}const zt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Ft.from(t.headers).normalize();let i,s,{responseType:u,withXSRFToken:c}=t;function a(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(ut.isFormData(r))if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const f=qt(t.baseURL,t.url);function h(){if(!l)return;const r=Ft.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new ct("Request failed with status code "+n.status,[ct.ERR_BAD_REQUEST,ct.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:u&&"text"!==u&&"json"!==u?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),yt(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new ct("Request aborted",ct.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new ct("Network Error",ct.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new ct(e,(t.transitional||vt).clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,t,l)),l=null},Nt.hasStandardBrowserEnv&&(c&&ut.isFunction(c)&&(c=c(t)),c||!1!==c&&Ht(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&Mt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&ut.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),ut.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),u&&"json"!==u&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",Gt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Gt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new kt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const d=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);d&&-1===Nt.protocols.indexOf(d)?n(new ct("Unsupported protocol "+d+":",ct.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};ut.forEach(zt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Jt=t=>`- ${t}`,Kt=t=>ut.isFunction(t)||null===t||!1===t,Vt=t=>{t=ut.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!Kt(n)&&(r=zt[(e=String(n)).toLowerCase()],void 0===r))throw new ct(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new ct("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(Jt).join("\n"):" "+Jt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Xt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new kt(null,t)}function $t(t){return Xt(t),t.headers=Ft.from(t.headers),t.data=Bt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Vt(t.adapter||Dt.adapter)(t).then((function(e){return Xt(t),e.data=Bt.call(t,t.transformResponse,e),e.headers=Ft.from(e.headers),e}),(function(e){return xt(e)||(Xt(t),e&&e.response&&(e.response.data=Bt.call(t,t.transformResponse,e.response),e.response.headers=Ft.from(e.response.headers))),Promise.reject(e)}))}const Yt=t=>t instanceof Ft?t.toJSON():t;function Wt(t,e){e=e||{};const n={};function r(t,e,n){return ut.isPlainObject(t)&&ut.isPlainObject(e)?ut.merge.call({caseless:n},t,e):ut.isPlainObject(e)?ut.merge({},e):ut.isArray(e)?e.slice():e}function o(t,e,n){return ut.isUndefined(e)?ut.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!ut.isUndefined(e))return r(void 0,e)}function s(t,e){return ut.isUndefined(e)?ut.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function u(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(t,e)=>o(Yt(t),Yt(e),!0)};return ut.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);ut.isUndefined(s)&&i!==u||(n[r]=s)})),n}const Zt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Zt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Qt={};Zt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.2] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new ct(r(o," has been removed"+(e?" in "+e:"")),ct.ERR_DEPRECATED);return e&&!Qt[o]&&(Qt[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};const te={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ct("options must be an object",ct.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const e=t[i],n=void 0===e||s(e,i,t);if(!0!==n)throw new ct("option "+i+" must be "+n,ct.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ct("Unknown option "+i,ct.ERR_BAD_OPTION)}},validators:Zt},ee=te.validators;class ne{constructor(t){this.defaults=t,this.interceptors={request:new Rt,response:new Rt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Wt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&te.assertOptions(n,{silentJSONParsing:ee.transitional(ee.boolean),forcedJSONParsing:ee.transitional(ee.boolean),clarifyTimeoutError:ee.transitional(ee.boolean)},!1),null!=r&&(ut.isFunction(r)?e.paramsSerializer={serialize:r}:te.assertOptions(r,{encode:ee.function,serialize:ee.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&ut.merge(o.common,o[e.method]);o&&ut.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Ft.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(u=u&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const c=[];let a;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!u){const t=[$t.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,c),l=t.length,a=Promise.resolve(e);f<l;)a=a.then(t[f++],t[f++]);return a}l=s.length;let h=e;for(f=0;f<l;){const t=s[f++],e=s[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{a=$t.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=c.length;f<l;)a=a.then(c[f++],c[f++]);return a}getUri(t){return yt(qt((t=Wt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}ut.forEach(["delete","get","head","options"],(function(t){ne.prototype[t]=function(e,n){return this.request(Wt(n||{},{method:t,url:e,data:(n||{}).data}))}})),ut.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(Wt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ne.prototype[t]=e(),ne.prototype[t+"Form"]=e(!0)}));class re{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new kt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new re((function(e){t=e})),cancel:t}}}const oe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(oe).forEach((([t,e])=>{oe[e]=t}));const ie=function t(e){const n=new ne(e),r=N(ne.prototype.request,n);return ut.extend(r,ne.prototype,n,{allOwnKeys:!0}),ut.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(Wt(e,n))},r}(Dt);ie.Axios=ne,ie.CanceledError=kt,ie.CancelToken=re,ie.isCancel=xt,ie.VERSION="1.6.2",ie.toFormData=pt,ie.AxiosError=ct,ie.Cancel=ie.CanceledError,ie.all=function(t){return Promise.all(t)},ie.spread=function(t){return function(e){return t.apply(null,e)}},ie.isAxiosError=function(t){return ut.isObject(t)&&!0===t.isAxiosError},ie.mergeConfig=Wt,ie.AxiosHeaders=Ft,ie.formToJSON=t=>Ct(ut.isHTMLForm(t)?new FormData(t):t),ie.getAdapter=Vt,ie.HttpStatusCode=oe,ie.default=ie;var se=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},ue=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return se()}try{return __global__||se()}finally{delete Object.prototype.__global__}}(),ce=Symbol.for("verdocs-default-endpoint"),ae=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},le=function(){function e(t){this.environment="verdocs",this.sessionType="user",this.baseURL="https://beta.verdocs.com"===window.location.origin?"https://stage-api.verdocs.com":"https://api.verdocs.com",this.baseURLv2="https://api-v2.verdocs.com",this.clientID="not-set",this.timeout=6e4,this.token=null,this.nextListenerId=0,this.sessionListeners=new Map,this.requestLoggerId=null,this.session=null,this.baseURL=(null==t?void 0:t.baseURL)||"https://api.verdocs.com",this.baseURLv2=(null==t?void 0:t.baseURLv2)||"https://api-v2.verdocs.com",this.timeout=(null==t?void 0:t.timeout)||6e4,this.environment=(null==t?void 0:t.environment)||"verdocs",this.sessionType=(null==t?void 0:t.sessionType)||"user",this.clientID=(null==t?void 0:t.clientID)||"not-set",this.api=ie.create({baseURL:this.baseURL,timeout:this.timeout}),A(this.api,{retries:0,retryDelay:A.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){ue[ce]=this},e.getDefault=function(){return ue[ce]||(ue[ce]=new e,window.console.debug("[JS_SDK] Created default endpoint",ue[ce].baseURL)),ue[ce]},e.prototype.getEnvironment=function(){return this.environment},e.prototype.getSessionType=function(){return this.sessionType},e.prototype.getBaseURL=function(){return this.baseURL},e.prototype.getBaseURLv2=function(){return this.baseURLv2},e.prototype.getClientID=function(){return this.clientID},e.prototype.getTimeout=function(){return this.timeout},e.prototype.getSession=function(){return this.session},e.prototype.setEnvironment=function(t){return this.environment=t,this},e.prototype.setSessionType=function(t){return this.sessionType=t,this},e.prototype.setBaseURL=function(t){return this.baseURL=t,this.api.defaults.baseURL=t,this},e.prototype.setBaseURLv2=function(t){return this.baseURLv2=t,this},e.prototype.setClientID=function(t){return this.clientID=t,this.api.defaults.headers.common["X-Client-ID"]=t,this},e.prototype.setTimeout=function(t){return this.timeout=t,this.api.defaults.timeout=t,this},e.prototype.logRequests=function(t){return t&&null===this.requestLoggerId?this.requestLoggerId=this.api.interceptors.request.use(ae):t||null===this.requestLoggerId||this.api.interceptors.request.eject(this.requestLoggerId),this},e.prototype.setToken=function(e){if(!e)return this.clearSession();var n=t(e);return null===n||n.exp&&1e3*n.exp<(new Date).getTime()?(window.console.warn("[JS_SDK] Ignoring attempt to use expired session token"),this.clearSession()):(this.token=e,this.session=n,"user"===this.sessionType?this.api.defaults.headers.common.Authorization="Bearer ".concat(e):this.api.defaults.headers.common.signer="Bearer ".concat(e),localStorage.setItem(this.sessionStorageKey(),e),this.notifySessionListeners(),this)},e.prototype.getToken=function(){return this.token},e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())},e.prototype.clearSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,delete this.api.defaults.headers.common.signer,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.clearSignerSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.notifySessionListeners=function(){var t=this;this.sessionListeners.forEach((function(e){try{e(t,t.session)}catch(t){}}))},e.prototype.onSessionChanged=function(t){var e=this;this.nextListenerId++;var n=Symbol.for(""+this.nextListenerId);return this.sessionListeners.set(n,t),function(){e.sessionListeners.delete(n)}},e.prototype.loadSession=function(){var t=localStorage.getItem(this.sessionStorageKey());return t?this.setToken(t):this.clearSession()},e}();export{f as T,le as V,h as a,c as b,o as c,l as d,s as g,_ as l,a as u}
1
+ import{d as t}from"./p-05788c2b.js";var e,n;!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(e||(e={})),function(t){t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(n||(n={}));var r,o=function(t,e,r){var o,s;if(!r&&!e.includes("create"))return{canPerform:!1,message:"Missing required template object"};var u=(null==t?void 0:t.profile_id)||"BOGUS";if(!u)return{canPerform:!1,message:"Active session required"};var c=(null==r?void 0:r.profile_id)===u,a=(null==r?void 0:r.organization_id)===((null==t?void 0:t.organization_id)||"BOGUS"),l=null!==(o=null==r?void 0:r.is_personal)&&void 0!==o&&o,f=null!==(s=null==r?void 0:r.is_public)&&void 0!==s&&s,h=[];switch(e){case"create_personal":h.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":h.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":c||(!l&&a||!f)&&h.push(n.TEMPLATE_MEMBER_READ);break;case"write":c||(h.push(n.TEMPLATE_MEMBER_READ),h.push(n.TEMPLATE_MEMBER_WRITE));break;case"change_visibility_personal":h.push(c?n.TEMPLATE_CREATOR_CREATE_PERSONAL:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_org":h.push(c?n.TEMPLATE_CREATOR_CREATE_ORG:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_public":c?(h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC),h.push(n.TEMPLATE_CREATOR_VISIBILITY)):h.push(n.TEMPLATE_MEMBER_VISIBILITY);break;case"delete":h.push(c?n.TEMPLATE_CREATOR_DELETE:n.TEMPLATE_MEMBER_DELETE);break;default:return{canPerform:!1,message:"Action is not defined"}}return i(t,h)?{canPerform:!0,message:""}:{canPerform:!1,message:"Insufficient access to perform '".concat(e,"'. Needed permissions: ").concat(h.toString())}},i=function(t,e){return e.every((function(e){return((null==t?void 0:t.permissions)||[]).includes(e)}))},s=function(t,e){return t.api.get("/templates/".concat(e)).then((function(t){return t.data}))},u=["name","is_personal","is_public","sender","description","roles","fields"],c=function(t,e,n){var r={timeout:12e4,onUploadProgress:function(t){var e=t.total||1,r=t.loaded||0;null==n||n(Math.floor(100*r/(e||1)),r,e||1)}};if(e.documents&&e.documents[0]instanceof File){var o=new FormData;return u.forEach((function(t){void 0!==e[t]&&o.append(t,e[t])})),e.documents.forEach((function(t){o.append("documents",t,t.name)})),t.api.post("/v2/templates",o,r).then((function(t){return t.data}))}return t.api.post("/v2/templates",e,r).then((function(t){return t.data}))},a=function(t,e,n){return t.api.put("/templates/".concat(e),n).then((function(t){return t.data}))},l=function(t,e){return t.api.delete("/templates/".concat(e)).then((function(t){return t.data}))};!function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(r||(r={}));var f,h,d,m,p,b,_=function(t,e){return void 0===e&&(e={}),n=void 0,r=void 0,i=function(){return function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){s.label=u[1];break}if(6===u[0]&&s.label<o[1]){s.label=o[1],o=u;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(u);break}o[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}(this,(function(){return[2,t.api.post("/templates/list",e).then((function(t){return t.data}))]}))},new((o=void 0)||(o=Promise))((function(t,e){function s(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(s,u)}c((i=i.apply(n,r||[])).next())}));var n,r,o,i};!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(f||(f={})),function(t){t.CREATE_PERSONAL="create_personal",t.CREATE_ORG="create_org",t.CREATE_PUBLIC="create_public",t.READ="read",t.WRITE="write",t.DELETE="delete",t.CHANGE_VISIBILITY_PERSONAL="change_visibility_personal",t.CHANGE_VISIBILITY_ORG="change_visibility_org",t.CHANGE_VISIBILITY_PUBLIC="change_visibility_public"}(h||(h={})),function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(d||(d={})),function(t){t.RCOMMON="rcommon:access",t.RFORM_ACCESS="rform:access",t.ORG_CREATE="org:create",t.ORG_VIEW="org:view",t.ORG_UPDATE="org:update",t.ORG_DELETE="org:delete",t.ORG_TRANSFER="org:transfer",t.ORG_LIST="org:list",t.OWNER_ADD="owner:add",t.OWNER_REMOVE="owner:remove",t.ADMIN_ADD="admin:add",t.ADMIN_REMOVE="admin:remove",t.MEMBER_VIEW="member:view",t.MEMBER_ADD="member:add",t.MEMBER_REMOVE="member:remove",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(m||(m={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(p||(p={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(b||(b={}));const E=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function w(t){return!t.response&&!!t.code&&!["ERR_CANCELED","ECONNABORTED"].includes(t.code)&&(t=>!E.has(t&&t.code))(t)}const y=["get","head","options"],R=y.concat(["put","delete"]);function g(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function v(t){return!!t.config?.method&&g(t)&&-1!==R.indexOf(t.config.method)}function O(t){return w(t)||v(t)}const T={retries:3,retryCondition:O,retryDelay:function(){return 0},shouldResetTimeout:!1,onRetry:()=>{}};function S(t,e){const n=function(t,e){return{...T,...e,...t["axios-retry"]}}(t,e||{});return n.retryCount=n.retryCount||0,n.lastRequestTime=n.lastRequestTime||Date.now(),t["axios-retry"]=n,n}const A=(t,e)=>({requestInterceptorId:t.interceptors.request.use((t=>(S(t,e),t))),responseInterceptorId:t.interceptors.response.use(null,(async n=>{const{config:r}=n;if(!r)return Promise.reject(n);const o=S(r,e);if(await async function(t,e){const{retries:n,retryCondition:r}=t,o=(t.retryCount||0)<n&&r(e);if("object"==typeof o)try{return!1!==await o}catch(t){return!1}return o}(o,n)){o.retryCount+=1;const{retryDelay:e,shouldResetTimeout:i,onRetry:s}=o,u=e(o.retryCount,n);if(function(t,e){t.defaults.agent===e.agent&&delete e.agent,t.defaults.httpAgent===e.httpAgent&&delete e.httpAgent,t.defaults.httpsAgent===e.httpsAgent&&delete e.httpsAgent}(t,r),!i&&r.timeout&&o.lastRequestTime){const t=Date.now()-o.lastRequestTime,e=r.timeout-t-u;if(e<=0)return Promise.reject(n);r.timeout=e}return r.transformRequest=[t=>t],await s(o.retryCount,n,r),new Promise((e=>{setTimeout((()=>e(t(r))),u)}))}return Promise.reject(n)}))});function N(t,e){return function(){return t.apply(e,arguments)}}A.isNetworkError=w,A.isSafeRequestError=function(t){return!!t.config?.method&&g(t)&&-1!==y.indexOf(t.config.method)},A.isIdempotentRequestError=v,A.isNetworkOrIdempotentRequestError=O,A.exponentialDelay=function(t=0,e,n=100){const r=2**t*n;return r+.2*r*Math.random()},A.isRetryableError=g;const{toString:C}=Object.prototype,{getPrototypeOf:D}=Object,j=(L=Object.create(null),t=>{const e=C.call(t);return L[e]||(L[e]=e.slice(8,-1).toLowerCase())});var L;const P=t=>(t=t.toLowerCase(),e=>j(e)===t),U=t=>e=>typeof e===t,{isArray:I}=Array,F=U("undefined"),B=P("ArrayBuffer"),x=U("string"),k=U("function"),M=U("number"),q=t=>null!==t&&"object"==typeof t,H=t=>{if("object"!==j(t))return!1;const e=D(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},G=P("Date"),z=P("File"),J=P("Blob"),K=P("FileList"),V=P("URLSearchParams");function X(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),I(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let s;for(r=0;r<i;r++)s=o[r],e.call(null,t[s],s,t)}}function $(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,W=t=>!F(t)&&t!==Y,Z=(Q="undefined"!=typeof Uint8Array&&D(Uint8Array),t=>Q&&t instanceof Q);var Q;const tt=P("HTMLFormElement"),et=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),nt=P("RegExp"),rt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};X(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},ot="abcdefghijklmnopqrstuvwxyz",it={DIGIT:"0123456789",ALPHA:ot,ALPHA_DIGIT:ot+ot.toUpperCase()+"0123456789"},st=P("AsyncFunction"),ut={isArray:I,isArrayBuffer:B,isBuffer:function(t){return null!==t&&!F(t)&&null!==t.constructor&&!F(t.constructor)&&k(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||k(t.append)&&("formdata"===(e=j(t))||"object"===e&&k(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&B(t.buffer),e},isString:x,isNumber:M,isBoolean:t=>!0===t||!1===t,isObject:q,isPlainObject:H,isUndefined:F,isDate:G,isFile:z,isBlob:J,isRegExp:nt,isFunction:k,isStream:t=>q(t)&&k(t.pipe),isURLSearchParams:V,isTypedArray:Z,isFileList:K,forEach:X,merge:function t(){const{caseless:e}=W(this)&&this||{},n={},r=(r,o)=>{const i=e&&$(n,o)||o;n[i]=H(n[i])&&H(r)?t(n[i],r):H(r)?t({},r):I(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&X(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(X(e,((e,r)=>{t[r]=n&&k(e)?N(e,n):e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,s;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],r&&!r(s,t,e)||u[s]||(e[s]=t[s],u[s]=!0);t=!1!==n&&D(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:j,kindOfTest:P,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length);const r=t.indexOf(e,n-=e.length);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(I(t))return t;let e=t.length;if(!M(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:tt,hasOwnProperty:et,hasOwnProp:et,reduceDescriptors:rt,freezeMethods:t=>{rt(t,((e,n)=>{if(k(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;k(t[n])&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return I(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:$,global:Y,isContextDefined:W,ALPHABET:it,generateString:(t=16,e=it.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&k(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(q(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=I(t)?[]:{};return X(t,((t,e)=>{const i=n(t,r+1);!F(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:st,isThenable:t=>t&&(q(t)||k(t))&&k(t.then)&&k(t.catch)};function ct(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}ut.inherits(ct,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ut.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const at=ct.prototype,lt={};function ft(t){return ut.isPlainObject(t)||ut.isArray(t)}function ht(t){return ut.endsWith(t,"[]")?t.slice(0,-2):t}function dt(t,e,n){return t?t.concat(e).map((function(t,e){return t=ht(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{lt[t]={value:t}})),Object.defineProperties(ct,lt),Object.defineProperty(at,"isAxiosError",{value:!0}),ct.from=(t,e,n,r,o,i)=>{const s=Object.create(at);return ut.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ct.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const mt=ut.toFlatObject(ut,{},null,(function(t){return/^is[A-Z]/.test(t)}));function pt(t,e,n){if(!ut.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=ut.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ut.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ut.isSpecCompliantForm(e);if(!ut.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(ut.isDate(t))return t.toISOString();if(!u&&ut.isBlob(t))throw new ct("Blob is not supported. Use a Buffer instead.");return ut.isArrayBuffer(t)||ut.isTypedArray(t)?u&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function a(t,n,o){let u=t;if(t&&!o&&"object"==typeof t)if(ut.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(ut.isArray(t)&&function(t){return ut.isArray(t)&&!t.some(ft)}(t)||(ut.isFileList(t)||ut.endsWith(n,"[]"))&&(u=ut.toArray(t)))return n=ht(n),u.forEach((function(t,r){!ut.isUndefined(t)&&null!==t&&e.append(!0===s?dt([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!ft(t)||(e.append(dt(o,n,i),c(t)),!1)}const l=[],f=Object.assign(mt,{defaultVisitor:a,convertValue:c,isVisitable:ft});if(!ut.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!ut.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),ut.forEach(n,(function(n,i){!0===(!(ut.isUndefined(n)||null===n)&&o.call(e,n,ut.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function bt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function _t(t,e){this._pairs=[],t&&pt(t,this,e)}const Et=_t.prototype;function wt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yt(t,e,n){if(!e)return t;const r=n&&n.encode||wt,o=n&&n.serialize;let i;if(i=o?o(e,n):ut.isURLSearchParams(e)?e.toString():new _t(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}Et.append=function(t,e){this._pairs.push([t,e])},Et.toString=function(t){const e=t?function(e){return t.call(this,e,bt)}:bt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Rt{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ut.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const gt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:_t,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ot="undefined"!=typeof window&&"undefined"!=typeof document,Tt=(St="undefined"!=typeof navigator&&navigator.product,Ot&&["ReactNative","NativeScript","NS"].indexOf(St)<0);var St;const At="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Nt={...Object.freeze({__proto__:null,hasBrowserEnv:Ot,hasStandardBrowserWebWorkerEnv:At,hasStandardBrowserEnv:Tt}),...vt};function Ct(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&ut.isArray(r)?r.length:i,u?(r[i]=ut.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&ut.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&ut.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!s)}if(ut.isFormData(t)&&ut.isFunction(t.entries)){const n={};return ut.forEachEntry(t,((t,r)=>{e(function(t){return ut.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Dt={transitional:gt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=ut.isObject(t);if(o&&ut.isHTMLForm(t)&&(t=new FormData(t)),ut.isFormData(t))return r&&r?JSON.stringify(Ct(t)):t;if(ut.isArrayBuffer(t)||ut.isBuffer(t)||ut.isStream(t)||ut.isFile(t)||ut.isBlob(t))return t;if(ut.isArrayBufferView(t))return t.buffer;if(ut.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return pt(t,new Nt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Nt.isNode&&ut.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=ut.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return pt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(ut.isString(t))try{return(0,JSON.parse)(t),ut.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Dt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&ut.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw ct.from(t,ct.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ut.forEach(["delete","get","head","post","put","patch"],(t=>{Dt.headers[t]={}}));const jt=ut.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Lt=Symbol("internals");function Pt(t){return t&&String(t).trim().toLowerCase()}function Ut(t){return!1===t||null==t?t:ut.isArray(t)?t.map(Ut):String(t)}function It(t,e,n,r,o){return ut.isFunction(r)?r.call(this,e,n):(o&&(e=n),ut.isString(e)?ut.isString(r)?-1!==e.indexOf(r):ut.isRegExp(r)?r.test(e):void 0:void 0)}class Ft{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Pt(e);if(!o)throw new Error("header name must be a non-empty string");const i=ut.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Ut(t))}const i=(t,e)=>ut.forEach(t,((t,n)=>o(t,n,e)));return ut.isPlainObject(t)||t instanceof this.constructor?i(t,e):ut.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&jt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=Pt(t)){const n=ut.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(ut.isFunction(e))return e.call(this,t,n);if(ut.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Pt(t)){const n=ut.findKey(this,t);return!(!n||void 0===this[n]||e&&!It(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Pt(t)){const o=ut.findKey(n,t);!o||e&&!It(0,n[o],o,e)||(delete n[o],r=!0)}}return ut.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!It(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return ut.forEach(this,((r,o)=>{const i=ut.findKey(n,o);if(i)return e[i]=Ut(r),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete e[o],e[s]=Ut(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ut.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&ut.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Lt]=this[Lt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Pt(t);e[r]||(function(t,e){const n=ut.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return ut.isArray(t)?t.forEach(r):r(t),this}}function Bt(t,e){const n=this||Dt,r=e||n,o=Ft.from(r.headers);let i=r.data;return ut.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function xt(t){return!(!t||!t.__CANCEL__)}function kt(t,e,n){ct.call(this,null==t?"canceled":t,ct.ERR_CANCELED,e,n),this.name="CanceledError"}Ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ut.reduceDescriptors(Ft.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),ut.freezeMethods(Ft),ut.inherits(kt,ct,{__CANCEL__:!0});const Mt=Nt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];ut.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ut.isString(r)&&s.push("path="+r),ut.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function qt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Ht=Nt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=ut.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Gt(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(u){const c=Date.now(),a=r[s];o||(o=c),n[i]=u,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const h=a&&c-a;return h?Math.round(1e3*f/h):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=i-n,c=r(u);n=i;const a={loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};a[e?"download":"upload"]=!0,t(a)}}const zt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Ft.from(t.headers).normalize();let i,s,{responseType:u,withXSRFToken:c}=t;function a(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(ut.isFormData(r))if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const f=qt(t.baseURL,t.url);function h(){if(!l)return;const r=Ft.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new ct("Request failed with status code "+n.status,[ct.ERR_BAD_REQUEST,ct.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:u&&"text"!==u&&"json"!==u?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),yt(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new ct("Request aborted",ct.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new ct("Network Error",ct.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new ct(e,(t.transitional||gt).clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,t,l)),l=null},Nt.hasStandardBrowserEnv&&(c&&ut.isFunction(c)&&(c=c(t)),c||!1!==c&&Ht(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&Mt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&ut.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),ut.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),u&&"json"!==u&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",Gt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Gt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new kt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const d=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);d&&-1===Nt.protocols.indexOf(d)?n(new ct("Unsupported protocol "+d+":",ct.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};ut.forEach(zt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Jt=t=>`- ${t}`,Kt=t=>ut.isFunction(t)||null===t||!1===t,Vt=t=>{t=ut.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!Kt(n)&&(r=zt[(e=String(n)).toLowerCase()],void 0===r))throw new ct(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new ct("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(Jt).join("\n"):" "+Jt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Xt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new kt(null,t)}function $t(t){return Xt(t),t.headers=Ft.from(t.headers),t.data=Bt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Vt(t.adapter||Dt.adapter)(t).then((function(e){return Xt(t),e.data=Bt.call(t,t.transformResponse,e),e.headers=Ft.from(e.headers),e}),(function(e){return xt(e)||(Xt(t),e&&e.response&&(e.response.data=Bt.call(t,t.transformResponse,e.response),e.response.headers=Ft.from(e.response.headers))),Promise.reject(e)}))}const Yt=t=>t instanceof Ft?t.toJSON():t;function Wt(t,e){e=e||{};const n={};function r(t,e,n){return ut.isPlainObject(t)&&ut.isPlainObject(e)?ut.merge.call({caseless:n},t,e):ut.isPlainObject(e)?ut.merge({},e):ut.isArray(e)?e.slice():e}function o(t,e,n){return ut.isUndefined(e)?ut.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!ut.isUndefined(e))return r(void 0,e)}function s(t,e){return ut.isUndefined(e)?ut.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function u(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(t,e)=>o(Yt(t),Yt(e),!0)};return ut.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);ut.isUndefined(s)&&i!==u||(n[r]=s)})),n}const Zt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Zt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Qt={};Zt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.2] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new ct(r(o," has been removed"+(e?" in "+e:"")),ct.ERR_DEPRECATED);return e&&!Qt[o]&&(Qt[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};const te={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ct("options must be an object",ct.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const e=t[i],n=void 0===e||s(e,i,t);if(!0!==n)throw new ct("option "+i+" must be "+n,ct.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ct("Unknown option "+i,ct.ERR_BAD_OPTION)}},validators:Zt},ee=te.validators;class ne{constructor(t){this.defaults=t,this.interceptors={request:new Rt,response:new Rt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Wt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&te.assertOptions(n,{silentJSONParsing:ee.transitional(ee.boolean),forcedJSONParsing:ee.transitional(ee.boolean),clarifyTimeoutError:ee.transitional(ee.boolean)},!1),null!=r&&(ut.isFunction(r)?e.paramsSerializer={serialize:r}:te.assertOptions(r,{encode:ee.function,serialize:ee.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&ut.merge(o.common,o[e.method]);o&&ut.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Ft.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(u=u&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const c=[];let a;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!u){const t=[$t.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,c),l=t.length,a=Promise.resolve(e);f<l;)a=a.then(t[f++],t[f++]);return a}l=s.length;let h=e;for(f=0;f<l;){const t=s[f++],e=s[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{a=$t.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=c.length;f<l;)a=a.then(c[f++],c[f++]);return a}getUri(t){return yt(qt((t=Wt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}ut.forEach(["delete","get","head","options"],(function(t){ne.prototype[t]=function(e,n){return this.request(Wt(n||{},{method:t,url:e,data:(n||{}).data}))}})),ut.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(Wt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ne.prototype[t]=e(),ne.prototype[t+"Form"]=e(!0)}));class re{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new kt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new re((function(e){t=e})),cancel:t}}}const oe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(oe).forEach((([t,e])=>{oe[e]=t}));const ie=function t(e){const n=new ne(e),r=N(ne.prototype.request,n);return ut.extend(r,ne.prototype,n,{allOwnKeys:!0}),ut.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(Wt(e,n))},r}(Dt);ie.Axios=ne,ie.CanceledError=kt,ie.CancelToken=re,ie.isCancel=xt,ie.VERSION="1.6.2",ie.toFormData=pt,ie.AxiosError=ct,ie.Cancel=ie.CanceledError,ie.all=function(t){return Promise.all(t)},ie.spread=function(t){return function(e){return t.apply(null,e)}},ie.isAxiosError=function(t){return ut.isObject(t)&&!0===t.isAxiosError},ie.mergeConfig=Wt,ie.AxiosHeaders=Ft,ie.formToJSON=t=>Ct(ut.isHTMLForm(t)?new FormData(t):t),ie.getAdapter=Vt,ie.HttpStatusCode=oe,ie.default=ie;var se=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},ue=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return se()}try{return __global__||se()}finally{delete Object.prototype.__global__}}(),ce=Symbol.for("verdocs-default-endpoint"),ae=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},le=function(){function e(t){this.environment="verdocs",this.sessionType="user",this.baseURL="https://beta.verdocs.com"===window.location.origin?"https://stage-api.verdocs.com":"https://api.verdocs.com",this.clientID="not-set",this.timeout=6e4,this.token=null,this.nextListenerId=0,this.sessionListeners=new Map,this.requestLoggerId=null,this.session=null,this.baseURL=(null==t?void 0:t.baseURL)||"https://api.verdocs.com",this.timeout=(null==t?void 0:t.timeout)||6e4,this.environment=(null==t?void 0:t.environment)||"verdocs",this.sessionType=(null==t?void 0:t.sessionType)||"user",this.clientID=(null==t?void 0:t.clientID)||"not-set",this.api=ie.create({baseURL:this.baseURL,timeout:this.timeout}),A(this.api,{retries:0,retryDelay:A.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){ue[ce]=this},e.getDefault=function(){return ue[ce]||(ue[ce]=new e,window.console.debug("[JS_SDK] Created default endpoint",ue[ce].baseURL)),ue[ce]},e.prototype.getEnvironment=function(){return this.environment},e.prototype.getSessionType=function(){return this.sessionType},e.prototype.getBaseURL=function(){return this.baseURL},e.prototype.getClientID=function(){return this.clientID},e.prototype.getTimeout=function(){return this.timeout},e.prototype.getSession=function(){return this.session},e.prototype.setEnvironment=function(t){return this.environment=t,this},e.prototype.setSessionType=function(t){return this.sessionType=t,this},e.prototype.setBaseURL=function(t){return this.baseURL=t,this.api.defaults.baseURL=t,this},e.prototype.setClientID=function(t){return this.clientID=t,this.api.defaults.headers.common["X-Client-ID"]=t,this},e.prototype.setTimeout=function(t){return this.timeout=t,this.api.defaults.timeout=t,this},e.prototype.logRequests=function(t){return t&&null===this.requestLoggerId?this.requestLoggerId=this.api.interceptors.request.use(ae):t||null===this.requestLoggerId||this.api.interceptors.request.eject(this.requestLoggerId),this},e.prototype.setToken=function(e){if(!e)return this.clearSession();var n=t(e);return null===n||n.exp&&1e3*n.exp<(new Date).getTime()?(window.console.warn("[JS_SDK] Ignoring attempt to use expired session token"),this.clearSession()):(this.token=e,this.session=n,"user"===this.sessionType?this.api.defaults.headers.common.Authorization="Bearer ".concat(e):this.api.defaults.headers.common.signer="Bearer ".concat(e),localStorage.setItem(this.sessionStorageKey(),e),this.notifySessionListeners(),this)},e.prototype.getToken=function(){return this.token},e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())},e.prototype.clearSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,delete this.api.defaults.headers.common.signer,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.clearSignerSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.notifySessionListeners=function(){var t=this;this.sessionListeners.forEach((function(e){try{e(t,t.session)}catch(t){}}))},e.prototype.onSessionChanged=function(t){var e=this;this.nextListenerId++;var n=Symbol.for(""+this.nextListenerId);return this.sessionListeners.set(n,t),function(){e.sessionListeners.delete(n)}},e.prototype.loadSession=function(){var t=localStorage.getItem(this.sessionStorageKey());return t?this.setToken(t):this.clearSession()},e}();export{f as T,le as V,h as a,c as b,o as c,l as d,s as g,_ as l,a as u}
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){var r=this;e({T:void 0,a:void 0});var n;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(n||(n={}));var i;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(i||(i={}));var o=e("c",(function(e,t,r){var n,o;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var s=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var u=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!s){return{canPerform:false,message:"Active session required"}}var c=(r===null||r===void 0?void 0:r.profile_id)===s;var f=(r===null||r===void 0?void 0:r.organization_id)===u;var l=(n=r===null||r===void 0?void 0:r.is_personal)!==null&&n!==void 0?n:false;var d=(o=r===null||r===void 0?void 0:r.is_public)!==null&&o!==void 0?o:false;var p=[];switch(t){case"create_personal":p.push(i.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":p.push(i.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":p.push(i.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!c){if(!l&&f||!d){p.push(i.TEMPLATE_MEMBER_READ)}}break;case"write":if(!c){p.push(i.TEMPLATE_MEMBER_READ);p.push(i.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_ORG)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_PUBLIC);p.push(i.TEMPLATE_CREATOR_VISIBILITY)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(c){p.push(i.TEMPLATE_CREATOR_DELETE)}else{p.push(i.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(a(e,p)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(p.toString())}}));var a=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var s=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var u=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var c=e("g",(function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))}));var f=["name","is_personal","is_public","sender","description","roles","fields"];var l=e("b",(function(e,t,r){var n={timeout:12e4,onUploadProgress:function(e){var t=e.total||1;var n=e.loaded||0;r===null||r===void 0?void 0:r(Math.floor(n*100/(t||1)),n,t||1)}};if(t.documents&&t.documents[0]instanceof File){var i=new FormData;f.forEach((function(e){if(t[e]!==undefined){i.append(e,t[e])}}));t.documents.forEach((function(e){i.append("documents",e,e.name)}));return e.api.post("/v2/templates",i,n).then((function(e){return e.data}))}else{return e.api.post("/v2/templates",t,n).then((function(e){return e.data}))}}));var d=e("u",(function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))}));var p=e("d",(function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))}));var h;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(h||(h={}));var v=e("l",(function(e,t){if(t===void 0){t={}}return s(void 0,void 0,void 0,(function(){return u(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))}));var E;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(E||(E=e("T",{})));var m;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(m||(m=e("a",{})));var _;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(_||(_={}));var R;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(R||(R={}));var y;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(y||(y={}));var T;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(T||(T={}));var g=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var b=function(e){return!g.has(e&&e.code)};var A="axios-retry";function O(e){var t=["ERR_CANCELED","ECONNABORTED"];if(e.response){return false}if(!e.code){return false}if(t.includes(e.code)){return false}return b(e)}var w=["get","head","options"];var S=w.concat(["put","delete"]);function L(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function C(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return L(e)&&w.indexOf(e.config.method)!==-1}function N(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return L(e)&&S.indexOf(e.config.method)!==-1}function I(e){return O(e)||N(e)}function P(){return 0}function D(e,t,r){if(e===void 0){e=0}if(t===void 0){t=undefined}if(r===void 0){r=100}var n=Math.pow(2,e)*r;var i=n*.2*Math.random();return n+i}var U={retries:3,retryCondition:I,retryDelay:P,shouldResetTimeout:false,onRetry:function(){}};function M(e,t){return __assign(__assign(__assign({},U),t),e[A])}function B(e,t){var r=M(e,t||{});r.retryCount=r.retryCount||0;r.lastRequestTime=r.lastRequestTime||Date.now();e[A]=r;return r}function j(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function x(e,t){return s(this,void 0,void 0,(function(){var r,n,i,o,a;return u(this,(function(s){switch(s.label){case 0:r=e.retries,n=e.retryCondition;i=(e.retryCount||0)<r&&n(t);if(!(typeof i==="object"))return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);return[4,i];case 2:o=s.sent();return[2,o!==false];case 3:a=s.sent();return[2,false];case 4:return[2,i]}}))}))}var F=function(e,t){var n=e.interceptors.request.use((function(e){B(e,t);return e}));var i=e.interceptors.response.use(null,(function(n){return s(r,void 0,void 0,(function(){var r,i,o,a,s,c,f,l;return u(this,(function(u){switch(u.label){case 0:r=n.config;if(!r){return[2,Promise.reject(n)]}i=B(r,t);return[4,x(i,n)];case 1:if(!u.sent())return[3,3];i.retryCount+=1;o=i.retryDelay,a=i.shouldResetTimeout,s=i.onRetry;c=o(i.retryCount,n);j(e,r);if(!a&&r.timeout&&i.lastRequestTime){f=Date.now()-i.lastRequestTime;l=r.timeout-f-c;if(l<=0){return[2,Promise.reject(n)]}r.timeout=l}r.transformRequest=[function(e){return e}];return[4,s(i.retryCount,n,r)];case 2:u.sent();return[2,new Promise((function(t){setTimeout((function(){return t(e(r))}),c)}))];case 3:return[2,Promise.reject(n)]}}))}))}));return{requestInterceptorId:n,responseInterceptorId:i}};F.isNetworkError=O;F.isSafeRequestError=C;F.isIdempotentRequestError=N;F.isNetworkOrIdempotentRequestError=I;F.exponentialDelay=D;F.isRetryableError=L;function k(e,t){return function r(){return e.apply(t,arguments)}}var q=Object.prototype.toString;var G=Object.getPrototypeOf;var V=function(e){return function(t){var r=q.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var z=function(e){e=e.toLowerCase();return function(t){return V(t)===e}};var H=function(e){return function(t){return typeof t===e}};var J=Array.isArray;var K=H("undefined");function W(e){return e!==null&&!K(e)&&e.constructor!==null&&!K(e.constructor)&&$(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Y=z("ArrayBuffer");function X(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&Y(e.buffer)}return t}var Z=H("string");var $=H("function");var Q=H("number");var ee=function(e){return e!==null&&typeof e==="object"};var te=function(e){return e===true||e===false};var re=function(e){if(V(e)!=="object"){return false}var t=G(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var ne=z("Date");var ie=z("File");var oe=z("Blob");var ae=z("FileList");var se=function(e){return ee(e)&&$(e.pipe)};var ue=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||$(e.append)&&((t=V(e))==="formdata"||t==="object"&&$(e.toString)&&e.toString()==="[object FormData]"))};var ce=z("URLSearchParams");var fe=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function le(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var a;var s;if(typeof e!=="object"){e=[e]}if(J(e)){for(a=0,s=e.length;a<s;a++){t.call(null,e[a],a,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var c=u.length;var f=void 0;for(a=0;a<c;a++){f=u[a];t.call(null,e[f],f,e)}}}function de(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var pe=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var he=function(e){return!K(e)&&e!==pe};function ve(){var e=(he(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&de(t,n)||n;if(re(t[i])&&re(r)){t[i]=ve(t[i],r)}else if(re(r)){t[i]=ve({},r)}else if(J(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&le(arguments[n],r)}return t}var Ee=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;le(t,(function(t,n){if(r&&$(t)){e[n]=k(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var me=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var _e=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var Re=function(e,t,r,n){var i;var o;var a;var s={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){a=i[o];if((!n||n(a,e,t))&&!s[a]){t[a]=e[a];s[a]=true}}e=r!==false&&G(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var ye=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var Te=function(e){if(!e)return null;if(J(e))return e;var t=e.length;if(!Q(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var ge=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&G(Uint8Array));var be=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var Ae=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var Oe=z("HTMLFormElement");var we=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var Se=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var Le=z("RegExp");var Ce=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};le(r,(function(r,i){var o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};var Ne=function(e){Ce(e,(function(t,r){if($(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!$(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var Ie=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};J(e)?n(e):n(String(e).split(t));return r};var Pe=function(){};var De=function(e,t){e=+e;return Number.isFinite(e)?e:t};var Ue="abcdefghijklmnopqrstuvwxyz";var Me="0123456789";var Be={DIGIT:Me,ALPHA:Ue,ALPHA_DIGIT:Ue+Ue.toUpperCase()+Me};var je=function(e,t){if(e===void 0){e=16}if(t===void 0){t=Be.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function xe(e){return!!(e&&$(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Fe=function(e){var t=new Array(10);var r=function(e,n){if(ee(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=J(e)?[]:{};le(e,(function(e,t){var o=r(e,n+1);!K(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var ke=z("AsyncFunction");var qe=function(e){return e&&(ee(e)||$(e))&&$(e.then)&&$(e.catch)};var Ge={isArray:J,isArrayBuffer:Y,isBuffer:W,isFormData:ue,isArrayBufferView:X,isString:Z,isNumber:Q,isBoolean:te,isObject:ee,isPlainObject:re,isUndefined:K,isDate:ne,isFile:ie,isBlob:oe,isRegExp:Le,isFunction:$,isStream:se,isURLSearchParams:ce,isTypedArray:ge,isFileList:ae,forEach:le,merge:ve,extend:Ee,trim:fe,stripBOM:me,inherits:_e,toFlatObject:Re,kindOf:V,kindOfTest:z,endsWith:ye,toArray:Te,forEachEntry:be,matchAll:Ae,isHTMLForm:Oe,hasOwnProperty:Se,hasOwnProp:Se,reduceDescriptors:Ce,freezeMethods:Ne,toObjectSet:Ie,toCamelCase:we,noop:Pe,toFiniteNumber:De,findKey:de,global:pe,isContextDefined:he,ALPHABET:Be,generateString:je,isSpecCompliantForm:xe,toJSONObject:Fe,isAsyncFn:ke,isThenable:qe};function Ve(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}Ge.inherits(Ve,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ge.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var ze=Ve.prototype;var He={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){He[e]={value:e}}));Object.defineProperties(Ve,He);Object.defineProperty(ze,"isAxiosError",{value:true});Ve.from=function(e,t,r,n,i,o){var a=Object.create(ze);Ge.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));Ve.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var Je=null;function Ke(e){return Ge.isPlainObject(e)||Ge.isArray(e)}function We(e){return Ge.endsWith(e,"[]")?e.slice(0,-2):e}function Ye(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=We(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Xe(e){return Ge.isArray(e)&&!e.some(Ke)}var Ze=Ge.toFlatObject(Ge,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function $e(e,t,r){if(!Ge.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=Ge.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!Ge.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||f;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&Ge.isSpecCompliantForm(t);if(!Ge.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(Ge.isDate(e)){return e.toISOString()}if(!u&&Ge.isBlob(e)){throw new Ve("Blob is not supported. Use a Buffer instead.")}if(Ge.isArrayBuffer(e)||Ge.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function f(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(Ge.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(Ge.isArray(e)&&Xe(e)||(Ge.isFileList(e)||Ge.endsWith(r,"[]"))&&(s=Ge.toArray(e))){r=We(r);s.forEach((function e(n,i){!(Ge.isUndefined(n)||n===null)&&t.append(a===true?Ye([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(Ke(e)){return true}t.append(Ye(i,r,o),c(e));return false}var l=[];var d=Object.assign(Ze,{defaultVisitor:f,convertValue:c,isVisitable:Ke});function p(e,r){if(Ge.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);Ge.forEach(e,(function e(n,o){var a=!(Ge.isUndefined(n)||n===null)&&i.call(t,n,Ge.isString(o)?o.trim():o,r,d);if(a===true){p(n,r?r.concat(o):[o])}}));l.pop()}if(!Ge.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}function Qe(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function et(e,t){this._pairs=[];e&&$e(e,this,t)}var tt=et.prototype;tt.append=function e(t,r){this._pairs.push([t,r])};tt.toString=function e(t){var r=t?function(e){return t.call(this,e,Qe)}:Qe;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function rt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nt(e,t,r){if(!t){return e}var n=r&&r.encode||rt;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=Ge.isURLSearchParams(t)?t.toString():new et(t,r).toString(n)}if(o){var a=e.indexOf("#");if(a!==-1){e=e.slice(0,a)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var it=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){Ge.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var ot={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var at=typeof URLSearchParams!=="undefined"?URLSearchParams:et;var st=typeof FormData!=="undefined"?FormData:null;var ut=typeof Blob!=="undefined"?Blob:null;var ct={isBrowser:true,classes:{URLSearchParams:at,FormData:st,Blob:ut},protocols:["http","https","file","blob","url","data"]};var ft=typeof window!=="undefined"&&typeof document!=="undefined";var lt=function(e){return ft&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var dt=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var pt=Object.freeze({__proto__:null,hasBrowserEnv:ft,hasStandardBrowserWebWorkerEnv:dt,hasStandardBrowserEnv:lt});var ht=__assign(__assign({},pt),ct);function vt(e,t){return $e(e,new ht.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(ht.isNode&&Ge.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function Et(e){return Ge.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function mt(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function _t(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&Ge.isArray(n)?n.length:o;if(s){if(Ge.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!Ge.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&Ge.isArray(n[o])){n[o]=mt(n[o])}return!a}if(Ge.isFormData(e)&&Ge.isFunction(e.entries)){var r={};Ge.forEachEntry(e,(function(e,n){t(Et(e),n,r,0)}));return r}return null}function Rt(e,t,r){if(Ge.isString(e)){try{(t||JSON.parse)(e);return Ge.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var yt={transitional:ot,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=Ge.isObject(t);if(o&&Ge.isHTMLForm(t)){t=new FormData(t)}var a=Ge.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(_t(t)):t}if(Ge.isArrayBuffer(t)||Ge.isBuffer(t)||Ge.isStream(t)||Ge.isFile(t)||Ge.isBlob(t)){return t}if(Ge.isArrayBufferView(t)){return t.buffer}if(Ge.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return vt(t,this.formSerializer).toString()}if((s=Ge.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return $e(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return Rt(t)}return t}],transformResponse:[function e(t){var r=this.transitional||yt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&Ge.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var a=!o&&i;try{return JSON.parse(t)}catch(e){if(a){if(e.name==="SyntaxError"){throw Ve.from(e,Ve.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};Ge.forEach(["delete","get","head","post","put","patch"],(function(e){yt.headers[e]={}}));var Tt=Ge.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var gt=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&Tt[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var bt=Symbol("internals");function At(e){return e&&String(e).trim().toLowerCase()}function Ot(e){if(e===false||e==null){return e}return Ge.isArray(e)?e.map(Ot):String(e)}function wt(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var St=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function Lt(e,t,r,n,i){if(Ge.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Ge.isString(t))return;if(Ge.isString(n)){return t.indexOf(n)!==-1}if(Ge.isRegExp(n)){return n.test(t)}}function Ct(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function Nt(e,t){var r=Ge.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var It=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=At(t);if(!i){throw new Error("header name must be a non-empty string")}var o=Ge.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=Ot(e)}}var o=function(e,t){return Ge.forEach(e,(function(e,r){return i(e,r,t)}))};if(Ge.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(Ge.isString(e)&&(e=e.trim())&&!St(e)){o(gt(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=At(e);if(e){var r=Ge.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return wt(n)}if(Ge.isFunction(t)){return t.call(this,n,r)}if(Ge.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=At(e);if(e){var r=Ge.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Lt(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=At(e);if(e){var i=Ge.findKey(r,e);if(i&&(!t||Lt(r,r[i],i,t))){delete r[i];n=true}}}if(Ge.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||Lt(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};Ge.forEach(this,(function(n,i){var o=Ge.findKey(r,i);if(o){t[o]=Ot(n);delete t[i];return}var a=e?Ct(i):String(i).trim();if(a!==i){delete t[i]}t[a]=Ot(n);r[a]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);Ge.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&Ge.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[bt]=this[bt]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=At(e);if(!r[t]){Nt(n,e);r[t]=true}}Ge.isArray(e)?e.forEach(i):i(e);return this};return e}();It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ge.reduceDescriptors(It.prototype,(function(e,t){var r=e.value;var n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}));Ge.freezeMethods(It);function Pt(e,t){var r=this||yt;var n=t||r;var i=It.from(n.headers);var o=n.data;Ge.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function Dt(e){return!!(e&&e.__CANCEL__)}function Ut(e,t,r){Ve.call(this,e==null?"canceled":e,Ve.ERR_CANCELED,t,r);this.name="CanceledError"}Ge.inherits(Ut,Ve,{__CANCEL__:true});function Mt(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new Ve("Request failed with status code "+r.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var Bt=ht.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];Ge.isNumber(r)&&a.push("expires="+new Date(r).toGMTString());Ge.isString(n)&&a.push("path="+n);Ge.isString(i)&&a.push("domain="+i);o===true&&a.push("secure");document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function jt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xt(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ft(e,t){if(e&&!jt(t)){return xt(e,t)}return t}var kt=ht.hasStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=Ge.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function qt(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Gt(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var a;t=t!==undefined?t:1e3;return function s(u){var c=Date.now();var f=n[o];if(!a){a=c}r[i]=u;n[i]=c;var l=o;var d=0;while(l!==i){d+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var p=f&&c-f;return p?Math.round(d*1e3/p):undefined}}function Vt(e,t){var r=0;var n=Gt(50,250);return function(i){var o=i.loaded;var a=i.lengthComputable?i.total:undefined;var s=o-r;var u=n(s);var c=o<=a;r=o;var f={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:i};f[t?"download":"upload"]=true;e(f)}}var zt=typeof XMLHttpRequest!=="undefined";var Ht=zt&&function(e){return new Promise((function t(r,n){var i=e.data;var o=It.from(e.headers).normalize();var a=e.responseType,s=e.withXSRFToken;var u;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var f;if(Ge.isFormData(i)){if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((f=o.getContentType())!==false){var l=f?f.split(";").map((function(e){return e.trim()})).filter(Boolean):[],d=l[0],p=l.slice(1);o.setContentType(__spreadArray([d||"multipart/form-data"],p,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"";var E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(v+":"+E))}var m=Ft(e.baseURL,e.url);h.open(e.method.toUpperCase(),nt(m,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function _(){if(!h){return}var t=It.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};Mt((function e(t){r(t);c()}),(function e(t){n(t);c()}),o);h=null}if("onloadend"in h){h.onloadend=_}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(_)}}h.onabort=function t(){if(!h){return}n(new Ve("Request aborted",Ve.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new Ve("Network Error",Ve.ERR_NETWORK,e,h));h=null};h.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||ot;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new Ve(r,i.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,h));h=null};if(ht.hasStandardBrowserEnv){s&&Ge.isFunction(s)&&(s=s(e));if(s||s!==false&&kt(m)){var R=e.xsrfHeaderName&&e.xsrfCookieName&&Bt.read(e.xsrfCookieName);if(R){o.set(e.xsrfHeaderName,R)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){Ge.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!Ge.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(a&&a!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",Vt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",Vt(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new Ut(null,e,h):t);h.abort();h=null};e.cancelToken&&e.cancelToken.subscribe(u);if(e.signal){e.signal.aborted?u():e.signal.addEventListener("abort",u)}}var y=qt(m);if(y&&ht.protocols.indexOf(y)===-1){n(new Ve("Unsupported protocol "+y+":",Ve.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var Jt={http:Je,xhr:Ht};Ge.forEach(Jt,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Kt=function(e){return"- ".concat(e)};var Wt=function(e){return Ge.isFunction(e)||e===null||e===false};var Yt={getAdapter:function(e){e=Ge.isArray(e)?e:[e];var t=e.length;var r;var n;var i={};for(var o=0;o<t;o++){r=e[o];var a=void 0;n=r;if(!Wt(r)){n=Jt[(a=String(r)).toLowerCase()];if(n===undefined){throw new Ve("Unknown adapter '".concat(a,"'"))}}if(n){break}i[a||"#"+o]=n}if(!n){var s=Object.entries(i).map((function(e){var t=e[0],r=e[1];return"adapter ".concat(t," ")+(r===false?"is not supported by the environment":"is not available in the build")}));var u=t?s.length>1?"since :\n"+s.map(Kt).join("\n"):" "+Kt(s[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n},adapters:Jt};function Xt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new Ut(null,e)}}function Zt(e){Xt(e);e.headers=It.from(e.headers);e.data=Pt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=Yt.getAdapter(e.adapter||yt.adapter);return t(e).then((function t(r){Xt(e);r.data=Pt.call(e,e.transformResponse,r);r.headers=It.from(r.headers);return r}),(function t(r){if(!Dt(r)){Xt(e);if(r&&r.response){r.response.data=Pt.call(e,e.transformResponse,r.response);r.response.headers=It.from(r.response.headers)}}return Promise.reject(r)}))}var $t=function(e){return e instanceof It?e.toJSON():e};function Qt(e,t){t=t||{};var r={};function n(e,t,r){if(Ge.isPlainObject(e)&&Ge.isPlainObject(t)){return Ge.merge.call({caseless:r},e,t)}else if(Ge.isPlainObject(t)){return Ge.merge({},t)}else if(Ge.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!Ge.isUndefined(t)){return n(e,t,r)}else if(!Ge.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!Ge.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!Ge.isUndefined(t)){return n(undefined,t)}else if(!Ge.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i($t(e),$t(t),true)}};Ge.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);Ge.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var er="1.6.2";var tr={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){tr[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var rr={};tr.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+er+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Ve(i(n," has been removed"+(r?" in "+r:"")),Ve.ERR_DEPRECATED)}if(r&&!rr[n]){rr[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function nr(e,t,r){if(typeof e!=="object"){throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var a=t[o];if(a){var s=e[o];var u=s===undefined||a(s,o,e);if(u!==true){throw new Ve("option "+o+" must be "+u,Ve.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Ve("Unknown option "+o,Ve.ERR_BAD_OPTION)}}}var ir={assertOptions:nr,validators:tr};var or=ir.validators;var ar=function(){function e(e){this.defaults=e;this.interceptors={request:new it,response:new it}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Qt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){ir.assertOptions(r,{silentJSONParsing:or.transitional(or.boolean),forcedJSONParsing:or.transitional(or.boolean),clarifyTimeoutError:or.transitional(or.boolean)},false)}if(n!=null){if(Ge.isFunction(n)){t.paramsSerializer={serialize:n}}else{ir.assertOptions(n,{encode:or.function,serialize:or.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=i&&Ge.merge(i.common,i[t.method]);i&&Ge.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=It.concat(o,i);var a=[];var s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var c;var f=0;var l;if(!s){var d=[Zt.bind(this),undefined];d.unshift.apply(d,a);d.push.apply(d,u);l=d.length;c=Promise.resolve(t);while(f<l){c=c.then(d[f++],d[f++])}return c}l=a.length;var p=t;f=0;while(f<l){var h=a[f++];var v=a[f++];try{p=h(p)}catch(e){v.call(this,e);break}}try{c=Zt.call(this,p)}catch(e){return Promise.reject(e)}f=0;l=u.length;while(f<l){c=c.then(u[f++],u[f++])}return c};e.prototype.getUri=function(e){e=Qt(this.defaults,e);var t=Ft(e.baseURL,e.url);return nt(t,e.params,e.paramsSerializer)};return e}();Ge.forEach(["delete","get","head","options"],(function e(t){ar.prototype[t]=function(e,r){return this.request(Qt(r||{},{method:t,url:e,data:(r||{}).data}))}}));Ge.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Qt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}ar.prototype[t]=r();ar.prototype[t+"Form"]=r(true)}));var sr=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new Ut(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function ur(e){return function t(r){return e.apply(null,r)}}function cr(e){return Ge.isObject(e)&&e.isAxiosError===true}var fr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fr).forEach((function(e){var t=e[0],r=e[1];fr[r]=t}));function lr(e){var t=new ar(e);var r=k(ar.prototype.request,t);Ge.extend(r,ar.prototype,t,{allOwnKeys:true});Ge.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return lr(Qt(e,r))};return r}var dr=lr(yt);dr.Axios=ar;dr.CanceledError=Ut;dr.CancelToken=sr;dr.isCancel=Dt;dr.VERSION=er;dr.toFormData=$e;dr.AxiosError=Ve;dr.Cancel=dr.CanceledError;dr.all=function e(t){return Promise.all(t)};dr.spread=ur;dr.isAxiosError=cr;dr.mergeConfig=Qt;dr.AxiosHeaders=It;dr.formToJSON=function(e){return _t(Ge.isHTMLForm(e)?new FormData(e):e)};dr.getAdapter=Yt.getAdapter;dr.HttpStatusCode=fr;dr.default=dr;var pr=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var hr=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return pr()}try{if(!__global__)return pr();return __global__}finally{delete Object.prototype.__global__}}();var vr=Symbol.for("verdocs-default-endpoint");var Er=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var mr=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL=window.location.origin==="https://beta.verdocs.com"?"https://stage-api.verdocs.com":"https://api.verdocs.com";this.baseURLv2="https://api-v2.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.baseURLv2=(e===null||e===void 0?void 0:e.baseURLv2)||"https://api-v2.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||6e4;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=dr.create({baseURL:this.baseURL,timeout:this.timeout});F(this.api,{retries:0,retryDelay:F.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){hr[vr]=this};e.getDefault=function(){if(!hr[vr]){hr[vr]=new e;window.console.debug("[JS_SDK] Created default endpoint",hr[vr].baseURL)}return hr[vr]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getBaseURLv2=function(){return this.baseURLv2};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.baseURL=e;this.api.defaults.baseURL=e;return this};e.prototype.setBaseURLv2=function(e){this.baseURLv2=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(Er)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var r=t(e);if(r===null||r.exp&&r.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=r;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}())}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){var r=this;e({T:void 0,a:void 0});var n;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(n||(n={}));var i;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(i||(i={}));var o=e("c",(function(e,t,r){var n,o;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var s=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var u=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!s){return{canPerform:false,message:"Active session required"}}var c=(r===null||r===void 0?void 0:r.profile_id)===s;var f=(r===null||r===void 0?void 0:r.organization_id)===u;var l=(n=r===null||r===void 0?void 0:r.is_personal)!==null&&n!==void 0?n:false;var d=(o=r===null||r===void 0?void 0:r.is_public)!==null&&o!==void 0?o:false;var p=[];switch(t){case"create_personal":p.push(i.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":p.push(i.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":p.push(i.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!c){if(!l&&f||!d){p.push(i.TEMPLATE_MEMBER_READ)}}break;case"write":if(!c){p.push(i.TEMPLATE_MEMBER_READ);p.push(i.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_ORG)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_PUBLIC);p.push(i.TEMPLATE_CREATOR_VISIBILITY)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(c){p.push(i.TEMPLATE_CREATOR_DELETE)}else{p.push(i.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(a(e,p)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(p.toString())}}));var a=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var s=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var u=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var c=e("g",(function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))}));var f=["name","is_personal","is_public","sender","description","roles","fields"];var l=e("b",(function(e,t,r){var n={timeout:12e4,onUploadProgress:function(e){var t=e.total||1;var n=e.loaded||0;r===null||r===void 0?void 0:r(Math.floor(n*100/(t||1)),n,t||1)}};if(t.documents&&t.documents[0]instanceof File){var i=new FormData;f.forEach((function(e){if(t[e]!==undefined){i.append(e,t[e])}}));t.documents.forEach((function(e){i.append("documents",e,e.name)}));return e.api.post("/v2/templates",i,n).then((function(e){return e.data}))}else{return e.api.post("/v2/templates",t,n).then((function(e){return e.data}))}}));var d=e("u",(function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))}));var p=e("d",(function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))}));var h;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(h||(h={}));var v=e("l",(function(e,t){if(t===void 0){t={}}return s(void 0,void 0,void 0,(function(){return u(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))}));var E;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(E||(E=e("T",{})));var m;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(m||(m=e("a",{})));var _;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(_||(_={}));var R;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(R||(R={}));var y;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(y||(y={}));var T;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(T||(T={}));var g=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var b=function(e){return!g.has(e&&e.code)};var A="axios-retry";function O(e){var t=["ERR_CANCELED","ECONNABORTED"];if(e.response){return false}if(!e.code){return false}if(t.includes(e.code)){return false}return b(e)}var w=["get","head","options"];var S=w.concat(["put","delete"]);function C(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function L(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return C(e)&&w.indexOf(e.config.method)!==-1}function N(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return C(e)&&S.indexOf(e.config.method)!==-1}function I(e){return O(e)||N(e)}function P(){return 0}function D(e,t,r){if(e===void 0){e=0}if(t===void 0){t=undefined}if(r===void 0){r=100}var n=Math.pow(2,e)*r;var i=n*.2*Math.random();return n+i}var M={retries:3,retryCondition:I,retryDelay:P,shouldResetTimeout:false,onRetry:function(){}};function U(e,t){return __assign(__assign(__assign({},M),t),e[A])}function B(e,t){var r=U(e,t||{});r.retryCount=r.retryCount||0;r.lastRequestTime=r.lastRequestTime||Date.now();e[A]=r;return r}function j(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function x(e,t){return s(this,void 0,void 0,(function(){var r,n,i,o,a;return u(this,(function(s){switch(s.label){case 0:r=e.retries,n=e.retryCondition;i=(e.retryCount||0)<r&&n(t);if(!(typeof i==="object"))return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);return[4,i];case 2:o=s.sent();return[2,o!==false];case 3:a=s.sent();return[2,false];case 4:return[2,i]}}))}))}var F=function(e,t){var n=e.interceptors.request.use((function(e){B(e,t);return e}));var i=e.interceptors.response.use(null,(function(n){return s(r,void 0,void 0,(function(){var r,i,o,a,s,c,f,l;return u(this,(function(u){switch(u.label){case 0:r=n.config;if(!r){return[2,Promise.reject(n)]}i=B(r,t);return[4,x(i,n)];case 1:if(!u.sent())return[3,3];i.retryCount+=1;o=i.retryDelay,a=i.shouldResetTimeout,s=i.onRetry;c=o(i.retryCount,n);j(e,r);if(!a&&r.timeout&&i.lastRequestTime){f=Date.now()-i.lastRequestTime;l=r.timeout-f-c;if(l<=0){return[2,Promise.reject(n)]}r.timeout=l}r.transformRequest=[function(e){return e}];return[4,s(i.retryCount,n,r)];case 2:u.sent();return[2,new Promise((function(t){setTimeout((function(){return t(e(r))}),c)}))];case 3:return[2,Promise.reject(n)]}}))}))}));return{requestInterceptorId:n,responseInterceptorId:i}};F.isNetworkError=O;F.isSafeRequestError=L;F.isIdempotentRequestError=N;F.isNetworkOrIdempotentRequestError=I;F.exponentialDelay=D;F.isRetryableError=C;function k(e,t){return function r(){return e.apply(t,arguments)}}var q=Object.prototype.toString;var G=Object.getPrototypeOf;var V=function(e){return function(t){var r=q.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var z=function(e){e=e.toLowerCase();return function(t){return V(t)===e}};var H=function(e){return function(t){return typeof t===e}};var J=Array.isArray;var K=H("undefined");function W(e){return e!==null&&!K(e)&&e.constructor!==null&&!K(e.constructor)&&$(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Y=z("ArrayBuffer");function X(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&Y(e.buffer)}return t}var Z=H("string");var $=H("function");var Q=H("number");var ee=function(e){return e!==null&&typeof e==="object"};var te=function(e){return e===true||e===false};var re=function(e){if(V(e)!=="object"){return false}var t=G(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var ne=z("Date");var ie=z("File");var oe=z("Blob");var ae=z("FileList");var se=function(e){return ee(e)&&$(e.pipe)};var ue=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||$(e.append)&&((t=V(e))==="formdata"||t==="object"&&$(e.toString)&&e.toString()==="[object FormData]"))};var ce=z("URLSearchParams");var fe=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function le(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var a;var s;if(typeof e!=="object"){e=[e]}if(J(e)){for(a=0,s=e.length;a<s;a++){t.call(null,e[a],a,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var c=u.length;var f=void 0;for(a=0;a<c;a++){f=u[a];t.call(null,e[f],f,e)}}}function de(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var pe=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var he=function(e){return!K(e)&&e!==pe};function ve(){var e=(he(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&de(t,n)||n;if(re(t[i])&&re(r)){t[i]=ve(t[i],r)}else if(re(r)){t[i]=ve({},r)}else if(J(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&le(arguments[n],r)}return t}var Ee=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;le(t,(function(t,n){if(r&&$(t)){e[n]=k(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var me=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var _e=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var Re=function(e,t,r,n){var i;var o;var a;var s={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){a=i[o];if((!n||n(a,e,t))&&!s[a]){t[a]=e[a];s[a]=true}}e=r!==false&&G(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var ye=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var Te=function(e){if(!e)return null;if(J(e))return e;var t=e.length;if(!Q(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var ge=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&G(Uint8Array));var be=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var Ae=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var Oe=z("HTMLFormElement");var we=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var Se=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var Ce=z("RegExp");var Le=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};le(r,(function(r,i){var o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};var Ne=function(e){Le(e,(function(t,r){if($(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!$(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var Ie=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};J(e)?n(e):n(String(e).split(t));return r};var Pe=function(){};var De=function(e,t){e=+e;return Number.isFinite(e)?e:t};var Me="abcdefghijklmnopqrstuvwxyz";var Ue="0123456789";var Be={DIGIT:Ue,ALPHA:Me,ALPHA_DIGIT:Me+Me.toUpperCase()+Ue};var je=function(e,t){if(e===void 0){e=16}if(t===void 0){t=Be.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function xe(e){return!!(e&&$(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Fe=function(e){var t=new Array(10);var r=function(e,n){if(ee(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=J(e)?[]:{};le(e,(function(e,t){var o=r(e,n+1);!K(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var ke=z("AsyncFunction");var qe=function(e){return e&&(ee(e)||$(e))&&$(e.then)&&$(e.catch)};var Ge={isArray:J,isArrayBuffer:Y,isBuffer:W,isFormData:ue,isArrayBufferView:X,isString:Z,isNumber:Q,isBoolean:te,isObject:ee,isPlainObject:re,isUndefined:K,isDate:ne,isFile:ie,isBlob:oe,isRegExp:Ce,isFunction:$,isStream:se,isURLSearchParams:ce,isTypedArray:ge,isFileList:ae,forEach:le,merge:ve,extend:Ee,trim:fe,stripBOM:me,inherits:_e,toFlatObject:Re,kindOf:V,kindOfTest:z,endsWith:ye,toArray:Te,forEachEntry:be,matchAll:Ae,isHTMLForm:Oe,hasOwnProperty:Se,hasOwnProp:Se,reduceDescriptors:Le,freezeMethods:Ne,toObjectSet:Ie,toCamelCase:we,noop:Pe,toFiniteNumber:De,findKey:de,global:pe,isContextDefined:he,ALPHABET:Be,generateString:je,isSpecCompliantForm:xe,toJSONObject:Fe,isAsyncFn:ke,isThenable:qe};function Ve(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}Ge.inherits(Ve,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ge.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var ze=Ve.prototype;var He={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){He[e]={value:e}}));Object.defineProperties(Ve,He);Object.defineProperty(ze,"isAxiosError",{value:true});Ve.from=function(e,t,r,n,i,o){var a=Object.create(ze);Ge.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));Ve.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var Je=null;function Ke(e){return Ge.isPlainObject(e)||Ge.isArray(e)}function We(e){return Ge.endsWith(e,"[]")?e.slice(0,-2):e}function Ye(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=We(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Xe(e){return Ge.isArray(e)&&!e.some(Ke)}var Ze=Ge.toFlatObject(Ge,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function $e(e,t,r){if(!Ge.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=Ge.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!Ge.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||f;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&Ge.isSpecCompliantForm(t);if(!Ge.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(Ge.isDate(e)){return e.toISOString()}if(!u&&Ge.isBlob(e)){throw new Ve("Blob is not supported. Use a Buffer instead.")}if(Ge.isArrayBuffer(e)||Ge.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function f(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(Ge.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(Ge.isArray(e)&&Xe(e)||(Ge.isFileList(e)||Ge.endsWith(r,"[]"))&&(s=Ge.toArray(e))){r=We(r);s.forEach((function e(n,i){!(Ge.isUndefined(n)||n===null)&&t.append(a===true?Ye([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(Ke(e)){return true}t.append(Ye(i,r,o),c(e));return false}var l=[];var d=Object.assign(Ze,{defaultVisitor:f,convertValue:c,isVisitable:Ke});function p(e,r){if(Ge.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);Ge.forEach(e,(function e(n,o){var a=!(Ge.isUndefined(n)||n===null)&&i.call(t,n,Ge.isString(o)?o.trim():o,r,d);if(a===true){p(n,r?r.concat(o):[o])}}));l.pop()}if(!Ge.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}function Qe(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function et(e,t){this._pairs=[];e&&$e(e,this,t)}var tt=et.prototype;tt.append=function e(t,r){this._pairs.push([t,r])};tt.toString=function e(t){var r=t?function(e){return t.call(this,e,Qe)}:Qe;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function rt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nt(e,t,r){if(!t){return e}var n=r&&r.encode||rt;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=Ge.isURLSearchParams(t)?t.toString():new et(t,r).toString(n)}if(o){var a=e.indexOf("#");if(a!==-1){e=e.slice(0,a)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var it=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){Ge.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var ot={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var at=typeof URLSearchParams!=="undefined"?URLSearchParams:et;var st=typeof FormData!=="undefined"?FormData:null;var ut=typeof Blob!=="undefined"?Blob:null;var ct={isBrowser:true,classes:{URLSearchParams:at,FormData:st,Blob:ut},protocols:["http","https","file","blob","url","data"]};var ft=typeof window!=="undefined"&&typeof document!=="undefined";var lt=function(e){return ft&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var dt=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var pt=Object.freeze({__proto__:null,hasBrowserEnv:ft,hasStandardBrowserWebWorkerEnv:dt,hasStandardBrowserEnv:lt});var ht=__assign(__assign({},pt),ct);function vt(e,t){return $e(e,new ht.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(ht.isNode&&Ge.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function Et(e){return Ge.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function mt(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function _t(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&Ge.isArray(n)?n.length:o;if(s){if(Ge.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!Ge.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&Ge.isArray(n[o])){n[o]=mt(n[o])}return!a}if(Ge.isFormData(e)&&Ge.isFunction(e.entries)){var r={};Ge.forEachEntry(e,(function(e,n){t(Et(e),n,r,0)}));return r}return null}function Rt(e,t,r){if(Ge.isString(e)){try{(t||JSON.parse)(e);return Ge.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var yt={transitional:ot,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=Ge.isObject(t);if(o&&Ge.isHTMLForm(t)){t=new FormData(t)}var a=Ge.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(_t(t)):t}if(Ge.isArrayBuffer(t)||Ge.isBuffer(t)||Ge.isStream(t)||Ge.isFile(t)||Ge.isBlob(t)){return t}if(Ge.isArrayBufferView(t)){return t.buffer}if(Ge.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return vt(t,this.formSerializer).toString()}if((s=Ge.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return $e(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return Rt(t)}return t}],transformResponse:[function e(t){var r=this.transitional||yt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&Ge.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var a=!o&&i;try{return JSON.parse(t)}catch(e){if(a){if(e.name==="SyntaxError"){throw Ve.from(e,Ve.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};Ge.forEach(["delete","get","head","post","put","patch"],(function(e){yt.headers[e]={}}));var Tt=Ge.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var gt=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&Tt[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var bt=Symbol("internals");function At(e){return e&&String(e).trim().toLowerCase()}function Ot(e){if(e===false||e==null){return e}return Ge.isArray(e)?e.map(Ot):String(e)}function wt(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var St=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function Ct(e,t,r,n,i){if(Ge.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Ge.isString(t))return;if(Ge.isString(n)){return t.indexOf(n)!==-1}if(Ge.isRegExp(n)){return n.test(t)}}function Lt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function Nt(e,t){var r=Ge.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var It=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=At(t);if(!i){throw new Error("header name must be a non-empty string")}var o=Ge.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=Ot(e)}}var o=function(e,t){return Ge.forEach(e,(function(e,r){return i(e,r,t)}))};if(Ge.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(Ge.isString(e)&&(e=e.trim())&&!St(e)){o(gt(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=At(e);if(e){var r=Ge.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return wt(n)}if(Ge.isFunction(t)){return t.call(this,n,r)}if(Ge.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=At(e);if(e){var r=Ge.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Ct(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=At(e);if(e){var i=Ge.findKey(r,e);if(i&&(!t||Ct(r,r[i],i,t))){delete r[i];n=true}}}if(Ge.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||Ct(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};Ge.forEach(this,(function(n,i){var o=Ge.findKey(r,i);if(o){t[o]=Ot(n);delete t[i];return}var a=e?Lt(i):String(i).trim();if(a!==i){delete t[i]}t[a]=Ot(n);r[a]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);Ge.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&Ge.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[bt]=this[bt]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=At(e);if(!r[t]){Nt(n,e);r[t]=true}}Ge.isArray(e)?e.forEach(i):i(e);return this};return e}();It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ge.reduceDescriptors(It.prototype,(function(e,t){var r=e.value;var n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}));Ge.freezeMethods(It);function Pt(e,t){var r=this||yt;var n=t||r;var i=It.from(n.headers);var o=n.data;Ge.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function Dt(e){return!!(e&&e.__CANCEL__)}function Mt(e,t,r){Ve.call(this,e==null?"canceled":e,Ve.ERR_CANCELED,t,r);this.name="CanceledError"}Ge.inherits(Mt,Ve,{__CANCEL__:true});function Ut(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new Ve("Request failed with status code "+r.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var Bt=ht.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];Ge.isNumber(r)&&a.push("expires="+new Date(r).toGMTString());Ge.isString(n)&&a.push("path="+n);Ge.isString(i)&&a.push("domain="+i);o===true&&a.push("secure");document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function jt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xt(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ft(e,t){if(e&&!jt(t)){return xt(e,t)}return t}var kt=ht.hasStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=Ge.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function qt(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Gt(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var a;t=t!==undefined?t:1e3;return function s(u){var c=Date.now();var f=n[o];if(!a){a=c}r[i]=u;n[i]=c;var l=o;var d=0;while(l!==i){d+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var p=f&&c-f;return p?Math.round(d*1e3/p):undefined}}function Vt(e,t){var r=0;var n=Gt(50,250);return function(i){var o=i.loaded;var a=i.lengthComputable?i.total:undefined;var s=o-r;var u=n(s);var c=o<=a;r=o;var f={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:i};f[t?"download":"upload"]=true;e(f)}}var zt=typeof XMLHttpRequest!=="undefined";var Ht=zt&&function(e){return new Promise((function t(r,n){var i=e.data;var o=It.from(e.headers).normalize();var a=e.responseType,s=e.withXSRFToken;var u;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var f;if(Ge.isFormData(i)){if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((f=o.getContentType())!==false){var l=f?f.split(";").map((function(e){return e.trim()})).filter(Boolean):[],d=l[0],p=l.slice(1);o.setContentType(__spreadArray([d||"multipart/form-data"],p,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"";var E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(v+":"+E))}var m=Ft(e.baseURL,e.url);h.open(e.method.toUpperCase(),nt(m,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function _(){if(!h){return}var t=It.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};Ut((function e(t){r(t);c()}),(function e(t){n(t);c()}),o);h=null}if("onloadend"in h){h.onloadend=_}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(_)}}h.onabort=function t(){if(!h){return}n(new Ve("Request aborted",Ve.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new Ve("Network Error",Ve.ERR_NETWORK,e,h));h=null};h.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||ot;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new Ve(r,i.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,h));h=null};if(ht.hasStandardBrowserEnv){s&&Ge.isFunction(s)&&(s=s(e));if(s||s!==false&&kt(m)){var R=e.xsrfHeaderName&&e.xsrfCookieName&&Bt.read(e.xsrfCookieName);if(R){o.set(e.xsrfHeaderName,R)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){Ge.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!Ge.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(a&&a!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",Vt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",Vt(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new Mt(null,e,h):t);h.abort();h=null};e.cancelToken&&e.cancelToken.subscribe(u);if(e.signal){e.signal.aborted?u():e.signal.addEventListener("abort",u)}}var y=qt(m);if(y&&ht.protocols.indexOf(y)===-1){n(new Ve("Unsupported protocol "+y+":",Ve.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var Jt={http:Je,xhr:Ht};Ge.forEach(Jt,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Kt=function(e){return"- ".concat(e)};var Wt=function(e){return Ge.isFunction(e)||e===null||e===false};var Yt={getAdapter:function(e){e=Ge.isArray(e)?e:[e];var t=e.length;var r;var n;var i={};for(var o=0;o<t;o++){r=e[o];var a=void 0;n=r;if(!Wt(r)){n=Jt[(a=String(r)).toLowerCase()];if(n===undefined){throw new Ve("Unknown adapter '".concat(a,"'"))}}if(n){break}i[a||"#"+o]=n}if(!n){var s=Object.entries(i).map((function(e){var t=e[0],r=e[1];return"adapter ".concat(t," ")+(r===false?"is not supported by the environment":"is not available in the build")}));var u=t?s.length>1?"since :\n"+s.map(Kt).join("\n"):" "+Kt(s[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n},adapters:Jt};function Xt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new Mt(null,e)}}function Zt(e){Xt(e);e.headers=It.from(e.headers);e.data=Pt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=Yt.getAdapter(e.adapter||yt.adapter);return t(e).then((function t(r){Xt(e);r.data=Pt.call(e,e.transformResponse,r);r.headers=It.from(r.headers);return r}),(function t(r){if(!Dt(r)){Xt(e);if(r&&r.response){r.response.data=Pt.call(e,e.transformResponse,r.response);r.response.headers=It.from(r.response.headers)}}return Promise.reject(r)}))}var $t=function(e){return e instanceof It?e.toJSON():e};function Qt(e,t){t=t||{};var r={};function n(e,t,r){if(Ge.isPlainObject(e)&&Ge.isPlainObject(t)){return Ge.merge.call({caseless:r},e,t)}else if(Ge.isPlainObject(t)){return Ge.merge({},t)}else if(Ge.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!Ge.isUndefined(t)){return n(e,t,r)}else if(!Ge.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!Ge.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!Ge.isUndefined(t)){return n(undefined,t)}else if(!Ge.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i($t(e),$t(t),true)}};Ge.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);Ge.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var er="1.6.2";var tr={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){tr[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var rr={};tr.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+er+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Ve(i(n," has been removed"+(r?" in "+r:"")),Ve.ERR_DEPRECATED)}if(r&&!rr[n]){rr[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function nr(e,t,r){if(typeof e!=="object"){throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var a=t[o];if(a){var s=e[o];var u=s===undefined||a(s,o,e);if(u!==true){throw new Ve("option "+o+" must be "+u,Ve.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Ve("Unknown option "+o,Ve.ERR_BAD_OPTION)}}}var ir={assertOptions:nr,validators:tr};var or=ir.validators;var ar=function(){function e(e){this.defaults=e;this.interceptors={request:new it,response:new it}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Qt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){ir.assertOptions(r,{silentJSONParsing:or.transitional(or.boolean),forcedJSONParsing:or.transitional(or.boolean),clarifyTimeoutError:or.transitional(or.boolean)},false)}if(n!=null){if(Ge.isFunction(n)){t.paramsSerializer={serialize:n}}else{ir.assertOptions(n,{encode:or.function,serialize:or.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=i&&Ge.merge(i.common,i[t.method]);i&&Ge.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=It.concat(o,i);var a=[];var s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var c;var f=0;var l;if(!s){var d=[Zt.bind(this),undefined];d.unshift.apply(d,a);d.push.apply(d,u);l=d.length;c=Promise.resolve(t);while(f<l){c=c.then(d[f++],d[f++])}return c}l=a.length;var p=t;f=0;while(f<l){var h=a[f++];var v=a[f++];try{p=h(p)}catch(e){v.call(this,e);break}}try{c=Zt.call(this,p)}catch(e){return Promise.reject(e)}f=0;l=u.length;while(f<l){c=c.then(u[f++],u[f++])}return c};e.prototype.getUri=function(e){e=Qt(this.defaults,e);var t=Ft(e.baseURL,e.url);return nt(t,e.params,e.paramsSerializer)};return e}();Ge.forEach(["delete","get","head","options"],(function e(t){ar.prototype[t]=function(e,r){return this.request(Qt(r||{},{method:t,url:e,data:(r||{}).data}))}}));Ge.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Qt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}ar.prototype[t]=r();ar.prototype[t+"Form"]=r(true)}));var sr=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new Mt(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function ur(e){return function t(r){return e.apply(null,r)}}function cr(e){return Ge.isObject(e)&&e.isAxiosError===true}var fr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fr).forEach((function(e){var t=e[0],r=e[1];fr[r]=t}));function lr(e){var t=new ar(e);var r=k(ar.prototype.request,t);Ge.extend(r,ar.prototype,t,{allOwnKeys:true});Ge.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return lr(Qt(e,r))};return r}var dr=lr(yt);dr.Axios=ar;dr.CanceledError=Mt;dr.CancelToken=sr;dr.isCancel=Dt;dr.VERSION=er;dr.toFormData=$e;dr.AxiosError=Ve;dr.Cancel=dr.CanceledError;dr.all=function e(t){return Promise.all(t)};dr.spread=ur;dr.isAxiosError=cr;dr.mergeConfig=Qt;dr.AxiosHeaders=It;dr.formToJSON=function(e){return _t(Ge.isHTMLForm(e)?new FormData(e):e)};dr.getAdapter=Yt.getAdapter;dr.HttpStatusCode=fr;dr.default=dr;var pr=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var hr=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return pr()}try{if(!__global__)return pr();return __global__}finally{delete Object.prototype.__global__}}();var vr=Symbol.for("verdocs-default-endpoint");var Er=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var mr=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL=window.location.origin==="https://beta.verdocs.com"?"https://stage-api.verdocs.com":"https://api.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||6e4;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=dr.create({baseURL:this.baseURL,timeout:this.timeout});F(this.api,{retries:0,retryDelay:F.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){hr[vr]=this};e.getDefault=function(){if(!hr[vr]){hr[vr]=new e;window.console.debug("[JS_SDK] Created default endpoint",hr[vr].baseURL)}return hr[vr]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.baseURL=e;this.api.defaults.baseURL=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(Er)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var r=t(e);if(r===null||r.exp&&r.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=r;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}())}}}));
@@ -1 +1 @@
1
- System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-d5cb5e29.system.js"],(function(e){"use strict";var s,r,t;return{setters:[function(e){s=e.r;r=e.h},function(){},function(e){t=e.V}],execute:function(){var i='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';var n=e("verdocs_search",function(){function e(e){s(this,e);this.endpoint=t.getDefault()}e.prototype.render=function(){return r("div",{class:"container"},r("verdocs-search-box",{endpoint:this.endpoint}),r("div",{class:"boxes"},r("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),r("verdocs-quick-functions",{endpoint:this.endpoint})))};return e}());n.style=i}}}));
1
+ System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-0cf6b69a.system.js"],(function(e){"use strict";var s,r,t;return{setters:[function(e){s=e.r;r=e.h},function(){},function(e){t=e.V}],execute:function(){var i='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';var n=e("verdocs_search",function(){function e(e){s(this,e);this.endpoint=t.getDefault()}e.prototype.render=function(){return r("div",{class:"container"},r("verdocs-search-box",{endpoint:this.endpoint}),r("div",{class:"boxes"},r("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),r("verdocs-quick-functions",{endpoint:this.endpoint})))};return e}());n.style=i}}}));