@verdocs/web-sdk 1.12.11 → 1.12.12

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 (118) hide show
  1. package/dist/cjs/{VerdocsEndpoint-26bb7607.js → VerdocsEndpoint-3d59c835.js} +4 -2
  2. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  3. package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-preview.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-send.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-template-attachments.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-template-create_2.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-template-document-page.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-template-name.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-template-properties.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-template-roles.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  23. package/dist/components/VerdocsEndpoint.js +4 -2
  24. package/dist/docs.json +1 -1
  25. package/dist/esm/{VerdocsEndpoint-d50a8d28.js → VerdocsEndpoint-6ec36985.js} +4 -2
  26. package/dist/esm/verdocs-auth.entry.js +1 -1
  27. package/dist/esm/verdocs-build.entry.js +1 -1
  28. package/dist/esm/verdocs-button-panel_3.entry.js +1 -1
  29. package/dist/esm/verdocs-contact-picker.entry.js +1 -1
  30. package/dist/esm/verdocs-dropdown_2.entry.js +1 -1
  31. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  32. package/dist/esm/verdocs-preview.entry.js +1 -1
  33. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  34. package/dist/esm/verdocs-search.entry.js +1 -1
  35. package/dist/esm/verdocs-send.entry.js +1 -1
  36. package/dist/esm/verdocs-sign.entry.js +1 -1
  37. package/dist/esm/verdocs-template-attachments.entry.js +1 -1
  38. package/dist/esm/verdocs-template-create_2.entry.js +1 -1
  39. package/dist/esm/verdocs-template-document-page.entry.js +1 -1
  40. package/dist/esm/verdocs-template-name.entry.js +1 -1
  41. package/dist/esm/verdocs-template-properties.entry.js +1 -1
  42. package/dist/esm/verdocs-template-reminders.entry.js +1 -1
  43. package/dist/esm/verdocs-template-role-properties_2.entry.js +1 -1
  44. package/dist/esm/verdocs-template-roles.entry.js +1 -1
  45. package/dist/esm/verdocs-template-visibility.entry.js +1 -1
  46. package/dist/esm/verdocs-view.entry.js +1 -1
  47. package/dist/esm-es5/VerdocsEndpoint-6ec36985.js +1 -0
  48. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  49. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  50. package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
  51. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  52. package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
  53. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  54. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  55. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  56. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  57. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  58. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  59. package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
  60. package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
  61. package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -1
  62. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  63. package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
  64. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  65. package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -1
  66. package/dist/esm-es5/verdocs-template-roles.entry.js +1 -1
  67. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  68. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  69. package/dist/verdocs-web-sdk/{p-25c56686.entry.js → p-03f1894c.entry.js} +1 -1
  70. package/dist/verdocs-web-sdk/{p-ddc65e0e.system.entry.js → p-15fdbcbc.system.entry.js} +1 -1
  71. package/dist/verdocs-web-sdk/{p-55f89a5b.system.entry.js → p-17889700.system.entry.js} +1 -1
  72. package/dist/verdocs-web-sdk/{p-4cc43b69.entry.js → p-2060a40c.entry.js} +1 -1
  73. package/dist/verdocs-web-sdk/{p-7d562f8b.system.entry.js → p-275eb2b1.system.entry.js} +1 -1
  74. package/dist/verdocs-web-sdk/{p-085f45ef.system.entry.js → p-2829c669.system.entry.js} +1 -1
  75. package/dist/verdocs-web-sdk/{p-78626490.system.entry.js → p-2c2de2e7.system.entry.js} +1 -1
  76. package/dist/verdocs-web-sdk/{p-06201c22.system.entry.js → p-3165cfec.system.entry.js} +1 -1
  77. package/dist/verdocs-web-sdk/{p-8a41b08e.system.entry.js → p-3fdd61f2.system.entry.js} +1 -1
  78. package/dist/verdocs-web-sdk/{p-e1fb61bb.entry.js → p-466589ad.entry.js} +1 -1
  79. package/dist/verdocs-web-sdk/{p-ed10d9d9.system.entry.js → p-46986642.system.entry.js} +1 -1
  80. package/dist/verdocs-web-sdk/{p-e8d924d2.entry.js → p-4c1349bf.entry.js} +1 -1
  81. package/dist/verdocs-web-sdk/{p-96d46a1e.entry.js → p-4c50da3f.entry.js} +1 -1
  82. package/dist/verdocs-web-sdk/{p-e1c90a68.entry.js → p-4f8d48c4.entry.js} +1 -1
  83. package/dist/verdocs-web-sdk/{p-717c36c3.entry.js → p-53692637.entry.js} +1 -1
  84. package/dist/verdocs-web-sdk/{p-fc57a027.system.entry.js → p-569c96af.system.entry.js} +1 -1
  85. package/dist/verdocs-web-sdk/{p-c296f86f.entry.js → p-59a504ef.entry.js} +1 -1
  86. package/dist/verdocs-web-sdk/{p-8c062eba.system.entry.js → p-5fec33d8.system.entry.js} +1 -1
  87. package/dist/verdocs-web-sdk/{p-c11a681f.entry.js → p-62866e51.entry.js} +1 -1
  88. package/dist/verdocs-web-sdk/{p-bdfdcb0f.system.entry.js → p-62bd0d06.system.entry.js} +1 -1
  89. package/dist/verdocs-web-sdk/{p-2fc8d18c.entry.js → p-62db0bfe.entry.js} +1 -1
  90. package/dist/verdocs-web-sdk/{p-dc5875be.system.entry.js → p-6c0caf56.system.entry.js} +1 -1
  91. package/dist/verdocs-web-sdk/{p-55610f09.system.entry.js → p-724c0c3d.system.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/{p-1abe43a1.entry.js → p-74a6403f.entry.js} +1 -1
  93. package/dist/verdocs-web-sdk/{p-591432e9.system.entry.js → p-78c681fe.system.entry.js} +1 -1
  94. package/dist/verdocs-web-sdk/{p-1e4e776b.entry.js → p-7d7918bc.entry.js} +1 -1
  95. package/dist/verdocs-web-sdk/p-7e6d7c07.system.js +1 -1
  96. package/dist/verdocs-web-sdk/{p-f3fa8752.entry.js → p-8293540f.entry.js} +1 -1
  97. package/dist/verdocs-web-sdk/{p-b038a967.system.entry.js → p-855dbfcd.system.entry.js} +1 -1
  98. package/dist/verdocs-web-sdk/{p-2c87ef4d.system.entry.js → p-8990cde6.system.entry.js} +1 -1
  99. package/dist/verdocs-web-sdk/{p-dd22797c.system.entry.js → p-8a564dcf.system.entry.js} +1 -1
  100. package/dist/verdocs-web-sdk/p-8e5d9f77.system.js +1 -0
  101. package/dist/verdocs-web-sdk/{p-06e2c01d.entry.js → p-972c85b6.entry.js} +1 -1
  102. package/dist/verdocs-web-sdk/{p-a3413844.system.entry.js → p-97f21cbd.system.entry.js} +1 -1
  103. package/dist/verdocs-web-sdk/{p-95171474.entry.js → p-98497031.entry.js} +1 -1
  104. package/dist/verdocs-web-sdk/{p-27080e8e.entry.js → p-997fc4dd.entry.js} +1 -1
  105. package/dist/verdocs-web-sdk/p-a93b745a.js +1 -0
  106. package/dist/verdocs-web-sdk/{p-b62bf4bb.system.entry.js → p-aac3f2bd.system.entry.js} +1 -1
  107. package/dist/verdocs-web-sdk/{p-e897e87a.system.entry.js → p-aafe8054.system.entry.js} +1 -1
  108. package/dist/verdocs-web-sdk/{p-bfbca3ba.system.entry.js → p-c39ac27d.system.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-062bd1d6.entry.js → p-c7ff8e32.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-e531210e.entry.js → p-dda83545.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-bfbb7ee1.entry.js → p-e76245f0.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-772c6f2a.entry.js → p-e87ad9cc.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-04ddb5a1.entry.js → p-f106b96c.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  115. package/package.json +2 -2
  116. package/dist/esm-es5/VerdocsEndpoint-d50a8d28.js +0 -1
  117. package/dist/verdocs-web-sdk/p-4e49fb12.js +0 -1
  118. package/dist/verdocs-web-sdk/p-4f63fae0.system.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as i,h as t,H as s,F as n}from"./p-7239d28d.js";import{c as o,u as r,d as a,e as l}from"./p-4926fa27.js";import{V as d}from"./p-4e49fb12.js";import{a as c,i as h}from"./p-e662f81b.js";import{f as u}from"./p-7291906c.js";import{s as p,u as v,a as g,r as f,b as x}from"./p-4a36fe61.js";import{g as m,s as b}from"./p-4b3172b1.js";import{S as w}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-8b2040be.js";var y=function(e,i,t,s){return n=void 0,o=void 0,a=function(){return function(e,i){var t,s,n,o,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(t=1,s&&(n=2&a[0]?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,s=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!((n=(n=r.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){r.label=a[1];break}if(6===a[0]&&r.label<n[1]){r.label=n[1],n=a;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(a);break}n[2]&&r.ops.pop(),r.trys.pop();continue}a=i.call(e,r)}catch(e){a=[6,e],s=0}finally{t=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,(function(){return[2,e.api.put("/envelopes/".concat(i,"/recipients/").concat(t),s).then((function(e){return e.data}))]}))},new((r=void 0)||(r=Promise))((function(e,i){function t(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(i){var n;i.done?e(i.value):(n=i.value,n instanceof r?n:new r((function(e){e(n)}))).then(t,s)}l((a=a.apply(n,o||[])).next())}));var n,o,r,a};const k=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}],S=[{id:"print",label:"Print"},{id:"download",label:"Download"}],I=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeLoaded=i(this,"envelopeLoaded",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=null,this.recipientIndex=-1,this.envelopeId=null,this.roleId=null,this.inviteCode=null,this.recipient=null,this.signerToken=null,this.hasSignature=!1,this.nextButtonLabel="Start",this.nextSubmits=!1,this.errorMessage="",this.focusedField="",this.isDone=!1,this.showDone=!1,this.finishLater=!1,this.showFinishLater=!1,this.agreed=!1,this.documentsSingularPlural="document"}componentWillLoad(){this.endpoint=new d({sessionType:"signing"})}async componentDidLoad(){var e,i,t,s,n,r,a;if(this.envelopeId)if(this.roleId)if(this.inviteCode)try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{session:e,recipient:i,signerToken:t}=await o(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode});console.log(`[SIGN] Loaded signing session ${e.email} / ${e.profile_id}`),this.recipient=i,console.log("[SIGN] We are recipient",this.recipient),this.signerToken=t,this.endpoint.setToken(t),this.agreed&&(this.nextButtonLabel="Next"),await m(this.endpoint,this.envelopeId),b.envelope.documents.length>0&&(this.documentsSingularPlural="document(s)"),this.recipientIndex=b.envelope.recipients.findIndex((e=>e.role_name==this.roleId)),this.recipientIndex>-1?(this.recipient=b.envelope.recipients[this.recipientIndex],this.agreed=this.recipient.agreed,console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)):console.log("[SIGN] Could not find our recipient record",this.roleId,b.envelope.recipients),this.isDone=["submitted","canceled","declined"].includes(this.recipient.status),null===(s=this.envelopeLoaded)||void 0===s||s.emit({endpoint:this.endpoint,envelope:b.envelope})}catch(e){console.log("Error with signing session",e),null===(n=this.sdkError)||void 0===n||n.emit(new w(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(a=e.response)||void 0===a?void 0:a.data))}else null===(t=this.sdkError)||void 0===t||t.emit(new w("[SIGN] Missing required inviteCode",500,""));else null===(i=this.sdkError)||void 0===i||i.emit(new w("[SIGN] Missing required roleId",500,""));else null===(e=this.sdkError)||void 0===e||e.emit(new w("[SIGN] Missing required envelopId",500,""))}handleClickAgree(){var e,i,t;(e=this.endpoint,i=this.envelopeId,t=this.roleId,!0,y(e,i,t,{action:"update",agreed:true})).then((()=>{var e;this.nextButtonLabel="Next",this.agreed=!0,null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:b.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("Update failure",e),null===(i=this.sdkError)||void 0===i||i.emit(new w(e.message,null===(t=e.response)||void 0===t?void 0:t.status,null===(s=e.response)||void 0===s?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,n,o,r,a,l;switch(e.detail.id){case"later":this.finishLater=!0,this.showFinishLater=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:b.envelope,event:"later"});break;case"claim":window.alert("This feature will be available in an upcoming release."),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:b.envelope,event:"claimed"});break;case"decline":{const e=await(r=this.endpoint,a=this.envelopeId,l=this.roleId,y(r,a,l,{action:"decline"}));console.log("Decline result",e),null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:b.envelope,event:"declined"}),this.isDone=!0}break;case"print":window.print(),null===(n=this.envelopeUpdated)||void 0===n||n.emit({endpoint:this.endpoint,envelope:b.envelope,event:"printed"});break;case"download":p(this.endpoint,b.envelope,b.envelope.envelope_document_id).catch((e=>{console.log("Error downloading PDF",e)})),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:b.envelope,event:"downloaded"})}}updateRecipientFieldValue(e,i){this.recipient.fields.forEach((t=>{t.name===e&&(t.settings=i.settings,v(t))}))}saveFieldChange(e,i){r(this.endpoint,this.envelopeId,e,i).then((i=>{this.updateRecipientFieldValue(e,i)})).catch((e=>{var i,t,s,n,o,r;401===(null===(i=e.response)||void 0===i?void 0:i.status)&&"jwt expired"===(null===(s=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===s?void 0:s.error)?(console.log("[SIGN] Signing session expired"),this.errorMessage="Signing session expired. Please reload your browser to continue."):console.log("[SIGN] Server error",e),null===(n=this.sdkError)||void 0===n||n.emit(new w(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(r=e.response)||void 0===r?void 0:r.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:!1,value:t});case"checkbox_group":{const t=e.settings.options.map((e=>({id:e.id,checked:i.target.checked})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"radio_button_group":{const t=e.settings.options.map((e=>({id:e.id,selected:i.target.value===e.id})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"dropdown":return this.saveFieldChange(e.name,{prepared:!1,value:i.detail});case"initial":const d=await(await fetch(i.detail)).blob();return(n=this.endpoint,"initial",o=d,r=new FormData,r.append("initial",o,"initial"),n.api.post("/initials",r).then((function(e){return e.data}))).then((async i=>{const t=await l(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"signature":const c=await(await fetch(i.detail)).blob();return function(e,i,t){var s=new FormData;return s.append("signature",t,"signature"),e.api.post("/signatures",s).then((function(e){return e.data}))}(this.endpoint,0,c).then((async i=>{const t=await a(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"date":const h=i.target.getAttribute("iso");return this.saveFieldChange(e.name,{prepared:!1,value:h});case"timestamp":console.log("Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("Unhandled field update",{value:t,checked:s},e)}var n,o,r}isFieldValid(e){var i,t,s,n,o,r,a;const{required:l=!1}=e,{result:d="",value:u="",base64:p=""}=e.settings||{};switch(e.type){case"textbox":switch((null===(i=e.settings)||void 0===i?void 0:i.validator)||""){case"email":return h(d);case"phone":return c(d);default:return!l||""!==d}case"signature":case"initial":return!l||""!==p;case"timestamp":return!0;case"textarea":case"date":case"attachment":return!l||""!==d;case"dropdown":return!l||""!==u;case"checkbox_group":const v=((null===(s=null===(t=e.settings)||void 0===t?void 0:t.options)||void 0===s?void 0:s.filter((e=>e.checked)))||[]).length;return!l||v>=((null===(n=e.settings)||void 0===n?void 0:n.minimum_checked)||0)&&v<=((null===(o=e.settings)||void 0===o?void 0:o.maximum_checked)||999);case"radio_button_group":return!l||((null===(a=null===(r=e.settings)||void 0===r?void 0:r.options)||void 0===a?void 0:a.filter((e=>e.selected)))||[]).length>0;default:return!1}}async handleNext(){var e,i,t,s;if(this.nextSubmits){try{const e=await(i=this.endpoint,t=this.envelopeId,s=this.roleId,y(i,t,s,{action:"submit"}));console.log("[SIGN] Submitted successfully",e),this.showDone=!0,this.isDone=!0}catch(e){console.log("Error submitting",e)}return}const n=this.recipient.fields.filter((e=>e.required));let o=n.findIndex((e=>e.name===this.focusedField))+1;o>=n.length&&(o=0);let r=n[o],a=0;if(a<n.length&&["signature","initial"].includes(r.type)&&"signed"===(null===(e=r.settings)||void 0===e?void 0:e.result)&&(a++,o++,o>=n.length&&(o=0),r=n[o]),a>=n.length&&(r=null),r){const e=x(r),i=document.getElementById(e);null==i||i.focusField(),this.focusedField=r.name}}checkRecipientFields(){const e=this.recipient.fields.filter((e=>!this.isFieldValid(e)));e.length<1?(this.nextButtonLabel="Finish",this.nextSubmits=!0):(console.log("[SIGN] Remaining invalid fields",e),this.nextButtonLabel="Next",this.nextSubmits=!1)}attachFieldAttributes(e,i,t,s){var n;s.addEventListener("input",(()=>this.checkRecipientFields())),s.addEventListener("focusout",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.addEventListener("fieldChange",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.setAttribute("roleindex",t),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("initials",this.recipient?u(this.recipient.full_name):""),s.setAttribute("name",(null===(n=this.recipient)||void 0===n?void 0:n.full_name)||"")}handlePageRendered(e){const i=e.detail,t=g(b.roleNames,this.recipient.role_name),s=this.recipient.fields.filter((e=>e.page===i.pageNumber));console.log("[SIGN] Page rendered, updating fields",{pageInfo:i,roleIndex:t,recipientFields:s}),s.forEach((e=>{const s=f(e,i,t,{disabled:!1,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))})),b.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name)).forEach((e=>{const t=g(b.roleNames,e.role_name);e.fields.filter((e=>e.page===i.pageNumber)).forEach((e=>{const s=f(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&s.setAttribute&&(s.setAttribute("roleindex",t),s.setAttribute("xScale",i.xScale),s.setAttribute("yScale",i.yScale))}))})),this.checkRecipientFields()}render(){return b.loading||!b.envelope?t(s,null,t("verdocs-loader",null)):t(s,{class:{agreed:this.agreed},"data-r":b.updateCount},!this.isDone&&!this.finishLater&&t("div",{class:"intro"},"Please review and act on these documents."),!this.isDone&&t("div",{class:"header"},this.agreed?t(n,null,t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},b.envelope.name),t("div",{style:{flex:"1"}})):t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:()=>this.handleClickAgree()})),!this.isDone&&!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:this.isDone||this.finishLater?S:k,onOptionSelected:e=>this.handleOptionSelected(e)})),t("div",this.isDone||this.agreed?{style:{display:"none"}}:{class:"cover"}),this.isDone?t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return null===(i=this.sdkError)||void 0===i?void 0:i.emit(e.detail)}}):t("div",{class:"document"},(b.envelope.documents||[]).map((e=>{const i=[...(null==e?void 0:e.pages)||[]];return i.sort(((e,i)=>e.sequence-i.sequence)),t(n,null,i.map((i=>t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:i.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=!1}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>this.showDone=!1}))}};I.style='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-sign .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}';export{I as verdocs_sign}
1
+ import{r as e,c as i,h as t,H as s,F as n}from"./p-7239d28d.js";import{c as o,u as r,d as a,e as l}from"./p-4926fa27.js";import{V as d}from"./p-a93b745a.js";import{a as c,i as h}from"./p-e662f81b.js";import{f as u}from"./p-7291906c.js";import{s as p,u as v,a as g,r as f,b as x}from"./p-4a36fe61.js";import{g as m,s as b}from"./p-4b3172b1.js";import{S as w}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-8b2040be.js";var y=function(e,i,t,s){return n=void 0,o=void 0,a=function(){return function(e,i){var t,s,n,o,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(t=1,s&&(n=2&a[0]?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,s=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!((n=(n=r.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){r.label=a[1];break}if(6===a[0]&&r.label<n[1]){r.label=n[1],n=a;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(a);break}n[2]&&r.ops.pop(),r.trys.pop();continue}a=i.call(e,r)}catch(e){a=[6,e],s=0}finally{t=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,(function(){return[2,e.api.put("/envelopes/".concat(i,"/recipients/").concat(t),s).then((function(e){return e.data}))]}))},new((r=void 0)||(r=Promise))((function(e,i){function t(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(i){var n;i.done?e(i.value):(n=i.value,n instanceof r?n:new r((function(e){e(n)}))).then(t,s)}l((a=a.apply(n,o||[])).next())}));var n,o,r,a};const k=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}],S=[{id:"print",label:"Print"},{id:"download",label:"Download"}],I=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeLoaded=i(this,"envelopeLoaded",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=null,this.recipientIndex=-1,this.envelopeId=null,this.roleId=null,this.inviteCode=null,this.recipient=null,this.signerToken=null,this.hasSignature=!1,this.nextButtonLabel="Start",this.nextSubmits=!1,this.errorMessage="",this.focusedField="",this.isDone=!1,this.showDone=!1,this.finishLater=!1,this.showFinishLater=!1,this.agreed=!1,this.documentsSingularPlural="document"}componentWillLoad(){this.endpoint=new d({sessionType:"signing"})}async componentDidLoad(){var e,i,t,s,n,r,a;if(this.envelopeId)if(this.roleId)if(this.inviteCode)try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{session:e,recipient:i,signerToken:t}=await o(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode});console.log(`[SIGN] Loaded signing session ${e.email} / ${e.profile_id}`),this.recipient=i,console.log("[SIGN] We are recipient",this.recipient),this.signerToken=t,this.endpoint.setToken(t),this.agreed&&(this.nextButtonLabel="Next"),await m(this.endpoint,this.envelopeId),b.envelope.documents.length>0&&(this.documentsSingularPlural="document(s)"),this.recipientIndex=b.envelope.recipients.findIndex((e=>e.role_name==this.roleId)),this.recipientIndex>-1?(this.recipient=b.envelope.recipients[this.recipientIndex],this.agreed=this.recipient.agreed,console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)):console.log("[SIGN] Could not find our recipient record",this.roleId,b.envelope.recipients),this.isDone=["submitted","canceled","declined"].includes(this.recipient.status),null===(s=this.envelopeLoaded)||void 0===s||s.emit({endpoint:this.endpoint,envelope:b.envelope})}catch(e){console.log("Error with signing session",e),null===(n=this.sdkError)||void 0===n||n.emit(new w(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(a=e.response)||void 0===a?void 0:a.data))}else null===(t=this.sdkError)||void 0===t||t.emit(new w("[SIGN] Missing required inviteCode",500,""));else null===(i=this.sdkError)||void 0===i||i.emit(new w("[SIGN] Missing required roleId",500,""));else null===(e=this.sdkError)||void 0===e||e.emit(new w("[SIGN] Missing required envelopId",500,""))}handleClickAgree(){var e,i,t;(e=this.endpoint,i=this.envelopeId,t=this.roleId,!0,y(e,i,t,{action:"update",agreed:true})).then((()=>{var e;this.nextButtonLabel="Next",this.agreed=!0,null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:b.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("Update failure",e),null===(i=this.sdkError)||void 0===i||i.emit(new w(e.message,null===(t=e.response)||void 0===t?void 0:t.status,null===(s=e.response)||void 0===s?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,n,o,r,a,l;switch(e.detail.id){case"later":this.finishLater=!0,this.showFinishLater=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:b.envelope,event:"later"});break;case"claim":window.alert("This feature will be available in an upcoming release."),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:b.envelope,event:"claimed"});break;case"decline":{const e=await(r=this.endpoint,a=this.envelopeId,l=this.roleId,y(r,a,l,{action:"decline"}));console.log("Decline result",e),null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:b.envelope,event:"declined"}),this.isDone=!0}break;case"print":window.print(),null===(n=this.envelopeUpdated)||void 0===n||n.emit({endpoint:this.endpoint,envelope:b.envelope,event:"printed"});break;case"download":p(this.endpoint,b.envelope,b.envelope.envelope_document_id).catch((e=>{console.log("Error downloading PDF",e)})),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:b.envelope,event:"downloaded"})}}updateRecipientFieldValue(e,i){this.recipient.fields.forEach((t=>{t.name===e&&(t.settings=i.settings,v(t))}))}saveFieldChange(e,i){r(this.endpoint,this.envelopeId,e,i).then((i=>{this.updateRecipientFieldValue(e,i)})).catch((e=>{var i,t,s,n,o,r;401===(null===(i=e.response)||void 0===i?void 0:i.status)&&"jwt expired"===(null===(s=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===s?void 0:s.error)?(console.log("[SIGN] Signing session expired"),this.errorMessage="Signing session expired. Please reload your browser to continue."):console.log("[SIGN] Server error",e),null===(n=this.sdkError)||void 0===n||n.emit(new w(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(r=e.response)||void 0===r?void 0:r.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:!1,value:t});case"checkbox_group":{const t=e.settings.options.map((e=>({id:e.id,checked:i.target.checked})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"radio_button_group":{const t=e.settings.options.map((e=>({id:e.id,selected:i.target.value===e.id})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"dropdown":return this.saveFieldChange(e.name,{prepared:!1,value:i.detail});case"initial":const d=await(await fetch(i.detail)).blob();return(n=this.endpoint,"initial",o=d,r=new FormData,r.append("initial",o,"initial"),n.api.post("/initials",r).then((function(e){return e.data}))).then((async i=>{const t=await l(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"signature":const c=await(await fetch(i.detail)).blob();return function(e,i,t){var s=new FormData;return s.append("signature",t,"signature"),e.api.post("/signatures",s).then((function(e){return e.data}))}(this.endpoint,0,c).then((async i=>{const t=await a(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"date":const h=i.target.getAttribute("iso");return this.saveFieldChange(e.name,{prepared:!1,value:h});case"timestamp":console.log("Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("Unhandled field update",{value:t,checked:s},e)}var n,o,r}isFieldValid(e){var i,t,s,n,o,r,a;const{required:l=!1}=e,{result:d="",value:u="",base64:p=""}=e.settings||{};switch(e.type){case"textbox":switch((null===(i=e.settings)||void 0===i?void 0:i.validator)||""){case"email":return h(d);case"phone":return c(d);default:return!l||""!==d}case"signature":case"initial":return!l||""!==p;case"timestamp":return!0;case"textarea":case"date":case"attachment":return!l||""!==d;case"dropdown":return!l||""!==u;case"checkbox_group":const v=((null===(s=null===(t=e.settings)||void 0===t?void 0:t.options)||void 0===s?void 0:s.filter((e=>e.checked)))||[]).length;return!l||v>=((null===(n=e.settings)||void 0===n?void 0:n.minimum_checked)||0)&&v<=((null===(o=e.settings)||void 0===o?void 0:o.maximum_checked)||999);case"radio_button_group":return!l||((null===(a=null===(r=e.settings)||void 0===r?void 0:r.options)||void 0===a?void 0:a.filter((e=>e.selected)))||[]).length>0;default:return!1}}async handleNext(){var e,i,t,s;if(this.nextSubmits){try{const e=await(i=this.endpoint,t=this.envelopeId,s=this.roleId,y(i,t,s,{action:"submit"}));console.log("[SIGN] Submitted successfully",e),this.showDone=!0,this.isDone=!0}catch(e){console.log("Error submitting",e)}return}const n=this.recipient.fields.filter((e=>e.required));let o=n.findIndex((e=>e.name===this.focusedField))+1;o>=n.length&&(o=0);let r=n[o],a=0;if(a<n.length&&["signature","initial"].includes(r.type)&&"signed"===(null===(e=r.settings)||void 0===e?void 0:e.result)&&(a++,o++,o>=n.length&&(o=0),r=n[o]),a>=n.length&&(r=null),r){const e=x(r),i=document.getElementById(e);null==i||i.focusField(),this.focusedField=r.name}}checkRecipientFields(){const e=this.recipient.fields.filter((e=>!this.isFieldValid(e)));e.length<1?(this.nextButtonLabel="Finish",this.nextSubmits=!0):(console.log("[SIGN] Remaining invalid fields",e),this.nextButtonLabel="Next",this.nextSubmits=!1)}attachFieldAttributes(e,i,t,s){var n;s.addEventListener("input",(()=>this.checkRecipientFields())),s.addEventListener("focusout",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.addEventListener("fieldChange",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.setAttribute("roleindex",t),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("initials",this.recipient?u(this.recipient.full_name):""),s.setAttribute("name",(null===(n=this.recipient)||void 0===n?void 0:n.full_name)||"")}handlePageRendered(e){const i=e.detail,t=g(b.roleNames,this.recipient.role_name),s=this.recipient.fields.filter((e=>e.page===i.pageNumber));console.log("[SIGN] Page rendered, updating fields",{pageInfo:i,roleIndex:t,recipientFields:s}),s.forEach((e=>{const s=f(e,i,t,{disabled:!1,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))})),b.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name)).forEach((e=>{const t=g(b.roleNames,e.role_name);e.fields.filter((e=>e.page===i.pageNumber)).forEach((e=>{const s=f(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&s.setAttribute&&(s.setAttribute("roleindex",t),s.setAttribute("xScale",i.xScale),s.setAttribute("yScale",i.yScale))}))})),this.checkRecipientFields()}render(){return b.loading||!b.envelope?t(s,null,t("verdocs-loader",null)):t(s,{class:{agreed:this.agreed},"data-r":b.updateCount},!this.isDone&&!this.finishLater&&t("div",{class:"intro"},"Please review and act on these documents."),!this.isDone&&t("div",{class:"header"},this.agreed?t(n,null,t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},b.envelope.name),t("div",{style:{flex:"1"}})):t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:()=>this.handleClickAgree()})),!this.isDone&&!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:this.isDone||this.finishLater?S:k,onOptionSelected:e=>this.handleOptionSelected(e)})),t("div",this.isDone||this.agreed?{style:{display:"none"}}:{class:"cover"}),this.isDone?t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return null===(i=this.sdkError)||void 0===i?void 0:i.emit(e.detail)}}):t("div",{class:"document"},(b.envelope.documents||[]).map((e=>{const i=[...(null==e?void 0:e.pages)||[]];return i.sort(((e,i)=>e.sequence-i.sequence)),t(n,null,i.map((i=>t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:i.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=!1}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>this.showDone=!1}))}};I.style='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-sign .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}';export{I as verdocs_sign}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-7239d28d.js";(()=>{const t=import.meta.url,d={};return""!==t&&(d.resourcesUrl=new URL(".",t).href),e(d)})().then((e=>t([["p-772c6f2a",[[0,"verdocs-template-roles",{endpoint:[16],templateId:[1,"template-id"],showingRoleDialog:[32],showingSenderDialog:[32],sender:[32],forceRerender:[32]}]]],["p-cebebb9e",[[0,"verdocs-field-initial",{field:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],tempInitials:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-096d1436",[[0,"verdocs-field-signature",{field:[16],name:[1],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],tempSignature:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-f239387c",[[0,"verdocs-field-checkbox",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],rerender:[2],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-329ba73d",[[0,"verdocs-field-date",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],containerId:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-92fedce7",[[0,"verdocs-field-dropdown",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-de5fec97",[[0,"verdocs-field-radio-button",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],rerender:[2],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-c9f8ff41",[[0,"verdocs-field-textarea",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-4e874241",[[0,"verdocs-field-textbox",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-f2c98257",[[0,"verdocs-field-timestamp",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-af1eb1d8",[[0,"verdocs-loader"]]],["p-95171474",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-04ddb5a1",[[0,"verdocs-sign",{envelopeId:[1,"envelope-id"],roleId:[1,"role-id"],inviteCode:[1,"invite-code"],recipient:[32],signerToken:[32],hasSignature:[32],nextButtonLabel:[32],nextSubmits:[32],errorMessage:[32],focusedField:[32],isDone:[32],showDone:[32],finishLater:[32],showFinishLater:[32],agreed:[32],documentsSingularPlural:[32]}]]],["p-062bd1d6",[[0,"verdocs-template-properties",{endpoint:[16],templateId:[1,"template-id"],template:[32],name:[32],visibility:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32]}]]],["p-e8d924d2",[[0,"verdocs-template-reminders",{endpoint:[16],templateId:[1,"template-id"],showPlanBlocker:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32],dirty:[32],loading:[32]}]]],["p-96d46a1e",[[0,"verdocs-template-name",{endpoint:[16],templateId:[1,"template-id"],name:[32],dirty:[32],loading:[32]}]]],["p-c11a681f",[[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],isAuthenticated:[32],displayMode:[32],username:[32],password:[32],loggingIn:[32],activeSession:[32],loginError:[32]}]]],["p-e1fb61bb",[[0,"verdocs-search",{endpoint:[16]}]]],["p-e531210e",[[0,"verdocs-send",{endpoint:[16],templateId:[1,"template-id"],containerId:[32],rolesAtLevel:[32],showPickerForId:[32],sessionContacts:[32],rolesCompleted:[32],reset:[64]}]]],["p-1e4e776b",[[0,"verdocs-template-visibility",{endpoint:[16],templateId:[1,"template-id"],dirty:[32],loading:[32],personal:[32],public:[32]}]]],["p-f3fa8752",[[0,"verdocs-view",{endpoint:[16],envelopeId:[1,"envelope-id"]}]]],["p-79b5b76f",[[0,"verdocs-upload-dialog",{draggingOver:[32],decodedFiles:[32]}]]],["p-e15a4cc6",[[0,"verdocs-field-attachment",{field:[16],disabled:[4],roleIndex:[2,"role-index"],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-27080e8e",[[0,"verdocs-template-document-page",{endpoint:[16],templateId:[1,"template-id"],documentId:[1,"document-id"],pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[1026,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32],pageDisplayUri:[32]}]]],["p-2fc8d18c",[[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"]}]]],["p-717c36c3",[[0,"verdocs-template-attachments",{endpoint:[16],templateId:[1,"template-id"],loading:[32]}]]],["p-1abe43a1",[[0,"verdocs-envelope-sidebar",{endpoint:[16],envelopeId:[1,"envelope-id"],activeTab:[32],panelOpen:[32]}]]],["p-0031154e",[[0,"verdocs-floating-menu",{options:[16]}]]],["p-04ca7746",[[0,"verdocs-kba-dialog",{step:[2],steps:[2],helptitle:[1],helptext:[1],mode:[1],label:[1],placeholder:[1],choices:[16],response:[32]}]]],["p-f19969ec",[[0,"verdocs-field-payment",{field:[16],disabled:[4],fields:[16],pageNum:[2,"page-num"],roleName:[1,"role-name"],fieldId:[1,"field-id"],recipients:[8],selectedRoleName:[1,"selected-role-name"],pdfPages:[16],currentSignature:[1,"current-signature"],currentSignatureId:[1,"current-signature-id"],currentInitial:[1,"current-initial"],currentInitialId:[1,"current-initial-id"],focused:[4],signed:[4],rerender:[2],roleindex:[2],preparedMessage:[32],signatureUrl:[32],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-f93d3324",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-9f532d65",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-ab2ab46e",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],envelope:[16],isOpen:[32],recipientStatusIcons:[32],containerId:[32]}]]],["p-140e1871",[[0,"verdocs-template-card",{template:[16]}]]],["p-7cb46b17",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-d9aab909",[[0,"verdocs-toggle",{options:[16],theme:[1],selectedOption:[32]}]]],["p-d8696ee6",[[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-09c48cd5",[[0,"verdocs-checkbox",{checked:[4],name:[1],label:[1],value:[1],theme:[1],disabled:[4]}],[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],helpText:[1,"help-text"],type:[1],disabled:[4]}],[0,"verdocs-component-error",{message:[1]}],[0,"verdocs-help-icon",{text:[1],containerId:[32]}]]],["p-d0fc924d",[[0,"verdocs-initial-dialog",{initials:[1],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-f75b2973",[[0,"verdocs-signature-dialog",{name:[1],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-facf681e",[[0,"verdocs-toggle-button",{active:[4],icon:[1],label:[1],size:[1],_active:[32]}]]],["p-25c56686",[[0,"verdocs-contact-picker",{endpoint:[16],templateRole:[16],contactSuggestions:[16],name:[32],email:[32],phone:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32],nameFieldId:[32],emailFieldId:[32],phoneFieldId:[32]}]]],["p-0ccb837b",[[0,"verdocs-radio-button",{checked:[4],name:[1],value:[1],disabled:[4]}]]],["p-4cc43b69",[[0,"verdocs-template-role-properties",{endpoint:[16],templateId:[1,"template-id"],roleName:[1,"role-name"],sender:[1],dirty:[32],saving:[32],name:[32],type:[32],fullName:[32],email:[32],phone:[32],allowDelegation:[32]}],[0,"verdocs-template-sender",{endpoint:[16],templateId:[1,"template-id"],sender:[1],saving:[32]}]]],["p-bfbb7ee1",[[0,"verdocs-template-fields",{endpoint:[16],templateId:[1,"template-id"],toolbarTargetId:[1,"toolbar-target-id"],placing:[32],selectedRoleName:[32],rerender:[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-create",{endpoint:[16],file:[32],creating:[32]}]]],["p-607b66bb",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],showCancel:[4,"show-cancel"]}]]],["p-c296f86f",[[0,"verdocs-quick-functions",{endpoint:[16]}],[0,"verdocs-search-activity",{endpoint:[16],type:[1],options:[8],emptyMessage:[32],authFailure:[32],title:[32],recent:[32],saved:[32],starred:[32]}],[0,"verdocs-search-box",{endpoint:[16],placeholder:[1],type:[1],query:[1],grabsFocus:[4,"grabs-focus"],focusField:[64]}]]],["p-e5c28d78",[[0,"verdocs-toolbar-icon",{text:[1],icon:[1],placement:[1],containerId:[32]}]]],["p-e1c90a68",[[0,"verdocs-envelope-document-page",{endpoint:[16],envelopeId:[1,"envelope-id"],documentId:[1,"document-id"],pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[1026,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32],pageDisplayUri:[32]}],[0,"verdocs-dropdown",{options:[16],open:[32]}]]],["p-06e2c01d",[[0,"verdocs-template-field-properties",{endpoint:[16],templateId:[1,"template-id"],fieldName:[1,"field-name"],dirty:[32],loading:[32],type:[32],setting:[32],name:[32],roleName:[32],required:[32],options:[32],placeholder:[32],defaultValue:[32]}],[4,"verdocs-button-panel",{icon:[1],showPanel:[64],hidePanel:[64],toggle:[64]}],[0,"verdocs-select-input",{value:[1],label:[1],options:[16],disabled:[4]}]]]],e)));
1
+ import{p as e,b as d}from"./p-7239d28d.js";(()=>{const d=import.meta.url,t={};return""!==d&&(t.resourcesUrl=new URL(".",d).href),e(t)})().then((e=>d([["p-e87ad9cc",[[0,"verdocs-template-roles",{endpoint:[16],templateId:[1,"template-id"],showingRoleDialog:[32],showingSenderDialog:[32],sender:[32],forceRerender:[32]}]]],["p-cebebb9e",[[0,"verdocs-field-initial",{field:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],tempInitials:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-096d1436",[[0,"verdocs-field-signature",{field:[16],name:[1],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],tempSignature:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-f239387c",[[0,"verdocs-field-checkbox",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],rerender:[2],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-329ba73d",[[0,"verdocs-field-date",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],containerId:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-92fedce7",[[0,"verdocs-field-dropdown",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-de5fec97",[[0,"verdocs-field-radio-button",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],rerender:[2],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-c9f8ff41",[[0,"verdocs-field-textarea",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-4e874241",[[0,"verdocs-field-textbox",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-f2c98257",[[0,"verdocs-field-timestamp",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-af1eb1d8",[[0,"verdocs-loader"]]],["p-98497031",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-f106b96c",[[0,"verdocs-sign",{envelopeId:[1,"envelope-id"],roleId:[1,"role-id"],inviteCode:[1,"invite-code"],recipient:[32],signerToken:[32],hasSignature:[32],nextButtonLabel:[32],nextSubmits:[32],errorMessage:[32],focusedField:[32],isDone:[32],showDone:[32],finishLater:[32],showFinishLater:[32],agreed:[32],documentsSingularPlural:[32]}]]],["p-c7ff8e32",[[0,"verdocs-template-properties",{endpoint:[16],templateId:[1,"template-id"],template:[32],name:[32],visibility:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32]}]]],["p-4c1349bf",[[0,"verdocs-template-reminders",{endpoint:[16],templateId:[1,"template-id"],showPlanBlocker:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32],dirty:[32],loading:[32]}]]],["p-4c50da3f",[[0,"verdocs-template-name",{endpoint:[16],templateId:[1,"template-id"],name:[32],dirty:[32],loading:[32]}]]],["p-62866e51",[[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],isAuthenticated:[32],displayMode:[32],username:[32],password:[32],loggingIn:[32],activeSession:[32],loginError:[32]}]]],["p-466589ad",[[0,"verdocs-search",{endpoint:[16]}]]],["p-dda83545",[[0,"verdocs-send",{endpoint:[16],templateId:[1,"template-id"],containerId:[32],rolesAtLevel:[32],showPickerForId:[32],sessionContacts:[32],rolesCompleted:[32],reset:[64]}]]],["p-7d7918bc",[[0,"verdocs-template-visibility",{endpoint:[16],templateId:[1,"template-id"],dirty:[32],loading:[32],personal:[32],public:[32]}]]],["p-8293540f",[[0,"verdocs-view",{endpoint:[16],envelopeId:[1,"envelope-id"]}]]],["p-79b5b76f",[[0,"verdocs-upload-dialog",{draggingOver:[32],decodedFiles:[32]}]]],["p-e15a4cc6",[[0,"verdocs-field-attachment",{field:[16],disabled:[4],roleIndex:[2,"role-index"],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-997fc4dd",[[0,"verdocs-template-document-page",{endpoint:[16],templateId:[1,"template-id"],documentId:[1,"document-id"],pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[1026,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32],pageDisplayUri:[32]}]]],["p-62db0bfe",[[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"]}]]],["p-53692637",[[0,"verdocs-template-attachments",{endpoint:[16],templateId:[1,"template-id"],loading:[32]}]]],["p-74a6403f",[[0,"verdocs-envelope-sidebar",{endpoint:[16],envelopeId:[1,"envelope-id"],activeTab:[32],panelOpen:[32]}]]],["p-0031154e",[[0,"verdocs-floating-menu",{options:[16]}]]],["p-04ca7746",[[0,"verdocs-kba-dialog",{step:[2],steps:[2],helptitle:[1],helptext:[1],mode:[1],label:[1],placeholder:[1],choices:[16],response:[32]}]]],["p-f19969ec",[[0,"verdocs-field-payment",{field:[16],disabled:[4],fields:[16],pageNum:[2,"page-num"],roleName:[1,"role-name"],fieldId:[1,"field-id"],recipients:[8],selectedRoleName:[1,"selected-role-name"],pdfPages:[16],currentSignature:[1,"current-signature"],currentSignatureId:[1,"current-signature-id"],currentInitial:[1,"current-initial"],currentInitialId:[1,"current-initial-id"],focused:[4],signed:[4],rerender:[2],roleindex:[2],preparedMessage:[32],signatureUrl:[32],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-f93d3324",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-9f532d65",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-ab2ab46e",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],envelope:[16],isOpen:[32],recipientStatusIcons:[32],containerId:[32]}]]],["p-140e1871",[[0,"verdocs-template-card",{template:[16]}]]],["p-7cb46b17",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-d9aab909",[[0,"verdocs-toggle",{options:[16],theme:[1],selectedOption:[32]}]]],["p-d8696ee6",[[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-09c48cd5",[[0,"verdocs-checkbox",{checked:[4],name:[1],label:[1],value:[1],theme:[1],disabled:[4]}],[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],helpText:[1,"help-text"],type:[1],disabled:[4]}],[0,"verdocs-component-error",{message:[1]}],[0,"verdocs-help-icon",{text:[1],containerId:[32]}]]],["p-d0fc924d",[[0,"verdocs-initial-dialog",{initials:[1],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-f75b2973",[[0,"verdocs-signature-dialog",{name:[1],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-facf681e",[[0,"verdocs-toggle-button",{active:[4],icon:[1],label:[1],size:[1],_active:[32]}]]],["p-03f1894c",[[0,"verdocs-contact-picker",{endpoint:[16],templateRole:[16],contactSuggestions:[16],name:[32],email:[32],phone:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32],nameFieldId:[32],emailFieldId:[32],phoneFieldId:[32]}]]],["p-0ccb837b",[[0,"verdocs-radio-button",{checked:[4],name:[1],value:[1],disabled:[4]}]]],["p-2060a40c",[[0,"verdocs-template-role-properties",{endpoint:[16],templateId:[1,"template-id"],roleName:[1,"role-name"],sender:[1],dirty:[32],saving:[32],name:[32],type:[32],fullName:[32],email:[32],phone:[32],allowDelegation:[32]}],[0,"verdocs-template-sender",{endpoint:[16],templateId:[1,"template-id"],sender:[1],saving:[32]}]]],["p-e76245f0",[[0,"verdocs-template-fields",{endpoint:[16],templateId:[1,"template-id"],toolbarTargetId:[1,"toolbar-target-id"],placing:[32],selectedRoleName:[32],rerender:[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-create",{endpoint:[16],file:[32],creating:[32]}]]],["p-607b66bb",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],showCancel:[4,"show-cancel"]}]]],["p-59a504ef",[[0,"verdocs-quick-functions",{endpoint:[16]}],[0,"verdocs-search-activity",{endpoint:[16],type:[1],options:[8],emptyMessage:[32],authFailure:[32],title:[32],recent:[32],saved:[32],starred:[32]}],[0,"verdocs-search-box",{endpoint:[16],placeholder:[1],type:[1],query:[1],grabsFocus:[4,"grabs-focus"],focusField:[64]}]]],["p-e5c28d78",[[0,"verdocs-toolbar-icon",{text:[1],icon:[1],placement:[1],containerId:[32]}]]],["p-4f8d48c4",[[0,"verdocs-envelope-document-page",{endpoint:[16],envelopeId:[1,"envelope-id"],documentId:[1,"document-id"],pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[1026,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32],pageDisplayUri:[32]}],[0,"verdocs-dropdown",{options:[16],open:[32]}]]],["p-972c85b6",[[0,"verdocs-template-field-properties",{endpoint:[16],templateId:[1,"template-id"],fieldName:[1,"field-name"],dirty:[32],loading:[32],type:[32],setting:[32],name:[32],roleName:[32],required:[32],options:[32],placeholder:[32],defaultValue:[32]}],[4,"verdocs-button-panel",{icon:[1],showPanel:[64],hidePanel:[64],toggle:[64]}],[0,"verdocs-select-input",{value:[1],label:[1],options:[16],disabled:[4]}]]]],e)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/web-sdk",
3
- "version": "1.12.11",
3
+ "version": "1.12.12",
4
4
  "private": false,
5
5
  "description": "Verdocs Web SDK",
6
6
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  "@stencil/core": "2.20.0",
33
33
  "@stencil/store": "^2.0.3",
34
34
  "@svgdotjs/svg.js": "^3.1.2",
35
- "@verdocs/js-sdk": "^3.1.0",
35
+ "@verdocs/js-sdk": "^3.1.2",
36
36
  "date-fns": "^2.29.3",
37
37
  "flatpickr": "^4.6.13",
38
38
  "interactjs": "^1.10.17",
@@ -1 +0,0 @@
1
- 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))};import{d as decodeAccessTokenBody}from"./Token-54690789.js";var TemplatePermissions;(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"})(TemplatePermissions||(TemplatePermissions={}));var TemplateSenderTypes;(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"})(TemplateSenderTypes||(TemplateSenderTypes={}));var TemplateActions;(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"})(TemplateActions||(TemplateActions={}));var SortOptions;(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"})(SortOptions||(SortOptions={}));function bind(e,t){return function r(){return e.apply(t,arguments)}}var toString=Object.prototype.toString;var getPrototypeOf=Object.getPrototypeOf;var kindOf=function(e){return function(t){var r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var kindOfTest=function(e){e=e.toLowerCase();return function(t){return kindOf(t)===e}};var typeOfTest=function(e){return function(t){return typeof t===e}};var isArray=Array.isArray;var isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&isArrayBuffer(e.buffer)}return t}var isString=typeOfTest("string");var isFunction=typeOfTest("function");var isNumber=typeOfTest("number");var isObject=function(e){return e!==null&&typeof e==="object"};var isBoolean=function(e){return e===true||e===false};var isPlainObject=function(e){if(kindOf(e)!=="object"){return false}var t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var isDate=kindOfTest("Date");var isFile=kindOfTest("File");var isBlob=kindOfTest("Blob");var isFileList=kindOfTest("FileList");var isStream=function(e){return isObject(e)&&isFunction(e.pipe)};var isFormData=function(e){var t="[object FormData]";return e&&(typeof FormData==="function"&&e instanceof FormData||toString.call(e)===t||isFunction(e.toString)&&e.toString()===t)};var isURLSearchParams=kindOfTest("URLSearchParams");var trim=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function forEach(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 s;var a;if(typeof e!=="object"){e=[e]}if(isArray(e)){for(s=0,a=e.length;s<a;s++){t.call(null,e[s],s,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var l=u.length;var c=void 0;for(s=0;s<l;s++){c=u[s];t.call(null,e[c],c,e)}}}function findKey(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 _global=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var isContextDefined=function(e){return!isUndefined(e)&&e!==_global};function merge(){var e=(isContextDefined(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&findKey(t,n)||n;if(isPlainObject(t[i])&&isPlainObject(r)){t[i]=merge(t[i],r)}else if(isPlainObject(r)){t[i]=merge({},r)}else if(isArray(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&forEach(arguments[n],r)}return t}var extend=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;forEach(t,(function(t,n){if(r&&isFunction(t)){e[n]=bind(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var stripBOM=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var inherits=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 toFlatObject=function(e,t,r,n){var i;var o;var s;var a={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){s=i[o];if((!n||n(s,e,t))&&!a[s]){t[s]=e[s];a[s]=true}}e=r!==false&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var endsWith=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 toArray=function(e){if(!e)return null;if(isArray(e))return e;var t=e.length;if(!isNumber(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var isTypedArray=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&getPrototypeOf(Uint8Array));var forEachEntry=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 matchAll=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var isHTMLForm=kindOfTest("HTMLFormElement");var toCamelCase=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var hasOwnProperty=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var isRegExp=kindOfTest("RegExp");var reduceDescriptors=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};forEach(r,(function(r,i){if(t(r,i,e)!==false){n[i]=r}}));Object.defineProperties(e,n)};var freezeMethods=function(e){reduceDescriptors(e,(function(t,r){if(isFunction(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!isFunction(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 toObjectSet=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};isArray(e)?n(e):n(String(e).split(t));return r};var noop=function(){};var toFiniteNumber=function(e,t){e=+e;return Number.isFinite(e)?e:t};var ALPHA="abcdefghijklmnopqrstuvwxyz";var DIGIT="0123456789";var ALPHABET={DIGIT:DIGIT,ALPHA:ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT};var generateString=function(e,t){if(e===void 0){e=16}if(t===void 0){t=ALPHABET.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var toJSONObject=function(e){var t=new Array(10);var r=function(e,n){if(isObject(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=isArray(e)?[]:{};forEach(e,(function(e,t){var o=r(e,n+1);!isUndefined(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var utils={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,ALPHABET:ALPHABET,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject};function AxiosError(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)}utils.inherits(AxiosError,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:utils.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var prototype$1=AxiosError.prototype;var descriptors={};["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){descriptors[e]={value:e}}));Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:true});AxiosError.from=function(e,t,r,n,i,o){var s=Object.create(prototype$1);utils.toFlatObject(e,s,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));AxiosError.call(s,e.message,t,r,n,i);s.cause=e;s.name=e.name;o&&Object.assign(s,o);return s};var httpAdapter=null;function isVisitable(e){return utils.isPlainObject(e)||utils.isArray(e)}function removeBrackets(e){return utils.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=removeBrackets(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function isFlatArray(e){return utils.isArray(e)&&!e.some(isVisitable)}var predicates=utils.toFlatObject(utils,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function toFormData(e,t,r){if(!utils.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=utils.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!utils.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||c;var o=r.dots;var s=r.indexes;var a=r.Blob||typeof Blob!=="undefined"&&Blob;var u=a&&utils.isSpecCompliantForm(t);if(!utils.isFunction(i)){throw new TypeError("visitor must be a function")}function l(e){if(e===null)return"";if(utils.isDate(e)){return e.toISOString()}if(!u&&utils.isBlob(e)){throw new AxiosError("Blob is not supported. Use a Buffer instead.")}if(utils.isArrayBuffer(e)||utils.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function c(e,r,i){var a=e;if(e&&!i&&typeof e==="object"){if(utils.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(utils.isArray(e)&&isFlatArray(e)||(utils.isFileList(e)||utils.endsWith(r,"[]"))&&(a=utils.toArray(e))){r=removeBrackets(r);a.forEach((function e(n,i){!(utils.isUndefined(n)||n===null)&&t.append(s===true?renderKey([r],i,o):s===null?r:r+"[]",l(n))}));return false}}if(isVisitable(e)){return true}t.append(renderKey(i,r,o),l(e));return false}var f=[];var d=Object.assign(predicates,{defaultVisitor:c,convertValue:l,isVisitable:isVisitable});function p(e,r){if(utils.isUndefined(e))return;if(f.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}f.push(e);utils.forEach(e,(function e(n,o){var s=!(utils.isUndefined(n)||n===null)&&i.call(t,n,utils.isString(o)?o.trim():o,r,d);if(s===true){p(n,r?r.concat(o):[o])}}));f.pop()}if(!utils.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}function encode$1(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 AxiosURLSearchParams(e,t){this._pairs=[];e&&toFormData(e,this,t)}var prototype=AxiosURLSearchParams.prototype;prototype.append=function e(t,r){this._pairs.push([t,r])};prototype.toString=function e(t){var r=t?function(e){return t.call(this,e,encode$1)}:encode$1;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t){return e}var n=r&&r.encode||encode;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=utils.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n)}if(o){var s=e.indexOf("#");if(s!==-1){e=e.slice(0,s)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var InterceptorManager=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){utils.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var transitionalDefaults={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var URLSearchParams$1=typeof URLSearchParams!=="undefined"?URLSearchParams:AxiosURLSearchParams;var FormData$1=typeof FormData!=="undefined"?FormData:null;var isStandardBrowserEnv=function(){var e;if(typeof navigator!=="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}();var isStandardBrowserWebWorkerEnv=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var platform={isBrowser:true,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob},isStandardBrowserEnv:isStandardBrowserEnv,isStandardBrowserWebWorkerEnv:isStandardBrowserWebWorkerEnv,protocols:["http","https","file","blob","url","data"]};function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function arrayToObject(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 formDataToJSON(e){function t(e,r,n,i){var o=e[i++];var s=Number.isFinite(+o);var a=i>=e.length;o=!o&&utils.isArray(n)?n.length:o;if(a){if(utils.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!s}if(!n[o]||!utils.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&utils.isArray(n[o])){n[o]=arrayToObject(n[o])}return!s}if(utils.isFormData(e)&&utils.isFunction(e.entries)){var r={};utils.forEachEntry(e,(function(e,n){t(parsePropPath(e),n,r,0)}));return r}return null}var DEFAULT_CONTENT_TYPE={"Content-Type":undefined};function stringifySafely(e,t,r){if(utils.isString(e)){try{(t||JSON.parse)(e);return utils.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=utils.isObject(t);if(o&&utils.isHTMLForm(t)){t=new FormData(t)}var s=utils.isFormData(t);if(s){if(!i){return t}return i?JSON.stringify(formDataToJSON(t)):t}if(utils.isArrayBuffer(t)||utils.isBuffer(t)||utils.isStream(t)||utils.isFile(t)||utils.isBlob(t)){return t}if(utils.isArrayBufferView(t)){return t.buffer}if(utils.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return toURLEncodedForm(t,this.formSerializer).toString()}if((a=utils.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return toFormData(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return stringifySafely(t)}return t}],transformResponse:[function e(t){var r=this.transitional||defaults.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&utils.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var s=!o&&i;try{return JSON.parse(t)}catch(e){if(s){if(e.name==="SyntaxError"){throw AxiosError.from(e,AxiosError.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:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils.forEach(["delete","get","head"],(function e(t){defaults.headers[t]={}}));utils.forEach(["post","put","patch"],(function e(t){defaults.headers[t]=utils.merge(DEFAULT_CONTENT_TYPE)}));var ignoreDuplicateOf=utils.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 parseHeaders=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]&&ignoreDuplicateOf[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 $internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){if(e===false||e==null){return e}return utils.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(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}function isValidHeaderName(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function matchHeaderValue(e,t,r,n,i){if(utils.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!utils.isString(t))return;if(utils.isString(n)){return t.indexOf(n)!==-1}if(utils.isRegExp(n)){return n.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function buildAccessors(e,t){var r=utils.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 AxiosHeaders=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=normalizeHeader(t);if(!i){throw new Error("header name must be a non-empty string")}var o=utils.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=normalizeValue(e)}}var o=function(e,t){return utils.forEach(e,(function(e,r){return i(e,r,t)}))};if(utils.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(utils.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)){o(parseHeaders(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=normalizeHeader(e);if(e){var r=utils.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return parseTokens(n)}if(utils.isFunction(t)){return t.call(this,n,r)}if(utils.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=normalizeHeader(e);if(e){var r=utils.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||matchHeaderValue(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=normalizeHeader(e);if(e){var i=utils.findKey(r,e);if(i&&(!t||matchHeaderValue(r,r[i],i,t))){delete r[i];n=true}}}if(utils.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||matchHeaderValue(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};utils.forEach(this,(function(n,i){var o=utils.findKey(r,i);if(o){t[o]=normalizeValue(n);delete t[i];return}var s=e?formatHeader(i):String(i).trim();if(s!==i){delete t[i]}t[s]=normalizeValue(n);r[s]=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);utils.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&utils.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[$internals]=this[$internals]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=normalizeHeader(e);if(!r[t]){buildAccessors(n,e);r[t]=true}}utils.isArray(e)?e.forEach(i):i(e);return this};return e}();AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils.freezeMethods(AxiosHeaders.prototype);utils.freezeMethods(AxiosHeaders);function transformData(e,t){var r=this||defaults;var n=t||r;var i=AxiosHeaders.from(n.headers);var o=n.data;utils.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,e==null?"canceled":e,AxiosError.ERR_CANCELED,t,r);this.name="CanceledError"}utils.inherits(CanceledError,AxiosError,{__CANCEL__:true});function settle(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var cookies=platform.isStandardBrowserEnv?function e(){return{write:function e(t,r,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(r));if(utils.isNumber(n)){a.push("expires="+new Date(n).toGMTString())}if(utils.isString(i)){a.push("path="+i)}if(utils.isString(o)){a.push("domain="+o)}if(s===true){a.push("secure")}document.cookie=a.join("; ")},read:function e(t){var r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function e(t){this.write(t,"",Date.now()-864e5)}}}():function e(){return{write:function e(){},read:function e(){return null},remove:function e(){}}}();function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){if(e&&!isAbsoluteURL(t)){return combineURLs(e,t)}return t}var isURLSameOrigin=platform.isStandardBrowserEnv?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=utils.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function parseProtocol(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var s;t=t!==undefined?t:1e3;return function a(u){var l=Date.now();var c=n[o];if(!s){s=l}r[i]=u;n[i]=l;var f=o;var d=0;while(f!==i){d+=r[f++];f=f%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(l-s<t){return}var p=c&&l-c;return p?Math.round(d*1e3/p):undefined}}function progressEventReducer(e,t){var r=0;var n=speedometer(50,250);return function(i){var o=i.loaded;var s=i.lengthComputable?i.total:undefined;var a=o-r;var u=n(a);var l=o<=s;r=o;var c={loaded:o,total:s,progress:s?o/s:undefined,bytes:a,rate:u?u:undefined,estimated:u&&s&&l?(s-o)/u:undefined,event:i};c[t?"download":"upload"]=true;e(c)}}var isXHRAdapterSupported=typeof XMLHttpRequest!=="undefined";var xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise((function t(r,n){var i=e.data;var o=AxiosHeaders.from(e.headers).normalize();var s=e.responseType;var a;function u(){if(e.cancelToken){e.cancelToken.unsubscribe(a)}if(e.signal){e.signal.removeEventListener("abort",a)}}if(utils.isFormData(i)&&(platform.isStandardBrowserEnv||platform.isStandardBrowserWebWorkerEnv)){o.setContentType(false)}var l=new XMLHttpRequest;if(e.auth){var c=e.auth.username||"";var f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(c+":"+f))}var d=buildFullPath(e.baseURL,e.url);l.open(e.method.toUpperCase(),buildURL(d,e.params,e.paramsSerializer),true);l.timeout=e.timeout;function p(){if(!l){return}var t=AxiosHeaders.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());var i=!s||s==="text"||s==="json"?l.responseText:l.response;var o={data:i,status:l.status,statusText:l.statusText,headers:t,config:e,request:l};settle((function e(t){r(t);u()}),(function e(t){n(t);u()}),o);l=null}if("onloadend"in l){l.onloadend=p}else{l.onreadystatechange=function e(){if(!l||l.readyState!==4){return}if(l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)){return}setTimeout(p)}}l.onabort=function t(){if(!l){return}n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,l));l=null};l.onerror=function t(){n(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,l));l=null};l.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||transitionalDefaults;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new AxiosError(r,i.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,l));l=null};if(platform.isStandardBrowserEnv){var h=(e.withCredentials||isURLSameOrigin(d))&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);if(h){o.set(e.xsrfHeaderName,h)}}i===undefined&&o.setContentType(null);if("setRequestHeader"in l){utils.forEach(o.toJSON(),(function e(t,r){l.setRequestHeader(r,t)}))}if(!utils.isUndefined(e.withCredentials)){l.withCredentials=!!e.withCredentials}if(s&&s!=="json"){l.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){l.addEventListener("progress",progressEventReducer(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&l.upload){l.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress))}if(e.cancelToken||e.signal){a=function(t){if(!l){return}n(!t||t.type?new CanceledError(null,e,l):t);l.abort();l=null};e.cancelToken&&e.cancelToken.subscribe(a);if(e.signal){e.signal.aborted?a():e.signal.addEventListener("abort",a)}}var m=parseProtocol(d);if(m&&platform.protocols.indexOf(m)===-1){n(new AxiosError("Unsupported protocol "+m+":",AxiosError.ERR_BAD_REQUEST,e));return}l.send(i||null)}))};var knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var adapters={getAdapter:function(e){e=utils.isArray(e)?e:[e];var t=e.length;var r;var n;for(var i=0;i<t;i++){r=e[i];if(n=utils.isString(r)?knownAdapters[r.toLowerCase()]:r){break}}if(!n){if(n===false){throw new AxiosError("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT")}throw new Error(utils.hasOwnProp(knownAdapters,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"))}if(!utils.isFunction(n)){throw new TypeError("adapter is not a function")}return n},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new CanceledError(null,e)}}function dispatchRequest(e){throwIfCancellationRequested(e);e.headers=AxiosHeaders.from(e.headers);e.data=transformData.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=adapters.getAdapter(e.adapter||defaults.adapter);return t(e).then((function t(r){throwIfCancellationRequested(e);r.data=transformData.call(e,e.transformResponse,r);r.headers=AxiosHeaders.from(r.headers);return r}),(function t(r){if(!isCancel(r)){throwIfCancellationRequested(e);if(r&&r.response){r.response.data=transformData.call(e,e.transformResponse,r.response);r.response.headers=AxiosHeaders.from(r.response.headers)}}return Promise.reject(r)}))}var headersToObject=function(e){return e instanceof AxiosHeaders?e.toJSON():e};function mergeConfig(e,t){t=t||{};var r={};function n(e,t,r){if(utils.isPlainObject(e)&&utils.isPlainObject(t)){return utils.merge.call({caseless:r},e,t)}else if(utils.isPlainObject(t)){return utils.merge({},t)}else if(utils.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!utils.isUndefined(t)){return n(e,t,r)}else if(!utils.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!utils.isUndefined(t)){return n(undefined,t)}}function s(e,t){if(!utils.isUndefined(t)){return n(undefined,t)}else if(!utils.isUndefined(e)){return n(undefined,e)}}function a(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:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials: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:a,headers:function(e,t){return i(headersToObject(e),headersToObject(t),true)}};utils.forEach(Object.keys(e).concat(Object.keys(t)),(function n(o){var s=u[o]||i;var l=s(e[o],t[o],o);utils.isUndefined(l)&&s!==a||(r[o]=l)}));return r}var VERSION="1.3.3";var validators$1={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){validators$1[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var deprecatedWarnings={};validators$1.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new AxiosError(i(n," has been removed"+(r?" in "+r:"")),AxiosError.ERR_DEPRECATED)}if(r&&!deprecatedWarnings[n]){deprecatedWarnings[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 assertOptions(e,t,r){if(typeof e!=="object"){throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var s=t[o];if(s){var a=e[o];var u=a===undefined||s(a,o,e);if(u!==true){throw new AxiosError("option "+o+" must be "+u,AxiosError.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new AxiosError("Unknown option "+o,AxiosError.ERR_BAD_OPTION)}}}var validator={assertOptions:assertOptions,validators:validators$1};var validators=validator.validators;var Axios=function(){function e(e){this.defaults=e;this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=mergeConfig(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},false)}if(n!==undefined){validator.assertOptions(n,{encode:validators.function,serialize:validators.function},true)}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o;o=i&&utils.merge(i.common,i[t.method]);o&&utils.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=AxiosHeaders.concat(o,i);var s=[];var a=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}a=a&&r.synchronous;s.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var l;var c=0;var f;if(!a){var d=[dispatchRequest.bind(this),undefined];d.unshift.apply(d,s);d.push.apply(d,u);f=d.length;l=Promise.resolve(t);while(c<f){l=l.then(d[c++],d[c++])}return l}f=s.length;var p=t;c=0;while(c<f){var h=s[c++];var m=s[c++];try{p=h(p)}catch(e){m.call(this,e);break}}try{l=dispatchRequest.call(this,p)}catch(e){return Promise.reject(e)}c=0;f=u.length;while(c<f){l=l.then(u[c++],u[c++])}return l};e.prototype.getUri=function(e){e=mergeConfig(this.defaults,e);var t=buildFullPath(e.baseURL,e.url);return buildURL(t,e.params,e.paramsSerializer)};return e}();utils.forEach(["delete","get","head","options"],(function e(t){Axios.prototype[t]=function(e,r){return this.request(mergeConfig(r||{},{method:t,url:e,data:(r||{}).data}))}}));utils.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(mergeConfig(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Axios.prototype[t]=r();Axios.prototype[t+"Form"]=r(true)}));var CancelToken=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 CanceledError(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 spread(e){return function t(r){return e.apply(null,r)}}function isAxiosError(e){return utils.isObject(e)&&e.isAxiosError===true}var HttpStatusCode={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(HttpStatusCode).forEach((function(e){var t=e[0],r=e[1];HttpStatusCode[r]=t}));function createInstance(e){var t=new Axios(e);var r=bind(Axios.prototype.request,t);utils.extend(r,Axios.prototype,t,{allOwnKeys:true});utils.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return createInstance(mergeConfig(e,r))};return r}var axios=createInstance(defaults);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function e(t){return Promise.all(t)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=function(e){return formDataToJSON(utils.isHTMLForm(e)?new FormData(e):e)};axios.HttpStatusCode=HttpStatusCode;axios.default=axios;var naiveFallback=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var globalThis_1=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 naiveFallback()}try{if(!__global__)return naiveFallback();return __global__}finally{delete Object.prototype.__global__}}();var ENDPOINT_KEY=Symbol.for("verdocs-default-endpoint");var requestLogger=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 VerdocsEndpoint=function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL="https://api.verdocs.com";this.clientID="not-set";this.timeout=15e3;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)||15e3;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=axios.create({baseURL:this.baseURL,timeout:this.timeout})}e.prototype.setDefault=function(){globalThis_1[ENDPOINT_KEY]=this};e.getDefault=function(){if(!globalThis_1[ENDPOINT_KEY]){globalThis_1[ENDPOINT_KEY]=new e;window.console.debug("[JS_SDK] Created default endpoint",globalThis_1[ENDPOINT_KEY])}return globalThis_1[ENDPOINT_KEY]};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.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(requestLogger)}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 t=decodeAccessTokenBody(e);if(t===null||t.exp&&t.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=t;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}();export{TemplateSenderTypes as T,VerdocsEndpoint as V};
@@ -1 +0,0 @@
1
- import{d as t}from"./p-21603661.js";var e,n,r,o;function i(t,e){return function(){return t.apply(e,arguments)}}!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"}(e||(e={})),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"}(n||(n={})),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"}(r||(r={})),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"}(o||(o={}));const{toString:s}=Object.prototype,{getPrototypeOf:u}=Object,c=(a=Object.create(null),t=>{const e=s.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const l=t=>(t=t.toLowerCase(),e=>c(e)===t),f=t=>e=>typeof e===t,{isArray:h}=Array,d=f("undefined"),p=l("ArrayBuffer"),m=f("string"),b=f("function"),w=f("number"),y=t=>null!==t&&"object"==typeof t,g=t=>{if("object"!==c(t))return!1;const e=u(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},v=l("Date"),O=l("File"),R=l("Blob"),S=l("FileList"),E=l("URLSearchParams");function j(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),h(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 A(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 _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,N=t=>!d(t)&&t!==_,T=(x="undefined"!=typeof Uint8Array&&u(Uint8Array),t=>x&&t instanceof x);var x;const P=l("HTMLFormElement"),D=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),F=l("RegExp"),U=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};j(n,((n,o)=>{!1!==e(n,o,t)&&(r[o]=n)})),Object.defineProperties(t,r)},B="abcdefghijklmnopqrstuvwxyz",C={DIGIT:"0123456789",ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+"0123456789"},L={isArray:h,isArrayBuffer:p,isBuffer:function(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&b(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||s.call(t)===e||b(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&p(t.buffer),e},isString:m,isNumber:w,isBoolean:t=>!0===t||!1===t,isObject:y,isPlainObject:g,isUndefined:d,isDate:v,isFile:O,isBlob:R,isRegExp:F,isFunction:b,isStream:t=>y(t)&&b(t.pipe),isURLSearchParams:E,isTypedArray:T,isFileList:S,forEach:j,merge:function t(){const{caseless:e}=N(this)&&this||{},n={},r=(r,o)=>{const i=e&&A(n,o)||o;n[i]=g(n[i])&&g(r)?t(n[i],r):g(r)?t({},r):h(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&j(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(j(e,((e,r)=>{t[r]=n&&b(e)?i(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 c={};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)||c[s]||(e[s]=t[s],c[s]=!0);t=!1!==n&&u(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:c,kindOfTest:l,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(h(t))return t;let e=t.length;if(!w(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:P,hasOwnProperty:D,hasOwnProp:D,reduceDescriptors:U,freezeMethods:t=>{U(t,((e,n)=>{if(b(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;b(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 h(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:A,global:_,isContextDefined:N,ALPHABET:C,generateString:(t=16,e=C.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&b(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(y(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=h(t)?[]:{};return j(t,((t,e)=>{const i=n(t,r+1);!d(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)}};function q(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)}L.inherits(q,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:L.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const I=q.prototype,k={};function M(t){return L.isPlainObject(t)||L.isArray(t)}function z(t){return L.endsWith(t,"[]")?t.slice(0,-2):t}function J(t,e,n){return t?t.concat(e).map((function(t,e){return t=z(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=>{k[t]={value:t}})),Object.defineProperties(q,k),Object.defineProperty(I,"isAxiosError",{value:!0}),q.from=(t,e,n,r,o,i)=>{const s=Object.create(I);return L.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),q.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const H=L.toFlatObject(L,{},null,(function(t){return/^is[A-Z]/.test(t)}));function K(t,e,n){if(!L.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!L.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&L.isSpecCompliantForm(e);if(!L.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(L.isDate(t))return t.toISOString();if(!u&&L.isBlob(t))throw new q("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(t)||L.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(L.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(L.isArray(t)&&function(t){return L.isArray(t)&&!t.some(M)}(t)||(L.isFileList(t)||L.endsWith(n,"[]"))&&(u=L.toArray(t)))return n=z(n),u.forEach((function(t,r){!L.isUndefined(t)&&null!==t&&e.append(!0===s?J([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!M(t)||(e.append(J(o,n,i),c(t)),!1)}const l=[],f=Object.assign(H,{defaultVisitor:a,convertValue:c,isVisitable:M});if(!L.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!L.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),L.forEach(n,(function(n,i){!0===(!(L.isUndefined(n)||null===n)&&o.call(e,n,L.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function V(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,e){this._pairs=[],t&&K(t,this,e)}const G=$.prototype;function W(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,n){if(!e)return t;const r=n&&n.encode||W,o=n&&n.serialize;let i;if(i=o?o(e,n):L.isURLSearchParams(e)?e.toString():new $(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}G.append=function(t,e){this._pairs.push([t,e])},G.toString=function(t){const e=t?function(e){return t.call(this,e,V)}:V;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Z{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){L.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const Q={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Y="undefined"!=typeof URLSearchParams?URLSearchParams:$,tt="undefined"!=typeof FormData?FormData:null,et=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),nt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,rt={isBrowser:!0,classes:{URLSearchParams:Y,FormData:tt,Blob},isStandardBrowserEnv:et,isStandardBrowserWebWorkerEnv:nt,protocols:["http","https","file","blob","url","data"]};function ot(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&L.isArray(r)?r.length:i,u?(r[i]=L.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&L.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&L.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(L.isFormData(t)&&L.isFunction(t.entries)){const n={};return L.forEachEntry(t,((t,r)=>{e(function(t){return L.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const it={"Content-Type":void 0},st={transitional:Q,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=L.isObject(t);if(o&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return r&&r?JSON.stringify(ot(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.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 K(t,new rt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=L.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return K(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(L.isString(t))try{return(0,JSON.parse)(t),L.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||st.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&L.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 q.from(t,q.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:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};L.forEach(["delete","get","head"],(function(t){st.headers[t]={}})),L.forEach(["post","put","patch"],(function(t){st.headers[t]=L.merge(it)}));const ut=L.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"]),ct=Symbol("internals");function at(t){return t&&String(t).trim().toLowerCase()}function lt(t){return!1===t||null==t?t:L.isArray(t)?t.map(lt):String(t)}function ft(t,e,n,r,o){return L.isFunction(r)?r.call(this,e,n):(o&&(e=n),L.isString(e)?L.isString(r)?-1!==e.indexOf(r):L.isRegExp(r)?r.test(e):void 0:void 0)}class ht{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=at(e);if(!o)throw new Error("header name must be a non-empty string");const i=L.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=lt(t))}const i=(t,e)=>L.forEach(t,((t,n)=>o(t,n,e)));return L.isPlainObject(t)||t instanceof this.constructor?i(t,e):L.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.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]&&ut[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=at(t)){const n=L.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(L.isFunction(e))return e.call(this,t,n);if(L.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=at(t)){const n=L.findKey(this,t);return!(!n||void 0===this[n]||e&&!ft(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=at(t)){const o=L.findKey(n,t);!o||e&&!ft(0,n[o],o,e)||(delete n[o],r=!0)}}return L.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&&!ft(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return L.forEach(this,((r,o)=>{const i=L.findKey(n,o);if(i)return e[i]=lt(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]=lt(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return L.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&L.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[ct]=this[ct]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=at(t);e[r]||(function(t,e){const n=L.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 L.isArray(t)?t.forEach(r):r(t),this}}function dt(t,e){const n=this||st,r=e||n,o=ht.from(r.headers);let i=r.data;return L.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function pt(t){return!(!t||!t.__CANCEL__)}function mt(t,e,n){q.call(this,null==t?"canceled":t,q.ERR_CANCELED,e,n),this.name="CanceledError"}ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.freezeMethods(ht.prototype),L.freezeMethods(ht),L.inherits(mt,q,{__CANCEL__:!0});const bt=rt.isStandardBrowserEnv?{write:function(t,e,n,r,o,i){const s=[];s.push(t+"="+encodeURIComponent(e)),L.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),L.isString(r)&&s.push("path="+r),L.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function wt(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 yt=rt.isStandardBrowserEnv?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=L.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 vt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=ht.from(t.headers).normalize(),i=t.responseType;let s;function u(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}L.isFormData(r)&&(rt.isStandardBrowserEnv||rt.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=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 a=wt(t.baseURL,t.url);function l(){if(!c)return;const r=ht.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new q("Request failed with status code "+n.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),u()}),(function(t){n(t),u()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),X(a,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new q("Request aborted",q.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new q("Network Error",q.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new q(e,(t.transitional||Q).clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,t,c)),c=null},rt.isStandardBrowserEnv){const e=(t.withCredentials||yt(a))&&t.xsrfCookieName&&bt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&L.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),L.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",gt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",gt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{c&&(n(!e||e.type?new mt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(a);f&&-1===rt.protocols.indexOf(f)?n(new q("Unsupported protocol "+f+":",q.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};L.forEach(vt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));function Ot(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new mt(null,t)}function Rt(t){return Ot(t),t.headers=ht.from(t.headers),t.data=dt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),(t=>{t=L.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;o<e&&(n=t[o],!(r=L.isString(n)?vt[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new q(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(L.hasOwnProp(vt,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!L.isFunction(r))throw new TypeError("adapter is not a function");return r})(t.adapter||st.adapter)(t).then((function(e){return Ot(t),e.data=dt.call(t,t.transformResponse,e),e.headers=ht.from(e.headers),e}),(function(e){return pt(e)||(Ot(t),e&&e.response&&(e.response.data=dt.call(t,t.transformResponse,e.response),e.response.headers=ht.from(e.response.headers))),Promise.reject(e)}))}const St=t=>t instanceof ht?t.toJSON():t;function Et(t,e){e=e||{};const n={};function r(t,e,n){return L.isPlainObject(t)&&L.isPlainObject(e)?L.merge.call({caseless:n},t,e):L.isPlainObject(e)?L.merge({},e):L.isArray(e)?e.slice():e}function o(t,e,n){return L.isUndefined(e)?L.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!L.isUndefined(e))return r(void 0,e)}function s(t,e){return L.isUndefined(e)?L.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,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(St(t),St(e),!0)};return L.forEach(Object.keys(t).concat(Object.keys(e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);L.isUndefined(s)&&i!==u||(n[r]=s)})),n}const jt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{jt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const At={};jt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.3.3] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new q(r(o," has been removed"+(e?" in "+e:"")),q.ERR_DEPRECATED);return e&&!At[o]&&(At[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 _t={assertOptions:function(t,e,n){if("object"!=typeof t)throw new q("options must be an object",q.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 q("option "+i+" must be "+n,q.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new q("Unknown option "+i,q.ERR_BAD_OPTION)}},validators:jt},Nt=_t.validators;class Tt{constructor(t){this.defaults=t,this.interceptors={request:new Z,response:new Z}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Et(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;let i;void 0!==n&&_t.assertOptions(n,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean)},!1),void 0!==r&&_t.assertOptions(r,{encode:Nt.function,serialize:Nt.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&L.merge(o.common,o[e.method]),i&&L.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=ht.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=[Rt.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=Rt.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 X(wt((t=Et(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}L.forEach(["delete","get","head","options"],(function(t){Tt.prototype[t]=function(e,n){return this.request(Et(n||{},{method:t,url:e,data:(n||{}).data}))}})),L.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(Et(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Tt.prototype[t]=e(),Tt.prototype[t+"Form"]=e(!0)}));class xt{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 mt(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 xt((function(e){t=e})),cancel:t}}}const Pt={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(Pt).forEach((([t,e])=>{Pt[e]=t}));const Dt=function t(e){const n=new Tt(e),r=i(Tt.prototype.request,n);return L.extend(r,Tt.prototype,n,{allOwnKeys:!0}),L.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(Et(e,n))},r}(st);Dt.Axios=Tt,Dt.CanceledError=mt,Dt.CancelToken=xt,Dt.isCancel=pt,Dt.VERSION="1.3.3",Dt.toFormData=K,Dt.AxiosError=q,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=function(t){return function(e){return t.apply(null,e)}},Dt.isAxiosError=function(t){return L.isObject(t)&&!0===t.isAxiosError},Dt.mergeConfig=Et,Dt.AxiosHeaders=ht,Dt.formToJSON=t=>ot(L.isHTMLForm(t)?new FormData(t):t),Dt.HttpStatusCode=Pt,Dt.default=Dt;var Ft=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},Ut=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 Ft()}try{return __global__||Ft()}finally{delete Object.prototype.__global__}}(),Bt=Symbol.for("verdocs-default-endpoint"),Ct=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},Lt=function(){function e(t){this.environment="verdocs",this.sessionType="user",this.baseURL="https://api.verdocs.com",this.clientID="not-set",this.timeout=15e3,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)||15e3,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=Dt.create({baseURL:this.baseURL,timeout:this.timeout})}return e.prototype.setDefault=function(){Ut[Bt]=this},e.getDefault=function(){return Ut[Bt]||(Ut[Bt]=new e,window.console.debug("[JS_SDK] Created default endpoint",Ut[Bt])),Ut[Bt]},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.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(Ct):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{n as T,Lt as V}
@@ -1 +0,0 @@
1
- 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-af2c2f79.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){e("T",void 0);var r;(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"})(r||(r={}));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=e("T",{})));var i;(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"})(i||(i={}));var o;(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"})(o||(o={}));function a(e,t){return function r(){return e.apply(t,arguments)}}var s=Object.prototype.toString;var u=Object.getPrototypeOf;var f=function(e){return function(t){var r=s.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var c=function(e){e=e.toLowerCase();return function(t){return f(t)===e}};var l=function(e){return function(t){return typeof t===e}};var p=Array.isArray;var d=l("undefined");function h(e){return e!==null&&!d(e)&&e.constructor!==null&&!d(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var v=c("ArrayBuffer");function m(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&v(e.buffer)}return t}var y=l("string");var g=l("function");var E=l("number");var b=function(e){return e!==null&&typeof e==="object"};var w=function(e){return e===true||e===false};var R=function(e){if(f(e)!=="object"){return false}var t=u(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var O=c("Date");var S=c("File");var T=c("Blob");var A=c("FileList");var _=function(e){return b(e)&&g(e.pipe)};var L=function(e){var t="[object FormData]";return e&&(typeof FormData==="function"&&e instanceof FormData||s.call(e)===t||g(e.toString)&&e.toString()===t)};var C=c("URLSearchParams");var N=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function P(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(p(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 f=u.length;var c=void 0;for(a=0;a<f;a++){c=u[a];t.call(null,e[c],c,e)}}}function j(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 x=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var U=function(e){return!d(e)&&e!==x};function D(){var e=(U(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&j(t,n)||n;if(R(t[i])&&R(r)){t[i]=D(t[i],r)}else if(R(r)){t[i]=D({},r)}else if(p(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&P(arguments[n],r)}return t}var I=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;P(t,(function(t,n){if(r&&g(t)){e[n]=a(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var B=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var F=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 k=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&&u(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var M=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 q=function(e){if(!e)return null;if(p(e))return e;var t=e.length;if(!E(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var z=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&u(Uint8Array));var H=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 J=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var K=c("HTMLFormElement");var V=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var W=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var G=c("RegExp");var Y=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};P(r,(function(r,i){if(t(r,i,e)!==false){n[i]=r}}));Object.defineProperties(e,n)};var X=function(e){Y(e,(function(t,r){if(g(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!g(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 $=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};p(e)?n(e):n(String(e).split(t));return r};var Z=function(){};var Q=function(e,t){e=+e;return Number.isFinite(e)?e:t};var ee="abcdefghijklmnopqrstuvwxyz";var te="0123456789";var re={DIGIT:te,ALPHA:ee,ALPHA_DIGIT:ee+ee.toUpperCase()+te};var ne=function(e,t){if(e===void 0){e=16}if(t===void 0){t=re.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function ie(e){return!!(e&&g(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var oe=function(e){var t=new Array(10);var r=function(e,n){if(b(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=p(e)?[]:{};P(e,(function(e,t){var o=r(e,n+1);!d(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var ae={isArray:p,isArrayBuffer:v,isBuffer:h,isFormData:L,isArrayBufferView:m,isString:y,isNumber:E,isBoolean:w,isObject:b,isPlainObject:R,isUndefined:d,isDate:O,isFile:S,isBlob:T,isRegExp:G,isFunction:g,isStream:_,isURLSearchParams:C,isTypedArray:z,isFileList:A,forEach:P,merge:D,extend:I,trim:N,stripBOM:B,inherits:F,toFlatObject:k,kindOf:f,kindOfTest:c,endsWith:M,toArray:q,forEachEntry:H,matchAll:J,isHTMLForm:K,hasOwnProperty:W,hasOwnProp:W,reduceDescriptors:Y,freezeMethods:X,toObjectSet:$,toCamelCase:V,noop:Z,toFiniteNumber:Q,findKey:j,global:x,isContextDefined:U,ALPHABET:re,generateString:ne,isSpecCompliantForm:ie,toJSONObject:oe};function se(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)}ae.inherits(se,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:ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var ue=se.prototype;var fe={};["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){fe[e]={value:e}}));Object.defineProperties(se,fe);Object.defineProperty(ue,"isAxiosError",{value:true});se.from=function(e,t,r,n,i,o){var a=Object.create(ue);ae.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));se.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var ce=null;function le(e){return ae.isPlainObject(e)||ae.isArray(e)}function pe(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function de(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=pe(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function he(e){return ae.isArray(e)&&!e.some(le)}var ve=ae.toFlatObject(ae,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function me(e,t,r){if(!ae.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=ae.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!ae.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||c;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&ae.isSpecCompliantForm(t);if(!ae.isFunction(i)){throw new TypeError("visitor must be a function")}function f(e){if(e===null)return"";if(ae.isDate(e)){return e.toISOString()}if(!u&&ae.isBlob(e)){throw new se("Blob is not supported. Use a Buffer instead.")}if(ae.isArrayBuffer(e)||ae.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function c(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(ae.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(ae.isArray(e)&&he(e)||(ae.isFileList(e)||ae.endsWith(r,"[]"))&&(s=ae.toArray(e))){r=pe(r);s.forEach((function e(n,i){!(ae.isUndefined(n)||n===null)&&t.append(a===true?de([r],i,o):a===null?r:r+"[]",f(n))}));return false}}if(le(e)){return true}t.append(de(i,r,o),f(e));return false}var l=[];var p=Object.assign(ve,{defaultVisitor:c,convertValue:f,isVisitable:le});function d(e,r){if(ae.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);ae.forEach(e,(function e(n,o){var a=!(ae.isUndefined(n)||n===null)&&i.call(t,n,ae.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!ae.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function ye(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 ge(e,t){this._pairs=[];e&&me(e,this,t)}var Ee=ge.prototype;Ee.append=function e(t,r){this._pairs.push([t,r])};Ee.toString=function e(t){var r=t?function(e){return t.call(this,e,ye)}:ye;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function be(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function we(e,t,r){if(!t){return e}var n=r&&r.encode||be;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=ae.isURLSearchParams(t)?t.toString():new ge(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 Re=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){ae.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var Oe={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Se=typeof URLSearchParams!=="undefined"?URLSearchParams:ge;var Te=typeof FormData!=="undefined"?FormData:null;var Ae=function(){var e;if(typeof navigator!=="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}();var _e=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var Le={isBrowser:true,classes:{URLSearchParams:Se,FormData:Te,Blob:Blob},isStandardBrowserEnv:Ae,isStandardBrowserWebWorkerEnv:_e,protocols:["http","https","file","blob","url","data"]};function Ce(e,t){return me(e,new Le.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}function Ne(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function Pe(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 je(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&ae.isArray(n)?n.length:o;if(s){if(ae.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!ae.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&ae.isArray(n[o])){n[o]=Pe(n[o])}return!a}if(ae.isFormData(e)&&ae.isFunction(e.entries)){var r={};ae.forEachEntry(e,(function(e,n){t(Ne(e),n,r,0)}));return r}return null}var xe={"Content-Type":undefined};function Ue(e,t,r){if(ae.isString(e)){try{(t||JSON.parse)(e);return ae.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var De={transitional:Oe,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=ae.isObject(t);if(o&&ae.isHTMLForm(t)){t=new FormData(t)}var a=ae.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(je(t)):t}if(ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t)){return t}if(ae.isArrayBufferView(t)){return t.buffer}if(ae.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 Ce(t,this.formSerializer).toString()}if((s=ae.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return me(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return Ue(t)}return t}],transformResponse:[function e(t){var r=this.transitional||De.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&ae.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 se.from(e,se.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:Le.classes.FormData,Blob:Le.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ae.forEach(["delete","get","head"],(function e(t){De.headers[t]={}}));ae.forEach(["post","put","patch"],(function e(t){De.headers[t]=ae.merge(xe)}));var Ie=ae.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 Be=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]&&Ie[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 Fe=Symbol("internals");function ke(e){return e&&String(e).trim().toLowerCase()}function Me(e){if(e===false||e==null){return e}return ae.isArray(e)?e.map(Me):String(e)}function qe(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}function ze(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function He(e,t,r,n,i){if(ae.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!ae.isString(t))return;if(ae.isString(n)){return t.indexOf(n)!==-1}if(ae.isRegExp(n)){return n.test(t)}}function Je(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function Ke(e,t){var r=ae.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 Ve=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=ke(t);if(!i){throw new Error("header name must be a non-empty string")}var o=ae.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=Me(e)}}var o=function(e,t){return ae.forEach(e,(function(e,r){return i(e,r,t)}))};if(ae.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(ae.isString(e)&&(e=e.trim())&&!ze(e)){o(Be(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=ke(e);if(e){var r=ae.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return qe(n)}if(ae.isFunction(t)){return t.call(this,n,r)}if(ae.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=ke(e);if(e){var r=ae.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||He(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=ke(e);if(e){var i=ae.findKey(r,e);if(i&&(!t||He(r,r[i],i,t))){delete r[i];n=true}}}if(ae.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||He(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};ae.forEach(this,(function(n,i){var o=ae.findKey(r,i);if(o){t[o]=Me(n);delete t[i];return}var a=e?Je(i):String(i).trim();if(a!==i){delete t[i]}t[a]=Me(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);ae.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&ae.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[Fe]=this[Fe]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=ke(e);if(!r[t]){Ke(n,e);r[t]=true}}ae.isArray(e)?e.forEach(i):i(e);return this};return e}();Ve.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.freezeMethods(Ve.prototype);ae.freezeMethods(Ve);function We(e,t){var r=this||De;var n=t||r;var i=Ve.from(n.headers);var o=n.data;ae.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function Ge(e){return!!(e&&e.__CANCEL__)}function Ye(e,t,r){se.call(this,e==null?"canceled":e,se.ERR_CANCELED,t,r);this.name="CanceledError"}ae.inherits(Ye,se,{__CANCEL__:true});function Xe(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new se("Request failed with status code "+r.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var $e=Le.isStandardBrowserEnv?function e(){return{write:function e(t,r,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(r));if(ae.isNumber(n)){s.push("expires="+new Date(n).toGMTString())}if(ae.isString(i)){s.push("path="+i)}if(ae.isString(o)){s.push("domain="+o)}if(a===true){s.push("secure")}document.cookie=s.join("; ")},read:function e(t){var r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function e(t){this.write(t,"",Date.now()-864e5)}}}():function e(){return{write:function e(){},read:function e(){return null},remove:function e(){}}}();function Ze(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Qe(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function et(e,t){if(e&&!Ze(t)){return Qe(e,t)}return t}var tt=Le.isStandardBrowserEnv?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=ae.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function rt(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nt(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 f=Date.now();var c=n[o];if(!a){a=f}r[i]=u;n[i]=f;var l=o;var p=0;while(l!==i){p+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(f-a<t){return}var d=c&&f-c;return d?Math.round(p*1e3/d):undefined}}function it(e,t){var r=0;var n=nt(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 f=o<=a;r=o;var c={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&f?(a-o)/u:undefined,event:i};c[t?"download":"upload"]=true;e(c)}}var ot=typeof XMLHttpRequest!=="undefined";var at=ot&&function(e){return new Promise((function t(r,n){var i=e.data;var o=Ve.from(e.headers).normalize();var a=e.responseType;var s;function u(){if(e.cancelToken){e.cancelToken.unsubscribe(s)}if(e.signal){e.signal.removeEventListener("abort",s)}}if(ae.isFormData(i)&&(Le.isStandardBrowserEnv||Le.isStandardBrowserWebWorkerEnv)){o.setContentType(false)}var f=new XMLHttpRequest;if(e.auth){var c=e.auth.username||"";var l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(c+":"+l))}var p=et(e.baseURL,e.url);f.open(e.method.toUpperCase(),we(p,e.params,e.paramsSerializer),true);f.timeout=e.timeout;function d(){if(!f){return}var t=Ve.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?f.responseText:f.response;var o={data:i,status:f.status,statusText:f.statusText,headers:t,config:e,request:f};Xe((function e(t){r(t);u()}),(function e(t){n(t);u()}),o);f=null}if("onloadend"in f){f.onloadend=d}else{f.onreadystatechange=function e(){if(!f||f.readyState!==4){return}if(f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)){return}setTimeout(d)}}f.onabort=function t(){if(!f){return}n(new se("Request aborted",se.ECONNABORTED,e,f));f=null};f.onerror=function t(){n(new se("Network Error",se.ERR_NETWORK,e,f));f=null};f.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||Oe;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new se(r,i.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,e,f));f=null};if(Le.isStandardBrowserEnv){var h=(e.withCredentials||tt(p))&&e.xsrfCookieName&&$e.read(e.xsrfCookieName);if(h){o.set(e.xsrfHeaderName,h)}}i===undefined&&o.setContentType(null);if("setRequestHeader"in f){ae.forEach(o.toJSON(),(function e(t,r){f.setRequestHeader(r,t)}))}if(!ae.isUndefined(e.withCredentials)){f.withCredentials=!!e.withCredentials}if(a&&a!=="json"){f.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){f.addEventListener("progress",it(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&f.upload){f.upload.addEventListener("progress",it(e.onUploadProgress))}if(e.cancelToken||e.signal){s=function(t){if(!f){return}n(!t||t.type?new Ye(null,e,f):t);f.abort();f=null};e.cancelToken&&e.cancelToken.subscribe(s);if(e.signal){e.signal.aborted?s():e.signal.addEventListener("abort",s)}}var v=rt(p);if(v&&Le.protocols.indexOf(v)===-1){n(new se("Unsupported protocol "+v+":",se.ERR_BAD_REQUEST,e));return}f.send(i||null)}))};var st={http:ce,xhr:at};ae.forEach(st,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var ut={getAdapter:function(e){e=ae.isArray(e)?e:[e];var t=e.length;var r;var n;for(var i=0;i<t;i++){r=e[i];if(n=ae.isString(r)?st[r.toLowerCase()]:r){break}}if(!n){if(n===false){throw new se("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT")}throw new Error(ae.hasOwnProp(st,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"))}if(!ae.isFunction(n)){throw new TypeError("adapter is not a function")}return n},adapters:st};function ft(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new Ye(null,e)}}function ct(e){ft(e);e.headers=Ve.from(e.headers);e.data=We.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=ut.getAdapter(e.adapter||De.adapter);return t(e).then((function t(r){ft(e);r.data=We.call(e,e.transformResponse,r);r.headers=Ve.from(r.headers);return r}),(function t(r){if(!Ge(r)){ft(e);if(r&&r.response){r.response.data=We.call(e,e.transformResponse,r.response);r.response.headers=Ve.from(r.response.headers)}}return Promise.reject(r)}))}var lt=function(e){return e instanceof Ve?e.toJSON():e};function pt(e,t){t=t||{};var r={};function n(e,t,r){if(ae.isPlainObject(e)&&ae.isPlainObject(t)){return ae.merge.call({caseless:r},e,t)}else if(ae.isPlainObject(t)){return ae.merge({},t)}else if(ae.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!ae.isUndefined(t)){return n(e,t,r)}else if(!ae.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!ae.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!ae.isUndefined(t)){return n(undefined,t)}else if(!ae.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,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(lt(e),lt(t),true)}};ae.forEach(Object.keys(e).concat(Object.keys(t)),(function n(o){var a=u[o]||i;var f=a(e[o],t[o],o);ae.isUndefined(f)&&a!==s||(r[o]=f)}));return r}var dt="1.3.3";var ht={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){ht[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var vt={};ht.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+dt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new se(i(n," has been removed"+(r?" in "+r:"")),se.ERR_DEPRECATED)}if(r&&!vt[n]){vt[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 mt(e,t,r){if(typeof e!=="object"){throw new se("options must be an object",se.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 se("option "+o+" must be "+u,se.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new se("Unknown option "+o,se.ERR_BAD_OPTION)}}}var yt={assertOptions:mt,validators:ht};var gt=yt.validators;var Et=function(){function e(e){this.defaults=e;this.interceptors={request:new Re,response:new Re}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=pt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){yt.assertOptions(r,{silentJSONParsing:gt.transitional(gt.boolean),forcedJSONParsing:gt.transitional(gt.boolean),clarifyTimeoutError:gt.transitional(gt.boolean)},false)}if(n!==undefined){yt.assertOptions(n,{encode:gt.function,serialize:gt.function},true)}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o;o=i&&ae.merge(i.common,i[t.method]);o&&ae.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=Ve.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 f;var c=0;var l;if(!s){var p=[ct.bind(this),undefined];p.unshift.apply(p,a);p.push.apply(p,u);l=p.length;f=Promise.resolve(t);while(c<l){f=f.then(p[c++],p[c++])}return f}l=a.length;var d=t;c=0;while(c<l){var h=a[c++];var v=a[c++];try{d=h(d)}catch(e){v.call(this,e);break}}try{f=ct.call(this,d)}catch(e){return Promise.reject(e)}c=0;l=u.length;while(c<l){f=f.then(u[c++],u[c++])}return f};e.prototype.getUri=function(e){e=pt(this.defaults,e);var t=et(e.baseURL,e.url);return we(t,e.params,e.paramsSerializer)};return e}();ae.forEach(["delete","get","head","options"],(function e(t){Et.prototype[t]=function(e,r){return this.request(pt(r||{},{method:t,url:e,data:(r||{}).data}))}}));ae.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(pt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Et.prototype[t]=r();Et.prototype[t+"Form"]=r(true)}));var bt=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 Ye(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 wt(e){return function t(r){return e.apply(null,r)}}function Rt(e){return ae.isObject(e)&&e.isAxiosError===true}var Ot={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(Ot).forEach((function(e){var t=e[0],r=e[1];Ot[r]=t}));function St(e){var t=new Et(e);var r=a(Et.prototype.request,t);ae.extend(r,Et.prototype,t,{allOwnKeys:true});ae.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return St(pt(e,r))};return r}var Tt=St(De);Tt.Axios=Et;Tt.CanceledError=Ye;Tt.CancelToken=bt;Tt.isCancel=Ge;Tt.VERSION=dt;Tt.toFormData=me;Tt.AxiosError=se;Tt.Cancel=Tt.CanceledError;Tt.all=function e(t){return Promise.all(t)};Tt.spread=wt;Tt.isAxiosError=Rt;Tt.mergeConfig=pt;Tt.AxiosHeaders=Ve;Tt.formToJSON=function(e){return je(ae.isHTMLForm(e)?new FormData(e):e)};Tt.HttpStatusCode=Ot;Tt.default=Tt;var At=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var _t=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 At()}try{if(!__global__)return At();return __global__}finally{delete Object.prototype.__global__}}();var Lt=Symbol.for("verdocs-default-endpoint");var Ct=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 Nt=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL="https://api.verdocs.com";this.clientID="not-set";this.timeout=15e3;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)||15e3;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=Tt.create({baseURL:this.baseURL,timeout:this.timeout})}e.prototype.setDefault=function(){_t[Lt]=this};e.getDefault=function(){if(!_t[Lt]){_t[Lt]=new e;window.console.debug("[JS_SDK] Created default endpoint",_t[Lt])}return _t[Lt]};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.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(Ct)}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}())}}}));