@verdocs/web-sdk 2.3.76 → 2.3.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{TemplateStore-ae59084b.js → TemplateStore-9a87282d.js} +1 -1
- package/dist/cjs/{VerdocsEndpoint-f4ef9333.js → VerdocsEndpoint-38bcb409.js} +1 -1
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker_2.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 +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +3 -3
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +1 -1
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +0 -1
- package/dist/components/VerdocsEndpoint.js +1 -1
- package/dist/components/verdocs-auth.js +3 -3
- package/dist/components/verdocs-preview2.js +1 -1
- package/dist/components/verdocs-template-fields2.js +0 -1
- package/dist/custom-elements.json +2147 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{TemplateStore-99bf97f0.js → TemplateStore-6a7d7297.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-eab308f6.js → VerdocsEndpoint-9a11e843.js} +1 -1
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +4 -4
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-checkbox_5.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker_2.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 +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_15.entry.js +1 -1
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_8.entry.js +3 -3
- package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +2 -3
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/{TemplateStore-99bf97f0.js → TemplateStore-6a7d7297.js} +1 -1
- package/dist/esm-es5/{VerdocsEndpoint-eab308f6.js → VerdocsEndpoint-9a11e843.js} +1 -1
- package/dist/esm-es5/ipc-test.entry.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-checkbox_5.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.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-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-f246348c.system.js → p-034bd59e.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b0e0084b.system.entry.js → p-05026d67.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bbf52926.entry.js → p-07cf78e3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e7d7bcae.system.entry.js → p-094ea4ba.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-15c88a05.system.entry.js → p-0d1f4272.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1978c7bd.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-58e85310.system.entry.js → p-1a29b57f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a12b2c26.system.entry.js → p-24742737.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6a93295c.entry.js → p-283d935e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ef99042b.entry.js → p-2bcd953d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8f36c42a.system.entry.js → p-337466c7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ea2211d7.system.entry.js → p-340d2daa.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d61bf72b.system.entry.js → p-4618665e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7e5a1766.system.entry.js → p-48c14014.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d0d9ac6d.system.js → p-49139f23.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8a7324b6.entry.js → p-5059ff08.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-159aeaf2.entry.js → p-55403539.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a7907ccf.entry.js → p-6dad60bb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a9da16c6.entry.js → p-6ec51b4b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1d5f10f4.entry.js → p-70137c9e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e3623a0c.system.entry.js → p-786725d0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-91e94910.entry.js → p-812d7568.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-06618569.entry.js → p-8b46dcc3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-baf16d17.system.entry.js → p-8b78ee37.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7b3dfc4b.system.entry.js → p-90734d54.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-92a6f625.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9b306355.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-40f5b1c5.entry.js → p-a15e1a57.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9d748d04.entry.js → p-a87f2e56.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bf8e6ba1.system.entry.js → p-b1e92d11.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-77c145b3.system.entry.js → p-b293e7d0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c73e78c8.system.entry.js → p-b9376079.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-bc6ce10f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9a816526.system.entry.js → p-bf2fd0eb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a9b80271.system.entry.js → p-cb48d6b9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-ccac4998.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-45ecd6eb.js → p-cda8b816.js} +1 -1
- package/dist/verdocs-web-sdk/{p-84679597.entry.js → p-d075b6e8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c179b3e4.entry.js → p-d522f008.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-28c93a3a.system.entry.js → p-d524266d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e04d8f5d.js → p-d77962af.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ac042888.entry.js → p-daebba0a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-de5b9b23.system.entry.js → p-e3bfe2de.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d1c52218.entry.js → p-e93796e2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b8063124.entry.js → p-ed319550.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ac07d476.entry.js → p-ee9336c4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-5e8e5761.system.entry.js → p-f15263ff.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d11ffc76.entry.js → p-f6b75e4c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/verdocs-web-sdk/p-30492f83.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-332141f2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7519fe6e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-755b5223.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b2d3ac44.entry.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,s){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function l(e){try{o(s.next(e))}catch(e){i(e)}}function r(e){try{o(s["throw"](e))}catch(e){i(e)}}function o(e){e.done?n(e.value):a(e.value).then(l,r)}o((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,a,i,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return o([e,t])}}function o(l){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,a&&(i=l[0]&2?a["return"]:l[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,l[1])).done)return i;if(a=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;a=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1];i=l;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(l);break}if(i[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];a=0}finally{s=i=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}from"./index-172625c5.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint,l as listTemplates,d as deleteTemplate,c as canPerformTemplateAction,a as TemplateActions}from"./VerdocsEndpoint-eab308f6.js";import{i as integerSequence}from"./Primitives-8fe93caf.js";import{S as SDKError}from"./errors-9b5498c8.js";import{f as format}from"./index-914ed6f7.js";var verdocsTemplatesListCss='verdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';var GlobeAltIcon='<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="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var LockClosedIcon='<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="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var BuildingOfficeIcon='<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="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var EnvelopeIcon='<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="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var CreatedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var LastUsedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var UpdatedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var SharingFilters=[{value:"all",label:"All"},{value:"personal",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var StarredFilters=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var SortOptions=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var VerdocsTemplatesList=function(){function e(e){var t=this;registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.viewTemplate=createEvent(this,"viewTemplate",7);this.signNow=createEvent(this,"signNow",7);this.submittedData=createEvent(this,"submittedData",7);this.editTemplate=createEvent(this,"editTemplate",7);this.templateDeleted=createEvent(this,"templateDeleted",7);this.changeSort=createEvent(this,"changeSort",7);this.changeSharing=createEvent(this,"changeSharing",7);this.changeStarred=createEvent(this,"changeStarred",7);this.changeName=createEvent(this,"changeName",7);this.handleOptionSelected=function(e,n){var s,a,i,l;if(e==="send"){(s=t.viewTemplate)===null||s===void 0?void 0:s.emit({endpoint:t.endpoint,template:n})}else if(e==="signnow"){(a=t.signNow)===null||a===void 0?void 0:a.emit({endpoint:t.endpoint,template:n})}else if(e==="submitted"){(i=t.submittedData)===null||i===void 0?void 0:i.emit({endpoint:t.endpoint,template:n})}else if(e==="edit"){(l=t.editTemplate)===null||l===void 0?void 0:l.emit({endpoint:t.endpoint,template:n})}else if(e==="delete"){t.confirmDelete=n}};this.endpoint=VerdocsEndpoint.getDefault();this.sharing="all";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter=""}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.handlePageUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryTemplates()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,a,i;return __generator(this,(function(l){switch(l.label){case 0:console.log("[TEMPLATES] Querying templates");this.loading=true;l.label=1;case 1:l.trys.push([1,3,,4]);s={page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){s.q=this.name.trim()}return[4,listTemplates(this.endpoint,s)];case 2:a=l.sent();this.templates=a.templates;this.count=a.total;this.loading=false;return[3,4];case 3:i=l.sent();this.loading=false;console.log("[TEMPLATES] Error listing templates",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;deleteTemplate(this.endpoint,e.id).then((function(){var n;console.log("[TEMPLATES] Deleted template",e);(n=t.templateDeleted)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(n){var s,a,i;console.log("[TEMPLATES] Error deleting template",e);(s=t.sdkError)===null||s===void 0?void 0:s.emit(new SDKError(n.message,(a=n.response)===null||a===void 0?void 0:a.status,(i=n.response)===null||i===void 0?void 0:i.data))}))};e.prototype.render=function(){var e=this;var t=!this.localNameFilter?this.templates:this.templates.filter((function(t){return t.name.toLowerCase().includes(e.localNameFilter.toLowerCase())}));return h(Host,null,h("div",{class:"header"},h("div",{class:"filter"},h("verdocs-text-input",{id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:function(t){return e.localNameFilter=t.target.value.trim()},onFocusout:function(t){var n;e.name=t.target.value.trim();e.localNameFilter=t.target.value.trim();(n=e.changeName)===null||n===void 0?void 0:n.emit(e.name)}})),h("verdocs-quick-filter",{label:"Sharing",value:this.sharing,options:SharingFilters,onOptionSelected:function(t){var n;e.sharing=t.detail.value;(n=e.changeSharing)===null||n===void 0?void 0:n.emit(e.sharing)}}),h("verdocs-quick-filter",{label:"Starred",value:this.starred,options:StarredFilters,onOptionSelected:function(t){var n;e.starred=t.detail.value;(n=e.changeStarred)===null||n===void 0?void 0:n.emit(e.starred)}}),h("verdocs-quick-filter",{label:"Sort By",value:this.sort,options:SortOptions,onOptionSelected:function(t){var n;e.sort=t.detail.value;(n=e.changeSort)===null||n===void 0?void 0:n.emit(e.sort)}}),this.loading&&h("verdocs-spinner",{mode:"dark",size:24}),h("div",{style:{display:"flex",flex:"1"}})),t.map((function(t){var n=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var s=t[n];var a=[];var i=[];if(e.allowedActions.includes("send")){a.push({label:"Preview / Send",id:"send",disabled:!canPerformTemplateAction(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("signnow")){a.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){a.push({label:""});a.push({label:"Submissions",id:"submitted",disabled:!canPerformTemplateAction(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){a.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){a.push({label:"Edit",id:"edit",disabled:!i.includes(TemplateActions.WRITE)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){a.push({label:"Delete",id:"delete",disabled:!i.includes(TemplateActions.DELETE)})}}return h("div",{class:"template",onClick:function(){var n;(n=e.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t})}},h("div",{class:"inner"},h("verdocs-template-star",{template:t,endpoint:e.endpoint}),h("div",{class:"spacer icon-spacer"}),h("div",{class:"name"},t.name),h("div",{class:"spacer usage-spacer"}),h("div",{class:"usage"},h("span",{innerHTML:EnvelopeIcon,title:"Usage Counter"}),t.counter||"--"),h("div",{class:"spacer last-used-spacer"}),h("div",{class:"last-used"},n==="created_at"&&h("span",{innerHTML:CreatedIcon,title:"Created"}),n==="updated_at"&&h("span",{innerHTML:UpdatedIcon,title:"Last Updated"}),n==="last_used_at"&&h("span",{innerHTML:LastUsedIcon,title:"Last Used"}),s?format(new Date(s),"P"):"Never"),h("div",{class:"spacer ownership-spacer"}),t.is_public&&h("div",{class:"ownership"},h("span",{innerHTML:GlobeAltIcon})," Public"),!t.is_public&&!t.is_personal&&h("div",{class:"ownership"},h("span",{innerHTML:LockClosedIcon})," Private"),!t.is_public&&t.is_personal&&h("div",{class:"ownership"},h("span",{innerHTML:BuildingOfficeIcon})," Shared"),h("verdocs-dropdown",{options:a,onOptionSelected:function(n){return e.handleOptionSelected(n.detail.id,t)}})))})),!this.initiallyLoaded&&h("div",null,integerSequence(0,this.rowsPerPage).map((function(){return h("div",{class:"template-placeholder"})}))),this.initiallyLoaded&&!this.templates.length&&h("div",{class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?h("div",{style:{marginTop:"20px"}},h("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):h("div",null),this.confirmDelete&&h("verdocs-ok-dialog",{heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}();VerdocsTemplatesList.style=verdocsTemplatesListCss;export{VerdocsTemplatesList as verdocs_templates_list};
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,s){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function l(e){try{o(s.next(e))}catch(e){i(e)}}function r(e){try{o(s["throw"](e))}catch(e){i(e)}}function o(e){e.done?n(e.value):a(e.value).then(l,r)}o((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,a,i,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return o([e,t])}}function o(l){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,a&&(i=l[0]&2?a["return"]:l[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,l[1])).done)return i;if(a=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;a=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1];i=l;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(l);break}if(i[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];a=0}finally{s=i=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}from"./index-172625c5.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint,l as listTemplates,d as deleteTemplate,c as canPerformTemplateAction,a as TemplateActions}from"./VerdocsEndpoint-9a11e843.js";import{i as integerSequence}from"./Primitives-8fe93caf.js";import{S as SDKError}from"./errors-9b5498c8.js";import{f as format}from"./index-914ed6f7.js";var verdocsTemplatesListCss='verdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';var GlobeAltIcon='<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="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var LockClosedIcon='<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="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var BuildingOfficeIcon='<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="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var EnvelopeIcon='<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="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var CreatedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var LastUsedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var UpdatedIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var SharingFilters=[{value:"all",label:"All"},{value:"personal",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var StarredFilters=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var SortOptions=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var VerdocsTemplatesList=function(){function e(e){var t=this;registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.viewTemplate=createEvent(this,"viewTemplate",7);this.signNow=createEvent(this,"signNow",7);this.submittedData=createEvent(this,"submittedData",7);this.editTemplate=createEvent(this,"editTemplate",7);this.templateDeleted=createEvent(this,"templateDeleted",7);this.changeSort=createEvent(this,"changeSort",7);this.changeSharing=createEvent(this,"changeSharing",7);this.changeStarred=createEvent(this,"changeStarred",7);this.changeName=createEvent(this,"changeName",7);this.handleOptionSelected=function(e,n){var s,a,i,l;if(e==="send"){(s=t.viewTemplate)===null||s===void 0?void 0:s.emit({endpoint:t.endpoint,template:n})}else if(e==="signnow"){(a=t.signNow)===null||a===void 0?void 0:a.emit({endpoint:t.endpoint,template:n})}else if(e==="submitted"){(i=t.submittedData)===null||i===void 0?void 0:i.emit({endpoint:t.endpoint,template:n})}else if(e==="edit"){(l=t.editTemplate)===null||l===void 0?void 0:l.emit({endpoint:t.endpoint,template:n})}else if(e==="delete"){t.confirmDelete=n}};this.endpoint=VerdocsEndpoint.getDefault();this.sharing="all";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter=""}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.handlePageUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryTemplates()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,a,i;return __generator(this,(function(l){switch(l.label){case 0:console.log("[TEMPLATES] Querying templates");this.loading=true;l.label=1;case 1:l.trys.push([1,3,,4]);s={page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){s.q=this.name.trim()}return[4,listTemplates(this.endpoint,s)];case 2:a=l.sent();this.templates=a.templates;this.count=a.total;this.loading=false;return[3,4];case 3:i=l.sent();this.loading=false;console.log("[TEMPLATES] Error listing templates",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;deleteTemplate(this.endpoint,e.id).then((function(){var n;console.log("[TEMPLATES] Deleted template",e);(n=t.templateDeleted)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(n){var s,a,i;console.log("[TEMPLATES] Error deleting template",e);(s=t.sdkError)===null||s===void 0?void 0:s.emit(new SDKError(n.message,(a=n.response)===null||a===void 0?void 0:a.status,(i=n.response)===null||i===void 0?void 0:i.data))}))};e.prototype.render=function(){var e=this;var t=!this.localNameFilter?this.templates:this.templates.filter((function(t){return t.name.toLowerCase().includes(e.localNameFilter.toLowerCase())}));return h(Host,null,h("div",{class:"header"},h("div",{class:"filter"},h("verdocs-text-input",{id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:function(t){return e.localNameFilter=t.target.value.trim()},onFocusout:function(t){var n;e.name=t.target.value.trim();e.localNameFilter=t.target.value.trim();(n=e.changeName)===null||n===void 0?void 0:n.emit(e.name)}})),h("verdocs-quick-filter",{label:"Sharing",value:this.sharing,options:SharingFilters,onOptionSelected:function(t){var n;e.sharing=t.detail.value;(n=e.changeSharing)===null||n===void 0?void 0:n.emit(e.sharing)}}),h("verdocs-quick-filter",{label:"Starred",value:this.starred,options:StarredFilters,onOptionSelected:function(t){var n;e.starred=t.detail.value;(n=e.changeStarred)===null||n===void 0?void 0:n.emit(e.starred)}}),h("verdocs-quick-filter",{label:"Sort By",value:this.sort,options:SortOptions,onOptionSelected:function(t){var n;e.sort=t.detail.value;(n=e.changeSort)===null||n===void 0?void 0:n.emit(e.sort)}}),this.loading&&h("verdocs-spinner",{mode:"dark",size:24}),h("div",{style:{display:"flex",flex:"1"}})),t.map((function(t){var n=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var s=t[n];var a=[];var i=[];if(e.allowedActions.includes("send")){a.push({label:"Preview / Send",id:"send",disabled:!canPerformTemplateAction(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("signnow")){a.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){a.push({label:""});a.push({label:"Submissions",id:"submitted",disabled:!canPerformTemplateAction(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){a.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){a.push({label:"Edit",id:"edit",disabled:!i.includes(TemplateActions.WRITE)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){a.push({label:"Delete",id:"delete",disabled:!i.includes(TemplateActions.DELETE)})}}return h("div",{class:"template",onClick:function(){var n;(n=e.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t})}},h("div",{class:"inner"},h("verdocs-template-star",{template:t,endpoint:e.endpoint}),h("div",{class:"spacer icon-spacer"}),h("div",{class:"name"},t.name),h("div",{class:"spacer usage-spacer"}),h("div",{class:"usage"},h("span",{innerHTML:EnvelopeIcon,title:"Usage Counter"}),t.counter||"--"),h("div",{class:"spacer last-used-spacer"}),h("div",{class:"last-used"},n==="created_at"&&h("span",{innerHTML:CreatedIcon,title:"Created"}),n==="updated_at"&&h("span",{innerHTML:UpdatedIcon,title:"Last Updated"}),n==="last_used_at"&&h("span",{innerHTML:LastUsedIcon,title:"Last Used"}),s?format(new Date(s),"P"):"Never"),h("div",{class:"spacer ownership-spacer"}),t.is_public&&h("div",{class:"ownership"},h("span",{innerHTML:GlobeAltIcon})," Public"),!t.is_public&&!t.is_personal&&h("div",{class:"ownership"},h("span",{innerHTML:LockClosedIcon})," Private"),!t.is_public&&t.is_personal&&h("div",{class:"ownership"},h("span",{innerHTML:BuildingOfficeIcon})," Shared"),h("verdocs-dropdown",{options:a,onOptionSelected:function(n){return e.handleOptionSelected(n.detail.id,t)}})))})),!this.initiallyLoaded&&h("div",null,integerSequence(0,this.rowsPerPage).map((function(){return h("div",{class:"template-placeholder"})}))),this.initiallyLoaded&&!this.templates.length&&h("div",{class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?h("div",{style:{marginTop:"20px"}},h("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):h("div",null),this.confirmDelete&&h("verdocs-ok-dialog",{heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}();VerdocsTemplatesList.style=verdocsTemplatesListCss;export{VerdocsTemplatesList as verdocs_templates_list};
|
@@ -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 s(e){try{a(o.next(e))}catch(e){r(e)}}function l(e){try{a(o["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,l)}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,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(n){return a([e,n])}}function a(s){if(o)throw new TypeError("Generator is already executing.");while(t)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){t.label=s[1];break}if(s[0]===6&&t.label<r[1]){t.label=r[1];r=s;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(s);break}if(r[2])t.ops.pop();t.trys.pop();continue}s=n.call(e,t)}catch(e){s=[6,e];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[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-eab308f6.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='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,t,o,i;var r=this;return __generator(this,(function(s){switch(s.label){case 0:console.log("[VIEW] Loading envelope...");s.label=1;case 1:s.trys.push([1,3,,4]);o=this;return[4,throttledGetEnvelope(this.endpoint,this.envelopeId)];case 2:o.envelope=s.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=s.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,(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(s){switch(s.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;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,t,o;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,(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,getDocumentDownloadLink(this.endpoint,this.envelopeId,this.envelope.envelope_document_id)];case 4:i=s.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=s.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 t=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.session,this.envelope)){t.push({id:"cancel",label:"Cancel"})}var o=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(o||r){t.push({label:""});if(o){t.push({id:"download-attachments",label:i>1?"Download Documents":"Download Document"})}if(r){t.push({id:"download-certificate",label:"Download Certificate"})}if(o&&r){t.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:t,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 t=integerSequence(1,n.page_numbers);return h(Fragment,null,t.map((function(t){return h("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&&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,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 s(e){try{a(o.next(e))}catch(e){r(e)}}function l(e){try{a(o["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,l)}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,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(n){return a([e,n])}}function a(s){if(o)throw new TypeError("Generator is already executing.");while(t)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){t.label=s[1];break}if(s[0]===6&&t.label<r[1]){t.label=r[1];r=s;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(s);break}if(r[2])t.ops.pop();t.trys.pop();continue}s=n.call(e,t)}catch(e){s=[6,e];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[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-9a11e843.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='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,t,o,i;var r=this;return __generator(this,(function(s){switch(s.label){case 0:console.log("[VIEW] Loading envelope...");s.label=1;case 1:s.trys.push([1,3,,4]);o=this;return[4,throttledGetEnvelope(this.endpoint,this.envelopeId)];case 2:o.envelope=s.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=s.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,(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(s){switch(s.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;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,t,o;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,(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,getDocumentDownloadLink(this.endpoint,this.envelopeId,this.envelope.envelope_document_id)];case 4:i=s.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=s.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 t=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.session,this.envelope)){t.push({id:"cancel",label:"Cancel"})}var o=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(o||r){t.push({label:""});if(o){t.push({id:"download-attachments",label:i>1?"Download Documents":"Download Document"})}if(r){t.push({id:"download-certificate",label:"Download Certificate"})}if(o&&r){t.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:t,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 t=integerSequence(1,n.page_numbers);return h(Fragment,null,t.map((function(t){return h("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&&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
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){e({T:void 0,a:void 0});var r;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(r||(r={}));var n;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(n||(n={}));var i=e("c",(function(e,t,r){var i,a;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var s=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var u=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!s){return{canPerform:false,message:"Active session required"}}var c=(r===null||r===void 0?void 0:r.profile_id)===s;var f=(r===null||r===void 0?void 0:r.organization_id)===u;var l=(i=r===null||r===void 0?void 0:r.is_personal)!==null&&i!==void 0?i:false;var p=(a=r===null||r===void 0?void 0:r.is_public)!==null&&a!==void 0?a:false;var d=[];switch(t){case"create_personal":d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":d.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!c){if(!l&&f||!p){d.push(n.TEMPLATE_MEMBER_READ)}}break;case"write":if(!c){d.push(n.TEMPLATE_MEMBER_READ);d.push(n.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_ORG)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);d.push(n.TEMPLATE_CREATOR_VISIBILITY)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(c){d.push(n.TEMPLATE_CREATOR_DELETE)}else{d.push(n.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(o(e,d)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(d.toString())}}));var o=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var a=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var s=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var u=e("g",(function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))}));var c=["name","is_personal","is_public","sender","description","roles","fields"];var f=e("b",(function(e,t,r){var n={timeout:12e4,onUploadProgress:function(e){var t=e.total||1;var n=e.loaded||0;r===null||r===void 0?void 0:r(Math.floor(n*100/(t||1)),n,t||1)}};if(t.documents&&t.documents[0]instanceof File){var i=new FormData;c.forEach((function(e){if(t[e]!==undefined){i.append(e,t[e])}}));t.documents.forEach((function(e){i.append("documents",e,e.name)}));return e.api.post("/v2/templates",i,n).then((function(e){return e.data}))}else{return e.api.post("/v2/templates",t,n).then((function(e){return e.data}))}}));var l=e("u",(function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))}));var p=e("d",(function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))}));var d;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(d||(d={}));var h=e("l",(function(e,t){if(t===void 0){t={}}return a(void 0,void 0,void 0,(function(){return s(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))}));var v;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(v||(v=e("T",{})));var E;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(E||(E=e("a",{})));var m;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(m||(m={}));var y;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(y||(y={}));var g;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(g||(g={}));var _;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(_||(_={}));function b(e,t){return function r(){return e.apply(t,arguments)}}var R=Object.prototype.toString;var T=Object.getPrototypeOf;var A=function(e){return function(t){var r=R.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var O=function(e){e=e.toLowerCase();return function(t){return A(t)===e}};var w=function(e){return function(t){return typeof t===e}};var S=Array.isArray;var L=w("undefined");function C(e){return e!==null&&!L(e)&&e.constructor!==null&&!L(e.constructor)&&M(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var P=O("ArrayBuffer");function N(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&P(e.buffer)}return t}var I=w("string");var M=w("function");var B=w("number");var D=function(e){return e!==null&&typeof e==="object"};var j=function(e){return e===true||e===false};var U=function(e){if(A(e)!=="object"){return false}var t=T(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var x=O("Date");var F=O("File");var k=O("Blob");var q=O("FileList");var z=function(e){return D(e)&&M(e.pipe)};var V=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||M(e.append)&&((t=A(e))==="formdata"||t==="object"&&M(e.toString)&&e.toString()==="[object FormData]"))};var G=O("URLSearchParams");var H=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function J(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var a;var s;if(typeof e!=="object"){e=[e]}if(S(e)){for(a=0,s=e.length;a<s;a++){t.call(null,e[a],a,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var c=u.length;var f=void 0;for(a=0;a<c;a++){f=u[a];t.call(null,e[f],f,e)}}}function W(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var K=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var Y=function(e){return!L(e)&&e!==K};function X(){var e=(Y(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&W(t,n)||n;if(U(t[i])&&U(r)){t[i]=X(t[i],r)}else if(U(r)){t[i]=X({},r)}else if(S(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&J(arguments[n],r)}return t}var Z=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;J(t,(function(t,n){if(r&&M(t)){e[n]=b(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var $=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var Q=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var ee=function(e,t,r,n){var i;var o;var a;var s={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){a=i[o];if((!n||n(a,e,t))&&!s[a]){t[a]=e[a];s[a]=true}}e=r!==false&&T(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var te=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var re=function(e){if(!e)return null;if(S(e))return e;var t=e.length;if(!B(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var ne=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&T(Uint8Array));var ie=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var oe=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var ae=O("HTMLFormElement");var se=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var ue=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var ce=O("RegExp");var fe=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};J(r,(function(r,i){var o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};var le=function(e){fe(e,(function(t,r){if(M(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!M(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var pe=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};S(e)?n(e):n(String(e).split(t));return r};var de=function(){};var he=function(e,t){e=+e;return Number.isFinite(e)?e:t};var ve="abcdefghijklmnopqrstuvwxyz";var Ee="0123456789";var me={DIGIT:Ee,ALPHA:ve,ALPHA_DIGIT:ve+ve.toUpperCase()+Ee};var ye=function(e,t){if(e===void 0){e=16}if(t===void 0){t=me.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function ge(e){return!!(e&&M(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var _e=function(e){var t=new Array(10);var r=function(e,n){if(D(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=S(e)?[]:{};J(e,(function(e,t){var o=r(e,n+1);!L(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var be=O("AsyncFunction");var Re=function(e){return e&&(D(e)||M(e))&&M(e.then)&&M(e.catch)};var Te={isArray:S,isArrayBuffer:P,isBuffer:C,isFormData:V,isArrayBufferView:N,isString:I,isNumber:B,isBoolean:j,isObject:D,isPlainObject:U,isUndefined:L,isDate:x,isFile:F,isBlob:k,isRegExp:ce,isFunction:M,isStream:z,isURLSearchParams:G,isTypedArray:ne,isFileList:q,forEach:J,merge:X,extend:Z,trim:H,stripBOM:$,inherits:Q,toFlatObject:ee,kindOf:A,kindOfTest:O,endsWith:te,toArray:re,forEachEntry:ie,matchAll:oe,isHTMLForm:ae,hasOwnProperty:ue,hasOwnProp:ue,reduceDescriptors:fe,freezeMethods:le,toObjectSet:pe,toCamelCase:se,noop:de,toFiniteNumber:he,findKey:W,global:K,isContextDefined:Y,ALPHABET:me,generateString:ye,isSpecCompliantForm:ge,toJSONObject:_e,isAsyncFn:be,isThenable:Re};function Ae(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}Te.inherits(Ae,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Te.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Oe=Ae.prototype;var we={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){we[e]={value:e}}));Object.defineProperties(Ae,we);Object.defineProperty(Oe,"isAxiosError",{value:true});Ae.from=function(e,t,r,n,i,o){var a=Object.create(Oe);Te.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));Ae.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var Se=null;function Le(e){return Te.isPlainObject(e)||Te.isArray(e)}function Ce(e){return Te.endsWith(e,"[]")?e.slice(0,-2):e}function Pe(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=Ce(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Ne(e){return Te.isArray(e)&&!e.some(Le)}var Ie=Te.toFlatObject(Te,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function Me(e,t,r){if(!Te.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=Te.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!Te.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||f;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&Te.isSpecCompliantForm(t);if(!Te.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(Te.isDate(e)){return e.toISOString()}if(!u&&Te.isBlob(e)){throw new Ae("Blob is not supported. Use a Buffer instead.")}if(Te.isArrayBuffer(e)||Te.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function f(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(Te.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(Te.isArray(e)&&Ne(e)||(Te.isFileList(e)||Te.endsWith(r,"[]"))&&(s=Te.toArray(e))){r=Ce(r);s.forEach((function e(n,i){!(Te.isUndefined(n)||n===null)&&t.append(a===true?Pe([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(Le(e)){return true}t.append(Pe(i,r,o),c(e));return false}var l=[];var p=Object.assign(Ie,{defaultVisitor:f,convertValue:c,isVisitable:Le});function d(e,r){if(Te.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);Te.forEach(e,(function e(n,o){var a=!(Te.isUndefined(n)||n===null)&&i.call(t,n,Te.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!Te.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function Be(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function De(e,t){this._pairs=[];e&&Me(e,this,t)}var je=De.prototype;je.append=function e(t,r){this._pairs.push([t,r])};je.toString=function e(t){var r=t?function(e){return t.call(this,e,Be)}:Be;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function Ue(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xe(e,t,r){if(!t){return e}var n=r&&r.encode||Ue;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=Te.isURLSearchParams(t)?t.toString():new De(t,r).toString(n)}if(o){var a=e.indexOf("#");if(a!==-1){e=e.slice(0,a)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Fe=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){Te.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var ke={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var qe=typeof URLSearchParams!=="undefined"?URLSearchParams:De;var ze=typeof FormData!=="undefined"?FormData:null;var Ve=typeof Blob!=="undefined"?Blob:null;var Ge={isBrowser:true,classes:{URLSearchParams:qe,FormData:ze,Blob:Ve},protocols:["http","https","file","blob","url","data"]};var He=typeof window!=="undefined"&&typeof document!=="undefined";var Je=function(e){return He&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var We=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var Ke=Object.freeze({__proto__:null,hasBrowserEnv:He,hasStandardBrowserWebWorkerEnv:We,hasStandardBrowserEnv:Je});var Ye=__assign(__assign({},Ke),Ge);function Xe(e,t){return Me(e,new Ye.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(Ye.isNode&&Te.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function Ze(e){return Te.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function $e(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function Qe(e){function t(e,r,n,i){var o=e[i++];if(o==="__proto__")return true;var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&Te.isArray(n)?n.length:o;if(s){if(Te.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!Te.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&Te.isArray(n[o])){n[o]=$e(n[o])}return!a}if(Te.isFormData(e)&&Te.isFunction(e.entries)){var r={};Te.forEachEntry(e,(function(e,n){t(Ze(e),n,r,0)}));return r}return null}function et(e,t,r){if(Te.isString(e)){try{(t||JSON.parse)(e);return Te.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var tt={transitional:ke,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=Te.isObject(t);if(o&&Te.isHTMLForm(t)){t=new FormData(t)}var a=Te.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(Qe(t)):t}if(Te.isArrayBuffer(t)||Te.isBuffer(t)||Te.isStream(t)||Te.isFile(t)||Te.isBlob(t)){return t}if(Te.isArrayBufferView(t)){return t.buffer}if(Te.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return Xe(t,this.formSerializer).toString()}if((s=Te.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return Me(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return et(t)}return t}],transformResponse:[function e(t){var r=this.transitional||tt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&Te.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var a=!o&&i;try{return JSON.parse(t)}catch(e){if(a){if(e.name==="SyntaxError"){throw Ae.from(e,Ae.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ye.classes.FormData,Blob:Ye.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};Te.forEach(["delete","get","head","post","put","patch"],(function(e){tt.headers[e]={}}));var rt=Te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var nt=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&rt[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var it=Symbol("internals");function ot(e){return e&&String(e).trim().toLowerCase()}function at(e){if(e===false||e==null){return e}return Te.isArray(e)?e.map(at):String(e)}function st(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var ut=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function ct(e,t,r,n,i){if(Te.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Te.isString(t))return;if(Te.isString(n)){return t.indexOf(n)!==-1}if(Te.isRegExp(n)){return n.test(t)}}function ft(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function lt(e,t){var r=Te.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var pt=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=ot(t);if(!i){throw new Error("header name must be a non-empty string")}var o=Te.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=at(e)}}var o=function(e,t){return Te.forEach(e,(function(e,r){return i(e,r,t)}))};if(Te.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(Te.isString(e)&&(e=e.trim())&&!ut(e)){o(nt(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=ot(e);if(e){var r=Te.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return st(n)}if(Te.isFunction(t)){return t.call(this,n,r)}if(Te.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=ot(e);if(e){var r=Te.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||ct(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=ot(e);if(e){var i=Te.findKey(r,e);if(i&&(!t||ct(r,r[i],i,t))){delete r[i];n=true}}}if(Te.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||ct(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};Te.forEach(this,(function(n,i){var o=Te.findKey(r,i);if(o){t[o]=at(n);delete t[i];return}var a=e?ft(i):String(i).trim();if(a!==i){delete t[i]}t[a]=at(n);r[a]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);Te.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&Te.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[it]=this[it]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=ot(e);if(!r[t]){lt(n,e);r[t]=true}}Te.isArray(e)?e.forEach(i):i(e);return this};return e}();pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Te.reduceDescriptors(pt.prototype,(function(e,t){var r=e.value;var n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}));Te.freezeMethods(pt);function dt(e,t){var r=this||tt;var n=t||r;var i=pt.from(n.headers);var o=n.data;Te.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function ht(e){return!!(e&&e.__CANCEL__)}function vt(e,t,r){Ae.call(this,e==null?"canceled":e,Ae.ERR_CANCELED,t,r);this.name="CanceledError"}Te.inherits(vt,Ae,{__CANCEL__:true});function Et(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new Ae("Request failed with status code "+r.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var mt=Ye.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];Te.isNumber(r)&&a.push("expires="+new Date(r).toGMTString());Te.isString(n)&&a.push("path="+n);Te.isString(i)&&a.push("domain="+i);o===true&&a.push("secure");document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function yt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gt(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function _t(e,t){if(e&&!yt(t)){return gt(e,t)}return t}var bt=Ye.hasStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=Te.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Rt(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Tt(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var a;t=t!==undefined?t:1e3;return function s(u){var c=Date.now();var f=n[o];if(!a){a=c}r[i]=u;n[i]=c;var l=o;var p=0;while(l!==i){p+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var d=f&&c-f;return d?Math.round(p*1e3/d):undefined}}function At(e,t){var r=0;var n=Tt(50,250);return function(i){var o=i.loaded;var a=i.lengthComputable?i.total:undefined;var s=o-r;var u=n(s);var c=o<=a;r=o;var f={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:i};f[t?"download":"upload"]=true;e(f)}}var Ot=typeof XMLHttpRequest!=="undefined";var wt=Ot&&function(e){return new Promise((function t(r,n){var i=e.data;var o=pt.from(e.headers).normalize();var a=e.responseType,s=e.withXSRFToken;var u;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var f;if(Te.isFormData(i)){if(Ye.hasStandardBrowserEnv||Ye.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((f=o.getContentType())!==false){var l=f?f.split(";").map((function(e){return e.trim()})).filter(Boolean):[],p=l[0],d=l.slice(1);o.setContentType(__spreadArray([p||"multipart/form-data"],d,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"";var E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(v+":"+E))}var m=_t(e.baseURL,e.url);h.open(e.method.toUpperCase(),xe(m,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function y(){if(!h){return}var t=pt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};Et((function e(t){r(t);c()}),(function e(t){n(t);c()}),o);h=null}if("onloadend"in h){h.onloadend=y}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(y)}}h.onabort=function t(){if(!h){return}n(new Ae("Request aborted",Ae.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new Ae("Network Error",Ae.ERR_NETWORK,e,h));h=null};h.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||ke;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new Ae(r,i.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,h));h=null};if(Ye.hasStandardBrowserEnv){s&&Te.isFunction(s)&&(s=s(e));if(s||s!==false&&bt(m)){var g=e.xsrfHeaderName&&e.xsrfCookieName&&mt.read(e.xsrfCookieName);if(g){o.set(e.xsrfHeaderName,g)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){Te.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!Te.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(a&&a!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",At(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",At(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new vt(null,e,h):t);h.abort();h=null};e.cancelToken&&e.cancelToken.subscribe(u);if(e.signal){e.signal.aborted?u():e.signal.addEventListener("abort",u)}}var _=Rt(m);if(_&&Ye.protocols.indexOf(_)===-1){n(new Ae("Unsupported protocol "+_+":",Ae.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var St={http:Se,xhr:wt};Te.forEach(St,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Lt=function(e){return"- ".concat(e)};var Ct=function(e){return Te.isFunction(e)||e===null||e===false};var Pt={getAdapter:function(e){e=Te.isArray(e)?e:[e];var t=e.length;var r;var n;var i={};for(var o=0;o<t;o++){r=e[o];var a=void 0;n=r;if(!Ct(r)){n=St[(a=String(r)).toLowerCase()];if(n===undefined){throw new Ae("Unknown adapter '".concat(a,"'"))}}if(n){break}i[a||"#"+o]=n}if(!n){var s=Object.entries(i).map((function(e){var t=e[0],r=e[1];return"adapter ".concat(t," ")+(r===false?"is not supported by the environment":"is not available in the build")}));var u=t?s.length>1?"since :\n"+s.map(Lt).join("\n"):" "+Lt(s[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n},adapters:St};function Nt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new vt(null,e)}}function It(e){Nt(e);e.headers=pt.from(e.headers);e.data=dt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=Pt.getAdapter(e.adapter||tt.adapter);return t(e).then((function t(r){Nt(e);r.data=dt.call(e,e.transformResponse,r);r.headers=pt.from(r.headers);return r}),(function t(r){if(!ht(r)){Nt(e);if(r&&r.response){r.response.data=dt.call(e,e.transformResponse,r.response);r.response.headers=pt.from(r.response.headers)}}return Promise.reject(r)}))}var Mt=function(e){return e instanceof pt?e.toJSON():e};function Bt(e,t){t=t||{};var r={};function n(e,t,r){if(Te.isPlainObject(e)&&Te.isPlainObject(t)){return Te.merge.call({caseless:r},e,t)}else if(Te.isPlainObject(t)){return Te.merge({},t)}else if(Te.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!Te.isUndefined(t)){return n(e,t,r)}else if(!Te.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!Te.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!Te.isUndefined(t)){return n(undefined,t)}else if(!Te.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i(Mt(e),Mt(t),true)}};Te.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);Te.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var Dt="1.6.5";var jt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){jt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var Ut={};jt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Dt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Ae(i(n," has been removed"+(r?" in "+r:"")),Ae.ERR_DEPRECATED)}if(r&&!Ut[n]){Ut[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function xt(e,t,r){if(typeof e!=="object"){throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var a=t[o];if(a){var s=e[o];var u=s===undefined||a(s,o,e);if(u!==true){throw new Ae("option "+o+" must be "+u,Ae.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Ae("Unknown option "+o,Ae.ERR_BAD_OPTION)}}}var Ft={assertOptions:xt,validators:jt};var kt=Ft.validators;var qt=function(){function e(e){this.defaults=e;this.interceptors={request:new Fe,response:new Fe}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Bt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){Ft.assertOptions(r,{silentJSONParsing:kt.transitional(kt.boolean),forcedJSONParsing:kt.transitional(kt.boolean),clarifyTimeoutError:kt.transitional(kt.boolean)},false)}if(n!=null){if(Te.isFunction(n)){t.paramsSerializer={serialize:n}}else{Ft.assertOptions(n,{encode:kt.function,serialize:kt.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=i&&Te.merge(i.common,i[t.method]);i&&Te.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=pt.concat(o,i);var a=[];var s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var c;var f=0;var l;if(!s){var p=[It.bind(this),undefined];p.unshift.apply(p,a);p.push.apply(p,u);l=p.length;c=Promise.resolve(t);while(f<l){c=c.then(p[f++],p[f++])}return c}l=a.length;var d=t;f=0;while(f<l){var h=a[f++];var v=a[f++];try{d=h(d)}catch(e){v.call(this,e);break}}try{c=It.call(this,d)}catch(e){return Promise.reject(e)}f=0;l=u.length;while(f<l){c=c.then(u[f++],u[f++])}return c};e.prototype.getUri=function(e){e=Bt(this.defaults,e);var t=_t(e.baseURL,e.url);return xe(t,e.params,e.paramsSerializer)};return e}();Te.forEach(["delete","get","head","options"],(function e(t){qt.prototype[t]=function(e,r){return this.request(Bt(r||{},{method:t,url:e,data:(r||{}).data}))}}));Te.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Bt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}qt.prototype[t]=r();qt.prototype[t+"Form"]=r(true)}));var zt=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new vt(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function Vt(e){return function t(r){return e.apply(null,r)}}function Gt(e){return Te.isObject(e)&&e.isAxiosError===true}var Ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ht).forEach((function(e){var t=e[0],r=e[1];Ht[r]=t}));function Jt(e){var t=new qt(e);var r=b(qt.prototype.request,t);Te.extend(r,qt.prototype,t,{allOwnKeys:true});Te.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return Jt(Bt(e,r))};return r}var Wt=Jt(tt);Wt.Axios=qt;Wt.CanceledError=vt;Wt.CancelToken=zt;Wt.isCancel=ht;Wt.VERSION=Dt;Wt.toFormData=Me;Wt.AxiosError=Ae;Wt.Cancel=Wt.CanceledError;Wt.all=function e(t){return Promise.all(t)};Wt.spread=Vt;Wt.isAxiosError=Gt;Wt.mergeConfig=Bt;Wt.AxiosHeaders=pt;Wt.formToJSON=function(e){return Qe(Te.isHTMLForm(e)?new FormData(e):e)};Wt.getAdapter=Pt.getAdapter;Wt.HttpStatusCode=Ht;Wt.default=Wt;var Kt=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var Yt=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return Kt()}try{if(!__global__)return Kt();return __global__}finally{delete Object.prototype.__global__}}();var Xt=Symbol.for("verdocs-default-endpoint");var Zt=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var $t=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL=window.location.origin==="https://beta.verdocs.com"?"https://stage-api.verdocs.com":"https://api.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||this.baseURL;this.timeout=(e===null||e===void 0?void 0:e.timeout)||this.timeout;this.environment=(e===null||e===void 0?void 0:e.environment)||this.environment;this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||this.sessionType;this.clientID=(e===null||e===void 0?void 0:e.clientID)||this.clientID;this.api=Wt.create({baseURL:this.baseURL,timeout:this.timeout})}e.prototype.setDefault=function(){Yt[Xt]=this};e.getDefault=function(){if(!Yt[Xt]){Yt[Xt]=new e;window.console.debug("[JS_SDK] Created default endpoint",Yt[Xt].baseURL)}return Yt[Xt]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.baseURL=e;this.api.defaults.baseURL=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(Zt)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var r=t(e);if(r===null||r.exp&&r.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=r;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}())}}}));
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){e({T:void 0,a:void 0});var r;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(r||(r={}));var n;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(n||(n={}));var i=e("c",(function(e,t,r){var i,a;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var s=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var u=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!s){return{canPerform:false,message:"Active session required"}}var c=(r===null||r===void 0?void 0:r.profile_id)===s;var f=(r===null||r===void 0?void 0:r.organization_id)===u;var l=(i=r===null||r===void 0?void 0:r.is_personal)!==null&&i!==void 0?i:false;var p=(a=r===null||r===void 0?void 0:r.is_public)!==null&&a!==void 0?a:false;var d=[];switch(t){case"create_personal":d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":d.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!c){if(!l&&f||!p){d.push(n.TEMPLATE_MEMBER_READ)}}break;case"write":if(!c){d.push(n.TEMPLATE_MEMBER_READ);d.push(n.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_ORG)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);d.push(n.TEMPLATE_CREATOR_VISIBILITY)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(c){d.push(n.TEMPLATE_CREATOR_DELETE)}else{d.push(n.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(o(e,d)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(d.toString())}}));var o=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var a=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var s=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var u=e("g",(function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))}));var c=["name","is_personal","is_public","sender","description","roles","fields"];var f=e("b",(function(e,t,r){var n={timeout:12e4,onUploadProgress:function(e){var t=e.total||1;var n=e.loaded||0;r===null||r===void 0?void 0:r(Math.floor(n*100/(t||1)),n,t||1)}};if(t.documents&&t.documents[0]instanceof File){var i=new FormData;c.forEach((function(e){if(t[e]!==undefined){i.append(e,t[e])}}));t.documents.forEach((function(e){i.append("documents",e,e.name)}));return e.api.post("/v2/templates",i,n).then((function(e){return e.data}))}else{return e.api.post("/v2/templates",t,n).then((function(e){return e.data}))}}));var l=e("u",(function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))}));var p=e("d",(function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))}));var d;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(d||(d={}));var h=e("l",(function(e,t){if(t===void 0){t={}}return a(void 0,void 0,void 0,(function(){return s(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))}));var v;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(v||(v=e("T",{})));var E;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(E||(E=e("a",{})));var m;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(m||(m={}));var y;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(y||(y={}));var g;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(g||(g={}));var _;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(_||(_={}));function b(e,t){return function r(){return e.apply(t,arguments)}}var R=Object.prototype.toString;var T=Object.getPrototypeOf;var A=function(e){return function(t){var r=R.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var O=function(e){e=e.toLowerCase();return function(t){return A(t)===e}};var w=function(e){return function(t){return typeof t===e}};var S=Array.isArray;var L=w("undefined");function C(e){return e!==null&&!L(e)&&e.constructor!==null&&!L(e.constructor)&&M(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var P=O("ArrayBuffer");function N(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&P(e.buffer)}return t}var I=w("string");var M=w("function");var B=w("number");var D=function(e){return e!==null&&typeof e==="object"};var j=function(e){return e===true||e===false};var U=function(e){if(A(e)!=="object"){return false}var t=T(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var x=O("Date");var F=O("File");var k=O("Blob");var q=O("FileList");var z=function(e){return D(e)&&M(e.pipe)};var V=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||M(e.append)&&((t=A(e))==="formdata"||t==="object"&&M(e.toString)&&e.toString()==="[object FormData]"))};var G=O("URLSearchParams");var H=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function J(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var a;var s;if(typeof e!=="object"){e=[e]}if(S(e)){for(a=0,s=e.length;a<s;a++){t.call(null,e[a],a,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var c=u.length;var f=void 0;for(a=0;a<c;a++){f=u[a];t.call(null,e[f],f,e)}}}function W(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var K=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var Y=function(e){return!L(e)&&e!==K};function X(){var e=(Y(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&W(t,n)||n;if(U(t[i])&&U(r)){t[i]=X(t[i],r)}else if(U(r)){t[i]=X({},r)}else if(S(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&J(arguments[n],r)}return t}var Z=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;J(t,(function(t,n){if(r&&M(t)){e[n]=b(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var $=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var Q=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var ee=function(e,t,r,n){var i;var o;var a;var s={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){a=i[o];if((!n||n(a,e,t))&&!s[a]){t[a]=e[a];s[a]=true}}e=r!==false&&T(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var te=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var re=function(e){if(!e)return null;if(S(e))return e;var t=e.length;if(!B(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var ne=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&T(Uint8Array));var ie=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var oe=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var ae=O("HTMLFormElement");var se=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var ue=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var ce=O("RegExp");var fe=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};J(r,(function(r,i){var o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};var le=function(e){fe(e,(function(t,r){if(M(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!M(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var pe=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};S(e)?n(e):n(String(e).split(t));return r};var de=function(){};var he=function(e,t){e=+e;return Number.isFinite(e)?e:t};var ve="abcdefghijklmnopqrstuvwxyz";var Ee="0123456789";var me={DIGIT:Ee,ALPHA:ve,ALPHA_DIGIT:ve+ve.toUpperCase()+Ee};var ye=function(e,t){if(e===void 0){e=16}if(t===void 0){t=me.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function ge(e){return!!(e&&M(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var _e=function(e){var t=new Array(10);var r=function(e,n){if(D(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=S(e)?[]:{};J(e,(function(e,t){var o=r(e,n+1);!L(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var be=O("AsyncFunction");var Re=function(e){return e&&(D(e)||M(e))&&M(e.then)&&M(e.catch)};var Te={isArray:S,isArrayBuffer:P,isBuffer:C,isFormData:V,isArrayBufferView:N,isString:I,isNumber:B,isBoolean:j,isObject:D,isPlainObject:U,isUndefined:L,isDate:x,isFile:F,isBlob:k,isRegExp:ce,isFunction:M,isStream:z,isURLSearchParams:G,isTypedArray:ne,isFileList:q,forEach:J,merge:X,extend:Z,trim:H,stripBOM:$,inherits:Q,toFlatObject:ee,kindOf:A,kindOfTest:O,endsWith:te,toArray:re,forEachEntry:ie,matchAll:oe,isHTMLForm:ae,hasOwnProperty:ue,hasOwnProp:ue,reduceDescriptors:fe,freezeMethods:le,toObjectSet:pe,toCamelCase:se,noop:de,toFiniteNumber:he,findKey:W,global:K,isContextDefined:Y,ALPHABET:me,generateString:ye,isSpecCompliantForm:ge,toJSONObject:_e,isAsyncFn:be,isThenable:Re};function Ae(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}Te.inherits(Ae,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Te.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Oe=Ae.prototype;var we={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){we[e]={value:e}}));Object.defineProperties(Ae,we);Object.defineProperty(Oe,"isAxiosError",{value:true});Ae.from=function(e,t,r,n,i,o){var a=Object.create(Oe);Te.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));Ae.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var Se=null;function Le(e){return Te.isPlainObject(e)||Te.isArray(e)}function Ce(e){return Te.endsWith(e,"[]")?e.slice(0,-2):e}function Pe(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=Ce(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Ne(e){return Te.isArray(e)&&!e.some(Le)}var Ie=Te.toFlatObject(Te,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function Me(e,t,r){if(!Te.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=Te.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!Te.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||f;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&Te.isSpecCompliantForm(t);if(!Te.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(Te.isDate(e)){return e.toISOString()}if(!u&&Te.isBlob(e)){throw new Ae("Blob is not supported. Use a Buffer instead.")}if(Te.isArrayBuffer(e)||Te.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function f(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(Te.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(Te.isArray(e)&&Ne(e)||(Te.isFileList(e)||Te.endsWith(r,"[]"))&&(s=Te.toArray(e))){r=Ce(r);s.forEach((function e(n,i){!(Te.isUndefined(n)||n===null)&&t.append(a===true?Pe([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(Le(e)){return true}t.append(Pe(i,r,o),c(e));return false}var l=[];var p=Object.assign(Ie,{defaultVisitor:f,convertValue:c,isVisitable:Le});function d(e,r){if(Te.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);Te.forEach(e,(function e(n,o){var a=!(Te.isUndefined(n)||n===null)&&i.call(t,n,Te.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!Te.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function Be(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function De(e,t){this._pairs=[];e&&Me(e,this,t)}var je=De.prototype;je.append=function e(t,r){this._pairs.push([t,r])};je.toString=function e(t){var r=t?function(e){return t.call(this,e,Be)}:Be;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function Ue(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xe(e,t,r){if(!t){return e}var n=r&&r.encode||Ue;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=Te.isURLSearchParams(t)?t.toString():new De(t,r).toString(n)}if(o){var a=e.indexOf("#");if(a!==-1){e=e.slice(0,a)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Fe=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){Te.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var ke={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var qe=typeof URLSearchParams!=="undefined"?URLSearchParams:De;var ze=typeof FormData!=="undefined"?FormData:null;var Ve=typeof Blob!=="undefined"?Blob:null;var Ge={isBrowser:true,classes:{URLSearchParams:qe,FormData:ze,Blob:Ve},protocols:["http","https","file","blob","url","data"]};var He=typeof window!=="undefined"&&typeof document!=="undefined";var Je=function(e){return He&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var We=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var Ke=Object.freeze({__proto__:null,hasBrowserEnv:He,hasStandardBrowserWebWorkerEnv:We,hasStandardBrowserEnv:Je});var Ye=__assign(__assign({},Ke),Ge);function Xe(e,t){return Me(e,new Ye.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(Ye.isNode&&Te.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function Ze(e){return Te.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function $e(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function Qe(e){function t(e,r,n,i){var o=e[i++];if(o==="__proto__")return true;var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&Te.isArray(n)?n.length:o;if(s){if(Te.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!Te.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&Te.isArray(n[o])){n[o]=$e(n[o])}return!a}if(Te.isFormData(e)&&Te.isFunction(e.entries)){var r={};Te.forEachEntry(e,(function(e,n){t(Ze(e),n,r,0)}));return r}return null}function et(e,t,r){if(Te.isString(e)){try{(t||JSON.parse)(e);return Te.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var tt={transitional:ke,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=Te.isObject(t);if(o&&Te.isHTMLForm(t)){t=new FormData(t)}var a=Te.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(Qe(t)):t}if(Te.isArrayBuffer(t)||Te.isBuffer(t)||Te.isStream(t)||Te.isFile(t)||Te.isBlob(t)){return t}if(Te.isArrayBufferView(t)){return t.buffer}if(Te.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return Xe(t,this.formSerializer).toString()}if((s=Te.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return Me(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return et(t)}return t}],transformResponse:[function e(t){var r=this.transitional||tt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&Te.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var a=!o&&i;try{return JSON.parse(t)}catch(e){if(a){if(e.name==="SyntaxError"){throw Ae.from(e,Ae.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ye.classes.FormData,Blob:Ye.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};Te.forEach(["delete","get","head","post","put","patch"],(function(e){tt.headers[e]={}}));var rt=Te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var nt=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&rt[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var it=Symbol("internals");function ot(e){return e&&String(e).trim().toLowerCase()}function at(e){if(e===false||e==null){return e}return Te.isArray(e)?e.map(at):String(e)}function st(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var ut=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function ct(e,t,r,n,i){if(Te.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Te.isString(t))return;if(Te.isString(n)){return t.indexOf(n)!==-1}if(Te.isRegExp(n)){return n.test(t)}}function ft(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function lt(e,t){var r=Te.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var pt=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=ot(t);if(!i){throw new Error("header name must be a non-empty string")}var o=Te.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=at(e)}}var o=function(e,t){return Te.forEach(e,(function(e,r){return i(e,r,t)}))};if(Te.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(Te.isString(e)&&(e=e.trim())&&!ut(e)){o(nt(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=ot(e);if(e){var r=Te.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return st(n)}if(Te.isFunction(t)){return t.call(this,n,r)}if(Te.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=ot(e);if(e){var r=Te.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||ct(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=ot(e);if(e){var i=Te.findKey(r,e);if(i&&(!t||ct(r,r[i],i,t))){delete r[i];n=true}}}if(Te.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||ct(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};Te.forEach(this,(function(n,i){var o=Te.findKey(r,i);if(o){t[o]=at(n);delete t[i];return}var a=e?ft(i):String(i).trim();if(a!==i){delete t[i]}t[a]=at(n);r[a]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);Te.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&Te.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[it]=this[it]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=ot(e);if(!r[t]){lt(n,e);r[t]=true}}Te.isArray(e)?e.forEach(i):i(e);return this};return e}();pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Te.reduceDescriptors(pt.prototype,(function(e,t){var r=e.value;var n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}));Te.freezeMethods(pt);function dt(e,t){var r=this||tt;var n=t||r;var i=pt.from(n.headers);var o=n.data;Te.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function ht(e){return!!(e&&e.__CANCEL__)}function vt(e,t,r){Ae.call(this,e==null?"canceled":e,Ae.ERR_CANCELED,t,r);this.name="CanceledError"}Te.inherits(vt,Ae,{__CANCEL__:true});function Et(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new Ae("Request failed with status code "+r.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var mt=Ye.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];Te.isNumber(r)&&a.push("expires="+new Date(r).toGMTString());Te.isString(n)&&a.push("path="+n);Te.isString(i)&&a.push("domain="+i);o===true&&a.push("secure");document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function yt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gt(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function _t(e,t){if(e&&!yt(t)){return gt(e,t)}return t}var bt=Ye.hasStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=Te.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Rt(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Tt(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var a;t=t!==undefined?t:1e3;return function s(u){var c=Date.now();var f=n[o];if(!a){a=c}r[i]=u;n[i]=c;var l=o;var p=0;while(l!==i){p+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var d=f&&c-f;return d?Math.round(p*1e3/d):undefined}}function At(e,t){var r=0;var n=Tt(50,250);return function(i){var o=i.loaded;var a=i.lengthComputable?i.total:undefined;var s=o-r;var u=n(s);var c=o<=a;r=o;var f={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:i};f[t?"download":"upload"]=true;e(f)}}var Ot=typeof XMLHttpRequest!=="undefined";var wt=Ot&&function(e){return new Promise((function t(r,n){var i=e.data;var o=pt.from(e.headers).normalize();var a=e.responseType,s=e.withXSRFToken;var u;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var f;if(Te.isFormData(i)){if(Ye.hasStandardBrowserEnv||Ye.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((f=o.getContentType())!==false){var l=f?f.split(";").map((function(e){return e.trim()})).filter(Boolean):[],p=l[0],d=l.slice(1);o.setContentType(__spreadArray([p||"multipart/form-data"],d,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"";var E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(v+":"+E))}var m=_t(e.baseURL,e.url);h.open(e.method.toUpperCase(),xe(m,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function y(){if(!h){return}var t=pt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};Et((function e(t){r(t);c()}),(function e(t){n(t);c()}),o);h=null}if("onloadend"in h){h.onloadend=y}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(y)}}h.onabort=function t(){if(!h){return}n(new Ae("Request aborted",Ae.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new Ae("Network Error",Ae.ERR_NETWORK,e,h));h=null};h.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||ke;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new Ae(r,i.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,h));h=null};if(Ye.hasStandardBrowserEnv){s&&Te.isFunction(s)&&(s=s(e));if(s||s!==false&&bt(m)){var g=e.xsrfHeaderName&&e.xsrfCookieName&&mt.read(e.xsrfCookieName);if(g){o.set(e.xsrfHeaderName,g)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){Te.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!Te.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(a&&a!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",At(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",At(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new vt(null,e,h):t);h.abort();h=null};e.cancelToken&&e.cancelToken.subscribe(u);if(e.signal){e.signal.aborted?u():e.signal.addEventListener("abort",u)}}var _=Rt(m);if(_&&Ye.protocols.indexOf(_)===-1){n(new Ae("Unsupported protocol "+_+":",Ae.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var St={http:Se,xhr:wt};Te.forEach(St,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Lt=function(e){return"- ".concat(e)};var Ct=function(e){return Te.isFunction(e)||e===null||e===false};var Pt={getAdapter:function(e){e=Te.isArray(e)?e:[e];var t=e.length;var r;var n;var i={};for(var o=0;o<t;o++){r=e[o];var a=void 0;n=r;if(!Ct(r)){n=St[(a=String(r)).toLowerCase()];if(n===undefined){throw new Ae("Unknown adapter '".concat(a,"'"))}}if(n){break}i[a||"#"+o]=n}if(!n){var s=Object.entries(i).map((function(e){var t=e[0],r=e[1];return"adapter ".concat(t," ")+(r===false?"is not supported by the environment":"is not available in the build")}));var u=t?s.length>1?"since :\n"+s.map(Lt).join("\n"):" "+Lt(s[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n},adapters:St};function Nt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new vt(null,e)}}function It(e){Nt(e);e.headers=pt.from(e.headers);e.data=dt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=Pt.getAdapter(e.adapter||tt.adapter);return t(e).then((function t(r){Nt(e);r.data=dt.call(e,e.transformResponse,r);r.headers=pt.from(r.headers);return r}),(function t(r){if(!ht(r)){Nt(e);if(r&&r.response){r.response.data=dt.call(e,e.transformResponse,r.response);r.response.headers=pt.from(r.response.headers)}}return Promise.reject(r)}))}var Mt=function(e){return e instanceof pt?e.toJSON():e};function Bt(e,t){t=t||{};var r={};function n(e,t,r){if(Te.isPlainObject(e)&&Te.isPlainObject(t)){return Te.merge.call({caseless:r},e,t)}else if(Te.isPlainObject(t)){return Te.merge({},t)}else if(Te.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!Te.isUndefined(t)){return n(e,t,r)}else if(!Te.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!Te.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!Te.isUndefined(t)){return n(undefined,t)}else if(!Te.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i(Mt(e),Mt(t),true)}};Te.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);Te.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var Dt="1.6.5";var jt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){jt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var Ut={};jt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Dt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Ae(i(n," has been removed"+(r?" in "+r:"")),Ae.ERR_DEPRECATED)}if(r&&!Ut[n]){Ut[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function xt(e,t,r){if(typeof e!=="object"){throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var a=t[o];if(a){var s=e[o];var u=s===undefined||a(s,o,e);if(u!==true){throw new Ae("option "+o+" must be "+u,Ae.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Ae("Unknown option "+o,Ae.ERR_BAD_OPTION)}}}var Ft={assertOptions:xt,validators:jt};var kt=Ft.validators;var qt=function(){function e(e){this.defaults=e;this.interceptors={request:new Fe,response:new Fe}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Bt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){Ft.assertOptions(r,{silentJSONParsing:kt.transitional(kt.boolean),forcedJSONParsing:kt.transitional(kt.boolean),clarifyTimeoutError:kt.transitional(kt.boolean)},false)}if(n!=null){if(Te.isFunction(n)){t.paramsSerializer={serialize:n}}else{Ft.assertOptions(n,{encode:kt.function,serialize:kt.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=i&&Te.merge(i.common,i[t.method]);i&&Te.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=pt.concat(o,i);var a=[];var s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var c;var f=0;var l;if(!s){var p=[It.bind(this),undefined];p.unshift.apply(p,a);p.push.apply(p,u);l=p.length;c=Promise.resolve(t);while(f<l){c=c.then(p[f++],p[f++])}return c}l=a.length;var d=t;f=0;while(f<l){var h=a[f++];var v=a[f++];try{d=h(d)}catch(e){v.call(this,e);break}}try{c=It.call(this,d)}catch(e){return Promise.reject(e)}f=0;l=u.length;while(f<l){c=c.then(u[f++],u[f++])}return c};e.prototype.getUri=function(e){e=Bt(this.defaults,e);var t=_t(e.baseURL,e.url);return xe(t,e.params,e.paramsSerializer)};return e}();Te.forEach(["delete","get","head","options"],(function e(t){qt.prototype[t]=function(e,r){return this.request(Bt(r||{},{method:t,url:e,data:(r||{}).data}))}}));Te.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Bt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}qt.prototype[t]=r();qt.prototype[t+"Form"]=r(true)}));var zt=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new vt(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function Vt(e){return function t(r){return e.apply(null,r)}}function Gt(e){return Te.isObject(e)&&e.isAxiosError===true}var Ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ht).forEach((function(e){var t=e[0],r=e[1];Ht[r]=t}));function Jt(e){var t=new qt(e);var r=b(qt.prototype.request,t);Te.extend(r,qt.prototype,t,{allOwnKeys:true});Te.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return Jt(Bt(e,r))};return r}var Wt=Jt(tt);Wt.Axios=qt;Wt.CanceledError=vt;Wt.CancelToken=zt;Wt.isCancel=ht;Wt.VERSION=Dt;Wt.toFormData=Me;Wt.AxiosError=Ae;Wt.Cancel=Wt.CanceledError;Wt.all=function e(t){return Promise.all(t)};Wt.spread=Vt;Wt.isAxiosError=Gt;Wt.mergeConfig=Bt;Wt.AxiosHeaders=pt;Wt.formToJSON=function(e){return Qe(Te.isHTMLForm(e)?new FormData(e):e)};Wt.getAdapter=Pt.getAdapter;Wt.HttpStatusCode=Ht;Wt.default=Wt;var Kt=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var Yt=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return Kt()}try{if(!__global__)return Kt();return __global__}finally{delete Object.prototype.__global__}}();var Xt=Symbol.for("verdocs-default-endpoint");var Zt=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var $t=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL=window.location.origin==="https://beta.verdocs.com"||window.location.origin==="https://stage.verdocs.com"?"https://stage-api.verdocs.com":"https://api.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||this.baseURL;this.timeout=(e===null||e===void 0?void 0:e.timeout)||this.timeout;this.environment=(e===null||e===void 0?void 0:e.environment)||this.environment;this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||this.sessionType;this.clientID=(e===null||e===void 0?void 0:e.clientID)||this.clientID;this.api=Wt.create({baseURL:this.baseURL,timeout:this.timeout})}e.prototype.setDefault=function(){Yt[Xt]=this};e.getDefault=function(){if(!Yt[Xt]){Yt[Xt]=new e;window.console.debug("[JS_SDK] Created default endpoint",Yt[Xt].baseURL)}return Yt[Xt]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.baseURL=e;this.api.defaults.baseURL=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(Zt)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var r=t(e);if(r===null||r.exp&&r.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=r;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}())}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function a(t){try{l(r["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):i(t.value).then(s,a)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return l([t,e])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function a(t){try{l(r["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):i(t.value).then(s,a)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return l([t,e])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-034bd59e.system.js","./p-49139f23.system.js","./p-3af6b910.system.js","./p-8324a7a3.system.js","./p-95080569.system.js"],(function(t){"use strict";var e,n,r,i,o;return{setters:[function(t){e=t.r;n=t.h;r=t.H},function(){},function(t){i=t.V},function(t){o=t.g},function(){},function(){},function(){}],execute:function(){var s="ipc-test{max-width:800px;display:block}";var a=t("ipc_test",function(){function t(t){e(this,t);this.store=null;this.endpoint=i.getDefault();this.templateId="e997b94c-9d1b-4c85-8552-dedd24e35550"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();t=this;return[4,o(this.endpoint,this.templateId,false)];case 1:t.store=n.sent();return[3,3];case 2:e=n.sent();console.log("[TEMPLATE VISIBILITY] Error loading template",e);return[3,3];case 3:return[2]}}))}))};t.prototype.render=function(){console.log("[IPC] Rendering");return n(r,null,n("div",null,n("pre",null,n("code",null,JSON.stringify(this.store.state,null,2)))),n("verdocs-template-roles",{templateId:this.templateId}),n("verdocs-template-fields",{templateId:this.templateId}))};return t}());a.style=s}}}));
|