@verdocs/web-sdk 2.3.10 → 2.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/cjs/{TemplateStore-1adfba8c.js → TemplateStore-192c6cf1.js} +1 -1
  2. package/dist/cjs/{VerdocsEndpoint-b9ed9603.js → VerdocsEndpoint-33b643eb.js} +6 -6
  3. package/dist/cjs/interact.min-a61b43b3.js +12 -0
  4. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  5. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  8. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +2 -2
  9. package/dist/cjs/verdocs-contact-picker_3.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +2 -2
  15. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +2 -2
  16. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -2
  18. package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  23. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +3 -3
  25. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  27. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  28. package/dist/components/VerdocsEndpoint.js +6 -6
  29. package/dist/components/interact.min.js +2 -2
  30. package/dist/custom-elements.json +2067 -0
  31. package/dist/docs.json +1 -1
  32. package/dist/esm/{TemplateStore-09d1ae9f.js → TemplateStore-7149eda0.js} +1 -1
  33. package/dist/esm/{VerdocsEndpoint-3add43eb.js → VerdocsEndpoint-7922d31f.js} +6 -6
  34. package/dist/esm/interact.min-6a7b19a1.js +10 -0
  35. package/dist/esm/ipc-test.entry.js +2 -2
  36. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  37. package/dist/esm/verdocs-auth.entry.js +1 -1
  38. package/dist/esm/verdocs-build.entry.js +2 -2
  39. package/dist/esm/verdocs-button-panel_2.entry.js +2 -2
  40. package/dist/esm/verdocs-contact-picker_3.entry.js +1 -1
  41. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  42. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  43. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  44. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  45. package/dist/esm/verdocs-field-textarea.entry.js +2 -2
  46. package/dist/esm/verdocs-field-textbox.entry.js +2 -2
  47. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  48. package/dist/esm/verdocs-preview_8.entry.js +2 -2
  49. package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
  50. package/dist/esm/verdocs-search.entry.js +1 -1
  51. package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
  52. package/dist/esm/verdocs-settings.entry.js +1 -1
  53. package/dist/esm/verdocs-sign.entry.js +1 -1
  54. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  55. package/dist/esm/verdocs-template-fields_4.entry.js +3 -3
  56. package/dist/esm/verdocs-template-star.entry.js +1 -1
  57. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  58. package/dist/esm/verdocs-view.entry.js +1 -1
  59. package/dist/esm-es5/{TemplateStore-09d1ae9f.js → TemplateStore-7149eda0.js} +1 -1
  60. package/dist/esm-es5/{VerdocsEndpoint-3add43eb.js → VerdocsEndpoint-7922d31f.js} +1 -1
  61. package/dist/esm-es5/interact.min-6a7b19a1.js +1 -0
  62. package/dist/esm-es5/ipc-test.entry.js +1 -1
  63. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  64. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  65. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  66. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  67. package/dist/esm-es5/verdocs-contact-picker_3.entry.js +1 -1
  68. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  69. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  70. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  71. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  74. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  83. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  84. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  85. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  86. package/dist/verdocs-web-sdk/{p-dcb0e6ae.system.entry.js → p-0419a39f.system.entry.js} +1 -1
  87. package/dist/verdocs-web-sdk/{p-b33ab87b.entry.js → p-0549358c.entry.js} +1 -1
  88. package/dist/verdocs-web-sdk/{p-532e4fc1.entry.js → p-05b3034f.entry.js} +1 -1
  89. package/dist/verdocs-web-sdk/{p-5ba1045a.system.entry.js → p-06fb711b.system.entry.js} +1 -1
  90. package/dist/verdocs-web-sdk/{p-459510cf.entry.js → p-083bdbc6.entry.js} +1 -1
  91. package/dist/verdocs-web-sdk/{p-45bc9865.system.entry.js → p-0c157d55.system.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/{p-87040b70.system.entry.js → p-14b08edd.system.entry.js} +1 -1
  93. package/dist/verdocs-web-sdk/{p-0cf6b69a.system.js → p-19ff8f86.system.js} +1 -1
  94. package/dist/verdocs-web-sdk/{p-a4cec3d0.system.entry.js → p-1a3168af.system.entry.js} +1 -1
  95. package/dist/verdocs-web-sdk/{p-b63fb3e8.entry.js → p-1efd342e.entry.js} +1 -1
  96. package/dist/verdocs-web-sdk/{p-5d1fecb5.system.js → p-1fdb236c.system.js} +1 -1
  97. package/dist/verdocs-web-sdk/{p-3950200c.entry.js → p-2c47b92e.entry.js} +1 -1
  98. package/dist/verdocs-web-sdk/{p-a4e0b977.entry.js → p-2fe75327.entry.js} +1 -1
  99. package/dist/verdocs-web-sdk/{p-f5778ebb.entry.js → p-3019b350.entry.js} +1 -1
  100. package/dist/verdocs-web-sdk/{p-d8fc5f12.system.entry.js → p-345f88a3.system.entry.js} +1 -1
  101. package/dist/verdocs-web-sdk/{p-52cd4ee2.system.entry.js → p-38679b8e.system.entry.js} +1 -1
  102. package/dist/verdocs-web-sdk/{p-048cfdb5.system.entry.js → p-39f3f620.system.entry.js} +1 -1
  103. package/dist/verdocs-web-sdk/{p-3edde2fa.entry.js → p-3f5fb65b.entry.js} +1 -1
  104. package/dist/verdocs-web-sdk/{p-b70ad4db.system.entry.js → p-3f837e30.system.entry.js} +1 -1
  105. package/dist/verdocs-web-sdk/{p-b4c4335f.system.entry.js → p-401a49cb.system.entry.js} +1 -1
  106. package/dist/verdocs-web-sdk/{p-f07340cd.entry.js → p-47460aa0.entry.js} +1 -1
  107. package/dist/verdocs-web-sdk/{p-f368f4f3.system.entry.js → p-4a1bc6e3.system.entry.js} +1 -1
  108. package/dist/verdocs-web-sdk/{p-6ce14c63.entry.js → p-4a3238f6.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-73cbe09b.entry.js → p-599fa850.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-2fc54023.system.entry.js → p-59c44eee.system.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-e429f3bd.js → p-5aee3e25.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-13ae6d98.system.entry.js → p-5f434764.system.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-30fecb02.entry.js → p-6827df7b.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/{p-318a7887.entry.js → p-6a13105b.entry.js} +1 -1
  115. package/dist/verdocs-web-sdk/{p-e7755198.entry.js → p-6b1735f4.entry.js} +1 -1
  116. package/dist/verdocs-web-sdk/{p-ff80d211.system.entry.js → p-6d70fc87.system.entry.js} +1 -1
  117. package/dist/verdocs-web-sdk/{p-f2aec486.system.entry.js → p-7144ab8e.system.entry.js} +1 -1
  118. package/dist/verdocs-web-sdk/{p-c4140ec7.entry.js → p-73b9ef06.entry.js} +1 -1
  119. package/dist/verdocs-web-sdk/{p-33077795.entry.js → p-7be5cb8c.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/{p-387580cd.system.entry.js → p-7cbe51d8.system.entry.js} +1 -1
  121. package/dist/verdocs-web-sdk/{p-f7510858.system.entry.js → p-90d54d8a.system.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/p-915883e6.js +1 -0
  123. package/dist/verdocs-web-sdk/{p-c50a3992.entry.js → p-974b4c02.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/{p-76cadb98.system.entry.js → p-9c2bec77.system.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/{p-7bad61b5.system.entry.js → p-9dcb8b6c.system.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/{p-13936429.system.entry.js → p-a59064f7.system.entry.js} +1 -1
  127. package/dist/verdocs-web-sdk/{p-0bf08021.js → p-b101fae2.js} +1 -1
  128. package/dist/verdocs-web-sdk/{p-a1ef2dd4.entry.js → p-ce00ee85.entry.js} +1 -1
  129. package/dist/verdocs-web-sdk/{p-e5cf9dd1.system.entry.js → p-d2cee107.system.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/{p-a4749aeb.system.entry.js → p-d7dbeec3.system.entry.js} +1 -1
  131. package/dist/verdocs-web-sdk/{p-d0acae0f.system.entry.js → p-da1c0295.system.entry.js} +1 -1
  132. package/dist/verdocs-web-sdk/{p-4490750d.entry.js → p-dd277e69.entry.js} +1 -1
  133. package/dist/verdocs-web-sdk/p-e2ff37fb.system.js +1 -0
  134. package/dist/verdocs-web-sdk/{p-c8135ff6.entry.js → p-e6b68ad5.entry.js} +1 -1
  135. package/dist/verdocs-web-sdk/{p-66507ccf.entry.js → p-ecb7ea02.entry.js} +1 -1
  136. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  137. package/dist/verdocs-web-sdk/{p-eccbfc3a.entry.js → p-f3a1060a.entry.js} +1 -1
  138. package/dist/verdocs-web-sdk/{p-15b3184c.entry.js → p-f49cb84b.entry.js} +1 -1
  139. package/dist/verdocs-web-sdk/{p-315e20ac.system.entry.js → p-fa1621c8.system.entry.js} +1 -1
  140. package/dist/verdocs-web-sdk/{p-c9ad6362.entry.js → p-fdf0a9de.entry.js} +1 -1
  141. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  142. package/package.json +4 -4
  143. package/dist/cjs/interact.min-7c05ff8a.js +0 -12
  144. package/dist/esm/interact.min-ef5402f3.js +0 -10
  145. package/dist/esm-es5/interact.min-ef5402f3.js +0 -1
  146. package/dist/verdocs-web-sdk/p-999fbe79.js +0 -1
  147. package/dist/verdocs-web-sdk/p-fcd0a40a.system.js +0 -1
@@ -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 __awaiter=this&&this.__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 s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(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 __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};import{d as decodeAccessTokenBody}from"./Types-5f31149e.js";var TemplateSenderTypes$1;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(TemplateSenderTypes$1||(TemplateSenderTypes$1={}));var TemplatePermissions;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(TemplatePermissions||(TemplatePermissions={}));var canPerformTemplateAction=function(e,t,r){var n,i;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var o=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var s=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!o){return{canPerform:false,message:"Active session required"}}var a=(r===null||r===void 0?void 0:r.profile_id)===o;var u=(r===null||r===void 0?void 0:r.organization_id)===s;var l=(n=r===null||r===void 0?void 0:r.is_personal)!==null&&n!==void 0?n:false;var c=(i=r===null||r===void 0?void 0:r.is_public)!==null&&i!==void 0?i:false;var f=[];switch(t){case"create_personal":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!a){if(!l&&u||!c){f.push(TemplatePermissions.TEMPLATE_MEMBER_READ)}}break;case"write":if(!a){f.push(TemplatePermissions.TEMPLATE_MEMBER_READ);f.push(TemplatePermissions.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_ORG)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PUBLIC);f.push(TemplatePermissions.TEMPLATE_CREATOR_VISIBILITY)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_DELETE)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(hasRequiredPermissions(e,f)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(f.toString())}};var hasRequiredPermissions=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var __awaiter=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 s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};var __generator=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,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var getTemplate=function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))};var ALLOWED_CREATE_FIELDS=["name","is_personal","is_public","sender","description","roles","fields"];var createTemplatev2=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;ALLOWED_CREATE_FIELDS.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 updateTemplate=function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))};var deleteTemplate=function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))};var SortOptions$1;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(SortOptions$1||(SortOptions$1={}));var listTemplates=function(e,t){if(t===void 0){t={}}return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))};var TemplateSenderTypes;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(TemplateSenderTypes||(TemplateSenderTypes={}));var TemplateActions;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(TemplateActions||(TemplateActions={}));var SortOptions;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(SortOptions||(SortOptions={}));var Permissions;(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"})(Permissions||(Permissions={}));var Plans;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(Plans||(Plans={}));var Roles;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(Roles||(Roles={}));var denyList=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var isRetryAllowed=function(e){return!denyList.has(e&&e.code)};var namespace="axios-retry";function isNetworkError(e){var t=["ERR_CANCELED","ECONNABORTED"];if(e.response){return false}if(!e.code){return false}if(t.includes(e.code)){return false}return isRetryAllowed(e)}var SAFE_HTTP_METHODS=["get","head","options"];var IDEMPOTENT_HTTP_METHODS=SAFE_HTTP_METHODS.concat(["put","delete"]);function isRetryableError(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function isSafeRequestError(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return isRetryableError(e)&&SAFE_HTTP_METHODS.indexOf(e.config.method)!==-1}function isIdempotentRequestError(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return isRetryableError(e)&&IDEMPOTENT_HTTP_METHODS.indexOf(e.config.method)!==-1}function isNetworkOrIdempotentRequestError(e){return isNetworkError(e)||isIdempotentRequestError(e)}function noDelay(){return 0}function exponentialDelay(e,t,r){if(e===void 0){e=0}if(t===void 0){t=undefined}if(r===void 0){r=100}var n=Math.pow(2,e)*r;var i=n*.2*Math.random();return n+i}var DEFAULT_OPTIONS={retries:3,retryCondition:isNetworkOrIdempotentRequestError,retryDelay:noDelay,shouldResetTimeout:false,onRetry:function(){}};function getRequestOptions(e,t){return __assign(__assign(__assign({},DEFAULT_OPTIONS),t),e[namespace])}function setCurrentState(e,t){var r=getRequestOptions(e,t||{});r.retryCount=r.retryCount||0;r.lastRequestTime=r.lastRequestTime||Date.now();e[namespace]=r;return r}function fixConfig(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function shouldRetry(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,s;return __generator(this,(function(a){switch(a.label){case 0:r=e.retries,n=e.retryCondition;i=(e.retryCount||0)<r&&n(t);if(!(typeof i==="object"))return[3,4];a.label=1;case 1:a.trys.push([1,3,,4]);return[4,i];case 2:o=a.sent();return[2,o!==false];case 3:s=a.sent();return[2,false];case 4:return[2,i]}}))}))}var axiosRetry=function(e,t){var r=e.interceptors.request.use((function(e){setCurrentState(e,t);return e}));var n=e.interceptors.response.use(null,(function(r){return __awaiter(void 0,void 0,void 0,(function(){var n,i,o,s,a,u,l,c;return __generator(this,(function(f){switch(f.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=setCurrentState(n,t);return[4,shouldRetry(i,r)];case 1:if(!f.sent())return[3,3];i.retryCount+=1;o=i.retryDelay,s=i.shouldResetTimeout,a=i.onRetry;u=o(i.retryCount,r);fixConfig(e,n);if(!s&&n.timeout&&i.lastRequestTime){l=Date.now()-i.lastRequestTime;c=n.timeout-l-u;if(c<=0){return[2,Promise.reject(r)]}n.timeout=c}n.transformRequest=[function(e){return e}];return[4,a(i.retryCount,r,n)];case 2:f.sent();return[2,new Promise((function(t){setTimeout((function(){return t(e(n))}),u)}))];case 3:return[2,Promise.reject(r)]}}))}))}));return{requestInterceptorId:r,responseInterceptorId:n}};axiosRetry.isNetworkError=isNetworkError;axiosRetry.isSafeRequestError=isSafeRequestError;axiosRetry.isIdempotentRequestError=isIdempotentRequestError;axiosRetry.isNetworkOrIdempotentRequestError=isNetworkOrIdempotentRequestError;axiosRetry.exponentialDelay=exponentialDelay;axiosRetry.isRetryableError=isRetryableError;function bind(e,t){return function r(){return e.apply(t,arguments)}}var toString=Object.prototype.toString;var getPrototypeOf=Object.getPrototypeOf;var kindOf=function(e){return function(t){var r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var kindOfTest=function(e){e=e.toLowerCase();return function(t){return kindOf(t)===e}};var typeOfTest=function(e){return function(t){return typeof t===e}};var isArray=Array.isArray;var isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&isArrayBuffer(e.buffer)}return t}var isString=typeOfTest("string");var isFunction=typeOfTest("function");var isNumber=typeOfTest("number");var isObject=function(e){return e!==null&&typeof e==="object"};var isBoolean=function(e){return e===true||e===false};var isPlainObject=function(e){if(kindOf(e)!=="object"){return false}var t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var isDate=kindOfTest("Date");var isFile=kindOfTest("File");var isBlob=kindOfTest("Blob");var isFileList=kindOfTest("FileList");var isStream=function(e){return isObject(e)&&isFunction(e.pipe)};var isFormData=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))};var isURLSearchParams=kindOfTest("URLSearchParams");var trim=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function forEach(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var s;var a;if(typeof e!=="object"){e=[e]}if(isArray(e)){for(s=0,a=e.length;s<a;s++){t.call(null,e[s],s,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var l=u.length;var c=void 0;for(s=0;s<l;s++){c=u[s];t.call(null,e[c],c,e)}}}function findKey(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var _global=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var isContextDefined=function(e){return!isUndefined(e)&&e!==_global};function merge(){var e=(isContextDefined(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&findKey(t,n)||n;if(isPlainObject(t[i])&&isPlainObject(r)){t[i]=merge(t[i],r)}else if(isPlainObject(r)){t[i]=merge({},r)}else if(isArray(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&forEach(arguments[n],r)}return t}var extend=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;forEach(t,(function(t,n){if(r&&isFunction(t)){e[n]=bind(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var stripBOM=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var inherits=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var toFlatObject=function(e,t,r,n){var i;var o;var s;var a={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){s=i[o];if((!n||n(s,e,t))&&!a[s]){t[s]=e[s];a[s]=true}}e=r!==false&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var endsWith=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var toArray=function(e){if(!e)return null;if(isArray(e))return e;var t=e.length;if(!isNumber(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var isTypedArray=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&getPrototypeOf(Uint8Array));var forEachEntry=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var matchAll=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var isHTMLForm=kindOfTest("HTMLFormElement");var toCamelCase=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var hasOwnProperty=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var isRegExp=kindOfTest("RegExp");var reduceDescriptors=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};forEach(r,(function(r,i){var o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};var freezeMethods=function(e){reduceDescriptors(e,(function(t,r){if(isFunction(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!isFunction(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var toObjectSet=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};isArray(e)?n(e):n(String(e).split(t));return r};var noop=function(){};var toFiniteNumber=function(e,t){e=+e;return Number.isFinite(e)?e:t};var ALPHA="abcdefghijklmnopqrstuvwxyz";var DIGIT="0123456789";var ALPHABET={DIGIT:DIGIT,ALPHA:ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT};var generateString=function(e,t){if(e===void 0){e=16}if(t===void 0){t=ALPHABET.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var toJSONObject=function(e){var t=new Array(10);var r=function(e,n){if(isObject(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=isArray(e)?[]:{};forEach(e,(function(e,t){var o=r(e,n+1);!isUndefined(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var isAsyncFn=kindOfTest("AsyncFunction");var isThenable=function(e){return e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch)};var utils$1={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,ALPHABET:ALPHABET,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable};function AxiosError(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}utils$1.inherits(AxiosError,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var prototype$1=AxiosError.prototype;var descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){descriptors[e]={value:e}}));Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:true});AxiosError.from=function(e,t,r,n,i,o){var s=Object.create(prototype$1);utils$1.toFlatObject(e,s,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));AxiosError.call(s,e.message,t,r,n,i);s.cause=e;s.name=e.name;o&&Object.assign(s,o);return s};var httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=removeBrackets(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}var predicates=utils$1.toFlatObject(utils$1,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function toFormData(e,t,r){if(!utils$1.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=utils$1.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!utils$1.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||c;var o=r.dots;var s=r.indexes;var a=r.Blob||typeof Blob!=="undefined"&&Blob;var u=a&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(i)){throw new TypeError("visitor must be a function")}function l(e){if(e===null)return"";if(utils$1.isDate(e)){return e.toISOString()}if(!u&&utils$1.isBlob(e)){throw new AxiosError("Blob is not supported. Use a Buffer instead.")}if(utils$1.isArrayBuffer(e)||utils$1.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function c(e,r,i){var a=e;if(e&&!i&&typeof e==="object"){if(utils$1.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(utils$1.isArray(e)&&isFlatArray(e)||(utils$1.isFileList(e)||utils$1.endsWith(r,"[]"))&&(a=utils$1.toArray(e))){r=removeBrackets(r);a.forEach((function e(n,i){!(utils$1.isUndefined(n)||n===null)&&t.append(s===true?renderKey([r],i,o):s===null?r:r+"[]",l(n))}));return false}}if(isVisitable(e)){return true}t.append(renderKey(i,r,o),l(e));return false}var f=[];var d=Object.assign(predicates,{defaultVisitor:c,convertValue:l,isVisitable:isVisitable});function p(e,r){if(utils$1.isUndefined(e))return;if(f.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}f.push(e);utils$1.forEach(e,(function e(n,o){var s=!(utils$1.isUndefined(n)||n===null)&&i.call(t,n,utils$1.isString(o)?o.trim():o,r,d);if(s===true){p(n,r?r.concat(o):[o])}}));f.pop()}if(!utils$1.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}function encode$1(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function AxiosURLSearchParams(e,t){this._pairs=[];e&&toFormData(e,this,t)}var prototype=AxiosURLSearchParams.prototype;prototype.append=function e(t,r){this._pairs.push([t,r])};prototype.toString=function e(t){var r=t?function(e){return t.call(this,e,encode$1)}:encode$1;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t){return e}var n=r&&r.encode||encode;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n)}if(o){var s=e.indexOf("#");if(s!==-1){e=e.slice(0,s)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var InterceptorManager=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){utils$1.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var transitionalDefaults={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var URLSearchParams$1=typeof URLSearchParams!=="undefined"?URLSearchParams:AxiosURLSearchParams;var FormData$1=typeof FormData!=="undefined"?FormData:null;var Blob$1=typeof Blob!=="undefined"?Blob:null;var platform$1={isBrowser:true,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]};var hasBrowserEnv=typeof window!=="undefined"&&typeof document!=="undefined";var hasStandardBrowserEnv=function(e){return hasBrowserEnv&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var hasStandardBrowserWebWorkerEnv=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var utils=Object.freeze({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv,hasStandardBrowserEnv:hasStandardBrowserEnv});var platform=__assign(__assign({},utils),platform$1);function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(platform.isNode&&utils$1.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function arrayToObject(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function formDataToJSON(e){function t(e,r,n,i){var o=e[i++];var s=Number.isFinite(+o);var a=i>=e.length;o=!o&&utils$1.isArray(n)?n.length:o;if(a){if(utils$1.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!s}if(!n[o]||!utils$1.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&utils$1.isArray(n[o])){n[o]=arrayToObject(n[o])}return!s}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){var r={};utils$1.forEachEntry(e,(function(e,n){t(parsePropPath(e),n,r,0)}));return r}return null}function stringifySafely(e,t,r){if(utils$1.isString(e)){try{(t||JSON.parse)(e);return utils$1.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=utils$1.isObject(t);if(o&&utils$1.isHTMLForm(t)){t=new FormData(t)}var s=utils$1.isFormData(t);if(s){if(!i){return t}return i?JSON.stringify(formDataToJSON(t)):t}if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)){return t}if(utils$1.isArrayBufferView(t)){return t.buffer}if(utils$1.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return toURLEncodedForm(t,this.formSerializer).toString()}if((a=utils$1.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return toFormData(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return stringifySafely(t)}return t}],transformResponse:[function e(t){var r=this.transitional||defaults.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&utils$1.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var s=!o&&i;try{return JSON.parse(t)}catch(e){if(s){if(e.name==="SyntaxError"){throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};utils$1.forEach(["delete","get","head","post","put","patch"],(function(e){defaults.headers[e]={}}));var ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var parseHeaders=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&ignoreDuplicateOf[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var $internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){if(e===false||e==null){return e}return utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var isValidHeaderName=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function matchHeaderValue(e,t,r,n,i){if(utils$1.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!utils$1.isString(t))return;if(utils$1.isString(n)){return t.indexOf(n)!==-1}if(utils$1.isRegExp(n)){return n.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function buildAccessors(e,t){var r=utils$1.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var AxiosHeaders=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=normalizeHeader(t);if(!i){throw new Error("header name must be a non-empty string")}var o=utils$1.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=normalizeValue(e)}}var o=function(e,t){return utils$1.forEach(e,(function(e,r){return i(e,r,t)}))};if(utils$1.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(utils$1.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)){o(parseHeaders(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=normalizeHeader(e);if(e){var r=utils$1.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return parseTokens(n)}if(utils$1.isFunction(t)){return t.call(this,n,r)}if(utils$1.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=normalizeHeader(e);if(e){var r=utils$1.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||matchHeaderValue(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=normalizeHeader(e);if(e){var i=utils$1.findKey(r,e);if(i&&(!t||matchHeaderValue(r,r[i],i,t))){delete r[i];n=true}}}if(utils$1.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||matchHeaderValue(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};utils$1.forEach(this,(function(n,i){var o=utils$1.findKey(r,i);if(o){t[o]=normalizeValue(n);delete t[i];return}var s=e?formatHeader(i):String(i).trim();if(s!==i){delete t[i]}t[s]=normalizeValue(n);r[s]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);utils$1.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&utils$1.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[$internals]=this[$internals]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=normalizeHeader(e);if(!r[t]){buildAccessors(n,e);r[t]=true}}utils$1.isArray(e)?e.forEach(i):i(e);return this};return e}();AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders.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}}}));utils$1.freezeMethods(AxiosHeaders);function transformData(e,t){var r=this||defaults;var n=t||r;var i=AxiosHeaders.from(n.headers);var o=n.data;utils$1.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,e==null?"canceled":e,AxiosError.ERR_CANCELED,t,r);this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:true});function settle(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var cookies=platform.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var s=[e+"="+encodeURIComponent(t)];utils$1.isNumber(r)&&s.push("expires="+new Date(r).toGMTString());utils$1.isString(n)&&s.push("path="+n);utils$1.isString(i)&&s.push("domain="+i);o===true&&s.push("secure");document.cookie=s.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 isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){if(e&&!isAbsoluteURL(t)){return combineURLs(e,t)}return t}var isURLSameOrigin=platform.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=utils$1.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function parseProtocol(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var s;t=t!==undefined?t:1e3;return function a(u){var l=Date.now();var c=n[o];if(!s){s=l}r[i]=u;n[i]=l;var f=o;var d=0;while(f!==i){d+=r[f++];f=f%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(l-s<t){return}var p=c&&l-c;return p?Math.round(d*1e3/p):undefined}}function progressEventReducer(e,t){var r=0;var n=speedometer(50,250);return function(i){var o=i.loaded;var s=i.lengthComputable?i.total:undefined;var a=o-r;var u=n(a);var l=o<=s;r=o;var c={loaded:o,total:s,progress:s?o/s:undefined,bytes:a,rate:u?u:undefined,estimated:u&&s&&l?(s-o)/u:undefined,event:i};c[t?"download":"upload"]=true;e(c)}}var isXHRAdapterSupported=typeof XMLHttpRequest!=="undefined";var xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise((function t(r,n){var i=e.data;var o=AxiosHeaders.from(e.headers).normalize();var s=e.responseType,a=e.withXSRFToken;var u;function l(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var c;if(utils$1.isFormData(i)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((c=o.getContentType())!==false){var f=c?c.split(";").map((function(e){return e.trim()})).filter(Boolean):[],d=f[0],p=f.slice(1);o.setContentType(__spreadArray([d||"multipart/form-data"],p,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var E=e.auth.username||"";var m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(E+":"+m))}var v=buildFullPath(e.baseURL,e.url);h.open(e.method.toUpperCase(),buildURL(v,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function T(){if(!h){return}var t=AxiosHeaders.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!s||s==="text"||s==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};settle((function e(t){r(t);l()}),(function e(t){n(t);l()}),o);h=null}if("onloadend"in h){h.onloadend=T}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(T)}}h.onabort=function t(){if(!h){return}n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new AxiosError("Network Error",AxiosError.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||transitionalDefaults;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new AxiosError(r,i.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,h));h=null};if(platform.hasStandardBrowserEnv){a&&utils$1.isFunction(a)&&(a=a(e));if(a||a!==false&&isURLSameOrigin(v)){var y=e.xsrfHeaderName&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);if(y){o.set(e.xsrfHeaderName,y)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){utils$1.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!utils$1.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(s&&s!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",progressEventReducer(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new CanceledError(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 _=parseProtocol(v);if(_&&platform.protocols.indexOf(_)===-1){n(new AxiosError("Unsupported protocol "+_+":",AxiosError.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils$1.forEach(knownAdapters,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var renderReason=function(e){return"- ".concat(e)};var isResolvedHandle=function(e){return utils$1.isFunction(e)||e===null||e===false};var adapters={getAdapter:function(e){e=utils$1.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 s=void 0;n=r;if(!isResolvedHandle(r)){n=knownAdapters[(s=String(r)).toLowerCase()];if(n===undefined){throw new AxiosError("Unknown adapter '".concat(s,"'"))}}if(n){break}i[s||"#"+o]=n}if(!n){var a=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?a.length>1?"since :\n"+a.map(renderReason).join("\n"):" "+renderReason(a[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new CanceledError(null,e)}}function dispatchRequest(e){throwIfCancellationRequested(e);e.headers=AxiosHeaders.from(e.headers);e.data=transformData.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=adapters.getAdapter(e.adapter||defaults.adapter);return t(e).then((function t(r){throwIfCancellationRequested(e);r.data=transformData.call(e,e.transformResponse,r);r.headers=AxiosHeaders.from(r.headers);return r}),(function t(r){if(!isCancel(r)){throwIfCancellationRequested(e);if(r&&r.response){r.response.data=transformData.call(e,e.transformResponse,r.response);r.response.headers=AxiosHeaders.from(r.response.headers)}}return Promise.reject(r)}))}var headersToObject=function(e){return e instanceof AxiosHeaders?e.toJSON():e};function mergeConfig(e,t){t=t||{};var r={};function n(e,t,r){if(utils$1.isPlainObject(e)&&utils$1.isPlainObject(t)){return utils$1.merge.call({caseless:r},e,t)}else if(utils$1.isPlainObject(t)){return utils$1.merge({},t)}else if(utils$1.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!utils$1.isUndefined(t)){return n(e,t,r)}else if(!utils$1.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!utils$1.isUndefined(t)){return n(undefined,t)}}function s(e,t){if(!utils$1.isUndefined(t)){return n(undefined,t)}else if(!utils$1.isUndefined(e)){return n(undefined,e)}}function a(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:function(e,t){return i(headersToObject(e),headersToObject(t),true)}};utils$1.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var s=u[o]||i;var l=s(e[o],t[o],o);utils$1.isUndefined(l)&&s!==a||(r[o]=l)}));return r}var VERSION="1.6.2";var validators$1={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){validators$1[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var deprecatedWarnings={};validators$1.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new AxiosError(i(n," has been removed"+(r?" in "+r:"")),AxiosError.ERR_DEPRECATED)}if(r&&!deprecatedWarnings[n]){deprecatedWarnings[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function assertOptions(e,t,r){if(typeof e!=="object"){throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var s=t[o];if(s){var a=e[o];var u=a===undefined||s(a,o,e);if(u!==true){throw new AxiosError("option "+o+" must be "+u,AxiosError.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new AxiosError("Unknown option "+o,AxiosError.ERR_BAD_OPTION)}}}var validator={assertOptions:assertOptions,validators:validators$1};var validators=validator.validators;var Axios=function(){function e(e){this.defaults=e;this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=mergeConfig(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},false)}if(n!=null){if(utils$1.isFunction(n)){t.paramsSerializer={serialize:n}}else{validator.assertOptions(n,{encode:validators.function,serialize:validators.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=i&&utils$1.merge(i.common,i[t.method]);i&&utils$1.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=AxiosHeaders.concat(o,i);var s=[];var a=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}a=a&&r.synchronous;s.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var l;var c=0;var f;if(!a){var d=[dispatchRequest.bind(this),undefined];d.unshift.apply(d,s);d.push.apply(d,u);f=d.length;l=Promise.resolve(t);while(c<f){l=l.then(d[c++],d[c++])}return l}f=s.length;var p=t;c=0;while(c<f){var h=s[c++];var E=s[c++];try{p=h(p)}catch(e){E.call(this,e);break}}try{l=dispatchRequest.call(this,p)}catch(e){return Promise.reject(e)}c=0;f=u.length;while(c<f){l=l.then(u[c++],u[c++])}return l};e.prototype.getUri=function(e){e=mergeConfig(this.defaults,e);var t=buildFullPath(e.baseURL,e.url);return buildURL(t,e.params,e.paramsSerializer)};return e}();utils$1.forEach(["delete","get","head","options"],(function e(t){Axios.prototype[t]=function(e,r){return this.request(mergeConfig(r||{},{method:t,url:e,data:(r||{}).data}))}}));utils$1.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(mergeConfig(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Axios.prototype[t]=r();Axios.prototype[t+"Form"]=r(true)}));var CancelToken=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new CanceledError(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function spread(e){return function t(r){return e.apply(null,r)}}function isAxiosError(e){return utils$1.isObject(e)&&e.isAxiosError===true}var HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach((function(e){var t=e[0],r=e[1];HttpStatusCode[r]=t}));function createInstance(e){var t=new Axios(e);var r=bind(Axios.prototype.request,t);utils$1.extend(r,Axios.prototype,t,{allOwnKeys:true});utils$1.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return createInstance(mergeConfig(e,r))};return r}var axios=createInstance(defaults);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function e(t){return Promise.all(t)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=function(e){return formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e)};axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode;axios.default=axios;var naiveFallback=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var globalThis_1=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return naiveFallback()}try{if(!__global__)return naiveFallback();return __global__}finally{delete Object.prototype.__global__}}();var ENDPOINT_KEY=Symbol.for("verdocs-default-endpoint");var requestLogger=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var VerdocsEndpoint=function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL=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)||"https://api.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||6e4;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=axios.create({baseURL:this.baseURL,timeout:this.timeout});axiosRetry(this.api,{retries:0,retryDelay:axiosRetry.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){globalThis_1[ENDPOINT_KEY]=this};e.getDefault=function(){if(!globalThis_1[ENDPOINT_KEY]){globalThis_1[ENDPOINT_KEY]=new e;window.console.debug("[JS_SDK] Created default endpoint",globalThis_1[ENDPOINT_KEY].baseURL)}return globalThis_1[ENDPOINT_KEY]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.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(requestLogger)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var t=decodeAccessTokenBody(e);if(t===null||t.exp&&t.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=t;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}();export{TemplateSenderTypes as T,VerdocsEndpoint as V,TemplateActions as a,createTemplatev2 as b,canPerformTemplateAction as c,deleteTemplate as d,getTemplate as g,listTemplates as l,updateTemplate as u};
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 __awaiter=this&&this.__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 s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(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 __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};import{d as decodeAccessTokenBody}from"./Types-5f31149e.js";var TemplateSenderTypes$1;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(TemplateSenderTypes$1||(TemplateSenderTypes$1={}));var TemplatePermissions;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(TemplatePermissions||(TemplatePermissions={}));var canPerformTemplateAction=function(e,t,r){var n,i;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var o=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var s=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!o){return{canPerform:false,message:"Active session required"}}var a=(r===null||r===void 0?void 0:r.profile_id)===o;var u=(r===null||r===void 0?void 0:r.organization_id)===s;var l=(n=r===null||r===void 0?void 0:r.is_personal)!==null&&n!==void 0?n:false;var c=(i=r===null||r===void 0?void 0:r.is_public)!==null&&i!==void 0?i:false;var f=[];switch(t){case"create_personal":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!a){if(!l&&u||!c){f.push(TemplatePermissions.TEMPLATE_MEMBER_READ)}}break;case"write":if(!a){f.push(TemplatePermissions.TEMPLATE_MEMBER_READ);f.push(TemplatePermissions.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_ORG)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PUBLIC);f.push(TemplatePermissions.TEMPLATE_CREATOR_VISIBILITY)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_DELETE)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(hasRequiredPermissions(e,f)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(f.toString())}};var hasRequiredPermissions=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var __awaiter=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 s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};var __generator=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,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var getTemplate=function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))};var ALLOWED_CREATE_FIELDS=["name","is_personal","is_public","sender","description","roles","fields"];var createTemplatev2=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;ALLOWED_CREATE_FIELDS.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 updateTemplate=function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))};var deleteTemplate=function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))};var SortOptions$1;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(SortOptions$1||(SortOptions$1={}));var listTemplates=function(e,t){if(t===void 0){t={}}return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))};var TemplateSenderTypes;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(TemplateSenderTypes||(TemplateSenderTypes={}));var TemplateActions;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(TemplateActions||(TemplateActions={}));var SortOptions;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(SortOptions||(SortOptions={}));var Permissions;(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"})(Permissions||(Permissions={}));var Plans;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(Plans||(Plans={}));var Roles;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(Roles||(Roles={}));var denyList=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var isRetryAllowed=function(e){return!denyList.has(e&&e.code)};var namespace="axios-retry";function isNetworkError(e){var t=["ERR_CANCELED","ECONNABORTED"];if(e.response){return false}if(!e.code){return false}if(t.includes(e.code)){return false}return isRetryAllowed(e)}var SAFE_HTTP_METHODS=["get","head","options"];var IDEMPOTENT_HTTP_METHODS=SAFE_HTTP_METHODS.concat(["put","delete"]);function isRetryableError(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function isSafeRequestError(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return isRetryableError(e)&&SAFE_HTTP_METHODS.indexOf(e.config.method)!==-1}function isIdempotentRequestError(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return isRetryableError(e)&&IDEMPOTENT_HTTP_METHODS.indexOf(e.config.method)!==-1}function isNetworkOrIdempotentRequestError(e){return isNetworkError(e)||isIdempotentRequestError(e)}function noDelay(){return 0}function exponentialDelay(e,t,r){if(e===void 0){e=0}if(t===void 0){t=undefined}if(r===void 0){r=100}var n=Math.pow(2,e)*r;var i=n*.2*Math.random();return n+i}var DEFAULT_OPTIONS={retries:3,retryCondition:isNetworkOrIdempotentRequestError,retryDelay:noDelay,shouldResetTimeout:false,onRetry:function(){}};function getRequestOptions(e,t){return __assign(__assign(__assign({},DEFAULT_OPTIONS),t),e[namespace])}function setCurrentState(e,t){var r=getRequestOptions(e,t||{});r.retryCount=r.retryCount||0;r.lastRequestTime=r.lastRequestTime||Date.now();e[namespace]=r;return r}function fixConfig(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function shouldRetry(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,s;return __generator(this,(function(a){switch(a.label){case 0:r=e.retries,n=e.retryCondition;i=(e.retryCount||0)<r&&n(t);if(!(typeof i==="object"))return[3,4];a.label=1;case 1:a.trys.push([1,3,,4]);return[4,i];case 2:o=a.sent();return[2,o!==false];case 3:s=a.sent();return[2,false];case 4:return[2,i]}}))}))}var axiosRetry=function(e,t){var r=e.interceptors.request.use((function(e){setCurrentState(e,t);return e}));var n=e.interceptors.response.use(null,(function(r){return __awaiter(void 0,void 0,void 0,(function(){var n,i,o,s,a,u,l,c;return __generator(this,(function(f){switch(f.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=setCurrentState(n,t);return[4,shouldRetry(i,r)];case 1:if(!f.sent())return[3,3];i.retryCount+=1;o=i.retryDelay,s=i.shouldResetTimeout,a=i.onRetry;u=o(i.retryCount,r);fixConfig(e,n);if(!s&&n.timeout&&i.lastRequestTime){l=Date.now()-i.lastRequestTime;c=n.timeout-l-u;if(c<=0){return[2,Promise.reject(r)]}n.timeout=c}n.transformRequest=[function(e){return e}];return[4,a(i.retryCount,r,n)];case 2:f.sent();return[2,new Promise((function(t){setTimeout((function(){return t(e(n))}),u)}))];case 3:return[2,Promise.reject(r)]}}))}))}));return{requestInterceptorId:r,responseInterceptorId:n}};axiosRetry.isNetworkError=isNetworkError;axiosRetry.isSafeRequestError=isSafeRequestError;axiosRetry.isIdempotentRequestError=isIdempotentRequestError;axiosRetry.isNetworkOrIdempotentRequestError=isNetworkOrIdempotentRequestError;axiosRetry.exponentialDelay=exponentialDelay;axiosRetry.isRetryableError=isRetryableError;function bind(e,t){return function r(){return e.apply(t,arguments)}}var toString=Object.prototype.toString;var getPrototypeOf=Object.getPrototypeOf;var kindOf=function(e){return function(t){var r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var kindOfTest=function(e){e=e.toLowerCase();return function(t){return kindOf(t)===e}};var typeOfTest=function(e){return function(t){return typeof t===e}};var isArray=Array.isArray;var isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&isArrayBuffer(e.buffer)}return t}var isString=typeOfTest("string");var isFunction=typeOfTest("function");var isNumber=typeOfTest("number");var isObject=function(e){return e!==null&&typeof e==="object"};var isBoolean=function(e){return e===true||e===false};var isPlainObject=function(e){if(kindOf(e)!=="object"){return false}var t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var isDate=kindOfTest("Date");var isFile=kindOfTest("File");var isBlob=kindOfTest("Blob");var isFileList=kindOfTest("FileList");var isStream=function(e){return isObject(e)&&isFunction(e.pipe)};var isFormData=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))};var isURLSearchParams=kindOfTest("URLSearchParams");var trim=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function forEach(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var s;var a;if(typeof e!=="object"){e=[e]}if(isArray(e)){for(s=0,a=e.length;s<a;s++){t.call(null,e[s],s,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var l=u.length;var c=void 0;for(s=0;s<l;s++){c=u[s];t.call(null,e[c],c,e)}}}function findKey(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var _global=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var isContextDefined=function(e){return!isUndefined(e)&&e!==_global};function merge(){var e=(isContextDefined(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&findKey(t,n)||n;if(isPlainObject(t[i])&&isPlainObject(r)){t[i]=merge(t[i],r)}else if(isPlainObject(r)){t[i]=merge({},r)}else if(isArray(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&forEach(arguments[n],r)}return t}var extend=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;forEach(t,(function(t,n){if(r&&isFunction(t)){e[n]=bind(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var stripBOM=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var inherits=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var toFlatObject=function(e,t,r,n){var i;var o;var s;var a={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){s=i[o];if((!n||n(s,e,t))&&!a[s]){t[s]=e[s];a[s]=true}}e=r!==false&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var endsWith=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var toArray=function(e){if(!e)return null;if(isArray(e))return e;var t=e.length;if(!isNumber(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var isTypedArray=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&getPrototypeOf(Uint8Array));var forEachEntry=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var matchAll=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var isHTMLForm=kindOfTest("HTMLFormElement");var toCamelCase=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var hasOwnProperty=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var isRegExp=kindOfTest("RegExp");var reduceDescriptors=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};forEach(r,(function(r,i){var o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};var freezeMethods=function(e){reduceDescriptors(e,(function(t,r){if(isFunction(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!isFunction(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var toObjectSet=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};isArray(e)?n(e):n(String(e).split(t));return r};var noop=function(){};var toFiniteNumber=function(e,t){e=+e;return Number.isFinite(e)?e:t};var ALPHA="abcdefghijklmnopqrstuvwxyz";var DIGIT="0123456789";var ALPHABET={DIGIT:DIGIT,ALPHA:ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT};var generateString=function(e,t){if(e===void 0){e=16}if(t===void 0){t=ALPHABET.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var toJSONObject=function(e){var t=new Array(10);var r=function(e,n){if(isObject(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=isArray(e)?[]:{};forEach(e,(function(e,t){var o=r(e,n+1);!isUndefined(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var isAsyncFn=kindOfTest("AsyncFunction");var isThenable=function(e){return e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch)};var utils$1={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,ALPHABET:ALPHABET,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable};function AxiosError(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}utils$1.inherits(AxiosError,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var prototype$1=AxiosError.prototype;var descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){descriptors[e]={value:e}}));Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:true});AxiosError.from=function(e,t,r,n,i,o){var s=Object.create(prototype$1);utils$1.toFlatObject(e,s,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));AxiosError.call(s,e.message,t,r,n,i);s.cause=e;s.name=e.name;o&&Object.assign(s,o);return s};var httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=removeBrackets(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}var predicates=utils$1.toFlatObject(utils$1,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function toFormData(e,t,r){if(!utils$1.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=utils$1.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!utils$1.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||c;var o=r.dots;var s=r.indexes;var a=r.Blob||typeof Blob!=="undefined"&&Blob;var u=a&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(i)){throw new TypeError("visitor must be a function")}function l(e){if(e===null)return"";if(utils$1.isDate(e)){return e.toISOString()}if(!u&&utils$1.isBlob(e)){throw new AxiosError("Blob is not supported. Use a Buffer instead.")}if(utils$1.isArrayBuffer(e)||utils$1.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function c(e,r,i){var a=e;if(e&&!i&&typeof e==="object"){if(utils$1.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(utils$1.isArray(e)&&isFlatArray(e)||(utils$1.isFileList(e)||utils$1.endsWith(r,"[]"))&&(a=utils$1.toArray(e))){r=removeBrackets(r);a.forEach((function e(n,i){!(utils$1.isUndefined(n)||n===null)&&t.append(s===true?renderKey([r],i,o):s===null?r:r+"[]",l(n))}));return false}}if(isVisitable(e)){return true}t.append(renderKey(i,r,o),l(e));return false}var f=[];var d=Object.assign(predicates,{defaultVisitor:c,convertValue:l,isVisitable:isVisitable});function p(e,r){if(utils$1.isUndefined(e))return;if(f.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}f.push(e);utils$1.forEach(e,(function e(n,o){var s=!(utils$1.isUndefined(n)||n===null)&&i.call(t,n,utils$1.isString(o)?o.trim():o,r,d);if(s===true){p(n,r?r.concat(o):[o])}}));f.pop()}if(!utils$1.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}function encode$1(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function AxiosURLSearchParams(e,t){this._pairs=[];e&&toFormData(e,this,t)}var prototype=AxiosURLSearchParams.prototype;prototype.append=function e(t,r){this._pairs.push([t,r])};prototype.toString=function e(t){var r=t?function(e){return t.call(this,e,encode$1)}:encode$1;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t){return e}var n=r&&r.encode||encode;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n)}if(o){var s=e.indexOf("#");if(s!==-1){e=e.slice(0,s)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var InterceptorManager=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){utils$1.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var transitionalDefaults={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var URLSearchParams$1=typeof URLSearchParams!=="undefined"?URLSearchParams:AxiosURLSearchParams;var FormData$1=typeof FormData!=="undefined"?FormData:null;var Blob$1=typeof Blob!=="undefined"?Blob:null;var platform$1={isBrowser:true,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]};var hasBrowserEnv=typeof window!=="undefined"&&typeof document!=="undefined";var hasStandardBrowserEnv=function(e){return hasBrowserEnv&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var hasStandardBrowserWebWorkerEnv=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var utils=Object.freeze({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv,hasStandardBrowserEnv:hasStandardBrowserEnv});var platform=__assign(__assign({},utils),platform$1);function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(platform.isNode&&utils$1.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function arrayToObject(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function formDataToJSON(e){function t(e,r,n,i){var o=e[i++];var s=Number.isFinite(+o);var a=i>=e.length;o=!o&&utils$1.isArray(n)?n.length:o;if(a){if(utils$1.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!s}if(!n[o]||!utils$1.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&utils$1.isArray(n[o])){n[o]=arrayToObject(n[o])}return!s}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){var r={};utils$1.forEachEntry(e,(function(e,n){t(parsePropPath(e),n,r,0)}));return r}return null}function stringifySafely(e,t,r){if(utils$1.isString(e)){try{(t||JSON.parse)(e);return utils$1.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=utils$1.isObject(t);if(o&&utils$1.isHTMLForm(t)){t=new FormData(t)}var s=utils$1.isFormData(t);if(s){if(!i){return t}return i?JSON.stringify(formDataToJSON(t)):t}if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)){return t}if(utils$1.isArrayBufferView(t)){return t.buffer}if(utils$1.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return toURLEncodedForm(t,this.formSerializer).toString()}if((a=utils$1.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return toFormData(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return stringifySafely(t)}return t}],transformResponse:[function e(t){var r=this.transitional||defaults.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&utils$1.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var s=!o&&i;try{return JSON.parse(t)}catch(e){if(s){if(e.name==="SyntaxError"){throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};utils$1.forEach(["delete","get","head","post","put","patch"],(function(e){defaults.headers[e]={}}));var ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var parseHeaders=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&ignoreDuplicateOf[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var $internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){if(e===false||e==null){return e}return utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var isValidHeaderName=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function matchHeaderValue(e,t,r,n,i){if(utils$1.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!utils$1.isString(t))return;if(utils$1.isString(n)){return t.indexOf(n)!==-1}if(utils$1.isRegExp(n)){return n.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function buildAccessors(e,t){var r=utils$1.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var AxiosHeaders=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=normalizeHeader(t);if(!i){throw new Error("header name must be a non-empty string")}var o=utils$1.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=normalizeValue(e)}}var o=function(e,t){return utils$1.forEach(e,(function(e,r){return i(e,r,t)}))};if(utils$1.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(utils$1.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)){o(parseHeaders(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=normalizeHeader(e);if(e){var r=utils$1.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return parseTokens(n)}if(utils$1.isFunction(t)){return t.call(this,n,r)}if(utils$1.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=normalizeHeader(e);if(e){var r=utils$1.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||matchHeaderValue(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=normalizeHeader(e);if(e){var i=utils$1.findKey(r,e);if(i&&(!t||matchHeaderValue(r,r[i],i,t))){delete r[i];n=true}}}if(utils$1.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||matchHeaderValue(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};utils$1.forEach(this,(function(n,i){var o=utils$1.findKey(r,i);if(o){t[o]=normalizeValue(n);delete t[i];return}var s=e?formatHeader(i):String(i).trim();if(s!==i){delete t[i]}t[s]=normalizeValue(n);r[s]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);utils$1.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&utils$1.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[$internals]=this[$internals]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=normalizeHeader(e);if(!r[t]){buildAccessors(n,e);r[t]=true}}utils$1.isArray(e)?e.forEach(i):i(e);return this};return e}();AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders.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}}}));utils$1.freezeMethods(AxiosHeaders);function transformData(e,t){var r=this||defaults;var n=t||r;var i=AxiosHeaders.from(n.headers);var o=n.data;utils$1.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,e==null?"canceled":e,AxiosError.ERR_CANCELED,t,r);this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:true});function settle(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var cookies=platform.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var s=[e+"="+encodeURIComponent(t)];utils$1.isNumber(r)&&s.push("expires="+new Date(r).toGMTString());utils$1.isString(n)&&s.push("path="+n);utils$1.isString(i)&&s.push("domain="+i);o===true&&s.push("secure");document.cookie=s.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 isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){if(e&&!isAbsoluteURL(t)){return combineURLs(e,t)}return t}var isURLSameOrigin=platform.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=utils$1.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function parseProtocol(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var s;t=t!==undefined?t:1e3;return function a(u){var l=Date.now();var c=n[o];if(!s){s=l}r[i]=u;n[i]=l;var f=o;var d=0;while(f!==i){d+=r[f++];f=f%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(l-s<t){return}var p=c&&l-c;return p?Math.round(d*1e3/p):undefined}}function progressEventReducer(e,t){var r=0;var n=speedometer(50,250);return function(i){var o=i.loaded;var s=i.lengthComputable?i.total:undefined;var a=o-r;var u=n(a);var l=o<=s;r=o;var c={loaded:o,total:s,progress:s?o/s:undefined,bytes:a,rate:u?u:undefined,estimated:u&&s&&l?(s-o)/u:undefined,event:i};c[t?"download":"upload"]=true;e(c)}}var isXHRAdapterSupported=typeof XMLHttpRequest!=="undefined";var xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise((function t(r,n){var i=e.data;var o=AxiosHeaders.from(e.headers).normalize();var s=e.responseType,a=e.withXSRFToken;var u;function l(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var c;if(utils$1.isFormData(i)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((c=o.getContentType())!==false){var f=c?c.split(";").map((function(e){return e.trim()})).filter(Boolean):[],d=f[0],p=f.slice(1);o.setContentType(__spreadArray([d||"multipart/form-data"],p,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var E=e.auth.username||"";var m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(E+":"+m))}var v=buildFullPath(e.baseURL,e.url);h.open(e.method.toUpperCase(),buildURL(v,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function T(){if(!h){return}var t=AxiosHeaders.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!s||s==="text"||s==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};settle((function e(t){r(t);l()}),(function e(t){n(t);l()}),o);h=null}if("onloadend"in h){h.onloadend=T}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(T)}}h.onabort=function t(){if(!h){return}n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new AxiosError("Network Error",AxiosError.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||transitionalDefaults;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new AxiosError(r,i.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,h));h=null};if(platform.hasStandardBrowserEnv){a&&utils$1.isFunction(a)&&(a=a(e));if(a||a!==false&&isURLSameOrigin(v)){var y=e.xsrfHeaderName&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);if(y){o.set(e.xsrfHeaderName,y)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){utils$1.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!utils$1.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(s&&s!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",progressEventReducer(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new CanceledError(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 _=parseProtocol(v);if(_&&platform.protocols.indexOf(_)===-1){n(new AxiosError("Unsupported protocol "+_+":",AxiosError.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils$1.forEach(knownAdapters,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var renderReason=function(e){return"- ".concat(e)};var isResolvedHandle=function(e){return utils$1.isFunction(e)||e===null||e===false};var adapters={getAdapter:function(e){e=utils$1.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 s=void 0;n=r;if(!isResolvedHandle(r)){n=knownAdapters[(s=String(r)).toLowerCase()];if(n===undefined){throw new AxiosError("Unknown adapter '".concat(s,"'"))}}if(n){break}i[s||"#"+o]=n}if(!n){var a=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?a.length>1?"since :\n"+a.map(renderReason).join("\n"):" "+renderReason(a[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new CanceledError(null,e)}}function dispatchRequest(e){throwIfCancellationRequested(e);e.headers=AxiosHeaders.from(e.headers);e.data=transformData.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=adapters.getAdapter(e.adapter||defaults.adapter);return t(e).then((function t(r){throwIfCancellationRequested(e);r.data=transformData.call(e,e.transformResponse,r);r.headers=AxiosHeaders.from(r.headers);return r}),(function t(r){if(!isCancel(r)){throwIfCancellationRequested(e);if(r&&r.response){r.response.data=transformData.call(e,e.transformResponse,r.response);r.response.headers=AxiosHeaders.from(r.response.headers)}}return Promise.reject(r)}))}var headersToObject=function(e){return e instanceof AxiosHeaders?e.toJSON():e};function mergeConfig(e,t){t=t||{};var r={};function n(e,t,r){if(utils$1.isPlainObject(e)&&utils$1.isPlainObject(t)){return utils$1.merge.call({caseless:r},e,t)}else if(utils$1.isPlainObject(t)){return utils$1.merge({},t)}else if(utils$1.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!utils$1.isUndefined(t)){return n(e,t,r)}else if(!utils$1.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!utils$1.isUndefined(t)){return n(undefined,t)}}function s(e,t){if(!utils$1.isUndefined(t)){return n(undefined,t)}else if(!utils$1.isUndefined(e)){return n(undefined,e)}}function a(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:function(e,t){return i(headersToObject(e),headersToObject(t),true)}};utils$1.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var s=u[o]||i;var l=s(e[o],t[o],o);utils$1.isUndefined(l)&&s!==a||(r[o]=l)}));return r}var VERSION="1.6.2";var validators$1={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){validators$1[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var deprecatedWarnings={};validators$1.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new AxiosError(i(n," has been removed"+(r?" in "+r:"")),AxiosError.ERR_DEPRECATED)}if(r&&!deprecatedWarnings[n]){deprecatedWarnings[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function assertOptions(e,t,r){if(typeof e!=="object"){throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var s=t[o];if(s){var a=e[o];var u=a===undefined||s(a,o,e);if(u!==true){throw new AxiosError("option "+o+" must be "+u,AxiosError.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new AxiosError("Unknown option "+o,AxiosError.ERR_BAD_OPTION)}}}var validator={assertOptions:assertOptions,validators:validators$1};var validators=validator.validators;var Axios=function(){function e(e){this.defaults=e;this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=mergeConfig(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},false)}if(n!=null){if(utils$1.isFunction(n)){t.paramsSerializer={serialize:n}}else{validator.assertOptions(n,{encode:validators.function,serialize:validators.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=i&&utils$1.merge(i.common,i[t.method]);i&&utils$1.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=AxiosHeaders.concat(o,i);var s=[];var a=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}a=a&&r.synchronous;s.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var l;var c=0;var f;if(!a){var d=[dispatchRequest.bind(this),undefined];d.unshift.apply(d,s);d.push.apply(d,u);f=d.length;l=Promise.resolve(t);while(c<f){l=l.then(d[c++],d[c++])}return l}f=s.length;var p=t;c=0;while(c<f){var h=s[c++];var E=s[c++];try{p=h(p)}catch(e){E.call(this,e);break}}try{l=dispatchRequest.call(this,p)}catch(e){return Promise.reject(e)}c=0;f=u.length;while(c<f){l=l.then(u[c++],u[c++])}return l};e.prototype.getUri=function(e){e=mergeConfig(this.defaults,e);var t=buildFullPath(e.baseURL,e.url);return buildURL(t,e.params,e.paramsSerializer)};return e}();utils$1.forEach(["delete","get","head","options"],(function e(t){Axios.prototype[t]=function(e,r){return this.request(mergeConfig(r||{},{method:t,url:e,data:(r||{}).data}))}}));utils$1.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(mergeConfig(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Axios.prototype[t]=r();Axios.prototype[t+"Form"]=r(true)}));var CancelToken=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new CanceledError(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function spread(e){return function t(r){return e.apply(null,r)}}function isAxiosError(e){return utils$1.isObject(e)&&e.isAxiosError===true}var HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach((function(e){var t=e[0],r=e[1];HttpStatusCode[r]=t}));function createInstance(e){var t=new Axios(e);var r=bind(Axios.prototype.request,t);utils$1.extend(r,Axios.prototype,t,{allOwnKeys:true});utils$1.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return createInstance(mergeConfig(e,r))};return r}var axios=createInstance(defaults);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function e(t){return Promise.all(t)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=function(e){return formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e)};axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode;axios.default=axios;var naiveFallback=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var globalThis_1=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return naiveFallback()}try{if(!__global__)return naiveFallback();return __global__}finally{delete Object.prototype.__global__}}();var ENDPOINT_KEY=Symbol.for("verdocs-default-endpoint");var requestLogger=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var VerdocsEndpoint=function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL=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=axios.create({baseURL:this.baseURL,timeout:this.timeout});window.console.log("[JS_SDK] Initializing",this.baseURL,window.location.origin);axiosRetry(this.api,{retries:0,retryDelay:axiosRetry.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){globalThis_1[ENDPOINT_KEY]=this};e.getDefault=function(){if(!globalThis_1[ENDPOINT_KEY]){globalThis_1[ENDPOINT_KEY]=new e;window.console.debug("[JS_SDK] Created default endpoint",globalThis_1[ENDPOINT_KEY].baseURL)}return globalThis_1[ENDPOINT_KEY]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.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(requestLogger)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var t=decodeAccessTokenBody(e);if(t===null||t.exp&&t.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=t;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}();export{TemplateSenderTypes as T,VerdocsEndpoint as V,TemplateActions as a,createTemplatev2 as b,canPerformTemplateAction as c,deleteTemplate as d,getTemplate as g,listTemplates as l,updateTemplate as u};
@@ -0,0 +1 @@
1
+ import{c as createCommonjsModule,a as commonjsGlobal}from"./_commonjsHelpers-8a9f3b18.js";var interact_min=createCommonjsModule((function(t,e){!function(e,n){t.exports=n()}(commonjsGlobal,(function(){function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}(this,n)}}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},d.apply(this,arguments)}function h(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}var v=function(t){return!(!t||!t.Window)&&t instanceof t.Window},g=void 0,m=void 0;function y(t){g=t;var e=t.document.createTextNode("");e.ownerDocument!==t.document&&"function"==typeof t.wrap&&t.wrap(e)===e&&(t=t.wrap(t)),m=t}function b(t){return v(t)?t:(t.ownerDocument||t).defaultView||m.window}"undefined"!=typeof window&&window&&y(window);var x=function(t){return!!t&&"object"===r(t)},w=function(t){return"function"==typeof t},E={window:function(t){return t===m||v(t)},docFrag:function(t){return x(t)&&11===t.nodeType},object:x,func:w,number:function(t){return"number"==typeof t},bool:function(t){return"boolean"==typeof t},string:function(t){return"string"==typeof t},element:function(t){if(!t||"object"!==r(t))return!1;var e=b(t)||m;return/object|function/.test("undefined"==typeof Element?"undefined":r(Element))?t instanceof Element||t instanceof e.Element:1===t.nodeType&&"string"==typeof t.nodeName},plainObject:function(t){return x(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return x(t)&&void 0!==t.length&&w(t.splice)}};function T(t){var e=t.interaction;if("drag"===e.prepared.name){var n=e.prepared.axis;"x"===n?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):"y"===n&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function S(t){var e=t.iEvent,n=t.interaction;if("drag"===n.prepared.name){var r=n.prepared.axis;if("x"===r||"y"===r){var i="x"===r?"y":"x";e.page[i]=n.coords.start.page[i],e.client[i]=n.coords.start.client[i],e.delta[i]=0}}}var _={id:"actions/drag",install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.draggable=_.draggable,e.map.drag=_,e.methodDict.drag="draggable",r.actions.drag=_.defaults},listeners:{"interactions:before-action-move":T,"interactions:action-resume":T,"interactions:action-move":S,"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.buttons,i=n.options.drag;if(i&&i.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||0!=(r&n.options.drag.mouseButtons)))return t.action={name:"drag",axis:"start"===i.lockAxis?i.startAxis:i.lockAxis},!1}},draggable:function(t){return E.object(t)?(this.options.drag.enabled=!1!==t.enabled,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):E.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:T,move:S,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return 0===t.search("drag")}},P=_,O={init:function(t){var e=t;O.document=e.document,O.DocumentFragment=e.DocumentFragment||k,O.SVGElement=e.SVGElement||k,O.SVGSVGElement=e.SVGSVGElement||k,O.SVGElementInstance=e.SVGElementInstance||k,O.Element=e.Element||k,O.HTMLElement=e.HTMLElement||O.Element,O.Event=e.Event,O.Touch=e.Touch||k,O.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function k(){}var D=O;var M={init:function(t){var e=D.Element,n=t.navigator||{};M.supportsTouch="ontouchstart"in t||E.func(t.DocumentTouch)&&D.document instanceof t.DocumentTouch,M.supportsPointerEvent=!1!==n.pointerEnabled&&!!D.PointerEvent,M.isIOS=/iP(hone|od|ad)/.test(n.platform),M.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),M.isIe9=/MSIE 9/.test(n.userAgent),M.isOperaMobile="Opera"===n.appName&&M.supportsTouch&&/Presto/.test(n.userAgent),M.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",M.pEventTypes=M.supportsPointerEvent?D.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,M.wheelEvent=D.document&&"onmousewheel"in D.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null};var I=M;function z(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function A(t,e){for(;E.element(t);){if(j(t,e))return t;t=C(t)}return null}function C(t){var e=t.parentNode;if(E.docFrag(e)){for(;(e=e.host)&&E.docFrag(e););return e}return e}function j(t,e){return m!==g&&(e=e.replace(/\/deep\//g," ")),t[I.prefixedMatchesSelector](e)}var R=function(t){return t.parentNode||t.host};function F(t,e){for(var n,r=[],i=t;(n=R(i))&&i!==e&&n!==i.ownerDocument;)r.unshift(i),i=n;return r}function X(t,e,n){for(;E.element(t);){if(j(t,e))return!0;if((t=C(t))===n)return j(t,e)}return!1}function Y(t){return t.correspondingUseElement||t}function L(t){var e=t instanceof D.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function q(t){var e,n=L(t);if(!I.isIOS7&&n){var r={x:(e=(e=b(t))||m).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop};n.left+=r.x,n.right+=r.x,n.top+=r.y,n.bottom+=r.y}return n}function B(t){for(var e=[];t;)e.push(t),t=C(t);return e}function V(t){return!!E.string(t)&&(D.document.querySelector(t),!0)}function G(t,e){for(var n in e)t[n]=e[n];return t}function W(t,e,n){return"parent"===t?C(n):"self"===t?e.getRect(n):A(n,t)}function N(t,e,n,r){var i=t;return E.string(i)?i=W(i,e,n):E.func(i)&&(i=i.apply(void 0,r)),E.element(i)&&(i=q(i)),i}function H(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function U(t){return!t||"x"in t&&"y"in t||((t=G({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function K(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function $(t,e,n){var r=n&&t.options[n];return H(N(r&&r.origin||t.options.origin,t,e,[t&&e]))||{x:0,y:0}}function J(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},E.string(t)&&-1!==t.search(" ")&&(t=Q(t)),E.array(t))return t.forEach((function(t){return J(t,e,n,r)})),r;if(E.object(t)&&(e=t,t=""),E.func(e)&&n(t))r[t]=r[t]||[],r[t].push(e);else if(E.array(e))for(var i=0,o=e;i<o.length;i++){var a=o[i];J(t,a,n,r)}else if(E.object(e))for(var s in e){J(Q(s).map((function(e){return"".concat(t).concat(e)})),e[s],n,r)}return r}function Q(t){return t.trim().split(/ +/)}var Z=function(t,e){return Math.sqrt(t*t+e*e)},tt=["webkit","moz"];function et(t,e){t.__set||(t.__set={});var n=function(n){if(tt.some((function(t){return 0===n.indexOf(t)})))return 1;"function"!=typeof t[n]&&"__set"!==n&&Object.defineProperty(t,n,{get:function(){return n in t.__set?t.__set[n]:t.__set[n]=e[n]},set:function(e){t.__set[n]=e},configurable:!0})};for(var r in e)n(r);return t}function nt(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function rt(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function it(t){return t instanceof D.Event||t instanceof D.Touch}function ot(t,e,n){return t=t||"page",(n=n||{}).x=e[t+"X"],n.y=e[t+"Y"],n}function at(t,e){return e=e||{x:0,y:0},I.isOperaMobile&&it(t)?(ot("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):ot("page",t,e),e}function st(t){return E.number(t.pointerId)?t.pointerId:t.identifier}function ct(t,e,n){var r=e.length>1?ut(e):e[0];at(r,t.page),function(t,e){e=e||{},I.isOperaMobile&&it(t)?ot("screen",t,e):ot("client",t,e)}(r,t.client),t.timeStamp=n}function lt(t){var e=[];return E.array(t)?(e[0]=t[0],e[1]=t[1]):"touchend"===t.type?1===t.touches.length?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):0===t.touches.length&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function ut(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n<t.length;n++){var r=t[n];for(var i in e)e[i]+=r[i]}for(var o in e)e[o]/=t.length;return e}function pt(t){if(!t.length)return null;var e=lt(t),n=Math.min(e[0].pageX,e[1].pageX),r=Math.min(e[0].pageY,e[1].pageY),i=Math.max(e[0].pageX,e[1].pageX),o=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:r,left:n,top:r,right:i,bottom:o,width:i-n,height:o-r}}function ft(t,e){var n=e+"X",r=e+"Y",i=lt(t),o=i[0][n]-i[1][n],a=i[0][r]-i[1][r];return Z(o,a)}function dt(t,e){var n=e+"X",r=e+"Y",i=lt(t),o=i[1][n]-i[0][n],a=i[1][r]-i[0][r];return 180*Math.atan2(a,o)/Math.PI}function ht(t){return E.string(t.pointerType)?t.pointerType:E.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof D.Touch?"touch":"mouse"}function vt(t){var e=E.func(t.composedPath)?t.composedPath():t.path;return[Y(e?e[0]:t.target),Y(t.currentTarget)]}var gt=function(){function t(e){i(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}return a(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(gt.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var mt=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.push(r)}return t},yt=function(t){return mt([],t)},bt=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},xt=function(t,e){return t[bt(t,e)]},wt=function(t){c(n,t);var e=f(n);function n(t,r,o){var a;i(this,n),(a=e.call(this,r._interaction)).dropzone=void 0,a.dragEvent=void 0,a.relatedTarget=void 0,a.draggable=void 0,a.propagationStopped=!1,a.immediatePropagationStopped=!1;var s="dragleave"===o?t.prev:t.cur,c=s.element,l=s.dropzone;return a.type=o,a.target=c,a.currentTarget=c,a.dropzone=l,a.dragEvent=r,a.relatedTarget=r.target,a.draggable=r.interactable,a.timeStamp=r.timeStamp,a}return a(n,[{key:"reject",value:function(){var t=this,e=this._interaction.dropState;if("dropactivate"===this.type||this.dropzone&&e.cur.dropzone===this.dropzone&&e.cur.element===this.target)if(e.prev.dropzone=this.dropzone,e.prev.element=this.target,e.rejected=!0,e.events.enter=null,this.stopImmediatePropagation(),"dropactivate"===this.type){var r=e.activeDrops,i=bt(r,(function(e){var n=e.dropzone,r=e.element;return n===t.dropzone&&r===t.target}));e.activeDrops.splice(i,1);var o=new n(e,this.dragEvent,"dropdeactivate");o.dropzone=this.dropzone,o.target=this.target,this.dropzone.fire(o)}else this.dropzone.fire(new n(e,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}(gt);function Et(t,e){for(var n=0,r=t.slice();n<r.length;n++){var i=r[n],o=i.dropzone,a=i.element;e.dropzone=o,e.target=a,o.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function Tt(t,e){for(var n=function(t,e){for(var n=[],r=0,i=t.interactables.list;r<i.length;r++){var o=i[r];if(o.options.drop.enabled){var a=o.options.drop.accept;if(!(E.element(a)&&a!==e||E.string(a)&&!j(e,a)||E.func(a)&&!a({dropzone:o,draggableElement:e})))for(var s=0,c=o.getAllElements();s<c.length;s++){var l=c[s];l!==e&&n.push({dropzone:o,element:l,rect:o.getRect(l)})}}}return n}(t,e),r=0;r<n.length;r++){var i=n[r];i.rect=i.dropzone.getRect(i.element)}return n}function St(t,e,n){for(var r=t.dropState,i=t.interactable,o=t.element,a=[],s=0,c=r.activeDrops;s<c.length;s++){var l=c[s],u=l.dropzone,p=l.element,f=l.rect,d=u.dropCheck(e,n,i,o,p,f);a.push(d?p:null)}var h=function(t){for(var e,n,r,i=[],o=0;o<t.length;o++){var a=t[o],s=t[e];if(a&&o!==e)if(s){var c=R(a),l=R(s);if(c!==a.ownerDocument)if(l!==a.ownerDocument)if(c!==l){i=i.length?i:F(s);var u=void 0;if(s instanceof D.HTMLElement&&a instanceof D.SVGElement&&!(a instanceof D.SVGSVGElement)){if(a===l)continue;u=a.ownerSVGElement}else u=a;for(var p=F(u,s.ownerDocument),f=0;p[f]&&p[f]===i[f];)f++;var d=[p[f-1],p[f],i[f]];if(d[0])for(var h=d[0].lastChild;h;){if(h===d[1]){e=o,i=p;break}if(h===d[2])break;h=h.previousSibling}}else r=s,(parseInt(b(n=a).getComputedStyle(n).zIndex,10)||0)>=(parseInt(b(r).getComputedStyle(r).zIndex,10)||0)&&(e=o);else e=o}else e=o}return e}(a);return r.activeDrops[h]||null}function _t(t,e,n){var r=t.dropState,i={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return"dragstart"===n.type&&(i.activate=new wt(r,n,"dropactivate"),i.activate.target=null,i.activate.dropzone=null),"dragend"===n.type&&(i.deactivate=new wt(r,n,"dropdeactivate"),i.deactivate.target=null,i.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(i.leave=new wt(r,n,"dragleave"),n.dragLeave=i.leave.target=r.prev.element,n.prevDropzone=i.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(i.enter=new wt(r,n,"dragenter"),n.dragEnter=r.cur.element,n.dropzone=r.cur.dropzone)),"dragend"===n.type&&r.cur.dropzone&&(i.drop=new wt(r,n,"drop"),n.dropzone=r.cur.dropzone,n.relatedTarget=r.cur.element),"dragmove"===n.type&&r.cur.dropzone&&(i.move=new wt(r,n,"dropmove"),n.dropzone=r.cur.dropzone)),i}function Pt(t,e){var n=t.dropState,r=n.activeDrops,i=n.cur,o=n.prev;e.leave&&o.dropzone.fire(e.leave),e.enter&&i.dropzone.fire(e.enter),e.move&&i.dropzone.fire(e.move),e.drop&&i.dropzone.fire(e.drop),e.deactivate&&Et(r,e.deactivate),n.prev.dropzone=i.dropzone,n.prev.element=i.element}function Ot(t,e){var n=t.interaction,r=t.iEvent,i=t.event;if("dragmove"===r.type||"dragend"===r.type){var o=n.dropState;e.dynamicDrop&&(o.activeDrops=Tt(e,n.element));var a=r,s=St(n,a,i);o.rejected=o.rejected&&!!s&&s.dropzone===o.cur.dropzone&&s.element===o.cur.element,o.cur.dropzone=s&&s.dropzone,o.cur.element=s&&s.element,o.events=_t(n,0,a)}}var kt={id:"actions/drop",install:function(t){var e=t.actions,n=t.interactStatic,r=t.Interactable,i=t.defaults;t.usePlugin(P),r.prototype.dropzone=function(t){return function(t,e){if(E.object(e)){if(t.options.drop.enabled=!1!==e.enabled,e.listeners){var n=J(e.listeners),r=Object.keys(n).reduce((function(t,e){return t[/^(enter|leave)/.test(e)?"drag".concat(e):/^(activate|deactivate|move)/.test(e)?"drop".concat(e):e]=n[e],t}),{}),i=t.options.drop.listeners;i&&t.off(i),t.on(r),t.options.drop.listeners=r}return E.func(e.ondrop)&&t.on("drop",e.ondrop),E.func(e.ondropactivate)&&t.on("dropactivate",e.ondropactivate),E.func(e.ondropdeactivate)&&t.on("dropdeactivate",e.ondropdeactivate),E.func(e.ondragenter)&&t.on("dragenter",e.ondragenter),E.func(e.ondragleave)&&t.on("dragleave",e.ondragleave),E.func(e.ondropmove)&&t.on("dropmove",e.ondropmove),/^(pointer|center)$/.test(e.overlap)?t.options.drop.overlap=e.overlap:E.number(e.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,e.overlap),0)),"accept"in e&&(t.options.drop.accept=e.accept),"checker"in e&&(t.options.drop.checker=e.checker),t}if(E.bool(e))return t.options.drop.enabled=e,t;return t.options.drop}(this,t)},r.prototype.dropCheck=function(t,e,n,r,i,o){return function(t,e,n,r,i,o,a){var s=!1;if(!(a=a||t.getRect(o)))return!!t.options.drop.checker&&t.options.drop.checker(e,n,s,t,o,r,i);var c=t.options.drop.overlap;if("pointer"===c){var l=$(r,i,"drag"),u=at(e);u.x+=l.x,u.y+=l.y;var p=u.x>a.left&&u.x<a.right,f=u.y>a.top&&u.y<a.bottom;s=p&&f}var d=r.getRect(i);if(d&&"center"===c){var h=d.left+d.width/2,v=d.top+d.height/2;s=h>=a.left&&h<=a.right&&v>=a.top&&v<=a.bottom}if(d&&E.number(c)){s=Math.max(0,Math.min(a.right,d.right)-Math.max(a.left,d.left))*Math.max(0,Math.min(a.bottom,d.bottom)-Math.max(a.top,d.top))/(d.width*d.height)>=c}t.options.drop.checker&&(s=t.options.drop.checker(e,n,s,t,o,r,i));return s}(this,t,e,n,r,i,o)},n.dynamicDrop=function(e){return E.bool(e)?(t.dynamicDrop=e,n):t.dynamicDrop},G(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,i.actions.drop=kt.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;"drag"===e.prepared.name&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var n=t.interaction,r=t.iEvent;if("drag"===n.prepared.name){var i=n.dropState;i.activeDrops=[],i.events={},i.activeDrops=Tt(e,n.element),i.events=_t(n,0,r),i.events.activate&&(Et(i.activeDrops,i.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))}},"interactions:action-move":Ot,"interactions:after-action-move":function(t,e){var n=t.interaction,r=t.iEvent;if("drag"===n.prepared.name){var i=n.dropState;Pt(n,i.events),e.fire("actions/drop:move",{interaction:n,dragEvent:r}),i.events={}}},"interactions:action-end":function(t,e){if("drag"===t.interaction.prepared.name){var n=t.interaction,r=t.iEvent;Ot(t,e),Pt(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:r})}},"interactions:stop":function(t){var e=t.interaction;if("drag"===e.prepared.name){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:Tt,getDrop:St,getDropEvents:_t,fireDropEvents:Pt,filterEventType:function(t){return 0===t.search("drag")||0===t.search("drop")},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Dt=kt;function Mt(t){var e=t.interaction,n=t.iEvent,r=t.phase;if("gesture"===e.prepared.name){var i=e.pointers.map((function(t){return t.pointer})),o="start"===r,a="end"===r,s=e.interactable.options.deltaSource;if(n.touches=[i[0],i[1]],o)n.distance=ft(i,s),n.box=pt(i),n.scale=1,n.ds=0,n.angle=dt(i,s),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(a||e.pointers.length<2){var c=e.prevEvent;n.distance=c.distance,n.box=c.box,n.scale=c.scale,n.ds=0,n.angle=c.angle,n.da=0}else n.distance=ft(i,s),n.box=pt(i),n.scale=n.distance/e.gesture.startDistance,n.angle=dt(i,s),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,E.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}var It={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.gesturable=function(t){return E.object(t)?(this.options.gesture.enabled=!1!==t.enabled,this.setPerAction("gesture",t),this.setOnEvents("gesture",t),this):E.bool(t)?(this.options.gesture.enabled=t,this):this.options.gesture},e.map.gesture=It,e.methodDict.gesture="gesturable",r.actions.gesture=It.defaults},listeners:{"interactions:action-start":Mt,"interactions:action-move":Mt,"interactions:action-end":Mt,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return 0===t.search("gesture")}},zt=It;function At(t,e,n,r,i,o,a){if(!e)return!1;if(!0===e){var s=E.number(o.width)?o.width:o.right-o.left,c=E.number(o.height)?o.height:o.bottom-o.top;if(a=Math.min(a,Math.abs(("left"===t||"right"===t?s:c)/2)),s<0&&("left"===t?t="right":"right"===t&&(t="left")),c<0&&("top"===t?t="bottom":"bottom"===t&&(t="top")),"left"===t){var l=s>=0?o.left:o.right;return n.x<l+a}if("top"===t){var u=c>=0?o.top:o.bottom;return n.y<u+a}if("right"===t)return n.x>(s>=0?o.right:o.left)-a;if("bottom"===t)return n.y>(c>=0?o.bottom:o.top)-a}return!!E.element(r)&&(E.element(e)?e===r:X(r,e,i))}function Ct(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.resizeAxes){var r=e;n.interactable.options.resize.square?("y"===n.resizeAxes?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=n.resizeAxes,"x"===n.resizeAxes?r.delta.y=0:"y"===n.resizeAxes&&(r.delta.x=0))}}var jt,Rt,Ft={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,i=t.defaults;Ft.cursors=function(t){return t.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(n),Ft.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(e){return function(t,e,n){if(E.object(e))return t.options.resize.enabled=!1!==e.enabled,t.setPerAction("resize",e),t.setOnEvents("resize",e),E.string(e.axis)&&/^x$|^y$|^xy$/.test(e.axis)?t.options.resize.axis=e.axis:null===e.axis&&(t.options.resize.axis=n.defaults.actions.resize.axis),E.bool(e.preserveAspectRatio)?t.options.resize.preserveAspectRatio=e.preserveAspectRatio:E.bool(e.square)&&(t.options.resize.square=e.square),t;if(E.bool(e))return t.options.resize.enabled=e,t;return t.options.resize}(this,e,t)},e.map.resize=Ft,e.methodDict.resize="resizable",i.actions.resize=Ft.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){!function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e,i=n.rect;n._rects={start:G({},i),corrected:G({},i),previous:G({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}}(t),Ct(t)},"interactions:action-move":function(t){!function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e,i=n.interactable.options.resize.invert,o="reposition"===i||"negate"===i,a=n.rect,s=n._rects,c=s.start,l=s.corrected,u=s.delta,p=s.previous;if(G(p,l),o){if(G(l,a),"reposition"===i){if(l.top>l.bottom){var f=l.top;l.top=l.bottom,l.bottom=f}if(l.left>l.right){var d=l.left;l.left=l.right,l.right=d}}}else l.top=Math.min(a.top,c.bottom),l.bottom=Math.max(a.bottom,c.top),l.left=Math.min(a.left,c.right),l.right=Math.max(a.right,c.left);for(var h in l.width=l.right-l.left,l.height=l.bottom-l.top,l)u[h]=l[h]-p[h];r.edges=n.prepared.edges,r.rect=l,r.deltaRect=u}}(t),Ct(t)},"interactions:action-end":function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.element,i=t.rect,o=t.buttons;if(i){var a=G({},e.coords.cur.page),s=n.options.resize;if(s&&s.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||0!=(o&s.mouseButtons))){if(E.object(s.edges)){var c={left:!1,right:!1,top:!1,bottom:!1};for(var l in c)c[l]=At(l,s.edges[l],a,e._latestPointer.eventTarget,r,i,s.margin||Ft.defaultMargin);c.left=c.left&&!c.right,c.top=c.top&&!c.bottom,(c.left||c.right||c.top||c.bottom)&&(t.action={name:"resize",edges:c})}else{var u="y"!==s.axis&&a.x>i.right-Ft.defaultMargin,p="x"!==s.axis&&a.y>i.bottom-Ft.defaultMargin;(u||p)&&(t.action={name:"resize",axes:(u?"x":"")+(p?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,r=t.name,i=Ft.cursors,o=null;if(n)o=i[r+n];else if(e){for(var a="",s=0,c=["top","bottom","left","right"];s<c.length;s++){var l=c[s];e[l]&&(a+=l)}o=i[a]}return o},filterEventType:function(t){return 0===t.search("resize")},defaultMargin:null},Xt=Ft,Yt={id:"actions",install:function(t){t.usePlugin(zt),t.usePlugin(Xt),t.usePlugin(P),t.usePlugin(Dt)}},Lt=0;var qt={request:function(t){return jt(t)},cancel:function(t){return Rt(t)},init:function(t){if(jt=t.requestAnimationFrame,Rt=t.cancelAnimationFrame,!jt)for(var e=["ms","moz","webkit","o"],n=0;n<e.length;n++){var r=e[n];jt=t["".concat(r,"RequestAnimationFrame")],Rt=t["".concat(r,"CancelAnimationFrame")]||t["".concat(r,"CancelRequestAnimationFrame")]}jt=jt&&jt.bind(t),Rt=Rt&&Rt.bind(t),jt||(jt=function(e){var n=Date.now(),r=Math.max(0,16-(n-Lt)),i=t.setTimeout((function(){e(n+r)}),r);return Lt=n+r,i},Rt=function(t){return clearTimeout(t)})}};var Bt={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){Bt.isScrolling=!0,qt.cancel(Bt.i),t.autoScroll=Bt,Bt.interaction=t,Bt.prevTime=Bt.now(),Bt.i=qt.request(Bt.scroll)},stop:function(){Bt.isScrolling=!1,Bt.interaction&&(Bt.interaction.autoScroll=null),qt.cancel(Bt.i)},scroll:function(){var t=Bt.interaction,e=t.interactable,n=t.element,r=t.prepared.name,i=e.options[r].autoScroll,o=Vt(i.container,e,n),a=Bt.now(),s=(a-Bt.prevTime)/1e3,c=i.speed*s;if(c>=1){var l={x:Bt.x*c,y:Bt.y*c};if(l.x||l.y){var u=Gt(o);E.window(o)?o.scrollBy(l.x,l.y):o&&(o.scrollLeft+=l.x,o.scrollTop+=l.y);var p=Gt(o),f={x:p.x-u.x,y:p.y-u.y};(f.x||f.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:f,interaction:t,container:o})}Bt.prevTime=a}Bt.isScrolling&&(qt.cancel(Bt.i),Bt.i=qt.request(Bt.scroll))},check:function(t,e){var n;return null==(n=t.options[e].autoScroll)?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&Bt.check(e.interactable,e.prepared.name))if(e.simulation)Bt.x=Bt.y=0;else{var r,i,o,a,s=e.interactable,c=e.element,l=e.prepared.name,u=s.options[l].autoScroll,p=Vt(u.container,s,c);if(E.window(p))a=n.clientX<Bt.margin,r=n.clientY<Bt.margin,i=n.clientX>p.innerWidth-Bt.margin,o=n.clientY>p.innerHeight-Bt.margin;else{var f=L(p);a=n.clientX<f.left+Bt.margin,r=n.clientY<f.top+Bt.margin,i=n.clientX>f.right-Bt.margin,o=n.clientY>f.bottom-Bt.margin}Bt.x=i?1:a?-1:0,Bt.y=o?1:r?-1:0,Bt.isScrolling||(Bt.margin=u.margin,Bt.speed=u.speed,Bt.start(e))}}};function Vt(t,e,n){return(E.string(t)?W(t,e,n):t)||b(n)}function Gt(t){return E.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Wt={id:"auto-scroll",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=Bt,Bt.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=Bt.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,Bt.stop(),Bt.interaction&&(Bt.interaction=null)},"interactions:stop":Bt.stop,"interactions:action-move":function(t){return Bt.onInteractionMove(t)}}},Nt=Wt;function Ht(t,e){var n=!1;return function(){return n||(m.console.warn(e),n=!0),t.apply(this,arguments)}}function Ut(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function Kt(t){return E.bool(t)?(this.options.styleCursor=t,this):null===t?(delete this.options.styleCursor,this):this.options.styleCursor}function $t(t){return E.func(t)?(this.options.actionChecker=t,this):null===t?(delete this.options.actionChecker,this):this.options.actionChecker}var Jt={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(e,n,r,i){var o=function(t,e,n,r,i){var o=t.getRect(r),a=e.buttons||{0:1,1:4,3:8,4:16}[e.button],s={action:null,interactable:t,interaction:n,element:r,rect:o,buttons:a};return i.fire("auto-start:check",s),s.action}(this,n,r,i,t);return this.options.actionChecker?this.options.actionChecker(e,n,o,this,i,r):o},e.prototype.ignoreFrom=Ht((function(t){return this._backCompatOption("ignoreFrom",t)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=Ht((function(t){return this._backCompatOption("allowFrom",t)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=$t,e.prototype.styleCursor=Kt}};function Qt(t,e,n,r,i){return e.testIgnoreAllow(e.options[t.name],n,r)&&e.options[t.name].enabled&&ne(e,n,t,i)?t:null}function Zt(t,e,n,r,i,o,a){for(var s=0,c=r.length;s<c;s++){var l=r[s],u=i[s],p=l.getAction(e,n,t,u);if(p){var f=Qt(p,l,u,o,a);if(f)return{action:f,interactable:l,element:u}}}return{action:null,interactable:null,element:null}}function te(t,e,n,r,i){var o=[],a=[],s=r;function c(t){o.push(t),a.push(s)}for(;E.element(s);){o=[],a=[],i.interactables.forEachMatch(s,c);var l=Zt(t,e,n,o,a,r,i);if(l.action&&!l.interactable.options[l.action.name].manualStart)return l;s=C(s)}return{action:null,interactable:null,element:null}}function ee(t,e,n){var r=e.action,i=e.interactable,o=e.element;r=r||{name:null},t.interactable=i,t.element=o,Ut(t.prepared,r),t.rect=i&&r.name?i.getRect(o):null,oe(t,n),n.fire("autoStart:prepared",{interaction:t})}function ne(t,e,n,r){var i=t.options,o=i[n.name].max,a=i[n.name].maxPerElement,s=r.autoStart.maxInteractions,c=0,l=0,u=0;if(!(o&&a&&s))return!1;for(var p=0,f=r.interactions.list;p<f.length;p++){var d=f[p],h=d.prepared.name;if(d.interacting()){if(++c>=s)return!1;if(d.interactable===t){if((l+=h===n.name?1:0)>=o)return!1;if(d.element===e&&(u++,h===n.name&&u>=a))return!1}}}return s>0}function re(t,e){return E.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function ie(t,e,n){var r=n.autoStart.cursorElement;r&&r!==t&&(r.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function oe(t,e){var n=t.interactable,r=t.element,i=t.prepared;if("mouse"===t.pointerType&&n&&n.options.styleCursor){var o="";if(i.name){var a=n.options[i.name].cursorChecker;o=E.func(a)?a(i,n,r,t._interacting):e.actions.map[i.name].getCursor(i)}ie(t.element,o||"",e)}else e.autoStart.cursorElement&&ie(e.autoStart.cursorElement,"",e)}var ae={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin(Jt),n.base.actionChecker=null,n.base.styleCursor=!0,G(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(e){return re(e,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:ne,cursorElement:null}},listeners:{"interactions:down":function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;n.interacting()||ee(n,te(n,r,i,o,e),e)},"interactions:move":function(t,e){!function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;"mouse"!==n.pointerType||n.pointerIsDown||n.interacting()||ee(n,te(n,r,i,o,e),e)}(t,e),function(t,e){var n=t.interaction;if(n.pointerIsDown&&!n.interacting()&&n.pointerWasMoved&&n.prepared.name){e.fire("autoStart:before-start",t);var r=n.interactable,i=n.prepared.name;i&&r&&(r.options[i].manualStart||!ne(r,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,r,n.element),oe(n,e)))}}(t,e)},"interactions:stop":function(t,e){var n=t.interaction,r=n.interactable;r&&r.options.styleCursor&&ie(n.element,"",e)}},maxInteractions:re,withinInteractionLimit:ne,validateAction:Qt},se=ae;var ce={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var n=t.interaction,r=t.eventTarget,i=t.dx,o=t.dy;if("drag"===n.prepared.name){var a=Math.abs(i),s=Math.abs(o),c=n.interactable.options.drag,l=c.startAxis,u=a>s?"x":a<s?"y":"xy";if(n.prepared.axis="start"===c.lockAxis?u[0]:c.lockAxis,"xy"!==u&&"xy"!==l&&l!==u){n.prepared.name=null;for(var p=r,f=function(t){if(t!==n.interactable){var i=n.interactable.options.drag;if(!i.manualStart&&t.testIgnoreAllow(i,p,r)){var o=t.getAction(n.downPointer,n.downEvent,n,p);if(o&&"drag"===o.name&&function(t,e){if(!e)return!1;var n=e.options.drag.startAxis;return"xy"===t||"xy"===n||n===t}(u,t)&&se.validateAction(o,t,p,r,e))return t}}};E.element(p);){var d=e.interactables.forEachMatch(p,f);if(d){n.prepared.name="drag",n.interactable=d,n.element=p;break}p=C(p)}}}}}};function le(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var n=t.interactable.options;return n[e].hold||n[e].delay}var ue={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(se),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,n=le(e);n>0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),n))},"interactions:move":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;le(e)>0&&(e.prepared.name=null)}},getHoldDuration:le},pe=ue,fe={id:"auto-start",install:function(t){t.usePlugin(se),t.usePlugin(pe),t.usePlugin(ce)}},de=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):E.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function he(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}var ve={id:"core/interactablePreventDefault",install:function(t){var e=t.Interactable;e.prototype.preventDefault=de,e.prototype.checkAndPreventDefault=function(e){return function(t,e,n){var r=t.options.preventDefault;if("never"!==r)if("always"!==r){if(e.events.supportsPassive&&/^touch(start|move)$/.test(n.type)){var i=b(n.target).document,o=e.getDocOptions(i);if(!o||!o.events||!1!==o.events.passive)return}/^(mouse|pointer|touch)*(down|start)/i.test(n.type)||E.element(n.target)&&j(n.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||n.preventDefault()}else n.preventDefault()}(this,t,e)},t.interactions.docEvents.push({type:"dragstart",listener:function(e){for(var n=0,r=t.interactions.list;n<r.length;n++){var i=r[n];if(i.element&&(i.element===e.target||z(i.element,e.target)))return void i.interactable.checkAndPreventDefault(e)}}})},listeners:["down","move","up","cancel"].reduce((function(t,e){return t["interactions:".concat(e)]=he,t}),{})};function ge(t,e){if(e.phaselessTypes[t])return!0;for(var n in e.map)if(0===t.indexOf(n)&&t.substr(n.length)in e.phases)return!0;return!1}function me(t){var e={};for(var n in t){var r=t[n];E.plainObject(r)?e[n]=me(r):E.array(r)?e[n]=yt(r):e[n]=r}return e}var ye=function(){function t(e){i(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=e,this.result=be(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return a(t,[{key:"start",value:function(t,e){var n,r,i=t.phase,o=this.interaction,a=function(t){var e=t.interactable.options[t.prepared.name],n=e.modifiers;if(n&&n.length)return n;return["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(t){var n=e[t];return n&&n.enabled&&{options:n,methods:n._methods}})).filter((function(t){return!!t}))}(o);this.prepareStates(a),this.startEdges=G({},o.edges),this.edges=G({},this.startEdges),this.startOffset=(n=o.rect,r=e,n?{left:r.x-n.left,top:r.y-n.top,right:n.right-r.x,bottom:n.bottom-r.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var s=this.fillArg({phase:i,pageCoords:e,preEnd:!1});return this.result=be(),this.startAll(s),this.result=this.setAll(s)}},{key:"fillArg",value:function(t){var e=this.interaction;return t.interaction=e,t.interactable=e.interactable,t.element=e.element,t.rect||(t.rect=e.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var e=0,n=this.states;e<n.length;e++){var r=n[e];r.methods.start&&(t.state=r,r.methods.start(t))}}},{key:"setAll",value:function(t){var e=t.phase,n=t.preEnd,r=t.skipModifiers,i=t.rect,o=t.edges;t.coords=G({},t.pageCoords),t.rect=G({},i),t.edges=G({},o);for(var a=r?this.states.slice(r):this.states,s=be(t.coords,t.rect),c=0;c<a.length;c++){var l,u=a[c],p=u.options,f=G({},t.coords),d=null;null!=(l=u.methods)&&l.set&&this.shouldDo(p,n,e)&&(t.state=u,d=u.methods.set(t),K(t.edges,t.rect,{x:t.coords.x-f.x,y:t.coords.y-f.y})),s.eventProps.push(d)}G(this.edges,t.edges),s.delta.x=t.coords.x-t.pageCoords.x,s.delta.y=t.coords.y-t.pageCoords.y,s.rectDelta.left=t.rect.left-i.left,s.rectDelta.right=t.rect.right-i.right,s.rectDelta.top=t.rect.top-i.top,s.rectDelta.bottom=t.rect.bottom-i.bottom;var h=this.result.coords,v=this.result.rect;if(h&&v){var g=s.rect.left!==v.left||s.rect.right!==v.right||s.rect.top!==v.top||s.rect.bottom!==v.bottom;s.changed=g||h.x!==s.coords.x||h.y!==s.coords.y}return s}},{key:"applyToInteraction",value:function(t){var e=this.interaction,n=t.phase,r=e.coords.cur,i=e.coords.start,o=this.result,a=this.startDelta,s=o.delta;"start"===n&&G(this.startDelta,o.delta);for(var c=0,l=[[i,a],[r,s]];c<l.length;c++){var u=l[c],p=u[0],f=u[1];p.page.x+=f.x,p.page.y+=f.y,p.client.x+=f.x,p.client.y+=f.y}var d=this.result.rectDelta,h=t.rect||e.rect;h.left+=d.left,h.right+=d.right,h.top+=d.top,h.bottom+=d.bottom,h.width=h.right-h.left,h.height=h.bottom-h.top}},{key:"setAndApply",value:function(t){var e=this.interaction,n=t.phase,r=t.preEnd,i=t.skipModifiers,o=this.setAll(this.fillArg({preEnd:r,phase:n,pageCoords:t.modifiedCoords||e.coords.cur.page}));if(this.result=o,!o.changed&&(!i||i<this.states.length)&&e.interacting())return!1;if(t.modifiedCoords){var a=e.coords.cur.page,s={x:t.modifiedCoords.x-a.x,y:t.modifiedCoords.y-a.y};o.coords.x+=s.x,o.coords.y+=s.y,o.delta.x+=s.x,o.delta.y+=s.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var e=t.interaction,n=t.event,r=this.states;if(r&&r.length){for(var i=!1,o=0;o<r.length;o++){var a=r[o];t.state=a;var s=a.options,c=a.methods,l=c.beforeEnd&&c.beforeEnd(t);if(l)return this.endResult=l,!1;i=i||!i&&this.shouldDo(s,!0,t.phase,!0)}i&&e.move({event:n,preEnd:!0})}}},{key:"stop",value:function(t){var e=t.interaction;if(this.states&&this.states.length){var n=G({states:this.states,interactable:e.interactable,element:e.element,rect:null},t);this.fillArg(n);for(var r=0,i=this.states;r<i.length;r++){var o=i[r];n.state=o,o.methods.stop&&o.methods.stop(n)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var e=0;e<t.length;e++){var n=t[e],r=n.options,i=n.methods,o=n.name;this.states.push({options:r,methods:i,index:e,name:o})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var e=t.interaction,n=e.coords,r=e.rect,i=e.modification;if(i.result){for(var o=i.startDelta,a=i.result,s=a.delta,c=a.rectDelta,l=0,u=[[n.start,o],[n.cur,s]];l<u.length;l++){var p=u[l],f=p[0],d=p[1];f.page.x-=d.x,f.page.y-=d.y,f.client.x-=d.x,f.client.y-=d.y}r.left-=c.left,r.right-=c.right,r.top-=c.top,r.bottom-=c.bottom}}},{key:"shouldDo",value:function(t,e,n,r){return!(!t||!1===t.enabled||r&&!t.endOnly||t.endOnly&&!e||"start"===n&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map((function(t){return me(t)})),this.result=be(G({},t.result.coords),G({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),t}();function be(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function xe(t,e){var n=t.defaults,r={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},i=function(t){var i=t||{};for(var o in i.enabled=!1!==i.enabled,n)o in i||(i[o]=n[o]);var a={options:i,methods:r,name:e,enable:function(){return i.enabled=!0,a},disable:function(){return i.enabled=!1,a}};return a};return e&&"string"==typeof e&&(i._defaults=n,i._methods=r),i}function we(t){var e=t.iEvent,n=t.interaction.modification.result;n&&(e.modifiers=n.eventProps)}var Ee={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new ye(e)},"interactions:before-action-start":function(t){var e=t.interaction,n=t.interaction.modification;n.start(t,e.coords.start.page),e.edges=n.edges,n.applyToInteraction(t)},"interactions:before-action-move":function(t){var e=t.interaction,n=e.modification,r=n.setAndApply(t);return e.edges=n.edges,r},"interactions:before-action-end":function(t){var e=t.interaction,n=e.modification,r=n.beforeEnd(t);return e.edges=n.startEdges,r},"interactions:action-start":we,"interactions:action-move":we,"interactions:action-end":we,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},Te=Ee,Se={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},_e=function(t){c(n,t);var e=f(n);function n(t,r,o,a,s,c,l){var u;i(this,n),(u=e.call(this,t)).relatedTarget=null,u.screenX=void 0,u.screenY=void 0,u.button=void 0,u.buttons=void 0,u.ctrlKey=void 0,u.shiftKey=void 0,u.altKey=void 0,u.metaKey=void 0,u.page=void 0,u.client=void 0,u.delta=void 0,u.rect=void 0,u.x0=void 0,u.y0=void 0,u.t0=void 0,u.dt=void 0,u.duration=void 0,u.clientX0=void 0,u.clientY0=void 0,u.velocity=void 0,u.speed=void 0,u.swipe=void 0,u.axes=void 0,u.preEnd=void 0,s=s||t.element;var f=t.interactable,d=(f&&f.options||Se).deltaSource,h=$(f,s,o),v="start"===a,g="end"===a,m=v?p(u):t.prevEvent,y=v?t.coords.start:g?{page:m.page,client:m.client,timeStamp:t.coords.cur.timeStamp}:t.coords.cur;return u.page=G({},y.page),u.client=G({},y.client),u.rect=G({},t.rect),u.timeStamp=y.timeStamp,g||(u.page.x-=h.x,u.page.y-=h.y,u.client.x-=h.x,u.client.y-=h.y),u.ctrlKey=r.ctrlKey,u.altKey=r.altKey,u.shiftKey=r.shiftKey,u.metaKey=r.metaKey,u.button=r.button,u.buttons=r.buttons,u.target=s,u.currentTarget=s,u.preEnd=c,u.type=l||o+(a||""),u.interactable=f,u.t0=v?t.pointers[t.pointers.length-1].downTime:m.t0,u.x0=t.coords.start.page.x-h.x,u.y0=t.coords.start.page.y-h.y,u.clientX0=t.coords.start.client.x-h.x,u.clientY0=t.coords.start.client.y-h.y,u.delta=v||g?{x:0,y:0}:{x:u[d].x-m[d].x,y:u[d].y-m[d].y},u.dt=t.coords.delta.timeStamp,u.duration=u.timeStamp-u.t0,u.velocity=G({},t.coords.velocity[d]),u.speed=Z(u.velocity.x,u.velocity.y),u.swipe=g||"inertiastart"===a?u.getSwipe():null,u}return a(n,[{key:"getSwipe",value:function(){var t=this._interaction;if(t.prevEvent.speed<600||this.timeStamp-t.prevEvent.timeStamp>150)return null;var e=180*Math.atan2(t.prevEvent.velocityY,t.prevEvent.velocityX)/Math.PI;e<0&&(e+=360);var n=112.5<=e&&e<247.5,r=202.5<=e&&e<337.5;return{up:r,down:!r&&22.5<=e&&e<157.5,left:n,right:!n&&(292.5<=e||e<67.5),angle:e,speed:t.prevEvent.speed,velocity:{x:t.prevEvent.velocityX,y:t.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),n}(gt);Object.defineProperties(_e.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var Pe=a((function t(e,n,r,o,a){i(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=r,this.downTime=o,this.downTarget=a})),Oe=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),ke=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),De=0,Me=function(){function t(e){var n=this,r=e.pointerType,o=e.scopeFire;i(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Ht((function(t){this.move(t)}),"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=De++,this._scopeFire=o,this.pointerType=r;var a=this;this._proxy={};var s=function(t){Object.defineProperty(n._proxy,t,{get:function(){return a[t]}})};for(var c in Oe)s(c);var l=function(t){Object.defineProperty(n._proxy,t,{value:function(){return a[t].apply(a,arguments)}})};for(var u in ke)l(u);this._scopeFire("interactions:new",{interaction:this})}return a(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,e,n){var r=this.updatePointer(t,e,n,!0),i=this.pointers[r];this._scopeFire("interactions:down",{pointer:t,event:e,eventTarget:n,pointerIndex:r,pointerInfo:i,type:"down",interaction:this})}},{key:"start",value:function(t,e,n){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<("gesture"===t.name?2:1)||!e.options[t.name].enabled)&&(Ut(this.prepared,t),this.interactable=e,this.element=n,this.rect=e.getRect(n),this.edges=this.prepared.edges?G({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,e,n){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,e,n,!1);var r,i,o=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(r=this.coords.cur.client.x-this.coords.start.client.x,i=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Z(r,i)>this.pointerMoveTolerance);var a,s,c,l=this.getPointerIndex(t),u={pointer:t,pointerIndex:l,pointerInfo:this.pointers[l],event:e,type:"move",eventTarget:n,dx:r,dy:i,duplicate:o,interaction:this};o||(a=this.coords.velocity,s=this.coords.delta,c=Math.max(s.timeStamp/1e3,.001),a.page.x=s.page.x/c,a.page.y=s.page.y/c,a.client.x=s.client.x/c,a.client.y=s.client.y/c,a.timeStamp=c),this._scopeFire("interactions:move",u),o||this.simulation||(this.interacting()&&(u.type=null,this.move(u)),this.pointerWasMoved&&nt(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||rt(this.coords.delta),(t=G({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,e,n,r){var i=this.getPointerIndex(t);-1===i&&(i=this.updatePointer(t,e,n,!1));var o=/cancel$/i.test(e.type)?"cancel":"up";this._scopeFire("interactions:".concat(o),{pointer:t,pointerIndex:i,pointerInfo:this.pointers[i],event:e,eventTarget:n,type:o,curEventTarget:r,interaction:this}),this.simulation||this.end(e),this.removePointer(t,e)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var e;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(e=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,!0===e&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var e=st(t);return"mouse"===this.pointerType||"pen"===this.pointerType?this.pointers.length-1:bt(this.pointers,(function(t){return t.id===e}))}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,e,n,r){var i,o,a,s=st(t),c=this.getPointerIndex(t),l=this.pointers[c];return r=!1!==r&&(r||/(down|start)$/i.test(e.type)),l?l.pointer=t:(l=new Pe(s,t,e,null,null),c=this.pointers.length,this.pointers.push(l)),ct(this.coords.cur,this.pointers.map((function(t){return t.pointer})),this._now()),i=this.coords.delta,o=this.coords.prev,a=this.coords.cur,i.page.x=a.page.x-o.page.x,i.page.y=a.page.y-o.page.y,i.client.x=a.client.x-o.client.x,i.client.y=a.client.y-o.client.y,i.timeStamp=a.timeStamp-o.timeStamp,r&&(this.pointerIsDown=!0,l.downTime=this.coords.cur.timeStamp,l.downTarget=n,et(this.downPointer,t),this.interacting()||(nt(this.coords.start,this.coords.cur),nt(this.coords.prev,this.coords.cur),this.downEvent=e,this.pointerWasMoved=!1)),this._updateLatestPointer(t,e,n),this._scopeFire("interactions:update-pointer",{pointer:t,event:e,eventTarget:n,down:r,pointerInfo:l,pointerIndex:c,interaction:this}),c}},{key:"removePointer",value:function(t,e){var n=this.getPointerIndex(t);if(-1!==n){var r=this.pointers[n];this._scopeFire("interactions:remove-pointer",{pointer:t,event:e,eventTarget:null,pointerIndex:n,pointerInfo:r,interaction:this}),this.pointers.splice(n,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,e,n){this._latestPointer.pointer=t,this._latestPointer.event=e,this._latestPointer.eventTarget=n}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,e,n,r){return new _e(this,t,this.prepared.name,e,this.element,n,r)}},{key:"_fireEvent",value:function(t){var e;null==(e=this.interactable)||e.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var e=t.event,n=t.phase,r=t.preEnd,i=t.type,o=this.rect;if(o&&"move"===n&&(K(this.edges,o,this.coords.delta[this.interactable.options.deltaSource]),o.width=o.right-o.left,o.height=o.bottom-o.top),!1===this._scopeFire("interactions:before-action-".concat(n),t))return!1;var a=t.iEvent=this._createPreparedEvent(e,n,r,i);return this._scopeFire("interactions:action-".concat(n),t),"start"===n&&(this.prevEvent=a),this._fireEvent(a),this._scopeFire("interactions:after-action-".concat(n),t),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function Ie(t){ze(t.interaction)}function ze(t){if(!function(t){return!(!t.offset.pending.x&&!t.offset.pending.y)}(t))return!1;var e=t.offset.pending;return Ce(t.coords.cur,e),Ce(t.coords.delta,e),K(t.edges,t.rect,e),e.x=0,e.y=0,!0}function Ae(t){var e=t.x,n=t.y;this.offset.pending.x+=e,this.offset.pending.y+=n,this.offset.total.x+=e,this.offset.total.y+=n}function Ce(t,e){var n=t.page,r=t.client,i=e.x,o=e.y;n.x+=i,n.y+=o,r.x+=i,r.y+=o}ke.offsetBy="";var je={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=Ae},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return function(t){t.pointerIsDown&&(Ce(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":Ie,"interactions:before-action-move":Ie,"interactions:before-action-end":function(t){var e=t.interaction;if(ze(e))return e.move({offset:!0}),e.end(),!1},"interactions:stop":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}},Re=je;var Fe=function(){function t(e){i(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=e}return a(t,[{key:"start",value:function(t){var e=this.interaction,n=Xe(e);if(!n||!n.enabled)return!1;var r=e.coords.velocity.client,i=Z(r.x,r.y),o=this.modification||(this.modification=new ye(e));if(o.copyFrom(e.modification),this.t0=e._now(),this.allowResume=n.allowResume,this.v0=i,this.currentOffset={x:0,y:0},this.startCoords=e.coords.cur.page,this.modifierArg=o.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-e.coords.cur.timeStamp<50&&i>n.minSpeed&&i>n.endSpeed)this.startInertia();else{if(o.result=o.setAll(this.modifierArg),!o.result.changed)return!1;this.startSmoothEnd()}return e.modification.result.rect=null,e.offsetBy(this.targetOffset),e._doPhase({interaction:e,event:t,phase:"inertiastart"}),e.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),e.modification.result.rect=null,this.active=!0,e.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,e=this.interaction.coords.velocity.client,n=Xe(this.interaction),r=n.resistance,i=-Math.log(n.endSpeed/this.v0)/r;this.targetOffset={x:(e.x-i)/r,y:(e.y-i)/r},this.te=i,this.lambda_v0=r/this.v0,this.one_ve_v0=1-n.endSpeed/this.v0;var o=this.modification,a=this.modifierArg;a.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},o.result=o.setAll(a),o.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+o.result.delta.x,y:this.targetOffset.y+o.result.delta.y}),this.onNextFrame((function(){return t.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return t.smoothEndTick()}))}},{key:"onNextFrame",value:function(t){var e=this;this.timeout=qt.request((function(){e.active&&t()}))}},{key:"inertiaTick",value:function(){var t,e,n,r,i,o,a,s=this,c=this.interaction,l=Xe(c).resistance,u=(c._now()-this.t0)/1e3;if(u<this.te){var p,f=1-(Math.exp(-l*u)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,e=0,n=this.targetOffset.x,r=this.targetOffset.y,i=this.modifiedOffset.x,o=this.modifiedOffset.y,p={x:Le(a=f,t,n,i),y:Le(a,e,r,o)}):p={x:this.targetOffset.x*f,y:this.targetOffset.y*f};var d={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=d.x,this.currentOffset.y+=d.y,c.offsetBy(d),c.move(),this.onNextFrame((function(){return s.inertiaTick()}))}else c.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,e=this.interaction,n=e._now()-this.t0,r=Xe(e).smoothEndDuration;if(n<r){var i={x:qe(n,0,this.targetOffset.x,r),y:qe(n,0,this.targetOffset.y,r)},o={x:i.x-this.currentOffset.x,y:i.y-this.currentOffset.y};this.currentOffset.x+=o.x,this.currentOffset.y+=o.y,e.offsetBy(o),e.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return t.smoothEndTick()}))}else e.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var e=t.pointer,n=t.event,r=t.eventTarget,i=this.interaction;i.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),i.updatePointer(e,n,r,!0),i._doPhase({interaction:i,event:n,phase:"resume"}),nt(i.coords.prev,i.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,qt.cancel(this.timeout)}}]),t}();function Xe(t){var e=t.interactable,n=t.prepared;return e&&e.options&&n.name&&e.options[n.name].inertia}var Ye={id:"inertia",before:["modifiers","actions"],install:function(t){var e=t.defaults;t.usePlugin(Re),t.usePlugin(Te),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var e=t.interaction;e.inertia=new Fe(e)},"interactions:before-action-end":function(t){var e=t.interaction,n=t.event;return(!e._interacting||e.simulation||!e.inertia.start(n))&&null},"interactions:down":function(t){var e=t.interaction,n=t.eventTarget,r=e.inertia;if(r.active)for(var i=n;E.element(i);){if(i===e.element){r.resume(t);break}i=C(i)}},"interactions:stop":function(t){var e=t.interaction.inertia;e.active&&e.stop()},"interactions:before-action-resume":function(t){var e=t.interaction.modification;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":we,"interactions:action-inertiastart":we,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function Le(t,e,n,r){var i=1-t;return i*i*e+2*i*t*n+t*t*r}function qe(t,e,n,r){return-n*(t/=r)*(t-2)+e}var Be=Ye;function Ve(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(t.immediatePropagationStopped)break;r(t)}}var Ge=function(){function t(e){i(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=G({},e||{})}return a(t,[{key:"fire",value:function(t){var e,n=this.global;(e=this.types[t.type])&&Ve(t,e),!t.propagationStopped&&n&&(e=n[t.type])&&Ve(t,e)}},{key:"on",value:function(t,e){var n=J(t,e);for(t in n)this.types[t]=mt(this.types[t]||[],n[t])}},{key:"off",value:function(t,e){var n=J(t,e);for(t in n){var r=this.types[t];if(r&&r.length)for(var i=0,o=n[t];i<o.length;i++){var a=o[i],s=r.indexOf(a);-1!==s&&r.splice(s,1)}}}},{key:"getRect",value:function(t){return null}}]),t}();var We=function(){function t(e){i(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,et(this,e)}return a(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function Ne(t){return E.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function He(t,e){return t===e||("boolean"==typeof t?!!e.capture===t&&!1==!!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive)}var Ue={id:"events",install:function(t){var e,n=[],r={},i=[],o={add:a,remove:s,addDelegate:function(t,e,n,o,s){var u=Ne(s);if(!r[n]){r[n]=[];for(var p=0;p<i.length;p++){var f=i[p];a(f,n,c),a(f,n,l,!0)}}var d=r[n],h=xt(d,(function(n){return n.selector===t&&n.context===e}));h||(h={selector:t,context:e,listeners:[]},d.push(h));h.listeners.push({func:o,options:u})},removeDelegate:function(t,e,n,i,o){var a,u=Ne(o),p=r[n],f=!1;if(!p)return;for(a=p.length-1;a>=0;a--){var d=p[a];if(d.selector===t&&d.context===e){for(var h=d.listeners,v=h.length-1;v>=0;v--){var g=h[v];if(g.func===i&&He(g.options,u)){h.splice(v,1),h.length||(p.splice(a,1),s(e,n,c),s(e,n,l,!0)),f=!0;break}}if(f)break}}},delegateListener:c,delegateUseCapture:l,delegatedEvents:r,documents:i,targets:n,supportsOptions:!1,supportsPassive:!1};function a(t,e,r,i){if(t.addEventListener){var a=Ne(i),s=xt(n,(function(e){return e.eventTarget===t}));s||(s={eventTarget:t,events:{}},n.push(s)),s.events[e]||(s.events[e]=[]),xt(s.events[e],(function(t){return t.func===r&&He(t.options,a)}))||(t.addEventListener(e,r,o.supportsOptions?a:a.capture),s.events[e].push({func:r,options:a}))}}function s(t,e,r,i){if(t.addEventListener&&t.removeEventListener){var a=bt(n,(function(e){return e.eventTarget===t})),c=n[a];if(c&&c.events)if("all"!==e){var l=!1,u=c.events[e];if(u){if("all"===r){for(var p=u.length-1;p>=0;p--){var f=u[p];s(t,e,f.func,f.options)}return}for(var d=Ne(i),h=0;h<u.length;h++){var v=u[h];if(v.func===r&&He(v.options,d)){t.removeEventListener(e,r,o.supportsOptions?d:d.capture),u.splice(h,1),0===u.length&&(delete c.events[e],l=!0);break}}}l&&!Object.keys(c.events).length&&n.splice(a,1)}else for(e in c.events)c.events.hasOwnProperty(e)&&s(t,e,"all")}}function c(t,e){for(var n=Ne(e),i=new We(t),o=r[t.type],a=vt(t)[0],s=a;E.element(s);){for(var c=0;c<o.length;c++){var l=o[c],u=l.selector,p=l.context;if(j(s,u)&&z(p,a)&&z(p,s)){var f=l.listeners;i.currentTarget=s;for(var d=0;d<f.length;d++){var h=f[d];He(h.options,n)&&h.func(i)}}}s=C(s)}}function l(t){return c(t,!0)}return null==(e=t.document)||e.createElement("div").addEventListener("test",null,{get capture(){return o.supportsOptions=!0},get passive(){return o.supportsPassive=!0}}),t.events=o,o}},Ke={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var e=0,n=Ke.methodOrder;e<n.length;e++){var r=n[e],i=Ke[r](t);if(i)return i}return null},simulationResume:function(t){var e=t.pointerType,n=t.eventType,r=t.eventTarget,i=t.scope;if(!/down|start/i.test(n))return null;for(var o=0,a=i.interactions.list;o<a.length;o++){var s=a[o],c=r;if(s.simulation&&s.simulation.allowResume&&s.pointerType===e)for(;c;){if(c===s.element)return s;c=C(c)}}return null},mouseOrPen:function(t){var e,n=t.pointerId,r=t.pointerType,i=t.eventType,o=t.scope;if("mouse"!==r&&"pen"!==r)return null;for(var a=0,s=o.interactions.list;a<s.length;a++){var c=s[a];if(c.pointerType===r){if(c.simulation&&!$e(c,n))continue;if(c.interacting())return c;e||(e=c)}}if(e)return e;for(var l=0,u=o.interactions.list;l<u.length;l++){var p=u[l];if(!(p.pointerType!==r||/down/i.test(i)&&p.simulation))return p}return null},hasPointer:function(t){for(var e=t.pointerId,n=0,r=t.scope.interactions.list;n<r.length;n++){var i=r[n];if($e(i,e))return i}return null},idle:function(t){for(var e=t.pointerType,n=0,r=t.scope.interactions.list;n<r.length;n++){var i=r[n];if(1===i.pointers.length){var o=i.interactable;if(o&&(!o.options.gesture||!o.options.gesture.enabled))continue}else if(i.pointers.length>=2)continue;if(!i.interacting()&&e===i.pointerType)return i}return null}};function $e(t,e){return t.pointers.some((function(t){return t.id===e}))}var Je=Ke,Qe=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Ze(t,e){return function(n){var r=e.interactions.list,i=ht(n),o=vt(n),a=o[0],s=o[1],c=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(var l=0,u=n.changedTouches;l<u.length;l++){var p=u[l],f={pointer:p,pointerId:st(p),pointerType:i,eventType:n.type,eventTarget:a,curEventTarget:s,scope:e},d=tn(f);c.push([f.pointer,f.eventTarget,f.curEventTarget,d])}}else{var h=!1;if(!I.supportsPointerEvent&&/mouse/.test(n.type)){for(var v=0;v<r.length&&!h;v++)h="mouse"!==r[v].pointerType&&r[v].pointerIsDown;h=h||e.now()-e.prevTouchTime<500||0===n.timeStamp}if(!h){var g={pointer:n,pointerId:st(n),pointerType:i,eventType:n.type,curEventTarget:s,eventTarget:a,scope:e},m=tn(g);c.push([g.pointer,g.eventTarget,g.curEventTarget,m])}}for(var y=0;y<c.length;y++){var b=c[y],x=b[0],w=b[1],E=b[2];b[3][t](x,n,w,E)}}}function tn(t){var e=t.pointerType,n=t.scope,r={interaction:Je.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function en(t,e){var n=t.doc,r=t.scope,i=t.options,o=r.interactions.docEvents,a=r.events,s=a[e];for(var c in r.browser.isIOS&&!i.events&&(i.events={passive:!1}),a.delegatedEvents)s(n,c,a.delegateListener),s(n,c,a.delegateUseCapture,!0);for(var l=i&&i.events,u=0;u<o.length;u++){var p=o[u];s(n,p.type,p.listener,l)}}var nn={id:"core/interactions",install:function(t){for(var e={},n=0;n<Qe.length;n++){var r=Qe[n];e[r]=Ze(r,t)}var o,s=I.pEventTypes;function l(){for(var e=0,n=t.interactions.list;e<n.length;e++){var r=n[e];if(r.pointerIsDown&&"touch"===r.pointerType&&!r._interacting)for(var i=function(){var e=a[o];t.documents.some((function(t){return z(t.doc,e.downTarget)}))||r.removePointer(e.pointer,e.event)},o=0,a=r.pointers;o<a.length;o++)i()}}(o=D.PointerEvent?[{type:s.down,listener:l},{type:s.down,listener:e.pointerDown},{type:s.move,listener:e.pointerMove},{type:s.up,listener:e.pointerUp},{type:s.cancel,listener:e.pointerUp}]:[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:l},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}]).push({type:"blur",listener:function(e){for(var n=0,r=t.interactions.list;n<r.length;n++){r[n].documentBlur(e)}}}),t.prevTouchTime=0,t.Interaction=function(e){c(r,e);var n=f(r);function r(){return i(this,r),n.apply(this,arguments)}return a(r,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(e){t.interactions.pointerMoveTolerance=e}},{key:"_now",value:function(){return t.now()}}]),r}(Me),t.interactions={list:[],new:function(e){e.scopeFire=function(e,n){return t.fire(e,n)};var n=new t.Interaction(e);return t.interactions.list.push(n),n},listeners:e,docEvents:o,pointerMoveTolerance:1},t.usePlugin(ve)},listeners:{"scope:add-document":function(t){return en(t,"add")},"scope:remove-document":function(t){return en(t,"remove")},"interactable:unset":function(t,e){for(var n=t.interactable,r=e.interactions.list.length-1;r>=0;r--){var i=e.interactions.list[r];i.interactable===n&&(i.stop(),e.fire("interactions:destroy",{interaction:i}),i.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(r,1))}}},onDocSignal:en,doOnInteractions:Ze,methodNames:Qe},rn=nn,on=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(on||{}),an=function(){function t(e,n,r,o){i(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Ge,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||r,this._win=b(V(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=o,this.set(n)}return a(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,e){return E.func(e.onstart)&&this.on("".concat(t,"start"),e.onstart),E.func(e.onmove)&&this.on("".concat(t,"move"),e.onmove),E.func(e.onend)&&this.on("".concat(t,"end"),e.onend),E.func(e.oninertiastart)&&this.on("".concat(t,"inertiastart"),e.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,e,n){var r,i=this,o=null==(r=this._actions.map[t])?void 0:r.filterEventType,a=function(t){return(null==o||o(t))&&ge(t,i._actions)};(E.array(e)||E.object(e))&&this._onOff(on.Off,t,e,void 0,a),(E.array(n)||E.object(n))&&this._onOff(on.On,t,n,void 0,a)}},{key:"setPerAction",value:function(t,e){var n=this._defaults;for(var r in e){var i=r,o=this.options[t],a=e[i];"listeners"===i&&this.updatePerActionListeners(t,o.listeners,a),E.array(a)?o[i]=yt(a):E.plainObject(a)?(o[i]=G(o[i]||{},me(a)),E.object(n.perAction[i])&&"enabled"in n.perAction[i]&&(o[i].enabled=!1!==a.enabled)):E.bool(a)&&E.object(n.perAction[i])?o[i].enabled=a:o[i]=a}}},{key:"getRect",value:function(t){return t=t||(E.element(this.target)?this.target:null),E.string(this.target)&&(t=t||this._context.querySelector(this.target)),q(t)}},{key:"rectChecker",value:function(t){var e=this;return E.func(t)?(this.getRect=function(n){var r=G({},t.apply(e,n));return"width"in r||(r.width=r.right-r.left,r.height=r.bottom-r.top),r},this):null===t?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,e){if(V(e)||E.object(e)){for(var n in this.options[t]=e,this._actions.map)this.options[n][t]=e;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return"page"===t||"client"===t?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return E.string(t)?Array.from(this._context.querySelectorAll(t)):E.func(t)&&t.getAllElements?t.getAllElements():E.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||z(this._context,t)}},{key:"testIgnoreAllow",value:function(t,e,n){return!this.testIgnore(t.ignoreFrom,e,n)&&this.testAllow(t.allowFrom,e,n)}},{key:"testAllow",value:function(t,e,n){return!t||!!E.element(n)&&(E.string(t)?X(n,t,e):!!E.element(t)&&z(t,n))}},{key:"testIgnore",value:function(t,e,n){return!(!t||!E.element(n))&&(E.string(t)?X(n,t,e):!!E.element(t)&&z(t,n))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,e,n,r,i){E.object(e)&&!E.array(e)&&(r=n,n=null);var o=J(e,n,i);for(var a in o){"wheel"===a&&(a=I.wheelEvent);for(var s=0,c=o[a];s<c.length;s++){var l=c[s];ge(a,this._actions)?this.events[t===on.On?"on":"off"](a,l):E.string(this.target)?this._scopeEvents[t===on.On?"addDelegate":"removeDelegate"](this.target,this._context,a,l,r):this._scopeEvents[t===on.On?"add":"remove"](this.target,a,l,r)}}return this}},{key:"on",value:function(t,e,n){return this._onOff(on.On,t,e,n)}},{key:"off",value:function(t,e,n){return this._onOff(on.Off,t,e,n)}},{key:"set",value:function(t){var e=this._defaults;for(var n in E.object(t)||(t={}),this.options=me(e.base),this._actions.methodDict){var r=n,i=this._actions.methodDict[r];this.options[r]={},this.setPerAction(r,G(G({},e.perAction),e.actions[r])),this[i](t[r])}for(var o in t)"getRect"!==o?E.func(this[o])&&this[o](t[o]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(E.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var e=this._scopeEvents.delegatedEvents[t],n=e.length-1;n>=0;n--){var r=e[n],i=r.selector,o=r.context,a=r.listeners;i===this.target&&o===this._context&&e.splice(n,1);for(var s=a.length-1;s>=0;s--)this._scopeEvents.removeDelegate(this.target,this._context,t,a[s][0],a[s][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),sn=function(){function t(e){var n=this;i(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":function(t){var e=t.interactable,r=e.target,i=E.string(r)?n.selectorMap[r]:r[n.scope.id],o=bt(i,(function(t){return t===e}));i.splice(o,1)}})}return a(t,[{key:"new",value:function(t,e){e=G(e||{},{actions:this.scope.actions});var n=new this.scope.Interactable(t,e,this.scope.document,this.scope.events);return this.scope.addDocument(n._doc),this.list.push(n),E.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(n)):(n.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(n)),this.scope.fire("interactable:new",{target:t,options:e,interactable:n,win:this.scope._win}),n}},{key:"getExisting",value:function(t,e){var n=e&&e.context||this.scope.document,r=E.string(t),i=r?this.selectorMap[t]:t[this.scope.id];if(i)return xt(i,(function(e){return e._context===n&&(r||e.inContext(t))}))}},{key:"forEachMatch",value:function(t,e){for(var n=0,r=this.list;n<r.length;n++){var i=r[n],o=void 0;if((E.string(i.target)?E.element(t)&&j(t,i.target):t===i.target)&&i.inContext(t)&&(o=e(i)),void 0!==o)return o}}}]),t}();var cn=function(){function t(){var e=this;i(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=I,this.defaults=me(Se),this.Eventable=Ge,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(t){var e=function e(n,r){var i=t.interactables.getExisting(n,r);return i||((i=t.interactables.new(n,r)).events.global=e.globalEvents),i};return e.getPointerAverage=ut,e.getTouchBBox=pt,e.getTouchDistance=ft,e.getTouchAngle=dt,e.getElementRect=q,e.getElementClientRect=L,e.matchesSelector=j,e.closest=A,e.globalEvents={},e.version="1.10.26",e.scope=t,e.use=function(t,e){return this.scope.usePlugin(t,e),this},e.isSet=function(t,e){return!!this.scope.interactables.get(t,e&&e.context)},e.on=Ht((function(t,e,n){if(E.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),E.array(t)){for(var r=0,i=t;r<i.length;r++){var o=i[r];this.on(o,e,n)}return this}if(E.object(t)){for(var a in t)this.on(a,t[a],e);return this}return ge(t,this.scope.actions)?this.globalEvents[t]?this.globalEvents[t].push(e):this.globalEvents[t]=[e]:this.scope.events.add(this.scope.document,t,e,{options:n}),this}),"The interact.on() method is being deprecated"),e.off=Ht((function(t,e,n){if(E.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),E.array(t)){for(var r=0,i=t;r<i.length;r++){var o=i[r];this.off(o,e,n)}return this}if(E.object(t)){for(var a in t)this.off(a,t[a],e);return this}var s;return ge(t,this.scope.actions)?t in this.globalEvents&&-1!==(s=this.globalEvents[t].indexOf(e))&&this.globalEvents[t].splice(s,1):this.scope.events.remove(this.scope.document,t,e,n),this}),"The interact.off() method is being deprecated"),e.debug=function(){return this.scope},e.supportsTouch=function(){return I.supportsTouch},e.supportsPointerEvent=function(){return I.supportsPointerEvent},e.stop=function(){for(var t=0,e=this.scope.interactions.list;t<e.length;t++)e[t].stop();return this},e.pointerMoveTolerance=function(t){return E.number(t)?(this.scope.interactions.pointerMoveTolerance=t,this):this.scope.interactions.pointerMoveTolerance},e.addDocument=function(t,e){this.scope.addDocument(t,e)},e.removeDocument=function(t){this.scope.removeDocument(t)},e}(this),this.InteractEvent=_e,this.Interactable=void 0,this.interactables=new sn(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(t){return e.removeDocument(t.target)};var n=this;this.Interactable=function(t){c(r,t);var e=f(r);function r(){return i(this,r),e.apply(this,arguments)}return a(r,[{key:"_defaults",get:function(){return n.defaults}},{key:"set",value:function(t){return d(l(r.prototype),"set",this).call(this,t),n.fire("interactable:set",{options:t,interactable:this}),this}},{key:"unset",value:function(){d(l(r.prototype),"unset",this).call(this);var t=n.interactables.list.indexOf(this);t<0||(n.interactables.list.splice(t,1),n.fire("interactable:unset",{interactable:this}))}}]),r}(an)}return a(t,[{key:"addListeners",value:function(t,e){this.listenerMaps.push({id:e,map:t})}},{key:"fire",value:function(t,e){for(var n=0,r=this.listenerMaps;n<r.length;n++){var i=r[n].map[t];if(i&&!1===i(e,this,t))return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(t,e){t.isInitialized=!0,E.window(e)&&y(e);return D.init(e),I.init(e),qt.init(e),t.window=e,t.document=e.document,t.usePlugin(rn),t.usePlugin(Ue),t}(this,t)}},{key:"pluginIsInstalled",value:function(t){var e=t.id;return e?!!this._plugins.map[e]:-1!==this._plugins.list.indexOf(t)}},{key:"usePlugin",value:function(t,e){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,e),t.listeners&&t.before){for(var n=0,r=this.listenerMaps.length,i=t.before.reduce((function(t,e){return t[e]=!0,t[ln(e)]=!0,t}),{});n<r;n++){var o=this.listenerMaps[n].id;if(o&&(i[o]||i[ln(o)]))break}this.listenerMaps.splice(n,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,e){if(-1!==this.getDocIndex(t))return!1;var n=b(t);e=e?G({},e):{},this.documents.push({doc:t,options:e}),this.events.documents.push(t),t!==this.document&&this.events.add(n,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:n,scope:this,options:e})}},{key:"removeDocument",value:function(t){var e=this.getDocIndex(t),n=b(t),r=this.documents[e].options;this.events.remove(n,"unload",this.onWindowUnload),this.documents.splice(e,1),this.events.documents.splice(e,1),this.fire("scope:remove-document",{doc:t,window:n,scope:this,options:r})}},{key:"getDocIndex",value:function(t){for(var e=0;e<this.documents.length;e++)if(this.documents[e].doc===t)return e;return-1}},{key:"getDocOptions",value:function(t){var e=this.getDocIndex(t);return-1===e?null:this.documents[e].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function ln(t){return t&&t.replace(/\/.*$/,"")}var un=new cn,pn=un.interactStatic,fn="undefined"!=typeof globalThis?globalThis:window;un.init(fn);var dn=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(e){var n=e[0],r=e[1];return n in t||r in t})),n=function(n,r){for(var i=t.range,o=t.limits,a=void 0===o?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:o,s=t.offset,c=void 0===s?{x:0,y:0}:s,l={range:i,grid:t,x:null,y:null},u=0;u<e.length;u++){var p=e[u],f=p[0],d=p[1],h=Math.round((n-c.x)/t[f]),v=Math.round((r-c.y)/t[d]);l[f]=Math.max(a.left,Math.min(a.right,h*t[f]+c.x)),l[d]=Math.max(a.top,Math.min(a.bottom,v*t[d]+c.y))}return l};return n.grid=t,n.coordFields=e,n}}),hn={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=G(e.snappers||{},dn),e.createSnapGrid=e.snappers.grid}},vn=hn,gn={start:function(t){var e=t.state,r=t.rect,i=t.edges,o=t.pageCoords,a=e.options,s=a.ratio,c=a.enabled,l=e.options,u=l.equalDelta,p=l.modifiers;"preserve"===s&&(s=r.width/r.height),e.startCoords=G({},o),e.startRect=G({},r),e.ratio=s,e.equalDelta=u;var f=e.linkedEdges={top:i.top||i.left&&!i.bottom,left:i.left||i.top&&!i.right,bottom:i.bottom||i.right&&!i.top,right:i.right||i.bottom&&!i.left};if(e.xIsPrimaryAxis=!(!i.left&&!i.right),e.equalDelta){var d=(f.left?1:-1)*(f.top?1:-1);e.edgeSign={x:d,y:d}}else e.edgeSign={x:f.left?-1:1,y:f.top?-1:1};if(!1!==c&&G(i,f),null!=p&&p.length){var h=new ye(t.interaction);h.copyFrom(t.interaction.modification),h.prepareStates(p),e.subModification=h,h.startAll(n({},t))}},set:function(t){var e=t.state,r=t.rect,i=t.coords,o=e.linkedEdges,a=G({},i),s=e.equalDelta?mn:yn;if(G(t.edges,o),s(e,e.xIsPrimaryAxis,i,r),!e.subModification)return null;var c=G({},r);K(o,c,{x:i.x-a.x,y:i.y-a.y});var l=e.subModification.setAll(n(n({},t),{},{rect:c,edges:o,pageCoords:i,prevCoords:i,prevRect:c})),u=l.delta;l.changed&&(s(e,Math.abs(u.x)>Math.abs(u.y),l.coords,l.rect),G(i,l.coords));return l.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function mn(t,e,n){var r=t.startCoords,i=t.edgeSign;e?n.y=r.y+(n.x-r.x)*i.y:n.x=r.x+(n.y-r.y)*i.x}function yn(t,e,n,r){var i=t.startRect,o=t.startCoords,a=t.ratio,s=t.edgeSign;if(e){var c=r.width/a;n.y=o.y+(c-i.height)*s.y}else{var l=r.height*a;n.x=o.x+(l-i.width)*s.x}}var bn=xe(gn,"aspectRatio"),xn=function(){};xn._defaults={};var wn=xn;function En(t,e,n){return E.func(t)?N(t,e.interactable,e.element,[n.x,n.y,e]):N(t,e.interactable,e.element)}var Tn={start:function(t){var e=t.rect,n=t.startOffset,r=t.state,i=t.interaction,o=t.pageCoords,a=r.options,s=a.elementRect,c=G({left:0,top:0,right:0,bottom:0},a.offset||{});if(e&&s){var l=En(a.restriction,i,o);if(l){var u=l.right-l.left-e.width,p=l.bottom-l.top-e.height;u<0&&(c.left+=u,c.right+=u),p<0&&(c.top+=p,c.bottom+=p)}c.left+=n.left-e.width*s.left,c.top+=n.top-e.height*s.top,c.right+=n.right-e.width*(1-s.right),c.bottom+=n.bottom-e.height*(1-s.bottom)}r.offset=c},set:function(t){var e=t.coords,n=t.interaction,r=t.state,i=r.options,o=r.offset,a=En(i.restriction,n,e);if(a){var s=function(t){return!t||"left"in t&&"top"in t||((t=G({},t)).left=t.x||0,t.top=t.y||0,t.right=t.right||t.left+t.width,t.bottom=t.bottom||t.top+t.height),t}(a);e.x=Math.max(Math.min(s.right-o.right,e.x),s.left+o.left),e.y=Math.max(Math.min(s.bottom-o.bottom,e.y),s.top+o.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Sn=xe(Tn,"restrict"),_n={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Pn={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function On(t,e){for(var n=0,r=["top","left","bottom","right"];n<r.length;n++){var i=r[n];i in t||(t[i]=e[i])}return t}var kn={noInner:_n,noOuter:Pn,start:function(t){var e,n=t.interaction,r=t.startOffset,i=t.state,o=i.options;o&&(e=H(En(o.offset,n,n.coords.start.page))),e=e||{x:0,y:0},i.offset={top:e.y+r.top,left:e.x+r.left,bottom:e.y-r.bottom,right:e.x-r.right}},set:function(t){var e=t.coords,n=t.edges,r=t.interaction,i=t.state,o=i.offset,a=i.options;if(n){var s=G({},e),c=En(a.inner,r,s)||{},l=En(a.outer,r,s)||{};On(c,_n),On(l,Pn),n.top?e.y=Math.min(Math.max(l.top+o.top,s.y),c.top+o.top):n.bottom&&(e.y=Math.max(Math.min(l.bottom+o.bottom,s.y),c.bottom+o.bottom)),n.left?e.x=Math.min(Math.max(l.left+o.left,s.x),c.left+o.left):n.right&&(e.x=Math.max(Math.min(l.right+o.right,s.x),c.right+o.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Dn=xe(kn,"restrictEdges"),Mn=G({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Tn.defaults),In=xe({start:Tn.start,set:Tn.set,defaults:Mn},"restrictRect"),zn={width:-1/0,height:-1/0},An={width:1/0,height:1/0};var Cn=xe({start:function(t){return kn.start(t)},set:function(t){var e=t.interaction,n=t.state,r=t.rect,i=t.edges,o=n.options;if(i){var a=U(En(o.min,e,t.coords))||zn,s=U(En(o.max,e,t.coords))||An;n.options={endOnly:o.endOnly,inner:G({},kn.noInner),outer:G({},kn.noOuter)},i.top?(n.options.inner.top=r.bottom-a.height,n.options.outer.top=r.bottom-s.height):i.bottom&&(n.options.inner.bottom=r.top+a.height,n.options.outer.bottom=r.top+s.height),i.left?(n.options.inner.left=r.right-a.width,n.options.outer.left=r.right-s.width):i.right&&(n.options.inner.right=r.left+a.width,n.options.outer.right=r.left+s.width),kn.set(t),n.options=o}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize");var jn={start:function(t){var e,n=t.interaction,r=t.interactable,i=t.element,o=t.rect,a=t.state,s=t.startOffset,c=a.options,l=c.offsetWithOrigin?function(t){var e=t.interaction.element,n=H(N(t.state.options.origin,null,null,[e])),r=n||$(t.interactable,e,t.interaction.prepared.name);return r}(t):{x:0,y:0};if("startCoords"===c.offset)e={x:n.coords.start.page.x,y:n.coords.start.page.y};else{var u=N(c.offset,r,i,[n]);(e=H(u)||{x:0,y:0}).x+=l.x,e.y+=l.y}var p=c.relativePoints;a.offsets=o&&p&&p.length?p.map((function(t,n){return{index:n,relativePoint:t,x:s.left-o.width*t.x+e.x,y:s.top-o.height*t.y+e.y}})):[{index:0,relativePoint:null,x:e.x,y:e.y}]},set:function(t){var e=t.interaction,n=t.coords,r=t.state,i=r.options,o=r.offsets,a=$(e.interactable,e.element,e.prepared.name),s=G({},n),c=[];i.offsetWithOrigin||(s.x-=a.x,s.y-=a.y);for(var l=0,u=o;l<u.length;l++)for(var p=u[l],f=s.x-p.x,d=s.y-p.y,h=0,v=i.targets.length;h<v;h++){var g=i.targets[h],m=void 0;(m=E.func(g)?g(f,d,e._proxy,p,h):g)&&c.push({x:(E.number(m.x)?m.x:f)+p.x,y:(E.number(m.y)?m.y:d)+p.y,range:E.number(m.range)?m.range:i.range,source:g,index:h,offset:p})}for(var y={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},b=0;b<c.length;b++){var x=c[b],w=x.range,T=x.x-s.x,S=x.y-s.y,_=Z(T,S),P=_<=w;w===1/0&&y.inRange&&y.range!==1/0&&(P=!1),y.target&&!(P?y.inRange&&w!==1/0?_/w<y.distance/y.range:w===1/0&&y.range!==1/0||_<y.distance:!y.inRange&&_<y.distance)||(y.target=x,y.distance=_,y.range=w,y.inRange=P,y.delta.x=T,y.delta.y=S)}return y.inRange&&(n.x=y.target.x,n.y=y.target.y),r.closest=y,y},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Rn=xe(jn,"snap");var Fn={start:function(t){var e=t.state,n=t.edges,r=e.options;if(!n)return null;t.state={options:{targets:null,relativePoints:[{x:n.left?0:1,y:n.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},e.targetFields=e.targetFields||[["width","height"],["x","y"]],jn.start(t),e.offsets=t.state.offsets,t.state=e},set:function(t){var e=t.interaction,n=t.state,r=t.coords,i=n.options,o=n.offsets,a={x:r.x-o[0].x,y:r.y-o[0].y};n.options=G({},i),n.options.targets=[];for(var s=0,c=i.targets||[];s<c.length;s++){var l=c[s],u=void 0;if(u=E.func(l)?l(a.x,a.y,e):l){for(var p=0,f=n.targetFields;p<f.length;p++){var d=f[p],h=d[0],v=d[1];if(h in u||v in u){u.x=u[h],u.y=u[v];break}}n.options.targets.push(u)}}var g=jn.set(t);return n.options=i,g},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Xn=xe(Fn,"snapSize");var Yn={aspectRatio:bn,restrictEdges:Dn,restrict:Sn,restrictRect:In,restrictSize:Cn,snapEdges:xe({start:function(t){var e=t.edges;return e?(t.state.targetFields=t.state.targetFields||[[e.left?"left":"right",e.top?"top":"bottom"]],Fn.start(t)):null},set:Fn.set,defaults:G(me(Fn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Rn,snapSize:Xn,spring:wn,avoid:wn,transform:wn,rubberband:wn},Ln={id:"modifiers",install:function(t){var e=t.interactStatic;for(var n in t.usePlugin(Te),t.usePlugin(vn),e.modifiers=Yn,Yn){var r=Yn[n],i=r._defaults,o=r._methods;i._methods=o,t.defaults.perAction[n]=i}}},qn=Ln,Bn=function(t){c(n,t);var e=f(n);function n(t,r,o,a,s,c){var l;if(i(this,n),et(p(l=e.call(this,s)),o),o!==r&&et(p(l),r),l.timeStamp=c,l.originalEvent=o,l.type=t,l.pointerId=st(r),l.pointerType=ht(r),l.target=a,l.currentTarget=null,"tap"===t){var u=s.getPointerIndex(r);l.dt=l.timeStamp-s.pointers[u].downTime;var f=l.timeStamp-s.tapTime;l.double=!!s.prevTap&&"doubletap"!==s.prevTap.type&&s.prevTap.target===l.target&&f<500}else"doubletap"===t&&(l.dt=r.timeStamp-s.tapTime,l.double=!0);return l}return a(n,[{key:"_subtractOrigin",value:function(t){var e=t.x,n=t.y;return this.pageX-=e,this.pageY-=n,this.clientX-=e,this.clientY-=n,this}},{key:"_addOrigin",value:function(t){var e=t.x,n=t.y;return this.pageX+=e,this.pageY+=n,this.clientX+=e,this.clientY+=n,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),n}(gt),Vn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Vn,t.defaults.actions.pointerEvents=Vn.defaults,G(t.actions.phaselessTypes,Vn.types)},listeners:{"interactions:new":function(t){var e=t.interaction;e.prevTap=null,e.tapTime=0},"interactions:update-pointer":function(t){var e=t.down,n=t.pointerInfo;if(!e&&n.hold)return;n.hold={duration:1/0,timeout:null}},"interactions:move":function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;t.duplicate||n.pointerIsDown&&!n.pointerWasMoved||(n.pointerIsDown&&Nn(t),Gn({interaction:n,pointer:r,event:i,eventTarget:o,type:"move"},e))},"interactions:down":function(t,e){!function(t,e){for(var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.pointerIndex,s=n.pointers[a].hold,c=B(o),l={interaction:n,pointer:r,event:i,eventTarget:o,type:"hold",targets:[],path:c,node:null},u=0;u<c.length;u++){var p=c[u];l.node=p,e.fire("pointerEvents:collect-targets",l)}if(!l.targets.length)return;for(var f=1/0,d=0,h=l.targets;d<h.length;d++){var v=h[d].eventable.options.holdDuration;v<f&&(f=v)}s.duration=f,s.timeout=setTimeout((function(){Gn({interaction:n,eventTarget:o,pointer:r,event:i,type:"hold"},e)}),f)}(t,e),Gn(t,e)},"interactions:up":function(t,e){Nn(t),Gn(t,e),function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;n.pointerWasMoved||Gn({interaction:n,eventTarget:o,pointer:r,event:i,type:"tap"},e)}(t,e)},"interactions:cancel":function(t,e){Nn(t),Gn(t,e)}},PointerEvent:Bn,fire:Gn,collectEventTargets:Wn,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Gn(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.type,s=t.targets,c=void 0===s?Wn(t,e):s,l=new Bn(a,r,i,o,n,e.now());e.fire("pointerEvents:new",{pointerEvent:l});for(var u={interaction:n,pointer:r,event:i,eventTarget:o,targets:c,type:a,pointerEvent:l},p=0;p<c.length;p++){var f=c[p];for(var d in f.props||{})l[d]=f.props[d];var h=$(f.eventable,f.node);if(l._subtractOrigin(h),l.eventable=f.eventable,l.currentTarget=f.node,f.eventable.fire(l),l._addOrigin(h),l.immediatePropagationStopped||l.propagationStopped&&p+1<c.length&&c[p+1].node!==l.currentTarget)break}if(e.fire("pointerEvents:fired",u),"tap"===a){var v=l.double?Gn({interaction:n,pointer:r,event:i,eventTarget:o,type:"doubletap"},e):l;n.prevTap=v,n.tapTime=v.timeStamp}return l}function Wn(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.type,s=n.getPointerIndex(r),c=n.pointers[s];if("tap"===a&&(n.pointerWasMoved||!c||c.downTarget!==o))return[];for(var l=B(o),u={interaction:n,pointer:r,event:i,eventTarget:o,type:a,path:l,targets:[],node:null},p=0;p<l.length;p++){var f=l[p];u.node=f,e.fire("pointerEvents:collect-targets",u)}return"hold"===a&&(u.targets=u.targets.filter((function(t){var e,r;return t.eventable.options.holdDuration===(null==(e=n.pointers[s])||null==(r=e.hold)?void 0:r.duration)}))),u.targets}function Nn(t){var e=t.interaction,n=t.pointerIndex,r=e.pointers[n].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Hn=Object.freeze({__proto__:null,default:Vn});function Un(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}var Kn={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Vn);var e=t.pointerEvents;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(t,e){return t["pointerEvents:".concat(e)]=Un,t}),{"pointerEvents:new":function(t){var e=t.pointerEvent;"hold"===e.type&&(e.count=(e.count||0)+1)},"pointerEvents:fired":function(t,e){var n=t.interaction,r=t.pointerEvent,i=t.eventTarget,o=t.targets;if("hold"===r.type&&o.length){var a=o[0].eventable.options.holdRepeatInterval;a<=0||(n.holdIntervalHandle=setTimeout((function(){e.pointerEvents.fire({interaction:n,eventTarget:i,type:"hold",pointer:r,event:r},e)}),a))}}})},$n=Kn;var Jn={id:"pointer-events/interactableTargets",install:function(t){var e=t.Interactable;e.prototype.pointerEvents=function(t){return G(this.events.options,t),this};var n=e.prototype._backCompatOption;e.prototype._backCompatOption=function(t,e){var r=n.call(this,t,e);return r===this&&(this.events.options[t]=e),r}},listeners:{"pointerEvents:collect-targets":function(t,e){var n=t.targets,r=t.node,i=t.type,o=t.eventTarget;e.interactables.forEachMatch(r,(function(t){var e=t.events,a=e.options;e.types[i]&&e.types[i].length&&t.testIgnoreAllow(a,r,o)&&n.push({node:r,eventable:e,props:{interactable:t}})}))},"interactable:new":function(t){var e=t.interactable;e.events.getRect=function(t){return e.getRect(t)}},"interactable:set":function(t,e){var n=t.interactable,r=t.options;G(n.events.options,e.pointerEvents.defaults),G(n.events.options,r.pointerEvents||{})}}},Qn=Jn,Zn={id:"pointer-events",install:function(t){t.usePlugin(Hn),t.usePlugin($n),t.usePlugin(Qn)}},tr=Zn;var er={id:"reflow",install:function(t){var e=t.Interactable;t.actions.phases.reflow=!0,e.prototype.reflow=function(e){return function(t,e,n){for(var r=t.getAllElements(),i=n.window.Promise,o=i?[]:null,a=function(){var a=r[s],c=t.getRect(a);if(!c)return 1;var l,u=xt(n.interactions.list,(function(n){return n.interacting()&&n.interactable===t&&n.element===a&&n.prepared.name===e.name}));if(u)u.move(),o&&(l=u._reflowPromise||new i((function(t){u._reflowResolve=t})));else{var p=U(c),f=function(t){return{coords:t,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:p.x,y:p.y},client:{x:p.x,y:p.y},timeStamp:n.now()});l=function(t,e,n,r,i){var o=t.interactions.new({pointerType:"reflow"}),a={interaction:o,event:i,pointer:i,eventTarget:n,phase:"reflow"};o.interactable=e,o.element=n,o.prevEvent=i,o.updatePointer(i,i,n,!0),rt(o.coords.delta),Ut(o.prepared,r),o._doPhase(a);var s=t.window,c=s.Promise,l=c?new c((function(t){o._reflowResolve=t})):void 0;o._reflowPromise=l,o.start(r,e,n),o._interacting?(o.move(a),o.end(i)):(o.stop(),o._reflowResolve());return o.removePointer(i,i),l}(n,t,a,e,f)}o&&o.push(l)},s=0;s<r.length&&!a();s++);return o&&i.all(o).then((function(){return t}))}(this,e,t)}},listeners:{"interactions:stop":function(t,e){var n=t.interaction;"reflow"===n.pointerType&&(n._reflowResolve&&n._reflowResolve(),function(t,e){t.splice(t.indexOf(e),1)}(e.interactions.list,n))}}},nr=er;if(pn.use(ve),pn.use(Re),pn.use(tr),pn.use(Be),pn.use(qn),pn.use(fe),pn.use(Yt),pn.use(Nt),pn.use(nr),pn.default=pn,"object"===r(t)&&t)try{t.exports=pn}catch(e){}return pn.default=pn,pn}))}));export{interact_min as i};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host}from"./index-172625c5.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-3add43eb.js";import{g as getTemplateStore}from"./TemplateStore-09d1ae9f.js";import"./index-4439b0d1.js";var ipcTestCss="ipc-test{max-width:800px;display:block}";var IpcTest=function(){function e(e){registerInstance(this,e);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="e997b94c-9d1b-4c85-8552-dedd24e35550"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();e=this;return[4,getTemplateStore(this.endpoint,this.templateId,false)];case 1:e.store=n.sent();return[3,3];case 2:t=n.sent();console.log("[TEMPLATE VISIBILITY] Error loading template",t);return[3,3];case 3:return[2]}}))}))};e.prototype.render=function(){console.log("[IPC] Rendering");return h(Host,null,h("div",null,h("pre",null,h("code",null,JSON.stringify(this.store.state,null,2)))),h("verdocs-template-roles",{templateId:this.templateId}),h("verdocs-template-fields",{templateId:this.templateId}))};return e}();IpcTest.style=ipcTestCss;export{IpcTest as ipc_test};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function s(t){try{l(r.next(t))}catch(t){i(t)}}function a(t){try{l(r["throw"](t))}catch(t){i(t)}}function l(t){t.done?n(t.value):o(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(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,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,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host}from"./index-172625c5.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-7922d31f.js";import{g as getTemplateStore}from"./TemplateStore-7149eda0.js";import"./index-4439b0d1.js";var ipcTestCss="ipc-test{max-width:800px;display:block}";var IpcTest=function(){function t(t){registerInstance(this,t);this.store=null;this.endpoint=VerdocsEndpoint.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,getTemplateStore(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 h(Host,null,h("div",null,h("pre",null,h("code",null,JSON.stringify(this.store.state,null,2)))),h("verdocs-template-roles",{templateId:this.templateId}),h("verdocs-template-fields",{templateId:this.templateId}))};return t}();IpcTest.style=ipcTestCss;export{IpcTest as ipc_test};