@verdocs/web-sdk 2.3.11 → 2.3.13
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/{EnvelopeStore-f8c301e1.js → EnvelopeStore-efc35530.js} +1 -1
- package/dist/cjs/{Envelopes-99ca79fe.js → Envelopes-0b9deb2c.js} +2 -6
- package/dist/cjs/TemplateFieldStore-7449e5ff.js +24 -0
- package/dist/cjs/{TemplateStore-192c6cf1.js → TemplateStore-0074c71d.js} +3 -1
- package/dist/cjs/{VerdocsEndpoint-33b643eb.js → VerdocsEndpoint-8f298664.js} +1 -186
- package/dist/cjs/ipc-test.cjs.entry.js +3 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-a3f0b70a.js → utils-0916d10f.js} +1 -1
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +61 -44
- package/dist/cjs/verdocs-contact-picker_3.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-attachment.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +13 -4
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +5 -4
- package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +44 -40
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +27 -1
- package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +61 -44
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +40 -36
- package/dist/collection/utils/TemplateFieldStore.js +18 -0
- package/dist/collection/utils/TemplateStore.js +2 -0
- package/dist/components/Envelopes.js +2 -6
- package/dist/components/TemplateStore.js +20 -1
- package/dist/components/VerdocsEndpoint.js +1 -186
- package/dist/components/verdocs-field-textbox.js +10 -1
- package/dist/components/verdocs-preview2.js +1 -1
- package/dist/components/verdocs-template-field-properties2.js +61 -45
- package/dist/components/verdocs-template-fields2.js +40 -37
- package/dist/custom-elements.json +4 -0
- package/dist/docs.json +18 -1
- package/dist/esm/{EnvelopeStore-15cc99ef.js → EnvelopeStore-17c0bc52.js} +1 -1
- package/dist/esm/{Envelopes-21ffb899.js → Envelopes-627c5239.js} +2 -6
- package/dist/esm/TemplateFieldStore-4f1b6332.js +21 -0
- package/dist/esm/{TemplateStore-7149eda0.js → TemplateStore-a2ebdaca.js} +3 -1
- package/dist/esm/{VerdocsEndpoint-7922d31f.js → VerdocsEndpoint-56fa3371.js} +1 -186
- package/dist/esm/ipc-test.entry.js +3 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-e0ce2c22.js → utils-ca3121df.js} +1 -1
- package/dist/esm/verdocs-activity-box.entry.js +2 -2
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +3 -2
- package/dist/esm/verdocs-button-panel_2.entry.js +61 -44
- package/dist/esm/verdocs-contact-picker_3.entry.js +3 -3
- package/dist/esm/verdocs-envelope-document-page.entry.js +3 -3
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +3 -3
- package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -3
- package/dist/esm/verdocs-envelopes-list.entry.js +3 -3
- package/dist/esm/verdocs-field-attachment.entry.js +2 -2
- package/dist/esm/verdocs-field-checkbox.entry.js +2 -2
- package/dist/esm/verdocs-field-date.entry.js +2 -2
- package/dist/esm/verdocs-field-dropdown.entry.js +2 -2
- package/dist/esm/verdocs-field-initial.entry.js +2 -2
- package/dist/esm/verdocs-field-payment.entry.js +2 -2
- package/dist/esm/verdocs-field-radio-button.entry.js +2 -2
- package/dist/esm/verdocs-field-signature.entry.js +2 -2
- package/dist/esm/verdocs-field-textarea.entry.js +3 -3
- package/dist/esm/verdocs-field-textbox.entry.js +13 -4
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -2
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +2 -2
- package/dist/esm/verdocs-preview_8.entry.js +5 -4
- package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +3 -3
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +3 -3
- package/dist/esm/verdocs-template-document-page_2.entry.js +3 -3
- package/dist/esm/verdocs-template-fields_4.entry.js +44 -40
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +3 -3
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{EnvelopeStore-15cc99ef.js → EnvelopeStore-17c0bc52.js} +1 -1
- package/dist/esm-es5/Envelopes-627c5239.js +1 -0
- package/dist/esm-es5/TemplateFieldStore-4f1b6332.js +1 -0
- package/dist/esm-es5/TemplateStore-a2ebdaca.js +1 -0
- package/dist/esm-es5/VerdocsEndpoint-56fa3371.js +1 -0
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-e0ce2c22.js → utils-ca3121df.js} +2 -2
- package/dist/esm-es5/verdocs-activity-box.entry.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_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment.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-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.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/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +7 -0
- package/dist/types/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.d.ts +7 -5
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +4 -2
- package/dist/types/components.d.ts +8 -0
- package/dist/types/utils/TemplateFieldStore.d.ts +6 -0
- package/dist/types/utils/TemplateStore.d.ts +1 -1
- package/dist/verdocs-web-sdk/{p-ee159b14.js → p-02a71e03.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f49cb84b.entry.js → p-035a3ce2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-035f6b38.js +1 -0
- package/dist/verdocs-web-sdk/{p-8f8504e2.entry.js → p-05e6bc91.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0419a39f.system.entry.js → p-0685d939.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-084c23e4.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-0c157d55.system.entry.js → p-0abf0058.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-12d00a0f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9dcb8b6c.system.entry.js → p-17598002.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3f837e30.system.entry.js → p-17bf98f2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3f5fb65b.entry.js → p-1a7aa04b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7144ab8e.system.entry.js → p-1cb878c8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6d70fc87.system.entry.js → p-1e38b22f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ebc4142c.js → p-1f78be32.js} +1 -1
- package/dist/verdocs-web-sdk/{p-992f92f4.entry.js → p-22e0d2bc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-73b9ef06.entry.js → p-2ccbf54d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-319c00bd.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-32c40388.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-358aef29.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-1eb38c2e.entry.js → p-37dfdc84.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-3cd0d440.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9b66a84a.system.entry.js → p-3f3807b0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1efd342e.entry.js → p-410c63e6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-429cad70.js +1 -0
- package/dist/verdocs-web-sdk/{p-7b3fed68.entry.js → p-46624bec.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a59064f7.system.entry.js → p-4d98f194.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-120f75b1.entry.js → p-4e47ed1c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4e74bb3c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-588d6cea.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5f736f85.system.entry.js → p-59769c39.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-39f3f620.system.entry.js → p-5aa77f6d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5bf12ef8.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-083bdbc6.entry.js → p-6331d113.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2c47b92e.entry.js → p-637187de.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4a1bc6e3.system.entry.js → p-6685ff29.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1a3168af.system.entry.js → p-6dd69d82.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-72978ba3.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-90d54d8a.system.entry.js → p-736fbb87.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fdf0a9de.entry.js → p-76f8c30a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-59c44eee.system.entry.js → p-7b30c523.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ce00ee85.entry.js → p-82d4afbf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b0bf091c.system.js → p-840827b7.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0d4739c4.system.entry.js → p-870707e8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8aae8d16.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-8e0d6152.system.entry.js → p-8af68516.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7be5cb8c.entry.js → p-8b0a5309.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8dc15d33.js +1 -0
- package/dist/verdocs-web-sdk/{p-16849f44.system.entry.js → p-9360b085.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e6b68ad5.entry.js → p-94009f45.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7e8d64fb.system.js → p-9615b087.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-9bf2d124.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-345f88a3.system.entry.js → p-9ceff040.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6a13105b.entry.js → p-9fc06f7b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2ec8a9be.entry.js → p-a40b3946.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a627881e.system.js +1 -0
- package/dist/verdocs-web-sdk/p-aae6b4e0.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-026eb575.system.entry.js → p-ac98f6f1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-38679b8e.system.entry.js → p-acc873cf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7cbe51d8.system.entry.js → p-b6231fd3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-06fb711b.system.entry.js → p-b648ab63.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c58916d2.system.entry.js → p-b7a815e9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6827df7b.entry.js → p-b91de346.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-da1c0295.system.entry.js → p-ba653c39.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-bd9ba3b3.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-f3a1060a.entry.js → p-c80237f9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-599fa850.entry.js → p-cf703fe4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-974b4c02.entry.js → p-d0a09719.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d2cee107.system.entry.js → p-d39e4a26.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ed639a7c.entry.js → p-d59b6988.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dd277e69.entry.js → p-d61fda4b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-393a9a2a.system.entry.js → p-d99a05e4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-dc2ad047.js +1 -0
- package/dist/verdocs-web-sdk/{p-686139a0.entry.js → p-dd2c2edc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-47460aa0.entry.js → p-e1bc55f8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-32b26f8f.system.entry.js → p-e28878eb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e3ffc00f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-fa1621c8.system.entry.js → p-e4dc3264.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9aff3ff0.entry.js → p-eeca4c30.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-a7134b10.entry.js → p-f42c84f1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f83a0c6e.system.entry.js → p-f6b7439f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/esm-es5/Envelopes-21ffb899.js +0 -1
- package/dist/esm-es5/TemplateStore-7149eda0.js +0 -1
- package/dist/esm-es5/VerdocsEndpoint-7922d31f.js +0 -1
- package/dist/verdocs-web-sdk/p-0549358c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-05b3034f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-14b08edd.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-19ff8f86.system.js +0 -1
- package/dist/verdocs-web-sdk/p-1fdb236c.system.js +0 -1
- package/dist/verdocs-web-sdk/p-2ccbcfeb.system.js +0 -1
- package/dist/verdocs-web-sdk/p-2fe75327.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3019b350.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-401a49cb.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4a3238f6.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5a91bf23.js +0 -1
- package/dist/verdocs-web-sdk/p-5aee3e25.js +0 -1
- package/dist/verdocs-web-sdk/p-5f434764.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6b1735f4.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9c2bec77.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b101fae2.js +0 -1
- package/dist/verdocs-web-sdk/p-d7dbeec3.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ecb7ea02.entry.js +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __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,a: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={}));var n;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(n||(n={}));var i=e("c",(function(e,t,r){var i,a;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var s=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var u=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!s){return{canPerform:false,message:"Active session required"}}var c=(r===null||r===void 0?void 0:r.profile_id)===s;var f=(r===null||r===void 0?void 0:r.organization_id)===u;var l=(i=r===null||r===void 0?void 0:r.is_personal)!==null&&i!==void 0?i:false;var p=(a=r===null||r===void 0?void 0:r.is_public)!==null&&a!==void 0?a:false;var d=[];switch(t){case"create_personal":d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":d.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!c){if(!l&&f||!p){d.push(n.TEMPLATE_MEMBER_READ)}}break;case"write":if(!c){d.push(n.TEMPLATE_MEMBER_READ);d.push(n.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_ORG)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);d.push(n.TEMPLATE_CREATOR_VISIBILITY)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(c){d.push(n.TEMPLATE_CREATOR_DELETE)}else{d.push(n.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(o(e,d)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(d.toString())}}));var o=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var a=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var s=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var u=e("g",(function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))}));var c=["name","is_personal","is_public","sender","description","roles","fields"];var f=e("b",(function(e,t,r){var n={timeout:12e4,onUploadProgress:function(e){var t=e.total||1;var n=e.loaded||0;r===null||r===void 0?void 0:r(Math.floor(n*100/(t||1)),n,t||1)}};if(t.documents&&t.documents[0]instanceof File){var i=new FormData;c.forEach((function(e){if(t[e]!==undefined){i.append(e,t[e])}}));t.documents.forEach((function(e){i.append("documents",e,e.name)}));return e.api.post("/v2/templates",i,n).then((function(e){return e.data}))}else{return e.api.post("/v2/templates",t,n).then((function(e){return e.data}))}}));var l=e("u",(function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))}));var p=e("d",(function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))}));var d;(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"})(d||(d={}));var h=e("l",(function(e,t){if(t===void 0){t={}}return a(void 0,void 0,void 0,(function(){return s(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))}));var v;(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"})(v||(v=e("T",{})));var E;(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"})(E||(E=e("a",{})));var m;(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"})(m||(m={}));var y;(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"})(y||(y={}));var g;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(g||(g={}));var _;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(_||(_={}));function b(e,t){return function r(){return e.apply(t,arguments)}}var R=Object.prototype.toString;var T=Object.getPrototypeOf;var A=function(e){return function(t){var r=R.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var O=function(e){e=e.toLowerCase();return function(t){return A(t)===e}};var w=function(e){return function(t){return typeof t===e}};var S=Array.isArray;var L=w("undefined");function C(e){return e!==null&&!L(e)&&e.constructor!==null&&!L(e.constructor)&&M(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var P=O("ArrayBuffer");function N(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&P(e.buffer)}return t}var I=w("string");var M=w("function");var B=w("number");var D=function(e){return e!==null&&typeof e==="object"};var j=function(e){return e===true||e===false};var U=function(e){if(A(e)!=="object"){return false}var t=T(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var x=O("Date");var F=O("File");var k=O("Blob");var q=O("FileList");var z=function(e){return D(e)&&M(e.pipe)};var V=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||M(e.append)&&((t=A(e))==="formdata"||t==="object"&&M(e.toString)&&e.toString()==="[object FormData]"))};var G=O("URLSearchParams");var H=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function J(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(S(e)){for(a=0,s=e.length;a<s;a++){t.call(null,e[a],a,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var c=u.length;var f=void 0;for(a=0;a<c;a++){f=u[a];t.call(null,e[f],f,e)}}}function W(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 K=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var Y=function(e){return!L(e)&&e!==K};function X(){var e=(Y(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&W(t,n)||n;if(U(t[i])&&U(r)){t[i]=X(t[i],r)}else if(U(r)){t[i]=X({},r)}else if(S(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&J(arguments[n],r)}return t}var Z=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;J(t,(function(t,n){if(r&&M(t)){e[n]=b(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var $=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var Q=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 ee=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&&T(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var te=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 re=function(e){if(!e)return null;if(S(e))return e;var t=e.length;if(!B(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var ne=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&T(Uint8Array));var ie=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 oe=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var ae=O("HTMLFormElement");var se=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var ue=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var ce=O("RegExp");var fe=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};J(r,(function(r,i){var o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};var le=function(e){fe(e,(function(t,r){if(M(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!M(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 pe=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};S(e)?n(e):n(String(e).split(t));return r};var de=function(){};var he=function(e,t){e=+e;return Number.isFinite(e)?e:t};var ve="abcdefghijklmnopqrstuvwxyz";var Ee="0123456789";var me={DIGIT:Ee,ALPHA:ve,ALPHA_DIGIT:ve+ve.toUpperCase()+Ee};var ye=function(e,t){if(e===void 0){e=16}if(t===void 0){t=me.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function ge(e){return!!(e&&M(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var _e=function(e){var t=new Array(10);var r=function(e,n){if(D(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=S(e)?[]:{};J(e,(function(e,t){var o=r(e,n+1);!L(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var be=O("AsyncFunction");var Re=function(e){return e&&(D(e)||M(e))&&M(e.then)&&M(e.catch)};var Te={isArray:S,isArrayBuffer:P,isBuffer:C,isFormData:V,isArrayBufferView:N,isString:I,isNumber:B,isBoolean:j,isObject:D,isPlainObject:U,isUndefined:L,isDate:x,isFile:F,isBlob:k,isRegExp:ce,isFunction:M,isStream:z,isURLSearchParams:G,isTypedArray:ne,isFileList:q,forEach:J,merge:X,extend:Z,trim:H,stripBOM:$,inherits:Q,toFlatObject:ee,kindOf:A,kindOfTest:O,endsWith:te,toArray:re,forEachEntry:ie,matchAll:oe,isHTMLForm:ae,hasOwnProperty:ue,hasOwnProp:ue,reduceDescriptors:fe,freezeMethods:le,toObjectSet:pe,toCamelCase:se,noop:de,toFiniteNumber:he,findKey:W,global:K,isContextDefined:Y,ALPHABET:me,generateString:ye,isSpecCompliantForm:ge,toJSONObject:_e,isAsyncFn:be,isThenable:Re};function Ae(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)}Te.inherits(Ae,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:Te.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Oe=Ae.prototype;var we={};["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){we[e]={value:e}}));Object.defineProperties(Ae,we);Object.defineProperty(Oe,"isAxiosError",{value:true});Ae.from=function(e,t,r,n,i,o){var a=Object.create(Oe);Te.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));Ae.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var Se=null;function Le(e){return Te.isPlainObject(e)||Te.isArray(e)}function Ce(e){return Te.endsWith(e,"[]")?e.slice(0,-2):e}function Pe(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=Ce(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Ne(e){return Te.isArray(e)&&!e.some(Le)}var Ie=Te.toFlatObject(Te,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function Me(e,t,r){if(!Te.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=Te.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!Te.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||f;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&Te.isSpecCompliantForm(t);if(!Te.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(Te.isDate(e)){return e.toISOString()}if(!u&&Te.isBlob(e)){throw new Ae("Blob is not supported. Use a Buffer instead.")}if(Te.isArrayBuffer(e)||Te.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function f(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(Te.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(Te.isArray(e)&&Ne(e)||(Te.isFileList(e)||Te.endsWith(r,"[]"))&&(s=Te.toArray(e))){r=Ce(r);s.forEach((function e(n,i){!(Te.isUndefined(n)||n===null)&&t.append(a===true?Pe([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(Le(e)){return true}t.append(Pe(i,r,o),c(e));return false}var l=[];var p=Object.assign(Ie,{defaultVisitor:f,convertValue:c,isVisitable:Le});function d(e,r){if(Te.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);Te.forEach(e,(function e(n,o){var a=!(Te.isUndefined(n)||n===null)&&i.call(t,n,Te.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!Te.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function Be(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 De(e,t){this._pairs=[];e&&Me(e,this,t)}var je=De.prototype;je.append=function e(t,r){this._pairs.push([t,r])};je.toString=function e(t){var r=t?function(e){return t.call(this,e,Be)}:Be;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function Ue(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xe(e,t,r){if(!t){return e}var n=r&&r.encode||Ue;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=Te.isURLSearchParams(t)?t.toString():new De(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 Fe=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){Te.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var ke={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var qe=typeof URLSearchParams!=="undefined"?URLSearchParams:De;var ze=typeof FormData!=="undefined"?FormData:null;var Ve=typeof Blob!=="undefined"?Blob:null;var Ge={isBrowser:true,classes:{URLSearchParams:qe,FormData:ze,Blob:Ve},protocols:["http","https","file","blob","url","data"]};var He=typeof window!=="undefined"&&typeof document!=="undefined";var Je=function(e){return He&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var We=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var Ke=Object.freeze({__proto__:null,hasBrowserEnv:He,hasStandardBrowserWebWorkerEnv:We,hasStandardBrowserEnv:Je});var Ye=__assign(__assign({},Ke),Ge);function Xe(e,t){return Me(e,new Ye.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(Ye.isNode&&Te.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function Ze(e){return Te.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function $e(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 Qe(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&Te.isArray(n)?n.length:o;if(s){if(Te.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!Te.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&Te.isArray(n[o])){n[o]=$e(n[o])}return!a}if(Te.isFormData(e)&&Te.isFunction(e.entries)){var r={};Te.forEachEntry(e,(function(e,n){t(Ze(e),n,r,0)}));return r}return null}function et(e,t,r){if(Te.isString(e)){try{(t||JSON.parse)(e);return Te.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var tt={transitional:ke,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=Te.isObject(t);if(o&&Te.isHTMLForm(t)){t=new FormData(t)}var a=Te.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(Qe(t)):t}if(Te.isArrayBuffer(t)||Te.isBuffer(t)||Te.isStream(t)||Te.isFile(t)||Te.isBlob(t)){return t}if(Te.isArrayBufferView(t)){return t.buffer}if(Te.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 Xe(t,this.formSerializer).toString()}if((s=Te.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return Me(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return et(t)}return t}],transformResponse:[function e(t){var r=this.transitional||tt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&Te.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 Ae.from(e,Ae.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:Ye.classes.FormData,Blob:Ye.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};Te.forEach(["delete","get","head","post","put","patch"],(function(e){tt.headers[e]={}}));var rt=Te.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 nt=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]&&rt[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 it=Symbol("internals");function ot(e){return e&&String(e).trim().toLowerCase()}function at(e){if(e===false||e==null){return e}return Te.isArray(e)?e.map(at):String(e)}function st(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var ut=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function ct(e,t,r,n,i){if(Te.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Te.isString(t))return;if(Te.isString(n)){return t.indexOf(n)!==-1}if(Te.isRegExp(n)){return n.test(t)}}function ft(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function lt(e,t){var r=Te.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 pt=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=ot(t);if(!i){throw new Error("header name must be a non-empty string")}var o=Te.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=at(e)}}var o=function(e,t){return Te.forEach(e,(function(e,r){return i(e,r,t)}))};if(Te.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(Te.isString(e)&&(e=e.trim())&&!ut(e)){o(nt(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=ot(e);if(e){var r=Te.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return st(n)}if(Te.isFunction(t)){return t.call(this,n,r)}if(Te.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=ot(e);if(e){var r=Te.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||ct(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=ot(e);if(e){var i=Te.findKey(r,e);if(i&&(!t||ct(r,r[i],i,t))){delete r[i];n=true}}}if(Te.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||ct(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};Te.forEach(this,(function(n,i){var o=Te.findKey(r,i);if(o){t[o]=at(n);delete t[i];return}var a=e?ft(i):String(i).trim();if(a!==i){delete t[i]}t[a]=at(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);Te.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&Te.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[it]=this[it]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=ot(e);if(!r[t]){lt(n,e);r[t]=true}}Te.isArray(e)?e.forEach(i):i(e);return this};return e}();pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Te.reduceDescriptors(pt.prototype,(function(e,t){var r=e.value;var n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}));Te.freezeMethods(pt);function dt(e,t){var r=this||tt;var n=t||r;var i=pt.from(n.headers);var o=n.data;Te.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function ht(e){return!!(e&&e.__CANCEL__)}function vt(e,t,r){Ae.call(this,e==null?"canceled":e,Ae.ERR_CANCELED,t,r);this.name="CanceledError"}Te.inherits(vt,Ae,{__CANCEL__:true});function Et(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new Ae("Request failed with status code "+r.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var mt=Ye.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];Te.isNumber(r)&&a.push("expires="+new Date(r).toGMTString());Te.isString(n)&&a.push("path="+n);Te.isString(i)&&a.push("domain="+i);o===true&&a.push("secure");document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function yt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gt(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function _t(e,t){if(e&&!yt(t)){return gt(e,t)}return t}var bt=Ye.hasStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=Te.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Rt(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Tt(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var a;t=t!==undefined?t:1e3;return function s(u){var c=Date.now();var f=n[o];if(!a){a=c}r[i]=u;n[i]=c;var l=o;var p=0;while(l!==i){p+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var d=f&&c-f;return d?Math.round(p*1e3/d):undefined}}function At(e,t){var r=0;var n=Tt(50,250);return function(i){var o=i.loaded;var a=i.lengthComputable?i.total:undefined;var s=o-r;var u=n(s);var c=o<=a;r=o;var f={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:i};f[t?"download":"upload"]=true;e(f)}}var Ot=typeof XMLHttpRequest!=="undefined";var wt=Ot&&function(e){return new Promise((function t(r,n){var i=e.data;var o=pt.from(e.headers).normalize();var a=e.responseType,s=e.withXSRFToken;var u;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var f;if(Te.isFormData(i)){if(Ye.hasStandardBrowserEnv||Ye.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((f=o.getContentType())!==false){var l=f?f.split(";").map((function(e){return e.trim()})).filter(Boolean):[],p=l[0],d=l.slice(1);o.setContentType(__spreadArray([p||"multipart/form-data"],d,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"";var E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(v+":"+E))}var m=_t(e.baseURL,e.url);h.open(e.method.toUpperCase(),xe(m,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function y(){if(!h){return}var t=pt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};Et((function e(t){r(t);c()}),(function e(t){n(t);c()}),o);h=null}if("onloadend"in h){h.onloadend=y}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(y)}}h.onabort=function t(){if(!h){return}n(new Ae("Request aborted",Ae.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new Ae("Network Error",Ae.ERR_NETWORK,e,h));h=null};h.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||ke;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new Ae(r,i.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,h));h=null};if(Ye.hasStandardBrowserEnv){s&&Te.isFunction(s)&&(s=s(e));if(s||s!==false&&bt(m)){var g=e.xsrfHeaderName&&e.xsrfCookieName&&mt.read(e.xsrfCookieName);if(g){o.set(e.xsrfHeaderName,g)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){Te.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!Te.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(a&&a!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",At(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",At(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new vt(null,e,h):t);h.abort();h=null};e.cancelToken&&e.cancelToken.subscribe(u);if(e.signal){e.signal.aborted?u():e.signal.addEventListener("abort",u)}}var _=Rt(m);if(_&&Ye.protocols.indexOf(_)===-1){n(new Ae("Unsupported protocol "+_+":",Ae.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var St={http:Se,xhr:wt};Te.forEach(St,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Lt=function(e){return"- ".concat(e)};var Ct=function(e){return Te.isFunction(e)||e===null||e===false};var Pt={getAdapter:function(e){e=Te.isArray(e)?e:[e];var t=e.length;var r;var n;var i={};for(var o=0;o<t;o++){r=e[o];var a=void 0;n=r;if(!Ct(r)){n=St[(a=String(r)).toLowerCase()];if(n===undefined){throw new Ae("Unknown adapter '".concat(a,"'"))}}if(n){break}i[a||"#"+o]=n}if(!n){var s=Object.entries(i).map((function(e){var t=e[0],r=e[1];return"adapter ".concat(t," ")+(r===false?"is not supported by the environment":"is not available in the build")}));var u=t?s.length>1?"since :\n"+s.map(Lt).join("\n"):" "+Lt(s[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n},adapters:St};function Nt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new vt(null,e)}}function It(e){Nt(e);e.headers=pt.from(e.headers);e.data=dt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=Pt.getAdapter(e.adapter||tt.adapter);return t(e).then((function t(r){Nt(e);r.data=dt.call(e,e.transformResponse,r);r.headers=pt.from(r.headers);return r}),(function t(r){if(!ht(r)){Nt(e);if(r&&r.response){r.response.data=dt.call(e,e.transformResponse,r.response);r.response.headers=pt.from(r.response.headers)}}return Promise.reject(r)}))}var Mt=function(e){return e instanceof pt?e.toJSON():e};function Bt(e,t){t=t||{};var r={};function n(e,t,r){if(Te.isPlainObject(e)&&Te.isPlainObject(t)){return Te.merge.call({caseless:r},e,t)}else if(Te.isPlainObject(t)){return Te.merge({},t)}else if(Te.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!Te.isUndefined(t)){return n(e,t,r)}else if(!Te.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!Te.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!Te.isUndefined(t)){return n(undefined,t)}else if(!Te.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i(Mt(e),Mt(t),true)}};Te.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);Te.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var Dt="1.6.2";var jt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){jt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var Ut={};jt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Dt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Ae(i(n," has been removed"+(r?" in "+r:"")),Ae.ERR_DEPRECATED)}if(r&&!Ut[n]){Ut[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 xt(e,t,r){if(typeof e!=="object"){throw new Ae("options must be an object",Ae.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 Ae("option "+o+" must be "+u,Ae.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Ae("Unknown option "+o,Ae.ERR_BAD_OPTION)}}}var Ft={assertOptions:xt,validators:jt};var kt=Ft.validators;var qt=function(){function e(e){this.defaults=e;this.interceptors={request:new Fe,response:new Fe}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Bt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){Ft.assertOptions(r,{silentJSONParsing:kt.transitional(kt.boolean),forcedJSONParsing:kt.transitional(kt.boolean),clarifyTimeoutError:kt.transitional(kt.boolean)},false)}if(n!=null){if(Te.isFunction(n)){t.paramsSerializer={serialize:n}}else{Ft.assertOptions(n,{encode:kt.function,serialize:kt.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=i&&Te.merge(i.common,i[t.method]);i&&Te.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=pt.concat(o,i);var a=[];var s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var c;var f=0;var l;if(!s){var p=[It.bind(this),undefined];p.unshift.apply(p,a);p.push.apply(p,u);l=p.length;c=Promise.resolve(t);while(f<l){c=c.then(p[f++],p[f++])}return c}l=a.length;var d=t;f=0;while(f<l){var h=a[f++];var v=a[f++];try{d=h(d)}catch(e){v.call(this,e);break}}try{c=It.call(this,d)}catch(e){return Promise.reject(e)}f=0;l=u.length;while(f<l){c=c.then(u[f++],u[f++])}return c};e.prototype.getUri=function(e){e=Bt(this.defaults,e);var t=_t(e.baseURL,e.url);return xe(t,e.params,e.paramsSerializer)};return e}();Te.forEach(["delete","get","head","options"],(function e(t){qt.prototype[t]=function(e,r){return this.request(Bt(r||{},{method:t,url:e,data:(r||{}).data}))}}));Te.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Bt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}qt.prototype[t]=r();qt.prototype[t+"Form"]=r(true)}));var zt=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 vt(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 Vt(e){return function t(r){return e.apply(null,r)}}function Gt(e){return Te.isObject(e)&&e.isAxiosError===true}var Ht={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(Ht).forEach((function(e){var t=e[0],r=e[1];Ht[r]=t}));function Jt(e){var t=new qt(e);var r=b(qt.prototype.request,t);Te.extend(r,qt.prototype,t,{allOwnKeys:true});Te.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return Jt(Bt(e,r))};return r}var Wt=Jt(tt);Wt.Axios=qt;Wt.CanceledError=vt;Wt.CancelToken=zt;Wt.isCancel=ht;Wt.VERSION=Dt;Wt.toFormData=Me;Wt.AxiosError=Ae;Wt.Cancel=Wt.CanceledError;Wt.all=function e(t){return Promise.all(t)};Wt.spread=Vt;Wt.isAxiosError=Gt;Wt.mergeConfig=Bt;Wt.AxiosHeaders=pt;Wt.formToJSON=function(e){return Qe(Te.isHTMLForm(e)?new FormData(e):e)};Wt.getAdapter=Pt.getAdapter;Wt.HttpStatusCode=Ht;Wt.default=Wt;var Kt=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var Yt=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 Kt()}try{if(!__global__)return Kt();return __global__}finally{delete Object.prototype.__global__}}();var Xt=Symbol.for("verdocs-default-endpoint");var Zt=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 $t=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL=window.location.origin==="https://beta.verdocs.com"?"https://stage-api.verdocs.com":"https://api.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||this.baseURL;this.timeout=(e===null||e===void 0?void 0:e.timeout)||this.timeout;this.environment=(e===null||e===void 0?void 0:e.environment)||this.environment;this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||this.sessionType;this.clientID=(e===null||e===void 0?void 0:e.clientID)||this.clientID;this.api=Wt.create({baseURL:this.baseURL,timeout:this.timeout})}e.prototype.setDefault=function(){Yt[Xt]=this};e.getDefault=function(){if(!Yt[Xt]){Yt[Xt]=new e;window.console.debug("[JS_SDK] Created default endpoint",Yt[Xt].baseURL)}return Yt[Xt]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.baseURL=e;this.api.defaults.baseURL=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(Zt)}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(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function r(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i["throw"](t))}catch(t){s(t)}}function c(t){t.done?n(t.value):o(t.value).then(r,a)}c((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return c([t,e])}}function c(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){n.label=r[1];break}if(r[0]===6&&n.label<s[1]){n.label=s[1];s=r;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(r);break}if(s[2])n.ops.pop();n.trys.pop();continue}r=e.call(t,n)}catch(t){r=[6,t];o=0}finally{i=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function r(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i["throw"](t))}catch(t){s(t)}}function c(t){t.done?n(t.value):o(t.value).then(r,a)}c((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return c([t,e])}}function c(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){n.label=r[1];break}if(r[0]===6&&n.label<s[1]){n.label=s[1];s=r;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(r);break}if(s[2])n.ops.pop();n.trys.pop();continue}r=e.call(t,n)}catch(t){r=[6,t];o=0}finally{i=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-9bf2d124.system.js","./p-187b20b7.system.js"],(function(t){"use strict";var e,n,i,o,s,r;return{setters:[function(t){e=t.r;n=t.c;i=t.h;o=t.H},function(){},function(t){s=t.V},function(t){r=t.S}],execute:function(){var a='verdocs-settings{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-settings .tabs{gap:4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #654dcb}verdocs-settings .tabs .tab{cursor:pointer;padding:5px 10px;color:#ffffff;background-color:#777777}verdocs-settings .tabs .tab.active{color:#ffffff;background-color:#654dcb}';var c=t("verdocs_settings",function(){function t(t){e(this,t);this.sdkError=n(this,"sdkError",7);this.endpoint=s.getDefault();this.tab="profile"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(i){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Unable to start session, must be authenticated");return[2]}}catch(i){console.log("[SETTINGS] Error with session",i);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new r(i.message,(e=i.response)===null||e===void 0?void 0:e.status,(n=i.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};t.prototype.render=function(){var t=this;console.log("sess",this.endpoint.session);if(!this.endpoint.session){return i(o,null,i("verdocs-loader",null))}return i(o,null,i("div",{class:"tabs"},i("div",{class:"tab ".concat(this.tab==="profile"?"active":""),onClick:function(){return t.tab="profile"}},"Profile"),i("div",{class:"tab ".concat(this.tab==="organization"?"active":""),onClick:function(){return t.tab="organization"}},"Organization"),i("div",{class:"tab ".concat(this.tab==="members"?"active":""),onClick:function(){return t.tab="members"}},"Members"),i("div",{class:"tab ".concat(this.tab==="apikeys"?"active":""),onClick:function(){return t.tab="apikeys"}},"API Keys")),this.tab==="profile"&&i("verdocs-settings-profile",{endpoint:this.endpoint}),this.tab==="organization"&&i("verdocs-settings-organization",{endpoint:this.endpoint}),this.tab==="members"&&i("verdocs-settings-members",{endpoint:this.endpoint}),this.tab==="apikeys"&&i("verdocs-settings-api-keys",{endpoint:this.endpoint}))};return t}());c.style=a}}}));
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as t,h as i}from"./p-14b44491.js";import{d as s}from"./p-05788c2b.js";import{V as l}from"./p-b101fae2.js";import{c as o}from"./p-3e607686.js";import{V as a}from"./p-ed416acf.js";import{S as n}from"./p-7a1b2643.js";const r=[{value:"",label:""},{value:"Accounting & Tax",label:"Accounting & Tax"},{value:"Business Services / Consulting",label:"Business Services / Consulting"},{value:"Construction",label:"Construction"},{value:"Education",label:"Education"},{value:"Financial Services",label:"Financial Services"},{value:"Government",label:"Government"},{value:"Healthcare - Health Plans & Payers",label:"Healthcare - Health Plans & Payers"},{value:"Healthcare - Providers",label:"Healthcare - Providers"},{value:"Insurance",label:"Insurance"},{value:"Legal",label:"Legal"},{value:"Life Sciences",label:"Life Sciences"},{value:"Manufacturing",label:"Manufacturing"},{value:"Mortgage",label:"Mortgage"},{value:"Not For Profit",label:"Not For Profit"},{value:"Real Estate - Commercial",label:"Real Estate - Commercial"},{value:"Real Estate - Residential",label:"Real Estate - Residential"},{value:"Retail",label:"Retail"},{value:"Technology",label:"Technology"},{value:"Other",label:"Other"}],u=[{value:"",label:""},{value:"I want to send a document for signature.",label:"I want to send a document for signature."},{value:"I just need to sign a document today.",label:"I just need to sign a document today."},{value:"I'm evaluating it for my business.",label:"I'm evaluating it for my business."},{value:"I'm evaluating it for my personal use.",label:"I'm evaluating it for my personal use."},{value:"I'm a developer building an integration.",label:"I'm a developer building an integration."}],d=[{value:"",label:""},{value:"Solo",label:"Solo"},{value:"2-10",label:"2-10"},{value:"11-50",label:"11-50"},{value:"51-200",label:"51-200"},{value:"201-500",label:"201-500"},{value:"501-1000",label:"501-1000"},{value:"1000+",label:"1000+"}],h=class{constructor(i){e(this,i),this.authenticated=t(this,"authenticated",7),this.sdkError=t(this,"sdkError",7),this.recheckTimer=null,this.resendDisabledTimer=null,this.accessTokenForVerification=null,this.endpoint=l.getDefault(),this.visible=!0,this.logo="https://app.verdocs.com/assets/blue-logo.svg",this.isAuthenticated=!1,this.displayMode="login",this.orgname="",this.first="",this.last="",this.username="",this.phone="",this.password="",this.submitting=!1,this.activeSession=null,this.accountType="org",this.howHear="",this.industry="",this.companySize="",this.reason="",this.signupStep=1,this.resendDisabled=!1,this.checkingOrg=!1}componentWillLoad(){var e,t;this.endpoint.loadSession(),this.endpoint.session?(console.log("[AUTH] Authenticated"),this.isAuthenticated=!0,this.activeSession=this.endpoint.session,null===(e=this.authenticated)||void 0===e||e.emit({authenticated:!0,session:this.endpoint.session})):(console.log("[AUTH] Anonymous"),null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null}))}disconnectedCallback(){this.cancelRecheckTimer()}cancelRecheckTimer(){if(this.recheckTimer){try{clearTimeout(this.recheckTimer)}catch(e){}this.recheckTimer=null}if(this.resendDisabledTimer){try{clearTimeout(this.resendDisabledTimer)}catch(e){}this.resendDisabledTimer=null}}handleSignup(){this.submitting=!0,this.accessTokenForVerification=null,o(this.endpoint,{email:this.username,password:this.password,firstName:this.first,lastName:this.last,orgName:this.orgname}).then((e=>{console.log("Result",e),console.log("[AUTH] Created profile",e.profile),console.log("[AUTH] Created organization",e.organization),this.loginAndCheckVerification()})).catch((e=>{var t,i,s,l,o;console.log("[AUTH] Signup error",e.response,JSON.stringify(e)),this.submitting=!1,this.activeSession=null,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null}),null===(i=this.sdkError)||void 0===i||i.emit(new n(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(l=e.response)||void 0===l?void 0:l.data)),a("Signup failed: "+(null===(o=e.response)||void 0===o?void 0:o.data),{style:"error"})}))}loginAndCheckVerification(){var e,t;this.submitting=!0,this.accessTokenForVerification=null,(e=this.endpoint,t={username:this.username,password:this.password},e.api.post("/authentication/login",t).then((function(e){return e.data}))).then((e=>{var t;this.cancelRecheckTimer(),this.submitting=!1;const i=s(e.accessToken);console.log("[AUTH] Got access token body",i),(null==i?void 0:i.email_verified)?(console.log("[AUTH] Email address is verified, completing login"),this.displayMode="login",this.accessTokenForVerification=null,this.endpoint.setToken(e.accessToken),this.activeSession=this.endpoint.session,this.isAuthenticated=!0,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!0,session:this.endpoint.session})):(console.log("[AUTH] Logged in, pending email address verification"),this.displayMode="verify",this.accessTokenForVerification=e.accessToken,this.recheckTimer=setTimeout((()=>this.loginAndCheckVerification()),5e3))})).catch((e=>{var t,i,s,l;this.cancelRecheckTimer(),console.log("[AUTH] Authentication error",e.response,JSON.stringify(e)),this.displayMode="login",this.submitting=!1,this.activeSession=null,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null}),null===(i=this.sdkError)||void 0===i||i.emit(new n(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(l=e.response)||void 0===l?void 0:l.data)),a("Login failed. Please check your username and password and try again.",{style:"error"})}))}handleLogout(){var e;this.endpoint.clearSession(),this.isAuthenticated=!1,this.accessTokenForVerification=null,null===(e=this.authenticated)||void 0===e||e.emit({authenticated:!1,session:null})}handleResend(){var e,t;this.resendDisabled=!0,this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=!1,this.resendDisabledTimer=null}),3e4),(e=this.endpoint,t=this.accessTokenForVerification,e.api.post("/user/email_verification",{},t?{headers:{Authorization:"Bearer ".concat(t)}}:{}).then((function(e){return e.data}))).then((e=>{console.log("[AUTH] Verification request resent",e),a("Please check your email for a message with verification instructions.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend verification",e)}))}handleReset(){var e,t;this.submitting=!0,(e=this.endpoint,t={email:this.username},e.api.post("/user/reset_password",t).then((function(e){return e.data}))).then((e=>{console.log("[AUTH] Reset sent",e),this.submitting=!1,this.displayMode="login",a("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to reset password",e),this.submitting=!1}))}render(){if(!this.visible)return i("div",{style:{display:"none"}},"Authenticated");if(this.isAuthenticated)return i("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:()=>this.handleLogout(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}});if("signup"===this.displayMode){const e=this.submitting||!this.first||!this.last||!this.username||!this.password||!this.orgname;return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Sign up for a trial account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.submitting})),1===this.signupStep&&i("form",{onSubmit:()=>this.handleSignup()},i("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},i("verdocs-text-input",{label:"First Name",autocomplete:"first",required:!0,value:this.first,onInput:e=>this.first=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:!0,value:this.last,onInput:e=>this.last=e.target.value,disabled:this.submitting})),i("verdocs-text-input",{label:"Email",autocomplete:"email",required:!0,value:this.username,onInput:e=>this.username=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Phone #",autocomplete:"phone",value:this.phone,onInput:e=>this.phone=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",required:!0,autocomplete:"current-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:!0,value:this.orgname,onInput:e=>this.orgname=e.target.value,disabled:this.submitting,style:{flex:"1"}}),i("div",{style:{marginTop:"30px"}}),i("verdocs-button",{label:"Next",disabled:e,onClick:()=>this.signupStep=2,style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),2===this.signupStep&&i("form",{onSubmit:()=>this.handleSignup()},i("verdocs-text-input",{label:"How did you hear about Verdocs?",value:this.howHear,onInput:e=>this.howHear=e.target.value,disabled:this.submitting}),i("verdocs-select-input",{label:"Your Industry",options:r,value:this.industry,onInput:e=>this.industry=e.target.value,disabled:this.submitting}),i("verdocs-select-input",{label:"Company Size",options:d,value:this.companySize,onInput:e=>this.companySize=e.target.value,disabled:this.submitting}),i("verdocs-select-input",{label:"Purpose",options:u,value:this.reason,onInput:e=>this.reason=e.target.value,disabled:this.submitting}),i("div",{style:{marginTop:"30px"}}),i("verdocs-button",{label:"Create Account",disabled:this.submitting,onClick:()=>this.handleSignup(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),3===this.signupStep&&i("form",{onSubmit:()=>this.handleSignup()},i("p",null,"Please check your e-mail inbox for a verification code and follow the instructions provided."),i("p",null,i("em",null,"Verification messages may take up to 1 hour to arrive. If you do not receive the invitation, ",i("a",{href:"#"},"Click Here")," to resend it. Be sure to check your spam folder.")),i("div",{style:{display:"flex",flexDirection:"row",gap:"20px"}},i("verdocs-button",{label:"Back",disabled:this.submitting,onClick:()=>{this.signupStep=2},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}),i("verdocs-button",{label:"Go to Dashboard",disabled:!0,onClick:()=>this.handleSignup(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}))))}return"forgot"===this.displayMode?i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Forgot your password?"),i("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox."),i("p",null,i("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),i("form",{onSubmit:()=>this.handleSignup()},i("verdocs-text-input",{label:"Email",autocomplete:"email",required:!0,value:this.username,onInput:e=>this.username=e.target.value,disabled:this.submitting}),i("div",{style:{marginTop:"30px"}}),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),i("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:()=>this.handleReset()})))):"verify"===this.displayMode?i("div",{class:"form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Please Verify your Email Address"),i("p",null,"Check your e-mail inbox for a verification email, and follow the instructions provided."),i("p",null,i("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),i("div",{class:"buttons"},i("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:()=>{this.username="",this.password="",this.cancelRecheckTimer(),this.displayMode="login"}}),i("verdocs-button",{label:"Resend Email",disabled:this.resendDisabled,onClick:()=>this.handleResend()}))):i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>{this.displayMode="signup",this.signupStep=1},disabled:this.submitting})),i("form",{onSubmit:()=>this.loginAndCheckVerification()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:e=>this.username=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="forgot",disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.submitting,onClick:()=>this.loginAndCheckVerification(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))}};h.style='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth h4 verdocs-button button.normal .button-label{padding:0}verdocs-auth .buttons{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}';export{h as verdocs_auth}
|
1
|
+
import{r as e,c as t,h as i}from"./p-14b44491.js";import{d as s}from"./p-05788c2b.js";import{V as l}from"./p-035f6b38.js";import{c as o}from"./p-3e607686.js";import{V as a}from"./p-ed416acf.js";import{S as n}from"./p-7a1b2643.js";const r=[{value:"",label:""},{value:"Accounting & Tax",label:"Accounting & Tax"},{value:"Business Services / Consulting",label:"Business Services / Consulting"},{value:"Construction",label:"Construction"},{value:"Education",label:"Education"},{value:"Financial Services",label:"Financial Services"},{value:"Government",label:"Government"},{value:"Healthcare - Health Plans & Payers",label:"Healthcare - Health Plans & Payers"},{value:"Healthcare - Providers",label:"Healthcare - Providers"},{value:"Insurance",label:"Insurance"},{value:"Legal",label:"Legal"},{value:"Life Sciences",label:"Life Sciences"},{value:"Manufacturing",label:"Manufacturing"},{value:"Mortgage",label:"Mortgage"},{value:"Not For Profit",label:"Not For Profit"},{value:"Real Estate - Commercial",label:"Real Estate - Commercial"},{value:"Real Estate - Residential",label:"Real Estate - Residential"},{value:"Retail",label:"Retail"},{value:"Technology",label:"Technology"},{value:"Other",label:"Other"}],u=[{value:"",label:""},{value:"I want to send a document for signature.",label:"I want to send a document for signature."},{value:"I just need to sign a document today.",label:"I just need to sign a document today."},{value:"I'm evaluating it for my business.",label:"I'm evaluating it for my business."},{value:"I'm evaluating it for my personal use.",label:"I'm evaluating it for my personal use."},{value:"I'm a developer building an integration.",label:"I'm a developer building an integration."}],d=[{value:"",label:""},{value:"Solo",label:"Solo"},{value:"2-10",label:"2-10"},{value:"11-50",label:"11-50"},{value:"51-200",label:"51-200"},{value:"201-500",label:"201-500"},{value:"501-1000",label:"501-1000"},{value:"1000+",label:"1000+"}],h=class{constructor(i){e(this,i),this.authenticated=t(this,"authenticated",7),this.sdkError=t(this,"sdkError",7),this.recheckTimer=null,this.resendDisabledTimer=null,this.accessTokenForVerification=null,this.endpoint=l.getDefault(),this.visible=!0,this.logo="https://app.verdocs.com/assets/blue-logo.svg",this.isAuthenticated=!1,this.displayMode="login",this.orgname="",this.first="",this.last="",this.username="",this.phone="",this.password="",this.submitting=!1,this.activeSession=null,this.accountType="org",this.howHear="",this.industry="",this.companySize="",this.reason="",this.signupStep=1,this.resendDisabled=!1,this.checkingOrg=!1}componentWillLoad(){var e,t;this.endpoint.loadSession(),this.endpoint.session?(console.log("[AUTH] Authenticated"),this.isAuthenticated=!0,this.activeSession=this.endpoint.session,null===(e=this.authenticated)||void 0===e||e.emit({authenticated:!0,session:this.endpoint.session})):(console.log("[AUTH] Anonymous"),null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null}))}disconnectedCallback(){this.cancelRecheckTimer()}cancelRecheckTimer(){if(this.recheckTimer){try{clearTimeout(this.recheckTimer)}catch(e){}this.recheckTimer=null}if(this.resendDisabledTimer){try{clearTimeout(this.resendDisabledTimer)}catch(e){}this.resendDisabledTimer=null}}handleSignup(){this.submitting=!0,this.accessTokenForVerification=null,o(this.endpoint,{email:this.username,password:this.password,firstName:this.first,lastName:this.last,orgName:this.orgname}).then((e=>{console.log("Result",e),console.log("[AUTH] Created profile",e.profile),console.log("[AUTH] Created organization",e.organization),this.loginAndCheckVerification()})).catch((e=>{var t,i,s,l,o;console.log("[AUTH] Signup error",e.response,JSON.stringify(e)),this.submitting=!1,this.activeSession=null,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null}),null===(i=this.sdkError)||void 0===i||i.emit(new n(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(l=e.response)||void 0===l?void 0:l.data)),a("Signup failed: "+(null===(o=e.response)||void 0===o?void 0:o.data),{style:"error"})}))}loginAndCheckVerification(){var e,t;this.submitting=!0,this.accessTokenForVerification=null,(e=this.endpoint,t={username:this.username,password:this.password},e.api.post("/authentication/login",t).then((function(e){return e.data}))).then((e=>{var t;this.cancelRecheckTimer(),this.submitting=!1;const i=s(e.accessToken);console.log("[AUTH] Got access token body",i),(null==i?void 0:i.email_verified)?(console.log("[AUTH] Email address is verified, completing login"),this.displayMode="login",this.accessTokenForVerification=null,this.endpoint.setToken(e.accessToken),this.activeSession=this.endpoint.session,this.isAuthenticated=!0,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!0,session:this.endpoint.session})):(console.log("[AUTH] Logged in, pending email address verification"),this.displayMode="verify",this.accessTokenForVerification=e.accessToken,this.recheckTimer=setTimeout((()=>this.loginAndCheckVerification()),5e3))})).catch((e=>{var t,i,s,l;this.cancelRecheckTimer(),console.log("[AUTH] Authentication error",e.response,JSON.stringify(e)),this.displayMode="login",this.submitting=!1,this.activeSession=null,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null}),null===(i=this.sdkError)||void 0===i||i.emit(new n(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(l=e.response)||void 0===l?void 0:l.data)),a("Login failed. Please check your username and password and try again.",{style:"error"})}))}handleLogout(){var e;this.endpoint.clearSession(),this.isAuthenticated=!1,this.accessTokenForVerification=null,null===(e=this.authenticated)||void 0===e||e.emit({authenticated:!1,session:null})}handleResend(){var e,t;this.resendDisabled=!0,this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=!1,this.resendDisabledTimer=null}),3e4),(e=this.endpoint,t=this.accessTokenForVerification,e.api.post("/user/email_verification",{},t?{headers:{Authorization:"Bearer ".concat(t)}}:{}).then((function(e){return e.data}))).then((e=>{console.log("[AUTH] Verification request resent",e),a("Please check your email for a message with verification instructions.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend verification",e)}))}handleReset(){var e,t;this.submitting=!0,(e=this.endpoint,t={email:this.username},e.api.post("/user/reset_password",t).then((function(e){return e.data}))).then((e=>{console.log("[AUTH] Reset sent",e),this.submitting=!1,this.displayMode="login",a("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to reset password",e),this.submitting=!1}))}render(){if(!this.visible)return i("div",{style:{display:"none"}},"Authenticated");if(this.isAuthenticated)return i("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:()=>this.handleLogout(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}});if("signup"===this.displayMode){const e=this.submitting||!this.first||!this.last||!this.username||!this.password||!this.orgname;return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Sign up for a trial account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.submitting})),1===this.signupStep&&i("form",{onSubmit:()=>this.handleSignup()},i("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},i("verdocs-text-input",{label:"First Name",autocomplete:"first",required:!0,value:this.first,onInput:e=>this.first=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:!0,value:this.last,onInput:e=>this.last=e.target.value,disabled:this.submitting})),i("verdocs-text-input",{label:"Email",autocomplete:"email",required:!0,value:this.username,onInput:e=>this.username=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Phone #",autocomplete:"phone",value:this.phone,onInput:e=>this.phone=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",required:!0,autocomplete:"current-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:!0,value:this.orgname,onInput:e=>this.orgname=e.target.value,disabled:this.submitting,style:{flex:"1"}}),i("div",{style:{marginTop:"30px"}}),i("verdocs-button",{label:"Next",disabled:e,onClick:()=>this.signupStep=2,style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),2===this.signupStep&&i("form",{onSubmit:()=>this.handleSignup()},i("verdocs-text-input",{label:"How did you hear about Verdocs?",value:this.howHear,onInput:e=>this.howHear=e.target.value,disabled:this.submitting}),i("verdocs-select-input",{label:"Your Industry",options:r,value:this.industry,onInput:e=>this.industry=e.target.value,disabled:this.submitting}),i("verdocs-select-input",{label:"Company Size",options:d,value:this.companySize,onInput:e=>this.companySize=e.target.value,disabled:this.submitting}),i("verdocs-select-input",{label:"Purpose",options:u,value:this.reason,onInput:e=>this.reason=e.target.value,disabled:this.submitting}),i("div",{style:{marginTop:"30px"}}),i("verdocs-button",{label:"Create Account",disabled:this.submitting,onClick:()=>this.handleSignup(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),3===this.signupStep&&i("form",{onSubmit:()=>this.handleSignup()},i("p",null,"Please check your e-mail inbox for a verification code and follow the instructions provided."),i("p",null,i("em",null,"Verification messages may take up to 1 hour to arrive. If you do not receive the invitation, ",i("a",{href:"#"},"Click Here")," to resend it. Be sure to check your spam folder.")),i("div",{style:{display:"flex",flexDirection:"row",gap:"20px"}},i("verdocs-button",{label:"Back",disabled:this.submitting,onClick:()=>{this.signupStep=2},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}),i("verdocs-button",{label:"Go to Dashboard",disabled:!0,onClick:()=>this.handleSignup(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}))))}return"forgot"===this.displayMode?i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Forgot your password?"),i("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox."),i("p",null,i("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),i("form",{onSubmit:()=>this.handleSignup()},i("verdocs-text-input",{label:"Email",autocomplete:"email",required:!0,value:this.username,onInput:e=>this.username=e.target.value,disabled:this.submitting}),i("div",{style:{marginTop:"30px"}}),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),i("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:()=>this.handleReset()})))):"verify"===this.displayMode?i("div",{class:"form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Please Verify your Email Address"),i("p",null,"Check your e-mail inbox for a verification email, and follow the instructions provided."),i("p",null,i("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),i("div",{class:"buttons"},i("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:()=>{this.username="",this.password="",this.cancelRecheckTimer(),this.displayMode="login"}}),i("verdocs-button",{label:"Resend Email",disabled:this.resendDisabled,onClick:()=>this.handleResend()}))):i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>{this.displayMode="signup",this.signupStep=1},disabled:this.submitting})),i("form",{onSubmit:()=>this.loginAndCheckVerification()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:e=>this.username=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="forgot",disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.submitting,onClick:()=>this.loginAndCheckVerification(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))}};h.style='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth h4 verdocs-button button.normal .button-label{padding:0}verdocs-auth .buttons{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}';export{h as verdocs_auth}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as i,h as s,H as e}from"./p-14b44491.js";import{g as o}from"./p-6de76553.js";import{g as r}from"./p-
|
1
|
+
import{r as t,c as i,h as s,H as e}from"./p-14b44491.js";import{g as o}from"./p-6de76553.js";import{g as r}from"./p-02a71e03.js";import"./p-7d5dbd9a.js";import"./p-dc2ad047.js";import"./p-05788c2b.js";import"./p-aa124212.js";import"./p-839f6f0d.js";import"./p-c220af42.js";const n=class{constructor(s){t(this,s),this.fieldChange=i(this,"fieldChange",7),this.settingsPress=i(this,"settingsPress",7),this.settingsChanged=i(this,"settingsChanged",7),this.deleted=i(this,"deleted",7),this.templateid="",this.field=null,this.name="",this.disabled=!1,this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.rerender=0,this.tempSignature=""}async focusField(){this.handleShow(),console.log("focused",this)}hideDialog(){var t;null===(t=this.dialog)||void 0===t||t.remove(),this.dialog=null}handleAdopt(t){var i;console.log("[SIGNATURE] Adopted signature"),this.tempSignature=t.detail,null===(i=this.fieldChange)||void 0===i||i.emit(this.tempSignature),this.hideDialog()}handleShow(){this.dialog=document.createElement("verdocs-signature-dialog"),this.dialog.setAttribute("name",this.name),this.dialog.setAttribute("roleindex",this.roleindex),this.dialog.addEventListener("exit",(()=>this.hideDialog())),this.dialog.addEventListener("next",(t=>this.handleAdopt(t))),document.body.append(this.dialog)}async showSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.showPanel&&t.showPanel()}async hideSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.hidePanel&&t.hidePanel()}render(){var t,i,n;const d=r(this.field),l=d.base64||this.tempSignature,a=null!==(i=null!==(t=this.disabled)&&void 0!==t?t:d.disabled)&&void 0!==i&&i,h=this.field.rgba||o(this.roleindex);return this.done?s(e,{class:{done:this.done}},l&&s("img",{src:l,alt:"Signature"})):s(e,{class:{required:null===(n=this.field)||void 0===n?void 0:n.required,disabled:a},style:{backgroundColor:h}},l?s("img",{src:l,alt:"Signature"}):s("button",{onClick:()=>!a&&this.handleShow()},"Signature"),this.editable&&s("verdocs-button-panel",{icon:'<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>',id:`verdocs-settings-panel-${this.field.name}`},s("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var t;return null===(t=this.deleted)||void 0===t||t.emit({fieldName:this.field.name}),this.hideSettingsPanel()},onSettingsChanged:t=>{var i;return null===(i=this.settingsChanged)||void 0===i||i.emit(t.detail),this.hideSettingsPanel()}})))}};n.style='verdocs-field-signature{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;position:relative;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-signature.disabled{opacity:0.5}verdocs-field-signature.done{border:none;opacity:1}verdocs-field-signature img{display:block;max-width:100%;max-height:100%}verdocs-field-signature button{cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-signature button.hide{display:none}verdocs-field-signature.required{border:1px solid #cc0000}verdocs-field-signature.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-signature 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-signature verdocs-button-panel[data-active],verdocs-field-signature verdocs-button-panel:hover{opacity:1}verdocs-field-signature verdocs-button-panel .icon svg{fill:#333333}verdocs-field-signature verdocs-button-panel .icon:hover svg{fill:#000000}';export{n as verdocs_field_signature}
|
@@ -0,0 +1 @@
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function i(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):a(e.value).then(s,i)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,s;return s={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(o=s[0]&2?a["return"]:s[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,s[1])).done)return o;if(a=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=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-3af6b910.system.js","./p-9bf2d124.system.js","./p-084c23e4.system.js"],(function(e){"use strict";var t,r,n,a;return{setters:[function(e){t=e.c},function(e){r=e.g;n=e.T},function(e){a=e.c}],execute:function(){var o=this;var s=function(e){var r=(new Date).toISOString();return t({isLoading:true,isLoaded:false,isError:false,error:null,updateCount:0,roleNames:[],id:e,name:"",description:"",sender:n.CREATOR,profile_id:"",organization_id:"",counter:0,star_counter:0,is_sendable:false,is_personal:true,is_public:false,created_at:r,updated_at:r,last_used_at:r,token:"",reminder_id:"",reminder:undefined,processed:false,organization:undefined,roles:[],pages:[],template_document:undefined,template_documents:[]})};var i={};var u=e("g",(function(e,t,n){if(n===void 0){n=false}return __awaiter(o,void 0,void 0,(function(){var o,u,l,c;return __generator(this,(function(d){switch(d.label){case 0:o=false;if(!i[t]){console.debug("[TEMPLATES] No template store found for ID, creating",t);i[t]=s(t);o=true}u=i[t];u.use({reset:function(){return console.debug("[TEMPLATES] Store got reset")},dispose:function(){return console.debug("[TEMPLATES] Store got disposed")}});if(!(o||n))return[3,5];console.debug("[TEMPLATES] Reloading template",{templateId:t,created:o,forceReload:n});u.state.isLoading=true;u.state.isLoaded=false;u.state.isError=false;u.state.error=undefined;d.label=1;case 1:d.trys.push([1,3,,4]);return[4,r(e,t)];case 2:l=d.sent();console.debug("[TEMPLATES] Got template",l);Object.assign(u.state,l);u.state.isLoaded=true;u.state.isError=false;u.state.error=undefined;return[3,4];case 3:c=d.sent();console.error("[TEMPLATES] Error loading template",c);u.state.isLoaded=false;u.state.isError=true;u.state.error=c;throw c;case 4:u.state.isLoading=false;u.state.updateCount++;d.label=5;case 5:a(u.state);return[2,u]}}))}))}));var l=e("a",(function(e){var t;return(((t=e===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles)||[]).map((function(e){return e.name}))}))}}}));
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as e,c as t,f as s,h as i,H as l,a as o}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as d}from"./p-035f6b38.js";import{g as a}from"./p-8dc15d33.js";import{S as n}from"./p-7a1b2643.js";import"./p-7648c449.js";import"./p-429cad70.js";const r=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.stepChanged=t(this,"stepChanged",7),this.send=t(this,"send",7),this.templateUpdated=t(this,"templateUpdated",7),this.templateCreated=t(this,"templateCreated",7),this.endpoint=d.getDefault(),this.templateId=null,this.step="preview",this.store=null}onTemplateIdChanged(e){console.log("Template ID changed",e),this.loadTemplate(e).catch((e=>console.log("Unknown Error",e)))}onStepChanged(e){console.log("Step changed",e),this.loadTemplate(this.templateId).catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,t,s;try{if(this.endpoint.loadSession(),!this.templateId)return console.log("[BUILD] No template ID, activating upload mode"),void(this.step="attachments");if(!this.endpoint.session)return void console.log("[BUILD] Unable to start builder session, must be authenticated");this.loadTemplate(this.templateId).catch((e=>console.log("[BUILD] Unable to load template",e)))}catch(i){console.log("[BUILD] Error loading template",i),null===(e=this.sdkError)||void 0===e||e.emit(new n(i.message,null===(t=i.response)||void 0===t?void 0:t.status,null===(s=i.response)||void 0===s?void 0:s.data))}}async loadTemplate(e){e&&(console.log("Loading store",e),this.store=await a(this.endpoint,e,!0),s(this.el))}handleCancel(e){console.log("Cancel",e.detail),this.step="preview"}async handleTemplateCreated(e){var t;await this.loadTemplate(e),this.templateId=e,this.step="roles",null===(t=this.stepChanged)||void 0===t||t.emit("roles")}async handleTemplateUpdated(e){var t;console.log("tup"),null===(t=this.templateUpdated)||void 0===t||t.emit(e.detail)}handleAttachmentsNext(){var e;this.step="roles",null===(e=this.stepChanged)||void 0===e||e.emit("roles")}handleRolesNext(){var e;this.step="fields",null===(e=this.stepChanged)||void 0===e||e.emit("fields")}handleStepChanged(e){var t;console.log("osc",e),this.step=e,null===(t=this.stepChanged)||void 0===t||t.emit(e)}render(){return this.endpoint.session?this.store?(console.log("[BUILD] Rendering build view",this.templateId,this.step,["attachments","roles","settings","fields","preview"].indexOf(this.step)),i(l,null,i("div",{class:"content"},i("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:e=>{var t;return null===(t=this.sdkError)||void 0===t?void 0:t.emit(e.detail)},onStepChanged:e=>this.handleStepChanged(e.detail)}),"attachments"===this.step&&i("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:e=>this.handleCancel(e),onNext:()=>this.handleAttachmentsNext(),onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),"roles"===this.step&&i("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:e=>this.handleCancel(e),onNext:()=>this.handleRolesNext(),onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),"settings"===this.step&&i("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},i("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),i("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),i("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)})),"fields"===this.step&&i("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),"preview"===this.step&&i("div",{class:"preview-container"},i("div",{class:"preview-send-wrapper"},i("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:e=>{var t;return null===(t=this.send)||void 0===t?void 0:t.emit(e.detail)},style:{width:"100%"}})),i("div",{class:"preview-preview-wrapper"},i("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))):(console.log("[BUILD] No template ID, rendering created view"),i(l,null,i("div",{class:"content"},i("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:"attachments",onSdkError:e=>{var t;return null===(t=this.sdkError)||void 0===t?void 0:t.emit(e.detail)},onStepChanged:e=>this.handleStepChanged(e.detail)}),i("verdocs-template-create",{endpoint:this.endpoint,onExit:e=>this.handleCancel(e),onNext:()=>this.handleAttachmentsNext(),onTemplateCreated:e=>this.handleTemplateCreated(e.detail.templateId)})))):i(l,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}get el(){return o(this)}static get watchers(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}}};r.style='verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .content{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}verdocs-build .preview-container{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;width:100%;background-color:#eeeeee;max-height:100%}@media all and (max-width: 450px){verdocs-build .preview-container{-ms-flex-direction:column;flex-direction:column}}verdocs-build .preview-send-wrapper{display:-ms-flexbox;display:flex;-ms-flex:0 0 300px;flex:0 0 300px;background-color:#ffffff;-webkit-box-shadow:1px 1px 6px -2px #0000007f;box-shadow:1px 1px 6px -2px #0000007f}@media all and (max-width: 450px){verdocs-build .preview-send-wrapper{-ms-flex:0;flex:0}}verdocs-build .preview-preview-wrapper{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;overflow-y:scroll}';export{r as verdocs_build}
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,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(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(s[0]===6&&i.label<r[1]){i.label=r[1];r=s;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(s);break}if(r[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-05eb4fed.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,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(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(s[0]===6&&i.label<r[1]){i.label=r[1];r=s;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(s);break}if(r[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-05eb4fed.system.js","./p-840827b7.system.js","./p-1ba9f457.system.js","./p-8aae8d16.system.js","./p-54498887.system.js","./p-327858f0.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,i,n,o,r,s;return{setters:[function(e){t=e.r;i=e.c;n=e.h;o=e.H},function(e){r=e.g},function(e){s=e.g},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var a='verdocs-field-signature{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;position:relative;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-signature.disabled{opacity:0.5}verdocs-field-signature.done{border:none;opacity:1}verdocs-field-signature img{display:block;max-width:100%;max-height:100%}verdocs-field-signature button{cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-signature button.hide{display:none}verdocs-field-signature.required{border:1px solid #cc0000}verdocs-field-signature.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-signature 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-signature verdocs-button-panel[data-active],verdocs-field-signature verdocs-button-panel:hover{opacity:1}verdocs-field-signature verdocs-button-panel .icon svg{fill:#333333}verdocs-field-signature verdocs-button-panel .icon:hover svg{fill:#000000}';var l='<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 d=e("verdocs_field_signature",function(){function e(e){t(this,e);this.fieldChange=i(this,"fieldChange",7);this.settingsPress=i(this,"settingsPress",7);this.settingsChanged=i(this,"settingsChanged",7);this.deleted=i(this,"deleted",7);this.templateid="";this.field=null;this.name="";this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.rerender=0;this.tempSignature=""}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.handleShow();console.log("focused",this);return[2]}))}))};e.prototype.hideDialog=function(){var e;(e=this.dialog)===null||e===void 0?void 0:e.remove();this.dialog=null};e.prototype.handleAdopt=function(e){var t;console.log("[SIGNATURE] Adopted signature");this.tempSignature=e.detail;(t=this.fieldChange)===null||t===void 0?void 0:t.emit(this.tempSignature);this.hideDialog()};e.prototype.handleShow=function(){var e=this;this.dialog=document.createElement("verdocs-signature-dialog");this.dialog.setAttribute("name",this.name);this.dialog.setAttribute("roleindex",this.roleindex);this.dialog.addEventListener("exit",(function(){return e.hideDialog()}));this.dialog.addEventListener("next",(function(t){return e.handleAdopt(t)}));document.body.append(this.dialog)};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.render=function(){var e=this;var t,i,a;var d=s(this.field);var u=d.base64||this.tempSignature;var c=(i=(t=this.disabled)!==null&&t!==void 0?t:d.disabled)!==null&&i!==void 0?i:false;var h=this.field["rgba"]||r(this.roleindex);if(this.done){return n(o,{class:{done:this.done}},u&&n("img",{src:u,alt:"Signature"}))}return n(o,{class:{required:(a=this.field)===null||a===void 0?void 0:a.required,disabled:c},style:{backgroundColor:h}},u?n("img",{src:u,alt:"Signature"}):n("button",{onClick:function(){return!c&&e.handleShow()}},"Signature"),this.editable&&n("verdocs-button-panel",{icon:l,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()}})))};return e}());d.style=a}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function o(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?i(t.value):r(t.value).then(o,s)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(a=o[0]&2?r["return"]:o[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;if(r=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;r=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(t){o=[6,t];r=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function o(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?i(t.value):r(t.value).then(o,s)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(a=o[0]&2?r["return"]:o[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;if(r=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;r=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(t){o=[6,t];r=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-8aae8d16.system.js","./p-54498887.system.js","./p-9bf2d124.system.js","./p-840827b7.system.js","./p-1ba9f457.system.js","./p-327858f0.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js"],(function(t){"use strict";var e,i,n,r,a,o,s,c;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;a=t.a},function(t){o=t.m},function(){},function(t){s=t.V},function(t){c=t.t},function(){},function(){},function(){},function(){}],execute:function(){var h="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%}";var u=t("verdocs_envelope_document_page",function(){function t(t){e(this,t);this.pageRendered=i(this,"pageRendered",7);this.endpoint=s.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-".concat(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=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,o(this.endpoint,this.envelopeId,this.documentId,this.pageNumber,this.type)];case 1:t.pageDisplayUri=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.resizeObserver=new ResizeObserver(c((function(e){for(var i=0,n=e;i<n.length;i++){var r=n[i];var a=r.contentRect.width;t.renderedWidth=a;t.renderedHeight=t.virtualHeight*(a/t.virtualWidth)}t.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};t.prototype.disconnectedCallback=function(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,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})};t.prototype.render=function(){var t=this;var e="".concat(this.renderedHeight,"px");return n(r,{id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?n("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(t.containerId,"-").concat(i.name),src:t.pageDisplayUri,alt:"Page ".concat(t.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(e){t.naturalWidth=e.target.naturalWidth;t.naturalHeight=e.target.naturalHeight;t.aspectRatio=t.naturalWidth/t.naturalHeight;t.virtualHeight=t.virtualWidth/t.aspectRatio;t.renderedHeight=e.target.offsetWidth/t.aspectRatio}}):n("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());u.style=h}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function a(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):a(t.value).then(i,s)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,a,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return l([t,e])}}function l(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;a=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];a=0}finally{r=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function a(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):a(t.value).then(i,s)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,a,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return l([t,e])}}function l(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;a=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];a=0}finally{r=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-9bf2d124.system.js","./p-54498887.system.js"],(function(t){"use strict";var e,n,r,a,o;return{setters:[function(t){e=t.r;n=t.c;r=t.h;a=t.H},function(t){o=t.V},function(){}],execute:function(){var i=function(t,e){return t.api.post("/templates/".concat(e,"/stars/toggle")).then((function(t){return t.data}))};var s='verdocs-template-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';var l='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>';var c='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>';var u=t("verdocs_template_star",function(){function t(t){e(this,t);this.starChange=n(this,"starChange",7);this.sdkError=n(this,"sdkError",7);this.endpoint=o.getDefault();this.template=undefined;this.updating=false}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return[2]}return[2]}))}))};t.prototype.toggle=function(t){var e=this;t.stopPropagation();this.updating=true;i(o.getDefault(),this.template.id).then((function(t){e.updating=false;e.template.star_counter=t.star_counter;e.starChange.emit({templateId:e.template.id,starred:t.star_counter>0,count:t.star_counter})})).catch((function(t){e.updating=false;console.log("[STAR] Error toggling template star",t.message);e.sdkError.emit(t)}))};t.prototype.render=function(){var t=this;return r(a,null,r("div",{class:"star ".concat(this.updating?"updating":""),innerHTML:this.template.star_counter?c:l,onClick:function(e){return t.toggle(e)}}),r("div",{class:"count"},this.template.star_counter||"--"))};return t}());u.style=s}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function r(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function l(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,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(n){return a([e,n])}}function a(s){if(t)throw new TypeError("Generator is already executing.");while(i)try{if(t=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=n.call(e,i)}catch(e){s=[6,e];r=0}finally{t=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-eaf0b189.system.js","./p-19ff8f86.system.js","./p-7e8d64fb.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-1d60151a.system.js","./p-3af6b910.system.js","./p-2ccbcfeb.system.js"],(function(e){"use strict";var n,i,t,r,o,s,l,a,c,p,d;return{setters:[function(e){n=e.r;i=e.c;t=e.h;r=e.H},function(){},function(e){o=e.g},function(e){s=e.V},function(e){l=e.g},function(e){a=e.V},function(e){c=e.S},function(e){p=e.g;d=e.r},function(){},function(){}],execute:function(){var u='verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var f=e("verdocs_envelope_recipient_link",function(){function e(e){n(this,e);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.recipient=null;this.endpoint=s.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.loading=true;this.gettingLink=true;this.link=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r,o,s,a;var p=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}s=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:s.store=d.sent();this.loading=false;this.gettingLink=true;this.recipient=(i=(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients)===null||i===void 0?void 0:i.find((function(e){return e.role_name===p.roleName}));this.getLink(this.recipient);return[3,3];case 2:a=d.sent();console.log("[RECIPIENT_LINK] Error loading envelope",a);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(o=a.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return a("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);a("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var n=this;this.gettingLink=true;o(this.endpoint,e.envelope_id,e.role_name).then((function(e){n.gettingLink=false;n.link=e.link})).catch((function(e){n.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);a("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},this.recipient.full_name," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());f.style=u;var m='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var x=e("verdocs_envelope_recipient_summary",function(){function e(e){n(this,e);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.endpoint=s.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.loading=true;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}t=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:t.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:r=o.sent();console.log("[RECIPIENTS] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(r.message,(n=r.response)===null||n===void 0?void 0:n.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,n;(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients.sort((function(e,n){return e.sequence===n.sequence?e.order-n.order:e.sequence-n.sequence}))};e.prototype.handleAnother=function(e){var n;e.preventDefault();(n=this.another)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var n;e.preventDefault();(n=this.view)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){var n=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=n.sdkError)===null||i===void 0?void 0:i.emit(e)}))};e.prototype.getLink=function(e){var n;var i=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(n={},n[e.role_name]=true,n));o(this.endpoint,e.envelope_id,e.role_name).then((function(n){var t,r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));i.links=__assign(__assign({},i.links),(r={},r[e.role_name]=n.link,r));i.copyLink(n.link)})).catch((function(n){var t;var r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));console.log("[RECIPIENTS] Error getting link",n);(r=i.sdkError)===null||r===void 0?void 0:r.emit(n)}))};e.prototype.render=function(){var e=this;var n,i;if(this.loading){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"Recipient Summary"),t("div",{class:"summary-rows"},(((i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.recipients)||[]).map((function(n){var i=p(e.store.state);var r=d(n,i);var o=e.links[n.role_name];var s=e.gettingLinks[n.role_name];return t("div",{class:"summary-recipient"},t("div",{class:"role-name"},n.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},n.full_name," (",n.email||n.phone,")"),r&&!o&&t("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(n)}})),o&&t("div",{class:"link-wrapper"},t("div",{class:"link"},o),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&t("div",{class:"buttons"},this.canSendAnother&&t("verdocs-button",{size:"small",label:"Send Another",onClick:function(n){return e.handleAnother(n)}}),this.canView&&t("verdocs-button",{size:"small",label:"View Now",onClick:function(n){return e.handleView(n)}}),this.canDone&&t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());x.style=m}}}));
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function r(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function l(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,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(n){return a([e,n])}}function a(s){if(t)throw new TypeError("Generator is already executing.");while(i)try{if(t=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=n.call(e,i)}catch(e){s=[6,e];r=0}finally{t=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-eaf0b189.system.js","./p-9bf2d124.system.js","./p-9615b087.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-1d60151a.system.js","./p-3af6b910.system.js","./p-8aae8d16.system.js"],(function(e){"use strict";var n,i,t,r,o,s,l,a,c,p,d;return{setters:[function(e){n=e.r;i=e.c;t=e.h;r=e.H},function(){},function(e){o=e.g},function(e){s=e.V},function(e){l=e.g},function(e){a=e.V},function(e){c=e.S},function(e){p=e.g;d=e.r},function(){},function(){}],execute:function(){var u='verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var f=e("verdocs_envelope_recipient_link",function(){function e(e){n(this,e);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.recipient=null;this.endpoint=s.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.loading=true;this.gettingLink=true;this.link=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r,o,s,a;var p=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}s=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:s.store=d.sent();this.loading=false;this.gettingLink=true;this.recipient=(i=(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients)===null||i===void 0?void 0:i.find((function(e){return e.role_name===p.roleName}));this.getLink(this.recipient);return[3,3];case 2:a=d.sent();console.log("[RECIPIENT_LINK] Error loading envelope",a);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(o=a.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return a("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);a("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var n=this;this.gettingLink=true;o(this.endpoint,e.envelope_id,e.role_name).then((function(e){n.gettingLink=false;n.link=e.link})).catch((function(e){n.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);a("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},this.recipient.full_name," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());f.style=u;var m='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var x=e("verdocs_envelope_recipient_summary",function(){function e(e){n(this,e);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.endpoint=s.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.loading=true;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}t=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:t.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:r=o.sent();console.log("[RECIPIENTS] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(r.message,(n=r.response)===null||n===void 0?void 0:n.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,n;(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients.sort((function(e,n){return e.sequence===n.sequence?e.order-n.order:e.sequence-n.sequence}))};e.prototype.handleAnother=function(e){var n;e.preventDefault();(n=this.another)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var n;e.preventDefault();(n=this.view)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){var n=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=n.sdkError)===null||i===void 0?void 0:i.emit(e)}))};e.prototype.getLink=function(e){var n;var i=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(n={},n[e.role_name]=true,n));o(this.endpoint,e.envelope_id,e.role_name).then((function(n){var t,r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));i.links=__assign(__assign({},i.links),(r={},r[e.role_name]=n.link,r));i.copyLink(n.link)})).catch((function(n){var t;var r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));console.log("[RECIPIENTS] Error getting link",n);(r=i.sdkError)===null||r===void 0?void 0:r.emit(n)}))};e.prototype.render=function(){var e=this;var n,i;if(this.loading){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"Recipient Summary"),t("div",{class:"summary-rows"},(((i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.recipients)||[]).map((function(n){var i=p(e.store.state);var r=d(n,i);var o=e.links[n.role_name];var s=e.gettingLinks[n.role_name];return t("div",{class:"summary-recipient"},t("div",{class:"role-name"},n.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},n.full_name," (",n.email||n.phone,")"),r&&!o&&t("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(n)}})),o&&t("div",{class:"link-wrapper"},t("div",{class:"link"},o),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&t("div",{class:"buttons"},this.canSendAnother&&t("verdocs-button",{size:"small",label:"Send Another",onClick:function(n){return e.handleAnother(n)}}),this.canView&&t("verdocs-button",{size:"small",label:"View Now",onClick:function(n){return e.handleView(n)}}),this.canDone&&t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());x.style=m}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function o(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function r(t){try{a(n.next(t))}catch(t){s(t)}}function l(t){try{a(n["throw"](t))}catch(t){s(t)}}function a(t){t.done?i(t.value):o(t.value).then(r,l)}a((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,o,s,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(t){return function(e){return a([t,e])}}function a(r){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;o=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){i.label=r[1];break}if(r[0]===6&&i.label<s[1]){i.label=s[1];s=r;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(r);break}if(s[2])i.ops.pop();i.trys.pop();continue}r=e.call(t,i)}catch(t){r=[6,t];o=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-05eb4fed.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function o(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function r(t){try{a(n.next(t))}catch(t){s(t)}}function l(t){try{a(n["throw"](t))}catch(t){s(t)}}function a(t){t.done?i(t.value):o(t.value).then(r,l)}a((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,o,s,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(t){return function(e){return a([t,e])}}function a(r){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;o=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){i.label=r[1];break}if(r[0]===6&&i.label<s[1]){i.label=s[1];s=r;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(r);break}if(s[2])i.ops.pop();i.trys.pop();continue}r=e.call(t,i)}catch(t){r=[6,t];o=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-05eb4fed.system.js","./p-840827b7.system.js","./p-1ba9f457.system.js","./p-8aae8d16.system.js","./p-54498887.system.js","./p-327858f0.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js"],(function(t){"use strict";var e,i,n,o,s,r;return{setters:[function(t){e=t.r;i=t.c;n=t.h;o=t.H},function(t){s=t.g},function(t){r=t.g},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var l='verdocs-field-initial{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-initial.disabled{opacity:0.5}verdocs-field-initial.done{border:none;opacity:1}verdocs-field-initial img{display:block;max-width:100%;max-height:100%}verdocs-field-initial button{cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-initial button.hide{display:none}verdocs-field-initial.required{border:1px solid #cc0000}verdocs-field-initial.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-initial 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-initial verdocs-button-panel[data-active],verdocs-field-initial verdocs-button-panel:hover{opacity:1}verdocs-field-initial verdocs-button-panel .icon svg{fill:#333333}verdocs-field-initial verdocs-button-panel .icon:hover svg{fill:#000000}';var a='<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 d=t("verdocs_field_initial",function(){function t(t){e(this,t);this.adopt=i(this,"adopt",7);this.exit=i(this,"exit",7);this.fieldChange=i(this,"fieldChange",7);this.settingsChanged=i(this,"settingsChanged",7);this.settingsPress=i(this,"settingsPress",7);this.deleted=i(this,"deleted",7);this.templateid="";this.field=null;this.disabled=false;this.initials="";this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.rerender=0;this.tempInitials=""}t.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.handleShow();return[2]}))}))};t.prototype.hideDialog=function(){var t;(t=this.dialog)===null||t===void 0?void 0:t.remove();this.dialog=null};t.prototype.handleAdopt=function(t){var e;console.log("[INITIAL] Adopted initials");this.tempInitials=t.detail;(e=this.fieldChange)===null||e===void 0?void 0:e.emit(this.tempInitials);this.hideDialog()};t.prototype.handleShow=function(){var t=this;this.dialog=document.createElement("verdocs-initial-dialog");this.dialog.setAttribute("initials",this.initials);this.dialog.setAttribute("roleindex",this.roleindex);this.dialog.addEventListener("exit",(function(){return t.hideDialog()}));this.dialog.addEventListener("next",(function(e){return t.handleAdopt(e)}));document.body.append(this.dialog)};t.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){t=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(t&&t.showPanel){t.showPanel()}return[2]}))}))};t.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){t=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(t&&t.hidePanel){t.hidePanel()}return[2]}))}))};t.prototype.render=function(){var t=this;var e,i,l;var d=r(this.field);var c=d.base64||this.tempInitials;var u=(i=(e=this.disabled)!==null&&e!==void 0?e:d.disabled)!==null&&i!==void 0?i:false;var h=this.field["rgba"]||s(this.roleindex);if(this.done){return n(o,{class:{done:this.done}},c&&n("img",{src:c,alt:"Initials"}))}return n(o,{class:{required:(l=this.field)===null||l===void 0?void 0:l.required,disabled:u},style:{backgroundColor:h}},c?n("img",{src:c,alt:"Initials"}):n("button",{class:{},onClick:function(){return!u&&t.handleShow()}},"Initials"),this.editable&&n("verdocs-button-panel",{icon:a,id:"verdocs-settings-panel-".concat(this.field.name)},n("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:function(){return t.hideSettingsPanel()},onDelete:function(){var e;(e=t.deleted)===null||e===void 0?void 0:e.emit({fieldName:t.field.name});return t.hideSettingsPanel()},onSettingsChanged:function(e){var i;(i=t.settingsChanged)===null||i===void 0?void 0:i.emit(e.detail);return t.hideSettingsPanel()}})))};return t}());d.style=l}}}));
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as e,h as s,H as i,a as o}from"./p-14b44491.js";import{i as r}from"./p-915883e6.js";import"./p-05788c2b.js";import{V as a}from"./p-
|
1
|
+
import{r as t,c as e,h as s,H as i,a as o}from"./p-14b44491.js";import{i as r}from"./p-915883e6.js";import"./p-05788c2b.js";import{V as a}from"./p-035f6b38.js";import{u as n}from"./p-feb442b1.js";import{g as d}from"./p-6de76553.js";import{g as l}from"./p-02a71e03.js";import"./p-7d5dbd9a.js";import"./p-dc2ad047.js";import"./p-aa124212.js";import"./p-839f6f0d.js";import"./p-c220af42.js";const h=class{constructor(s){t(this,s),this.settingsChanged=e(this,"settingsChanged",7),this.deleted=e(this,"deleted",7),this.endpoint=a.getDefault(),this.templateid="",this.field=null,this.disabled=!1,this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.xscale=1,this.yscale=1,this.rerender=0}async focusField(){this.inputEl.focus()}async showSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.showPanel&&t.showPanel()}async hideSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.hidePanel&&t.hidePanel()}componentDidRender(){r.dynamicDrop(!0),this.editable&&r(this.el).resizable({edges:{top:!0,bottom:!0,left:!0,right:!0},listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}handleResizeStart(t){t.preventDefault(),t.stopPropagation()}handleResize(t){let{x:e=0,y:s=0,h:i=0}=t.target.dataset,{width:o,height:r}=t.rect;e=(parseFloat(e)||0)+t.deltaRect.left,s=(parseFloat(s)||0)+t.deltaRect.top,i=(parseFloat(i)||0)+t.deltaRect.height,Object.assign(t.target.style,{width:`${o}px`,height:`${r}px`,transform:`translate(${e}px, ${s+i}px)`}),Object.assign(t.target.dataset,{x:e,y:s,h:i})}handleResizeEnd(t){const e={...l(this.field)},[s,i]=t.target.style.transform.split("(")[1].split(")")[0].split(",").map(parseFloat);e.width=Math.round(parseFloat(t.target.style.width)/this.xscale),e.height=Math.round(parseFloat(t.target.style.height)/this.yscale),e.x=Math.round(e.x+s/this.xscale),e.y=Math.round(e.y-i/this.yscale),n(this.endpoint,this.templateid,this.field.name,{setting:e}).then((s=>{var i;null===(i=this.settingsChanged)||void 0===i||i.emit({fieldName:this.field.name,settings:e,field:s}),Object.assign(t.target.dataset,{x:0,y:0,h:0})})).catch((t=>console.log("Field update failed",t)))}render(){var t,e,o,r;const a=l(this.field),n=null!==(e=null!==(t=this.disabled)&&void 0!==t?t:a.disabled)&&void 0!==e&&e,h=(null==a?void 0:a.result)||"",p=this.field.rgba||d(this.roleindex);return this.done?s(i,{class:{done:this.done}},a.value):s(i,{class:{required:null===(o=this.field)||void 0===o?void 0:o.required,disabled:n,done:this.done},style:{backgroundColor:p}},s("textarea",{placeholder:a.placeholder||"",tabIndex:a.order,disabled:n,name:this.field.name,required:null===(r=this.field)||void 0===r?void 0:r.required,ref:t=>this.inputEl=t},h),this.editable&&s("verdocs-button-panel",{icon:'<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>',id:`verdocs-settings-panel-${this.field.name}`},s("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var t;return null===(t=this.deleted)||void 0===t||t.emit({fieldName:this.field.name}),this.hideSettingsPanel()},onSettingsChanged:t=>{var e;return null===(e=this.settingsChanged)||void 0===e||e.emit(t.detail),this.hideSettingsPanel()}})))}get el(){return o(this)}};h.style='verdocs-field-textarea{width:150px;height:15px;display:block;font-size:11px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea.disabled{opacity:0.5}verdocs-field-textarea textarea{cursor:inherit;width:100%;height:100%;resize:none;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-textarea textarea.hide{display:none}verdocs-field-textarea.required{border:1px solid #cc0000}verdocs-field-textarea.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textarea 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-textarea verdocs-button-panel[data-active],verdocs-field-textarea verdocs-button-panel:hover{opacity:1}verdocs-field-textarea verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textarea verdocs-button-panel .icon:hover svg{fill:#000000}';export{h as verdocs_field_textarea}
|