@verdocs/web-sdk 2.3.84 → 2.3.86
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-1275f980.js → EnvelopeStore-7b1adebb.js} +1 -1
- package/dist/cjs/{TemplateFieldStore-874f47c0.js → TemplateFieldStore-3d25fc86.js} +1 -1
- package/dist/cjs/{TemplateRoleStore-6f391aa6.js → TemplateRoleStore-a7f2b586.js} +1 -1
- package/dist/cjs/{TemplateStore-4a3c60f7.js → TemplateStore-62c90f8c.js} +3 -3
- package/dist/cjs/{index-39554143.js → index-5463795e.js} +0 -3
- package/dist/cjs/{index-7d1c0557.js → index-f712049c.js} +1 -1
- package/dist/cjs/ipc-test.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-button-panel.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-button_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dialog_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-floating-menu.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search-tabs.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 +1 -1
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +12 -8
- package/dist/cjs/verdocs-spinner.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-tabs.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +9 -5
- package/dist/components/verdocs-sign.js +9 -5
- package/dist/docs.json +1 -1
- package/dist/esm/{EnvelopeStore-9ba23493.js → EnvelopeStore-24a1f38f.js} +1 -1
- package/dist/esm/{TemplateFieldStore-dd0bdf08.js → TemplateFieldStore-6e67e86b.js} +1 -1
- package/dist/esm/{TemplateRoleStore-73163c7c.js → TemplateRoleStore-33229997.js} +1 -1
- package/dist/esm/{TemplateStore-74f2da56.js → TemplateStore-940da116.js} +3 -3
- package/dist/esm/{index-d5ba09f3.js → index-172625c5.js} +1 -3
- package/dist/esm/{index-1ce2872b.js → index-4439b0d1.js} +1 -1
- package/dist/esm/ipc-test.entry.js +5 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +5 -5
- package/dist/esm/verdocs-button-panel.entry.js +1 -1
- package/dist/esm/verdocs-button_3.entry.js +1 -1
- package/dist/esm/verdocs-checkbox_5.entry.js +5 -5
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm/verdocs-dialog_2.entry.js +1 -1
- package/dist/esm/verdocs-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/verdocs-field-attachment_15.entry.js +4 -4
- package/dist/esm/verdocs-field-payment.entry.js +4 -4
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-floating-menu.entry.js +2 -2
- package/dist/esm/verdocs-kba-dialog.entry.js +1 -1
- package/dist/esm/verdocs-loader.entry.js +1 -1
- package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm/verdocs-organization-card.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_8.entry.js +5 -5
- package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm/verdocs-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +12 -8
- package/dist/esm/verdocs-spinner.entry.js +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm/verdocs-tabs.entry.js +1 -1
- package/dist/esm/verdocs-template-card.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +5 -5
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-template-tags.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-toggle.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{EnvelopeStore-9ba23493.js → EnvelopeStore-24a1f38f.js} +1 -1
- package/dist/esm-es5/{TemplateFieldStore-dd0bdf08.js → TemplateFieldStore-6e67e86b.js} +1 -1
- package/dist/esm-es5/{TemplateRoleStore-73163c7c.js → TemplateRoleStore-33229997.js} +1 -1
- package/dist/esm-es5/{TemplateStore-74f2da56.js → TemplateStore-940da116.js} +1 -1
- package/dist/esm-es5/index-172625c5.js +2 -0
- package/dist/esm-es5/{index-1ce2872b.js → index-4439b0d1.js} +1 -1
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- 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.entry.js +1 -1
- package/dist/esm-es5/verdocs-button_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-dialog_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown.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_15.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-floating-menu.entry.js +1 -1
- package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-loader.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card.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-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-tabs.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-spinner.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-tabs.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-card.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-template-tags.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-toggle.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/verdocs-web-sdk/{p-ea96f5f4.system.entry.js → p-012d2533.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f1e641a0.system.entry.js → p-04bef805.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-87312a1e.entry.js → p-0a8f32b9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ef6f8f40.system.entry.js → p-0ef04e14.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f75dcbcf.entry.js → p-10c3b15b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c73c5c27.system.entry.js → p-11f3549a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bfa1011a.entry.js → p-11f95569.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-876d3ff3.js → p-14b44491.js} +2 -2
- package/dist/verdocs-web-sdk/{p-5519e76c.entry.js → p-1823e8cd.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-26218bd9.system.entry.js → p-189968f1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fe8f27b7.entry.js → p-1bf648d5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e48e3cfb.entry.js → p-1f6ee7f1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5e45c089.system.js → p-1f9d9fe5.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6e56bca8.entry.js → p-1fa5ef9a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-829aa8bb.entry.js → p-1fe3b3bf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c83d188d.system.entry.js → p-20de620c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-81dcff5e.system.entry.js → p-21294863.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d842c235.system.entry.js → p-294ffd95.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8c08c9f9.entry.js → p-2b4b8754.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d79d096b.js → p-321da456.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d67b2d1d.system.entry.js → p-3229cb32.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4b5b0646.entry.js → p-32eff598.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0cecd33d.system.entry.js → p-3350ad33.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-34140f60.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-7e63be48.system.entry.js → p-341d97ba.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-029e9c61.system.entry.js → p-3a12e7a2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-3af6b910.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-b8bff8d4.system.entry.js → p-3dc2013b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4098a4a2.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-83a620f8.system.entry.js → p-4e834dcc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fd8dbf14.system.entry.js → p-50e0263a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-977a516a.system.entry.js → p-547f5660.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6a1aa8ea.system.entry.js → p-57c87e08.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9558a87a.entry.js → p-5a1c0b41.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-534a26b0.system.entry.js → p-5b72bb32.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-584d64c2.system.entry.js → p-5c67e9f6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5247e965.entry.js → p-603d0733.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-264cbd45.entry.js → p-63a62567.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-045feca9.system.entry.js → p-68cfa909.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9242e5bd.system.entry.js → p-68e3aae3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b0f1bbe1.system.entry.js → p-69422d8f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0bc79a35.entry.js → p-7272e80c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dd8c54eb.entry.js → p-7286272b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a653b5b5.system.entry.js → p-745e8427.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-85d0e79d.js → p-7648c449.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9b80c742.entry.js → p-77205bff.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-84babf11.entry.js → p-7b60293f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5a283795.entry.js → p-7f487279.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fd1f0083.entry.js → p-8003357d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-eca7ffba.system.entry.js → p-85cb43de.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2621a900.entry.js → p-871f2e57.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ad1b9040.system.entry.js → p-8de34628.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-136786ec.entry.js → p-9200270e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-26580438.system.js → p-95080569.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b06f9f6a.system.entry.js → p-9595c814.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-35b7055e.entry.js → p-964f83ef.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d1d42af2.entry.js → p-98c9b7d7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8beb54d2.entry.js → p-9bfc868a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bf7e741e.entry.js → p-9d1e6991.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a27b7dfa.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a5f94a3f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ce79bbd3.system.entry.js → p-a85de84d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-59addd7b.entry.js → p-ab73a327.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-74dad2b0.entry.js → p-abf7930b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-990b6645.system.entry.js → p-adb830b4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e16c6d91.system.entry.js → p-b55a122e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-138bd0cf.system.js → p-b6df9fe6.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-854671ca.entry.js → p-b7d1e999.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d7c326c6.entry.js → p-b804e710.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-535cbdd3.entry.js → p-bb2b0122.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3624c08b.entry.js → p-bb983c03.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ac16209a.system.entry.js → p-be7390d8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-99ada1d4.system.entry.js → p-c56a34a8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6e6bd9ca.system.entry.js → p-c5f28000.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d2e8ff20.entry.js → p-cf6a9502.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c134bf3e.system.entry.js → p-d0564f02.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-481ad7de.system.entry.js → p-d1837101.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c250ce88.js → p-d425fa2c.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7acb5bde.system.entry.js → p-d636a3cd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7b53fef7.system.entry.js → p-d81b1bc9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a26459d5.system.entry.js → p-d9e8c0f9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f5799571.entry.js → p-dbbf84f6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5ce2f910.entry.js → p-dd9dba09.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-677a7783.entry.js → p-df19dc00.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-66dcbdf6.entry.js → p-e1b527eb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4e226f9.js → p-e1f4be7c.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4efb82f0.entry.js → p-e2439f45.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-893cb619.entry.js → p-e51f2b77.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9e88104d.system.entry.js → p-e63fe8b9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b7ba461a.system.entry.js → p-e6fd0310.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b9493625.js → p-ef20cb50.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5e203333.system.js → p-f04bf956.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-28d09c1b.system.entry.js → p-f27fe881.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cd61fea7.system.js → p-fbb8023f.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-59862c79.entry.js → p-ff8278e7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/index-d5ba09f3.js +0 -2
- package/dist/verdocs-web-sdk/p-39e8600d.system.js +0 -1
- package/dist/verdocs-web-sdk/p-4b73be51.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-55a956cb.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8c97a2a3.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9cbf9278.system.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,n,o,t){function i(e){return e instanceof o?e:new o((function(n){n(e)}))}return new(o||(o=Promise))((function(o,r){function l(e){try{a(t.next(e))}catch(e){r(e)}}function s(e){try{a(t["throw"](e))}catch(e){r(e)}}function a(e){e.done?o(e.value):i(e.value).then(l,s)}a((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,i,r,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(n){return a([e,n])}}function a(l){if(t)throw new TypeError("Generator is already executing.");while(o)try{if(t=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:o.label++;return{value:l[1],done:false};case 5:o.label++;i=l[1];l=[0];continue;case 7:l=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){o.label=l[1];break}if(l[0]===6&&o.label<r[1]){o.label=r[1];r=l;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(l);break}if(r[2])o.ops.pop();o.trys.pop();continue}l=n.call(e,o)}catch(e){l=[6,e];i=0}finally{t=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,a as getElement}from"./index-d5ba09f3.js";import{t as throttledGetEnvelope,k as getDocumentDownloadLink,c as cancelEnvelope}from"./Envelopes-627c5239.js";import{b as userCanCancelEnvelope}from"./Permissions-f2eb0421.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-8196ff47.js";import{i as integerSequence}from"./Primitives-8fe93caf.js";import{s as saveEnvelopesAsZip}from"./utils-a56ee5e9.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./_commonjsHelpers-5ec8f9b7.js";import"./Types-086facf7.js";import"./index-914ed6f7.js";var verdocsViewCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.another=createEvent(this,"another",7);this.view=createEvent(this,"view",7);this.next=createEvent(this,"next",7);this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.envelope=null;this.roleNames=[];this.showCancelDone=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentWillRender=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}return[2,this.reloadEnvelope()]}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var n=document.getElementById("verdocs-view-header");if(e&&n){console.log("[VIEW] Moving header");n.remove();e.append(n)}};e.prototype.reloadEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,o,t,i;var r=this;return __generator(this,(function(l){switch(l.label){case 0:console.log("[VIEW] Loading envelope...");l.label=1;case 1:l.trys.push([1,3,,4]);t=this;return[4,throttledGetEnvelope(this.endpoint,this.envelopeId)];case 2:t.envelope=l.sent();console.log("[VIEW] Loaded envelope",this.envelope);this.roleNames=this.envelope.recipients.map((function(e){return e.role_name}));setTimeout((function(){return __awaiter(r,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:console.log("[VIEW] Reloading envelope...");e=this;return[4,throttledGetEnvelope(this.endpoint,this.envelopeId)];case 1:e.envelope=n.sent();console.log("[VIEW] Reloaded envelope",this.envelope);return[2]}}))}))}),2e3);return[3,4];case 3:i=l.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(i.message,(n=i.response)===null||n===void 0?void 0:n.status,(o=i.response)===null||o===void 0?void 0:o.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handlePageRendered=function(e){var n=e.detail;console.log("[VIEW] Page rendered",n)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var n,o,t,i,i;var r=this;return __generator(this,(function(l){switch(l.label){case 0:t=e.detail.id;switch(t){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,5];case"download-all":return[3,7]}return[3,8];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(e){r.canceling=false;console.log("[VIEW] Envelope canceled",e);return throttledGetEnvelope(r.endpoint,r.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);r.envelope=e})).catch((function(e){var n,o,t;r.canceling=false;console.log("[VIEW] Error canceling envelope",e);(n=r.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(t=e.response)===null||t===void 0?void 0:t.data))}));this.showCancelDone=true;(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,8];case 2:window.print();(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,8];case 3:return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,this.envelope.envelope_document_id)];case 4:i=l.sent();window.open(i,"_blank");return[3,8];case 5:return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,this.envelope.certificate_document_id)];case 6:i=l.sent();window.open(i,"_blank");return[3,8];case 7:saveEnvelopesAsZip(this.endpoint,[this.envelope]).then((function(){var e;(e=r.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:r.endpoint,envelope:r.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,8];case 8:return[2]}}))}))};e.prototype.render=function(){var e=this;var n;if(!this.envelope){return h(Host,null,h("img",{src:"https://verdocs-public-assets.s3.amazonaws.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var o=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.session,this.envelope)){o.push({id:"cancel",label:"Cancel"})}var t=this.envelope.documents.length>0;var i=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var r=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(t||r){o.push({label:""});if(t){o.push({id:"download-attachments",label:i>1?"Download Documents":"Download Document"})}if(r){o.push({id:"download-certificate",label:"Download Certificate"})}if(t&&r){o.push({id:"download-all",label:"Download All Files"})}}return h(Host,null,h("div",{id:"verdocs-view-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:o,onOptionSelected:function(n){return e.handleOptionSelected(n)}}))),h("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((n=this.envelope)===null||n===void 0?void 0:n.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(n){var o=integerSequence(1,n.page_numbers);return h(Fragment,null,o.map((function(o){return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:n.id,endpoint:e.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:o,onPageRendered:function(n){return e.handlePageRendered(n)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&h("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=verdocsViewCss;export{VerdocsView as verdocs_view};
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,n,o,t){function i(e){return e instanceof o?e:new o((function(n){n(e)}))}return new(o||(o=Promise))((function(o,r){function l(e){try{a(t.next(e))}catch(e){r(e)}}function s(e){try{a(t["throw"](e))}catch(e){r(e)}}function a(e){e.done?o(e.value):i(e.value).then(l,s)}a((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,i,r,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(n){return a([e,n])}}function a(l){if(t)throw new TypeError("Generator is already executing.");while(o)try{if(t=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:o.label++;return{value:l[1],done:false};case 5:o.label++;i=l[1];l=[0];continue;case 7:l=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){o.label=l[1];break}if(l[0]===6&&o.label<r[1]){o.label=r[1];r=l;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(l);break}if(r[2])o.ops.pop();o.trys.pop();continue}l=n.call(e,o)}catch(e){l=[6,e];i=0}finally{t=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,a as getElement}from"./index-172625c5.js";import{t as throttledGetEnvelope,k as getDocumentDownloadLink,c as cancelEnvelope}from"./Envelopes-627c5239.js";import{b as userCanCancelEnvelope}from"./Permissions-f2eb0421.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-8196ff47.js";import{i as integerSequence}from"./Primitives-8fe93caf.js";import{s as saveEnvelopesAsZip}from"./utils-a56ee5e9.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./_commonjsHelpers-5ec8f9b7.js";import"./Types-086facf7.js";import"./index-914ed6f7.js";var verdocsViewCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.another=createEvent(this,"another",7);this.view=createEvent(this,"view",7);this.next=createEvent(this,"next",7);this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.envelope=null;this.roleNames=[];this.showCancelDone=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentWillRender=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}return[2,this.reloadEnvelope()]}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var n=document.getElementById("verdocs-view-header");if(e&&n){console.log("[VIEW] Moving header");n.remove();e.append(n)}};e.prototype.reloadEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,o,t,i;var r=this;return __generator(this,(function(l){switch(l.label){case 0:console.log("[VIEW] Loading envelope...");l.label=1;case 1:l.trys.push([1,3,,4]);t=this;return[4,throttledGetEnvelope(this.endpoint,this.envelopeId)];case 2:t.envelope=l.sent();console.log("[VIEW] Loaded envelope",this.envelope);this.roleNames=this.envelope.recipients.map((function(e){return e.role_name}));setTimeout((function(){return __awaiter(r,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:console.log("[VIEW] Reloading envelope...");e=this;return[4,throttledGetEnvelope(this.endpoint,this.envelopeId)];case 1:e.envelope=n.sent();console.log("[VIEW] Reloaded envelope",this.envelope);return[2]}}))}))}),2e3);return[3,4];case 3:i=l.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(i.message,(n=i.response)===null||n===void 0?void 0:n.status,(o=i.response)===null||o===void 0?void 0:o.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handlePageRendered=function(e){var n=e.detail;console.log("[VIEW] Page rendered",n)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var n,o,t,i,i;var r=this;return __generator(this,(function(l){switch(l.label){case 0:t=e.detail.id;switch(t){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,5];case"download-all":return[3,7]}return[3,8];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(e){r.canceling=false;console.log("[VIEW] Envelope canceled",e);return throttledGetEnvelope(r.endpoint,r.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);r.envelope=e})).catch((function(e){var n,o,t;r.canceling=false;console.log("[VIEW] Error canceling envelope",e);(n=r.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(t=e.response)===null||t===void 0?void 0:t.data))}));this.showCancelDone=true;(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,8];case 2:window.print();(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,8];case 3:return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,this.envelope.envelope_document_id)];case 4:i=l.sent();window.open(i,"_blank");return[3,8];case 5:return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,this.envelope.certificate_document_id)];case 6:i=l.sent();window.open(i,"_blank");return[3,8];case 7:saveEnvelopesAsZip(this.endpoint,[this.envelope]).then((function(){var e;(e=r.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:r.endpoint,envelope:r.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,8];case 8:return[2]}}))}))};e.prototype.render=function(){var e=this;var n;if(!this.envelope){return h(Host,null,h("img",{src:"https://verdocs-public-assets.s3.amazonaws.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var o=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.session,this.envelope)){o.push({id:"cancel",label:"Cancel"})}var t=this.envelope.documents.length>0;var i=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var r=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(t||r){o.push({label:""});if(t){o.push({id:"download-attachments",label:i>1?"Download Documents":"Download Document"})}if(r){o.push({id:"download-certificate",label:"Download Certificate"})}if(t&&r){o.push({id:"download-all",label:"Download All Files"})}}return h(Host,null,h("div",{id:"verdocs-view-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:o,onOptionSelected:function(n){return e.handleOptionSelected(n)}}))),h("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((n=this.envelope)===null||n===void 0?void 0:n.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(n){var o=integerSequence(1,n.page_numbers);return h(Fragment,null,o.map((function(o){return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:n.id,endpoint:e.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:o,onPageRendered:function(n){return e.handlePageRendered(n)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&h("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=verdocsViewCss;export{VerdocsView as verdocs_view};
|
@@ -1 +1 @@
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-d5ba09f3.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy(JSON.parse('[["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"store":[32]}]]],["ipc-test",[[0,"ipc-test",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-settings",[[0,"verdocs-settings",{"endpoint":[16],"tab":[32]}]]],["verdocs-envelopes-list",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]}]]],["verdocs-templates-list",[[0,"verdocs-templates-list",{"endpoint":[16],"sharing":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"envelope":[32],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"submitting":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showManageDialog":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"loading":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"orgname":[32],"first":[32],"last":[32],"username":[32],"phone":[32],"password":[32],"submitting":[32],"activeSession":[32],"accountType":[32],"howHear":[32],"industry":[32],"companySize":[32],"reason":[32],"signupStep":[32],"resendDisabled":[32],"checkingOrg":[32]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-activity-box",[[0,"verdocs-activity-box",{"endpoint":[16],"items":[2],"view":[1],"header":[1],"title":[32],"count":[32],"loading":[32],"entries":[32]}]]],["verdocs-floating-menu",[[0,"verdocs-floating-menu",{"options":[16]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-button-panel",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"templateid":[1],"fieldname":[1],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-loader",[[0,"verdocs-loader"]]],["verdocs-button_3",[[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4]}],[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"envelope":[32],"roleNames":[32],"showCancelDone":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["verdocs-template-star",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["verdocs-envelope-recipient-link_2",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"loading":[32],"gettingLink":[32],"link":[32]}],[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"loading":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32]}]]],["verdocs-quick-functions_2",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-envelope-document-page",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["verdocs-settings-api-keys_4",[[0,"verdocs-settings-members",{"endpoint":[16],"members":[32],"invited":[32],"roles":[32],"selectedTab":[32],"invitingMember":[32],"newEmailAddress":[32],"newRoleId":[32],"submitting":[32],"deletingInvitation":[32],"resendingInvitation":[32],"deletingMember":[32]}],[0,"verdocs-settings-api-keys",{"endpoint":[16],"keys":[32],"creatingKey":[32],"createdKey":[32],"deletingKey":[32],"rotatingKey":[32],"newApiKeyName":[32],"newApiKeyProfileId":[32],"members":[32]}],[0,"verdocs-settings-organization",{"endpoint":[16],"valid":[32],"dirty":[32],"submitting":[32],"name":[32],"business_name":[32],"contact_email":[32],"phone":[32],"address":[32],"address2":[32],"timezone":[32],"url":[32]}],[0,"verdocs-settings-profile",{"endpoint":[16],"valid":[32],"dirty":[32],"submitting":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32]}]]],["verdocs-pagination_2",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-spinner",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["verdocs-tabs",[[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["verdocs-contact-picker_2",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"nameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-file-chooser_2",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["verdocs-dropdown",[[0,"verdocs-dropdown",{"options":[16]},[[9,"resize","handleResize"]]]]],["verdocs-dialog_2",[[4,"verdocs-dialog"],[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["verdocs-checkbox_5",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"loading":[32],"setting":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"value":[32],"leading":[32],"showingHelp":[32]}],[4,"verdocs-portal",{"anchor":[1],"voffset":[2],"align":[1]},[[11,"scroll","handleScroll"],[11,"resize","handleResize"],[10,"click","handleClick"]]],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]],["verdocs-field-attachment_15",[[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-field-attachment",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"templateid":[1],"fieldname":[1],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"templateid":[1],"fieldname":[1],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"templateid":[1],"fieldname":[1],"option":[2],"disabled":[4],"done":[4],"editable":[4],"moveable":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio-button",{"templateid":[1],"fieldname":[1],"option":[2],"disabled":[4],"done":[4],"editable":[4],"moveable":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"endpoint":[16],"templateid":[1],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-preview_8",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"store":[32]}],[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"environment":[1],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"reset":[64]}],[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32]}],[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"personal":[32],"public":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"store":[32]}]]],["verdocs-template-fields_4",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"loading":[32]}],[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"full_name":[32],"email":[32],"phone":[32],"delegator":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]]]'),e)}));
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-172625c5.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy(JSON.parse('[["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"store":[32]}]]],["ipc-test",[[0,"ipc-test",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-settings",[[0,"verdocs-settings",{"endpoint":[16],"tab":[32]}]]],["verdocs-envelopes-list",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]}]]],["verdocs-templates-list",[[0,"verdocs-templates-list",{"endpoint":[16],"sharing":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"envelope":[32],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"submitting":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showManageDialog":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"loading":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"orgname":[32],"first":[32],"last":[32],"username":[32],"phone":[32],"password":[32],"submitting":[32],"activeSession":[32],"accountType":[32],"howHear":[32],"industry":[32],"companySize":[32],"reason":[32],"signupStep":[32],"resendDisabled":[32],"checkingOrg":[32]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-activity-box",[[0,"verdocs-activity-box",{"endpoint":[16],"items":[2],"view":[1],"header":[1],"title":[32],"count":[32],"loading":[32],"entries":[32]}]]],["verdocs-floating-menu",[[0,"verdocs-floating-menu",{"options":[16]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-button-panel",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"templateid":[1],"fieldname":[1],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-loader",[[0,"verdocs-loader"]]],["verdocs-button_3",[[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4]}],[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"envelope":[32],"roleNames":[32],"showCancelDone":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["verdocs-template-star",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["verdocs-envelope-recipient-link_2",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"loading":[32],"gettingLink":[32],"link":[32]}],[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"loading":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32]}]]],["verdocs-quick-functions_2",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-envelope-document-page",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["verdocs-settings-api-keys_4",[[0,"verdocs-settings-members",{"endpoint":[16],"members":[32],"invited":[32],"roles":[32],"selectedTab":[32],"invitingMember":[32],"newEmailAddress":[32],"newRoleId":[32],"submitting":[32],"deletingInvitation":[32],"resendingInvitation":[32],"deletingMember":[32]}],[0,"verdocs-settings-api-keys",{"endpoint":[16],"keys":[32],"creatingKey":[32],"createdKey":[32],"deletingKey":[32],"rotatingKey":[32],"newApiKeyName":[32],"newApiKeyProfileId":[32],"members":[32]}],[0,"verdocs-settings-organization",{"endpoint":[16],"valid":[32],"dirty":[32],"submitting":[32],"name":[32],"business_name":[32],"contact_email":[32],"phone":[32],"address":[32],"address2":[32],"timezone":[32],"url":[32]}],[0,"verdocs-settings-profile",{"endpoint":[16],"valid":[32],"dirty":[32],"submitting":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32]}]]],["verdocs-pagination_2",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-spinner",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["verdocs-tabs",[[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["verdocs-contact-picker_2",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"nameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-file-chooser_2",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["verdocs-dropdown",[[0,"verdocs-dropdown",{"options":[16]},[[9,"resize","handleResize"]]]]],["verdocs-dialog_2",[[4,"verdocs-dialog"],[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["verdocs-checkbox_5",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"loading":[32],"setting":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"value":[32],"leading":[32],"showingHelp":[32]}],[4,"verdocs-portal",{"anchor":[1],"voffset":[2],"align":[1]},[[11,"scroll","handleScroll"],[11,"resize","handleResize"],[10,"click","handleClick"]]],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]],["verdocs-field-attachment_15",[[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-field-attachment",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"templateid":[1],"fieldname":[1],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"templateid":[1],"fieldname":[1],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"templateid":[1],"fieldname":[1],"option":[2],"disabled":[4],"done":[4],"editable":[4],"moveable":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio-button",{"templateid":[1],"fieldname":[1],"option":[2],"disabled":[4],"done":[4],"editable":[4],"moveable":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"endpoint":[16],"templateid":[1],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-preview_8",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"store":[32]}],[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"environment":[1],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"reset":[64]}],[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32]}],[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"personal":[32],"public":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"store":[32]}]]],["verdocs-template-fields_4",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"loading":[32]}],[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"full_name":[32],"email":[32],"phone":[32],"delegator":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]]]'),e)}));
|
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++){t=arguments[o];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,o,i){function s(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function r(e){try{a(i.next(e))}catch(e){n(e)}}function l(e){try{a(i["throw"](e))}catch(e){n(e)}}function a(e){e.done?o(e.value):s(e.value).then(r,l)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,s,n,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,s&&(n=r[0]&2?s["return"]:r[0]?s["throw"]||((n=s["return"])&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;if(s=0,n)r=[r[0]&2,n.value];switch(r[0]){case 0:case 1:n=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;s=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!n||r[1]>n[0]&&r[1]<n[3])){o.label=r[1];break}if(r[0]===6&&o.label<n[1]){o.label=n[1];n=r;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(r);break}if(n[2])o.ops.pop();o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e];s=0}finally{i=n=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var i=0,s=t.length,n;i<s;i++){if(n||!(i in t)){if(!n)n=Array.prototype.slice.call(t,0,i);n[i]=t[i]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-cd61fea7.system.js","./p-54498887.system.js","./p-235b4a0b.system.js","./p-26580438.system.js","./p-5e45c089.system.js","./p-138bd0cf.system.js","./p-0cafdb16.system.js","./p-187b20b7.system.js","./p-8aae8d16.system.js","./p-877c2b06.system.js","./p-05eb4fed.system.js","./p-6e9af353.system.js","./p-3f628837.system.js","./p-ca13070e.system.js","./p-39e8600d.system.js","./p-bbee73c8.system.js","./p-173e86c3.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,o,i,s,n,r,l,a,d,c,p,u,m,h,f,v,g,b,x,y,w,k,_,S,I,E,C,P;return{setters:[function(e){t=e.r;o=e.c;i=e.h;s=e.H},function(){},function(e){n=e.V;r=e.b;l=e.u},function(e){a=e.g},function(e){d=e.g;c=e.b;p=e.a},function(e){u=e.g},function(e){m=e.r},function(e){h=e.S},function(e){f=e.j},function(e){v=e.a;g=e.i},function(e){b=e.g},function(e){x=e.c;y=e.d},function(e){w=e.D;k=e.P;_=e.J;S=e.a;I=e.F;E=e.b;C=e.T},function(e){P=e.V},function(){},function(){},function(){},function(){}],execute:function(){var D=function(e,t,o){return e.api.post("/templates/".concat(t,"/reminder/"),o).then((function(e){return e.data}))};var L=function(e,t,o,i){return e.api.put("/templates/".concat(t,"/reminder/").concat(o),i).then((function(e){return e.data}))};var T=function(e,t,o){return e.api.delete("/templates/".concat(t,"/reminder/").concat(o)).then((function(e){return e.data}))};var z='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';var R=e("verdocs_preview",function(){function e(e){t(this,e);this.sdkError=o(this,"sdkError",7);this.templateStore=null;this.fieldStore=null;this.roleStore=null;this.endpoint=n.getDefault();this.templateId=null;this.loading=true}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o;var i=this;return __generator(this,(function(s){try{this.endpoint.loadSession();if(!this.templateId){console.log("[PREVIEW] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return[2]}u(this.endpoint,this.templateId,true).then((function(e){i.templateStore=e;console.log("[PREVIEW] Loaded Template Store",e.state);i.fieldStore=a(i.templateId);i.roleStore=d(i.templateId);console.log("[PREVIEW] Loaded template",i.templateStore.state,i.roleStore.get("roles"),i.fieldStore.get("fields"));i.loading=false})).catch((function(e){console.log(e)}))}catch(i){console.log("[PREVIEW] Error with preview session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(o=i.response)===null||o===void 0?void 0:o.data))}return[2]}))}))};e.prototype.handlePageRendered=function(e){var t,o;var i=e.detail;var s=(o=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.fields.filter((function(e){return e.page_sequence===i.pageNumber}));console.log("[PREVIEW] Page rendered",i,s);s.forEach((function(e){return m(e,i,{disabled:true,editable:false,draggable:false})}))};e.prototype.render=function(){var e=this;var t,o;if(this.loading){return i(s,null,i("verdocs-loader",null))}var n=__spreadArray([],(o=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.pages,true);n.sort((function(e,t){return e.sequence-t.sequence}));return i(s,null,n.map((function(t){return i("verdocs-template-document-page",{templateId:t.template_id,documentId:t.document_id,pageNumber:t.sequence,disabled:true,editable:true,done:false,virtualWidth:612,virtualHeight:792,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))};return e}());R.style=z;var U='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';var A='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';var N='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var M='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var j='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var H=e("verdocs_send",function(){function e(e){t(this,e);this.sendingEnvelope=o(this,"sendingEnvelope",7);this.send=o(this,"send",7);this.exit=o(this,"exit",7);this.sdkError=o(this,"sdkError",7);this.searchContacts=o(this,"searchContacts",7);this.levels=[];this.templateStore=null;this.roleStore=null;this.endpoint=n.getDefault();this.templateId=null;this.environment="web";this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={}}e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,s,n,r,l,a,c;var p=this;return __generator(this,(function(m){switch(m.label){case 0:m.trys.push([0,2,,3]);r=this.endpoint.loadSession();if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SEND] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,u(this.endpoint,this.templateId,false)];case 1:l.templateStore=m.sent();this.roleStore=d(this.templateId);if(!((t=(e=this.templateStore)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_sendable)){console.warn("[SEND] Template is not sendable",this.templateId)}if(this.roleStore.get("roles")){a={};this.rolesCompleted={};this.roleStore.get("roles").forEach((function(e){var t=e.sequence-1;a[t]||(a[t]=[]);var o="r-".concat(t,"-").concat(a[t].length);a[t].push(__assign(__assign({},e),{id:o}));if(e.full_name&&(e.email||e.phone)){p.rolesCompleted[o]=__assign(__assign({},e),{id:o})}}));this.rolesAtLevel=a;this.levels=Object.keys(a).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}if((o=r===null||r===void 0?void 0:r.session)===null||o===void 0?void 0:o.profile){this.sessionContacts.push({id:r.session.profile.id,name:"".concat(r.session.profile.first_name," ").concat(r.session.profile.last_name),email:r.session.profile.email,phone:r.session.profile.phone})}return[3,3];case 2:c=m.sent();console.log("[SEND] Error with preview session",c);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new h(c.message,(s=c.response)===null||s===void 0?void 0:s.status,(n=c.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return i("div",{class:"level-icon",innerHTML:N})}else if(e>=this.levels.length){return i("div",{class:"level-icon",innerHTML:j})}else{return i("div",{class:"level-icon",innerHTML:M})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.rolesCompleted[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t=this;var o,i,s;if(this.sending){console.log("Skipping duplicate send",e);return}console.log("Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;(o=this.sendingEnvelope)===null||o===void 0?void 0:o.emit({sending:true});var n={template_id:this.templateId,name:(s=(i=this.templateStore)===null||i===void 0?void 0:i.state)===null||s===void 0?void 0:s.name,environment:this.environment,roles:Object.values(this.rolesCompleted),prepared_fields:[]};console.log("[SEND] Creating envelope",n);f(this.endpoint,n).then((function(e){var o,i;console.log("[SEND] Send envelope",e);t.reset().catch((function(e){return console.log("Unknown Error",e)}));t.sending=false;(o=t.sendingEnvelope)===null||o===void 0?void 0:o.emit({sending:false});(i=t.send)===null||i===void 0?void 0:i.emit(__assign(__assign({},n),{envelope_id:e.id,envelope:e}))})).catch((function(e){var o;console.log("Send error",e);t.sending=false;(o=t.sendingEnvelope)===null||o===void 0?void 0:o.emit({sending:false})}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t,o;var n=c(this.roleStore);var r=Object.values(this.rolesCompleted).filter((function(e){return v(e.email)||g(e.phone)}));var l=r.length>=n.length;return i(s,{class:{sendable:(o=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),this.levels.map((function(t){return i("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.rolesAtLevel[t].map((function(t){var o,s,n,r,l,a;var d=!t.email;var c="verdocs-send-recipient-".concat(t.name);return d?i("div",{class:"recipient",style:{backgroundColor:b(p(e.roleStore,t.name))},onClick:function(o){return e.handleClickRole(o,t)},id:c},(s=(o=e.rolesCompleted[t.id])===null||o===void 0?void 0:o.full_name)!==null&&s!==void 0?s:t.name,i("div",{class:"icon",innerHTML:A}),e.showPickerForId===t.id&&i("verdocs-portal",{anchor:c,onClickAway:function(){return e.showPickerForId=""}},i("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(o){return e.handleSelectContact(o,t)},contactSuggestions:e.sessionContacts,templateRole:(n=e.rolesCompleted[t.id])!==null&&n!==void 0?n:t,onSearchContacts:function(t){var o;return(o=e.searchContacts)===null||o===void 0?void 0:o.emit(t.detail)}}))):i("div",{class:"recipient",style:{borderColor:b(p(e.roleStore,t.name))},onClick:function(o){return e.handleClickRole(o,t)},id:c},(l=(r=e.rolesCompleted[t.id])===null||r===void 0?void 0:r.full_name)!==null&&l!==void 0?l:t.full_name,i("div",{class:"icon",innerHTML:A}),e.showPickerForId===t.id&&i("verdocs-portal",{anchor:c,onClickAway:function(){return e.showPickerForId=""}},i("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(o){return e.handleSelectContact(o,t)},contactSuggestions:e.sessionContacts,templateRole:(a=e.rolesCompleted[t.id])!==null&&a!==void 0?a:t,onSearchContacts:function(t){var o;return(o=e.searchContacts)===null||o===void 0?void 0:o.emit(t.detail)}})))})))})),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)},disabled:this.sending}),i("verdocs-button",{label:"Send",size:"small",disabled:!l||this.sending,onClick:function(t){return e.handleSend(t)}}),this.sending&&i("verdocs-spinner",null)))};return e}());H.style=U;var F='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';var B=e("verdocs_template_attachments",function(){function e(e){t(this,e);this.exit=o(this,"exit",7);this.next=o(this,"next",7);this.templateUpdated=o(this,"templateUpdated",7);this.sdkError=o(this,"sdkError",7);this.endpoint=n.getDefault();this.templateId="";this.uploading=false;this.progressLabel="Uploading...";this.progressPercent=0;this.showDeleteError=false;this.confirmDeleteDocument=null;this.store=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,s;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}i=this;return[4,u(this.endpoint,this.templateId,false)];case 1:i.store=n.sent();return[3,3];case 2:s=n.sent();console.log("[TEMPLATE ATTACHMENTS] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(o=s.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleUploadProgress=function(e){if(e>=99){this.progressPercent=100;this.progressLabel="Processing..."}else{this.progressPercent=e}};e.prototype.handleUpload=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,s,n,r,l,a;return __generator(this,(function(d){switch(d.label){case 0:e.stopPropagation();n=e.detail.file;if(!n){return[2]}console.log("[ATTACHMENTS] Uploading...",n);this.uploading=true;this.progressLabel="Uploading...";d.label=1;case 1:d.trys.push([1,4,,5]);return[4,x(this.endpoint,this.templateId,n,this.handleUploadProgress.bind(this))];case 2:r=d.sent();console.log("[ATTACHMENTS] Created attachment",r);l=this;return[4,u(this.endpoint,this.templateId,false)];case 3:l.store=d.sent();console.log("[ATTACHMENTS] Updated template",this.store.state);(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"});this.uploading=false;this.progressLabel="";this.progressPercent=0;return[3,5];case 4:a=d.sent();console.log("[ATTACHMENTS] Error creating template",a);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new h(a.message,(i=a.response)===null||i===void 0?void 0:i.status,(s=a.response)===null||s===void 0?void 0:s.data));this.uploading=false;return[3,5];case 5:return[2]}}))}))};e.prototype.handleNext=function(e){var t;e.stopPropagation();this.uploading=false;this.progressLabel="";this.progressPercent=0;(t=this.next)===null||t===void 0?void 0:t.emit({template:this.store.state})};e.prototype.confirmDelete=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,y(this.endpoint,this.templateId,this.confirmDeleteDocument.id)];case 1:t.sent();e=this;return[4,u(this.endpoint,this.templateId,false)];case 2:e.store=t.sent();console.log("[ATTACHMENTS] New template",this.store.state);this.confirmDeleteDocument=null;return[2]}}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(o){if(((t=this.store.state)===null||t===void 0?void 0:t.template_documents.length)>1){this.confirmDeleteDocument=e}else{this.showDeleteError=true}return[2]}))}))};e.prototype.getFileIcon=function(e){switch(e.mime){case"application/pdf":return S;case"image/jpeg":return _;case"image/png":return k;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return w}return I};e.prototype.render=function(){var e=this;var t,o,n;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var r=(t=this.store)===null||t===void 0?void 0:t.state;if(!r.isLoaded){return i(s,{class:"loading"},i("verdocs-loader",null))}if(!this.endpoint.session||!r.profile_id){return i(s,{class:"empty"})}return i(s,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},(o=this.store)===null||o===void 0?void 0:o.state.template_documents.map((function(t){return i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:e.getFileIcon(t)}),i("div",{class:"filename",title:t.name},t.name),i("div",{class:"pages"},i("div",{class:"count"},t.page_numbers),i("div",{class:"pages-icon",innerHTML:E})),i("div",{class:"trash-icon",innerHTML:C,onClick:function(){return e.handleDelete(t)}}))}))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:function(t){return e.handleUpload(t)}}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleNext(t)},disabled:!((n=this.store)===null||n===void 0?void 0:n.state.template_documents.length)||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:function(){return e.showDeleteError=false}}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:function(){return e.confirmDelete()},showCancel:true,onExit:function(){e.confirmDeleteDocument=null}}))};return e}());B.style=F;var O='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-build-tabs{-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;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}';var W=["attachments","roles","settings","fields","preview"];var V=e("verdocs_template_build_tabs",function(){function e(e){t(this,e);this.sdkError=o(this,"sdkError",7);this.stepChanged=o(this,"stepChanged",7);this.endpoint=n.getDefault();this.templateId=null;this.step="preview";this.store=null}e.prototype.onStepChanged=function(){console.log("Step changed",this.step,this.templateId);this.loadTemplate().catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o;return __generator(this,(function(i){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){this.step="preview";return[2]}this.loadTemplate().catch((function(e){return console.log("[BUILD_TABS] Unable to load template",e)}))}catch(i){console.log("[BUILD_TABS] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(o=i.response)===null||o===void 0?void 0:o.data))}return[2]}))}))};e.prototype.loadTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!this.templateId)return[3,2];e=this;return[4,u(this.endpoint,this.templateId,false)];case 1:e.store=t.sent();t.label=2;case 2:return[2]}}))}))};e.prototype.setStep=function(e){var t;console.log("Selected step",e.detail.tab.id);e.stopPropagation();e.preventDefault();this.step=e.detail.tab.id;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e.detail.tab.id)};e.prototype.render=function(){var e=this;var t,o,n,r,l,a,d,c,p;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var u=false;var m=false;var h=false;console.log("[BUILD_TABS] Rendering tabs",this.templateId,this.step);if(this.templateId&&this.store&&this.store.state){h=((n=(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.template_documents)===null||n===void 0?void 0:n.length)>0;m=h&&((a=(l=(r=this.store)===null||r===void 0?void 0:r.state)===null||l===void 0?void 0:l.roles)===null||a===void 0?void 0:a.length)>0;u=m&&((p=(c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.fields)===null||p===void 0?void 0:p.length)>0}var f=Math.max(W.indexOf(this.step),0);if(!u&&f>=4){f=3}if(!m&&f>=3){f=1}if(!h&&f>=1){f=0}console.log({selectedStepIndex:f,canPreview:u,canEditFields:m,canEditRoles:h});return i(s,null,i("verdocs-tabs",{onSelectTab:function(t){return e.setStep(t)},selectedTab:f,tabs:[{id:"attachments",disabled:false,label:this.templateId&&this.store?"Attachment(s)":"Upload Attachment(s)"},{id:"roles",disabled:!h,label:"Roles"},{id:"settings",disabled:!m,label:"Settings"},{id:"fields",disabled:!m,label:"Fields"},{id:"preview",disabled:!u,label:"Preview/Send"}]}))};Object.defineProperty(e,"watchers",{get:function(){return{step:["onStepChanged"]}},enumerable:false,configurable:true});return e}());V.style=O;var q='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var Y=" ";var G='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var J=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=o(this,"exit",7);this.next=o(this,"next",7);this.sdkError=o(this,"sdkError",7);this.templateCreated=o(this,"templateCreated",7);this.endpoint=n.getDefault();this.file=undefined;this.creating=false;this.progressLabel="Uploading...";this.progressPercent=0}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,s,n;var l=this;return __generator(this,(function(a){switch(a.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;this.progressLabel="Uploading...";a.label=1;case 1:a.trys.push([1,3,,4]);return[4,r(this.endpoint,{name:this.file.name,documents:[this.file]},(function(e){if(e>=99){l.progressLabel="Processing...";l.progressPercent=100}else{l.progressPercent=e}}))];case 2:s=a.sent();console.log("[CREATE] Created template",s);u(this.endpoint,s.id,true).then((function(){var e,t;(e=l.templateCreated)===null||e===void 0?void 0:e.emit({endpoint:l.endpoint,template:s,templateId:s.id});(t=l.next)===null||t===void 0?void 0:t.emit(s);l.creating=false;l.progressLabel="";l.progressPercent=0})).catch((function(e){console.log(e)}));return[3,4];case 3:n=a.sent();console.log("[CREATE] Error creating template",n);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new h(n.message,(o=n.response)===null||o===void 0?void 0:o.status,(i=n.response)===null||i===void 0?void 0:i.data));this.creating=false;return[3,4];case 4:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return i(s,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):i("div",{class:"upload-box",onDrop:function(t){t.preventDefault();t.target.classList.remove("drag-over");e.file=t.dataTransfer.files[0]},onDragOver:function(e){e.preventDefault();e.dataTransfer.dropEffect="copy"},onDragEnter:function(e){return e.target.classList.add("drag-over")},onDragLeave:function(e){return e.target.classList.remove("drag-over")}},i("div",null,i("span",{innerHTML:G})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?Y:"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating}))))};return e}());J.style=q;var K="";var Q=e("verdocs_template_name",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.name="";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,s,n,r;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}n=this;return[4,u(this.endpoint,this.templateId,false)];case 1:n.store=l.sent();this.name=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.name;this.dirty=false;return[3,3];case 2:r=l.sent();console.log("[TEMPLATE NAME] Error loading template",r);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new h(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(s=r.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,o,i;e.stopPropagation();this.name=(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.name;this.dirty=false;console.log("Closing");(i=this.close)===null||i===void 0?void 0:i.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i;return __generator(this,(function(s){switch(s.label){case 0:e.stopPropagation();return[4,l(this.endpoint,this.templateId,{name:this.name})];case 1:s.sent();if((t=this.store)===null||t===void 0?void 0:t.state){this.store.state.name=this.name}this.dirty=false;(o=this.templateUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,template:this.store.state,event:"name"});(i=this.close)===null||i===void 0?void 0:i.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,o;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.isLoading){return i(s,{class:"loading"},i("verdocs-loader",null))}return i(s,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("label",{htmlFor:"verdocs-template-name"},"Template Name"),i("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:function(t){var o,i;e.name=t.target.value;e.dirty=e.name!==((i=(o=e.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.name)}}),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};return e}());Q.style=K;var X='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';var Z=e("verdocs_template_reminders",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.showPlanBlocker=false;this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,s,n,r;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}n=this;return[4,u(this.endpoint,this.templateId,false)];case 1:n.store=l.sent();this.sendReminders=!!((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.reminder_id);this.dirty=false;return[3,3];case 2:r=l.sent();console.log("[TEMPLATE REMINDERS] Error loading template",r);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new h(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(s=r.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,o,i;e.stopPropagation();this.sendReminders=!!((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.reminder_id);this.dirty=false;(i=this.close)===null||i===void 0?void 0:i.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,s,n,r,l,a,d,c,p,m,f,v;return __generator(this,(function(g){switch(g.label){case 0:e.stopPropagation();g.label=1;case 1:g.trys.push([1,12,,13]);if(!this.sendReminders)return[3,8];c={setup_time:+this.firstReminderDays,interval_time:+this.reminderDays};if(!!((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.reminder_id))return[3,4];return[4,D(this.endpoint,this.templateId,c)];case 2:g.sent();p=this;return[4,u(this.endpoint,this.templateId,false)];case 3:p.store=g.sent();return[3,7];case 4:return[4,L(this.endpoint,this.templateId,(i=this.store)===null||i===void 0?void 0:i.state.reminder_id,c)];case 5:g.sent();m=this;return[4,u(this.endpoint,this.templateId,false)];case 6:m.store=g.sent();g.label=7;case 7:return[3,11];case 8:return[4,T(this.endpoint,this.templateId,(s=this.store)===null||s===void 0?void 0:s.state.reminder_id)];case 9:g.sent();f=this;return[4,u(this.endpoint,this.templateId,false)];case 10:f.store=g.sent();g.label=11;case 11:(n=this.templateUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"});return[3,13];case 12:v=g.sent();console.log("[TEMPLATE REMINDERS] Unable to update reminders",v);P(v.message);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new h(v.message,(l=v.response)===null||l===void 0?void 0:l.status,(a=v.response)===null||a===void 0?void 0:a.data));return[3,13];case 13:this.dirty=false;(d=this.close)===null||d===void 0?void 0:d.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,o;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.isLoaded)){return i(s,{class:"empty"})}return i(s,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("h5",null,"Reminders"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),i("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){e.sendReminders=t.target.checked;e.dirty=true}})),i("p",null,i("strong",null,"NOTE:")," Reminders will only be sent for up to 14 days."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),i("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:function(t){e.firstReminderDays=t.target.value;e.dirty=true},disabled:!this.sendReminders})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),i("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:function(t){e.reminderDays=t.target.value;e.dirty=true},disabled:!this.sendReminders})),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))),this.showPlanBlocker&&i("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:function(){return e.showPlanBlocker=false}}))};return e}());Z.style=X;var $='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';var ee=e("verdocs_template_visibility",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.dirty=false;this.personal=false;this.public=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,s,n,r,l,a;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[VISIBILITY] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[VISIBILITY] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,u(this.endpoint,this.templateId,false)];case 1:l.store=d.sent();this.personal=((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_personal)||true;this.public=((i=(o=this.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.is_public)||false;this.dirty=false;return[3,3];case 2:a=d.sent();console.log("[TEMPLATE VISIBILITY] Error loading template",a);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new h(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(r=a.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,o,i,s,n;e.stopPropagation();this.personal=(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.is_personal;this.public=(s=(i=this.store)===null||i===void 0?void 0:i.state)===null||s===void 0?void 0:s.is_public;this.dirty=false;(n=this.close)===null||n===void 0?void 0:n.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i;return __generator(this,(function(s){switch(s.label){case 0:e.stopPropagation();return[4,l(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public})];case 1:s.sent();if((t=this.store)===null||t===void 0?void 0:t.state){this.store.state.is_personal=this.personal;this.store.state.is_public=this.public}this.dirty=false;(o=this.templateUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,template:this.store.state,event:"visibility"});(i=this.close)===null||i===void 0?void 0:i.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,o;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.isLoaded)){return i(s,{class:"empty"})}return i(s,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("h5",null,"Visibility"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-shared"},"Shared"),i("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:function(t){e.personal=!t.target.checked;e.dirty=true}})),i("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-public"},"Public"),i("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:function(t){e.public=t.target.checked;e.dirty=true}})),i("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};return e}());ee.style=$}}}));
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++){t=arguments[o];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,o,i){function s(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function r(e){try{a(i.next(e))}catch(e){n(e)}}function l(e){try{a(i["throw"](e))}catch(e){n(e)}}function a(e){e.done?o(e.value):s(e.value).then(r,l)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,s,n,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,s&&(n=r[0]&2?s["return"]:r[0]?s["throw"]||((n=s["return"])&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;if(s=0,n)r=[r[0]&2,n.value];switch(r[0]){case 0:case 1:n=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;s=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!n||r[1]>n[0]&&r[1]<n[3])){o.label=r[1];break}if(r[0]===6&&o.label<n[1]){o.label=n[1];n=r;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(r);break}if(n[2])o.ops.pop();o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e];s=0}finally{i=n=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var i=0,s=t.length,n;i<s;i++){if(n||!(i in t)){if(!n)n=Array.prototype.slice.call(t,0,i);n[i]=t[i]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-235b4a0b.system.js","./p-95080569.system.js","./p-1f9d9fe5.system.js","./p-b6df9fe6.system.js","./p-0cafdb16.system.js","./p-187b20b7.system.js","./p-8aae8d16.system.js","./p-877c2b06.system.js","./p-05eb4fed.system.js","./p-6e9af353.system.js","./p-3f628837.system.js","./p-ca13070e.system.js","./p-3af6b910.system.js","./p-bbee73c8.system.js","./p-173e86c3.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,o,i,s,n,r,l,a,d,c,p,u,m,h,f,v,g,b,x,y,w,k,_,S,I,E,C,P;return{setters:[function(e){t=e.r;o=e.c;i=e.h;s=e.H},function(){},function(e){n=e.V;r=e.b;l=e.u},function(e){a=e.g},function(e){d=e.g;c=e.b;p=e.a},function(e){u=e.g},function(e){m=e.r},function(e){h=e.S},function(e){f=e.j},function(e){v=e.a;g=e.i},function(e){b=e.g},function(e){x=e.c;y=e.d},function(e){w=e.D;k=e.P;_=e.J;S=e.a;I=e.F;E=e.b;C=e.T},function(e){P=e.V},function(){},function(){},function(){},function(){}],execute:function(){var D=function(e,t,o){return e.api.post("/templates/".concat(t,"/reminder/"),o).then((function(e){return e.data}))};var L=function(e,t,o,i){return e.api.put("/templates/".concat(t,"/reminder/").concat(o),i).then((function(e){return e.data}))};var T=function(e,t,o){return e.api.delete("/templates/".concat(t,"/reminder/").concat(o)).then((function(e){return e.data}))};var z='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';var R=e("verdocs_preview",function(){function e(e){t(this,e);this.sdkError=o(this,"sdkError",7);this.templateStore=null;this.fieldStore=null;this.roleStore=null;this.endpoint=n.getDefault();this.templateId=null;this.loading=true}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o;var i=this;return __generator(this,(function(s){try{this.endpoint.loadSession();if(!this.templateId){console.log("[PREVIEW] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return[2]}u(this.endpoint,this.templateId,true).then((function(e){i.templateStore=e;console.log("[PREVIEW] Loaded Template Store",e.state);i.fieldStore=a(i.templateId);i.roleStore=d(i.templateId);console.log("[PREVIEW] Loaded template",i.templateStore.state,i.roleStore.get("roles"),i.fieldStore.get("fields"));i.loading=false})).catch((function(e){console.log(e)}))}catch(i){console.log("[PREVIEW] Error with preview session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(o=i.response)===null||o===void 0?void 0:o.data))}return[2]}))}))};e.prototype.handlePageRendered=function(e){var t,o;var i=e.detail;var s=(o=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.fields.filter((function(e){return e.page_sequence===i.pageNumber}));console.log("[PREVIEW] Page rendered",i,s);s.forEach((function(e){return m(e,i,{disabled:true,editable:false,draggable:false})}))};e.prototype.render=function(){var e=this;var t,o;if(this.loading){return i(s,null,i("verdocs-loader",null))}var n=__spreadArray([],(o=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.pages,true);n.sort((function(e,t){return e.sequence-t.sequence}));return i(s,null,n.map((function(t){return i("verdocs-template-document-page",{templateId:t.template_id,documentId:t.document_id,pageNumber:t.sequence,disabled:true,editable:true,done:false,virtualWidth:612,virtualHeight:792,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))};return e}());R.style=z;var U='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';var A='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';var N='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var M='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var j='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var H=e("verdocs_send",function(){function e(e){t(this,e);this.sendingEnvelope=o(this,"sendingEnvelope",7);this.send=o(this,"send",7);this.exit=o(this,"exit",7);this.sdkError=o(this,"sdkError",7);this.searchContacts=o(this,"searchContacts",7);this.levels=[];this.templateStore=null;this.roleStore=null;this.endpoint=n.getDefault();this.templateId=null;this.environment="web";this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={}}e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,s,n,r,l,a,c;var p=this;return __generator(this,(function(m){switch(m.label){case 0:m.trys.push([0,2,,3]);r=this.endpoint.loadSession();if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SEND] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,u(this.endpoint,this.templateId,false)];case 1:l.templateStore=m.sent();this.roleStore=d(this.templateId);if(!((t=(e=this.templateStore)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_sendable)){console.warn("[SEND] Template is not sendable",this.templateId)}if(this.roleStore.get("roles")){a={};this.rolesCompleted={};this.roleStore.get("roles").forEach((function(e){var t=e.sequence-1;a[t]||(a[t]=[]);var o="r-".concat(t,"-").concat(a[t].length);a[t].push(__assign(__assign({},e),{id:o}));if(e.full_name&&(e.email||e.phone)){p.rolesCompleted[o]=__assign(__assign({},e),{id:o})}}));this.rolesAtLevel=a;this.levels=Object.keys(a).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}if((o=r===null||r===void 0?void 0:r.session)===null||o===void 0?void 0:o.profile){this.sessionContacts.push({id:r.session.profile.id,name:"".concat(r.session.profile.first_name," ").concat(r.session.profile.last_name),email:r.session.profile.email,phone:r.session.profile.phone})}return[3,3];case 2:c=m.sent();console.log("[SEND] Error with preview session",c);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new h(c.message,(s=c.response)===null||s===void 0?void 0:s.status,(n=c.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return i("div",{class:"level-icon",innerHTML:N})}else if(e>=this.levels.length){return i("div",{class:"level-icon",innerHTML:j})}else{return i("div",{class:"level-icon",innerHTML:M})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.rolesCompleted[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t=this;var o,i,s;if(this.sending){console.log("Skipping duplicate send",e);return}console.log("Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;(o=this.sendingEnvelope)===null||o===void 0?void 0:o.emit({sending:true});var n={template_id:this.templateId,name:(s=(i=this.templateStore)===null||i===void 0?void 0:i.state)===null||s===void 0?void 0:s.name,environment:this.environment,roles:Object.values(this.rolesCompleted),prepared_fields:[]};console.log("[SEND] Creating envelope",n);f(this.endpoint,n).then((function(e){var o,i;console.log("[SEND] Send envelope",e);t.reset().catch((function(e){return console.log("Unknown Error",e)}));t.sending=false;(o=t.sendingEnvelope)===null||o===void 0?void 0:o.emit({sending:false});(i=t.send)===null||i===void 0?void 0:i.emit(__assign(__assign({},n),{envelope_id:e.id,envelope:e}))})).catch((function(e){var o;console.log("Send error",e);t.sending=false;(o=t.sendingEnvelope)===null||o===void 0?void 0:o.emit({sending:false})}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t,o;var n=c(this.roleStore);var r=Object.values(this.rolesCompleted).filter((function(e){return v(e.email)||g(e.phone)}));var l=r.length>=n.length;return i(s,{class:{sendable:(o=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),this.levels.map((function(t){return i("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.rolesAtLevel[t].map((function(t){var o,s,n,r,l,a;var d=!t.email;var c="verdocs-send-recipient-".concat(t.name);return d?i("div",{class:"recipient",style:{backgroundColor:b(p(e.roleStore,t.name))},onClick:function(o){return e.handleClickRole(o,t)},id:c},(s=(o=e.rolesCompleted[t.id])===null||o===void 0?void 0:o.full_name)!==null&&s!==void 0?s:t.name,i("div",{class:"icon",innerHTML:A}),e.showPickerForId===t.id&&i("verdocs-portal",{anchor:c,onClickAway:function(){return e.showPickerForId=""}},i("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(o){return e.handleSelectContact(o,t)},contactSuggestions:e.sessionContacts,templateRole:(n=e.rolesCompleted[t.id])!==null&&n!==void 0?n:t,onSearchContacts:function(t){var o;return(o=e.searchContacts)===null||o===void 0?void 0:o.emit(t.detail)}}))):i("div",{class:"recipient",style:{borderColor:b(p(e.roleStore,t.name))},onClick:function(o){return e.handleClickRole(o,t)},id:c},(l=(r=e.rolesCompleted[t.id])===null||r===void 0?void 0:r.full_name)!==null&&l!==void 0?l:t.full_name,i("div",{class:"icon",innerHTML:A}),e.showPickerForId===t.id&&i("verdocs-portal",{anchor:c,onClickAway:function(){return e.showPickerForId=""}},i("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(o){return e.handleSelectContact(o,t)},contactSuggestions:e.sessionContacts,templateRole:(a=e.rolesCompleted[t.id])!==null&&a!==void 0?a:t,onSearchContacts:function(t){var o;return(o=e.searchContacts)===null||o===void 0?void 0:o.emit(t.detail)}})))})))})),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)},disabled:this.sending}),i("verdocs-button",{label:"Send",size:"small",disabled:!l||this.sending,onClick:function(t){return e.handleSend(t)}}),this.sending&&i("verdocs-spinner",null)))};return e}());H.style=U;var F='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';var B=e("verdocs_template_attachments",function(){function e(e){t(this,e);this.exit=o(this,"exit",7);this.next=o(this,"next",7);this.templateUpdated=o(this,"templateUpdated",7);this.sdkError=o(this,"sdkError",7);this.endpoint=n.getDefault();this.templateId="";this.uploading=false;this.progressLabel="Uploading...";this.progressPercent=0;this.showDeleteError=false;this.confirmDeleteDocument=null;this.store=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,s;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}i=this;return[4,u(this.endpoint,this.templateId,false)];case 1:i.store=n.sent();return[3,3];case 2:s=n.sent();console.log("[TEMPLATE ATTACHMENTS] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(o=s.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleUploadProgress=function(e){if(e>=99){this.progressPercent=100;this.progressLabel="Processing..."}else{this.progressPercent=e}};e.prototype.handleUpload=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,s,n,r,l,a;return __generator(this,(function(d){switch(d.label){case 0:e.stopPropagation();n=e.detail.file;if(!n){return[2]}console.log("[ATTACHMENTS] Uploading...",n);this.uploading=true;this.progressLabel="Uploading...";d.label=1;case 1:d.trys.push([1,4,,5]);return[4,x(this.endpoint,this.templateId,n,this.handleUploadProgress.bind(this))];case 2:r=d.sent();console.log("[ATTACHMENTS] Created attachment",r);l=this;return[4,u(this.endpoint,this.templateId,false)];case 3:l.store=d.sent();console.log("[ATTACHMENTS] Updated template",this.store.state);(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"});this.uploading=false;this.progressLabel="";this.progressPercent=0;return[3,5];case 4:a=d.sent();console.log("[ATTACHMENTS] Error creating template",a);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new h(a.message,(i=a.response)===null||i===void 0?void 0:i.status,(s=a.response)===null||s===void 0?void 0:s.data));this.uploading=false;return[3,5];case 5:return[2]}}))}))};e.prototype.handleNext=function(e){var t;e.stopPropagation();this.uploading=false;this.progressLabel="";this.progressPercent=0;(t=this.next)===null||t===void 0?void 0:t.emit({template:this.store.state})};e.prototype.confirmDelete=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,y(this.endpoint,this.templateId,this.confirmDeleteDocument.id)];case 1:t.sent();e=this;return[4,u(this.endpoint,this.templateId,false)];case 2:e.store=t.sent();console.log("[ATTACHMENTS] New template",this.store.state);this.confirmDeleteDocument=null;return[2]}}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(o){if(((t=this.store.state)===null||t===void 0?void 0:t.template_documents.length)>1){this.confirmDeleteDocument=e}else{this.showDeleteError=true}return[2]}))}))};e.prototype.getFileIcon=function(e){switch(e.mime){case"application/pdf":return S;case"image/jpeg":return _;case"image/png":return k;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return w}return I};e.prototype.render=function(){var e=this;var t,o,n;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var r=(t=this.store)===null||t===void 0?void 0:t.state;if(!r.isLoaded){return i(s,{class:"loading"},i("verdocs-loader",null))}if(!this.endpoint.session||!r.profile_id){return i(s,{class:"empty"})}return i(s,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},(o=this.store)===null||o===void 0?void 0:o.state.template_documents.map((function(t){return i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:e.getFileIcon(t)}),i("div",{class:"filename",title:t.name},t.name),i("div",{class:"pages"},i("div",{class:"count"},t.page_numbers),i("div",{class:"pages-icon",innerHTML:E})),i("div",{class:"trash-icon",innerHTML:C,onClick:function(){return e.handleDelete(t)}}))}))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:function(t){return e.handleUpload(t)}}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleNext(t)},disabled:!((n=this.store)===null||n===void 0?void 0:n.state.template_documents.length)||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:function(){return e.showDeleteError=false}}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:function(){return e.confirmDelete()},showCancel:true,onExit:function(){e.confirmDeleteDocument=null}}))};return e}());B.style=F;var O='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-build-tabs{-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;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}';var W=["attachments","roles","settings","fields","preview"];var V=e("verdocs_template_build_tabs",function(){function e(e){t(this,e);this.sdkError=o(this,"sdkError",7);this.stepChanged=o(this,"stepChanged",7);this.endpoint=n.getDefault();this.templateId=null;this.step="preview";this.store=null}e.prototype.onStepChanged=function(){console.log("Step changed",this.step,this.templateId);this.loadTemplate().catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o;return __generator(this,(function(i){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){this.step="preview";return[2]}this.loadTemplate().catch((function(e){return console.log("[BUILD_TABS] Unable to load template",e)}))}catch(i){console.log("[BUILD_TABS] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(o=i.response)===null||o===void 0?void 0:o.data))}return[2]}))}))};e.prototype.loadTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!this.templateId)return[3,2];e=this;return[4,u(this.endpoint,this.templateId,false)];case 1:e.store=t.sent();t.label=2;case 2:return[2]}}))}))};e.prototype.setStep=function(e){var t;console.log("Selected step",e.detail.tab.id);e.stopPropagation();e.preventDefault();this.step=e.detail.tab.id;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e.detail.tab.id)};e.prototype.render=function(){var e=this;var t,o,n,r,l,a,d,c,p;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var u=false;var m=false;var h=false;console.log("[BUILD_TABS] Rendering tabs",this.templateId,this.step);if(this.templateId&&this.store&&this.store.state){h=((n=(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.template_documents)===null||n===void 0?void 0:n.length)>0;m=h&&((a=(l=(r=this.store)===null||r===void 0?void 0:r.state)===null||l===void 0?void 0:l.roles)===null||a===void 0?void 0:a.length)>0;u=m&&((p=(c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.fields)===null||p===void 0?void 0:p.length)>0}var f=Math.max(W.indexOf(this.step),0);if(!u&&f>=4){f=3}if(!m&&f>=3){f=1}if(!h&&f>=1){f=0}console.log({selectedStepIndex:f,canPreview:u,canEditFields:m,canEditRoles:h});return i(s,null,i("verdocs-tabs",{onSelectTab:function(t){return e.setStep(t)},selectedTab:f,tabs:[{id:"attachments",disabled:false,label:this.templateId&&this.store?"Attachment(s)":"Upload Attachment(s)"},{id:"roles",disabled:!h,label:"Roles"},{id:"settings",disabled:!m,label:"Settings"},{id:"fields",disabled:!m,label:"Fields"},{id:"preview",disabled:!u,label:"Preview/Send"}]}))};Object.defineProperty(e,"watchers",{get:function(){return{step:["onStepChanged"]}},enumerable:false,configurable:true});return e}());V.style=O;var q='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var Y=" ";var G='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var J=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=o(this,"exit",7);this.next=o(this,"next",7);this.sdkError=o(this,"sdkError",7);this.templateCreated=o(this,"templateCreated",7);this.endpoint=n.getDefault();this.file=undefined;this.creating=false;this.progressLabel="Uploading...";this.progressPercent=0}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,s,n;var l=this;return __generator(this,(function(a){switch(a.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;this.progressLabel="Uploading...";a.label=1;case 1:a.trys.push([1,3,,4]);return[4,r(this.endpoint,{name:this.file.name,documents:[this.file]},(function(e){if(e>=99){l.progressLabel="Processing...";l.progressPercent=100}else{l.progressPercent=e}}))];case 2:s=a.sent();console.log("[CREATE] Created template",s);u(this.endpoint,s.id,true).then((function(){var e,t;(e=l.templateCreated)===null||e===void 0?void 0:e.emit({endpoint:l.endpoint,template:s,templateId:s.id});(t=l.next)===null||t===void 0?void 0:t.emit(s);l.creating=false;l.progressLabel="";l.progressPercent=0})).catch((function(e){console.log(e)}));return[3,4];case 3:n=a.sent();console.log("[CREATE] Error creating template",n);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new h(n.message,(o=n.response)===null||o===void 0?void 0:o.status,(i=n.response)===null||i===void 0?void 0:i.data));this.creating=false;return[3,4];case 4:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return i(s,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):i("div",{class:"upload-box",onDrop:function(t){t.preventDefault();t.target.classList.remove("drag-over");e.file=t.dataTransfer.files[0]},onDragOver:function(e){e.preventDefault();e.dataTransfer.dropEffect="copy"},onDragEnter:function(e){return e.target.classList.add("drag-over")},onDragLeave:function(e){return e.target.classList.remove("drag-over")}},i("div",null,i("span",{innerHTML:G})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?Y:"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating}))))};return e}());J.style=q;var K="";var Q=e("verdocs_template_name",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.name="";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,s,n,r;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}n=this;return[4,u(this.endpoint,this.templateId,false)];case 1:n.store=l.sent();this.name=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.name;this.dirty=false;return[3,3];case 2:r=l.sent();console.log("[TEMPLATE NAME] Error loading template",r);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new h(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(s=r.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,o,i;e.stopPropagation();this.name=(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.name;this.dirty=false;console.log("Closing");(i=this.close)===null||i===void 0?void 0:i.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i;return __generator(this,(function(s){switch(s.label){case 0:e.stopPropagation();return[4,l(this.endpoint,this.templateId,{name:this.name})];case 1:s.sent();if((t=this.store)===null||t===void 0?void 0:t.state){this.store.state.name=this.name}this.dirty=false;(o=this.templateUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,template:this.store.state,event:"name"});(i=this.close)===null||i===void 0?void 0:i.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,o;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.isLoading){return i(s,{class:"loading"},i("verdocs-loader",null))}return i(s,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("label",{htmlFor:"verdocs-template-name"},"Template Name"),i("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:function(t){var o,i;e.name=t.target.value;e.dirty=e.name!==((i=(o=e.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.name)}}),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};return e}());Q.style=K;var X='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';var Z=e("verdocs_template_reminders",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.showPlanBlocker=false;this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,s,n,r;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}n=this;return[4,u(this.endpoint,this.templateId,false)];case 1:n.store=l.sent();this.sendReminders=!!((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.reminder_id);this.dirty=false;return[3,3];case 2:r=l.sent();console.log("[TEMPLATE REMINDERS] Error loading template",r);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new h(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(s=r.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,o,i;e.stopPropagation();this.sendReminders=!!((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.reminder_id);this.dirty=false;(i=this.close)===null||i===void 0?void 0:i.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,s,n,r,l,a,d,c,p,m,f,v;return __generator(this,(function(g){switch(g.label){case 0:e.stopPropagation();g.label=1;case 1:g.trys.push([1,12,,13]);if(!this.sendReminders)return[3,8];c={setup_time:+this.firstReminderDays,interval_time:+this.reminderDays};if(!!((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.reminder_id))return[3,4];return[4,D(this.endpoint,this.templateId,c)];case 2:g.sent();p=this;return[4,u(this.endpoint,this.templateId,false)];case 3:p.store=g.sent();return[3,7];case 4:return[4,L(this.endpoint,this.templateId,(i=this.store)===null||i===void 0?void 0:i.state.reminder_id,c)];case 5:g.sent();m=this;return[4,u(this.endpoint,this.templateId,false)];case 6:m.store=g.sent();g.label=7;case 7:return[3,11];case 8:return[4,T(this.endpoint,this.templateId,(s=this.store)===null||s===void 0?void 0:s.state.reminder_id)];case 9:g.sent();f=this;return[4,u(this.endpoint,this.templateId,false)];case 10:f.store=g.sent();g.label=11;case 11:(n=this.templateUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"});return[3,13];case 12:v=g.sent();console.log("[TEMPLATE REMINDERS] Unable to update reminders",v);P(v.message);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new h(v.message,(l=v.response)===null||l===void 0?void 0:l.status,(a=v.response)===null||a===void 0?void 0:a.data));return[3,13];case 13:this.dirty=false;(d=this.close)===null||d===void 0?void 0:d.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,o;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.isLoaded)){return i(s,{class:"empty"})}return i(s,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("h5",null,"Reminders"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),i("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){e.sendReminders=t.target.checked;e.dirty=true}})),i("p",null,i("strong",null,"NOTE:")," Reminders will only be sent for up to 14 days."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),i("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:function(t){e.firstReminderDays=t.target.value;e.dirty=true},disabled:!this.sendReminders})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),i("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:function(t){e.reminderDays=t.target.value;e.dirty=true},disabled:!this.sendReminders})),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))),this.showPlanBlocker&&i("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:function(){return e.showPlanBlocker=false}}))};return e}());Z.style=X;var $='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';var ee=e("verdocs_template_visibility",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.dirty=false;this.personal=false;this.public=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,s,n,r,l,a;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[VISIBILITY] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[VISIBILITY] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,u(this.endpoint,this.templateId,false)];case 1:l.store=d.sent();this.personal=((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_personal)||true;this.public=((i=(o=this.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.is_public)||false;this.dirty=false;return[3,3];case 2:a=d.sent();console.log("[TEMPLATE VISIBILITY] Error loading template",a);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new h(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(r=a.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,o,i,s,n;e.stopPropagation();this.personal=(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.is_personal;this.public=(s=(i=this.store)===null||i===void 0?void 0:i.state)===null||s===void 0?void 0:s.is_public;this.dirty=false;(n=this.close)===null||n===void 0?void 0:n.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i;return __generator(this,(function(s){switch(s.label){case 0:e.stopPropagation();return[4,l(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public})];case 1:s.sent();if((t=this.store)===null||t===void 0?void 0:t.state){this.store.state.is_personal=this.personal;this.store.state.is_public=this.public}this.dirty=false;(o=this.templateUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,template:this.store.state,event:"visibility"});(i=this.close)===null||i===void 0?void 0:i.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,o;if(!this.endpoint.session){return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.isLoaded)){return i(s,{class:"empty"})}return i(s,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("h5",null,"Visibility"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-shared"},"Shared"),i("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:function(t){e.personal=!t.target.checked;e.dirty=true}})),i("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-public"},"Public"),i("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:function(t){e.public=t.target.checked;e.dirty=true}})),i("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};return e}());ee.style=$}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var o=0,r=t.length,n;o<r;o++){if(n||!(o in t)){if(!n)n=Array.prototype.slice.call(t,0,o);n[o]=t[o]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-cd61fea7.system.js","./p-3bcd86ea.system.js","./p-0cafdb16.system.js","./p-9a5ff58c.system.js","./p-bbee73c8.system.js","./p-8aae8d16.system.js","./p-54498887.system.js","./p-173e86c3.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,i,o,r,n,s,a,l;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H;n=e.a},function(e){s=e.i},function(e){a=e.d},function(e){l=e.c},function(){},function(){},function(){},function(){},function(){}],execute:function(){var c='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';var d='<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="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>';var p='<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.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>';var u=5;var f=function(e){var t=e.page,i=e.selected,r=e.onClick;var n;if(t==="first"){n=d}else if(t==="last"){n=p}else{n=String(t+1)}return o("div",{class:"page-button ".concat(t===i?"selected":""),onClick:function(){return r(t)},innerHTML:n})};var h=e("verdocs_pagination",function(){function e(e){t(this,e);this.selectPage=i(this,"selectPage",7);this.selectedPage=0;this.itemCount=1;this.perPage=10}e.prototype.handleSelectPage=function(e){var t;this.selectedPage=e;(t=this.selectPage)===null||t===void 0?void 0:t.emit({selectedPage:e})};e.prototype.render=function(){var e=this;var t=Math.max(0,this.selectedPage-2);var i=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0;var n=s(0,Math.ceil(this.itemCount/this.perPage)).slice(t,t+u);return o(r,null,this.selectedPage>0&&o(f,{page:"first",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(0)}}),t>0&&o("div",{class:"ellipsis"},"..."),n.map((function(t){return o(f,{page:t,selected:e.selectedPage,onClick:function(t){return e.handleSelectPage(+t)}})})),this.selectedPage<i-1&&o("div",{class:"ellipsis"},"..."),this.selectedPage<i-1&&o(f,{page:"last",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(i-1)}}))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());h.style=c;var g='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:#4c56cb3f}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';var b='<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>';var v=e("verdocs_quick_filter",function(){function e(e){t(this,e);this.optionSelected=i(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.label="Filter";this.value="";this.placeholder="Select...";this.open=undefined}e.prototype.componentDidLoad=function(){this.popper=l(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};e.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};e.prototype.clickListener=function(e){var t=!(e.target==this.el||this.el.contains(e.target));if(t){this.hide()}};e.prototype.handleSelectOption=function(e,t){e.stopPropagation();this.optionSelected.emit(t);this.value=t.value;this.hide()};e.prototype.showDropdown=function(){var e,t;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(t=this.popper)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.handleHideDropdown=function(e){var t,i;if(((t=e===null||e===void 0?void 0:e.target)===null||t===void 0?void 0:t.localName)==="button"&&((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.className)==="arrow"){return}this.hide()};e.prototype.toggleDropdown=function(e){e.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};e.prototype.hide=function(){var e;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};e.prototype.render=function(){var e=this;var t,i,n;var s=(t=this.options)===null||t===void 0?void 0:t.find((function(t){return t.value===e.value}));var l=(i=this.options)===null||i===void 0?void 0:i.reduce((function(e,t){return e.label.length>t.label.length?e:t}));var c=a((l===null||l===void 0?void 0:l.label)||"FILLER","14px Inter, Barlow, sans-serif");var d=a(this.label,"14px Inter, Barlow, sans-serif");var p="".concat(c+d+40,"px");return o(r,{class:{open:!!this.open},style:{minWidth:p,display:"inline-block"}},o("div",{class:"control",onClick:function(t){return e.toggleDropdown(t)},onBlur:function(t){return e.handleHideDropdown(t)}},o("div",{class:"title",ref:function(t){return e.dropdownButton=t}},o("span",{class:"prefix"},this.label,":"),s?s.label:this.placeholder),o("div",{style:{flex:"1"}}),o("div",{class:"separator"}),o("div",{class:"arrow",innerHTML:b,"aria-label":"Open Menu"})),o("div",{class:"items","aria-hidden":!this.open,ref:function(t){return e.dropdownMenu=t},style:{minWidth:p}},(n=this.options)===null||n===void 0?void 0:n.map((function(t){return t.label?o("button",{onClick:function(i){return e.handleSelectOption(i,t)},class:"option ".concat(t.value===e.value?"selected":""),disabled:t.disabled},t.label):o("div",{class:"separator"})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());v.style=g}}}));
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var o=0,r=t.length,n;o<r;o++){if(n||!(o in t)){if(!n)n=Array.prototype.slice.call(t,0,o);n[o]=t[o]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-3bcd86ea.system.js","./p-0cafdb16.system.js","./p-9a5ff58c.system.js","./p-bbee73c8.system.js","./p-8aae8d16.system.js","./p-54498887.system.js","./p-173e86c3.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,i,o,r,n,s,a,l;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H;n=e.a},function(e){s=e.i},function(e){a=e.d},function(e){l=e.c},function(){},function(){},function(){},function(){},function(){}],execute:function(){var c='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';var d='<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="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>';var p='<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.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>';var u=5;var f=function(e){var t=e.page,i=e.selected,r=e.onClick;var n;if(t==="first"){n=d}else if(t==="last"){n=p}else{n=String(t+1)}return o("div",{class:"page-button ".concat(t===i?"selected":""),onClick:function(){return r(t)},innerHTML:n})};var h=e("verdocs_pagination",function(){function e(e){t(this,e);this.selectPage=i(this,"selectPage",7);this.selectedPage=0;this.itemCount=1;this.perPage=10}e.prototype.handleSelectPage=function(e){var t;this.selectedPage=e;(t=this.selectPage)===null||t===void 0?void 0:t.emit({selectedPage:e})};e.prototype.render=function(){var e=this;var t=Math.max(0,this.selectedPage-2);var i=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0;var n=s(0,Math.ceil(this.itemCount/this.perPage)).slice(t,t+u);return o(r,null,this.selectedPage>0&&o(f,{page:"first",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(0)}}),t>0&&o("div",{class:"ellipsis"},"..."),n.map((function(t){return o(f,{page:t,selected:e.selectedPage,onClick:function(t){return e.handleSelectPage(+t)}})})),this.selectedPage<i-1&&o("div",{class:"ellipsis"},"..."),this.selectedPage<i-1&&o(f,{page:"last",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(i-1)}}))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());h.style=c;var g='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:#4c56cb3f}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';var b='<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>';var v=e("verdocs_quick_filter",function(){function e(e){t(this,e);this.optionSelected=i(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.label="Filter";this.value="";this.placeholder="Select...";this.open=undefined}e.prototype.componentDidLoad=function(){this.popper=l(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};e.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};e.prototype.clickListener=function(e){var t=!(e.target==this.el||this.el.contains(e.target));if(t){this.hide()}};e.prototype.handleSelectOption=function(e,t){e.stopPropagation();this.optionSelected.emit(t);this.value=t.value;this.hide()};e.prototype.showDropdown=function(){var e,t;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(t=this.popper)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.handleHideDropdown=function(e){var t,i;if(((t=e===null||e===void 0?void 0:e.target)===null||t===void 0?void 0:t.localName)==="button"&&((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.className)==="arrow"){return}this.hide()};e.prototype.toggleDropdown=function(e){e.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};e.prototype.hide=function(){var e;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};e.prototype.render=function(){var e=this;var t,i,n;var s=(t=this.options)===null||t===void 0?void 0:t.find((function(t){return t.value===e.value}));var l=(i=this.options)===null||i===void 0?void 0:i.reduce((function(e,t){return e.label.length>t.label.length?e:t}));var c=a((l===null||l===void 0?void 0:l.label)||"FILLER","14px Inter, Barlow, sans-serif");var d=a(this.label,"14px Inter, Barlow, sans-serif");var p="".concat(c+d+40,"px");return o(r,{class:{open:!!this.open},style:{minWidth:p,display:"inline-block"}},o("div",{class:"control",onClick:function(t){return e.toggleDropdown(t)},onBlur:function(t){return e.handleHideDropdown(t)}},o("div",{class:"title",ref:function(t){return e.dropdownButton=t}},o("span",{class:"prefix"},this.label,":"),s?s.label:this.placeholder),o("div",{style:{flex:"1"}}),o("div",{class:"separator"}),o("div",{class:"arrow",innerHTML:b,"aria-label":"Open Menu"})),o("div",{class:"items","aria-hidden":!this.open,ref:function(t){return e.dropdownMenu=t},style:{minWidth:p}},(n=this.options)===null||n===void 0?void 0:n.map((function(t){return t.label?o("button",{onClick:function(i){return e.handleSelectOption(i,t)},class:"option ".concat(t.value===e.value?"selected":""),disabled:t.disabled},t.label):o("div",{class:"separator"})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());v.style=g}}}));
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as t,h as s,H as i,a as o}from"./p-
|
1
|
+
import{r as e,c as t,h as s,H as i,a as o}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as l}from"./p-2415be91.js";import{g as d}from"./p-e1f4be7c.js";import{S as a}from"./p-7a1b2643.js";import"./p-7648c449.js";import"./p-d425fa2c.js";import"./p-ef20cb50.js";const n=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.rolesUpdated=t(this,"rolesUpdated",7),this.endpoint=l.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 a(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 d(this.endpoint,e,!1))}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 handleRolesUpdated(e){var t;null===(t=this.templateUpdated)||void 0===t||t.emit(e.detail)}async handleTemplateUpdated(e){var t;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)),s(i,null,s("div",{class:"content"},s("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&&s("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&&s("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:e=>this.handleCancel(e),onNext:()=>this.handleRolesNext(),onRolesUpdated:e=>this.handleRolesUpdated(e)}),"settings"===this.step&&s("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},s("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),s("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),s("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)})),"fields"===this.step&&s("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),"preview"===this.step&&s("div",{class:"preview-container"},s("div",{class:"preview-send-wrapper"},s("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%"}})),s("div",{class:"preview-preview-wrapper"},s("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))):(console.log("[BUILD] No template ID, rendering created view"),s(i,null,s("div",{class:"content"},s("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)}),s("verdocs-template-create",{endpoint:this.endpoint,onExit:e=>this.handleCancel(e),onNext:()=>this.handleAttachmentsNext(),onTemplateCreated:e=>this.handleTemplateCreated(e.detail.templateId)})))):s(i,null,s("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"]}}};n.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}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{n as verdocs_build}
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,n,t,o){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,r){function l(e){try{a(o.next(e))}catch(e){r(e)}}function s(e){try{a(o["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(l,s)}a((o=o.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(n){return a([e,n])}}function a(l){if(o)throw new TypeError("Generator is already executing.");while(t)try{if(o=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=n.call(e,t)}catch(e){l=[6,e];i=0}finally{o=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-cd61fea7.system.js","./p-8aae8d16.system.js","./p-1d60151a.system.js","./p-54498887.system.js","./p-235b4a0b.system.js","./p-3bcd86ea.system.js","./p-0cafdb16.system.js","./p-187b20b7.system.js","./p-bbee73c8.system.js","./p-173e86c3.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var n,t,o,i,r,l,s,a,d,c,p,u,h,v;return{setters:[function(e){n=e.r;t=e.c;o=e.h;i=e.H;r=e.F;l=e.a},function(e){s=e.t;a=e.k;d=e.c},function(e){c=e.b},function(){},function(e){p=e.V},function(e){u=e.i},function(e){h=e.s},function(e){v=e.S},function(){},function(){},function(){}],execute:function(){var f='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var g=e("verdocs_view",function(){function e(e){n(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.another=t(this,"another",7);this.view=t(this,"view",7);this.next=t(this,"next",7);this.endpoint=p.getDefault();this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.envelope=null;this.roleNames=[];this.showCancelDone=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentWillRender=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}return[2,this.reloadEnvelope()]}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var n=document.getElementById("verdocs-view-header");if(e&&n){console.log("[VIEW] Moving header");n.remove();e.append(n)}};e.prototype.reloadEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,t,o,i;var r=this;return __generator(this,(function(l){switch(l.label){case 0:console.log("[VIEW] Loading envelope...");l.label=1;case 1:l.trys.push([1,3,,4]);o=this;return[4,s(this.endpoint,this.envelopeId)];case 2:o.envelope=l.sent();console.log("[VIEW] Loaded envelope",this.envelope);this.roleNames=this.envelope.recipients.map((function(e){return e.role_name}));setTimeout((function(){return __awaiter(r,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:console.log("[VIEW] Reloading envelope...");e=this;return[4,s(this.endpoint,this.envelopeId)];case 1:e.envelope=n.sent();console.log("[VIEW] Reloaded envelope",this.envelope);return[2]}}))}))}),2e3);return[3,4];case 3:i=l.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new v(i.message,(n=i.response)===null||n===void 0?void 0:n.status,(t=i.response)===null||t===void 0?void 0:t.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handlePageRendered=function(e){var n=e.detail;console.log("[VIEW] Page rendered",n)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var n,t,o,i,i;var r=this;return __generator(this,(function(l){switch(l.label){case 0:o=e.detail.id;switch(o){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,5];case"download-all":return[3,7]}return[3,8];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;d(this.endpoint,this.envelopeId).then((function(e){r.canceling=false;console.log("[VIEW] Envelope canceled",e);return s(r.endpoint,r.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);r.envelope=e})).catch((function(e){var n,t,o;r.canceling=false;console.log("[VIEW] Error canceling envelope",e);(n=r.sdkError)===null||n===void 0?void 0:n.emit(new v(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(o=e.response)===null||o===void 0?void 0:o.data))}));this.showCancelDone=true;(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,8];case 2:window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,8];case 3:return[4,a(this.endpoint,this.envelopeId,this.envelope.envelope_document_id)];case 4:i=l.sent();window.open(i,"_blank");return[3,8];case 5:return[4,a(this.endpoint,this.envelopeId,this.envelope.certificate_document_id)];case 6:i=l.sent();window.open(i,"_blank");return[3,8];case 7:h(this.endpoint,[this.envelope]).then((function(){var e;(e=r.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:r.endpoint,envelope:r.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,8];case 8:return[2]}}))}))};e.prototype.render=function(){var e=this;var n;if(!this.envelope){return o(i,null,o("img",{src:"https://verdocs-public-assets.s3.amazonaws.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var t=[{id:"print",label:"Print"}];if(c(this.endpoint.session,this.envelope)){t.push({id:"cancel",label:"Cancel"})}var l=this.envelope.documents.length>0;var s=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var a=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(l||a){t.push({label:""});if(l){t.push({id:"download-attachments",label:s>1?"Download Documents":"Download Document"})}if(a){t.push({id:"download-certificate",label:"Download Certificate"})}if(l&&a){t.push({id:"download-all",label:"Download All Files"})}}return o(i,null,o("div",{id:"verdocs-view-header"},o("div",{class:"inner"},o("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),o("div",{class:"title"},this.envelope.name),o("div",{style:{flex:"1"}}),o("div",{style:{marginLeft:"10px"}}),o("verdocs-dropdown",{options:t,onOptionSelected:function(n){return e.handleOptionSelected(n)}}))),o("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((n=this.envelope)===null||n===void 0?void 0:n.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(n){var t=u(1,n.page_numbers);return o(r,null,t.map((function(t){return o("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:n.id,endpoint:e.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:t,onPageRendered:function(n){return e.handlePageRendered(n)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&o("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&o("div",{class:"loading-indicator"},o("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return l(this)},enumerable:false,configurable:true});return e}());g.style=f}}}));
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,n,t,o){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,r){function l(e){try{a(o.next(e))}catch(e){r(e)}}function s(e){try{a(o["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(l,s)}a((o=o.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(n){return a([e,n])}}function a(l){if(o)throw new TypeError("Generator is already executing.");while(t)try{if(o=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=n.call(e,t)}catch(e){l=[6,e];i=0}finally{o=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-8aae8d16.system.js","./p-1d60151a.system.js","./p-54498887.system.js","./p-235b4a0b.system.js","./p-3bcd86ea.system.js","./p-0cafdb16.system.js","./p-187b20b7.system.js","./p-bbee73c8.system.js","./p-173e86c3.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var n,t,o,i,r,l,s,a,d,c,p,u,h,v;return{setters:[function(e){n=e.r;t=e.c;o=e.h;i=e.H;r=e.F;l=e.a},function(e){s=e.t;a=e.k;d=e.c},function(e){c=e.b},function(){},function(e){p=e.V},function(e){u=e.i},function(e){h=e.s},function(e){v=e.S},function(){},function(){},function(){}],execute:function(){var f='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var g=e("verdocs_view",function(){function e(e){n(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.another=t(this,"another",7);this.view=t(this,"view",7);this.next=t(this,"next",7);this.endpoint=p.getDefault();this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.envelope=null;this.roleNames=[];this.showCancelDone=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentWillRender=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}return[2,this.reloadEnvelope()]}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var n=document.getElementById("verdocs-view-header");if(e&&n){console.log("[VIEW] Moving header");n.remove();e.append(n)}};e.prototype.reloadEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,t,o,i;var r=this;return __generator(this,(function(l){switch(l.label){case 0:console.log("[VIEW] Loading envelope...");l.label=1;case 1:l.trys.push([1,3,,4]);o=this;return[4,s(this.endpoint,this.envelopeId)];case 2:o.envelope=l.sent();console.log("[VIEW] Loaded envelope",this.envelope);this.roleNames=this.envelope.recipients.map((function(e){return e.role_name}));setTimeout((function(){return __awaiter(r,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:console.log("[VIEW] Reloading envelope...");e=this;return[4,s(this.endpoint,this.envelopeId)];case 1:e.envelope=n.sent();console.log("[VIEW] Reloaded envelope",this.envelope);return[2]}}))}))}),2e3);return[3,4];case 3:i=l.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new v(i.message,(n=i.response)===null||n===void 0?void 0:n.status,(t=i.response)===null||t===void 0?void 0:t.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handlePageRendered=function(e){var n=e.detail;console.log("[VIEW] Page rendered",n)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var n,t,o,i,i;var r=this;return __generator(this,(function(l){switch(l.label){case 0:o=e.detail.id;switch(o){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,5];case"download-all":return[3,7]}return[3,8];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;d(this.endpoint,this.envelopeId).then((function(e){r.canceling=false;console.log("[VIEW] Envelope canceled",e);return s(r.endpoint,r.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);r.envelope=e})).catch((function(e){var n,t,o;r.canceling=false;console.log("[VIEW] Error canceling envelope",e);(n=r.sdkError)===null||n===void 0?void 0:n.emit(new v(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(o=e.response)===null||o===void 0?void 0:o.data))}));this.showCancelDone=true;(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,8];case 2:window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,8];case 3:return[4,a(this.endpoint,this.envelopeId,this.envelope.envelope_document_id)];case 4:i=l.sent();window.open(i,"_blank");return[3,8];case 5:return[4,a(this.endpoint,this.envelopeId,this.envelope.certificate_document_id)];case 6:i=l.sent();window.open(i,"_blank");return[3,8];case 7:h(this.endpoint,[this.envelope]).then((function(){var e;(e=r.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:r.endpoint,envelope:r.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,8];case 8:return[2]}}))}))};e.prototype.render=function(){var e=this;var n;if(!this.envelope){return o(i,null,o("img",{src:"https://verdocs-public-assets.s3.amazonaws.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var t=[{id:"print",label:"Print"}];if(c(this.endpoint.session,this.envelope)){t.push({id:"cancel",label:"Cancel"})}var l=this.envelope.documents.length>0;var s=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var a=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(l||a){t.push({label:""});if(l){t.push({id:"download-attachments",label:s>1?"Download Documents":"Download Document"})}if(a){t.push({id:"download-certificate",label:"Download Certificate"})}if(l&&a){t.push({id:"download-all",label:"Download All Files"})}}return o(i,null,o("div",{id:"verdocs-view-header"},o("div",{class:"inner"},o("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),o("div",{class:"title"},this.envelope.name),o("div",{style:{flex:"1"}}),o("div",{style:{marginLeft:"10px"}}),o("verdocs-dropdown",{options:t,onOptionSelected:function(n){return e.handleOptionSelected(n)}}))),o("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((n=this.envelope)===null||n===void 0?void 0:n.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(n){var t=u(1,n.page_numbers);return o(r,null,t.map((function(t){return o("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:n.id,endpoint:e.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:t,onPageRendered:function(n){return e.handlePageRendered(n)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&o("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&o("div",{class:"loading-indicator"},o("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return l(this)},enumerable:false,configurable:true});return e}());g.style=f}}}));
|