@verdocs/web-sdk 1.13.10 → 1.13.11
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.
- package/dist/cjs/{TemplateStore-97e0b3f3.js → TemplateStore-f934a60e.js} +12 -4
- package/dist/cjs/ipc-test.cjs.entry.js +36 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +228 -0
- package/dist/cjs/{verdocs-template-document-page.cjs.entry.js → verdocs-template-document-page_2.cjs.entry.js} +46 -1
- package/dist/cjs/{verdocs-template-attachments_4.cjs.entry.js → verdocs-template-fields_4.cjs.entry.js} +239 -224
- package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-properties.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/other/ipctest/ipc-test.css +4 -0
- package/dist/collection/components/other/ipctest/ipc-test.js +79 -0
- package/dist/collection/components/other/ipctest/ipc-test.stories.js +8 -0
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +3 -2
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +1 -0
- package/dist/collection/components/templates/verdocs-template-visibillity/verdocs-template-visibility.stories.js +1 -1
- package/dist/collection/utils/TemplateStore.js +11 -3
- package/dist/components/TemplateStore.js +11 -3
- package/dist/components/VerdocsEndpoint.js +30 -30
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/ipc-test.d.ts +11 -0
- package/dist/components/ipc-test.js +136 -0
- package/dist/components/verdocs-template-fields2.js +3 -2
- package/dist/components/verdocs-template-roles2.js +1 -0
- package/dist/custom-elements.json +1591 -0
- package/dist/docs.json +98 -1
- package/dist/esm/{TemplateStore-17fa95d5.js → TemplateStore-1a6322b4.js} +12 -4
- package/dist/esm/ipc-test.entry.js +32 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-78a752e0.js → utils-39fef438.js} +1 -1
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-button-panel_3.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-dropdown_2.entry.js +2 -2
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm/verdocs-field-date.entry.js +1 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-field-initial.entry.js +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-field-signature.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +3 -3
- package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +3 -3
- package/dist/esm/verdocs-sign.entry.js +2 -2
- package/dist/esm/verdocs-template-attachments_2.entry.js +223 -0
- package/dist/esm/{verdocs-template-document-page.entry.js → verdocs-template-document-page_2.entry.js} +47 -3
- package/dist/esm/{verdocs-template-attachments_4.entry.js → verdocs-template-fields_4.entry.js} +237 -222
- package/dist/esm/verdocs-template-name.entry.js +2 -2
- package/dist/esm/verdocs-template-properties.entry.js +2 -2
- package/dist/esm/verdocs-template-reminders.entry.js +2 -2
- package/dist/esm/verdocs-template-visibility.entry.js +2 -2
- package/dist/esm/verdocs-view.entry.js +2 -2
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/TemplateStore-1a6322b4.js +1 -0
- package/dist/esm-es5/{VerdocsEndpoint-4367eb13.js → VerdocsEndpoint-ca592138.js} +1 -1
- package/dist/esm-es5/ipc-test.entry.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-78a752e0.js → utils-39fef438.js} +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/other/ipctest/ipc-test.d.ts +17 -0
- package/dist/types/components/other/ipctest/ipc-test.stories.d.ts +4 -0
- package/dist/types/components.d.ts +29 -0
- package/dist/verdocs-web-sdk/p-01a240ac.system.js +1 -1
- package/dist/verdocs-web-sdk/p-08305f4e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-1044c9ea.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-bc7c1b67.system.entry.js → p-1fe5af0c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-116c6981.system.entry.js → p-204fadd2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7ef23636.entry.js → p-2544faa8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-254b91cf.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-753cdc95.entry.js → p-27eb5497.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ed3d86cd.entry.js → p-288103cc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f63b71ae.entry.js → p-2a2ba635.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-385c9366.entry.js → p-2f929364.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ed6c5982.entry.js → p-31de3afe.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-55a13b01.entry.js → p-36c540fa.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c42b7ca2.system.entry.js → p-473770b0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a9e063bc.system.entry.js → p-47aac035.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c2c49441.js → p-49fb6d62.js} +1 -1
- package/dist/verdocs-web-sdk/{p-056bec65.system.entry.js → p-4afeb123.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ad7caefa.entry.js → p-4c40cfde.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2d36f297.system.entry.js → p-59d4ad25.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c6547da0.entry.js → p-5c55ff7b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fa0123d2.entry.js → p-5cfaf9d6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5e448806.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-1738fd08.entry.js → p-6a6c8f99.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c45ee88f.system.entry.js → p-6e1a4eb1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c5fb045c.entry.js → p-706044e2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3fa5ce6b.entry.js → p-73995d74.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-df691d95.system.entry.js → p-773ce755.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-13f80bb2.entry.js → p-7c109ef1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1abcf29d.js → p-7f727073.js} +1 -1
- package/dist/verdocs-web-sdk/p-809d389e.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9a4124dd.system.entry.js → p-86cba33a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-870b157b.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-c44fd897.system.js → p-882cf708.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b3c3b7e8.system.entry.js → p-8a48f02b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e5fda62a.entry.js → p-8aa496fb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7500179f.entry.js → p-8e89f2ce.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-90254335.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-237975c0.system.entry.js → p-93b51fba.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-96cfa8a2.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-201f27f6.system.js → p-a06e53f9.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7416b77f.entry.js → p-a4e3a061.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3d521eb4.system.entry.js → p-a6f2cde3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-32547cde.entry.js → p-ac888bf4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-63d89af6.entry.js → p-af821140.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-944996b2.entry.js → p-b29a5587.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3186b008.system.entry.js → p-b310edb5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-27c96690.system.entry.js → p-b568ce5d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5544bdd4.system.entry.js → p-b6c2f196.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-95119614.system.entry.js → p-b6f6c21e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9258d861.system.entry.js → p-b89b5bde.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6c1817fa.system.entry.js → p-beeb7c8a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f71a30f6.entry.js → p-bf4cdcdb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8ac409c5.system.entry.js → p-c1099ce1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-149f9430.system.entry.js → p-c47e1d37.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f1350ea7.system.entry.js → p-cb335fc6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-cf2fdb73.js +1 -0
- package/dist/verdocs-web-sdk/{p-a77f4093.system.entry.js → p-d3402d72.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6b3dd926.system.entry.js → p-db31b40c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-db7fb7e4.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e20da92f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-29f2dfc9.entry.js → p-e44c2491.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f1a773bf.entry.js → p-e604b3b5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-73b44d44.entry.js → p-e9f5417d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5a851a3b.system.entry.js → p-eb41c2c8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4b7996e8.system.entry.js → p-ebd5167e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e312fbab.entry.js → p-ed5afe17.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c54d05db.entry.js → p-f876e71d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-71de1985.system.entry.js → p-f9a490e7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-73875e21.system.entry.js → p-fe7a023d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/Roles-9b593b95.js +0 -28
- package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +0 -220
- package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +0 -51
- package/dist/esm/Roles-6eb459df.js +0 -24
- package/dist/esm/verdocs-template-role-properties_2.entry.js +0 -215
- package/dist/esm/verdocs-toolbar-icon.entry.js +0 -47
- package/dist/esm-es5/Roles-6eb459df.js +0 -1
- package/dist/esm-es5/TemplateStore-17fa95d5.js +0 -1
- package/dist/esm-es5/verdocs-template-attachments_4.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-document-page.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-toolbar-icon.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1025430e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2fa6de11.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-59a88b20.js +0 -1
- package/dist/verdocs-web-sdk/p-7b2ca8ef.system.js +0 -1
- package/dist/verdocs-web-sdk/p-8027431e.js +0 -1
- package/dist/verdocs-web-sdk/p-8229e6df.system.js +0 -1
- package/dist/verdocs-web-sdk/p-9bafdd9f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-acb5e932.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-be05977e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e78b7f2f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ec7fc148.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ed6bc1ce.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f1c98c73.system.entry.js +0 -1
- package/dist/cjs/{VerdocsEndpoint-3e95f87f.js → VerdocsEndpoint-1b1836af.js} +30 -30
- package/dist/esm/{VerdocsEndpoint-4367eb13.js → VerdocsEndpoint-ca592138.js} +30 -30
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function l(e){try{a(i.next(e))}catch(e){s(e)}}function r(e){try{a(i["throw"](e))}catch(e){s(e)}}function a(e){e.done?n(e.value):o(e.value).then(l,r)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return a([e,t])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(s=l[0]&2?o["return"]:l[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;if(o=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;o=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1];s=l;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(l);break}if(s[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];o=0}finally{i=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-fd374620.system.js","./p-54498887.system.js","./p-c44fd897.system.js","./p-7efdefa3.system.js","./p-05eb4fed.system.js","./p-7b2ca8ef.system.js","./p-201f27f6.system.js","./p-187b20b7.system.js","./p-4ac861c9.system.js","./p-bbee73c8.system.js","./p-d1c37175.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,n,i,o,s,l,r,a,d,c,p;return{setters:[function(e){t=e.r;n=e.c;i=e.h;o=e.H},function(){},function(e){s=e.V},function(e){l=e.i;r=e.a},function(e){a=e.g},function(e){d=e.g},function(e){c=e.a},function(e){p=e.S},function(){},function(){},function(){},function(){},function(){}],execute:function(){var u='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';var f='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';var v='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var h='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var m='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var x=e("verdocs_send",function(){function e(e){t(this,e);this.send=n(this,"send",7);this.exit=n(this,"exit",7);this.sdkError=n(this,"sdkError",7);this.searchContacts=n(this,"searchContacts",7);this.levels=[];this.store=null;this.endpoint=s.getDefault();this.templateId=null;this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.rolesCompleted={}}e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,o,s,l,r,a,c,u,f,v,h;return __generator(this,(function(m){switch(m.label){case 0:m.trys.push([0,2,,3]);u=this.endpoint.loadSession();if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SEND] Unable to start builder session, must be authenticated");return[2]}f=this;return[4,d(this.endpoint,this.templateId,true)];case 1:f.store=m.sent();if(!((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_sendable)){console.warn("[SEND] Template is not sendable",this.templateId)}if((i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.roles){v={};this.rolesCompleted={};(s=(o=this.store)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.roles.forEach((function(e){var t=e.sequence-1;v[t]||(v[t]=[]);var n="r-".concat(t,"-").concat(v[t].length);v[t].push(__assign(__assign({},e),{id:n}))}));this.rolesAtLevel=v;this.levels=Object.keys(v).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}if((l=u===null||u===void 0?void 0:u.session)===null||l===void 0?void 0:l.profile){this.sessionContacts.push({id:u.session.profile.id,name:"".concat(u.session.profile.first_name," ").concat(u.session.profile.last_name),email:u.session.profile.email,phone:u.session.profile.phone})}return[3,3];case 2:h=m.sent();console.log("[SEND] Error with preview session",h);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new p(h.message,(a=h.response)===null||a===void 0?void 0:a.status,(c=h.response)===null||c===void 0?void 0:c.data));return[3,3];case 3:return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return i("div",{class:"level-icon",innerHTML:v})}else if(e>=this.levels.length){return i("div",{class:"level-icon",innerHTML:m})}else{return i("div",{class:"level-icon",innerHTML:h})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.rolesCompleted[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t,n,i;e.stopPropagation();(t=this.send)===null||t===void 0?void 0:t.emit({roles:Object.values(this.rolesCompleted),name:(i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.name,template_id:this.templateId})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t,n,s,d;var p=(((n=(t=this.store)===null||t===void 0?void 0:t.state)===null||n===void 0?void 0:n.roles)||[]).map((function(e){return e.name}))||[];var u=Object.values(this.rolesCompleted).filter((function(e){return l(e.email)||r(e.phone)}));var v=u.length>=p.length;return i(o,{class:{sendable:(d=(s=this.store)===null||s===void 0?void 0:s.state)===null||d===void 0?void 0:d.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),this.levels.map((function(t){return i("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.rolesAtLevel[t].map((function(t){var n,o,s,l,r,d;var u=!t.email;return u?i("div",{class:"recipient",style:{backgroundColor:a(c(p,t.name))},onClick:function(n){return e.handleClickRole(n,t)}},(o=(n=e.rolesCompleted[t.id])===null||n===void 0?void 0:n.full_name)!==null&&o!==void 0?o:t.name,i("div",{class:"icon",innerHTML:f}),e.showPickerForId===t.id&&i("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(n){return e.handleSelectContact(n,t)},contactSuggestions:e.sessionContacts,templateRole:(s=e.rolesCompleted[t.id])!==null&&s!==void 0?s:t,onSearchContacts:function(t){var n;return(n=e.searchContacts)===null||n===void 0?void 0:n.emit(t.detail)}})):i("div",{class:"recipient",style:{borderColor:a(c(p,t.name))},onClick:function(n){return e.handleClickRole(n,t)}},(r=(l=e.rolesCompleted[t.id])===null||l===void 0?void 0:l.full_name)!==null&&r!==void 0?r:t.full_name,i("div",{class:"icon",innerHTML:f}),e.showPickerForId===t.id&&i("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(n){return e.handleSelectContact(n,t)},contactSuggestions:e.sessionContacts,templateRole:(d=e.rolesCompleted[t.id])!==null&&d!==void 0?d:t,onSearchContacts:function(t){var n;return(n=e.searchContacts)===null||n===void 0?void 0:n.emit(t.detail)}}))})))})),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{label:"Send",size:"small",disabled:!v,onClick:function(t){return e.handleSend(t)}})))};return e}());x.style=u}}}));
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function l(e){try{a(i.next(e))}catch(e){s(e)}}function r(e){try{a(i["throw"](e))}catch(e){s(e)}}function a(e){e.done?n(e.value):o(e.value).then(l,r)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return a([e,t])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(s=l[0]&2?o["return"]:l[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;if(o=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;o=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1];s=l;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(l);break}if(s[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];o=0}finally{i=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-fd374620.system.js","./p-54498887.system.js","./p-882cf708.system.js","./p-7efdefa3.system.js","./p-05eb4fed.system.js","./p-5e448806.system.js","./p-a06e53f9.system.js","./p-187b20b7.system.js","./p-4ac861c9.system.js","./p-bbee73c8.system.js","./p-d1c37175.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,n,i,o,s,l,r,a,d,c,p;return{setters:[function(e){t=e.r;n=e.c;i=e.h;o=e.H},function(){},function(e){s=e.V},function(e){l=e.i;r=e.a},function(e){a=e.g},function(e){d=e.g},function(e){c=e.a},function(e){p=e.S},function(){},function(){},function(){},function(){},function(){}],execute:function(){var u='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';var v='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';var f='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var h='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var m='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var x=e("verdocs_send",function(){function e(e){t(this,e);this.send=n(this,"send",7);this.exit=n(this,"exit",7);this.sdkError=n(this,"sdkError",7);this.searchContacts=n(this,"searchContacts",7);this.levels=[];this.store=null;this.endpoint=s.getDefault();this.templateId=null;this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.rolesCompleted={}}e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,o,s,l,r,a,c,u,v,f,h;return __generator(this,(function(m){switch(m.label){case 0:m.trys.push([0,2,,3]);u=this.endpoint.loadSession();if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SEND] Unable to start builder session, must be authenticated");return[2]}v=this;return[4,d(this.endpoint,this.templateId,true)];case 1:v.store=m.sent();if(!((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_sendable)){console.warn("[SEND] Template is not sendable",this.templateId)}if((i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.roles){f={};this.rolesCompleted={};(s=(o=this.store)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.roles.forEach((function(e){var t=e.sequence-1;f[t]||(f[t]=[]);var n="r-".concat(t,"-").concat(f[t].length);f[t].push(__assign(__assign({},e),{id:n}))}));this.rolesAtLevel=f;this.levels=Object.keys(f).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}if((l=u===null||u===void 0?void 0:u.session)===null||l===void 0?void 0:l.profile){this.sessionContacts.push({id:u.session.profile.id,name:"".concat(u.session.profile.first_name," ").concat(u.session.profile.last_name),email:u.session.profile.email,phone:u.session.profile.phone})}return[3,3];case 2:h=m.sent();console.log("[SEND] Error with preview session",h);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new p(h.message,(a=h.response)===null||a===void 0?void 0:a.status,(c=h.response)===null||c===void 0?void 0:c.data));return[3,3];case 3:return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return i("div",{class:"level-icon",innerHTML:f})}else if(e>=this.levels.length){return i("div",{class:"level-icon",innerHTML:m})}else{return i("div",{class:"level-icon",innerHTML:h})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.rolesCompleted[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t,n,i;e.stopPropagation();(t=this.send)===null||t===void 0?void 0:t.emit({roles:Object.values(this.rolesCompleted),name:(i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.name,template_id:this.templateId})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t,n,s,d;var p=(((n=(t=this.store)===null||t===void 0?void 0:t.state)===null||n===void 0?void 0:n.roles)||[]).map((function(e){return e.name}))||[];var u=Object.values(this.rolesCompleted).filter((function(e){return l(e.email)||r(e.phone)}));var f=u.length>=p.length;return i(o,{class:{sendable:(d=(s=this.store)===null||s===void 0?void 0:s.state)===null||d===void 0?void 0:d.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),this.levels.map((function(t){return i("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.rolesAtLevel[t].map((function(t){var n,o,s,l,r,d;var u=!t.email;return u?i("div",{class:"recipient",style:{backgroundColor:a(c(p,t.name))},onClick:function(n){return e.handleClickRole(n,t)}},(o=(n=e.rolesCompleted[t.id])===null||n===void 0?void 0:n.full_name)!==null&&o!==void 0?o:t.name,i("div",{class:"icon",innerHTML:v}),e.showPickerForId===t.id&&i("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(n){return e.handleSelectContact(n,t)},contactSuggestions:e.sessionContacts,templateRole:(s=e.rolesCompleted[t.id])!==null&&s!==void 0?s:t,onSearchContacts:function(t){var n;return(n=e.searchContacts)===null||n===void 0?void 0:n.emit(t.detail)}})):i("div",{class:"recipient",style:{borderColor:a(c(p,t.name))},onClick:function(n){return e.handleClickRole(n,t)}},(r=(l=e.rolesCompleted[t.id])===null||l===void 0?void 0:l.full_name)!==null&&r!==void 0?r:t.full_name,i("div",{class:"icon",innerHTML:v}),e.showPickerForId===t.id&&i("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(n){return e.handleSelectContact(n,t)},contactSuggestions:e.sessionContacts,templateRole:(d=e.rolesCompleted[t.id])!==null&&d!==void 0?d:t,onSearchContacts:function(t){var n;return(n=e.searchContacts)===null||n===void 0?void 0:n.emit(t.detail)}}))})))})),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{label:"Send",size:"small",disabled:!f,onClick:function(t){return e.handleSend(t)}})))};return e}());x.style=u}}}));
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as e,c as t,h as a,H as s}from"./p-b3dfe499.js";import"./p-05788c2b.js";import{c as i,d as o}from"./p-567a6e7c.js";import{V as l}from"./p-49fb6d62.js";import{D as n,P as r,J as c,a as d,F as p,b as h,T as m}from"./p-637fee9b.js";import{g as x}from"./p-cf2fdb73.js";import{S as f}from"./p-7a1b2643.js";import{c as v}from"./p-822ba467.js";const u=class{constructor(a){e(this,a),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.templateUpdate=t(this,"templateUpdate",7),this.sdkError=t(this,"sdkError",7),this.endpoint=l.getDefault(),this.templateId="",this.uploading=!1,this.progressLabel="Uploading...",this.progressPercent=0,this.showDeleteError=!1,this.confirmDeleteDocument=null,this.store=null}async componentWillLoad(){var e,t,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await x(this.endpoint,this.templateId,!1)}catch(s){console.log("[TEMPLATE ATTACHMENTS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new f(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(a=s.response)||void 0===a?void 0:a.data))}}handleCancel(e){e.stopPropagation(),this.exit.emit()}handleUploadProgress(e){e>=99?(this.progressPercent=100,this.progressLabel="Processing..."):this.progressPercent=e}async handleUpload(e){var t,a,s;e.stopPropagation();const o=e.detail.file;if(o){console.log("[ATTACHMENTS] Uploading...",o),this.uploading=!0,this.progressLabel="Uploading...";try{const e=await i(this.endpoint,this.templateId,o,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e),this.store=await x(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] New template",this.store.state),this.uploading=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e),null===(t=this.sdkError)||void 0===t||t.emit(new f(e.message,null===(a=e.response)||void 0===a?void 0:a.status,null===(s=e.response)||void 0===s?void 0:s.data)),this.uploading=!1}}}handleNext(e){var t;e.stopPropagation(),this.uploading=!1,this.progressLabel="",this.progressPercent=0,null===(t=this.next)||void 0===t||t.emit({template:this.store.state})}async confirmDelete(){await o(this.endpoint,this.templateId,this.confirmDeleteDocument.id),this.store=await x(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] New template",this.store.state),this.confirmDeleteDocument=null}async handleDelete(e){var t;(null===(t=this.store.state)||void 0===t?void 0:t.template_documents.length)>1?this.confirmDeleteDocument=e:this.showDeleteError=!0}getFileIcon(e){switch(e.mime){case"application/pdf":return d;case"image/jpeg":return c;case"image/png":return r;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return n}return p}render(){var e,t,i;if(!this.endpoint.session)return a(s,null,a("verdocs-component-error",{message:"You must be authenticated to use this module."}));const o=null===(e=this.store)||void 0===e?void 0:e.state;return o.isLoaded?this.endpoint.session&&o.profile_id?a(s,null,a("h5",null,"Existing Attachments"),a("div",{class:"attachments"},null===(t=this.store)||void 0===t?void 0:t.state.template_documents.map((e=>a("div",{class:"attachment"},a("div",{class:"file-icon",innerHTML:this.getFileIcon(e)}),a("div",{class:"filename",title:e.name},e.name),a("div",{class:"pages"},a("div",{class:"count"},e.page_numbers),a("div",{class:"pages-icon",innerHTML:h})),a("div",{class:"trash-icon",innerHTML:m,onClick:()=>this.handleDelete(e)}))))),a("h5",null,"Attach a New Document"),this.uploading?a("div",{class:"loader-wrapper"},a("verdocs-loader",null),this.progressLabel&&a("div",{class:"progress-wrapper"},a("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):a("verdocs-file-chooser",{onFileSelected:e=>this.handleUpload(e)}),a("div",{class:"buttons"},a("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.uploading}),a("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleNext(e),disabled:!(null===(i=this.store)||void 0===i?void 0:i.state.template_documents.length)||this.uploading})),this.showDeleteError&&a("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:()=>this.showDeleteError=!1}),this.confirmDeleteDocument&&a("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:()=>this.confirmDelete(),showCancel:!0,onExit:()=>{this.confirmDeleteDocument=null}})):a(s,{class:"empty"}):a(s,{class:"loading"},a("verdocs-loader",null))}};u.style='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';const g=class{constructor(a){e(this,a),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.endpoint=l.getDefault(),this.file=void 0,this.creating=!1,this.progressLabel="Uploading...",this.progressPercent=0}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("[CREATE] Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){e.stopPropagation(),this.exit.emit()}async handleSubmit(e){var t,a,s,i;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await v(this.endpoint,{name:this.file.name,documents:[this.file]},(e=>{e>=99?(this.progressLabel="Processing...",this.progressPercent=100):this.progressPercent=e}));console.log("[CREATE] Created template",e),null===(t=this.next)||void 0===t||t.emit(e),this.creating=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[CREATE] Error creating template",e),null===(a=this.sdkError)||void 0===a||a.emit(new f(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),this.creating=!1}}}render(){return a(s,null,this.endpoint.session?a("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},a("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),this.creating?a("div",{class:"loader-wrapper"},a("verdocs-loader",null),this.progressLabel&&a("div",{class:"progress-wrapper"},a("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):a("div",{class:"upload-box"},a("div",null,a("span",{innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>'})),a("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),a("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),a("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),a("div",{class:"buttons"},a("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.creating}),a("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):a("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};g.style='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';export{u as verdocs_template_attachments,g as verdocs_template_create}
|
@@ -1 +1 @@
|
|
1
|
-
var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){e("T",void 0);var r;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(r||(r={}));var n;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(n||(n={}));var i;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(i||(i={}));var o;(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"})(o||(o=e("T",{})));var a;(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"})(a||(a={}));var s;(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"})(s||(s={}));var u=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var f=function(e){return!u.has(e&&e.code)};function c(e,t,r,n,i,o,a){try{var s=e[o](a);var u=s.value}catch(e){r(e);return}if(s.done){t(u)}else{Promise.resolve(u).then(n,i)}}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(undefined)}))}}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){p(Object(r),true).forEach((function(t){h(e,t,r[t])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}}return e}function h(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var v="axios-retry";function E(e){return!e.response&&Boolean(e.code)&&e.code!=="ECONNABORTED"&&f(e)}var m=["get","head","options"];var y=m.concat(["put","delete"]);function g(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function R(e){if(!e.config){return false}return g(e)&&m.indexOf(e.config.method)!==-1}function b(e){if(!e.config){return false}return g(e)&&y.indexOf(e.config.method)!==-1}function _(e){return E(e)||b(e)}function O(){return 0}function T(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var t=Math.pow(2,e)*100;var r=t*.2*Math.random();return t+r}function w(e){var t=e[v]||{};t.retryCount=t.retryCount||0;e[v]=t;return t}function A(e,t){return d(d({},t),e[v])}function S(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function C(e,t,r,n){return N.apply(this,arguments)}function N(){N=l((function(e,t,r,n){var i,o,a;return __generator(this,(function(s){switch(s.label){case 0:i=r.retryCount<e&&t(n);if(!(typeof i==="object"))return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);return[4,i];case 2:o=s.sent();return[2,o!==false];case 3:a=s.sent();return[2,false];case 4:return[2,i]}}))}));return N.apply(this,arguments)}function L(e,t){e.interceptors.request.use((function(e){var t=w(e);t.lastRequestTime=Date.now();return e}));e.interceptors.response.use(null,function(){var r=l((function(r){var n,i,o,a,s,u,f,c,l,p,d,h,v,E,m,y;return __generator(this,(function(g){switch(g.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=A(n,t),o=i.retries,a=o===void 0?3:o,s=i.retryCondition,u=s===void 0?_:s,f=i.retryDelay,c=f===void 0?O:f,l=i.shouldResetTimeout,p=l===void 0?false:l,d=i.onRetry,h=d===void 0?function(){}:d;v=w(n);return[4,C(a,u,v,r)];case 1:if(g.sent()){v.retryCount+=1;E=c(v.retryCount,r);S(e,n);if(!p&&n.timeout&&v.lastRequestTime){m=Date.now()-v.lastRequestTime;y=n.timeout-m-E;if(y<=0){return[2,Promise.reject(r)]}n.timeout=y}n.transformRequest=[function(e){return e}];h(v.retryCount,r,n);return[2,new Promise((function(t){return setTimeout((function(){return t(e(n))}),E)}))]}return[2,Promise.reject(r)]}}))}));return function(e){return r.apply(this,arguments)}}())}L.isNetworkError=E;L.isSafeRequestError=R;L.isIdempotentRequestError=b;L.isNetworkOrIdempotentRequestError=_;L.exponentialDelay=T;L.isRetryableError=g;function D(e,t){return function r(){return e.apply(t,arguments)}}var P=Object.prototype.toString;var I=Object.getPrototypeOf;var U=function(e){return function(t){var r=P.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var j=function(e){e=e.toLowerCase();return function(t){return U(t)===e}};var B=function(e){return function(t){return typeof t===e}};var x=Array.isArray;var F=B("undefined");function M(e){return e!==null&&!F(e)&&e.constructor!==null&&!F(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var k=j("ArrayBuffer");function q(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&k(e.buffer)}return t}var G=B("string");var H=B("function");var V=B("number");var z=function(e){return e!==null&&typeof e==="object"};var J=function(e){return e===true||e===false};var K=function(e){if(U(e)!=="object"){return false}var t=I(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var W=j("Date");var Y=j("File");var X=j("Blob");var Z=j("FileList");var $=function(e){return z(e)&&H(e.pipe)};var Q=function(e){var t="[object FormData]";return e&&(typeof FormData==="function"&&e instanceof FormData||P.call(e)===t||H(e.toString)&&e.toString()===t)};var ee=j("URLSearchParams");var te=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function re(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(x(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 ne(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 ie=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var oe=function(e){return!F(e)&&e!==ie};function ae(){var e=(oe(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&ne(t,n)||n;if(K(t[i])&&K(r)){t[i]=ae(t[i],r)}else if(K(r)){t[i]=ae({},r)}else if(x(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&re(arguments[n],r)}return t}var se=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;re(t,(function(t,n){if(r&&H(t)){e[n]=D(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var ue=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var fe=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 ce=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&&I(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var le=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 pe=function(e){if(!e)return null;if(x(e))return e;var t=e.length;if(!V(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var de=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&I(Uint8Array));var he=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 ve=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var Ee=j("HTMLFormElement");var me=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var ye=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var ge=j("RegExp");var Re=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};re(r,(function(r,i){if(t(r,i,e)!==false){n[i]=r}}));Object.defineProperties(e,n)};var be=function(e){Re(e,(function(t,r){if(H(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!H(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 _e=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};x(e)?n(e):n(String(e).split(t));return r};var Oe=function(){};var Te=function(e,t){e=+e;return Number.isFinite(e)?e:t};var we="abcdefghijklmnopqrstuvwxyz";var Ae="0123456789";var Se={DIGIT:Ae,ALPHA:we,ALPHA_DIGIT:we+we.toUpperCase()+Ae};var Ce=function(e,t){if(e===void 0){e=16}if(t===void 0){t=Se.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function Ne(e){return!!(e&&H(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Le=function(e){var t=new Array(10);var r=function(e,n){if(z(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=x(e)?[]:{};re(e,(function(e,t){var o=r(e,n+1);!F(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var De={isArray:x,isArrayBuffer:k,isBuffer:M,isFormData:Q,isArrayBufferView:q,isString:G,isNumber:V,isBoolean:J,isObject:z,isPlainObject:K,isUndefined:F,isDate:W,isFile:Y,isBlob:X,isRegExp:ge,isFunction:H,isStream:$,isURLSearchParams:ee,isTypedArray:de,isFileList:Z,forEach:re,merge:ae,extend:se,trim:te,stripBOM:ue,inherits:fe,toFlatObject:ce,kindOf:U,kindOfTest:j,endsWith:le,toArray:pe,forEachEntry:he,matchAll:ve,isHTMLForm:Ee,hasOwnProperty:ye,hasOwnProp:ye,reduceDescriptors:Re,freezeMethods:be,toObjectSet:_e,toCamelCase:me,noop:Oe,toFiniteNumber:Te,findKey:ne,global:ie,isContextDefined:oe,ALPHABET:Se,generateString:Ce,isSpecCompliantForm:Ne,toJSONObject:Le};function Pe(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)}De.inherits(Pe,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:De.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Ie=Pe.prototype;var Ue={};["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){Ue[e]={value:e}}));Object.defineProperties(Pe,Ue);Object.defineProperty(Ie,"isAxiosError",{value:true});Pe.from=function(e,t,r,n,i,o){var a=Object.create(Ie);De.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));Pe.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var je=null;function Be(e){return De.isPlainObject(e)||De.isArray(e)}function xe(e){return De.endsWith(e,"[]")?e.slice(0,-2):e}function Fe(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=xe(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Me(e){return De.isArray(e)&&!e.some(Be)}var ke=De.toFlatObject(De,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function qe(e,t,r){if(!De.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=De.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!De.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&&De.isSpecCompliantForm(t);if(!De.isFunction(i)){throw new TypeError("visitor must be a function")}function f(e){if(e===null)return"";if(De.isDate(e)){return e.toISOString()}if(!u&&De.isBlob(e)){throw new Pe("Blob is not supported. Use a Buffer instead.")}if(De.isArrayBuffer(e)||De.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(De.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(De.isArray(e)&&Me(e)||(De.isFileList(e)||De.endsWith(r,"[]"))&&(s=De.toArray(e))){r=xe(r);s.forEach((function e(n,i){!(De.isUndefined(n)||n===null)&&t.append(a===true?Fe([r],i,o):a===null?r:r+"[]",f(n))}));return false}}if(Be(e)){return true}t.append(Fe(i,r,o),f(e));return false}var l=[];var p=Object.assign(ke,{defaultVisitor:c,convertValue:f,isVisitable:Be});function d(e,r){if(De.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);De.forEach(e,(function e(n,o){var a=!(De.isUndefined(n)||n===null)&&i.call(t,n,De.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!De.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function Ge(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 He(e,t){this._pairs=[];e&&qe(e,this,t)}var Ve=He.prototype;Ve.append=function e(t,r){this._pairs.push([t,r])};Ve.toString=function e(t){var r=t?function(e){return t.call(this,e,Ge)}:Ge;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function ze(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Je(e,t,r){if(!t){return e}var n=r&&r.encode||ze;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=De.isURLSearchParams(t)?t.toString():new He(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 Ke=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){De.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var We={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Ye=typeof URLSearchParams!=="undefined"?URLSearchParams:He;var Xe=typeof FormData!=="undefined"?FormData:null;var Ze=typeof Blob!=="undefined"?Blob:null;var $e=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 Qe=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var et={isBrowser:true,classes:{URLSearchParams:Ye,FormData:Xe,Blob:Ze},isStandardBrowserEnv:$e,isStandardBrowserWebWorkerEnv:Qe,protocols:["http","https","file","blob","url","data"]};function tt(e,t){return qe(e,new et.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}function rt(e){return De.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function nt(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 it(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&De.isArray(n)?n.length:o;if(s){if(De.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!De.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&De.isArray(n[o])){n[o]=nt(n[o])}return!a}if(De.isFormData(e)&&De.isFunction(e.entries)){var r={};De.forEachEntry(e,(function(e,n){t(rt(e),n,r,0)}));return r}return null}var ot={"Content-Type":undefined};function at(e,t,r){if(De.isString(e)){try{(t||JSON.parse)(e);return De.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var st={transitional:We,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=De.isObject(t);if(o&&De.isHTMLForm(t)){t=new FormData(t)}var a=De.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(it(t)):t}if(De.isArrayBuffer(t)||De.isBuffer(t)||De.isStream(t)||De.isFile(t)||De.isBlob(t)){return t}if(De.isArrayBufferView(t)){return t.buffer}if(De.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 tt(t,this.formSerializer).toString()}if((s=De.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return qe(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return at(t)}return t}],transformResponse:[function e(t){var r=this.transitional||st.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&De.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 Pe.from(e,Pe.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:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};De.forEach(["delete","get","head"],(function e(t){st.headers[t]={}}));De.forEach(["post","put","patch"],(function e(t){st.headers[t]=De.merge(ot)}));var ut=De.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 ft=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]&&ut[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 ct=Symbol("internals");function lt(e){return e&&String(e).trim().toLowerCase()}function pt(e){if(e===false||e==null){return e}return De.isArray(e)?e.map(pt):String(e)}function dt(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 ht(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function vt(e,t,r,n,i){if(De.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!De.isString(t))return;if(De.isString(n)){return t.indexOf(n)!==-1}if(De.isRegExp(n)){return n.test(t)}}function Et(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function mt(e,t){var r=De.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 yt=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=lt(t);if(!i){throw new Error("header name must be a non-empty string")}var o=De.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=pt(e)}}var o=function(e,t){return De.forEach(e,(function(e,r){return i(e,r,t)}))};if(De.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(De.isString(e)&&(e=e.trim())&&!ht(e)){o(ft(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=lt(e);if(e){var r=De.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return dt(n)}if(De.isFunction(t)){return t.call(this,n,r)}if(De.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=lt(e);if(e){var r=De.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||vt(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=lt(e);if(e){var i=De.findKey(r,e);if(i&&(!t||vt(r,r[i],i,t))){delete r[i];n=true}}}if(De.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||vt(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};De.forEach(this,(function(n,i){var o=De.findKey(r,i);if(o){t[o]=pt(n);delete t[i];return}var a=e?Et(i):String(i).trim();if(a!==i){delete t[i]}t[a]=pt(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);De.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&De.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[ct]=this[ct]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=lt(e);if(!r[t]){mt(n,e);r[t]=true}}De.isArray(e)?e.forEach(i):i(e);return this};return e}();yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);De.freezeMethods(yt.prototype);De.freezeMethods(yt);function gt(e,t){var r=this||st;var n=t||r;var i=yt.from(n.headers);var o=n.data;De.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function Rt(e){return!!(e&&e.__CANCEL__)}function bt(e,t,r){Pe.call(this,e==null?"canceled":e,Pe.ERR_CANCELED,t,r);this.name="CanceledError"}De.inherits(bt,Pe,{__CANCEL__:true});function _t(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new Pe("Request failed with status code "+r.status,[Pe.ERR_BAD_REQUEST,Pe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var Ot=et.isStandardBrowserEnv?function e(){return{write:function e(t,r,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(r));if(De.isNumber(n)){s.push("expires="+new Date(n).toGMTString())}if(De.isString(i)){s.push("path="+i)}if(De.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 Tt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wt(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function At(e,t){if(e&&!Tt(t)){return wt(e,t)}return t}var St=et.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=De.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Ct(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 Lt(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 Dt=typeof XMLHttpRequest!=="undefined";var Pt=Dt&&function(e){return new Promise((function t(r,n){var i=e.data;var o=yt.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(De.isFormData(i)&&(et.isStandardBrowserEnv||et.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=At(e.baseURL,e.url);f.open(e.method.toUpperCase(),Je(p,e.params,e.paramsSerializer),true);f.timeout=e.timeout;function d(){if(!f){return}var t=yt.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};_t((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 Pe("Request aborted",Pe.ECONNABORTED,e,f));f=null};f.onerror=function t(){n(new Pe("Network Error",Pe.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||We;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new Pe(r,i.clarifyTimeoutError?Pe.ETIMEDOUT:Pe.ECONNABORTED,e,f));f=null};if(et.isStandardBrowserEnv){var h=(e.withCredentials||St(p))&&e.xsrfCookieName&&Ot.read(e.xsrfCookieName);if(h){o.set(e.xsrfHeaderName,h)}}i===undefined&&o.setContentType(null);if("setRequestHeader"in f){De.forEach(o.toJSON(),(function e(t,r){f.setRequestHeader(r,t)}))}if(!De.isUndefined(e.withCredentials)){f.withCredentials=!!e.withCredentials}if(a&&a!=="json"){f.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){f.addEventListener("progress",Lt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&f.upload){f.upload.addEventListener("progress",Lt(e.onUploadProgress))}if(e.cancelToken||e.signal){s=function(t){if(!f){return}n(!t||t.type?new bt(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=Ct(p);if(v&&et.protocols.indexOf(v)===-1){n(new Pe("Unsupported protocol "+v+":",Pe.ERR_BAD_REQUEST,e));return}f.send(i||null)}))};var It={http:je,xhr:Pt};De.forEach(It,(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=De.isArray(e)?e:[e];var t=e.length;var r;var n;for(var i=0;i<t;i++){r=e[i];if(n=De.isString(r)?It[r.toLowerCase()]:r){break}}if(!n){if(n===false){throw new Pe("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT")}throw new Error(De.hasOwnProp(It,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"))}if(!De.isFunction(n)){throw new TypeError("adapter is not a function")}return n},adapters:It};function jt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new bt(null,e)}}function Bt(e){jt(e);e.headers=yt.from(e.headers);e.data=gt.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||st.adapter);return t(e).then((function t(r){jt(e);r.data=gt.call(e,e.transformResponse,r);r.headers=yt.from(r.headers);return r}),(function t(r){if(!Rt(r)){jt(e);if(r&&r.response){r.response.data=gt.call(e,e.transformResponse,r.response);r.response.headers=yt.from(r.response.headers)}}return Promise.reject(r)}))}var xt=function(e){return e instanceof yt?e.toJSON():e};function Ft(e,t){t=t||{};var r={};function n(e,t,r){if(De.isPlainObject(e)&&De.isPlainObject(t)){return De.merge.call({caseless:r},e,t)}else if(De.isPlainObject(t)){return De.merge({},t)}else if(De.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!De.isUndefined(t)){return n(e,t,r)}else if(!De.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!De.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!De.isUndefined(t)){return n(undefined,t)}else if(!De.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(xt(e),xt(t),true)}};De.forEach(Object.keys(e).concat(Object.keys(t)),(function n(o){var a=u[o]||i;var f=a(e[o],t[o],o);De.isUndefined(f)&&a!==s||(r[o]=f)}));return r}var Mt="1.3.4";var kt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){kt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var qt={};kt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Mt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Pe(i(n," has been removed"+(r?" in "+r:"")),Pe.ERR_DEPRECATED)}if(r&&!qt[n]){qt[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 Gt(e,t,r){if(typeof e!=="object"){throw new Pe("options must be an object",Pe.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 Pe("option "+o+" must be "+u,Pe.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Pe("Unknown option "+o,Pe.ERR_BAD_OPTION)}}}var Ht={assertOptions:Gt,validators:kt};var Vt=Ht.validators;var zt=function(){function e(e){this.defaults=e;this.interceptors={request:new Ke,response:new Ke}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Ft(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){Ht.assertOptions(r,{silentJSONParsing:Vt.transitional(Vt.boolean),forcedJSONParsing:Vt.transitional(Vt.boolean),clarifyTimeoutError:Vt.transitional(Vt.boolean)},false)}if(n!==undefined){Ht.assertOptions(n,{encode:Vt.function,serialize:Vt.function},true)}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o;o=i&&De.merge(i.common,i[t.method]);o&&De.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=yt.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=[Bt.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=Bt.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=Ft(this.defaults,e);var t=At(e.baseURL,e.url);return Je(t,e.params,e.paramsSerializer)};return e}();De.forEach(["delete","get","head","options"],(function e(t){zt.prototype[t]=function(e,r){return this.request(Ft(r||{},{method:t,url:e,data:(r||{}).data}))}}));De.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Ft(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}zt.prototype[t]=r();zt.prototype[t+"Form"]=r(true)}));var Jt=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 bt(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 Kt(e){return function t(r){return e.apply(null,r)}}function Wt(e){return De.isObject(e)&&e.isAxiosError===true}var Yt={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(Yt).forEach((function(e){var t=e[0],r=e[1];Yt[r]=t}));function Xt(e){var t=new zt(e);var r=D(zt.prototype.request,t);De.extend(r,zt.prototype,t,{allOwnKeys:true});De.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return Xt(Ft(e,r))};return r}var Zt=Xt(st);Zt.Axios=zt;Zt.CanceledError=bt;Zt.CancelToken=Jt;Zt.isCancel=Rt;Zt.VERSION=Mt;Zt.toFormData=qe;Zt.AxiosError=Pe;Zt.Cancel=Zt.CanceledError;Zt.all=function e(t){return Promise.all(t)};Zt.spread=Kt;Zt.isAxiosError=Wt;Zt.mergeConfig=Ft;Zt.AxiosHeaders=yt;Zt.formToJSON=function(e){return it(De.isHTMLForm(e)?new FormData(e):e)};Zt.HttpStatusCode=Yt;Zt.default=Zt;var $t=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var Qt=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 $t()}try{if(!__global__)return $t();return __global__}finally{delete Object.prototype.__global__}}();var er=Symbol.for("verdocs-default-endpoint");var tr=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 rr=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL="https://api.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||6e4;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=Zt.create({baseURL:this.baseURL,timeout:this.timeout});L(this.api,{retries:0,retryDelay:L.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){Qt[er]=this};e.getDefault=function(){if(!Qt[er]){Qt[er]=new e;window.console.debug("[JS_SDK] Created default endpoint",Qt[er])}return Qt[er]};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(tr)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var r=t(e);if(r===null||r.exp&&r.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=r;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}())}}}));
|
1
|
+
var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){e("T",void 0);var r;(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"})(r||(r=e("T",{})));var n;(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"})(n||(n={}));var i;(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"})(i||(i={}));var o;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(o||(o={}));var a;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(a||(a={}));var s;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(s||(s={}));var u=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var f=function(e){return!u.has(e&&e.code)};function c(e,t,r,n,i,o,a){try{var s=e[o](a);var u=s.value}catch(e){r(e);return}if(s.done){t(u)}else{Promise.resolve(u).then(n,i)}}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(undefined)}))}}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){p(Object(r),true).forEach((function(t){h(e,t,r[t])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}}return e}function h(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var v="axios-retry";function E(e){return!e.response&&Boolean(e.code)&&e.code!=="ECONNABORTED"&&f(e)}var m=["get","head","options"];var y=m.concat(["put","delete"]);function g(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function R(e){if(!e.config){return false}return g(e)&&m.indexOf(e.config.method)!==-1}function b(e){if(!e.config){return false}return g(e)&&y.indexOf(e.config.method)!==-1}function _(e){return E(e)||b(e)}function O(){return 0}function T(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var t=Math.pow(2,e)*100;var r=t*.2*Math.random();return t+r}function w(e){var t=e[v]||{};t.retryCount=t.retryCount||0;e[v]=t;return t}function A(e,t){return d(d({},t),e[v])}function S(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function C(e,t,r,n){return N.apply(this,arguments)}function N(){N=l((function(e,t,r,n){var i,o,a;return __generator(this,(function(s){switch(s.label){case 0:i=r.retryCount<e&&t(n);if(!(typeof i==="object"))return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);return[4,i];case 2:o=s.sent();return[2,o!==false];case 3:a=s.sent();return[2,false];case 4:return[2,i]}}))}));return N.apply(this,arguments)}function L(e,t){e.interceptors.request.use((function(e){var t=w(e);t.lastRequestTime=Date.now();return e}));e.interceptors.response.use(null,function(){var r=l((function(r){var n,i,o,a,s,u,f,c,l,p,d,h,v,E,m,y;return __generator(this,(function(g){switch(g.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=A(n,t),o=i.retries,a=o===void 0?3:o,s=i.retryCondition,u=s===void 0?_:s,f=i.retryDelay,c=f===void 0?O:f,l=i.shouldResetTimeout,p=l===void 0?false:l,d=i.onRetry,h=d===void 0?function(){}:d;v=w(n);return[4,C(a,u,v,r)];case 1:if(g.sent()){v.retryCount+=1;E=c(v.retryCount,r);S(e,n);if(!p&&n.timeout&&v.lastRequestTime){m=Date.now()-v.lastRequestTime;y=n.timeout-m-E;if(y<=0){return[2,Promise.reject(r)]}n.timeout=y}n.transformRequest=[function(e){return e}];h(v.retryCount,r,n);return[2,new Promise((function(t){return setTimeout((function(){return t(e(n))}),E)}))]}return[2,Promise.reject(r)]}}))}));return function(e){return r.apply(this,arguments)}}())}L.isNetworkError=E;L.isSafeRequestError=R;L.isIdempotentRequestError=b;L.isNetworkOrIdempotentRequestError=_;L.exponentialDelay=T;L.isRetryableError=g;function D(e,t){return function r(){return e.apply(t,arguments)}}var P=Object.prototype.toString;var I=Object.getPrototypeOf;var U=function(e){return function(t){var r=P.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var j=function(e){e=e.toLowerCase();return function(t){return U(t)===e}};var B=function(e){return function(t){return typeof t===e}};var x=Array.isArray;var F=B("undefined");function M(e){return e!==null&&!F(e)&&e.constructor!==null&&!F(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var k=j("ArrayBuffer");function q(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&k(e.buffer)}return t}var G=B("string");var H=B("function");var V=B("number");var z=function(e){return e!==null&&typeof e==="object"};var J=function(e){return e===true||e===false};var K=function(e){if(U(e)!=="object"){return false}var t=I(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var W=j("Date");var Y=j("File");var X=j("Blob");var Z=j("FileList");var $=function(e){return z(e)&&H(e.pipe)};var Q=function(e){var t="[object FormData]";return e&&(typeof FormData==="function"&&e instanceof FormData||P.call(e)===t||H(e.toString)&&e.toString()===t)};var ee=j("URLSearchParams");var te=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function re(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(x(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 ne(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 ie=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var oe=function(e){return!F(e)&&e!==ie};function ae(){var e=(oe(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&ne(t,n)||n;if(K(t[i])&&K(r)){t[i]=ae(t[i],r)}else if(K(r)){t[i]=ae({},r)}else if(x(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&re(arguments[n],r)}return t}var se=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;re(t,(function(t,n){if(r&&H(t)){e[n]=D(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var ue=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var fe=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 ce=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&&I(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var le=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 pe=function(e){if(!e)return null;if(x(e))return e;var t=e.length;if(!V(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var de=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&I(Uint8Array));var he=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 ve=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var Ee=j("HTMLFormElement");var me=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var ye=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var ge=j("RegExp");var Re=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};re(r,(function(r,i){if(t(r,i,e)!==false){n[i]=r}}));Object.defineProperties(e,n)};var be=function(e){Re(e,(function(t,r){if(H(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!H(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 _e=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};x(e)?n(e):n(String(e).split(t));return r};var Oe=function(){};var Te=function(e,t){e=+e;return Number.isFinite(e)?e:t};var we="abcdefghijklmnopqrstuvwxyz";var Ae="0123456789";var Se={DIGIT:Ae,ALPHA:we,ALPHA_DIGIT:we+we.toUpperCase()+Ae};var Ce=function(e,t){if(e===void 0){e=16}if(t===void 0){t=Se.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function Ne(e){return!!(e&&H(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Le=function(e){var t=new Array(10);var r=function(e,n){if(z(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=x(e)?[]:{};re(e,(function(e,t){var o=r(e,n+1);!F(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var De={isArray:x,isArrayBuffer:k,isBuffer:M,isFormData:Q,isArrayBufferView:q,isString:G,isNumber:V,isBoolean:J,isObject:z,isPlainObject:K,isUndefined:F,isDate:W,isFile:Y,isBlob:X,isRegExp:ge,isFunction:H,isStream:$,isURLSearchParams:ee,isTypedArray:de,isFileList:Z,forEach:re,merge:ae,extend:se,trim:te,stripBOM:ue,inherits:fe,toFlatObject:ce,kindOf:U,kindOfTest:j,endsWith:le,toArray:pe,forEachEntry:he,matchAll:ve,isHTMLForm:Ee,hasOwnProperty:ye,hasOwnProp:ye,reduceDescriptors:Re,freezeMethods:be,toObjectSet:_e,toCamelCase:me,noop:Oe,toFiniteNumber:Te,findKey:ne,global:ie,isContextDefined:oe,ALPHABET:Se,generateString:Ce,isSpecCompliantForm:Ne,toJSONObject:Le};function Pe(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)}De.inherits(Pe,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:De.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Ie=Pe.prototype;var Ue={};["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){Ue[e]={value:e}}));Object.defineProperties(Pe,Ue);Object.defineProperty(Ie,"isAxiosError",{value:true});Pe.from=function(e,t,r,n,i,o){var a=Object.create(Ie);De.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));Pe.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var je=null;function Be(e){return De.isPlainObject(e)||De.isArray(e)}function xe(e){return De.endsWith(e,"[]")?e.slice(0,-2):e}function Fe(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=xe(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Me(e){return De.isArray(e)&&!e.some(Be)}var ke=De.toFlatObject(De,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function qe(e,t,r){if(!De.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=De.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!De.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&&De.isSpecCompliantForm(t);if(!De.isFunction(i)){throw new TypeError("visitor must be a function")}function f(e){if(e===null)return"";if(De.isDate(e)){return e.toISOString()}if(!u&&De.isBlob(e)){throw new Pe("Blob is not supported. Use a Buffer instead.")}if(De.isArrayBuffer(e)||De.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(De.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(De.isArray(e)&&Me(e)||(De.isFileList(e)||De.endsWith(r,"[]"))&&(s=De.toArray(e))){r=xe(r);s.forEach((function e(n,i){!(De.isUndefined(n)||n===null)&&t.append(a===true?Fe([r],i,o):a===null?r:r+"[]",f(n))}));return false}}if(Be(e)){return true}t.append(Fe(i,r,o),f(e));return false}var l=[];var p=Object.assign(ke,{defaultVisitor:c,convertValue:f,isVisitable:Be});function d(e,r){if(De.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);De.forEach(e,(function e(n,o){var a=!(De.isUndefined(n)||n===null)&&i.call(t,n,De.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!De.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function Ge(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 He(e,t){this._pairs=[];e&&qe(e,this,t)}var Ve=He.prototype;Ve.append=function e(t,r){this._pairs.push([t,r])};Ve.toString=function e(t){var r=t?function(e){return t.call(this,e,Ge)}:Ge;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function ze(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Je(e,t,r){if(!t){return e}var n=r&&r.encode||ze;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=De.isURLSearchParams(t)?t.toString():new He(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 Ke=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){De.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var We={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Ye=typeof URLSearchParams!=="undefined"?URLSearchParams:He;var Xe=typeof FormData!=="undefined"?FormData:null;var Ze=typeof Blob!=="undefined"?Blob:null;var $e=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 Qe=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var et={isBrowser:true,classes:{URLSearchParams:Ye,FormData:Xe,Blob:Ze},isStandardBrowserEnv:$e,isStandardBrowserWebWorkerEnv:Qe,protocols:["http","https","file","blob","url","data"]};function tt(e,t){return qe(e,new et.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}function rt(e){return De.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function nt(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 it(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&De.isArray(n)?n.length:o;if(s){if(De.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!De.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&De.isArray(n[o])){n[o]=nt(n[o])}return!a}if(De.isFormData(e)&&De.isFunction(e.entries)){var r={};De.forEachEntry(e,(function(e,n){t(rt(e),n,r,0)}));return r}return null}var ot={"Content-Type":undefined};function at(e,t,r){if(De.isString(e)){try{(t||JSON.parse)(e);return De.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var st={transitional:We,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=De.isObject(t);if(o&&De.isHTMLForm(t)){t=new FormData(t)}var a=De.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(it(t)):t}if(De.isArrayBuffer(t)||De.isBuffer(t)||De.isStream(t)||De.isFile(t)||De.isBlob(t)){return t}if(De.isArrayBufferView(t)){return t.buffer}if(De.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 tt(t,this.formSerializer).toString()}if((s=De.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return qe(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return at(t)}return t}],transformResponse:[function e(t){var r=this.transitional||st.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&De.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 Pe.from(e,Pe.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:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};De.forEach(["delete","get","head"],(function e(t){st.headers[t]={}}));De.forEach(["post","put","patch"],(function e(t){st.headers[t]=De.merge(ot)}));var ut=De.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 ft=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]&&ut[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 ct=Symbol("internals");function lt(e){return e&&String(e).trim().toLowerCase()}function pt(e){if(e===false||e==null){return e}return De.isArray(e)?e.map(pt):String(e)}function dt(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 ht(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function vt(e,t,r,n,i){if(De.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!De.isString(t))return;if(De.isString(n)){return t.indexOf(n)!==-1}if(De.isRegExp(n)){return n.test(t)}}function Et(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function mt(e,t){var r=De.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 yt=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=lt(t);if(!i){throw new Error("header name must be a non-empty string")}var o=De.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=pt(e)}}var o=function(e,t){return De.forEach(e,(function(e,r){return i(e,r,t)}))};if(De.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(De.isString(e)&&(e=e.trim())&&!ht(e)){o(ft(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=lt(e);if(e){var r=De.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return dt(n)}if(De.isFunction(t)){return t.call(this,n,r)}if(De.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=lt(e);if(e){var r=De.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||vt(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=lt(e);if(e){var i=De.findKey(r,e);if(i&&(!t||vt(r,r[i],i,t))){delete r[i];n=true}}}if(De.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||vt(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};De.forEach(this,(function(n,i){var o=De.findKey(r,i);if(o){t[o]=pt(n);delete t[i];return}var a=e?Et(i):String(i).trim();if(a!==i){delete t[i]}t[a]=pt(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);De.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&De.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[ct]=this[ct]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=lt(e);if(!r[t]){mt(n,e);r[t]=true}}De.isArray(e)?e.forEach(i):i(e);return this};return e}();yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);De.freezeMethods(yt.prototype);De.freezeMethods(yt);function gt(e,t){var r=this||st;var n=t||r;var i=yt.from(n.headers);var o=n.data;De.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function Rt(e){return!!(e&&e.__CANCEL__)}function bt(e,t,r){Pe.call(this,e==null?"canceled":e,Pe.ERR_CANCELED,t,r);this.name="CanceledError"}De.inherits(bt,Pe,{__CANCEL__:true});function _t(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new Pe("Request failed with status code "+r.status,[Pe.ERR_BAD_REQUEST,Pe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var Ot=et.isStandardBrowserEnv?function e(){return{write:function e(t,r,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(r));if(De.isNumber(n)){s.push("expires="+new Date(n).toGMTString())}if(De.isString(i)){s.push("path="+i)}if(De.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 Tt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wt(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function At(e,t){if(e&&!Tt(t)){return wt(e,t)}return t}var St=et.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=De.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Ct(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 Lt(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 Dt=typeof XMLHttpRequest!=="undefined";var Pt=Dt&&function(e){return new Promise((function t(r,n){var i=e.data;var o=yt.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(De.isFormData(i)&&(et.isStandardBrowserEnv||et.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=At(e.baseURL,e.url);f.open(e.method.toUpperCase(),Je(p,e.params,e.paramsSerializer),true);f.timeout=e.timeout;function d(){if(!f){return}var t=yt.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};_t((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 Pe("Request aborted",Pe.ECONNABORTED,e,f));f=null};f.onerror=function t(){n(new Pe("Network Error",Pe.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||We;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new Pe(r,i.clarifyTimeoutError?Pe.ETIMEDOUT:Pe.ECONNABORTED,e,f));f=null};if(et.isStandardBrowserEnv){var h=(e.withCredentials||St(p))&&e.xsrfCookieName&&Ot.read(e.xsrfCookieName);if(h){o.set(e.xsrfHeaderName,h)}}i===undefined&&o.setContentType(null);if("setRequestHeader"in f){De.forEach(o.toJSON(),(function e(t,r){f.setRequestHeader(r,t)}))}if(!De.isUndefined(e.withCredentials)){f.withCredentials=!!e.withCredentials}if(a&&a!=="json"){f.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){f.addEventListener("progress",Lt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&f.upload){f.upload.addEventListener("progress",Lt(e.onUploadProgress))}if(e.cancelToken||e.signal){s=function(t){if(!f){return}n(!t||t.type?new bt(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=Ct(p);if(v&&et.protocols.indexOf(v)===-1){n(new Pe("Unsupported protocol "+v+":",Pe.ERR_BAD_REQUEST,e));return}f.send(i||null)}))};var It={http:je,xhr:Pt};De.forEach(It,(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=De.isArray(e)?e:[e];var t=e.length;var r;var n;for(var i=0;i<t;i++){r=e[i];if(n=De.isString(r)?It[r.toLowerCase()]:r){break}}if(!n){if(n===false){throw new Pe("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT")}throw new Error(De.hasOwnProp(It,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"))}if(!De.isFunction(n)){throw new TypeError("adapter is not a function")}return n},adapters:It};function jt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new bt(null,e)}}function Bt(e){jt(e);e.headers=yt.from(e.headers);e.data=gt.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||st.adapter);return t(e).then((function t(r){jt(e);r.data=gt.call(e,e.transformResponse,r);r.headers=yt.from(r.headers);return r}),(function t(r){if(!Rt(r)){jt(e);if(r&&r.response){r.response.data=gt.call(e,e.transformResponse,r.response);r.response.headers=yt.from(r.response.headers)}}return Promise.reject(r)}))}var xt=function(e){return e instanceof yt?e.toJSON():e};function Ft(e,t){t=t||{};var r={};function n(e,t,r){if(De.isPlainObject(e)&&De.isPlainObject(t)){return De.merge.call({caseless:r},e,t)}else if(De.isPlainObject(t)){return De.merge({},t)}else if(De.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!De.isUndefined(t)){return n(e,t,r)}else if(!De.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!De.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!De.isUndefined(t)){return n(undefined,t)}else if(!De.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(xt(e),xt(t),true)}};De.forEach(Object.keys(e).concat(Object.keys(t)),(function n(o){var a=u[o]||i;var f=a(e[o],t[o],o);De.isUndefined(f)&&a!==s||(r[o]=f)}));return r}var Mt="1.3.4";var kt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){kt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var qt={};kt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Mt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Pe(i(n," has been removed"+(r?" in "+r:"")),Pe.ERR_DEPRECATED)}if(r&&!qt[n]){qt[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 Gt(e,t,r){if(typeof e!=="object"){throw new Pe("options must be an object",Pe.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 Pe("option "+o+" must be "+u,Pe.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Pe("Unknown option "+o,Pe.ERR_BAD_OPTION)}}}var Ht={assertOptions:Gt,validators:kt};var Vt=Ht.validators;var zt=function(){function e(e){this.defaults=e;this.interceptors={request:new Ke,response:new Ke}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Ft(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){Ht.assertOptions(r,{silentJSONParsing:Vt.transitional(Vt.boolean),forcedJSONParsing:Vt.transitional(Vt.boolean),clarifyTimeoutError:Vt.transitional(Vt.boolean)},false)}if(n!==undefined){Ht.assertOptions(n,{encode:Vt.function,serialize:Vt.function},true)}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o;o=i&&De.merge(i.common,i[t.method]);o&&De.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=yt.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=[Bt.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=Bt.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=Ft(this.defaults,e);var t=At(e.baseURL,e.url);return Je(t,e.params,e.paramsSerializer)};return e}();De.forEach(["delete","get","head","options"],(function e(t){zt.prototype[t]=function(e,r){return this.request(Ft(r||{},{method:t,url:e,data:(r||{}).data}))}}));De.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Ft(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}zt.prototype[t]=r();zt.prototype[t+"Form"]=r(true)}));var Jt=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 bt(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 Kt(e){return function t(r){return e.apply(null,r)}}function Wt(e){return De.isObject(e)&&e.isAxiosError===true}var Yt={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(Yt).forEach((function(e){var t=e[0],r=e[1];Yt[r]=t}));function Xt(e){var t=new zt(e);var r=D(zt.prototype.request,t);De.extend(r,zt.prototype,t,{allOwnKeys:true});De.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return Xt(Ft(e,r))};return r}var Zt=Xt(st);Zt.Axios=zt;Zt.CanceledError=bt;Zt.CancelToken=Jt;Zt.isCancel=Rt;Zt.VERSION=Mt;Zt.toFormData=qe;Zt.AxiosError=Pe;Zt.Cancel=Zt.CanceledError;Zt.all=function e(t){return Promise.all(t)};Zt.spread=Kt;Zt.isAxiosError=Wt;Zt.mergeConfig=Ft;Zt.AxiosHeaders=yt;Zt.formToJSON=function(e){return it(De.isHTMLForm(e)?new FormData(e):e)};Zt.HttpStatusCode=Yt;Zt.default=Zt;var $t=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var Qt=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 $t()}try{if(!__global__)return $t();return __global__}finally{delete Object.prototype.__global__}}();var er=Symbol.for("verdocs-default-endpoint");var tr=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 rr=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL="https://api.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||6e4;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=Zt.create({baseURL:this.baseURL,timeout:this.timeout});L(this.api,{retries:0,retryDelay:L.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){Qt[er]=this};e.getDefault=function(){if(!Qt[er]){Qt[er]=new e;window.console.debug("[JS_SDK] Created default endpoint",Qt[er])}return Qt[er]};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(tr)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var r=t(e);if(r===null||r.exp&&r.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=r;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}())}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):i(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++){if(o||!(r in t)){if(!o)o=Array.prototype.slice.call(t,0,r);o[r]=t[r]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-fd374620.system.js","./p-54498887.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):i(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++){if(o||!(r in t)){if(!o)o=Array.prototype.slice.call(t,0,r);o[r]=t[r]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-fd374620.system.js","./p-54498887.system.js","./p-882cf708.system.js","./p-a06e53f9.system.js","./p-5e448806.system.js","./p-187b20b7.system.js","./p-bbee73c8.system.js","./p-d1c37175.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-4ac861c9.system.js"],(function(e){"use strict";var t,n,r,i,o,s,a,l,u,c;return{setters:[function(e){t=e.r;n=e.c;r=e.h;i=e.H},function(){},function(e){o=e.V},function(e){s=e.r;a=e.a},function(e){l=e.g;u=e.a},function(e){c=e.S},function(){},function(){},function(){},function(){},function(){}],execute:function(){var d='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';var p=e("verdocs_preview",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.store=null;this.endpoint=o.getDefault();this.templateId=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,i;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[PREVIEW] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,l(this.endpoint,this.templateId,true)];case 1:r.store=o.sent();console.log("[PREVIEW] Loading template ".concat(this.templateId),this.endpoint.session);return[3,3];case 2:i=o.sent();console.log("[PREVIEW] Error with preview session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handlePageRendered=function(e){var t=this;var n,r;var i=e.detail;var o=(r=(n=this.store)===null||n===void 0?void 0:n.state)===null||r===void 0?void 0:r.fields.filter((function(e){return e.page_sequence===i.pageNumber}));o.forEach((function(e){return s(e,i,a(u(t.store),e.role_name),{disabled:true,editable:false,draggable:false})}))};e.prototype.render=function(){var e=this;var t,n,o,s;if(!((n=(t=this.store)===null||t===void 0?void 0:t.state)===null||n===void 0?void 0:n.isLoaded)){return r(i,null,r("verdocs-loader",null))}var a=__spreadArray([],(s=(o=this.store)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.pages,true);a.sort((function(e,t){return e.sequence-t.sequence}));return r(i,null,a.map((function(t){return r("verdocs-template-document-page",{templateId:t.template_id,documentId:t.document_id,pageNumber:t.sequence,virtualWidth:612,virtualHeight:792,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))};return e}());p.style=d}}}));
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as i,h as t,H as s}from"./p-b3dfe499.js";import{t as n}from"./p-b3ec6306.js";import"./p-05788c2b.js";import{V as a}from"./p-c2c49441.js";import{S as o}from"./p-7a1b2643.js";import{f as l}from"./p-ab01f71e.js";const c={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'},d=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.toggle=i(this,"toggle",7),this.endpoint=a.getDefault(),this.envelopeId="",this.envelope=null,this.roleNames=[],this.activeTab=1,this.panelOpen=!1}componentWillLoad(){this.endpoint.loadSession()}async componentWillRender(){var e,i,t;if(this.envelopeId)try{this.envelope=await n(this.endpoint,this.envelopeId),this.roleNames=this.envelope.recipients.map((e=>e.role_name))}catch(s){null===(e=this.sdkError)||void 0===e||e.emit(new o(s.message,null===(i=s.response)||void 0===i?void 0:i.status,null===(t=s.response)||void 0===t?void 0:t.data))}else console.error("[SIDEBAR] Missing required envelopeId")}setTab(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen,null===(i=this.toggle)||void 0===i||i.emit({open:this.panelOpen}),this.activeTab=e}canResendRecipient(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(this.envelope.status)}canModifyRecipient(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(this.envelope.status)}handleRecipientAction(e,i){var t;console.log("recipient action",i,e),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:this.envelope,event:i})}prepareHistoryEntries(){const e=[],i=this.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(this.envelope.created_at)}),"complete"===this.envelope.status&&e.push({icon:"pencil",message:"Envelope completed.",date:new Date(this.envelope.updated_at)});const t=i.some((e=>"owner:canceled"===e.event));return"canceled"!==this.envelope.status||t||e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(this.envelope.canceled_at)}),i.forEach((i=>{const t=this.envelope.recipients.find((e=>e.role_name===i.role_name)),s=(null==t?void 0:t.full_name)||"";switch(i.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:`Signed by ${s}.`,date:new Date(i.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:`Declined by ${s}.`,date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":e.push({icon:"visibility",message:`Opened by ${s}, via email.`,date:new Date(i.created_at)});break;case"sms":e.push({icon:"visibility",message:`Opened by ${s}, via SMS.`,date:new Date(i.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:`Opened by ${s}, via In-person link.`,date:new Date(i.created_at)});break;case"in_app":e.push({icon:"visibility",message:`Opened by ${s}, via dashboard.`,date:new Date(i.created_at)});break;default:e.push({icon:"visibility",message:`Opened by ${s}.`,date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":e.push({icon:"check_circle",message:`Approved by ${s}.`,date:new Date(i.created_at)});break;default:e.push({icon:"send",message:`Submitted by ${s}.`,date:new Date(i.created_at)})}break;case"recipient:prepared":e.push({icon:"send",message:`Prepared by ${s}.`,date:new Date(i.created_at)});break;case"recipient:claimed":"guest"===i.event_detail?e.push({icon:"account_circle",message:`${s} claimed the Verdoc as a guest.`,date:new Date(i.created_at)}):"profile"===i.event_detail&&e.push({icon:"verified_user",message:`${s} claimed the Verdoc as a verified user.`,date:new Date(i.created_at)});break;case"recipient:agreed":e.push({icon:"done",message:`${s} agreed to use electronic records and signatures.`,date:new Date(i.created_at)});break;case"recipient:invited":e.push("sms"===i.event_detail?{icon:"textsms",message:`${s} has been invited via SMS.`,date:new Date(i.created_at)}:{icon:"mail",message:`${s} has been invited via email.`,date:new Date(i.created_at)});break;case"invitation:resent":e.push({icon:"mail",message:`Invitation was resent to ${s} ${"reminder"===i.event_detail?" by reminder":""}.`,date:new Date(i.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:`A copy has been sent to ${s}.`,date:new Date(i.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:`Owner accessed the In-person link for ${t}.`,date:new Date(i.created_at)});break;default:console.log("unknown",i)}})),e.sort(((e,i)=>i.date.getTime()-e.date.getTime())),e}render(){var e,i,n;if(!this.envelope)return t(s,null);const a=this.endpoint.getSession().profile_id===this.envelope.profile_id,o=this.prepareHistoryEntries();return t(s,{class:this.panelOpen?"open":""},t("div",{class:"buttons"},t("button",{class:1===this.activeTab?"active":"",onClick:()=>this.setTab(1),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>'}),t("button",{class:2===this.activeTab?"active":"",onClick:()=>this.setTab(2),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>'}),t("button",{class:3===this.activeTab?"active":"",onClick:()=>this.setTab(3),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>'})),1===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"Details"),t("div",{class:"label"},"Envelope ID"),t("div",{class:"value"},this.envelope.id),t("div",{class:"label"},"Date Created"),t("div",{class:"value"},l(new Date(this.envelope.created_at),"PP pp")),t("div",{class:"label"},"Last Modified"),t("div",{class:"value"},l(new Date(this.envelope.updated_at),"PP pp")),t("div",{class:"label"},"Status"),t("div",{class:"value"},this.envelope.status),t("div",{class:"label"},"Verdoc Owner ID"),t("div",{class:"value"},this.envelope.profile_id),t("div",{class:"label"},"Verdoc Owner Name"),t("div",{class:"value"},null===(e=this.envelope.profile)||void 0===e?void 0:e.first_name," ",null===(i=this.envelope.profile)||void 0===i?void 0:i.last_name),t("div",{class:"label"},"Verdoc Owner Email"),t("div",{class:"value"},null===(n=this.envelope.profile)||void 0===n?void 0:n.email)),2===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"Recipients"),this.envelope.recipients.map(((e,i)=>t("div",{class:"recipient-detail"},t("div",{class:"recipient-header"},t("div",{class:"recipient-number"},i+1),t("div",{class:"recipient-type"},e.type),t("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),a&&t("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!this.canResendRecipient(e)},{id:"modify",label:"Modify Recipient",disabled:!this.canModifyRecipient(e)},{id:"inperson",label:"Get In-Person Link",disabled:!this.canModifyRecipient(e)||!["invited","opened"].includes(e.status)}]})),t("dic",{class:"recipient-content"},t("div",{class:"recipient-name"},e.full_name),t("div",{class:"recipient-name"},e.email),t("div",{class:"recipient-name"},e.phone)))))),3===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"History"),o.map((e=>t("div",{class:"history-entry"},t("div",{class:"activity-icon",innerHTML:c[e.icon]||e.icon}),t("div",{class:"activity-details"},t("div",{class:"activity-text"},e.message),t("div",{class:"activity-date"},l(e.date,"PP pp"))))))))}};d.style='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';export{d as verdocs_envelope_sidebar}
|
1
|
+
import{r as e,c as i,h as t,H as s}from"./p-b3dfe499.js";import{t as n}from"./p-b3ec6306.js";import"./p-05788c2b.js";import{V as a}from"./p-49fb6d62.js";import{S as o}from"./p-7a1b2643.js";import{f as l}from"./p-ab01f71e.js";const c={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'},d=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.toggle=i(this,"toggle",7),this.endpoint=a.getDefault(),this.envelopeId="",this.envelope=null,this.roleNames=[],this.activeTab=1,this.panelOpen=!1}componentWillLoad(){this.endpoint.loadSession()}async componentWillRender(){var e,i,t;if(this.envelopeId)try{this.envelope=await n(this.endpoint,this.envelopeId),this.roleNames=this.envelope.recipients.map((e=>e.role_name))}catch(s){null===(e=this.sdkError)||void 0===e||e.emit(new o(s.message,null===(i=s.response)||void 0===i?void 0:i.status,null===(t=s.response)||void 0===t?void 0:t.data))}else console.error("[SIDEBAR] Missing required envelopeId")}setTab(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen,null===(i=this.toggle)||void 0===i||i.emit({open:this.panelOpen}),this.activeTab=e}canResendRecipient(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(this.envelope.status)}canModifyRecipient(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(this.envelope.status)}handleRecipientAction(e,i){var t;console.log("recipient action",i,e),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:this.envelope,event:i})}prepareHistoryEntries(){const e=[],i=this.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(this.envelope.created_at)}),"complete"===this.envelope.status&&e.push({icon:"pencil",message:"Envelope completed.",date:new Date(this.envelope.updated_at)});const t=i.some((e=>"owner:canceled"===e.event));return"canceled"!==this.envelope.status||t||e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(this.envelope.canceled_at)}),i.forEach((i=>{const t=this.envelope.recipients.find((e=>e.role_name===i.role_name)),s=(null==t?void 0:t.full_name)||"";switch(i.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:`Signed by ${s}.`,date:new Date(i.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:`Declined by ${s}.`,date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":e.push({icon:"visibility",message:`Opened by ${s}, via email.`,date:new Date(i.created_at)});break;case"sms":e.push({icon:"visibility",message:`Opened by ${s}, via SMS.`,date:new Date(i.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:`Opened by ${s}, via In-person link.`,date:new Date(i.created_at)});break;case"in_app":e.push({icon:"visibility",message:`Opened by ${s}, via dashboard.`,date:new Date(i.created_at)});break;default:e.push({icon:"visibility",message:`Opened by ${s}.`,date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":e.push({icon:"check_circle",message:`Approved by ${s}.`,date:new Date(i.created_at)});break;default:e.push({icon:"send",message:`Submitted by ${s}.`,date:new Date(i.created_at)})}break;case"recipient:prepared":e.push({icon:"send",message:`Prepared by ${s}.`,date:new Date(i.created_at)});break;case"recipient:claimed":"guest"===i.event_detail?e.push({icon:"account_circle",message:`${s} claimed the Verdoc as a guest.`,date:new Date(i.created_at)}):"profile"===i.event_detail&&e.push({icon:"verified_user",message:`${s} claimed the Verdoc as a verified user.`,date:new Date(i.created_at)});break;case"recipient:agreed":e.push({icon:"done",message:`${s} agreed to use electronic records and signatures.`,date:new Date(i.created_at)});break;case"recipient:invited":e.push("sms"===i.event_detail?{icon:"textsms",message:`${s} has been invited via SMS.`,date:new Date(i.created_at)}:{icon:"mail",message:`${s} has been invited via email.`,date:new Date(i.created_at)});break;case"invitation:resent":e.push({icon:"mail",message:`Invitation was resent to ${s} ${"reminder"===i.event_detail?" by reminder":""}.`,date:new Date(i.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:`A copy has been sent to ${s}.`,date:new Date(i.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:`Owner accessed the In-person link for ${t}.`,date:new Date(i.created_at)});break;default:console.log("unknown",i)}})),e.sort(((e,i)=>i.date.getTime()-e.date.getTime())),e}render(){var e,i,n;if(!this.envelope)return t(s,null);const a=this.endpoint.getSession().profile_id===this.envelope.profile_id,o=this.prepareHistoryEntries();return t(s,{class:this.panelOpen?"open":""},t("div",{class:"buttons"},t("button",{class:1===this.activeTab?"active":"",onClick:()=>this.setTab(1),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>'}),t("button",{class:2===this.activeTab?"active":"",onClick:()=>this.setTab(2),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>'}),t("button",{class:3===this.activeTab?"active":"",onClick:()=>this.setTab(3),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>'})),1===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"Details"),t("div",{class:"label"},"Envelope ID"),t("div",{class:"value"},this.envelope.id),t("div",{class:"label"},"Date Created"),t("div",{class:"value"},l(new Date(this.envelope.created_at),"PP pp")),t("div",{class:"label"},"Last Modified"),t("div",{class:"value"},l(new Date(this.envelope.updated_at),"PP pp")),t("div",{class:"label"},"Status"),t("div",{class:"value"},this.envelope.status),t("div",{class:"label"},"Verdoc Owner ID"),t("div",{class:"value"},this.envelope.profile_id),t("div",{class:"label"},"Verdoc Owner Name"),t("div",{class:"value"},null===(e=this.envelope.profile)||void 0===e?void 0:e.first_name," ",null===(i=this.envelope.profile)||void 0===i?void 0:i.last_name),t("div",{class:"label"},"Verdoc Owner Email"),t("div",{class:"value"},null===(n=this.envelope.profile)||void 0===n?void 0:n.email)),2===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"Recipients"),this.envelope.recipients.map(((e,i)=>t("div",{class:"recipient-detail"},t("div",{class:"recipient-header"},t("div",{class:"recipient-number"},i+1),t("div",{class:"recipient-type"},e.type),t("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),a&&t("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!this.canResendRecipient(e)},{id:"modify",label:"Modify Recipient",disabled:!this.canModifyRecipient(e)},{id:"inperson",label:"Get In-Person Link",disabled:!this.canModifyRecipient(e)||!["invited","opened"].includes(e.status)}]})),t("dic",{class:"recipient-content"},t("div",{class:"recipient-name"},e.full_name),t("div",{class:"recipient-name"},e.email),t("div",{class:"recipient-name"},e.phone)))))),3===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"History"),o.map((e=>t("div",{class:"history-entry"},t("div",{class:"activity-icon",innerHTML:c[e.icon]||e.icon}),t("div",{class:"activity-details"},t("div",{class:"activity-text"},e.message),t("div",{class:"activity-date"},l(e.date,"PP pp"))))))))}};d.style='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';export{d as verdocs_envelope_sidebar}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i,c as t,h as s,H as e,a as o}from"./p-b3dfe499.js";import{c as r}from"./p-9d707f6e.js";import{f as d}from"./p-b3ec6306.js";import"./p-05788c2b.js";import{V as n}from"./p-
|
1
|
+
import{r as i,c as t,h as s,H as e,a as o}from"./p-b3dfe499.js";import{c as r}from"./p-9d707f6e.js";import{f as d}from"./p-b3ec6306.js";import"./p-05788c2b.js";import{V as n}from"./p-49fb6d62.js";import{t as a}from"./p-7f727073.js";import"./p-eab67c09.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const h=class{constructor(s){i(this,s),this.optionSelected=t(this,"optionSelected",7),this.clickListenerSymbol=new AbortController,this.options=[],this.open=void 0}componentDidLoad(){this.popper=r(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,6]}}]}),window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})}disconnectedCallback(){this.clickListenerSymbol.abort()}clickListener(i){i.target!=this.el&&!this.el.contains(i.target)&&this.hide()}handleSelectOption(i,t){i.stopPropagation(),this.optionSelected.emit(t),this.hide()}showDropdown(){var i,t;this.open=!0,this.dropdownMenu.setAttribute("data-show",""),this.dropdownMenu.removeAttribute("aria-hidden"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!0}]}))).catch((()=>{})),null===(t=this.popper)||void 0===t||t.update().catch((()=>{}))}handleHideDropdown(i){var t,s;"button"===(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.localName)&&"arrow"===(null===(s=null==i?void 0:i.target)||void 0===s?void 0:s.className)||this.hide()}toggleDropdown(i){i.stopPropagation(),this.open?this.hide():this.showDropdown()}hide(){var i;this.open=!1,this.dropdownMenu.removeAttribute("data-show"),this.dropdownMenu.setAttribute("aria-hidden","true"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!1}]}))).catch((()=>{}))}render(){var i;return s(e,{class:{open:!!this.open}},s("button",{class:"arrow",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#50BE80"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>',"aria-label":"Open Menu",onClick:i=>this.toggleDropdown(i),onBlur:i=>this.handleHideDropdown(i),ref:i=>this.dropdownButton=i}),s("div",{class:"items","aria-hidden":!this.open,ref:i=>this.dropdownMenu=i},null===(i=this.options)||void 0===i?void 0:i.map((i=>i.label?s("button",{onClick:t=>this.handleSelectOption(t,i),class:"option",disabled:i.disabled},i.label):s("div",{class:"separator"})))))}get el(){return o(this)}};h.style='verdocs-dropdown{font-family:"Barlow", sans-serif;display:block}verdocs-dropdown .arrow{width:32px;height:26px;background:#fff;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #cccccc;-ms-flex-pack:center;justify-content:center}verdocs-dropdown .arrow svg{fill:#55bc81;-webkit-transition:0.3s;transition:0.3s}verdocs-dropdown .items{width:200px;display:none;z-index:10000;border-radius:5px;background:#33354c;border:1px solid #654dcb}verdocs-dropdown .items[data-show]{display:block}verdocs-dropdown .option{width:100%;color:#fff;border:none;display:block;text-align:left;background:none;padding:10px 20px}verdocs-dropdown .option:hover{cursor:pointer;background:#55bc81}verdocs-dropdown .option[disabled]{color:#aaaaaa}verdocs-dropdown .option[disabled]:hover{color:#aaaaaa;cursor:inherit;background:transparent}verdocs-dropdown .separator{border-top:1px solid #ffffff5f;height:1px;padding-top:5px;margin-top:5px}verdocs-dropdown.open .items{display:block}verdocs-dropdown.open .arrow{background:#4c56cb;border:1px solid #707ae5}verdocs-dropdown.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1);fill:#fff}';const l=class{constructor(s){i(this,s),this.pageRendered=t(this,"pageRendered",7),this.endpoint=n.getDefault(),this.envelopeId="",this.documentId="",this.pageNumber=1,this.virtualWidth=612,this.virtualHeight=792,this.layers=[{name:"page",type:"canvas"}],this.type="original",this.containerId=`verdocs-envelope-document-page-${Math.random().toString(36).substring(2,11)}`,this.renderedWidth=this.virtualWidth,this.renderedHeight=this.virtualHeight,this.naturalWidth=this.virtualWidth,this.naturalHeight=this.virtualHeight,this.aspectRatio=this.virtualWidth/this.virtualHeight,this.skipFirstNotification=!0,this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}async componentWillLoad(){this.pageDisplayUri=await d(this.endpoint,this.envelopeId,this.documentId,this.pageNumber,this.type)}componentDidLoad(){this.resizeObserver=new ResizeObserver(a((i=>{for(const t of i){const i=t.contentRect.width;this.renderedWidth=i,this.renderedHeight=this.virtualHeight*(i/this.virtualWidth)}this.notifyRenderedSize()}),100)),this.resizeObserver.observe(this.container)}disconnectedCallback(){var i;null===(i=this.resizeObserver)||void 0===i||i.disconnect()}notifyRenderedSize(){this.skipFirstNotification?this.skipFirstNotification=!1:this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const i=`${this.renderedHeight}px`;return s(e,{id:`${this.containerId}`,style:{height:i,flex:`0 0 ${i}`}},this.layers.map((t=>"div"===t.type?s("div",{class:"verdocs-envelope-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:i}}):this.pageDisplayUri?s("img",{class:"verdocs-envelope-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":!0,loading:"lazy",onLoad:i=>{this.naturalWidth=i.target.naturalWidth,this.naturalHeight=i.target.naturalHeight,this.aspectRatio=this.naturalWidth/this.naturalHeight,this.virtualHeight=this.virtualWidth/this.aspectRatio,this.renderedHeight=i.target.offsetWidth/this.aspectRatio}}):s("div",null))))}get container(){return o(this)}};l.style="verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";export{h as verdocs_dropdown,l as verdocs_envelope_document_page}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as e,c as i,h as o,H as s,F as t,a as n}from"./p-b3dfe499.js";import{t as l,e as d}from"./p-b3ec6306.js";import{E as a}from"./p-05788c2b.js";import{V as r}from"./p-49fb6d62.js";import{i as c}from"./p-7291906c.js";import{c as p,d as h,s as v}from"./p-7f727073.js";import{S as x}from"./p-7a1b2643.js";import"./p-eab67c09.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const m=class{constructor(o){e(this,o),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=r.getDefault(),this.envelopeId="",this.headerTargetId=null,this.canceling=!1,this.envelope=null,this.roleNames=[],this.showCancelDone=!1}componentWillLoad(){this.endpoint.loadSession()}async componentWillRender(){if(this.envelopeId)return this.reloadEnvelope();console.error("[VIEW] Missing required envelopeId")}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,i=document.getElementById("verdocs-view-header");e&&i&&(console.log("[VIEW] Moving header"),i.remove(),e.append(i))}async reloadEnvelope(){var e,i,o;console.log("[VIEW] Loading envelope...");try{this.envelope=await l(this.endpoint,this.envelopeId),this.roleNames=this.envelope.recipients.map((e=>e.role_name))}catch(s){null===(e=this.sdkError)||void 0===e||e.emit(new x(s.message,null===(i=s.response)||void 0===i?void 0:i.status,null===(o=s.response)||void 0===o?void 0:o.data))}}handlePageRendered(e){console.log("[VIEW] Page rendered",e.detail)}async handleOptionSelected(e){var i,o;switch(e.detail.id){case"cancel":confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")&&(this.canceling=!0,d(this.endpoint,this.envelopeId).then((e=>(this.canceling=!1,console.log("[VIEW] Envelope canceled",e),l(this.endpoint,this.envelopeId)))).then((e=>{console.log("[VIEW] Loaded new envelope details",e),this.envelope=e})).catch((e=>{var i,o,s;this.canceling=!1,console.log("[VIEW] Error canceling envelope",e),null===(i=this.sdkError)||void 0===i||i.emit(new x(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(s=e.response)||void 0===s?void 0:s.data))})),this.showCancelDone=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"}));break;case"print":window.print(),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download-attachments":v(this.endpoint,this.envelope,this.envelope.envelope_document_id).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading PDF",e)}));break;case"download-certificate":h(this.endpoint,this.envelope,this.envelope.certificate_document_id).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading PDF",e)}));break;case"download-all":p(this.endpoint,[this.envelope]).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading Zip",e)}))}}render(){var e;if(!this.envelope)return o(s,null,o("img",{src:"https://verdocs-public-assets.s3.amazonaws.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}));const i=[{id:"print",label:"Print"}];var n;(function(e,i){return i.profile_id===(null==e?void 0:e.profile_id)})(this.endpoint.session,n=this.envelope)&&n.status!==a.COMPLETE&&n.status!==a.DECLINED&&n.status!==a.CANCELED&&i.push({id:"cancel",label:"Cancel"});const l=this.envelope.documents.length>0,d=!!this.envelope.certificate;return(l||d)&&(i.push({label:""}),l&&i.push({id:"download-attachments",label:"Download Documents(s)"}),d&&i.push({id:"download-certificate",label:"Download Certificate"}),l&&d&&i.push({id:"download-all",label:"Download All Files"})),o(s,null,o("div",{id:"verdocs-view-header"},o("div",{class:"inner"},o("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),o("div",{class:"title"},this.envelope.name),o("div",{style:{flex:"1"}}),o("div",{style:{marginLeft:"10px"}}),o("verdocs-dropdown",{options:i,onOptionSelected:e=>this.handleOptionSelected(e)}))),o("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},((null===(e=this.envelope)||void 0===e?void 0:e.documents)||[]).filter((e=>"certificate"!==e.type)).map((e=>{const i=c(1,e.page_numbers);return o(t,null,i.map((i=>o("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showCancelDone&&o("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:()=>{this.showCancelDone=!1}}),this.canceling&&o("div",{class:"loading-indicator"},o("verdocs-loader",null)))}get component(){return n(this)}};m.style='verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-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-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;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-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-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-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}';export{m as verdocs_view}
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(n.next(e))}catch(e){o(e)}}function l(e){try{a(n["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return a([e,t])}}function a(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];r=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fd374620.system.js","./p-3305a941.system.js","./p-05eb4fed.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(n.next(e))}catch(e){o(e)}}function l(e){try{a(n["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return a([e,t])}}function a(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];r=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fd374620.system.js","./p-3305a941.system.js","./p-05eb4fed.system.js","./p-a06e53f9.system.js","./p-bbee73c8.system.js","./p-d1c37175.system.js","./p-54498887.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,i,n,r,o,s,l,a;return{setters:[function(e){t=e.r;i=e.c;n=e.h;r=e.H;o=e.a},function(e){s=e.i},function(e){l=e.g},function(e){a=e.g},function(){},function(){},function(){},function(){},function(){}],execute:function(){var d='verdocs-field-textbox{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:150px;height:15px;display:block;font-size:11px;position:relative;letter-spacing:-0.2px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textbox.disabled{opacity:0.5}verdocs-field-textbox input{width:100%;height:100%;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textbox input.hide{display:none}verdocs-field-textbox.required{border:1px solid #cc0000}verdocs-field-textbox.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textbox .resizer{position:absolute;bottom:1px;right:1px;width:8px;height:8px;z-index:9999}verdocs-field-textbox .resizer:hover{cursor:nwse-resize}verdocs-field-textbox .resizer .resizer-inner{position:absolute;bottom:0}verdocs-field-textbox .resizer .resizer-inner:before{position:absolute;top:-4px;left:-0.5px;content:"";display:block;width:10px;height:1px;background-color:rgba(0, 0, 0, 0.32);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}verdocs-field-textbox .resizer .resizer-inner:after{position:absolute;top:-1.5px;left:4.5px;content:"";display:block;width:5px;height:1px;background-color:rgba(0, 0, 0, 0.32);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}verdocs-field-textbox verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textbox verdocs-button-panel[data-active],verdocs-field-textbox verdocs-button-panel:hover{opacity:1}verdocs-field-textbox verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textbox verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-textbox [data-lastpass-icon-root]{display:none !important}';var c='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';var u=e("verdocs_field_textbox",function(){function e(e){t(this,e);this.settingsChanged=i(this,"settingsChanged",7);this.deleted=i(this,"deleted",7);this.templateid="";this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.rerender=0}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.inputEl.focus();return[2]}))}))};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.componentDidRender=function(){s.dynamicDrop(true);if(this.editable){s(this.resizeHandle).resizable({listeners:{start:function(e){console.log("[TEXTBOX] Resize started",e.type,e.target)},move:this.handleResize.bind(this),end:function(e){console.log("[TEXTBOX] Resize end",e)}}})}};e.prototype.handleResize=function(e){console.log("[TEXTBOX] Resize",e.delta);var t=+(e.target.getAttribute("resizeX")||0);var i=+(e.target.getAttribute("resizeY")||0);var n=e.dx+t;var r=e.dy+i;this.el.style.width="".concat(parseFloat(this.el.style.width||"0")+e.dx,"px");e.target.setAttribute("resizeX",n);e.target.setAttribute("resizeY",r)};e.prototype.render=function(){var e=this;var t,i,o,s;var d=a(this.field);var u=(i=(t=this.disabled)!==null&&t!==void 0?t:d.disabled)!==null&&i!==void 0?i:false;var f=this.field["rgba"]||l(this.roleindex);var p=(d===null||d===void 0?void 0:d.result)||"";var h=d.width||150;var b=h/5;if(this.done){return n(r,{class:{done:this.done}},p)}return n(r,{class:{required:(o=this.field)===null||o===void 0?void 0:o.required,disabled:u,done:this.done},style:{backgroundColor:f}},n("input",{type:"text",name:this.field.name,placeholder:d===null||d===void 0?void 0:d.placeholder,tabIndex:d===null||d===void 0?void 0:d.order,value:p,disabled:u,required:(s=this.field)===null||s===void 0?void 0:s.required,ref:function(t){return e.inputEl=t},maxlength:b}),this.editable&&n("div",{class:"resizer",ref:function(t){return e.resizeHandle=t}},n("div",{class:"resizer-inner"})),this.editable&&n("verdocs-button-panel",{icon:c,id:"verdocs-settings-panel-".concat(this.field.name)},n("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var i;(i=e.settingsChanged)===null||i===void 0?void 0:i.emit(t.detail);return e.hideSettingsPanel()},helpText:'Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the "name" field.<br /><br />If marked required, the participant must complete the field before proceeding.'})))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());u.style=d}}}));
|