@cling-se/widget 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddClientCallout-3f9785f2.js → AddClientCallout-9a08f2ce.js} +5 -5
- package/dist/{AnswerModal-7b914a72.js → AnswerModal-50c8347c.js} +3 -3
- package/dist/{AttachmentItem-5d150224.js → AttachmentItem-9bd7dbfb.js} +3 -3
- package/dist/{BaseDatePicker-9cddc38f.js → BaseDatePicker-01dfa5b2.js} +2 -2
- package/dist/{BaseInput-fcb09d2c.js → BaseInput-39893fdd.js} +1 -1
- package/dist/{BaseUpload-2ad1fae4.js → BaseUpload-d8b864b3.js} +2 -2
- package/dist/{BlockMedia-3bbd7e5d.js → BlockMedia-5812545c.js} +1 -1
- package/dist/{CCallout-129b9016.js → CCallout-3bfbca46.js} +2 -2
- package/dist/{CDropdownItem-5a0ca430.js → CDropdownItem-4e64b91f.js} +1 -1
- package/dist/{CField-80d99d50.js → CField-5dbb89e1.js} +1 -1
- package/dist/{CPhoneFormat-0959395a.js → CPhoneFormat-c0be2b4f.js} +1 -1
- package/dist/{CSlider.vue_vue_type_style_index_0_lang-c70037e8.js → CSlider.vue_vue_type_style_index_0_lang-0e241327.js} +1 -1
- package/dist/{ClientAutocomplete-3718be8a.js → ClientAutocomplete-debd7fb5.js} +2 -2
- package/dist/{ClientModal-d732fd81.js → ClientModal-b2b26491.js} +5 -5
- package/dist/{ColorPicker-4a4b7eea.js → ColorPicker-554004b4.js} +1 -1
- package/dist/{CompanyModal-19c5c1f2.js → CompanyModal-2e0706de.js} +3 -3
- package/dist/{ContentWrapper-f8c52451.js → ContentWrapper-78c03285.js} +13 -13
- package/dist/{CoverBlockSettings-143c5e8a.js → CoverBlockSettings-a10af3d7.js} +7 -7
- package/dist/{DocAnswer-89d378ac.js → DocAnswer-dbb8d156.js} +4 -4
- package/dist/{DocDetails-34676b1e.js → DocDetails-60cd0e54.js} +4 -4
- package/dist/{DocForm-aba386d5.js → DocForm-e452f0cd.js} +28 -28
- package/dist/{DocFormSend-421c5cc7.js → DocFormSend-2be90d32.js} +17 -17
- package/dist/{DocLinks-472b4a96.js → DocLinks-1d6bf0d6.js} +2 -2
- package/dist/{DocModalBase-2c834dd5.js → DocModalBase-af969452.js} +1 -1
- package/dist/{DocPrint-a9c44521.js → DocPrint-62066899.js} +1 -1
- package/dist/{DocReceipt-102d0524.js → DocReceipt-2d26b906.js} +1 -1
- package/dist/{DocSendReminder-49c39d42.js → DocSendReminder-d0bd58b6.js} +1 -1
- package/dist/{DocTextEditor-24417f8d.js → DocTextEditor-6a7d926d.js} +10 -9
- package/dist/{DocTimeline-344bec38.js → DocTimeline-da4ad72b.js} +1 -1
- package/dist/{DocumentClient-6d7277a0.js → DocumentClient-40b9d019.js} +7 -7
- package/dist/{DocumentLayout-abefff4f.js → DocumentLayout-b33f7eca.js} +4 -4
- package/dist/{DocumentLogotype-cc5889ad.js → DocumentLogotype-7ee57f11.js} +3 -3
- package/dist/{DocumentVoided-41579b24.js → DocumentVoided-0b031bd6.js} +1 -1
- package/dist/{EmbedInput-5f07d028.js → EmbedInput-0c1b25a5.js} +2 -2
- package/dist/{EmbedSettings-88dce3cf.js → EmbedSettings-4e11febb.js} +3 -3
- package/dist/{ErrorCallout-3508688d.js → ErrorCallout-2ca69cec.js} +1 -1
- package/dist/{FilePreviewModal-c4b9e918.js → FilePreviewModal-318cd4e6.js} +5 -5
- package/dist/{Flag-02988bcf.js → Flag-e27c8311.js} +1 -1
- package/dist/{HeaderSettings-97086ab2.js → HeaderSettings-ccffab13.js} +15 -15
- package/dist/{ImageSelectModal-8e30a3e0.js → ImageSelectModal-b33e02f0.js} +8 -8
- package/dist/{ImageUploadWrapper-518b79b8.js → ImageUploadWrapper-2958e38a.js} +2 -2
- package/dist/{Index-569f4e59.js → Index-03c094df.js} +5 -5
- package/dist/{Index-db23e565.js → Index-0b42facb.js} +4 -4
- package/dist/{Index-6608fa5d.js → Index-1189a031.js} +1 -1
- package/dist/{Index-c865d2a7.js → Index-21bf7267.js} +3 -3
- package/dist/{Index-e5fecd29.js → Index-25438497.js} +2 -2
- package/dist/{Index-8d064e8c.js → Index-29366cec.js} +13 -13
- package/dist/{Index-33dfe64e.js → Index-321c45b2.js} +1 -1
- package/dist/{Index-34b8b0ce.js → Index-352290be.js} +2 -2
- package/dist/{Index-405d163d.js → Index-3aa7ab5a.js} +9 -9
- package/dist/{Index-176515cc.js → Index-52048bd8.js} +2 -2
- package/dist/{Index-a6f33402.js → Index-56ef7197.js} +7 -7
- package/dist/{Index-ea0bf7a0.js → Index-57ff2c4d.js} +14 -14
- package/dist/{Index-cb220fa5.js → Index-63d1c186.js} +6 -6
- package/dist/{Index-6b32a3a9.js → Index-6c850deb.js} +2 -2
- package/dist/{Index-e59c16e7.js → Index-7fc7f137.js} +4 -4
- package/dist/{Index-39af7955.js → Index-8415c404.js} +4 -4
- package/dist/{Index-e7b93428.js → Index-86295fa6.js} +7 -7
- package/dist/{Index-73b27846.js → Index-8c8da99b.js} +6 -6
- package/dist/{Index-fafa9f57.js → Index-9359fe90.js} +2 -2
- package/dist/{Index-dc767413.js → Index-a156fa7b.js} +2 -2
- package/dist/{Index-57015d0c.js → Index-a28b89d6.js} +4 -4
- package/dist/{Index-b75fa86d.js → Index-a4be2350.js} +2 -2
- package/dist/{Index-cf915894.js → Index-ad8b2d21.js} +14 -14
- package/dist/{Index-60ae0c83.js → Index-c0ba3ccf.js} +2 -2
- package/dist/{Index-6535d219.js → Index-ca5d5938.js} +4 -4
- package/dist/{Index-0c2d25a8.js → Index-cd9016c9.js} +6 -6
- package/dist/{Index-e291fed3.js → Index-d91e72e4.js} +4 -4
- package/dist/{Index-1b92aa75.js → Index-dd365704.js} +5 -5
- package/dist/{Index-9148818f.js → Index-df1b0ce1.js} +8 -8
- package/dist/{Index-074f5642.js → Index-e423aff0.js} +9 -9
- package/dist/{Index-31424c8a.js → Index-e4b6c044.js} +6 -6
- package/dist/{Index-ee400c91.js → Index-e5d8ace1.js} +4 -4
- package/dist/{Index-e9704357.js → Index-f9dce241.js} +10 -10
- package/dist/{Index-616b72bd.js → Index-fe86d6ed.js} +4 -4
- package/dist/{InputToggleRow-b6f64b6f.js → InputToggleRow-73b2eb3e.js} +1 -1
- package/dist/{IsPremiumPreStep-6fde278f.js → IsPremiumPreStep-3409b0b1.js} +2 -2
- package/dist/{ManualPopover-3f480f6b.js → ManualPopover-aabff26d.js} +1 -1
- package/dist/{MediaWrapper-bbafdc09.js → MediaWrapper-f69bd386.js} +3 -3
- package/dist/{NotBindingText-39726f2f.js → NotBindingText-297c0757.js} +2 -2
- package/dist/{PackageGroup-e135e892.js → PackageGroup-c8b0ea48.js} +12 -12
- package/dist/{PdfTerms-a32aa22f.js → PdfTerms-23875b7a.js} +5 -5
- package/dist/{PdfViewer-632443a3.js → PdfViewer-bb3115a5.js} +2 -2
- package/dist/{PlainHtml-d2d7699a.js → PlainHtml-084a2060.js} +1 -1
- package/dist/{PriceHeader-b7332bd0.js → PriceHeader-3e081e28.js} +13 -13
- package/dist/{SearchApi-a018ebdc.js → SearchApi-54afc953.js} +2 -2
- package/dist/{Setup-80854101.js → Setup-6fc1e279.js} +1 -1
- package/dist/{TermsSettings-d4f6f80c.js → TermsSettings-d08a2850.js} +7 -7
- package/dist/{ThemeColorRow-3f07fbf8.js → ThemeColorRow-06cba9a4.js} +3 -3
- package/dist/{ToggleBinding-6303f1d8.js → ToggleBinding-ef903ffb.js} +3 -3
- package/dist/{UploadModal-23b8226a.js → UploadModal-b1000887.js} +3 -3
- package/dist/{VideoPlayerInput-16b86120.js → VideoPlayerInput-d457e93f.js} +3 -3
- package/dist/{VideoPlayerSettings-b9bd4e18.js → VideoPlayerSettings-6d3e4247.js} +4 -4
- package/dist/{VideoSelectModal-66438872.js → VideoSelectModal-cd78d125.js} +8 -8
- package/dist/{answerDocumentMixin-02f78126.js → answerDocumentMixin-93535108.js} +3 -3
- package/dist/{debounce-b0612fb1.js → debounce-c329e921.js} +1 -1
- package/dist/{focusDrawerMixin-52eb85e9.js → focusDrawerMixin-a2d32b5e.js} +1 -1
- package/dist/{formComponentsInstall-9f3773c2.js → formComponentsInstall-bc0a5a0c.js} +12 -12
- package/dist/{formDrawerState-e4589dcd.js → formDrawerState-e755d0ef.js} +1 -1
- package/dist/{formValidationMixin-953530fe.js → formValidationMixin-64e2fd25.js} +1 -1
- package/dist/{index-012ceee7.js → index-252c1b85.js} +9 -9
- package/dist/{index-11226781.js → index-3ad3f370.js} +1 -1
- package/dist/{index-f740a64e.js → index-4edd6331.js} +1 -1
- package/dist/{index-7c666227.js → index-7cae1b9c.js} +1 -1
- package/dist/{index-5853fd8c.js → index-a8e0d9a4.js} +3 -3
- package/dist/{index-b25ae77f.js → index-fbb0197d.js} +5 -5
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/{main-a7affeda.js → main-83016097.js} +14 -14
- package/dist/{mapFormMixin-d5a5dd24.js → mapFormMixin-3946f304.js} +1 -1
- package/dist/{publicSenderState-f03a6cb9.js → publicSenderState-c8c8dd01.js} +1 -1
- package/dist/{throttle-94f505ef.js → throttle-79d7f6e6.js} +2 -2
- package/dist/{tinycolor-f4dda4a3.js → tinycolor-dbe7bbc8.js} +1 -1
- package/dist/{tippy.esm-b2e63783.js → tippy.esm-46a552eb.js} +5 -5
- package/dist/{utils-c55689f5.js → utils-bbbf8074.js} +1 -1
- package/dist/{vuedraggable.umd-0357786a.js → vuedraggable.umd-344678d6.js} +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -433,7 +433,7 @@ $t(documentTemplateView.smsContent) $t(documentTemplateView.readMore)
|
|
|
433
433
|
* (c) 2017 Evan You
|
|
434
434
|
* @license MIT
|
|
435
435
|
*/function k3(n){return Object.prototype.toString.call(n).indexOf("Error")>-1}var oxe={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,r){var i=r.props,a=r.children,o=r.parent,s=r.data;s.routerView=!0;for(var c=o.$createElement,l=i.name,u=o.$route,d=o._routerViewCache||(o._routerViewCache={}),p=0,f=!1;o&&o._routerRoot!==o;)o.$vnode&&o.$vnode.data.routerView&&p++,o._inactive&&(f=!0),o=o.$parent;if(s.routerViewDepth=p,f)return c(d[l],s,a);var h=u.matched[p];if(!h)return d[l]=null,c();var m=d[l]=h.components[l];s.registerRouteInstance=function(w,S){var k=h.instances[l];(S&&k!==w||!S&&k===w)&&(h.instances[l]=S)},(s.hook||(s.hook={})).prepatch=function(w,S){h.instances[l]=S.componentInstance};var g=s.props=sxe(u,h.props&&h.props[l]);if(g){g=s.props=lxe({},g);var y=s.attrs=s.attrs||{};for(var b in g)(!m.props||!(b in m.props))&&(y[b]=g[b],delete g[b])}return c(m,s,a)}};function sxe(n,t){switch(typeof t){case"undefined":return;case"object":return t;case"function":return t(n);case"boolean":return t?n.params:void 0}}function lxe(n,t){for(var r in t)n[r]=t[r];return n}var cxe=/[!'()*]/g,uxe=function(n){return"%"+n.charCodeAt(0).toString(16)},dxe=/%2C/g,Dp=function(n){return encodeURIComponent(n).replace(cxe,uxe).replace(dxe,",")},aI=decodeURIComponent;function pxe(n,t,r){t===void 0&&(t={});var i=r||fxe,a;try{a=i(n||"")}catch{a={}}for(var o in t)a[o]=t[o];return a}function fxe(n){var t={};return n=n.trim().replace(/^(\?|#|&)/,""),n&&n.split("&").forEach(function(r){var i=r.replace(/\+/g," ").split("="),a=aI(i.shift()),o=i.length>0?aI(i.join("=")):null;t[a]===void 0?t[a]=o:Array.isArray(t[a])?t[a].push(o):t[a]=[t[a],o]}),t}function hxe(n){var t=n?Object.keys(n).map(function(r){var i=n[r];if(i===void 0)return"";if(i===null)return Dp(r);if(Array.isArray(i)){var a=[];return i.forEach(function(o){o!==void 0&&(o===null?a.push(Dp(r)):a.push(Dp(r)+"="+Dp(o)))}),a.join("&")}return Dp(r)+"="+Dp(i)}).filter(function(r){return r.length>0}).join("&"):null;return t?"?"+t:""}var V0=/\/?$/;function U0(n,t,r,i){var a=i&&i.options.stringifyQuery,o=t.query||{};try{o=S3(o)}catch{}var s={name:t.name||n&&n.name,meta:n&&n.meta||{},path:t.path||"/",hash:t.hash||"",query:o,params:t.params||{},fullPath:oI(t,a),matched:n?mxe(n):[]};return r&&(s.redirectedFrom=oI(r,a)),Object.freeze(s)}function S3(n){if(Array.isArray(n))return n.map(S3);if(n&&typeof n=="object"){var t={};for(var r in n)t[r]=S3(n[r]);return t}else return n}var H0=U0(null,{path:"/"});function mxe(n){for(var t=[];n;)t.unshift(n),n=n.parent;return t}function oI(n,t){var r=n.path,i=n.query;i===void 0&&(i={});var a=n.hash;a===void 0&&(a="");var o=t||hxe;return(r||"/")+o(i)+a}function sI(n,t){return t===H0?n===t:t?n.path&&t.path?n.path.replace(V0,"")===t.path.replace(V0,"")&&n.hash===t.hash&&W0(n.query,t.query):n.name&&t.name?n.name===t.name&&n.hash===t.hash&&W0(n.query,t.query)&&W0(n.params,t.params):!1:!1}function W0(n,t){if(n===void 0&&(n={}),t===void 0&&(t={}),!n||!t)return n===t;var r=Object.keys(n),i=Object.keys(t);return r.length!==i.length?!1:r.every(function(a){var o=n[a],s=t[a];return typeof o=="object"&&typeof s=="object"?W0(o,s):String(o)===String(s)})}function gxe(n,t){return n.path.replace(V0,"/").indexOf(t.path.replace(V0,"/"))===0&&(!t.hash||n.hash===t.hash)&&vxe(n.query,t.query)}function vxe(n,t){for(var r in t)if(!(r in n))return!1;return!0}var yxe=[String,Object],bxe=[String,Array],_xe={name:"router-link",props:{to:{type:yxe,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:bxe,default:"click"}},render:function(t){var r=this,i=this.$router,a=this.$route,o=i.resolve(this.to,a,this.append),s=o.location,c=o.route,l=o.href,u={},d=i.options.linkActiveClass,p=i.options.linkExactActiveClass,f=d??"router-link-active",h=p??"router-link-exact-active",m=this.activeClass==null?f:this.activeClass,g=this.exactActiveClass==null?h:this.exactActiveClass,y=s.path?U0(null,s,null,i):c;u[g]=sI(a,y),u[m]=this.exact?u[g]:gxe(a,y);var b=function($){lI($)&&(r.replace?i.replace(s):i.push(s))},w={click:lI};Array.isArray(this.event)?this.event.forEach(function($){w[$]=b}):w[this.event]=b;var S={class:u};if(this.tag==="a")S.on=w,S.attrs={href:l};else{var k=cI(this.$slots.default);if(k){k.isStatic=!1;var E=Um.util.extend,T=k.data=E({},k.data);T.on=w;var A=k.data.attrs=E({},k.data.attrs);A.href=l}else S.on=w}return t(this.tag,S,this.$slots.default)}};function lI(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){var t=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return n.preventDefault&&n.preventDefault(),!0}}function cI(n){if(n){for(var t,r=0;r<n.length;r++)if(t=n[r],t.tag==="a"||t.children&&(t=cI(t.children)))return t}}var Um;function T3(n){if(!(T3.installed&&Um===n)){T3.installed=!0,Um=n;var t=function(a){return a!==void 0},r=function(a,o){var s=a.$options._parentVnode;t(s)&&t(s=s.data)&&t(s=s.registerRouteInstance)&&s(a,o)};n.mixin({beforeCreate:function(){t(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),n.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(n.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(n.prototype,"$route",{get:function(){return this._routerRoot._route}}),n.component("router-view",oxe),n.component("router-link",_xe);var i=n.config.optionMergeStrategies;i.beforeRouteEnter=i.beforeRouteLeave=i.beforeRouteUpdate=i.created}}var Hm=typeof window<"u";function uI(n,t,r){var i=n.charAt(0);if(i==="/")return n;if(i==="?"||i==="#")return t+n;var a=t.split("/");(!r||!a[a.length-1])&&a.pop();for(var o=n.replace(/^\//,"").split("/"),s=0;s<o.length;s++){var c=o[s];c===".."?a.pop():c!=="."&&a.push(c)}return a[0]!==""&&a.unshift(""),a.join("/")}function wxe(n){var t="",r="",i=n.indexOf("#");i>=0&&(t=n.slice(i),n=n.slice(0,i));var a=n.indexOf("?");return a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),{path:n,query:r,hash:t}}function $u(n){return n.replace(/\/\//g,"/")}var G0=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"},Mp=hI,xxe=E3,Cxe=Exe,kxe=dI,Sxe=fI,Txe=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function E3(n,t){for(var r=[],i=0,a=0,o="",s=t&&t.delimiter||"/",c;(c=Txe.exec(n))!=null;){var l=c[0],u=c[1],d=c.index;if(o+=n.slice(a,d),a=d+l.length,u){o+=u[1];continue}var p=n[a],f=c[2],h=c[3],m=c[4],g=c[5],y=c[6],b=c[7];o&&(r.push(o),o="");var w=f!=null&&p!=null&&p!==f,S=y==="+"||y==="*",k=y==="?"||y==="*",E=c[2]||s,T=m||g;r.push({name:h||i++,prefix:f||"",delimiter:E,optional:k,repeat:S,partial:w,asterisk:!!b,pattern:T?Oxe(T):b?".*":"[^"+q0(E)+"]+?"})}return a<n.length&&(o+=n.substr(a)),o&&r.push(o),r}function Exe(n,t){return dI(E3(n,t))}function $xe(n){return encodeURI(n).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function Axe(n){return encodeURI(n).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function dI(n){for(var t=new Array(n.length),r=0;r<n.length;r++)typeof n[r]=="object"&&(t[r]=new RegExp("^(?:"+n[r].pattern+")$"));return function(i,a){for(var o="",s=i||{},c=a||{},l=c.pretty?$xe:encodeURIComponent,u=0;u<n.length;u++){var d=n[u];if(typeof d=="string"){o+=d;continue}var p=s[d.name],f;if(p==null)if(d.optional){d.partial&&(o+=d.prefix);continue}else throw new TypeError('Expected "'+d.name+'" to be defined');if(G0(p)){if(!d.repeat)throw new TypeError('Expected "'+d.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(p.length===0){if(d.optional)continue;throw new TypeError('Expected "'+d.name+'" to not be empty')}for(var h=0;h<p.length;h++){if(f=l(p[h]),!t[u].test(f))throw new TypeError('Expected all "'+d.name+'" to match "'+d.pattern+'", but received `'+JSON.stringify(f)+"`");o+=(h===0?d.prefix:d.delimiter)+f}continue}if(f=d.asterisk?Axe(p):l(p),!t[u].test(f))throw new TypeError('Expected "'+d.name+'" to match "'+d.pattern+'", but received "'+f+'"');o+=d.prefix+f}return o}}function q0(n){return n.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function Oxe(n){return n.replace(/([=!:$\/()])/g,"\\$1")}function $3(n,t){return n.keys=t,n}function pI(n){return n.sensitive?"":"i"}function Dxe(n,t){var r=n.source.match(/\((?!\?)/g);if(r)for(var i=0;i<r.length;i++)t.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return $3(n,t)}function Mxe(n,t,r){for(var i=[],a=0;a<n.length;a++)i.push(hI(n[a],t,r).source);var o=new RegExp("(?:"+i.join("|")+")",pI(r));return $3(o,t)}function Pxe(n,t,r){return fI(E3(n,r),t,r)}function fI(n,t,r){G0(t)||(r=t||r,t=[]),r=r||{};for(var i=r.strict,a=r.end!==!1,o="",s=0;s<n.length;s++){var c=n[s];if(typeof c=="string")o+=q0(c);else{var l=q0(c.prefix),u="(?:"+c.pattern+")";t.push(c),c.repeat&&(u+="(?:"+l+u+")*"),c.optional?c.partial?u=l+"("+u+")?":u="(?:"+l+"("+u+"))?":u=l+"("+u+")",o+=u}}var d=q0(r.delimiter||"/"),p=o.slice(-d.length)===d;return i||(o=(p?o.slice(0,-d.length):o)+"(?:"+d+"(?=$))?"),a?o+="$":o+=i&&p?"":"(?="+d+"|$)",$3(new RegExp("^"+o,pI(r)),t)}function hI(n,t,r){return G0(t)||(r=t||r,t=[]),r=r||{},n instanceof RegExp?Dxe(n,t):G0(n)?Mxe(n,t,r):Pxe(n,t,r)}Mp.parse=xxe,Mp.compile=Cxe,Mp.tokensToFunction=kxe,Mp.tokensToRegExp=Sxe;var mI=Object.create(null);function Y0(n,t,r){try{var i=mI[n]||(mI[n]=Mp.compile(n));return i(t||{},{pretty:!0})}catch{return""}}function gI(n,t,r,i){var a=t||[],o=r||Object.create(null),s=i||Object.create(null);n.forEach(function(u){A3(a,o,s,u)});for(var c=0,l=a.length;c<l;c++)a[c]==="*"&&(a.push(a.splice(c,1)[0]),l--,c--);return{pathList:a,pathMap:o,nameMap:s}}function A3(n,t,r,i,a,o){var s=i.path,c=i.name,l=i.pathToRegexpOptions||{},u=Rxe(s,a,l.strict);typeof i.caseSensitive=="boolean"&&(l.sensitive=i.caseSensitive);var d={path:u,regex:Ixe(u,l),components:i.components||{default:i.component},instances:{},name:c,parent:a,matchAs:o,redirect:i.redirect,beforeEnter:i.beforeEnter,meta:i.meta||{},props:i.props==null?{}:i.components?i.props:{default:i.props}};if(i.children&&i.children.forEach(function(f){var h=o?$u(o+"/"+f.path):void 0;A3(n,t,r,f,d,h)}),i.alias!==void 0){var p=Array.isArray(i.alias)?i.alias:[i.alias];p.forEach(function(f){var h={path:f,children:i.children};A3(n,t,r,h,a,d.path||"/")})}t[d.path]||(n.push(d.path),t[d.path]=d),c&&(r[c]||(r[c]=d))}function Ixe(n,t){var r=Mp(n,[],t);return r}function Rxe(n,t,r){return r||(n=n.replace(/\/$/,"")),n[0]==="/"||t==null?n:$u(t.path+"/"+n)}function vI(n,t,r,i){var a=typeof n=="string"?{path:n}:n;if(a.name||a._normalized)return a;if(!a.path&&a.params&&t){a=O3({},a),a._normalized=!0;var o=O3(O3({},t.params),a.params);if(t.name)a.name=t.name,a.params=o;else if(t.matched.length){var s=t.matched[t.matched.length-1].path;a.path=Y0(s,o,"path "+t.path)}return a}var c=wxe(a.path||""),l=t&&t.path||"/",u=c.path?uI(c.path,l,r||a.append):l,d=pxe(c.query,a.query,i&&i.options.parseQuery),p=a.hash||c.hash;return p&&p.charAt(0)!=="#"&&(p="#"+p),{_normalized:!0,path:u,query:d,hash:p}}function O3(n,t){for(var r in t)n[r]=t[r];return n}function Lxe(n,t){var r=gI(n),i=r.pathList,a=r.pathMap,o=r.nameMap;function s(p){gI(p,i,a,o)}function c(p,f,h){var m=vI(p,f,!1,t),g=m.name;if(g){var y=o[g];if(!y)return d(null,m);var b=y.regex.keys.filter(function(T){return!T.optional}).map(function(T){return T.name});if(typeof m.params!="object"&&(m.params={}),f&&typeof f.params=="object")for(var w in f.params)!(w in m.params)&&b.indexOf(w)>-1&&(m.params[w]=f.params[w]);if(y)return m.path=Y0(y.path,m.params),d(y,m,h)}else if(m.path){m.params={};for(var S=0;S<i.length;S++){var k=i[S],E=a[k];if(Fxe(E.regex,m.path,m.params))return d(E,m,h)}}return d(null,m)}function l(p,f){var h=p.redirect,m=typeof h=="function"?h(U0(p,f,null,t)):h;if(typeof m=="string"&&(m={path:m}),!m||typeof m!="object")return d(null,f);var g=m,y=g.name,b=g.path,w=f.query,S=f.hash,k=f.params;if(w=g.hasOwnProperty("query")?g.query:w,S=g.hasOwnProperty("hash")?g.hash:S,k=g.hasOwnProperty("params")?g.params:k,y)return o[y],c({_normalized:!0,name:y,query:w,hash:S,params:k},void 0,f);if(b){var E=Nxe(b,p),T=Y0(E,k);return c({_normalized:!0,path:T,query:w,hash:S},void 0,f)}else return d(null,f)}function u(p,f,h){var m=Y0(h,f.params),g=c({_normalized:!0,path:m});if(g){var y=g.matched,b=y[y.length-1];return f.params=g.params,d(b,f)}return d(null,f)}function d(p,f,h){return p&&p.redirect?l(p,h||f):p&&p.matchAs?u(p,f,p.matchAs):U0(p,f,h,t)}return{match:c,addRoutes:s}}function Fxe(n,t,r){var i=t.match(n);if(i){if(!r)return!0}else return!1;for(var a=1,o=i.length;a<o;++a){var s=n.keys[a-1],c=typeof i[a]=="string"?decodeURIComponent(i[a]):i[a];s&&(r[s.name]=c)}return!0}function Nxe(n,t){return uI(n,t.parent?t.parent.path:"/",!0)}var yI=Object.create(null);function bI(){window.history.replaceState({key:D3()},""),window.addEventListener("popstate",function(n){_I(),n.state&&n.state.key&&Uxe(n.state.key)})}function Pp(n,t,r,i){if(n.app){var a=n.options.scrollBehavior;a&&n.app.$nextTick(function(){var o=Bxe(),s=a(t,r,i?o:null);s&&(typeof s.then=="function"?s.then(function(c){CI(c,o)}).catch(function(c){}):CI(s,o))})}}function _I(){var n=D3();n&&(yI[n]={x:window.pageXOffset,y:window.pageYOffset})}function Bxe(){var n=D3();if(n)return yI[n]}function jxe(n,t){var r=document.documentElement,i=r.getBoundingClientRect(),a=n.getBoundingClientRect();return{x:a.left-i.left-t.x,y:a.top-i.top-t.y}}function wI(n){return Ip(n.x)||Ip(n.y)}function xI(n){return{x:Ip(n.x)?n.x:window.pageXOffset,y:Ip(n.y)?n.y:window.pageYOffset}}function zxe(n){return{x:Ip(n.x)?n.x:0,y:Ip(n.y)?n.y:0}}function Ip(n){return typeof n=="number"}function CI(n,t){var r=typeof n=="object";if(r&&typeof n.selector=="string"){var i=document.querySelector(n.selector);if(i){var a=n.offset&&typeof n.offset=="object"?n.offset:{};a=zxe(a),t=jxe(i,a)}else wI(n)&&(t=xI(n))}else r&&wI(n)&&(t=xI(n));t&&window.scrollTo(t.x,t.y)}var Rp=Hm&&function(){var n=window.navigator.userAgent;return(n.indexOf("Android 2.")!==-1||n.indexOf("Android 4.0")!==-1)&&n.indexOf("Mobile Safari")!==-1&&n.indexOf("Chrome")===-1&&n.indexOf("Windows Phone")===-1?!1:window.history&&"pushState"in window.history}(),Vxe=Hm&&window.performance&&window.performance.now?window.performance:Date,Wm=kI();function kI(){return Vxe.now().toFixed(3)}function D3(){return Wm}function Uxe(n){Wm=n}function K0(n,t){_I();var r=window.history;try{t?r.replaceState({key:Wm},"",n):(Wm=kI(),r.pushState({key:Wm},"",n))}catch{window.location[t?"replace":"assign"](n)}}function M3(n){K0(n,!0)}function SI(n,t,r){var i=function(a){a>=n.length?r():n[a]?t(n[a],function(){i(a+1)}):i(a+1)};i(0)}function Hxe(n){return function(t,r,i){var a=!1,o=0,s=null;TI(n,function(c,l,u,d){if(typeof c=="function"&&c.cid===void 0){a=!0,o++;var p=$I(function(g){Gxe(g)&&(g=g.default),c.resolved=typeof g=="function"?g:Um.extend(g),u.components[d]=g,o--,o<=0&&i()}),f=$I(function(g){var y="Failed to resolve async component "+d+": "+g;s||(s=k3(g)?g:new Error(y),i(s))}),h;try{h=c(p,f)}catch(g){f(g)}if(h)if(typeof h.then=="function")h.then(p,f);else{var m=h.component;m&&typeof m.then=="function"&&m.then(p,f)}}}),a||i()}}function TI(n,t){return EI(n.map(function(r){return Object.keys(r.components).map(function(i){return t(r.components[i],r.instances[i],r,i)})}))}function EI(n){return Array.prototype.concat.apply([],n)}var Wxe=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Gxe(n){return n.__esModule||Wxe&&n[Symbol.toStringTag]==="Module"}function $I(n){var t=!1;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];if(!t)return t=!0,n.apply(this,r)}}var Us=function(t,r){this.router=t,this.base=qxe(r),this.current=H0,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};Us.prototype.listen=function(t){this.cb=t},Us.prototype.onReady=function(t,r){this.ready?t():(this.readyCbs.push(t),r&&this.readyErrorCbs.push(r))},Us.prototype.onError=function(t){this.errorCbs.push(t)},Us.prototype.transitionTo=function(t,r,i){var a=this,o=this.router.match(t,this.current);this.confirmTransition(o,function(){a.updateRoute(o),r&&r(o),a.ensureURL(),a.ready||(a.ready=!0,a.readyCbs.forEach(function(s){s(o)}))},function(s){i&&i(s),s&&!a.ready&&(a.ready=!0,a.readyErrorCbs.forEach(function(c){c(s)}))})},Us.prototype.confirmTransition=function(t,r,i){var a=this,o=this.current,s=function(h){k3(h)&&(a.errorCbs.length?a.errorCbs.forEach(function(m){m(h)}):console.error(h)),i&&i(h)};if(sI(t,o)&&t.matched.length===o.matched.length)return this.ensureURL(),s();var c=Yxe(this.current.matched,t.matched),l=c.updated,u=c.deactivated,d=c.activated,p=[].concat(Zxe(u),this.router.beforeHooks,Jxe(l),d.map(function(h){return h.beforeEnter}),Hxe(d));this.pending=t;var f=function(h,m){if(a.pending!==t)return s();try{h(t,o,function(g){g===!1||k3(g)?(a.ensureURL(!0),s(g)):typeof g=="string"||typeof g=="object"&&(typeof g.path=="string"||typeof g.name=="string")?(s(),typeof g=="object"&&g.replace?a.replace(g):a.push(g)):m(g)})}catch(g){s(g)}};SI(p,f,function(){var h=[],m=function(){return a.current===t},g=Xxe(d,h,m),y=g.concat(a.router.resolveHooks);SI(y,f,function(){if(a.pending!==t)return s();a.pending=null,r(t),a.router.app&&a.router.app.$nextTick(function(){h.forEach(function(b){b()})})})})},Us.prototype.updateRoute=function(t){var r=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(i){i&&i(t,r)})};function qxe(n){if(!n)if(Hm){var t=document.querySelector("base");n=t&&t.getAttribute("href")||"/",n=n.replace(/^https?:\/\/[^\/]+/,"")}else n="/";return n.charAt(0)!=="/"&&(n="/"+n),n.replace(/\/$/,"")}function Yxe(n,t){var r,i=Math.max(n.length,t.length);for(r=0;r<i&&n[r]===t[r];r++);return{updated:t.slice(0,r),activated:t.slice(r),deactivated:n.slice(r)}}function P3(n,t,r,i){var a=TI(n,function(o,s,c,l){var u=Kxe(o,t);if(u)return Array.isArray(u)?u.map(function(d){return r(d,s,c,l)}):r(u,s,c,l)});return EI(i?a.reverse():a)}function Kxe(n,t){return typeof n!="function"&&(n=Um.extend(n)),n.options[t]}function Zxe(n){return P3(n,"beforeRouteLeave",AI,!0)}function Jxe(n){return P3(n,"beforeRouteUpdate",AI)}function AI(n,t){if(t)return function(){return n.apply(t,arguments)}}function Xxe(n,t,r){return P3(n,"beforeRouteEnter",function(i,a,o,s){return Qxe(i,o,s,t,r)})}function Qxe(n,t,r,i,a){return function(s,c,l){return n(s,c,function(u){l(u),typeof u=="function"&&i.push(function(){OI(u,t.instances,r,a)})})}}function OI(n,t,r,i){t[r]?n(t[r]):i()&&setTimeout(function(){OI(n,t,r,i)},16)}var DI=function(n){function t(r,i){var a=this;n.call(this,r,i);var o=r.options.scrollBehavior;o&&bI();var s=Gm(this.base);window.addEventListener("popstate",function(c){var l=a.current,u=Gm(a.base);a.current===H0&&u===s||a.transitionTo(u,function(d){o&&Pp(r,d,l,!0)})})}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.go=function(i){window.history.go(i)},t.prototype.push=function(i,a,o){var s=this,c=this,l=c.current;this.transitionTo(i,function(u){K0($u(s.base+u.fullPath)),Pp(s.router,u,l,!1),a&&a(u)},o)},t.prototype.replace=function(i,a,o){var s=this,c=this,l=c.current;this.transitionTo(i,function(u){M3($u(s.base+u.fullPath)),Pp(s.router,u,l,!1),a&&a(u)},o)},t.prototype.ensureURL=function(i){if(Gm(this.base)!==this.current.fullPath){var a=$u(this.base+this.current.fullPath);i?K0(a):M3(a)}},t.prototype.getCurrentLocation=function(){return Gm(this.base)},t}(Us);function Gm(n){var t=window.location.pathname;return n&&t.indexOf(n)===0&&(t=t.slice(n.length)),(t||"/")+window.location.search+window.location.hash}var MI=function(n){function t(r,i,a){n.call(this,r,i),!(a&&e5e(this.base))&&PI()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var i=this,a=this.router,o=a.options.scrollBehavior,s=Rp&&o;s&&bI(),window.addEventListener(Rp?"popstate":"hashchange",function(){var c=i.current;PI()&&i.transitionTo(Z0(),function(l){s&&Pp(i.router,l,c,!0),Rp||J0(l.fullPath)})})},t.prototype.push=function(i,a,o){var s=this,c=this,l=c.current;this.transitionTo(i,function(u){II(u.fullPath),Pp(s.router,u,l,!1),a&&a(u)},o)},t.prototype.replace=function(i,a,o){var s=this,c=this,l=c.current;this.transitionTo(i,function(u){J0(u.fullPath),Pp(s.router,u,l,!1),a&&a(u)},o)},t.prototype.go=function(i){window.history.go(i)},t.prototype.ensureURL=function(i){var a=this.current.fullPath;Z0()!==a&&(i?II(a):J0(a))},t.prototype.getCurrentLocation=function(){return Z0()},t}(Us);function e5e(n){var t=Gm(n);if(!/^\/#/.test(t))return window.location.replace($u(n+"/#"+t)),!0}function PI(){var n=Z0();return n.charAt(0)==="/"?!0:(J0("/"+n),!1)}function Z0(){var n=window.location.href,t=n.indexOf("#");return t===-1?"":n.slice(t+1)}function I3(n){var t=window.location.href,r=t.indexOf("#"),i=r>=0?t.slice(0,r):t;return i+"#"+n}function II(n){Rp?K0(I3(n)):window.location.hash=n}function J0(n){Rp?M3(I3(n)):window.location.replace(I3(n))}var t5e=function(n){function t(r,i){n.call(this,r,i),this.stack=[],this.index=-1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.push=function(i,a,o){var s=this;this.transitionTo(i,function(c){s.stack=s.stack.slice(0,s.index+1).concat(c),s.index++,a&&a(c)},o)},t.prototype.replace=function(i,a,o){var s=this;this.transitionTo(i,function(c){s.stack=s.stack.slice(0,s.index).concat(c),a&&a(c)},o)},t.prototype.go=function(i){var a=this,o=this.index+i;if(!(o<0||o>=this.stack.length)){var s=this.stack[o];this.confirmTransition(s,function(){a.index=o,a.updateRoute(s)})}},t.prototype.getCurrentLocation=function(){var i=this.stack[this.stack.length-1];return i?i.fullPath:"/"},t.prototype.ensureURL=function(){},t}(Us),yr=function(t){t===void 0&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Lxe(t.routes||[],this);var r=t.mode||"hash";switch(this.fallback=r==="history"&&!Rp&&t.fallback!==!1,this.fallback&&(r="hash"),Hm||(r="abstract"),this.mode=r,r){case"history":this.history=new DI(this,t.base);break;case"hash":this.history=new MI(this,t.base,this.fallback);break;case"abstract":this.history=new t5e(this,t.base);break}},RI={currentRoute:{configurable:!0}};yr.prototype.match=function(t,r,i){return this.matcher.match(t,r,i)},RI.currentRoute.get=function(){return this.history&&this.history.current},yr.prototype.init=function(t){var r=this;if(this.apps.push(t),!this.app){this.app=t;var i=this.history;if(i instanceof DI)i.transitionTo(i.getCurrentLocation());else if(i instanceof MI){var a=function(){i.setupListeners()};i.transitionTo(i.getCurrentLocation(),a,a)}i.listen(function(o){r.apps.forEach(function(s){s._route=o})})}},yr.prototype.beforeEach=function(t){return R3(this.beforeHooks,t)},yr.prototype.beforeResolve=function(t){return R3(this.resolveHooks,t)},yr.prototype.afterEach=function(t){return R3(this.afterHooks,t)},yr.prototype.onReady=function(t,r){this.history.onReady(t,r)},yr.prototype.onError=function(t){this.history.onError(t)},yr.prototype.push=function(t,r,i){this.history.push(t,r,i)},yr.prototype.replace=function(t,r,i){this.history.replace(t,r,i)},yr.prototype.go=function(t){this.history.go(t)},yr.prototype.back=function(){this.go(-1)},yr.prototype.forward=function(){this.go(1)},yr.prototype.getMatchedComponents=function(t){var r=t?t.matched?t:this.resolve(t).route:this.currentRoute;return r?[].concat.apply([],r.matched.map(function(i){return Object.keys(i.components).map(function(a){return i.components[a]})})):[]},yr.prototype.resolve=function(t,r,i){var a=vI(t,r||this.history.current,i,this),o=this.match(a,r),s=o.redirectedFrom||o.fullPath,c=this.history.base,l=n5e(c,s,this.mode);return{location:a,route:o,href:l,normalizedTo:a,resolved:o}},yr.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==H0&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(yr.prototype,RI);function R3(n,t){return n.push(t),function(){var r=n.indexOf(t);r>-1&&n.splice(r,1)}}function n5e(n,t,r){var i=r==="hash"?"#"+t:t;return n?$u(n+"/"+i):i}yr.install=T3,yr.version="3.0.1",Hm&&window.Vue&&window.Vue.use(yr);const r5e=[{name:"form",path:"/form",component:()=>Promise.resolve().then(()=>tft),props:!0,meta:{mode:"modal",placement:"center",width:"100vw",height:"100vh"}},{name:"document",path:"/document",component:()=>Promise.resolve().then(()=>zXe),props:!0,meta:{mode:"modal",placement:"center",width:"100vw",height:"100vh",scroll:!0}},{name:"send",path:"/send",component:()=>Promise.resolve().then(()=>sft),props:!0,meta:{mode:"drawer",placement:"right",width:620,height:"100%"}},{name:"print",path:"/print",component:()=>Promise.resolve().then(()=>vft),props:!0,meta:{mode:"modal",placement:"center",width:400}},{name:"sendReminder",path:"/sendReminder",component:()=>Promise.resolve().then(()=>$ft),props:!0,meta:{mode:"modal",placement:"center",width:400}},{name:"timeline",path:"/timeline",component:()=>Promise.resolve().then(()=>Qft),props:!0,meta:{mode:"modal",width:400}},{name:"receipt",path:"/receipt",component:()=>Promise.resolve().then(()=>cht),props:!0,meta:{mode:"modal",width:600}},{name:"clientLinks",path:"/clientLinks",component:()=>Promise.resolve().then(()=>mht),props:!0,meta:{mode:"modal",width:400}},{name:"documentClient",path:"/documentClient",component:()=>Promise.resolve().then(()=>Dht),props:!0,meta:{mode:"modal",placement:"center",width:"100vw",height:"100vh"}},{name:"setup",path:"/setup",component:()=>Promise.resolve().then(()=>Fht),props:!0,meta:{mode:"modal",placement:"center",width:"500px",height:"700px"}},{name:"docAnswer",path:"/docAnswer",component:()=>Promise.resolve().then(()=>Uht),props:!0,meta:{mode:"modal",placement:"center",width:420}},{name:"docDetails",path:"/docDetails",component:()=>Promise.resolve().then(()=>lmt),props:!0,meta:{mode:"drawer",placement:"right",width:540,height:"100%"}}];Ne.use(yr);const Hs=new yr({mode:"abstract",routes:r5e}),mn=Ne.observable({_openViews:[],_styleVars:{},get openViews(){return this._openViews},get view(){var n;return this.open&&((n=Hs.currentRoute)==null?void 0:n.name)||null},get language(){return Be.lang},get locale(){return Be.locale},get styleVars(){return this._styleVars},set styleVars(n){this._styleVars={...n}},addView({key:n,view:t,mode:r,viewOpts:i}){const a={view:t,mode:r,key:n,viewOpts:i};if(["modal","drawer"].includes(r)&&Hs.push({name:t,params:i}),r==="mount"){const{routes:o}=Hs.options||[];if(!o.map(c=>c.name).includes(t))throw new Error(`View ${t} not supported`);const s=o.find(c=>c.name===t);a.viewOpts={component:s.component,...i}}this._openViews.push(a),Tr.trigger("ui:open",{key:n,view:t,mode:r})},removeView({key:n,view:t,mode:r}){const i=this._openViews.findIndex(a=>a.key===n&&a.mode===r&&a.view===t);if(r==="mount"){const a=document.getElementById(`${n}-${r}-${t}`);a&&(a.textContent="")}i>-1&&this._openViews.splice(i,1),["modal","drawer"].includes(r)&&Hs.push("/"),Tr.trigger("ui:close",{key:n,mode:r,view:t})},removeAllOverlayViews(){var n,t,r,i;(r=(t=(n=Ne.prototype)==null?void 0:n.$modal)==null?void 0:t.hideAll)==null||r.call(t),(i=this._openViews.filter(a=>a.mode==="modal"||a.mode==="dynamicModal"||a.mode==="drawer"))==null||i.forEach(a=>this.removeView(a))},setLanguage(n){Be.i18next.changeLanguage(n,!0)},setLocale(n){Be.l10n.changeLocale(n,!0)},on(n,t){if(!["open","close","document.block.answer.visible"].includes(n))throw new Error(`Event ${n} not supported`);return Tr.on(`ui:${n}`,t)}});var i5e=up,a5e=zs,o5e="[object Symbol]";function s5e(n){return typeof n=="symbol"||a5e(n)&&i5e(n)==o5e}var X0=s5e,l5e=Jo,c5e=X0,u5e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d5e=/^\w*$/;function p5e(n,t){if(l5e(n))return!1;var r=typeof n;return r=="number"||r=="symbol"||r=="boolean"||n==null||c5e(n)?!0:d5e.test(n)||!u5e.test(n)||t!=null&&n in Object(t)}var L3=p5e,LI=m4,f5e="Expected a function";function F3(n,t){if(typeof n!="function"||t!=null&&typeof t!="function")throw new TypeError(f5e);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],o=r.cache;if(o.has(a))return o.get(a);var s=n.apply(this,i);return r.cache=o.set(a,s)||o,s};return r.cache=new(F3.Cache||LI),r}F3.Cache=LI;var h5e=F3,m5e=h5e,g5e=500;function v5e(n){var t=m5e(n,function(i){return r.size===g5e&&r.clear(),i}),r=t.cache;return t}var y5e=v5e,b5e=y5e,_5e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w5e=/\\(\\)?/g,x5e=b5e(function(n){var t=[];return n.charCodeAt(0)===46&&t.push(""),n.replace(_5e,function(r,i,a,o){t.push(a?o.replace(w5e,"$1"):i||r)}),t}),C5e=x5e;function k5e(n,t){for(var r=-1,i=n==null?0:n.length,a=Array(i);++r<i;)a[r]=t(n[r],r,n);return a}var N3=k5e,FI=cp,S5e=N3,T5e=Jo,E5e=X0,$5e=1/0,NI=FI?FI.prototype:void 0,BI=NI?NI.toString:void 0;function jI(n){if(typeof n=="string")return n;if(T5e(n))return S5e(n,jI)+"";if(E5e(n))return BI?BI.call(n):"";var t=n+"";return t=="0"&&1/n==-$5e?"-0":t}var A5e=jI,O5e=A5e;function D5e(n){return n==null?"":O5e(n)}var M5e=D5e,P5e=Jo,I5e=L3,R5e=C5e,L5e=M5e;function F5e(n,t){return P5e(n)?n:I5e(n,t)?[n]:R5e(L5e(n))}var Lp=F5e,N5e=X0,B5e=1/0;function j5e(n){if(typeof n=="string"||N5e(n))return n;var t=n+"";return t=="0"&&1/n==-B5e?"-0":t}var Fp=j5e,z5e=Lp,V5e=Fp;function U5e(n,t){t=z5e(t,n);for(var r=0,i=t.length;n!=null&&r<i;)n=n[V5e(t[r++])];return r&&r==i?n:void 0}var Q0=U5e,H5e=v4,W5e=Lp,G5e=_4,zI=Zo,q5e=Fp;function Y5e(n,t,r,i){if(!zI(n))return n;t=W5e(t,n);for(var a=-1,o=t.length,s=o-1,c=n;c!=null&&++a<o;){var l=q5e(t[a]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return n;if(a!=s){var d=c[l];u=i?i(d,l,c):void 0,u===void 0&&(u=zI(d)?d:G5e(t[a+1])?[]:{})}H5e(c,l,u),c=c[l]}return n}var VI=Y5e,K5e=Q0,Z5e=VI,J5e=Lp;function X5e(n,t,r){for(var i=-1,a=t.length,o={};++i<a;){var s=t[i],c=K5e(n,s);r(c,s)&&Z5e(o,J5e(s,n),c)}return o}var Q5e=X5e;function e4e(n,t){return n!=null&&t in Object(n)}var t4e=e4e,n4e=Lp,r4e=y4,i4e=Jo,a4e=_4,o4e=w4,s4e=Fp;function l4e(n,t,r){t=n4e(t,n);for(var i=-1,a=t.length,o=!1;++i<a;){var s=s4e(t[i]);if(!(o=n!=null&&r(n,s)))break;n=n[s]}return o||++i!=a?o:(a=n==null?0:n.length,!!a&&o4e(a)&&a4e(s,a)&&(i4e(n)||r4e(n)))}var c4e=l4e,u4e=t4e,d4e=c4e;function p4e(n,t){return n!=null&&d4e(n,t,u4e)}var UI=p4e,f4e=Q5e,h4e=UI;function m4e(n,t){return f4e(n,t,function(r,i){return h4e(n,i)})}var g4e=m4e,HI=cp,v4e=y4,y4e=Jo,WI=HI?HI.isConcatSpreadable:void 0;function b4e(n){return y4e(n)||v4e(n)||!!(WI&&n&&n[WI])}var _4e=b4e,w4e=E4,x4e=_4e;function GI(n,t,r,i,a){var o=-1,s=n.length;for(r||(r=x4e),a||(a=[]);++o<s;){var c=n[o];t>0&&r(c)?t>1?GI(c,t-1,r,i,a):w4e(a,c):i||(a[a.length]=c)}return a}var qI=GI,C4e=qI;function k4e(n){var t=n==null?0:n.length;return t?C4e(n,1):[]}var S4e=k4e;function T4e(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}var E4e=T4e,$4e=E4e,YI=Math.max;function A4e(n,t,r){return t=YI(t===void 0?n.length-1:t,0),function(){for(var i=arguments,a=-1,o=YI(i.length-t,0),s=Array(o);++a<o;)s[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=r(s),$4e(n,this,c)}}var KI=A4e;function O4e(n){return function(){return n}}var D4e=O4e;function M4e(n){return n}var B3=M4e,P4e=D4e,ZI=CD,I4e=B3,R4e=ZI?function(n,t){return ZI(n,"toString",{configurable:!0,enumerable:!1,value:P4e(t),writable:!0})}:I4e,L4e=R4e,F4e=800,N4e=16,B4e=Date.now;function j4e(n){var t=0,r=0;return function(){var i=B4e(),a=N4e-(i-r);if(r=i,a>0){if(++t>=F4e)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}var z4e=j4e,V4e=L4e,U4e=z4e,H4e=U4e(V4e),JI=H4e,W4e=S4e,G4e=KI,q4e=JI;function Y4e(n){return q4e(G4e(n,void 0,W4e),n+"")}var XI=Y4e,K4e=g4e,Z4e=XI,J4e=Z4e(function(n,t){return n==null?{}:K4e(n,t)}),X4e=J4e;const Q4e=cn(X4e);var e3e=R4,t3e=1,n3e=4;function r3e(n){return e3e(n,t3e|n3e)}var i3e=r3e;const Ws=cn(i3e);class qm extends Error{constructor(r={}){super(r);Pn(this,"isCustom",!0);Pn(this,"code",null);Pn(this,"httpStatusCode",null);Pn(this,"payload",{code:null,fallbackCode:null,string:null,object:null,objectId:null,action:null,actionPayload:null,retries:0,axios:null,showMessage:!0});typeof r.stack=="string"&&(this.stack=r.stack.replace(/.*\n/i,`${this.constructor.name}: ${r.message}
|
|
436
|
-
`))}add(r){return this.payload={...this.payload,...r},this}getPayload(){return this.payload}setErrorCodeFromResponse(){const{data:r,status:i}=this.getPayload().axios||{};if(!r&&!i)return;const{errorCode:a}=r||{};a&&this.add({code:a}),i&&(this.httpStatusCode=i)}setMessageFromResponse(){const{data:r}=this.getPayload().axios||{};if(!r)return!1;const{message:i}=r||{};return i?(this.message=i,!0):!1}}class QI extends qm{constructor(t){if(super(t),this.name="NotFoundError",this.message=typeof t=="string"||!t?t:t.message,typeof t=="string"||!t)return;const{response:r}=t;this.add({axios:r}),this.setErrorCodeFromResponse()}}class eR extends qm{constructor(t){if(super(t),this.name="ForbiddenError",this.message=typeof t=="string"||!t?t:t.message,typeof t=="string"||!t)return;const{response:r}=t;this.add({axios:r}),this.setErrorCodeFromResponse(),this.setMessageFromResponse()}}class tR extends qm{constructor(t){if(super(t),this.name="ValidationError",this.message=typeof t=="string"||!t?t:t.message,typeof t=="string"||!t)return;const{response:r}=t;this.add({axios:r}),this.setErrorCodeFromResponse(),this.setMessageFromResponse()}}class nR extends qm{constructor(t){if(super(t),this.name="NetworkError",this.message=typeof t=="string"||!t?t:t.message,typeof t=="string"||!t)return;const{config:r}=t;this.add({axios:r}),this.code="ECONNREFUSED"}}class j3 extends qm{constructor(t){if(super(t),this.name="GeneralError",this.message=typeof t=="string"||!t?t:t.message,typeof t=="string"||!t)return;const{response:r}=t;this.add({axios:r}),this.setErrorCodeFromResponse(),this.setMessageFromResponse()}}const rR=Object.freeze(Object.defineProperty({__proto__:null,ForbiddenError:eR,GeneralError:j3,NetworkError:nR,NotFoundError:QI,ValidationError:tR},Symbol.toStringTag,{value:"Module"})),a3e=n=>{const t=Object.keys(n);let r="";return t.forEach(i=>{const a=typeof n[i]=="object",o=a&&n[i].length>=0;a||(r+=`${i}=${n[i]}&`),a&&o&&n[i].forEach(s=>{r+=`${i}=${s}&`})}),r&&r.slice(0,-1)},iR=n=>{z3.push(n)},o3e=n=>{z3.map(t=>t(n))};function aR(){console.error("User should be logged out!!"),mt.removeItem("token"),mt.removeItem("tokenExpires"),mt.removeItem("refreshToken"),Tr.trigger("user:unauthorized",{error})}let Ym=!1,z3=[];const s3e=(n,{renewToken:t})=>{n.interceptors.request.use(r=>{const i=r;if(i.url.includes("/auth")||i.url.startsWith("/public/"))return i;const a=i.headers["X-TOKEN"];if(!a)return i;const o=mt.getItem("tokenExpires");if(a&&o){const s=new Date;s.setSeconds(s.getSeconds()+30);const c=new Date(o);if(s>c)return t(),new Promise(u=>{iR(d=>{i.headers["X-TOKEN"]=d,u(i)})})}return i},r=>Promise.reject(r))},l3e=(n,{renewToken:t})=>{n.interceptors.response.use(r=>r,r=>{if(!r||!r.response)return Promise.reject(r);const{config:i,response:a}=r,{status:o,data:s}=a,{errorCode:c}=s,l=i;if(l.url.startsWith("/public/"))return Promise.reject(r);function u(){if(c===8001)return!0;const d=mt.getItem("tokenExpires");if(d){const p=new Date,f=new Date(d);return p>f}return!1}if(o===401&&l.headers["X-TOKEN"]&&u()&&!Ym)return t(),new Promise(p=>{iR(f=>{l.headers["X-TOKEN"]=f,p(gi(l))})});if(o===401&&typeof c>"u"){if(l.url.includes("auth/companyUser")&&!l.headers["X-TOKEN"])return Promise.reject(r);if(l.url.includes("auth/actionlink")&&!l.headers["X-TOKEN"])return Promise.reject(r);aR()}return Promise.reject(r)})},oR=n=>(v0(n.data),n),c3e=n=>{n.interceptors.response.use(oR,t=>{const{response:r,config:i}=t;if(!r)throw new nR(t);if(Object.prototype.hasOwnProperty.call(i,"errorHandle")&&i.errorHandle===!1)return Promise.reject(t);const{status:a}=r;switch(a){case 404:throw new QI(t);case 401:throw new eR(t);case 412:throw new tR(t);default:throw new j3(t)}})},u3e=n=>{n.interceptors.response.use(t=>{var r,i;if((i=(r=t.config)==null?void 0:r.url)!=null&&i.includes("document")&&t.config.method==="post"){const a=JSON.parse(t.config.data);a.__tempId&&(t.data.__tempId=a.__tempId)}return t},t=>Promise.reject(t))},d3e=n=>{n.interceptors.request.use(t=>{if(["post","put"].includes(t.method)&&t.data&&!(t.data instanceof FormData)){const r=Ws(t.data);N4(r),t.data=r}return t},t=>Promise.reject(t))},p3e=({baseUrl:n,withCredentials:t,cache:r})=>{const i=gi.create({baseURL:n,timeout:2e4,adapter:r,withCredentials:t,paramsSerializer:p=>a3e(p)});i.defaults.headers["X-CLIENT"]="widget",i.defaults.headers["X-CLIENT-VERSION"]="0.12.0";const a=async(p,f,h=null,m={})=>{const g=f.startsWith("/public/"),y=mt.getItem("token");switch(y&&!g&&(i.defaults.headers["X-TOKEN"]=y),p){case"get":return i.get(f,m);case"post":return i.post(f,h,m);case"put":return i.put(f,h,m);case"delete":return i.delete(f,m);case"patch":return i.patch(f,h,m);default:throw new Error(`SendRequest failed as method: '${p}' is not implemented`)}},o=(p,f={})=>a("get",p,null,f),s=(p,f={},h={})=>a("put",p,f,h),c=(p,f,h={})=>a("post",p,f,h),l=(p,f={})=>a("delete",p,null,f),u=(p,f={})=>a("patch",p,null,f),d=async()=>{if(!Ym)try{Ym=!0;const p=mt.getItem("refreshToken"),f=await c("/auth/companyUser",{refreshToken:p});if(!f.data||!f.data.token)throw new Error("No token was defined in result");const{token:h,tokenExpires:m,refreshToken:g}=f.data;mt.setItem("token",h),mt.setItem("tokenExpires",m),g&&mt.setItem("refreshToken",g),Ym=!1,o3e(h),z3=[]}catch(p){return console.error(p),aR()}finally{Ym=!1}};return s3e(i,{renewToken:d}),l3e(i,{renewToken:d}),oR(i),c3e(i),d3e(i),u3e(i),{instance:i,get:o,put:s,post:c,del:l,patch:u,renewToken:d}},V3=new Map;function f3e(n){if(typeof n>"u")throw new Error("Missing valid parameter url");if(typeof n!="string")throw new Error("Parameter url must be a string");const{data:t,cachedAt:r,expiresAt:i}=V3.get(n)||{};return Date.now()>r+6e4*30||i&&Date.now()>i?(V3.delete(n),null):t}const h3e=async n=>{const{url:t,params:r={}}=n,i=Object.keys(r).map(s=>`${s}=${r[s]}`).join("&"),a=`${t}${i?`?${i}`:""}`;return f3e(a),await gi({...n,adapter:gi.defaults.adapter})},Np={withCredentials:!0,baseUrl:Xe.api.baseUrl},{get:xt,post:rn,put:Vr,patch:Qo,del:qi,instance:X9t,renewToken:m3e}=p3e({withCredentials:Np.withCredentials,baseUrl:Np.baseUrl,cache:h3e});async function sR(n){const t=z1e(n);return xt(`/project${t}`,{saveCache:!0})}const g3e=async(n,t={})=>xt("/project",n,{params:t}),v3e=async(n,t={})=>xt(`/project/${n}`,{params:t,saveCache:!0}),y3e=async(n,t,r={})=>Vr(`/project/${n}`,t,{params:r,invalidateCache:{type:"project",id:n}}),b3e=async n=>Qo(`/project/${n}`),_3e=async(n,t={})=>qi(`/project/${n}`,{params:t,invalidateCache:{type:"project",id:n}}),w3e=async()=>xt("/project/createDemo"),x3e=()=>xt("/"),C3e=async(n,t={})=>rn("/auth/actionlink",{token:n,...t}),k3e=async n=>rn("/register",n),S3e=async(n,t)=>rn("/companyUser/forgottenPassword/new",{password:n,resetPasswordToken:t}),T3e=async n=>rn("/public/consent",n),E3e=async n=>xt(`/projectFile/${n}`),$3e=async n=>rn("/projectFile",n),A3e=async(n,t)=>Vr(`/projectFile/${n}`,t),O3e=async n=>qi(`/projectFile/${n}`),D3e=async n=>Qo(`/projectFile/${n}`),M3e=async(n,t={})=>xt(`/projectNote/${n}`,{params:t}),P3e=async(n,t={})=>rn("/projectNote",n,{params:t}),I3e=async(n,t,r={})=>Vr(`/projectNote/${n}`,t,{params:r}),R3e=async n=>xt(`/file/${n}`),lR=async n=>rn("/file",n),L3e=async(n,t)=>Vr(`/file/${n}`,t),F3e=async n=>qi(`/file/${n}`),N3e=async n=>Qo(`/file/${n}`),B3e=async(n={})=>xt("/article",{params:n}),j3e=async n=>xt(`/article/${n}`),z3e=async n=>rn("/article",n),V3e=async(n,t)=>Vr(`/article/${n}`,t),U3e=async n=>qi(`/article/${n}`),H3e=async n=>Qo(`/article/${n}`),W3e=async n=>rn("/search",{type:"article",query:n}),Km={get:async(n,t={})=>xt(n?`/unitType/${n}`:"/unitType",{params:t,saveCache:!0}),post:async(n,t={})=>rn("/unitType",n,{params:t}),put:async(n,t,r={})=>Vr(`/unitType/${n}`,t,{params:r,invalidateCache:{type:"unitType",id:n}}),delete:async(n,t={})=>qi(`/unitType/${n}`,{params:t,invalidateCache:{type:"unitType",id:n}})},G3e=async(n={})=>xt("/templateMessage",{params:n,saveCache:!0}),q3e=async(n,t={})=>xt(`/templateMessage/${n}`,{params:t,saveCache:!0}),Y3e=async(n,t={})=>rn("/templateMessage",n,{params:t}),K3e=async(n,t,r={})=>Vr(`/templateMessage/${n}`,t,{params:r,invalidateCache:{type:"templateMessage",id:n}}),Z3e=async(n,t={})=>qi(`/templateMessage/${n}`,{params:t,invalidateCache:{type:"templateMessage",id:n}}),J3e=async(n,t={})=>Qo(`/templateMessage/${n}`,{params:t}),X3e=async(n={})=>xt("/endCustomer",{params:n}),Q3e=async(n,t={})=>xt(`/endCustomer/${n}`,{params:t}),eCe=async(n,t={})=>rn("/endCustomer",n,{params:t}),tCe=async(n,t,r={})=>Vr(`/endCustomer/${n}`,t,{params:r}),nCe=async(n,t={})=>qi(`/endCustomer/${n}`,{params:t}),rCe=async(n,t={})=>Qo(`/endCustomer/${n}`,{params:t}),iCe=async(n={})=>xt("/companyUser",{params:n,saveCache:!0}),aCe=async(n,t={})=>xt(`/companyUser/${n}`,{params:t,saveCache:!0}),oCe=async(n,t={})=>rn("/companyUser",n,{params:t}),sCe=async(n,t,r={})=>Vr(`/companyUser/${n}`,t,{params:r,invalidateCache:{type:"companyUser",id:n}}),lCe=async(n,t={})=>qi(`/companyUser/${n}`,{params:t,invalidateCache:{type:"companyUser",id:n}}),cCe=async(n,t={})=>Qo(`/companyUser/${n}`,{params:t}),cR={getPublic:async(n,t={})=>xt(`/public/companyUser/${n}`,{params:t}),getConnectedUsers:async(n={})=>xt("/companyUser/self/connectedUsers",{params:n}),getConnectedUserAuth:async(n,t={})=>xt(`/companyUser/self/connectedUsers/${n}/auth`,{params:t}),setConnectedUserDefault:async(n,t={})=>Vr(`/companyUser/self/connectedUsers/${n}/setDefaultAuth`,{params:t}),verifyEmail:async(n,t={})=>rn("/public/verifyEmail/companyUser",n,{params:t})},uCe=async(n,t=null,r={})=>Vr(`/companyAccount/accountType/${n}`,t,{params:r}),dCe=async(n={})=>xt("/companyAccount/getNumberOfManagers",{params:n}),pCe=async(n={})=>rn("/companyAccount/addUserLicenseInvoice",{},{params:n}),fCe=async(n,t={})=>xt(`/promotionCode/${n}/canUse`,{params:t}),hCe=async(n,t={})=>xt("/promotionCode/inUse",{params:t}),ey={product:async(n,t={})=>rn("/companyAccount/product",n,{params:t}),cancelAll:async(n={})=>qi("/companyAccount/subscription",{params:n}),getPrices:async(n={})=>xt("/companyAccount/price",{params:n}),getUpcomingInvoices:async(n={})=>xt("/companyAccount/upcomingInvoice",{params:n}),getPaymentHistory:async(n={})=>xt("/companyAccount/paymentHistory",{params:n}),putPaymentMethod:async(n,t={})=>Vr("/companyAccount/paymentMethod",n,{params:t}),putCustomer:async(n,t={})=>Vr("/companyAccount/customer",n,{params:t}),createCheckoutSession:async(n,t={})=>rn("/companyAccount/create-checkout-session",n,{params:t})},mCe=async(n,t)=>rn(`/project/${n}/projectMember/${t}`,null,{invalidateCache:{type:"project",id:n}}),gCe=async(n,t)=>qi(`/project/${n}/projectMember/${t}`,{invalidateCache:{type:"project",id:n}}),Yi={get:async(n,t={})=>xt(`/document/${n}`,{params:t,saveCache:!0}),getAll:async(n={})=>xt("/document",{params:n,saveCache:!0}),post:async(n,t={})=>rn("/document",n,{params:t}),send:async(n,t={},r={})=>rn(`/document/${n}/send`,t,{params:r,invalidateCache:{type:"document",id:n}}),clearAnswers:async(n,t={},r={})=>rn(`/document/${n}/clearAnswers`,t,{params:r,invalidateCache:{type:"document",id:n}}),put:async(n,t,r={})=>Vr(`/document/${n}`,t,{params:r,invalidateCache:{type:"document",id:n}}),delete:async(n,t={})=>qi(`/document/${n}`,{params:t,invalidateCache:{type:"document",id:n}}),patch:async(n,t={})=>Qo(`/document/${n}`,{params:t}),validate:async(n,t={})=>rn("/documentValidate",n,{params:t})},Jl={get:async(n,t={})=>xt(n?`/template/${n}`:"/template",{params:t}),post:async(n,t={})=>rn("/template",n,{params:t}),put:async(n,t,r={})=>Vr(`/template/${n}`,t,{params:r}),delete:async(n,t={})=>qi(`/template/${n}`,{params:t}),patch:async(n,t={})=>Qo(`/template/${n}`,{params:t})},U3={get:async(n={})=>xt("/templateGallery",{params:n})},vCe={get:async(n,t={})=>xt(`/public/templateStat/${n}`,{params:t})},Bp={get:async(n,t={})=>xt(`/public/document/${n}`,{params:t}),put:async(n,t,r={})=>Vr(`/public/document/${n}`,t,{headers:r}),answer:async(n,t,r={},i={})=>rn(`/public/document/${n}/answer`,t,{params:r,headers:i}),feedback:async(n,t,r={})=>rn(`/public/document/${n}/feedback`,t,{params:r})},uR={get:async(n,t={})=>xt(`/public/pdfJob/${n}`,{params:t}),addDocument:async(n,t={})=>xt(`/public/document/${n}/pdfJob/start`,{params:t})},dR={getDocuments:async(n={})=>{const t=mt.getItem("clientToken");return gi.get(`${Np.baseUrl}/client/document`,{headers:{Authorization:t},params:n})},requestMagicLink:async(n,t={})=>gi.post(`${Np.baseUrl}/client/requestMagicLink`,n,{params:t})},ty={get:async(n,t={})=>xt(`/public/company/${n}`,{params:t}),getCertificates:async(n,t={})=>xt(`/public/company/${n}/certificates`,{params:t}),getReferences:async(n,t={})=>xt(`/public/company/${n}/references`,{params:t})},yCe={get:async(n,t={})=>xt(`${Np.baseUrl}/public/signature/${n}`,{params:t})},H3={post:async(n,t={})=>rn("/voucher",n,{params:t}),canUse:async(n,t={})=>xt(`/voucher/${n}/canUse`,{params:t})},Xl={getAuthUrl:async(n,t={})=>xt("/extension/authUrl",{params:{...t,service:n}}),getPublicAuthUrl:async(n,t={})=>xt("/public/extension/authUrl",{params:{...t,service:n}}),install:async(n,t,r={})=>rn("/extension/install",t,{params:{...r,service:n}}),uninstall:async(n,t={})=>qi("/extension/uninstall",{params:{...t,service:n}}),suggestClients:async(n,t={})=>xt("/extension/suggestClients",{params:{...t,service:n},saveCache:!0,cacheTtl:20}),signupWithCrm:async(n,t,r={})=>rn("/public/extension/register",t,{params:{...r,service:n}}),search:async(n,t={})=>xt("/extension/search",{params:{...t,service:n},saveCache:!0,cacheTtl:10}),getFields:async(n,t={})=>xt("/extension/fields",{params:{...t,service:n},saveCache:!0,cacheTtl:60}),getExternalReferenceDetails:async(n,t={})=>xt("/extension/externalReferenceDetails",{params:{...t,service:n},saveCache:!0,cacheTtl:20}),settings:async(n,t={})=>xt("/extension/settings",{params:{...t,service:n}})},ni={get:xt,post:rn,put:Vr,del:qi,patch:Qo,authData:Np,getProjects:sR};var pR={exports:{}};(function(n,t){(function(r,i){n.exports=i()})(Zt,function(){return function(r){var i={};function a(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return r[o].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=r,a.c=i,a.d=function(o,s,c){a.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:c})},a.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,s){if(1&s&&(o=a(o)),8&s||4&s&&typeof o=="object"&&o&&o.__esModule)return o;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:o}),2&s&&typeof o!="string")for(var l in o)a.d(c,l,function(u){return o[u]}.bind(null,l));return c},a.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(s,"a",s),s},a.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},a.p="",a(a.s=6)}([function(r,i,a){var o=a(12),s={};function c(E,T){return T===l(E)}function l(E){var T=typeof E;return T!=="object"?T:E?E instanceof Error?"error":{}.toString.call(E).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function u(E){return c(E,"function")}function d(E){var T=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),A=RegExp("^"+T+"$");return p(E)&&A.test(E)}function p(E){var T=typeof E;return E!=null&&(T=="object"||T=="function")}function f(){var E=k();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(T){var A=(E+16*Math.random())%16|0;return E=Math.floor(E/16),(T==="x"?A:7&A|8).toString(16)})}var h={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function m(E,T){var A,$;try{A=s.stringify(E)}catch(I){if(T&&u(T))try{A=T(E)}catch(R){$=R}else $=I}return{error:$,value:A}}function g(E,T){return function(A,$){try{T(A,$)}catch(I){E.error(I)}}}function y(E){return function T(A,$){var I,R,Y,L={};try{for(R in A)(I=A[R])&&(c(I,"object")||c(I,"array"))?$.includes(I)?L[R]="Removed circular reference: "+l(I):((Y=$.slice()).push(I),L[R]=T(I,Y)):L[R]=I}catch(D){L="Failed cloning custom data: "+D.message}return L}(E,[E])}var b=["log","network","dom","navigation","error","manual"],w=["critical","error","warning","info","debug"];function S(E,T){for(var A=0;A<E.length;++A)if(E[A]===T)return!0;return!1}function k(){return Date.now?+Date.now():+new Date}r.exports={addParamsAndAccessTokenToPath:function(E,T,A){(A=A||{}).access_token=E;var $,I=[];for($ in A)Object.prototype.hasOwnProperty.call(A,$)&&I.push([$,A[$]].join("="));var R="?"+I.sort().join("&");(T=T||{}).path=T.path||"";var Y,L=T.path.indexOf("?"),D=T.path.indexOf("#");L!==-1&&(D===-1||D>L)?(Y=T.path,T.path=Y.substring(0,L)+R+"&"+Y.substring(L+1)):D!==-1?(Y=T.path,T.path=Y.substring(0,D)+R+Y.substring(D)):T.path=T.path+R},createItem:function(E,T,A,$,I){for(var R,Y,L,D,B,z,K=[],te=[],j=0,M=E.length;j<M;++j){var q=l(z=E[j]);switch(te.push(q),q){case"undefined":break;case"string":R?K.push(z):R=z;break;case"function":D=g(T,z);break;case"date":K.push(z);break;case"error":case"domexception":case"exception":Y?K.push(z):Y=z;break;case"object":case"array":if(z instanceof Error||typeof DOMException<"u"&&z instanceof DOMException){Y?K.push(z):Y=z;break}if($&&q==="object"&&!B){for(var G=0,ee=$.length;G<ee;++G)if(z[$[G]]!==void 0){B=z;break}if(B)break}L?K.push(z):L=z;break;default:if(z instanceof Error||typeof DOMException<"u"&&z instanceof DOMException){Y?K.push(z):Y=z;break}K.push(z)}}L&&(L=y(L)),K.length>0&&(L||(L=y({})),L.extraArgs=y(K));var ae={message:R,err:Y,custom:L,timestamp:k(),callback:D,notifier:A,diagnostic:{},uuid:f()};return function(ve,ye){ye&&ye.level!==void 0&&(ve.level=ye.level,delete ye.level),ye&&ye.skipFrames!==void 0&&(ve.skipFrames=ye.skipFrames,delete ye.skipFrames)}(ae,L),$&&B&&(ae.request=B),I&&(ae.lambdaContext=I),ae._originalArgs=E,ae.diagnostic.original_arg_types=te,ae},addErrorContext:function(E,T){var A=E.data.custom||{},$=!1;try{for(var I=0;I<T.length;++I)T[I].hasOwnProperty("rollbarContext")&&(A=o(A,y(T[I].rollbarContext)),$=!0);$&&(E.data.custom=A)}catch(R){E.diagnostic.error_context="Failed: "+R.message}},createTelemetryEvent:function(E){for(var T,A,$,I,R=0,Y=E.length;R<Y;++R)switch(l(I=E[R])){case"string":!T&&S(b,I)?T=I:!$&&S(w,I)&&($=I);break;case"object":A=I}return{type:T||"manual",metadata:A||{},level:$}},filterIp:function(E,T){if(E&&E.user_ip&&T!==!0){var A=E.user_ip;if(T)try{var $;if(A.indexOf(".")!==-1)($=A.split(".")).pop(),$.push("0"),A=$.join(".");else if(A.indexOf(":")!==-1){if(($=A.split(":")).length>2){var I=$.slice(0,3),R=I[2].indexOf("/");R!==-1&&(I[2]=I[2].substring(0,R)),A=I.concat("0000:0000:0000:0000:0000").join(":")}}else A=null}catch{A=null}else A=null;E.user_ip=A}},formatArgsAsString:function(E){var T,A,$,I=[];for(T=0,A=E.length;T<A;++T){switch(l($=E[T])){case"object":($=($=m($)).error||$.value).length>500&&($=$.substr(0,497)+"...");break;case"null":$="null";break;case"undefined":$="undefined";break;case"symbol":$=$.toString()}I.push($)}return I.join(" ")},formatUrl:function(E,T){if(!(T=T||E.protocol)&&E.port&&(E.port===80?T="http:":E.port===443&&(T="https:")),T=T||"https:",!E.hostname)return null;var A=T+"//"+E.hostname;return E.port&&(A=A+":"+E.port),E.path&&(A+=E.path),A},get:function(E,T){if(E){var A=T.split("."),$=E;try{for(var I=0,R=A.length;I<R;++I)$=$[A[I]]}catch{$=void 0}return $}},handleOptions:function(E,T,A,$){var I=o(E,T,A);return I=function(R,Y){return R.hostWhiteList&&!R.hostSafeList&&(R.hostSafeList=R.hostWhiteList,R.hostWhiteList=void 0,Y&&Y.log("hostWhiteList is deprecated. Use hostSafeList.")),R.hostBlackList&&!R.hostBlockList&&(R.hostBlockList=R.hostBlackList,R.hostBlackList=void 0,Y&&Y.log("hostBlackList is deprecated. Use hostBlockList.")),R}(I,$),!T||T.overwriteScrubFields||T.scrubFields&&(I.scrubFields=(E.scrubFields||[]).concat(T.scrubFields)),I},isError:function(E){return c(E,"error")||c(E,"exception")},isFiniteNumber:function(E){return Number.isFinite(E)},isFunction:u,isIterable:function(E){var T=l(E);return T==="object"||T==="array"},isNativeFunction:d,isObject:p,isString:function(E){return typeof E=="string"||E instanceof String},isType:c,isPromise:function(E){return p(E)&&c(E.then,"function")},jsonParse:function(E){var T,A;try{T=s.parse(E)}catch($){A=$}return{error:A,value:T}},LEVELS:{debug:0,info:1,warning:2,error:3,critical:4},makeUnhandledStackInfo:function(E,T,A,$,I,R,Y,L){var D={url:T||"",line:A,column:$};D.func=L.guessFunctionName(D.url,D.line),D.context=L.gatherContext(D.url,D.line);var B=typeof document<"u"&&document&&document.location&&document.location.href,z=typeof window<"u"&&window&&window.navigator&&window.navigator.userAgent;return{mode:R,message:I?String(I):E||Y,url:B,stack:[D],useragent:z}},merge:o,now:k,redact:function(){return"********"},RollbarJSON:s,sanitizeUrl:function(E){var T=function(A){if(c(A,"string")){for(var $=h,I=$.parser[$.strictMode?"strict":"loose"].exec(A),R={},Y=0,L=$.key.length;Y<L;++Y)R[$.key[Y]]=I[Y]||"";return R[$.q.name]={},R[$.key[12]].replace($.q.parser,function(D,B,z){B&&(R[$.q.name][B]=z)}),R}}(E);return T?(T.anchor===""&&(T.source=T.source.replace("#","")),E=T.source.replace("?"+T.query,"")):"(unknown)"},set:function(E,T,A){if(E){var $=T.split("."),I=$.length;if(!(I<1))if(I!==1)try{for(var R=E[$[0]]||{},Y=R,L=1;L<I-1;++L)R[$[L]]=R[$[L]]||{},R=R[$[L]];R[$[I-1]]=A,E[$[0]]=Y}catch{return}else E[$[0]]=A}},setupJSON:function(E){u(s.stringify)&&u(s.parse)||(c(JSON,"undefined")||(E?(d(JSON.stringify)&&(s.stringify=JSON.stringify),d(JSON.parse)&&(s.parse=JSON.parse)):(u(JSON.stringify)&&(s.stringify=JSON.stringify),u(JSON.parse)&&(s.parse=JSON.parse))),u(s.stringify)&&u(s.parse)||E&&E(s))},stringify:m,maxByteSize:function(E){for(var T=0,A=E.length,$=0;$<A;$++){var I=E.charCodeAt($);I<128?T+=1:I<2048?T+=2:I<65536&&(T+=3)}return T},typeName:l,uuid4:f}},function(r,i,a){a(17);var o=a(18),s=a(0);r.exports={error:function(){var c=Array.prototype.slice.call(arguments,0);c.unshift("Rollbar:"),o.ieVersion()<=8?console.error(s.formatArgsAsString(c)):console.error.apply(console,c)},info:function(){var c=Array.prototype.slice.call(arguments,0);c.unshift("Rollbar:"),o.ieVersion()<=8?console.info(s.formatArgsAsString(c)):console.info.apply(console,c)},log:function(){var c=Array.prototype.slice.call(arguments,0);c.unshift("Rollbar:"),o.ieVersion()<=8?console.log(s.formatArgsAsString(c)):console.log.apply(console,c)}}},function(r,i,a){r.exports={parse:function(o){var s,c,l={protocol:null,auth:null,host:null,path:null,hash:null,href:o,hostname:null,port:null,pathname:null,search:null,query:null};if((s=o.indexOf("//"))!==-1?(l.protocol=o.substring(0,s),c=s+2):c=0,(s=o.indexOf("@",c))!==-1&&(l.auth=o.substring(c,s),c=s+1),(s=o.indexOf("/",c))===-1){if((s=o.indexOf("?",c))===-1)return(s=o.indexOf("#",c))===-1?l.host=o.substring(c):(l.host=o.substring(c,s),l.hash=o.substring(s)),l.hostname=l.host.split(":")[0],l.port=l.host.split(":")[1],l.port&&(l.port=parseInt(l.port,10)),l;l.host=o.substring(c,s),l.hostname=l.host.split(":")[0],l.port=l.host.split(":")[1],l.port&&(l.port=parseInt(l.port,10)),c=s}else l.host=o.substring(c,s),l.hostname=l.host.split(":")[0],l.port=l.host.split(":")[1],l.port&&(l.port=parseInt(l.port,10)),c=s;if((s=o.indexOf("#",c))===-1?l.path=o.substring(c):(l.path=o.substring(c,s),l.hash=o.substring(s)),l.path){var u=l.path.split("?");l.pathname=u[0],l.query=u[1],l.search=l.query?"?"+l.query:null}return l}}},function(r,i,a){var o=a(24),s=new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ");function c(){return null}function l(p){var f={};return f._stackFrame=p,f.url=p.fileName,f.line=p.lineNumber,f.func=p.functionName,f.column=p.columnNumber,f.args=p.args,f.context=null,f}function u(p,f){return{stack:function(){var h=[];f=f||0;try{h=o.parse(p)}catch{h=[]}for(var m=[],g=f;g<h.length;g++)m.push(new l(h[g]));return m}(),message:p.message,name:d(p),rawStack:p.stack,rawException:p}}function d(p){var f=p.name&&p.name.length&&p.name,h=p.constructor.name&&p.constructor.name.length&&p.constructor.name;return f&&h?f==="Error"?h:f:f||h}r.exports={guessFunctionName:function(){return"?"},guessErrorClass:function(p){if(!p||!p.match)return["Unknown error. There was no error message to display.",""];var f=p.match(s),h="(unknown)";return f&&(h=f[f.length-1],p=(p=p.replace((f[f.length-2]||"")+h+":","")).replace(/(^[\s]+|[\s]+$)/g,"")),[h,p]},gatherContext:c,parse:function(p,f){var h=p;if(h.nested||h.cause){for(var m=[];h;)m.push(new u(h,f)),h=h.nested||h.cause,f=0;return m[0].traceChain=m,m[0]}return new u(h,f)},Stack:u,Frame:l}},function(r,i,a){var o=a(0),s=a(5);function c(l,u){var d=u.split("."),p=d.length-1;try{for(var f=0;f<=p;++f)f<p?l=l[d[f]]:l[d[f]]=o.redact()}catch{}}r.exports=function(l,u,d){if(u=u||[],d)for(var p=0;p<d.length;++p)c(l,d[p]);var f=function(g){for(var y,b=[],w=0;w<g.length;++w)y="^\\[?(%5[bB])?"+g[w]+"\\[?(%5[bB])?\\]?(%5[dD])?$",b.push(new RegExp(y,"i"));return b}(u),h=function(g){for(var y,b=[],w=0;w<g.length;++w)y="\\[?(%5[bB])?"+g[w]+"\\[?(%5[bB])?\\]?(%5[dD])?",b.push(new RegExp("("+y+"=)([^&\\n]+)","igm"));return b}(u);function m(g,y){return y+o.redact()}return s(l,function g(y,b,w){var S=function(k,E){var T;for(T=0;T<f.length;++T)if(f[T].test(k)){E=o.redact();break}return E}(y,b);return S===b?o.isType(b,"object")||o.isType(b,"array")?s(b,g,w):function(k){var E;if(o.isType(k,"string"))for(E=0;E<h.length;++E)k=k.replace(h[E],m);return k}(S):S})}},function(r,i,a){var o=a(0);r.exports=function(s,c,l){var u,d,p,f,h=o.isType(s,"object"),m=o.isType(s,"array"),g=[];if(l=l||{obj:[],mapped:[]},h){if(f=l.obj.indexOf(s),h&&f!==-1)return l.mapped[f]||l.obj[f];l.obj.push(s),f=l.obj.length-1}if(h)for(u in s)Object.prototype.hasOwnProperty.call(s,u)&&g.push(u);else if(m)for(p=0;p<s.length;++p)g.push(p);var y=h?{}:[],b=!0;for(p=0;p<g.length;++p)d=s[u=g[p]],y[u]=c(u,d,l),b=b&&y[u]===s[u];return h&&!b&&(l.mapped[f]=y),b?s:y}},function(r,i,a){r.exports=a(7)},function(r,i,a){var o=a(8),s=typeof window<"u"&&window._rollbarConfig,c=s&&s.globalAlias||"Rollbar",l=typeof window<"u"&&window[c]&&typeof window[c].shimId=="function"&&window[c].shimId()!==void 0;if(typeof window>"u"||window._rollbarStartTime||(window._rollbarStartTime=new Date().getTime()),!l&&s){var u=new o(s);window[c]=u}else typeof window<"u"?(window.rollbar=o,window._rollbarDidLoad=!0):typeof self<"u"&&(self.rollbar=o,self._rollbarDidLoad=!0);r.exports=o},function(r,i,a){var o=a(9),s=a(31),c=a(32),l=a(35),u=a(37),d=a(4),p=a(38);o.setComponents({telemeter:s,instrumenter:c,polyfillJSON:l,wrapGlobals:u,scrub:d,truncation:p}),r.exports=o},function(r,i,a){var o=a(10),s=a(0),c=a(15),l=a(1),u=a(19),d=a(20),p=a(2),f=a(23),h=a(26),m=a(27),g=a(28),y=a(3);function b(I,R){this.options=s.handleOptions($,I,null,l),this.options._configuredOptions=I;var Y=this.components.telemeter,L=this.components.instrumenter,D=this.components.polyfillJSON;this.wrapGlobals=this.components.wrapGlobals,this.scrub=this.components.scrub;var B=this.components.truncation,z=new d(B),K=new c(this.options,z,p,B);Y&&(this.telemeter=new Y(this.options)),this.client=R||new o(this.options,K,l,this.telemeter,"browser");var te=E(),j=typeof document<"u"&&document;this.isChrome=te.chrome&&te.chrome.runtime,this.anonymousErrorsPending=0,function(M,q,G){M.addTransform(f.handleDomException).addTransform(f.handleItemWithError).addTransform(f.ensureItemHasSomethingToSay).addTransform(f.addBaseInfo).addTransform(f.addRequestInfo(G)).addTransform(f.addClientInfo(G)).addTransform(f.addPluginInfo(G)).addTransform(f.addBody).addTransform(h.addMessageWithError).addTransform(h.addTelemetryData).addTransform(h.addConfigToPayload).addTransform(f.addScrubber(q.scrub)).addTransform(h.addPayloadOptions).addTransform(h.userTransform(l)).addTransform(h.addConfiguredOptions).addTransform(h.addDiagnosticKeys).addTransform(h.itemToPayload)}(this.client.notifier,this,te),this.client.queue.addPredicate(g.checkLevel).addPredicate(m.checkIgnore).addPredicate(g.userCheckIgnore(l)).addPredicate(g.urlIsNotBlockListed(l)).addPredicate(g.urlIsSafeListed(l)).addPredicate(g.messageIsIgnored(l)),this.setupUnhandledCapture(),L&&(this.instrumenter=new L(this.options,this.client.telemeter,this,te,j),this.instrumenter.instrument()),s.setupJSON(D),this.rollbar=this}var w=null;function S(I){var R="Rollbar is not initialized";l.error(R),I&&I(new Error(R))}function k(I){for(var R=0,Y=I.length;R<Y;++R)if(s.isFunction(I[R]))return I[R]}function E(){return typeof window<"u"&&window||typeof self<"u"&&self}b.init=function(I,R){return w?w.global(I).configure(I):w=new b(I,R)},b.prototype.components={},b.setComponents=function(I){b.prototype.components=I},b.prototype.global=function(I){return this.client.global(I),this},b.global=function(I){if(w)return w.global(I);S()},b.prototype.configure=function(I,R){var Y=this.options,L={};return R&&(L={payload:R}),this.options=s.handleOptions(Y,I,L,l),this.options._configuredOptions=s.handleOptions(Y._configuredOptions,I,L),this.client.configure(this.options,R),this.instrumenter&&this.instrumenter.configure(this.options),this.setupUnhandledCapture(),this},b.configure=function(I,R){if(w)return w.configure(I,R);S()},b.prototype.lastError=function(){return this.client.lastError},b.lastError=function(){if(w)return w.lastError();S()},b.prototype.log=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.log(I),{uuid:R}},b.log=function(){if(w)return w.log.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.debug=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.debug(I),{uuid:R}},b.debug=function(){if(w)return w.debug.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.info=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.info(I),{uuid:R}},b.info=function(){if(w)return w.info.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.warn=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.warn(I),{uuid:R}},b.warn=function(){if(w)return w.warn.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.warning=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.warning(I),{uuid:R}},b.warning=function(){if(w)return w.warning.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.error=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.error(I),{uuid:R}},b.error=function(){if(w)return w.error.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.critical=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.critical(I),{uuid:R}},b.critical=function(){if(w)return w.critical.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.buildJsonPayload=function(I){return this.client.buildJsonPayload(I)},b.buildJsonPayload=function(){if(w)return w.buildJsonPayload.apply(w,arguments);S()},b.prototype.sendJsonPayload=function(I){return this.client.sendJsonPayload(I)},b.sendJsonPayload=function(){if(w)return w.sendJsonPayload.apply(w,arguments);S()},b.prototype.setupUnhandledCapture=function(){var I=E();this.unhandledExceptionsInitialized||(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(u.captureUncaughtExceptions(I,this),this.wrapGlobals&&this.options.wrapGlobalEventHandlers&&this.wrapGlobals(I,this),this.unhandledExceptionsInitialized=!0),this.unhandledRejectionsInitialized||(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&(u.captureUnhandledRejections(I,this),this.unhandledRejectionsInitialized=!0)},b.prototype.handleUncaughtException=function(I,R,Y,L,D,B){if(this.options.captureUncaught||this.options.handleUncaughtExceptions){if(this.options.inspectAnonymousErrors&&this.isChrome&&D===null&&R==="")return"anonymous";var z,K=s.makeUnhandledStackInfo(I,R,Y,L,D,"onerror","uncaught exception",y);s.isError(D)?(z=this._createItem([I,D,B]))._unhandledStackInfo=K:s.isError(R)?(z=this._createItem([I,R,B]))._unhandledStackInfo=K:(z=this._createItem([I,B])).stackInfo=K,z.level=this.options.uncaughtErrorLevel,z._isUncaught=!0,this.client.log(z)}},b.prototype.handleAnonymousErrors=function(){if(this.options.inspectAnonymousErrors&&this.isChrome){var I=this;try{Error.prepareStackTrace=function(R,Y){if(I.options.inspectAnonymousErrors&&I.anonymousErrorsPending){if(I.anonymousErrorsPending-=1,!R)return;R._isAnonymous=!0,I.handleUncaughtException(R.message,null,null,null,R)}return R.stack}}catch(R){this.options.inspectAnonymousErrors=!1,this.error("anonymous error handler failed",R)}}},b.prototype.handleUnhandledRejection=function(I,R){if(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections){var Y="unhandled rejection was null or undefined!";if(I)if(I.message)Y=I.message;else{var L=s.stringify(I);L.value&&(Y=L.value)}var D,B=I&&I._rollbarContext||R&&R._rollbarContext;s.isError(I)?D=this._createItem([Y,I,B]):(D=this._createItem([Y,I,B])).stackInfo=s.makeUnhandledStackInfo(Y,"",0,0,null,"unhandledrejection","",y),D.level=this.options.uncaughtErrorLevel,D._isUncaught=!0,D._originalArgs=D._originalArgs||[],D._originalArgs.push(R),this.client.log(D)}},b.prototype.wrap=function(I,R,Y){try{var L;if(L=s.isFunction(R)?R:function(){return R||{}},!s.isFunction(I)||I._isWrap)return I;if(!I._rollbar_wrapped&&(I._rollbar_wrapped=function(){Y&&s.isFunction(Y)&&Y.apply(this,arguments);try{return I.apply(this,arguments)}catch(z){var B=z;throw B&&window._rollbarWrappedError!==B&&(s.isType(B,"string")&&(B=new String(B)),B._rollbarContext=L()||{},B._rollbarContext._wrappedSource=I.toString(),window._rollbarWrappedError=B),B}},I._rollbar_wrapped._isWrap=!0,I.hasOwnProperty))for(var D in I)I.hasOwnProperty(D)&&D!=="_rollbar_wrapped"&&(I._rollbar_wrapped[D]=I[D]);return I._rollbar_wrapped}catch{return I}},b.wrap=function(I,R){if(w)return w.wrap(I,R);S()},b.prototype.captureEvent=function(){var I=s.createTelemetryEvent(arguments);return this.client.captureEvent(I.type,I.metadata,I.level)},b.captureEvent=function(){if(w)return w.captureEvent.apply(w,arguments);S()},b.prototype.captureDomContentLoaded=function(I,R){return R||(R=new Date),this.client.captureDomContentLoaded(R)},b.prototype.captureLoad=function(I,R){return R||(R=new Date),this.client.captureLoad(R)},b.prototype.loadFull=function(){l.info("Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.")},b.prototype._createItem=function(I){return s.createItem(I,l,this)};var T=a(29),A=a(30),$={version:T.version,scrubFields:A.scrubFields,logLevel:T.logLevel,reportLevel:T.reportLevel,uncaughtErrorLevel:T.uncaughtErrorLevel,endpoint:T.endpoint,verbose:!1,enabled:!0,transmit:!0,sendConfig:!1,includeItemsInTelemetry:!0,captureIp:!0,inspectAnonymousErrors:!0,ignoreDuplicateErrors:!0,wrapGlobalEventHandlers:!1};r.exports=b},function(r,i,a){var o=a(11),s=a(13),c=a(14),l=a(0);function u(f,h,m,g,y){this.options=l.merge(f),this.logger=m,u.rateLimiter.configureGlobal(this.options),u.rateLimiter.setPlatformOptions(y,this.options),this.api=h,this.queue=new s(u.rateLimiter,h,m,this.options);var b=this.options.tracer||null;p(b)?(this.tracer=b,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier=new c(this.queue,this.options),this.telemeter=g,d(f),this.lastError=null,this.lastErrorHash="none"}function d(f){f.stackTraceLimit&&(Error.stackTraceLimit=f.stackTraceLimit)}function p(f){if(!f||!f.scope||typeof f.scope!="function")return!1;var h=f.scope();return!(!h||!h.active||typeof h.active!="function")}u.rateLimiter=new o({maxItems:0,itemsPerMinute:60}),u.prototype.global=function(f){return u.rateLimiter.configureGlobal(f),this},u.prototype.configure=function(f,h){var m=this.options,g={};h&&(g={payload:h}),this.options=l.merge(m,f,g);var y=this.options.tracer||null;return p(y)?(this.tracer=y,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier&&this.notifier.configure(this.options),this.telemeter&&this.telemeter.configure(this.options),d(f),this.global(this.options),p(f.tracer)&&(this.tracer=f.tracer),this},u.prototype.log=function(f){var h=this._defaultLogLevel();return this._log(h,f)},u.prototype.debug=function(f){this._log("debug",f)},u.prototype.info=function(f){this._log("info",f)},u.prototype.warn=function(f){this._log("warning",f)},u.prototype.warning=function(f){this._log("warning",f)},u.prototype.error=function(f){this._log("error",f)},u.prototype.critical=function(f){this._log("critical",f)},u.prototype.wait=function(f){this.queue.wait(f)},u.prototype.captureEvent=function(f,h,m){return this.telemeter&&this.telemeter.captureEvent(f,h,m)},u.prototype.captureDomContentLoaded=function(f){return this.telemeter&&this.telemeter.captureDomContentLoaded(f)},u.prototype.captureLoad=function(f){return this.telemeter&&this.telemeter.captureLoad(f)},u.prototype.buildJsonPayload=function(f){return this.api.buildJsonPayload(f)},u.prototype.sendJsonPayload=function(f){this.api.postJsonPayload(f)},u.prototype._log=function(f,h){var m;if(h.callback&&(m=h.callback,delete h.callback),this.options.ignoreDuplicateErrors&&this._sameAsLastError(h)){if(m){var g=new Error("ignored identical item");g.item=h,m(g)}}else try{this._addTracingInfo(h),h.level=h.level||f,this.telemeter&&this.telemeter._captureRollbarItem(h),h.telemetryEvents=this.telemeter&&this.telemeter.copyEvents()||[],this.notifier.log(h,m)}catch(y){m&&m(y),this.logger.error(y)}},u.prototype._defaultLogLevel=function(){return this.options.logLevel||"debug"},u.prototype._sameAsLastError=function(f){if(!f._isUncaught)return!1;var h=function(m){var g=m.message||"",y=(m.err||{}).stack||String(m.err);return g+"::"+y}(f);return this.lastErrorHash===h||(this.lastError=f.err,this.lastErrorHash=h,!1)},u.prototype._addTracingInfo=function(f){if(this.tracer){var h=this.tracer.scope().active();if(function(y){if(!y||!y.context||typeof y.context!="function")return!1;var b=y.context();return!(!b||!b.toSpanId||!b.toTraceId||typeof b.toSpanId!="function"||typeof b.toTraceId!="function")}(h)){h.setTag("rollbar.error_uuid",f.uuid),h.setTag("rollbar.has_error",!0),h.setTag("error",!0),h.setTag("rollbar.item_url","https://rollbar.com/item/uuid/?uuid="+f.uuid),h.setTag("rollbar.occurrence_url","https://rollbar.com/occurrence/uuid/?uuid="+f.uuid);var m=h.context().toSpanId(),g=h.context().toTraceId();f.custom?(f.custom.opentracing_span_id=m,f.custom.opentracing_trace_id=g):f.custom={opentracing_span_id:m,opentracing_trace_id:g}}}},r.exports=u},function(r,i,a){var o=a(0);function s(u){this.startTime=o.now(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(u)}function c(u,d,p){return!u.ignoreRateLimit&&d>=1&&p>d}function l(u,d,p,f,h,m,g){var y=null;return p&&(p=new Error(p)),p||f||(y=function(b,w,S,k,E){var T,A=w.environment||w.payload&&w.payload.environment;T=E?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var $={body:{message:{body:T,extra:{maxItems:S,itemsPerMinute:k}}},language:"javascript",environment:A,notifier:{version:w.notifier&&w.notifier.version||w.version}};return b==="browser"?($.platform="browser",$.framework="browser-js",$.notifier.name="rollbar-browser-js"):b==="server"?($.framework=w.framework||"node-js",$.notifier.name=w.notifier.name):b==="react-native"&&($.framework=w.framework||"react-native",$.notifier.name=w.notifier.name),$}(u,d,h,m,g)),{error:p,shouldSend:f,payload:y}}s.globalSettings={startTime:o.now(),maxItems:void 0,itemsPerMinute:void 0},s.prototype.configureGlobal=function(u){u.startTime!==void 0&&(s.globalSettings.startTime=u.startTime),u.maxItems!==void 0&&(s.globalSettings.maxItems=u.maxItems),u.itemsPerMinute!==void 0&&(s.globalSettings.itemsPerMinute=u.itemsPerMinute)},s.prototype.shouldSend=function(u,d){var p=(d=d||o.now())-this.startTime;(p<0||p>=6e4)&&(this.startTime=d,this.perMinCounter=0);var f=s.globalSettings.maxItems,h=s.globalSettings.itemsPerMinute;if(c(u,f,this.counter))return l(this.platform,this.platformOptions,f+" max items reached",!1);if(c(u,h,this.perMinCounter))return l(this.platform,this.platformOptions,h+" items per minute reached",!1);this.counter++,this.perMinCounter++;var m=!c(u,f,this.counter),g=m;return m=m&&!c(u,h,this.perMinCounter),l(this.platform,this.platformOptions,null,m,f,h,g)},s.prototype.setPlatformOptions=function(u,d){this.platform=u,this.platformOptions=d},r.exports=s},function(r,i,a){var o=Object.prototype.hasOwnProperty,s=Object.prototype.toString,c=function(l){if(!l||s.call(l)!=="[object Object]")return!1;var u,d=o.call(l,"constructor"),p=l.constructor&&l.constructor.prototype&&o.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!p)return!1;for(u in l);return u===void 0||o.call(l,u)};r.exports=function l(){var u,d,p,f,h,m={},g=null,y=arguments.length;for(u=0;u<y;u++)if((g=arguments[u])!=null)for(h in g)d=m[h],m!==(p=g[h])&&(p&&c(p)?(f=d&&c(d)?d:{},m[h]=l(f,p)):p!==void 0&&(m[h]=p));return m}},function(r,i,a){var o=a(0);function s(l,u,d,p){this.rateLimiter=l,this.api=u,this.logger=d,this.options=p,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}s.prototype.configure=function(l){this.api&&this.api.configure(l);var u=this.options;return this.options=o.merge(u,l),this},s.prototype.addPredicate=function(l){return o.isFunction(l)&&this.predicates.push(l),this},s.prototype.addPendingItem=function(l){this.pendingItems.push(l)},s.prototype.removePendingItem=function(l){var u=this.pendingItems.indexOf(l);u!==-1&&this.pendingItems.splice(u,1)},s.prototype.addItem=function(l,u,d,p){u&&o.isFunction(u)||(u=function(){});var f=this._applyPredicates(l);if(f.stop)return this.removePendingItem(p),void u(f.err);if(this._maybeLog(l,d),this.removePendingItem(p),this.options.transmit){this.pendingRequests.push(l);try{this._makeApiRequest(l,function(h,m){this._dequeuePendingRequest(l),u(h,m)}.bind(this))}catch(h){this._dequeuePendingRequest(l),u(h)}}else u(new Error("Transmit disabled"))},s.prototype.wait=function(l){o.isFunction(l)&&(this.waitCallback=l,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},s.prototype._applyPredicates=function(l){for(var u=null,d=0,p=this.predicates.length;d<p;d++)if(!(u=this.predicates[d](l,this.options))||u.err!==void 0)return{stop:!0,err:u.err};return{stop:!1,err:null}},s.prototype._makeApiRequest=function(l,u){var d=this.rateLimiter.shouldSend(l);d.shouldSend?this.api.postItem(l,function(p,f){p?this._maybeRetry(p,l,u):u(p,f)}.bind(this)):d.error?u(d.error):this.api.postItem(d.payload,u)};var c=["ECONNRESET","ENOTFOUND","ESOCKETTIMEDOUT","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH","EPIPE","EAI_AGAIN"];s.prototype._maybeRetry=function(l,u,d){var p=!1;if(this.options.retryInterval){for(var f=0,h=c.length;f<h;f++)if(l.code===c[f]){p=!0;break}p&&o.isFiniteNumber(this.options.maxRetries)&&(u.retries=u.retries?u.retries+1:1,u.retries>this.options.maxRetries&&(p=!1))}p?this._retryApiRequest(u,d):d(l)},s.prototype._retryApiRequest=function(l,u){this.retryQueue.push({item:l,callback:u}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var d=this.retryQueue.shift();this._makeApiRequest(d.item,d.callback)}}.bind(this),this.options.retryInterval))},s.prototype._dequeuePendingRequest=function(l){var u=this.pendingRequests.indexOf(l);u!==-1&&(this.pendingRequests.splice(u,1),this._maybeCallWait())},s.prototype._maybeLog=function(l,u){if(this.logger&&this.options.verbose){var d=u;if(d=(d=d||o.get(l,"body.trace.exception.message"))||o.get(l,"body.trace_chain.0.exception.message"))return void this.logger.error(d);(d=o.get(l,"body.message.body"))&&this.logger.log(d)}},s.prototype._maybeCallWait=function(){return!(!o.isFunction(this.waitCallback)||this.pendingItems.length!==0||this.pendingRequests.length!==0)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},r.exports=s},function(r,i,a){var o=a(0);function s(c,l){this.queue=c,this.options=l,this.transforms=[],this.diagnostic={}}s.prototype.configure=function(c){this.queue&&this.queue.configure(c);var l=this.options;return this.options=o.merge(l,c),this},s.prototype.addTransform=function(c){return o.isFunction(c)&&this.transforms.push(c),this},s.prototype.log=function(c,l){if(l&&o.isFunction(l)||(l=function(){}),!this.options.enabled)return l(new Error("Rollbar is not enabled"));this.queue.addPendingItem(c);var u=c.err;this._applyTransforms(c,function(d,p){if(d)return this.queue.removePendingItem(c),l(d,null);this.queue.addItem(p,l,u,c)}.bind(this))},s.prototype._applyTransforms=function(c,l){var u=-1,d=this.transforms.length,p=this.transforms,f=this.options,h=function(m,g){m?l(m,null):++u!==d?p[u](g,f,h):l(null,g)};h(null,c)},r.exports=s},function(r,i,a){var o=a(0),s=a(16),c={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function l(d,p,f,h,m){this.options=d,this.transport=p,this.url=f,this.truncation=h,this.jsonBackup=m,this.accessToken=d.accessToken,this.transportOptions=u(d,f)}function u(d,p){return s.getTransportFromOptions(d,c,p)}l.prototype.postItem=function(d,p){var f=s.transportOptions(this.transportOptions,"POST"),h=s.buildPayload(this.accessToken,d,this.jsonBackup),m=this;setTimeout(function(){m.transport.post(m.accessToken,f,h,p)},0)},l.prototype.buildJsonPayload=function(d,p){var f,h=s.buildPayload(this.accessToken,d,this.jsonBackup);return(f=this.truncation?this.truncation.truncate(h):o.stringify(h)).error?(p&&p(f.error),null):f.value},l.prototype.postJsonPayload=function(d,p){var f=s.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,f,d,p)},l.prototype.configure=function(d){var p=this.oldOptions;return this.options=o.merge(p,d),this.transportOptions=u(this.options,this.url),this.options.accessToken!==void 0&&(this.accessToken=this.options.accessToken),this},r.exports=l},function(r,i,a){var o=a(0);r.exports={buildPayload:function(s,c,l){if(!o.isType(c.context,"string")){var u=o.stringify(c.context,l);u.error?c.context="Error: could not serialize 'context'":c.context=u.value||"",c.context.length>255&&(c.context=c.context.substr(0,255))}return{access_token:s,data:c}},getTransportFromOptions:function(s,c,l){var u=c.hostname,d=c.protocol,p=c.port,f=c.path,h=c.search,m=s.timeout,g=function(w){var S=typeof window<"u"&&window||typeof self<"u"&&self,k=w.defaultTransport||"xhr";return S.fetch===void 0&&(k="xhr"),S.XMLHttpRequest===void 0&&(k="fetch"),k}(s),y=s.proxy;if(s.endpoint){var b=l.parse(s.endpoint);u=b.hostname,d=b.protocol,p=b.port,f=b.pathname,h=b.search}return{timeout:m,hostname:u,protocol:d,port:p,path:f,search:h,proxy:y,transport:g}},transportOptions:function(s,c){var l=s.protocol||"https:",u=s.port||(l==="http:"?80:l==="https:"?443:void 0),d=s.hostname,p=s.path,f=s.timeout,h=s.transport;return s.search&&(p+=s.search),s.proxy&&(p=l+"//"+d+p,d=s.proxy.host||s.proxy.hostname,u=s.proxy.port,l=s.proxy.protocol||l),{timeout:f,protocol:l,hostname:d,path:p,port:u,method:c,transport:h}},appendPathToPath:function(s,c){var l=/\/$/.test(s),u=/^\//.test(c);return l&&u?c=c.substring(1):l||u||(c="/"+c),s+c}}},function(r,i){(function(a){a.console||(a.console={});for(var o,s,c=a.console,l=function(){},u=["memory"],d="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");o=u.pop();)c[o]||(c[o]={});for(;s=d.pop();)c[s]||(c[s]=l)})(typeof window>"u"?this:window)},function(r,i,a){var o={ieVersion:function(){if(typeof document<"u"){for(var s=3,c=document.createElement("div"),l=c.getElementsByTagName("i");c.innerHTML="<!--[if gt IE "+ ++s+"]><i></i><![endif]-->",l[0];);return s>4?s:void 0}}};r.exports=o},function(r,i,a){function o(s,c,l,u){s._rollbarWrappedError&&(u[4]||(u[4]=s._rollbarWrappedError),u[5]||(u[5]=s._rollbarWrappedError._rollbarContext),s._rollbarWrappedError=null);var d=c.handleUncaughtException.apply(c,u);l&&l.apply(s,u),d==="anonymous"&&(c.anonymousErrorsPending+=1)}r.exports={captureUncaughtExceptions:function(s,c,l){if(s){var u;if(typeof c._rollbarOldOnError=="function")u=c._rollbarOldOnError;else if(s.onerror){for(u=s.onerror;u._rollbarOldOnError;)u=u._rollbarOldOnError;c._rollbarOldOnError=u}c.handleAnonymousErrors();var d=function(){var p=Array.prototype.slice.call(arguments,0);o(s,c,u,p)};l&&(d._rollbarOldOnError=u),s.onerror=d}},captureUnhandledRejections:function(s,c,l){if(s){typeof s._rollbarURH=="function"&&s._rollbarURH.belongsToShim&&s.removeEventListener("unhandledrejection",s._rollbarURH);var u=function(d){var p,f,h;try{p=d.reason}catch{p=void 0}try{f=d.promise}catch{f="[unhandledrejection] error getting `promise` from event"}try{h=d.detail,!p&&h&&(p=h.reason,f=h.promise)}catch{}p||(p="[unhandledrejection] error getting `reason` from event"),c&&c.handleUnhandledRejection&&c.handleUnhandledRejection(p,f)};u.belongsToShim=l,s._rollbarURH=u,s.addEventListener("unhandledrejection",u)}}}},function(r,i,a){var o=a(0),s=a(21),c=a(22);function l(u){this.truncation=u}l.prototype.get=function(u,d,p,f,h){f&&o.isFunction(f)||(f=function(){}),o.addParamsAndAccessTokenToPath(u,d,p);var m=o.formatUrl(d);this._makeZoneRequest(u,m,"GET",null,f,h,d.timeout,d.transport)},l.prototype.post=function(u,d,p,f,h){if(f&&o.isFunction(f)||(f=function(){}),!p)return f(new Error("Cannot send empty request"));var m;if((m=this.truncation?this.truncation.truncate(p):o.stringify(p)).error)return f(m.error);var g=m.value,y=o.formatUrl(d);this._makeZoneRequest(u,y,"POST",g,f,h,d.timeout,d.transport)},l.prototype.postJsonPayload=function(u,d,p,f,h){f&&o.isFunction(f)||(f=function(){});var m=o.formatUrl(d);this._makeZoneRequest(u,m,"POST",p,f,h,d.timeout,d.transport)},l.prototype._makeZoneRequest=function(){var u=typeof window<"u"&&window||h!==void 0&&h,d=u&&u.Zone&&u.Zone.current,p=Array.prototype.slice.call(arguments);if(d&&d._name==="angular"){var f=d._parent,h=this;f.run(function(){h._makeRequest.apply(void 0,p)})}else this._makeRequest.apply(void 0,p)},l.prototype._makeRequest=function(u,d,p,f,h,m,g,y){if(typeof RollbarProxy<"u")return function(b,w){new RollbarProxy().sendJsonPayload(b,function(S){},function(S){w(new Error(S))})}(f,h);y==="fetch"?s(u,d,p,f,h,g):c(u,d,p,f,h,m,g)},r.exports=l},function(r,i,a){var o=a(1),s=a(0);r.exports=function(c,l,u,d,p,f){var h,m;s.isFiniteNumber(f)&&(h=new AbortController,m=setTimeout(function(){h.abort()},f)),fetch(l,{method:u,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":c,signal:h&&h.signal},body:d}).then(function(g){return m&&clearTimeout(m),g.json()}).then(function(g){p(null,g)}).catch(function(g){o.error(g.message),p(g)})}},function(r,i,a){var o=a(0),s=a(1);function c(l,u){var d=new Error(l);return d.code=u||"ENOTFOUND",d}r.exports=function(l,u,d,p,f,h,m){var g;if(!(g=h?h():function(){var w,S,k=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],E=k.length;for(S=0;S<E;S++)try{w=k[S]();break}catch{}return w}()))return f(new Error("No way to send a request"));try{try{var y=function(){try{if(y&&g.readyState===4){y=void 0;var w=o.jsonParse(g.responseText);if((E=g)&&E.status&&E.status===200)return void f(w.error,w.value);if(function(T){return T&&o.isType(T.status,"number")&&T.status>=400&&T.status<600}(g)){if(g.status===403){var S=w.value&&w.value.message;s.error(S)}f(new Error(String(g.status)))}else f(c("XHR response had no status code (likely connection failure)"))}}catch(T){var k;k=T&&T.stack?T:new Error(T),f(k)}var E};g.open(d,u,!0),g.setRequestHeader&&(g.setRequestHeader("Content-Type","application/json"),g.setRequestHeader("X-Rollbar-Access-Token",l)),o.isFiniteNumber(m)&&(g.timeout=m),g.onreadystatechange=y,g.send(p)}catch{if(typeof XDomainRequest<"u"){if(!window||!window.location)return f(new Error("No window available during request, unknown environment"));window.location.href.substring(0,5)==="http:"&&u.substring(0,5)==="https"&&(u="http"+u.substring(5));var b=new XDomainRequest;b.onprogress=function(){},b.ontimeout=function(){f(c("Request timed out","ETIMEDOUT"))},b.onerror=function(){f(new Error("Error during request"))},b.onload=function(){var S=o.jsonParse(b.responseText);f(S.error,S.value)},b.open(d,u,!0),b.send(p)}else f(new Error("Cannot find a method to transport a request"))}}catch(w){f(w)}}},function(r,i,a){var o=a(0),s=a(3),c=a(1);function l(f,h,m){var g=f.message,y=f.custom;g||(g="Item sent with null or missing arguments.");var b={body:g};y&&(b.extra=o.merge(y)),o.set(f,"data.body",{message:b}),m(null,f)}function u(f){var h=f.stackInfo.stack;return h&&h.length===0&&f._unhandledStackInfo&&f._unhandledStackInfo.stack&&(h=f._unhandledStackInfo.stack),h}function d(f,h,m){var g=f&&f.data.description,y=f&&f.custom,b=u(f),w=s.guessErrorClass(h.message),S={exception:{class:p(h,w[0],m),message:w[1]}};if(g&&(S.exception.description=g),b){var k,E,T,A,$,I,R,Y;for(b.length===0&&(S.exception.stack=h.rawStack,S.exception.raw=String(h.rawException)),S.frames=[],R=0;R<b.length;++R)E={filename:(k=b[R]).url?o.sanitizeUrl(k.url):"(unknown)",lineno:k.line||null,method:k.func&&k.func!=="?"?k.func:"[anonymous]",colno:k.column},m.sendFrameUrl&&(E.url=k.url),E.method&&E.method.endsWith&&E.method.endsWith("_rollbar_wrapped")||(T=A=$=null,(I=k.context?k.context.length:0)&&(Y=Math.floor(I/2),A=k.context.slice(0,Y),T=k.context[Y],$=k.context.slice(Y)),T&&(E.code=T),(A||$)&&(E.context={},A&&A.length&&(E.context.pre=A),$&&$.length&&(E.context.post=$)),k.args&&(E.args=k.args),S.frames.push(E));S.frames.reverse(),y&&(S.extra=o.merge(y))}return S}function p(f,h,m){return f.name?f.name:m.guessErrorClass?h:"(unknown)"}r.exports={handleDomException:function(f,h,m){if(f.err&&s.Stack(f.err).name==="DOMException"){var g=new Error;g.name=f.err.name,g.message=f.err.message,g.stack=f.err.stack,g.nested=f.err,f.err=g}m(null,f)},handleItemWithError:function(f,h,m){if(f.data=f.data||{},f.err)try{f.stackInfo=f.err._savedStackTrace||s.parse(f.err,f.skipFrames),h.addErrorContext&&function(g){var y=[],b=g.err;for(y.push(b);b.nested||b.cause;)b=b.nested||b.cause,y.push(b);o.addErrorContext(g,y)}(f)}catch(g){c.error("Error while parsing the error object.",g);try{f.message=f.err.message||f.err.description||f.message||String(f.err)}catch(y){f.message=String(f.err)||String(y)}delete f.err}m(null,f)},ensureItemHasSomethingToSay:function(f,h,m){f.message||f.stackInfo||f.custom||m(new Error("No message, stack info, or custom data"),null),m(null,f)},addBaseInfo:function(f,h,m){var g=h.payload&&h.payload.environment||h.environment;f.data=o.merge(f.data,{environment:g,level:f.level,endpoint:h.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:f.uuid,notifier:{name:"rollbar-browser-js",version:h.version},custom:f.custom}),m(null,f)},addRequestInfo:function(f){return function(h,m,g){var y={};f&&f.location&&(y.url=f.location.href,y.query_string=f.location.search);var b="$remote_ip";m.captureIp?m.captureIp!==!0&&(b+="_anonymize"):b=null,b&&(y.user_ip=b),Object.keys(y).length>0&&o.set(h,"data.request",y),g(null,h)}},addClientInfo:function(f){return function(h,m,g){if(!f)return g(null,h);var y=f.navigator||{},b=f.screen||{};o.set(h,"data.client",{runtime_ms:h.timestamp-f._rollbarStartTime,timestamp:Math.round(h.timestamp/1e3),javascript:{browser:y.userAgent,language:y.language,cookie_enabled:y.cookieEnabled,screen:{width:b.width,height:b.height}}}),g(null,h)}},addPluginInfo:function(f){return function(h,m,g){if(!f||!f.navigator)return g(null,h);for(var y,b=[],w=f.navigator.plugins||[],S=0,k=w.length;S<k;++S)y=w[S],b.push({name:y.name,description:y.description});o.set(h,"data.client.javascript.plugins",b),g(null,h)}},addBody:function(f,h,m){f.stackInfo?f.stackInfo.traceChain?function(g,y,b){for(var w=g.stackInfo.traceChain,S=[],k=w.length,E=0;E<k;E++){var T=d(g,w[E],y);S.push(T)}o.set(g,"data.body",{trace_chain:S}),b(null,g)}(f,h,m):function(g,y,b){if(u(g)){var w=d(g,g.stackInfo,y);o.set(g,"data.body",{trace:w}),b(null,g)}else{var S=g.stackInfo,k=s.guessErrorClass(S.message),E=p(S,k[0],y),T=k[1];g.message=E+": "+T,l(g,y,b)}}(f,h,m):l(f,h,m)},addScrubber:function(f){return function(h,m,g){if(f){var y=m.scrubFields||[],b=m.scrubPaths||[];h.data=f(h.data,y,b)}g(null,h)}}}},function(r,i,a){var o,s,c;(function(l,u){s=[a(25)],(c=typeof(o=function(d){var p=/(^|@)\S+:\d+/,f=/^\s*at .*(\S+:\d+|\(native\))/m,h=/^(eval@)?(\[native code])?$/;return{parse:function(m){if(m.stacktrace!==void 0||m["opera#sourceloc"]!==void 0)return this.parseOpera(m);if(m.stack&&m.stack.match(f))return this.parseV8OrIE(m);if(m.stack)return this.parseFFOrSafari(m);throw new Error("Cannot parse given Error object")},extractLocation:function(m){if(m.indexOf(":")===-1)return[m];var g=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(m.replace(/[()]/g,""));return[g[1],g[2]||void 0,g[3]||void 0]},parseV8OrIE:function(m){return m.stack.split(`
|
|
436
|
+
`))}add(r){return this.payload={...this.payload,...r},this}getPayload(){return this.payload}setErrorCodeFromResponse(){const{data:r,status:i}=this.getPayload().axios||{};if(!r&&!i)return;const{errorCode:a}=r||{};a&&this.add({code:a}),i&&(this.httpStatusCode=i)}setMessageFromResponse(){const{data:r}=this.getPayload().axios||{};if(!r)return!1;const{message:i}=r||{};return i?(this.message=i,!0):!1}}class QI extends qm{constructor(t){if(super(t),this.name="NotFoundError",this.message=typeof t=="string"||!t?t:t.message,typeof t=="string"||!t)return;const{response:r}=t;this.add({axios:r}),this.setErrorCodeFromResponse()}}class eR extends qm{constructor(t){if(super(t),this.name="ForbiddenError",this.message=typeof t=="string"||!t?t:t.message,typeof t=="string"||!t)return;const{response:r}=t;this.add({axios:r}),this.setErrorCodeFromResponse(),this.setMessageFromResponse()}}class tR extends qm{constructor(t){if(super(t),this.name="ValidationError",this.message=typeof t=="string"||!t?t:t.message,typeof t=="string"||!t)return;const{response:r}=t;this.add({axios:r}),this.setErrorCodeFromResponse(),this.setMessageFromResponse()}}class nR extends qm{constructor(t){if(super(t),this.name="NetworkError",this.message=typeof t=="string"||!t?t:t.message,typeof t=="string"||!t)return;const{config:r}=t;this.add({axios:r}),this.code="ECONNREFUSED"}}class j3 extends qm{constructor(t){if(super(t),this.name="GeneralError",this.message=typeof t=="string"||!t?t:t.message,typeof t=="string"||!t)return;const{response:r}=t;this.add({axios:r}),this.setErrorCodeFromResponse(),this.setMessageFromResponse()}}const rR=Object.freeze(Object.defineProperty({__proto__:null,ForbiddenError:eR,GeneralError:j3,NetworkError:nR,NotFoundError:QI,ValidationError:tR},Symbol.toStringTag,{value:"Module"})),a3e=n=>{const t=Object.keys(n);let r="";return t.forEach(i=>{const a=typeof n[i]=="object",o=a&&n[i].length>=0;a||(r+=`${i}=${n[i]}&`),a&&o&&n[i].forEach(s=>{r+=`${i}=${s}&`})}),r&&r.slice(0,-1)},iR=n=>{z3.push(n)},o3e=n=>{z3.map(t=>t(n))};function aR(){console.error("User should be logged out!!"),mt.removeItem("token"),mt.removeItem("tokenExpires"),mt.removeItem("refreshToken"),Tr.trigger("user:unauthorized",{error})}let Ym=!1,z3=[];const s3e=(n,{renewToken:t})=>{n.interceptors.request.use(r=>{const i=r;if(i.url.includes("/auth")||i.url.startsWith("/public/"))return i;const a=i.headers["X-TOKEN"];if(!a)return i;const o=mt.getItem("tokenExpires");if(a&&o){const s=new Date;s.setSeconds(s.getSeconds()+30);const c=new Date(o);if(s>c)return t(),new Promise(u=>{iR(d=>{i.headers["X-TOKEN"]=d,u(i)})})}return i},r=>Promise.reject(r))},l3e=(n,{renewToken:t})=>{n.interceptors.response.use(r=>r,r=>{if(!r||!r.response)return Promise.reject(r);const{config:i,response:a}=r,{status:o,data:s}=a,{errorCode:c}=s,l=i;if(l.url.startsWith("/public/"))return Promise.reject(r);function u(){if(c===8001)return!0;const d=mt.getItem("tokenExpires");if(d){const p=new Date,f=new Date(d);return p>f}return!1}if(o===401&&l.headers["X-TOKEN"]&&u()&&!Ym)return t(),new Promise(p=>{iR(f=>{l.headers["X-TOKEN"]=f,p(gi(l))})});if(o===401&&typeof c>"u"){if(l.url.includes("auth/companyUser")&&!l.headers["X-TOKEN"])return Promise.reject(r);if(l.url.includes("auth/actionlink")&&!l.headers["X-TOKEN"])return Promise.reject(r);aR()}return Promise.reject(r)})},oR=n=>(v0(n.data),n),c3e=n=>{n.interceptors.response.use(oR,t=>{const{response:r,config:i}=t;if(!r)throw new nR(t);if(Object.prototype.hasOwnProperty.call(i,"errorHandle")&&i.errorHandle===!1)return Promise.reject(t);const{status:a}=r;switch(a){case 404:throw new QI(t);case 401:throw new eR(t);case 412:throw new tR(t);default:throw new j3(t)}})},u3e=n=>{n.interceptors.response.use(t=>{var r,i;if((i=(r=t.config)==null?void 0:r.url)!=null&&i.includes("document")&&t.config.method==="post"){const a=JSON.parse(t.config.data);a.__tempId&&(t.data.__tempId=a.__tempId)}return t},t=>Promise.reject(t))},d3e=n=>{n.interceptors.request.use(t=>{if(["post","put"].includes(t.method)&&t.data&&!(t.data instanceof FormData)){const r=Ws(t.data);N4(r),t.data=r}return t},t=>Promise.reject(t))},p3e=({baseUrl:n,withCredentials:t,cache:r})=>{const i=gi.create({baseURL:n,timeout:2e4,adapter:r,withCredentials:t,paramsSerializer:p=>a3e(p)});i.defaults.headers["X-CLIENT"]="widget",i.defaults.headers["X-CLIENT-VERSION"]="0.12.1";const a=async(p,f,h=null,m={})=>{const g=f.startsWith("/public/"),y=mt.getItem("token");switch(y&&!g&&(i.defaults.headers["X-TOKEN"]=y),p){case"get":return i.get(f,m);case"post":return i.post(f,h,m);case"put":return i.put(f,h,m);case"delete":return i.delete(f,m);case"patch":return i.patch(f,h,m);default:throw new Error(`SendRequest failed as method: '${p}' is not implemented`)}},o=(p,f={})=>a("get",p,null,f),s=(p,f={},h={})=>a("put",p,f,h),c=(p,f,h={})=>a("post",p,f,h),l=(p,f={})=>a("delete",p,null,f),u=(p,f={})=>a("patch",p,null,f),d=async()=>{if(!Ym)try{Ym=!0;const p=mt.getItem("refreshToken"),f=await c("/auth/companyUser",{refreshToken:p});if(!f.data||!f.data.token)throw new Error("No token was defined in result");const{token:h,tokenExpires:m,refreshToken:g}=f.data;mt.setItem("token",h),mt.setItem("tokenExpires",m),g&&mt.setItem("refreshToken",g),Ym=!1,o3e(h),z3=[]}catch(p){return console.error(p),aR()}finally{Ym=!1}};return s3e(i,{renewToken:d}),l3e(i,{renewToken:d}),oR(i),c3e(i),d3e(i),u3e(i),{instance:i,get:o,put:s,post:c,del:l,patch:u,renewToken:d}},V3=new Map;function f3e(n){if(typeof n>"u")throw new Error("Missing valid parameter url");if(typeof n!="string")throw new Error("Parameter url must be a string");const{data:t,cachedAt:r,expiresAt:i}=V3.get(n)||{};return Date.now()>r+6e4*30||i&&Date.now()>i?(V3.delete(n),null):t}const h3e=async n=>{const{url:t,params:r={}}=n,i=Object.keys(r).map(s=>`${s}=${r[s]}`).join("&"),a=`${t}${i?`?${i}`:""}`;return f3e(a),await gi({...n,adapter:gi.defaults.adapter})},Np={withCredentials:!0,baseUrl:Xe.api.baseUrl},{get:xt,post:rn,put:Vr,patch:Qo,del:qi,instance:X9t,renewToken:m3e}=p3e({withCredentials:Np.withCredentials,baseUrl:Np.baseUrl,cache:h3e});async function sR(n){const t=z1e(n);return xt(`/project${t}`,{saveCache:!0})}const g3e=async(n,t={})=>xt("/project",n,{params:t}),v3e=async(n,t={})=>xt(`/project/${n}`,{params:t,saveCache:!0}),y3e=async(n,t,r={})=>Vr(`/project/${n}`,t,{params:r,invalidateCache:{type:"project",id:n}}),b3e=async n=>Qo(`/project/${n}`),_3e=async(n,t={})=>qi(`/project/${n}`,{params:t,invalidateCache:{type:"project",id:n}}),w3e=async()=>xt("/project/createDemo"),x3e=()=>xt("/"),C3e=async(n,t={})=>rn("/auth/actionlink",{token:n,...t}),k3e=async n=>rn("/register",n),S3e=async(n,t)=>rn("/companyUser/forgottenPassword/new",{password:n,resetPasswordToken:t}),T3e=async n=>rn("/public/consent",n),E3e=async n=>xt(`/projectFile/${n}`),$3e=async n=>rn("/projectFile",n),A3e=async(n,t)=>Vr(`/projectFile/${n}`,t),O3e=async n=>qi(`/projectFile/${n}`),D3e=async n=>Qo(`/projectFile/${n}`),M3e=async(n,t={})=>xt(`/projectNote/${n}`,{params:t}),P3e=async(n,t={})=>rn("/projectNote",n,{params:t}),I3e=async(n,t,r={})=>Vr(`/projectNote/${n}`,t,{params:r}),R3e=async n=>xt(`/file/${n}`),lR=async n=>rn("/file",n),L3e=async(n,t)=>Vr(`/file/${n}`,t),F3e=async n=>qi(`/file/${n}`),N3e=async n=>Qo(`/file/${n}`),B3e=async(n={})=>xt("/article",{params:n}),j3e=async n=>xt(`/article/${n}`),z3e=async n=>rn("/article",n),V3e=async(n,t)=>Vr(`/article/${n}`,t),U3e=async n=>qi(`/article/${n}`),H3e=async n=>Qo(`/article/${n}`),W3e=async n=>rn("/search",{type:"article",query:n}),Km={get:async(n,t={})=>xt(n?`/unitType/${n}`:"/unitType",{params:t,saveCache:!0}),post:async(n,t={})=>rn("/unitType",n,{params:t}),put:async(n,t,r={})=>Vr(`/unitType/${n}`,t,{params:r,invalidateCache:{type:"unitType",id:n}}),delete:async(n,t={})=>qi(`/unitType/${n}`,{params:t,invalidateCache:{type:"unitType",id:n}})},G3e=async(n={})=>xt("/templateMessage",{params:n,saveCache:!0}),q3e=async(n,t={})=>xt(`/templateMessage/${n}`,{params:t,saveCache:!0}),Y3e=async(n,t={})=>rn("/templateMessage",n,{params:t}),K3e=async(n,t,r={})=>Vr(`/templateMessage/${n}`,t,{params:r,invalidateCache:{type:"templateMessage",id:n}}),Z3e=async(n,t={})=>qi(`/templateMessage/${n}`,{params:t,invalidateCache:{type:"templateMessage",id:n}}),J3e=async(n,t={})=>Qo(`/templateMessage/${n}`,{params:t}),X3e=async(n={})=>xt("/endCustomer",{params:n}),Q3e=async(n,t={})=>xt(`/endCustomer/${n}`,{params:t}),eCe=async(n,t={})=>rn("/endCustomer",n,{params:t}),tCe=async(n,t,r={})=>Vr(`/endCustomer/${n}`,t,{params:r}),nCe=async(n,t={})=>qi(`/endCustomer/${n}`,{params:t}),rCe=async(n,t={})=>Qo(`/endCustomer/${n}`,{params:t}),iCe=async(n={})=>xt("/companyUser",{params:n,saveCache:!0}),aCe=async(n,t={})=>xt(`/companyUser/${n}`,{params:t,saveCache:!0}),oCe=async(n,t={})=>rn("/companyUser",n,{params:t}),sCe=async(n,t,r={})=>Vr(`/companyUser/${n}`,t,{params:r,invalidateCache:{type:"companyUser",id:n}}),lCe=async(n,t={})=>qi(`/companyUser/${n}`,{params:t,invalidateCache:{type:"companyUser",id:n}}),cCe=async(n,t={})=>Qo(`/companyUser/${n}`,{params:t}),cR={getPublic:async(n,t={})=>xt(`/public/companyUser/${n}`,{params:t}),getConnectedUsers:async(n={})=>xt("/companyUser/self/connectedUsers",{params:n}),getConnectedUserAuth:async(n,t={})=>xt(`/companyUser/self/connectedUsers/${n}/auth`,{params:t}),setConnectedUserDefault:async(n,t={})=>Vr(`/companyUser/self/connectedUsers/${n}/setDefaultAuth`,{params:t}),verifyEmail:async(n,t={})=>rn("/public/verifyEmail/companyUser",n,{params:t})},uCe=async(n,t=null,r={})=>Vr(`/companyAccount/accountType/${n}`,t,{params:r}),dCe=async(n={})=>xt("/companyAccount/getNumberOfManagers",{params:n}),pCe=async(n={})=>rn("/companyAccount/addUserLicenseInvoice",{},{params:n}),fCe=async(n,t={})=>xt(`/promotionCode/${n}/canUse`,{params:t}),hCe=async(n,t={})=>xt("/promotionCode/inUse",{params:t}),ey={product:async(n,t={})=>rn("/companyAccount/product",n,{params:t}),cancelAll:async(n={})=>qi("/companyAccount/subscription",{params:n}),getPrices:async(n={})=>xt("/companyAccount/price",{params:n}),getUpcomingInvoices:async(n={})=>xt("/companyAccount/upcomingInvoice",{params:n}),getPaymentHistory:async(n={})=>xt("/companyAccount/paymentHistory",{params:n}),putPaymentMethod:async(n,t={})=>Vr("/companyAccount/paymentMethod",n,{params:t}),putCustomer:async(n,t={})=>Vr("/companyAccount/customer",n,{params:t}),createCheckoutSession:async(n,t={})=>rn("/companyAccount/create-checkout-session",n,{params:t})},mCe=async(n,t)=>rn(`/project/${n}/projectMember/${t}`,null,{invalidateCache:{type:"project",id:n}}),gCe=async(n,t)=>qi(`/project/${n}/projectMember/${t}`,{invalidateCache:{type:"project",id:n}}),Yi={get:async(n,t={})=>xt(`/document/${n}`,{params:t,saveCache:!0}),getAll:async(n={})=>xt("/document",{params:n,saveCache:!0}),post:async(n,t={})=>rn("/document",n,{params:t}),send:async(n,t={},r={})=>rn(`/document/${n}/send`,t,{params:r,invalidateCache:{type:"document",id:n}}),clearAnswers:async(n,t={},r={})=>rn(`/document/${n}/clearAnswers`,t,{params:r,invalidateCache:{type:"document",id:n}}),put:async(n,t,r={})=>Vr(`/document/${n}`,t,{params:r,invalidateCache:{type:"document",id:n}}),delete:async(n,t={})=>qi(`/document/${n}`,{params:t,invalidateCache:{type:"document",id:n}}),patch:async(n,t={})=>Qo(`/document/${n}`,{params:t}),validate:async(n,t={})=>rn("/documentValidate",n,{params:t})},Jl={get:async(n,t={})=>xt(n?`/template/${n}`:"/template",{params:t}),post:async(n,t={})=>rn("/template",n,{params:t}),put:async(n,t,r={})=>Vr(`/template/${n}`,t,{params:r}),delete:async(n,t={})=>qi(`/template/${n}`,{params:t}),patch:async(n,t={})=>Qo(`/template/${n}`,{params:t})},U3={get:async(n={})=>xt("/templateGallery",{params:n})},vCe={get:async(n,t={})=>xt(`/public/templateStat/${n}`,{params:t})},Bp={get:async(n,t={})=>xt(`/public/document/${n}`,{params:t}),put:async(n,t,r={})=>Vr(`/public/document/${n}`,t,{headers:r}),answer:async(n,t,r={},i={})=>rn(`/public/document/${n}/answer`,t,{params:r,headers:i}),feedback:async(n,t,r={})=>rn(`/public/document/${n}/feedback`,t,{params:r})},uR={get:async(n,t={})=>xt(`/public/pdfJob/${n}`,{params:t}),addDocument:async(n,t={})=>xt(`/public/document/${n}/pdfJob/start`,{params:t})},dR={getDocuments:async(n={})=>{const t=mt.getItem("clientToken");return gi.get(`${Np.baseUrl}/client/document`,{headers:{Authorization:t},params:n})},requestMagicLink:async(n,t={})=>gi.post(`${Np.baseUrl}/client/requestMagicLink`,n,{params:t})},ty={get:async(n,t={})=>xt(`/public/company/${n}`,{params:t}),getCertificates:async(n,t={})=>xt(`/public/company/${n}/certificates`,{params:t}),getReferences:async(n,t={})=>xt(`/public/company/${n}/references`,{params:t})},yCe={get:async(n,t={})=>xt(`${Np.baseUrl}/public/signature/${n}`,{params:t})},H3={post:async(n,t={})=>rn("/voucher",n,{params:t}),canUse:async(n,t={})=>xt(`/voucher/${n}/canUse`,{params:t})},Xl={getAuthUrl:async(n,t={})=>xt("/extension/authUrl",{params:{...t,service:n}}),getPublicAuthUrl:async(n,t={})=>xt("/public/extension/authUrl",{params:{...t,service:n}}),install:async(n,t,r={})=>rn("/extension/install",t,{params:{...r,service:n}}),uninstall:async(n,t={})=>qi("/extension/uninstall",{params:{...t,service:n}}),suggestClients:async(n,t={})=>xt("/extension/suggestClients",{params:{...t,service:n},saveCache:!0,cacheTtl:20}),signupWithCrm:async(n,t,r={})=>rn("/public/extension/register",t,{params:{...r,service:n}}),search:async(n,t={})=>xt("/extension/search",{params:{...t,service:n},saveCache:!0,cacheTtl:10}),getFields:async(n,t={})=>xt("/extension/fields",{params:{...t,service:n},saveCache:!0,cacheTtl:60}),getExternalReferenceDetails:async(n,t={})=>xt("/extension/externalReferenceDetails",{params:{...t,service:n},saveCache:!0,cacheTtl:20}),settings:async(n,t={})=>xt("/extension/settings",{params:{...t,service:n}})},ni={get:xt,post:rn,put:Vr,del:qi,patch:Qo,authData:Np,getProjects:sR};var pR={exports:{}};(function(n,t){(function(r,i){n.exports=i()})(Zt,function(){return function(r){var i={};function a(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return r[o].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=r,a.c=i,a.d=function(o,s,c){a.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:c})},a.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,s){if(1&s&&(o=a(o)),8&s||4&s&&typeof o=="object"&&o&&o.__esModule)return o;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:o}),2&s&&typeof o!="string")for(var l in o)a.d(c,l,function(u){return o[u]}.bind(null,l));return c},a.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(s,"a",s),s},a.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},a.p="",a(a.s=6)}([function(r,i,a){var o=a(12),s={};function c(E,T){return T===l(E)}function l(E){var T=typeof E;return T!=="object"?T:E?E instanceof Error?"error":{}.toString.call(E).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function u(E){return c(E,"function")}function d(E){var T=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),A=RegExp("^"+T+"$");return p(E)&&A.test(E)}function p(E){var T=typeof E;return E!=null&&(T=="object"||T=="function")}function f(){var E=k();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(T){var A=(E+16*Math.random())%16|0;return E=Math.floor(E/16),(T==="x"?A:7&A|8).toString(16)})}var h={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function m(E,T){var A,$;try{A=s.stringify(E)}catch(I){if(T&&u(T))try{A=T(E)}catch(R){$=R}else $=I}return{error:$,value:A}}function g(E,T){return function(A,$){try{T(A,$)}catch(I){E.error(I)}}}function y(E){return function T(A,$){var I,R,Y,L={};try{for(R in A)(I=A[R])&&(c(I,"object")||c(I,"array"))?$.includes(I)?L[R]="Removed circular reference: "+l(I):((Y=$.slice()).push(I),L[R]=T(I,Y)):L[R]=I}catch(D){L="Failed cloning custom data: "+D.message}return L}(E,[E])}var b=["log","network","dom","navigation","error","manual"],w=["critical","error","warning","info","debug"];function S(E,T){for(var A=0;A<E.length;++A)if(E[A]===T)return!0;return!1}function k(){return Date.now?+Date.now():+new Date}r.exports={addParamsAndAccessTokenToPath:function(E,T,A){(A=A||{}).access_token=E;var $,I=[];for($ in A)Object.prototype.hasOwnProperty.call(A,$)&&I.push([$,A[$]].join("="));var R="?"+I.sort().join("&");(T=T||{}).path=T.path||"";var Y,L=T.path.indexOf("?"),D=T.path.indexOf("#");L!==-1&&(D===-1||D>L)?(Y=T.path,T.path=Y.substring(0,L)+R+"&"+Y.substring(L+1)):D!==-1?(Y=T.path,T.path=Y.substring(0,D)+R+Y.substring(D)):T.path=T.path+R},createItem:function(E,T,A,$,I){for(var R,Y,L,D,B,z,K=[],te=[],j=0,M=E.length;j<M;++j){var q=l(z=E[j]);switch(te.push(q),q){case"undefined":break;case"string":R?K.push(z):R=z;break;case"function":D=g(T,z);break;case"date":K.push(z);break;case"error":case"domexception":case"exception":Y?K.push(z):Y=z;break;case"object":case"array":if(z instanceof Error||typeof DOMException<"u"&&z instanceof DOMException){Y?K.push(z):Y=z;break}if($&&q==="object"&&!B){for(var G=0,ee=$.length;G<ee;++G)if(z[$[G]]!==void 0){B=z;break}if(B)break}L?K.push(z):L=z;break;default:if(z instanceof Error||typeof DOMException<"u"&&z instanceof DOMException){Y?K.push(z):Y=z;break}K.push(z)}}L&&(L=y(L)),K.length>0&&(L||(L=y({})),L.extraArgs=y(K));var ae={message:R,err:Y,custom:L,timestamp:k(),callback:D,notifier:A,diagnostic:{},uuid:f()};return function(ve,ye){ye&&ye.level!==void 0&&(ve.level=ye.level,delete ye.level),ye&&ye.skipFrames!==void 0&&(ve.skipFrames=ye.skipFrames,delete ye.skipFrames)}(ae,L),$&&B&&(ae.request=B),I&&(ae.lambdaContext=I),ae._originalArgs=E,ae.diagnostic.original_arg_types=te,ae},addErrorContext:function(E,T){var A=E.data.custom||{},$=!1;try{for(var I=0;I<T.length;++I)T[I].hasOwnProperty("rollbarContext")&&(A=o(A,y(T[I].rollbarContext)),$=!0);$&&(E.data.custom=A)}catch(R){E.diagnostic.error_context="Failed: "+R.message}},createTelemetryEvent:function(E){for(var T,A,$,I,R=0,Y=E.length;R<Y;++R)switch(l(I=E[R])){case"string":!T&&S(b,I)?T=I:!$&&S(w,I)&&($=I);break;case"object":A=I}return{type:T||"manual",metadata:A||{},level:$}},filterIp:function(E,T){if(E&&E.user_ip&&T!==!0){var A=E.user_ip;if(T)try{var $;if(A.indexOf(".")!==-1)($=A.split(".")).pop(),$.push("0"),A=$.join(".");else if(A.indexOf(":")!==-1){if(($=A.split(":")).length>2){var I=$.slice(0,3),R=I[2].indexOf("/");R!==-1&&(I[2]=I[2].substring(0,R)),A=I.concat("0000:0000:0000:0000:0000").join(":")}}else A=null}catch{A=null}else A=null;E.user_ip=A}},formatArgsAsString:function(E){var T,A,$,I=[];for(T=0,A=E.length;T<A;++T){switch(l($=E[T])){case"object":($=($=m($)).error||$.value).length>500&&($=$.substr(0,497)+"...");break;case"null":$="null";break;case"undefined":$="undefined";break;case"symbol":$=$.toString()}I.push($)}return I.join(" ")},formatUrl:function(E,T){if(!(T=T||E.protocol)&&E.port&&(E.port===80?T="http:":E.port===443&&(T="https:")),T=T||"https:",!E.hostname)return null;var A=T+"//"+E.hostname;return E.port&&(A=A+":"+E.port),E.path&&(A+=E.path),A},get:function(E,T){if(E){var A=T.split("."),$=E;try{for(var I=0,R=A.length;I<R;++I)$=$[A[I]]}catch{$=void 0}return $}},handleOptions:function(E,T,A,$){var I=o(E,T,A);return I=function(R,Y){return R.hostWhiteList&&!R.hostSafeList&&(R.hostSafeList=R.hostWhiteList,R.hostWhiteList=void 0,Y&&Y.log("hostWhiteList is deprecated. Use hostSafeList.")),R.hostBlackList&&!R.hostBlockList&&(R.hostBlockList=R.hostBlackList,R.hostBlackList=void 0,Y&&Y.log("hostBlackList is deprecated. Use hostBlockList.")),R}(I,$),!T||T.overwriteScrubFields||T.scrubFields&&(I.scrubFields=(E.scrubFields||[]).concat(T.scrubFields)),I},isError:function(E){return c(E,"error")||c(E,"exception")},isFiniteNumber:function(E){return Number.isFinite(E)},isFunction:u,isIterable:function(E){var T=l(E);return T==="object"||T==="array"},isNativeFunction:d,isObject:p,isString:function(E){return typeof E=="string"||E instanceof String},isType:c,isPromise:function(E){return p(E)&&c(E.then,"function")},jsonParse:function(E){var T,A;try{T=s.parse(E)}catch($){A=$}return{error:A,value:T}},LEVELS:{debug:0,info:1,warning:2,error:3,critical:4},makeUnhandledStackInfo:function(E,T,A,$,I,R,Y,L){var D={url:T||"",line:A,column:$};D.func=L.guessFunctionName(D.url,D.line),D.context=L.gatherContext(D.url,D.line);var B=typeof document<"u"&&document&&document.location&&document.location.href,z=typeof window<"u"&&window&&window.navigator&&window.navigator.userAgent;return{mode:R,message:I?String(I):E||Y,url:B,stack:[D],useragent:z}},merge:o,now:k,redact:function(){return"********"},RollbarJSON:s,sanitizeUrl:function(E){var T=function(A){if(c(A,"string")){for(var $=h,I=$.parser[$.strictMode?"strict":"loose"].exec(A),R={},Y=0,L=$.key.length;Y<L;++Y)R[$.key[Y]]=I[Y]||"";return R[$.q.name]={},R[$.key[12]].replace($.q.parser,function(D,B,z){B&&(R[$.q.name][B]=z)}),R}}(E);return T?(T.anchor===""&&(T.source=T.source.replace("#","")),E=T.source.replace("?"+T.query,"")):"(unknown)"},set:function(E,T,A){if(E){var $=T.split("."),I=$.length;if(!(I<1))if(I!==1)try{for(var R=E[$[0]]||{},Y=R,L=1;L<I-1;++L)R[$[L]]=R[$[L]]||{},R=R[$[L]];R[$[I-1]]=A,E[$[0]]=Y}catch{return}else E[$[0]]=A}},setupJSON:function(E){u(s.stringify)&&u(s.parse)||(c(JSON,"undefined")||(E?(d(JSON.stringify)&&(s.stringify=JSON.stringify),d(JSON.parse)&&(s.parse=JSON.parse)):(u(JSON.stringify)&&(s.stringify=JSON.stringify),u(JSON.parse)&&(s.parse=JSON.parse))),u(s.stringify)&&u(s.parse)||E&&E(s))},stringify:m,maxByteSize:function(E){for(var T=0,A=E.length,$=0;$<A;$++){var I=E.charCodeAt($);I<128?T+=1:I<2048?T+=2:I<65536&&(T+=3)}return T},typeName:l,uuid4:f}},function(r,i,a){a(17);var o=a(18),s=a(0);r.exports={error:function(){var c=Array.prototype.slice.call(arguments,0);c.unshift("Rollbar:"),o.ieVersion()<=8?console.error(s.formatArgsAsString(c)):console.error.apply(console,c)},info:function(){var c=Array.prototype.slice.call(arguments,0);c.unshift("Rollbar:"),o.ieVersion()<=8?console.info(s.formatArgsAsString(c)):console.info.apply(console,c)},log:function(){var c=Array.prototype.slice.call(arguments,0);c.unshift("Rollbar:"),o.ieVersion()<=8?console.log(s.formatArgsAsString(c)):console.log.apply(console,c)}}},function(r,i,a){r.exports={parse:function(o){var s,c,l={protocol:null,auth:null,host:null,path:null,hash:null,href:o,hostname:null,port:null,pathname:null,search:null,query:null};if((s=o.indexOf("//"))!==-1?(l.protocol=o.substring(0,s),c=s+2):c=0,(s=o.indexOf("@",c))!==-1&&(l.auth=o.substring(c,s),c=s+1),(s=o.indexOf("/",c))===-1){if((s=o.indexOf("?",c))===-1)return(s=o.indexOf("#",c))===-1?l.host=o.substring(c):(l.host=o.substring(c,s),l.hash=o.substring(s)),l.hostname=l.host.split(":")[0],l.port=l.host.split(":")[1],l.port&&(l.port=parseInt(l.port,10)),l;l.host=o.substring(c,s),l.hostname=l.host.split(":")[0],l.port=l.host.split(":")[1],l.port&&(l.port=parseInt(l.port,10)),c=s}else l.host=o.substring(c,s),l.hostname=l.host.split(":")[0],l.port=l.host.split(":")[1],l.port&&(l.port=parseInt(l.port,10)),c=s;if((s=o.indexOf("#",c))===-1?l.path=o.substring(c):(l.path=o.substring(c,s),l.hash=o.substring(s)),l.path){var u=l.path.split("?");l.pathname=u[0],l.query=u[1],l.search=l.query?"?"+l.query:null}return l}}},function(r,i,a){var o=a(24),s=new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ");function c(){return null}function l(p){var f={};return f._stackFrame=p,f.url=p.fileName,f.line=p.lineNumber,f.func=p.functionName,f.column=p.columnNumber,f.args=p.args,f.context=null,f}function u(p,f){return{stack:function(){var h=[];f=f||0;try{h=o.parse(p)}catch{h=[]}for(var m=[],g=f;g<h.length;g++)m.push(new l(h[g]));return m}(),message:p.message,name:d(p),rawStack:p.stack,rawException:p}}function d(p){var f=p.name&&p.name.length&&p.name,h=p.constructor.name&&p.constructor.name.length&&p.constructor.name;return f&&h?f==="Error"?h:f:f||h}r.exports={guessFunctionName:function(){return"?"},guessErrorClass:function(p){if(!p||!p.match)return["Unknown error. There was no error message to display.",""];var f=p.match(s),h="(unknown)";return f&&(h=f[f.length-1],p=(p=p.replace((f[f.length-2]||"")+h+":","")).replace(/(^[\s]+|[\s]+$)/g,"")),[h,p]},gatherContext:c,parse:function(p,f){var h=p;if(h.nested||h.cause){for(var m=[];h;)m.push(new u(h,f)),h=h.nested||h.cause,f=0;return m[0].traceChain=m,m[0]}return new u(h,f)},Stack:u,Frame:l}},function(r,i,a){var o=a(0),s=a(5);function c(l,u){var d=u.split("."),p=d.length-1;try{for(var f=0;f<=p;++f)f<p?l=l[d[f]]:l[d[f]]=o.redact()}catch{}}r.exports=function(l,u,d){if(u=u||[],d)for(var p=0;p<d.length;++p)c(l,d[p]);var f=function(g){for(var y,b=[],w=0;w<g.length;++w)y="^\\[?(%5[bB])?"+g[w]+"\\[?(%5[bB])?\\]?(%5[dD])?$",b.push(new RegExp(y,"i"));return b}(u),h=function(g){for(var y,b=[],w=0;w<g.length;++w)y="\\[?(%5[bB])?"+g[w]+"\\[?(%5[bB])?\\]?(%5[dD])?",b.push(new RegExp("("+y+"=)([^&\\n]+)","igm"));return b}(u);function m(g,y){return y+o.redact()}return s(l,function g(y,b,w){var S=function(k,E){var T;for(T=0;T<f.length;++T)if(f[T].test(k)){E=o.redact();break}return E}(y,b);return S===b?o.isType(b,"object")||o.isType(b,"array")?s(b,g,w):function(k){var E;if(o.isType(k,"string"))for(E=0;E<h.length;++E)k=k.replace(h[E],m);return k}(S):S})}},function(r,i,a){var o=a(0);r.exports=function(s,c,l){var u,d,p,f,h=o.isType(s,"object"),m=o.isType(s,"array"),g=[];if(l=l||{obj:[],mapped:[]},h){if(f=l.obj.indexOf(s),h&&f!==-1)return l.mapped[f]||l.obj[f];l.obj.push(s),f=l.obj.length-1}if(h)for(u in s)Object.prototype.hasOwnProperty.call(s,u)&&g.push(u);else if(m)for(p=0;p<s.length;++p)g.push(p);var y=h?{}:[],b=!0;for(p=0;p<g.length;++p)d=s[u=g[p]],y[u]=c(u,d,l),b=b&&y[u]===s[u];return h&&!b&&(l.mapped[f]=y),b?s:y}},function(r,i,a){r.exports=a(7)},function(r,i,a){var o=a(8),s=typeof window<"u"&&window._rollbarConfig,c=s&&s.globalAlias||"Rollbar",l=typeof window<"u"&&window[c]&&typeof window[c].shimId=="function"&&window[c].shimId()!==void 0;if(typeof window>"u"||window._rollbarStartTime||(window._rollbarStartTime=new Date().getTime()),!l&&s){var u=new o(s);window[c]=u}else typeof window<"u"?(window.rollbar=o,window._rollbarDidLoad=!0):typeof self<"u"&&(self.rollbar=o,self._rollbarDidLoad=!0);r.exports=o},function(r,i,a){var o=a(9),s=a(31),c=a(32),l=a(35),u=a(37),d=a(4),p=a(38);o.setComponents({telemeter:s,instrumenter:c,polyfillJSON:l,wrapGlobals:u,scrub:d,truncation:p}),r.exports=o},function(r,i,a){var o=a(10),s=a(0),c=a(15),l=a(1),u=a(19),d=a(20),p=a(2),f=a(23),h=a(26),m=a(27),g=a(28),y=a(3);function b(I,R){this.options=s.handleOptions($,I,null,l),this.options._configuredOptions=I;var Y=this.components.telemeter,L=this.components.instrumenter,D=this.components.polyfillJSON;this.wrapGlobals=this.components.wrapGlobals,this.scrub=this.components.scrub;var B=this.components.truncation,z=new d(B),K=new c(this.options,z,p,B);Y&&(this.telemeter=new Y(this.options)),this.client=R||new o(this.options,K,l,this.telemeter,"browser");var te=E(),j=typeof document<"u"&&document;this.isChrome=te.chrome&&te.chrome.runtime,this.anonymousErrorsPending=0,function(M,q,G){M.addTransform(f.handleDomException).addTransform(f.handleItemWithError).addTransform(f.ensureItemHasSomethingToSay).addTransform(f.addBaseInfo).addTransform(f.addRequestInfo(G)).addTransform(f.addClientInfo(G)).addTransform(f.addPluginInfo(G)).addTransform(f.addBody).addTransform(h.addMessageWithError).addTransform(h.addTelemetryData).addTransform(h.addConfigToPayload).addTransform(f.addScrubber(q.scrub)).addTransform(h.addPayloadOptions).addTransform(h.userTransform(l)).addTransform(h.addConfiguredOptions).addTransform(h.addDiagnosticKeys).addTransform(h.itemToPayload)}(this.client.notifier,this,te),this.client.queue.addPredicate(g.checkLevel).addPredicate(m.checkIgnore).addPredicate(g.userCheckIgnore(l)).addPredicate(g.urlIsNotBlockListed(l)).addPredicate(g.urlIsSafeListed(l)).addPredicate(g.messageIsIgnored(l)),this.setupUnhandledCapture(),L&&(this.instrumenter=new L(this.options,this.client.telemeter,this,te,j),this.instrumenter.instrument()),s.setupJSON(D),this.rollbar=this}var w=null;function S(I){var R="Rollbar is not initialized";l.error(R),I&&I(new Error(R))}function k(I){for(var R=0,Y=I.length;R<Y;++R)if(s.isFunction(I[R]))return I[R]}function E(){return typeof window<"u"&&window||typeof self<"u"&&self}b.init=function(I,R){return w?w.global(I).configure(I):w=new b(I,R)},b.prototype.components={},b.setComponents=function(I){b.prototype.components=I},b.prototype.global=function(I){return this.client.global(I),this},b.global=function(I){if(w)return w.global(I);S()},b.prototype.configure=function(I,R){var Y=this.options,L={};return R&&(L={payload:R}),this.options=s.handleOptions(Y,I,L,l),this.options._configuredOptions=s.handleOptions(Y._configuredOptions,I,L),this.client.configure(this.options,R),this.instrumenter&&this.instrumenter.configure(this.options),this.setupUnhandledCapture(),this},b.configure=function(I,R){if(w)return w.configure(I,R);S()},b.prototype.lastError=function(){return this.client.lastError},b.lastError=function(){if(w)return w.lastError();S()},b.prototype.log=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.log(I),{uuid:R}},b.log=function(){if(w)return w.log.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.debug=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.debug(I),{uuid:R}},b.debug=function(){if(w)return w.debug.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.info=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.info(I),{uuid:R}},b.info=function(){if(w)return w.info.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.warn=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.warn(I),{uuid:R}},b.warn=function(){if(w)return w.warn.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.warning=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.warning(I),{uuid:R}},b.warning=function(){if(w)return w.warning.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.error=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.error(I),{uuid:R}},b.error=function(){if(w)return w.error.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.critical=function(){var I=this._createItem(arguments),R=I.uuid;return this.client.critical(I),{uuid:R}},b.critical=function(){if(w)return w.critical.apply(w,arguments);var I=k(arguments);S(I)},b.prototype.buildJsonPayload=function(I){return this.client.buildJsonPayload(I)},b.buildJsonPayload=function(){if(w)return w.buildJsonPayload.apply(w,arguments);S()},b.prototype.sendJsonPayload=function(I){return this.client.sendJsonPayload(I)},b.sendJsonPayload=function(){if(w)return w.sendJsonPayload.apply(w,arguments);S()},b.prototype.setupUnhandledCapture=function(){var I=E();this.unhandledExceptionsInitialized||(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(u.captureUncaughtExceptions(I,this),this.wrapGlobals&&this.options.wrapGlobalEventHandlers&&this.wrapGlobals(I,this),this.unhandledExceptionsInitialized=!0),this.unhandledRejectionsInitialized||(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&(u.captureUnhandledRejections(I,this),this.unhandledRejectionsInitialized=!0)},b.prototype.handleUncaughtException=function(I,R,Y,L,D,B){if(this.options.captureUncaught||this.options.handleUncaughtExceptions){if(this.options.inspectAnonymousErrors&&this.isChrome&&D===null&&R==="")return"anonymous";var z,K=s.makeUnhandledStackInfo(I,R,Y,L,D,"onerror","uncaught exception",y);s.isError(D)?(z=this._createItem([I,D,B]))._unhandledStackInfo=K:s.isError(R)?(z=this._createItem([I,R,B]))._unhandledStackInfo=K:(z=this._createItem([I,B])).stackInfo=K,z.level=this.options.uncaughtErrorLevel,z._isUncaught=!0,this.client.log(z)}},b.prototype.handleAnonymousErrors=function(){if(this.options.inspectAnonymousErrors&&this.isChrome){var I=this;try{Error.prepareStackTrace=function(R,Y){if(I.options.inspectAnonymousErrors&&I.anonymousErrorsPending){if(I.anonymousErrorsPending-=1,!R)return;R._isAnonymous=!0,I.handleUncaughtException(R.message,null,null,null,R)}return R.stack}}catch(R){this.options.inspectAnonymousErrors=!1,this.error("anonymous error handler failed",R)}}},b.prototype.handleUnhandledRejection=function(I,R){if(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections){var Y="unhandled rejection was null or undefined!";if(I)if(I.message)Y=I.message;else{var L=s.stringify(I);L.value&&(Y=L.value)}var D,B=I&&I._rollbarContext||R&&R._rollbarContext;s.isError(I)?D=this._createItem([Y,I,B]):(D=this._createItem([Y,I,B])).stackInfo=s.makeUnhandledStackInfo(Y,"",0,0,null,"unhandledrejection","",y),D.level=this.options.uncaughtErrorLevel,D._isUncaught=!0,D._originalArgs=D._originalArgs||[],D._originalArgs.push(R),this.client.log(D)}},b.prototype.wrap=function(I,R,Y){try{var L;if(L=s.isFunction(R)?R:function(){return R||{}},!s.isFunction(I)||I._isWrap)return I;if(!I._rollbar_wrapped&&(I._rollbar_wrapped=function(){Y&&s.isFunction(Y)&&Y.apply(this,arguments);try{return I.apply(this,arguments)}catch(z){var B=z;throw B&&window._rollbarWrappedError!==B&&(s.isType(B,"string")&&(B=new String(B)),B._rollbarContext=L()||{},B._rollbarContext._wrappedSource=I.toString(),window._rollbarWrappedError=B),B}},I._rollbar_wrapped._isWrap=!0,I.hasOwnProperty))for(var D in I)I.hasOwnProperty(D)&&D!=="_rollbar_wrapped"&&(I._rollbar_wrapped[D]=I[D]);return I._rollbar_wrapped}catch{return I}},b.wrap=function(I,R){if(w)return w.wrap(I,R);S()},b.prototype.captureEvent=function(){var I=s.createTelemetryEvent(arguments);return this.client.captureEvent(I.type,I.metadata,I.level)},b.captureEvent=function(){if(w)return w.captureEvent.apply(w,arguments);S()},b.prototype.captureDomContentLoaded=function(I,R){return R||(R=new Date),this.client.captureDomContentLoaded(R)},b.prototype.captureLoad=function(I,R){return R||(R=new Date),this.client.captureLoad(R)},b.prototype.loadFull=function(){l.info("Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.")},b.prototype._createItem=function(I){return s.createItem(I,l,this)};var T=a(29),A=a(30),$={version:T.version,scrubFields:A.scrubFields,logLevel:T.logLevel,reportLevel:T.reportLevel,uncaughtErrorLevel:T.uncaughtErrorLevel,endpoint:T.endpoint,verbose:!1,enabled:!0,transmit:!0,sendConfig:!1,includeItemsInTelemetry:!0,captureIp:!0,inspectAnonymousErrors:!0,ignoreDuplicateErrors:!0,wrapGlobalEventHandlers:!1};r.exports=b},function(r,i,a){var o=a(11),s=a(13),c=a(14),l=a(0);function u(f,h,m,g,y){this.options=l.merge(f),this.logger=m,u.rateLimiter.configureGlobal(this.options),u.rateLimiter.setPlatformOptions(y,this.options),this.api=h,this.queue=new s(u.rateLimiter,h,m,this.options);var b=this.options.tracer||null;p(b)?(this.tracer=b,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier=new c(this.queue,this.options),this.telemeter=g,d(f),this.lastError=null,this.lastErrorHash="none"}function d(f){f.stackTraceLimit&&(Error.stackTraceLimit=f.stackTraceLimit)}function p(f){if(!f||!f.scope||typeof f.scope!="function")return!1;var h=f.scope();return!(!h||!h.active||typeof h.active!="function")}u.rateLimiter=new o({maxItems:0,itemsPerMinute:60}),u.prototype.global=function(f){return u.rateLimiter.configureGlobal(f),this},u.prototype.configure=function(f,h){var m=this.options,g={};h&&(g={payload:h}),this.options=l.merge(m,f,g);var y=this.options.tracer||null;return p(y)?(this.tracer=y,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier&&this.notifier.configure(this.options),this.telemeter&&this.telemeter.configure(this.options),d(f),this.global(this.options),p(f.tracer)&&(this.tracer=f.tracer),this},u.prototype.log=function(f){var h=this._defaultLogLevel();return this._log(h,f)},u.prototype.debug=function(f){this._log("debug",f)},u.prototype.info=function(f){this._log("info",f)},u.prototype.warn=function(f){this._log("warning",f)},u.prototype.warning=function(f){this._log("warning",f)},u.prototype.error=function(f){this._log("error",f)},u.prototype.critical=function(f){this._log("critical",f)},u.prototype.wait=function(f){this.queue.wait(f)},u.prototype.captureEvent=function(f,h,m){return this.telemeter&&this.telemeter.captureEvent(f,h,m)},u.prototype.captureDomContentLoaded=function(f){return this.telemeter&&this.telemeter.captureDomContentLoaded(f)},u.prototype.captureLoad=function(f){return this.telemeter&&this.telemeter.captureLoad(f)},u.prototype.buildJsonPayload=function(f){return this.api.buildJsonPayload(f)},u.prototype.sendJsonPayload=function(f){this.api.postJsonPayload(f)},u.prototype._log=function(f,h){var m;if(h.callback&&(m=h.callback,delete h.callback),this.options.ignoreDuplicateErrors&&this._sameAsLastError(h)){if(m){var g=new Error("ignored identical item");g.item=h,m(g)}}else try{this._addTracingInfo(h),h.level=h.level||f,this.telemeter&&this.telemeter._captureRollbarItem(h),h.telemetryEvents=this.telemeter&&this.telemeter.copyEvents()||[],this.notifier.log(h,m)}catch(y){m&&m(y),this.logger.error(y)}},u.prototype._defaultLogLevel=function(){return this.options.logLevel||"debug"},u.prototype._sameAsLastError=function(f){if(!f._isUncaught)return!1;var h=function(m){var g=m.message||"",y=(m.err||{}).stack||String(m.err);return g+"::"+y}(f);return this.lastErrorHash===h||(this.lastError=f.err,this.lastErrorHash=h,!1)},u.prototype._addTracingInfo=function(f){if(this.tracer){var h=this.tracer.scope().active();if(function(y){if(!y||!y.context||typeof y.context!="function")return!1;var b=y.context();return!(!b||!b.toSpanId||!b.toTraceId||typeof b.toSpanId!="function"||typeof b.toTraceId!="function")}(h)){h.setTag("rollbar.error_uuid",f.uuid),h.setTag("rollbar.has_error",!0),h.setTag("error",!0),h.setTag("rollbar.item_url","https://rollbar.com/item/uuid/?uuid="+f.uuid),h.setTag("rollbar.occurrence_url","https://rollbar.com/occurrence/uuid/?uuid="+f.uuid);var m=h.context().toSpanId(),g=h.context().toTraceId();f.custom?(f.custom.opentracing_span_id=m,f.custom.opentracing_trace_id=g):f.custom={opentracing_span_id:m,opentracing_trace_id:g}}}},r.exports=u},function(r,i,a){var o=a(0);function s(u){this.startTime=o.now(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(u)}function c(u,d,p){return!u.ignoreRateLimit&&d>=1&&p>d}function l(u,d,p,f,h,m,g){var y=null;return p&&(p=new Error(p)),p||f||(y=function(b,w,S,k,E){var T,A=w.environment||w.payload&&w.payload.environment;T=E?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var $={body:{message:{body:T,extra:{maxItems:S,itemsPerMinute:k}}},language:"javascript",environment:A,notifier:{version:w.notifier&&w.notifier.version||w.version}};return b==="browser"?($.platform="browser",$.framework="browser-js",$.notifier.name="rollbar-browser-js"):b==="server"?($.framework=w.framework||"node-js",$.notifier.name=w.notifier.name):b==="react-native"&&($.framework=w.framework||"react-native",$.notifier.name=w.notifier.name),$}(u,d,h,m,g)),{error:p,shouldSend:f,payload:y}}s.globalSettings={startTime:o.now(),maxItems:void 0,itemsPerMinute:void 0},s.prototype.configureGlobal=function(u){u.startTime!==void 0&&(s.globalSettings.startTime=u.startTime),u.maxItems!==void 0&&(s.globalSettings.maxItems=u.maxItems),u.itemsPerMinute!==void 0&&(s.globalSettings.itemsPerMinute=u.itemsPerMinute)},s.prototype.shouldSend=function(u,d){var p=(d=d||o.now())-this.startTime;(p<0||p>=6e4)&&(this.startTime=d,this.perMinCounter=0);var f=s.globalSettings.maxItems,h=s.globalSettings.itemsPerMinute;if(c(u,f,this.counter))return l(this.platform,this.platformOptions,f+" max items reached",!1);if(c(u,h,this.perMinCounter))return l(this.platform,this.platformOptions,h+" items per minute reached",!1);this.counter++,this.perMinCounter++;var m=!c(u,f,this.counter),g=m;return m=m&&!c(u,h,this.perMinCounter),l(this.platform,this.platformOptions,null,m,f,h,g)},s.prototype.setPlatformOptions=function(u,d){this.platform=u,this.platformOptions=d},r.exports=s},function(r,i,a){var o=Object.prototype.hasOwnProperty,s=Object.prototype.toString,c=function(l){if(!l||s.call(l)!=="[object Object]")return!1;var u,d=o.call(l,"constructor"),p=l.constructor&&l.constructor.prototype&&o.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!p)return!1;for(u in l);return u===void 0||o.call(l,u)};r.exports=function l(){var u,d,p,f,h,m={},g=null,y=arguments.length;for(u=0;u<y;u++)if((g=arguments[u])!=null)for(h in g)d=m[h],m!==(p=g[h])&&(p&&c(p)?(f=d&&c(d)?d:{},m[h]=l(f,p)):p!==void 0&&(m[h]=p));return m}},function(r,i,a){var o=a(0);function s(l,u,d,p){this.rateLimiter=l,this.api=u,this.logger=d,this.options=p,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}s.prototype.configure=function(l){this.api&&this.api.configure(l);var u=this.options;return this.options=o.merge(u,l),this},s.prototype.addPredicate=function(l){return o.isFunction(l)&&this.predicates.push(l),this},s.prototype.addPendingItem=function(l){this.pendingItems.push(l)},s.prototype.removePendingItem=function(l){var u=this.pendingItems.indexOf(l);u!==-1&&this.pendingItems.splice(u,1)},s.prototype.addItem=function(l,u,d,p){u&&o.isFunction(u)||(u=function(){});var f=this._applyPredicates(l);if(f.stop)return this.removePendingItem(p),void u(f.err);if(this._maybeLog(l,d),this.removePendingItem(p),this.options.transmit){this.pendingRequests.push(l);try{this._makeApiRequest(l,function(h,m){this._dequeuePendingRequest(l),u(h,m)}.bind(this))}catch(h){this._dequeuePendingRequest(l),u(h)}}else u(new Error("Transmit disabled"))},s.prototype.wait=function(l){o.isFunction(l)&&(this.waitCallback=l,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},s.prototype._applyPredicates=function(l){for(var u=null,d=0,p=this.predicates.length;d<p;d++)if(!(u=this.predicates[d](l,this.options))||u.err!==void 0)return{stop:!0,err:u.err};return{stop:!1,err:null}},s.prototype._makeApiRequest=function(l,u){var d=this.rateLimiter.shouldSend(l);d.shouldSend?this.api.postItem(l,function(p,f){p?this._maybeRetry(p,l,u):u(p,f)}.bind(this)):d.error?u(d.error):this.api.postItem(d.payload,u)};var c=["ECONNRESET","ENOTFOUND","ESOCKETTIMEDOUT","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH","EPIPE","EAI_AGAIN"];s.prototype._maybeRetry=function(l,u,d){var p=!1;if(this.options.retryInterval){for(var f=0,h=c.length;f<h;f++)if(l.code===c[f]){p=!0;break}p&&o.isFiniteNumber(this.options.maxRetries)&&(u.retries=u.retries?u.retries+1:1,u.retries>this.options.maxRetries&&(p=!1))}p?this._retryApiRequest(u,d):d(l)},s.prototype._retryApiRequest=function(l,u){this.retryQueue.push({item:l,callback:u}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var d=this.retryQueue.shift();this._makeApiRequest(d.item,d.callback)}}.bind(this),this.options.retryInterval))},s.prototype._dequeuePendingRequest=function(l){var u=this.pendingRequests.indexOf(l);u!==-1&&(this.pendingRequests.splice(u,1),this._maybeCallWait())},s.prototype._maybeLog=function(l,u){if(this.logger&&this.options.verbose){var d=u;if(d=(d=d||o.get(l,"body.trace.exception.message"))||o.get(l,"body.trace_chain.0.exception.message"))return void this.logger.error(d);(d=o.get(l,"body.message.body"))&&this.logger.log(d)}},s.prototype._maybeCallWait=function(){return!(!o.isFunction(this.waitCallback)||this.pendingItems.length!==0||this.pendingRequests.length!==0)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},r.exports=s},function(r,i,a){var o=a(0);function s(c,l){this.queue=c,this.options=l,this.transforms=[],this.diagnostic={}}s.prototype.configure=function(c){this.queue&&this.queue.configure(c);var l=this.options;return this.options=o.merge(l,c),this},s.prototype.addTransform=function(c){return o.isFunction(c)&&this.transforms.push(c),this},s.prototype.log=function(c,l){if(l&&o.isFunction(l)||(l=function(){}),!this.options.enabled)return l(new Error("Rollbar is not enabled"));this.queue.addPendingItem(c);var u=c.err;this._applyTransforms(c,function(d,p){if(d)return this.queue.removePendingItem(c),l(d,null);this.queue.addItem(p,l,u,c)}.bind(this))},s.prototype._applyTransforms=function(c,l){var u=-1,d=this.transforms.length,p=this.transforms,f=this.options,h=function(m,g){m?l(m,null):++u!==d?p[u](g,f,h):l(null,g)};h(null,c)},r.exports=s},function(r,i,a){var o=a(0),s=a(16),c={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function l(d,p,f,h,m){this.options=d,this.transport=p,this.url=f,this.truncation=h,this.jsonBackup=m,this.accessToken=d.accessToken,this.transportOptions=u(d,f)}function u(d,p){return s.getTransportFromOptions(d,c,p)}l.prototype.postItem=function(d,p){var f=s.transportOptions(this.transportOptions,"POST"),h=s.buildPayload(this.accessToken,d,this.jsonBackup),m=this;setTimeout(function(){m.transport.post(m.accessToken,f,h,p)},0)},l.prototype.buildJsonPayload=function(d,p){var f,h=s.buildPayload(this.accessToken,d,this.jsonBackup);return(f=this.truncation?this.truncation.truncate(h):o.stringify(h)).error?(p&&p(f.error),null):f.value},l.prototype.postJsonPayload=function(d,p){var f=s.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,f,d,p)},l.prototype.configure=function(d){var p=this.oldOptions;return this.options=o.merge(p,d),this.transportOptions=u(this.options,this.url),this.options.accessToken!==void 0&&(this.accessToken=this.options.accessToken),this},r.exports=l},function(r,i,a){var o=a(0);r.exports={buildPayload:function(s,c,l){if(!o.isType(c.context,"string")){var u=o.stringify(c.context,l);u.error?c.context="Error: could not serialize 'context'":c.context=u.value||"",c.context.length>255&&(c.context=c.context.substr(0,255))}return{access_token:s,data:c}},getTransportFromOptions:function(s,c,l){var u=c.hostname,d=c.protocol,p=c.port,f=c.path,h=c.search,m=s.timeout,g=function(w){var S=typeof window<"u"&&window||typeof self<"u"&&self,k=w.defaultTransport||"xhr";return S.fetch===void 0&&(k="xhr"),S.XMLHttpRequest===void 0&&(k="fetch"),k}(s),y=s.proxy;if(s.endpoint){var b=l.parse(s.endpoint);u=b.hostname,d=b.protocol,p=b.port,f=b.pathname,h=b.search}return{timeout:m,hostname:u,protocol:d,port:p,path:f,search:h,proxy:y,transport:g}},transportOptions:function(s,c){var l=s.protocol||"https:",u=s.port||(l==="http:"?80:l==="https:"?443:void 0),d=s.hostname,p=s.path,f=s.timeout,h=s.transport;return s.search&&(p+=s.search),s.proxy&&(p=l+"//"+d+p,d=s.proxy.host||s.proxy.hostname,u=s.proxy.port,l=s.proxy.protocol||l),{timeout:f,protocol:l,hostname:d,path:p,port:u,method:c,transport:h}},appendPathToPath:function(s,c){var l=/\/$/.test(s),u=/^\//.test(c);return l&&u?c=c.substring(1):l||u||(c="/"+c),s+c}}},function(r,i){(function(a){a.console||(a.console={});for(var o,s,c=a.console,l=function(){},u=["memory"],d="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");o=u.pop();)c[o]||(c[o]={});for(;s=d.pop();)c[s]||(c[s]=l)})(typeof window>"u"?this:window)},function(r,i,a){var o={ieVersion:function(){if(typeof document<"u"){for(var s=3,c=document.createElement("div"),l=c.getElementsByTagName("i");c.innerHTML="<!--[if gt IE "+ ++s+"]><i></i><![endif]-->",l[0];);return s>4?s:void 0}}};r.exports=o},function(r,i,a){function o(s,c,l,u){s._rollbarWrappedError&&(u[4]||(u[4]=s._rollbarWrappedError),u[5]||(u[5]=s._rollbarWrappedError._rollbarContext),s._rollbarWrappedError=null);var d=c.handleUncaughtException.apply(c,u);l&&l.apply(s,u),d==="anonymous"&&(c.anonymousErrorsPending+=1)}r.exports={captureUncaughtExceptions:function(s,c,l){if(s){var u;if(typeof c._rollbarOldOnError=="function")u=c._rollbarOldOnError;else if(s.onerror){for(u=s.onerror;u._rollbarOldOnError;)u=u._rollbarOldOnError;c._rollbarOldOnError=u}c.handleAnonymousErrors();var d=function(){var p=Array.prototype.slice.call(arguments,0);o(s,c,u,p)};l&&(d._rollbarOldOnError=u),s.onerror=d}},captureUnhandledRejections:function(s,c,l){if(s){typeof s._rollbarURH=="function"&&s._rollbarURH.belongsToShim&&s.removeEventListener("unhandledrejection",s._rollbarURH);var u=function(d){var p,f,h;try{p=d.reason}catch{p=void 0}try{f=d.promise}catch{f="[unhandledrejection] error getting `promise` from event"}try{h=d.detail,!p&&h&&(p=h.reason,f=h.promise)}catch{}p||(p="[unhandledrejection] error getting `reason` from event"),c&&c.handleUnhandledRejection&&c.handleUnhandledRejection(p,f)};u.belongsToShim=l,s._rollbarURH=u,s.addEventListener("unhandledrejection",u)}}}},function(r,i,a){var o=a(0),s=a(21),c=a(22);function l(u){this.truncation=u}l.prototype.get=function(u,d,p,f,h){f&&o.isFunction(f)||(f=function(){}),o.addParamsAndAccessTokenToPath(u,d,p);var m=o.formatUrl(d);this._makeZoneRequest(u,m,"GET",null,f,h,d.timeout,d.transport)},l.prototype.post=function(u,d,p,f,h){if(f&&o.isFunction(f)||(f=function(){}),!p)return f(new Error("Cannot send empty request"));var m;if((m=this.truncation?this.truncation.truncate(p):o.stringify(p)).error)return f(m.error);var g=m.value,y=o.formatUrl(d);this._makeZoneRequest(u,y,"POST",g,f,h,d.timeout,d.transport)},l.prototype.postJsonPayload=function(u,d,p,f,h){f&&o.isFunction(f)||(f=function(){});var m=o.formatUrl(d);this._makeZoneRequest(u,m,"POST",p,f,h,d.timeout,d.transport)},l.prototype._makeZoneRequest=function(){var u=typeof window<"u"&&window||h!==void 0&&h,d=u&&u.Zone&&u.Zone.current,p=Array.prototype.slice.call(arguments);if(d&&d._name==="angular"){var f=d._parent,h=this;f.run(function(){h._makeRequest.apply(void 0,p)})}else this._makeRequest.apply(void 0,p)},l.prototype._makeRequest=function(u,d,p,f,h,m,g,y){if(typeof RollbarProxy<"u")return function(b,w){new RollbarProxy().sendJsonPayload(b,function(S){},function(S){w(new Error(S))})}(f,h);y==="fetch"?s(u,d,p,f,h,g):c(u,d,p,f,h,m,g)},r.exports=l},function(r,i,a){var o=a(1),s=a(0);r.exports=function(c,l,u,d,p,f){var h,m;s.isFiniteNumber(f)&&(h=new AbortController,m=setTimeout(function(){h.abort()},f)),fetch(l,{method:u,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":c,signal:h&&h.signal},body:d}).then(function(g){return m&&clearTimeout(m),g.json()}).then(function(g){p(null,g)}).catch(function(g){o.error(g.message),p(g)})}},function(r,i,a){var o=a(0),s=a(1);function c(l,u){var d=new Error(l);return d.code=u||"ENOTFOUND",d}r.exports=function(l,u,d,p,f,h,m){var g;if(!(g=h?h():function(){var w,S,k=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],E=k.length;for(S=0;S<E;S++)try{w=k[S]();break}catch{}return w}()))return f(new Error("No way to send a request"));try{try{var y=function(){try{if(y&&g.readyState===4){y=void 0;var w=o.jsonParse(g.responseText);if((E=g)&&E.status&&E.status===200)return void f(w.error,w.value);if(function(T){return T&&o.isType(T.status,"number")&&T.status>=400&&T.status<600}(g)){if(g.status===403){var S=w.value&&w.value.message;s.error(S)}f(new Error(String(g.status)))}else f(c("XHR response had no status code (likely connection failure)"))}}catch(T){var k;k=T&&T.stack?T:new Error(T),f(k)}var E};g.open(d,u,!0),g.setRequestHeader&&(g.setRequestHeader("Content-Type","application/json"),g.setRequestHeader("X-Rollbar-Access-Token",l)),o.isFiniteNumber(m)&&(g.timeout=m),g.onreadystatechange=y,g.send(p)}catch{if(typeof XDomainRequest<"u"){if(!window||!window.location)return f(new Error("No window available during request, unknown environment"));window.location.href.substring(0,5)==="http:"&&u.substring(0,5)==="https"&&(u="http"+u.substring(5));var b=new XDomainRequest;b.onprogress=function(){},b.ontimeout=function(){f(c("Request timed out","ETIMEDOUT"))},b.onerror=function(){f(new Error("Error during request"))},b.onload=function(){var S=o.jsonParse(b.responseText);f(S.error,S.value)},b.open(d,u,!0),b.send(p)}else f(new Error("Cannot find a method to transport a request"))}}catch(w){f(w)}}},function(r,i,a){var o=a(0),s=a(3),c=a(1);function l(f,h,m){var g=f.message,y=f.custom;g||(g="Item sent with null or missing arguments.");var b={body:g};y&&(b.extra=o.merge(y)),o.set(f,"data.body",{message:b}),m(null,f)}function u(f){var h=f.stackInfo.stack;return h&&h.length===0&&f._unhandledStackInfo&&f._unhandledStackInfo.stack&&(h=f._unhandledStackInfo.stack),h}function d(f,h,m){var g=f&&f.data.description,y=f&&f.custom,b=u(f),w=s.guessErrorClass(h.message),S={exception:{class:p(h,w[0],m),message:w[1]}};if(g&&(S.exception.description=g),b){var k,E,T,A,$,I,R,Y;for(b.length===0&&(S.exception.stack=h.rawStack,S.exception.raw=String(h.rawException)),S.frames=[],R=0;R<b.length;++R)E={filename:(k=b[R]).url?o.sanitizeUrl(k.url):"(unknown)",lineno:k.line||null,method:k.func&&k.func!=="?"?k.func:"[anonymous]",colno:k.column},m.sendFrameUrl&&(E.url=k.url),E.method&&E.method.endsWith&&E.method.endsWith("_rollbar_wrapped")||(T=A=$=null,(I=k.context?k.context.length:0)&&(Y=Math.floor(I/2),A=k.context.slice(0,Y),T=k.context[Y],$=k.context.slice(Y)),T&&(E.code=T),(A||$)&&(E.context={},A&&A.length&&(E.context.pre=A),$&&$.length&&(E.context.post=$)),k.args&&(E.args=k.args),S.frames.push(E));S.frames.reverse(),y&&(S.extra=o.merge(y))}return S}function p(f,h,m){return f.name?f.name:m.guessErrorClass?h:"(unknown)"}r.exports={handleDomException:function(f,h,m){if(f.err&&s.Stack(f.err).name==="DOMException"){var g=new Error;g.name=f.err.name,g.message=f.err.message,g.stack=f.err.stack,g.nested=f.err,f.err=g}m(null,f)},handleItemWithError:function(f,h,m){if(f.data=f.data||{},f.err)try{f.stackInfo=f.err._savedStackTrace||s.parse(f.err,f.skipFrames),h.addErrorContext&&function(g){var y=[],b=g.err;for(y.push(b);b.nested||b.cause;)b=b.nested||b.cause,y.push(b);o.addErrorContext(g,y)}(f)}catch(g){c.error("Error while parsing the error object.",g);try{f.message=f.err.message||f.err.description||f.message||String(f.err)}catch(y){f.message=String(f.err)||String(y)}delete f.err}m(null,f)},ensureItemHasSomethingToSay:function(f,h,m){f.message||f.stackInfo||f.custom||m(new Error("No message, stack info, or custom data"),null),m(null,f)},addBaseInfo:function(f,h,m){var g=h.payload&&h.payload.environment||h.environment;f.data=o.merge(f.data,{environment:g,level:f.level,endpoint:h.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:f.uuid,notifier:{name:"rollbar-browser-js",version:h.version},custom:f.custom}),m(null,f)},addRequestInfo:function(f){return function(h,m,g){var y={};f&&f.location&&(y.url=f.location.href,y.query_string=f.location.search);var b="$remote_ip";m.captureIp?m.captureIp!==!0&&(b+="_anonymize"):b=null,b&&(y.user_ip=b),Object.keys(y).length>0&&o.set(h,"data.request",y),g(null,h)}},addClientInfo:function(f){return function(h,m,g){if(!f)return g(null,h);var y=f.navigator||{},b=f.screen||{};o.set(h,"data.client",{runtime_ms:h.timestamp-f._rollbarStartTime,timestamp:Math.round(h.timestamp/1e3),javascript:{browser:y.userAgent,language:y.language,cookie_enabled:y.cookieEnabled,screen:{width:b.width,height:b.height}}}),g(null,h)}},addPluginInfo:function(f){return function(h,m,g){if(!f||!f.navigator)return g(null,h);for(var y,b=[],w=f.navigator.plugins||[],S=0,k=w.length;S<k;++S)y=w[S],b.push({name:y.name,description:y.description});o.set(h,"data.client.javascript.plugins",b),g(null,h)}},addBody:function(f,h,m){f.stackInfo?f.stackInfo.traceChain?function(g,y,b){for(var w=g.stackInfo.traceChain,S=[],k=w.length,E=0;E<k;E++){var T=d(g,w[E],y);S.push(T)}o.set(g,"data.body",{trace_chain:S}),b(null,g)}(f,h,m):function(g,y,b){if(u(g)){var w=d(g,g.stackInfo,y);o.set(g,"data.body",{trace:w}),b(null,g)}else{var S=g.stackInfo,k=s.guessErrorClass(S.message),E=p(S,k[0],y),T=k[1];g.message=E+": "+T,l(g,y,b)}}(f,h,m):l(f,h,m)},addScrubber:function(f){return function(h,m,g){if(f){var y=m.scrubFields||[],b=m.scrubPaths||[];h.data=f(h.data,y,b)}g(null,h)}}}},function(r,i,a){var o,s,c;(function(l,u){s=[a(25)],(c=typeof(o=function(d){var p=/(^|@)\S+:\d+/,f=/^\s*at .*(\S+:\d+|\(native\))/m,h=/^(eval@)?(\[native code])?$/;return{parse:function(m){if(m.stacktrace!==void 0||m["opera#sourceloc"]!==void 0)return this.parseOpera(m);if(m.stack&&m.stack.match(f))return this.parseV8OrIE(m);if(m.stack)return this.parseFFOrSafari(m);throw new Error("Cannot parse given Error object")},extractLocation:function(m){if(m.indexOf(":")===-1)return[m];var g=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(m.replace(/[()]/g,""));return[g[1],g[2]||void 0,g[3]||void 0]},parseV8OrIE:function(m){return m.stack.split(`
|
|
437
437
|
`).filter(function(g){return!!g.match(f)},this).map(function(g){g.indexOf("(eval ")>-1&&(g=g.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var y=g.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),b=y.match(/ (\(.+\)$)/);y=b?y.replace(b[0],""):y;var w=this.extractLocation(b?b[1]:y),S=b&&y||void 0,k=["eval","<anonymous>"].indexOf(w[0])>-1?void 0:w[0];return new d({functionName:S,fileName:k,lineNumber:w[1],columnNumber:w[2],source:g})},this)},parseFFOrSafari:function(m){return m.stack.split(`
|
|
438
438
|
`).filter(function(g){return!g.match(h)},this).map(function(g){if(g.indexOf(" > eval")>-1&&(g=g.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),g.indexOf("@")===-1&&g.indexOf(":")===-1)return new d({functionName:g});var y=/((.*".+"[^@]*)?[^@]*)(?:@)/,b=g.match(y),w=b&&b[1]?b[1]:void 0,S=this.extractLocation(g.replace(y,""));return new d({functionName:w,fileName:S[0],lineNumber:S[1],columnNumber:S[2],source:g})},this)},parseOpera:function(m){return!m.stacktrace||m.message.indexOf(`
|
|
439
439
|
`)>-1&&m.message.split(`
|
|
@@ -448,7 +448,7 @@ $t(documentTemplateView.smsContent) $t(documentTemplateView.readMore)
|
|
|
448
448
|
`+o+te.join(`,
|
|
449
449
|
`+o)+`
|
|
450
450
|
`+j+"}":"{"+te.join(",")+"}",o=j,z}}("",{"":T})}),typeof a.parse!="function"&&(a.parse=(m={"\\":"\\",'"':'"',"/":"/",t:" ",n:`
|
|
451
|
-
`,r:"\r",f:"\f",b:"\b"},g={go:function(){u="ok"},firstokey:function(){f=h,u="colon"},okey:function(){f=h,u="colon"},ovalue:function(){u="ocomma"},firstavalue:function(){u="acomma"},avalue:function(){u="acomma"}},y={go:function(){u="ok"},ovalue:function(){u="ocomma"},firstavalue:function(){u="acomma"},avalue:function(){u="acomma"}},b={"{":{go:function(){d.push({state:"ok"}),p={},u="firstokey"},ovalue:function(){d.push({container:p,state:"ocomma",key:f}),p={},u="firstokey"},firstavalue:function(){d.push({container:p,state:"acomma"}),p={},u="firstokey"},avalue:function(){d.push({container:p,state:"acomma"}),p={},u="firstokey"}},"}":{firstokey:function(){var T=d.pop();h=p,p=T.container,f=T.key,u=T.state},ocomma:function(){var T=d.pop();p[f]=h,h=p,p=T.container,f=T.key,u=T.state}},"[":{go:function(){d.push({state:"ok"}),p=[],u="firstavalue"},ovalue:function(){d.push({container:p,state:"ocomma",key:f}),p=[],u="firstavalue"},firstavalue:function(){d.push({container:p,state:"acomma"}),p=[],u="firstavalue"},avalue:function(){d.push({container:p,state:"acomma"}),p=[],u="firstavalue"}},"]":{firstavalue:function(){var T=d.pop();h=p,p=T.container,f=T.key,u=T.state},acomma:function(){var T=d.pop();p.push(h),h=p,p=T.container,f=T.key,u=T.state}},":":{colon:function(){if(Object.hasOwnProperty.call(p,f))throw new SyntaxError("Duplicate key '"+f+'"');u="ovalue"}},",":{ocomma:function(){p[f]=h,u="okey"},acomma:function(){p.push(h),u="avalue"}},true:{go:function(){h=!0,u="ok"},ovalue:function(){h=!0,u="ocomma"},firstavalue:function(){h=!0,u="acomma"},avalue:function(){h=!0,u="acomma"}},false:{go:function(){h=!1,u="ok"},ovalue:function(){h=!1,u="ocomma"},firstavalue:function(){h=!1,u="acomma"},avalue:function(){h=!1,u="acomma"}},null:{go:function(){h=null,u="ok"},ovalue:function(){h=null,u="ocomma"},firstavalue:function(){h=null,u="acomma"},avalue:function(){h=null,u="acomma"}}},function(T,A){var $,I,R=/^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;u="go",d=[];try{for(;$=R.exec(T);)$[1]?b[$[1]][u]():$[2]?(h=+$[2],y[u]()):(I=$[3],h=I.replace(/\\(?:u(.{4})|([^u]))/g,function(Y,L,D){return L?String.fromCharCode(parseInt(L,16)):m[D]}),g[u]()),T=T.slice($[0].length)}catch(Y){u=Y}if(u!=="ok"||/[^\u0020\t\n\r]/.test(T))throw u instanceof SyntaxError?u:new SyntaxError("JSON");return typeof A=="function"?function Y(L,D){var B,z,K=L[D];if(K&&typeof K=="object")for(B in h)Object.prototype.hasOwnProperty.call(K,B)&&((z=Y(K,B))!==void 0?K[B]=z:delete K[B]);return A.call(L,D,K)}({"":h},""):h}))}},function(r,i,a){function o(s,c,l){if(c.hasOwnProperty&&c.hasOwnProperty("addEventListener")){for(var u=c.addEventListener;u._rollbarOldAdd&&u.belongsToShim;)u=u._rollbarOldAdd;var d=function(h,m,g){u.call(this,h,s.wrap(m),g)};d._rollbarOldAdd=u,d.belongsToShim=l,c.addEventListener=d;for(var p=c.removeEventListener;p._rollbarOldRemove&&p.belongsToShim;)p=p._rollbarOldRemove;var f=function(h,m,g){p.call(this,h,m&&m._rollbar_wrapped||m,g)};f._rollbarOldRemove=p,f.belongsToShim=l,c.removeEventListener=f}}r.exports=function(s,c,l){if(s){var u,d,p="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(u=0;u<p.length;++u)s[d=p[u]]&&s[d].prototype&&o(c,s[d].prototype,l)}}},function(r,i,a){var o=a(0),s=a(5);function c(g,y){return[g,o.stringify(g,y)]}function l(g,y){var b=g.length;return b>2*y?g.slice(0,y).concat(g.slice(b-y)):g}function u(g,y,b){b=b===void 0?30:b;var w,S=g.data.body;if(S.trace_chain)for(var k=S.trace_chain,E=0;E<k.length;E++)w=l(w=k[E].frames,b),k[E].frames=w;else S.trace&&(w=l(w=S.trace.frames,b),S.trace.frames=w);return[g,o.stringify(g,y)]}function d(g,y){return y&&y.length>g?y.slice(0,g-3).concat("..."):y}function p(g,y,b){return[y=s(y,function w(S,k,E){switch(o.typeName(k)){case"string":return d(g,k);case"object":case"array":return s(k,w,E);default:return k}}),o.stringify(y,b)]}function f(g){return g.exception&&(delete g.exception.description,g.exception.message=d(255,g.exception.message)),g.frames=l(g.frames,1),g}function h(g,y){var b=g.data.body;if(b.trace_chain)for(var w=b.trace_chain,S=0;S<w.length;S++)w[S]=f(w[S]);else b.trace&&(b.trace=f(b.trace));return[g,o.stringify(g,y)]}function m(g,y){return o.maxByteSize(g)>y}r.exports={truncate:function(g,y,b){b=b===void 0?524288:b;for(var w,S,k,E=[c,u,p.bind(null,1024),p.bind(null,512),p.bind(null,256),h];w=E.shift();)if(g=(S=w(g,y))[0],(k=S[1]).error||!m(k.value,b))return k;return k},raw:c,truncateFrames:u,truncateStrings:p,maybeTruncateValue:d}}])})})(pR);var bCe=pR.exports;const _Ce=cn(bCe);function wCe(n){if(typeof n!="string")throw new Error("Param name must be a string");try{const t=`${n}=`,r=document.cookie.split(";");for(let i=0;i<r.length;i++){let a=r[i];for(;a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(t)===0)return a.substring(t.length,a.length)}}catch{}return null}const xCe="disabledThirdParties",CCe=["google","facebook","segment","logrocket","rollbar"];function kCe(){let n=[];try{const t=JSON.parse(wCe(xCe));Array.isArray(t)&&(n=t)}catch{}return n.filter(t=>CCe.includes(t))}const fR=Xe.rollbar.clientToken,W3=new _Ce({accessToken:fR,captureUncaught:!0,captureUnhandledRejections:!0,source_map_enabled:!0,environment:Xe.rollbar.environment||Xe.environment,enabled:!1,ignoredMessages:["The operation is insecure","Script error.","null is not an object (evaluating 'localStorage.getItem')","Unexpected token '<'","expected expression, got '<'","ChunkLoadError","Loading chunk","ResizeObserver loop limit exceeded","Failed to update a ServiceWorker for scope","Object Not Found Matching Id","newestWorker is null"],payload:{client:{javascript:{code_version:"0.12.
|
|
451
|
+
`,r:"\r",f:"\f",b:"\b"},g={go:function(){u="ok"},firstokey:function(){f=h,u="colon"},okey:function(){f=h,u="colon"},ovalue:function(){u="ocomma"},firstavalue:function(){u="acomma"},avalue:function(){u="acomma"}},y={go:function(){u="ok"},ovalue:function(){u="ocomma"},firstavalue:function(){u="acomma"},avalue:function(){u="acomma"}},b={"{":{go:function(){d.push({state:"ok"}),p={},u="firstokey"},ovalue:function(){d.push({container:p,state:"ocomma",key:f}),p={},u="firstokey"},firstavalue:function(){d.push({container:p,state:"acomma"}),p={},u="firstokey"},avalue:function(){d.push({container:p,state:"acomma"}),p={},u="firstokey"}},"}":{firstokey:function(){var T=d.pop();h=p,p=T.container,f=T.key,u=T.state},ocomma:function(){var T=d.pop();p[f]=h,h=p,p=T.container,f=T.key,u=T.state}},"[":{go:function(){d.push({state:"ok"}),p=[],u="firstavalue"},ovalue:function(){d.push({container:p,state:"ocomma",key:f}),p=[],u="firstavalue"},firstavalue:function(){d.push({container:p,state:"acomma"}),p=[],u="firstavalue"},avalue:function(){d.push({container:p,state:"acomma"}),p=[],u="firstavalue"}},"]":{firstavalue:function(){var T=d.pop();h=p,p=T.container,f=T.key,u=T.state},acomma:function(){var T=d.pop();p.push(h),h=p,p=T.container,f=T.key,u=T.state}},":":{colon:function(){if(Object.hasOwnProperty.call(p,f))throw new SyntaxError("Duplicate key '"+f+'"');u="ovalue"}},",":{ocomma:function(){p[f]=h,u="okey"},acomma:function(){p.push(h),u="avalue"}},true:{go:function(){h=!0,u="ok"},ovalue:function(){h=!0,u="ocomma"},firstavalue:function(){h=!0,u="acomma"},avalue:function(){h=!0,u="acomma"}},false:{go:function(){h=!1,u="ok"},ovalue:function(){h=!1,u="ocomma"},firstavalue:function(){h=!1,u="acomma"},avalue:function(){h=!1,u="acomma"}},null:{go:function(){h=null,u="ok"},ovalue:function(){h=null,u="ocomma"},firstavalue:function(){h=null,u="acomma"},avalue:function(){h=null,u="acomma"}}},function(T,A){var $,I,R=/^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;u="go",d=[];try{for(;$=R.exec(T);)$[1]?b[$[1]][u]():$[2]?(h=+$[2],y[u]()):(I=$[3],h=I.replace(/\\(?:u(.{4})|([^u]))/g,function(Y,L,D){return L?String.fromCharCode(parseInt(L,16)):m[D]}),g[u]()),T=T.slice($[0].length)}catch(Y){u=Y}if(u!=="ok"||/[^\u0020\t\n\r]/.test(T))throw u instanceof SyntaxError?u:new SyntaxError("JSON");return typeof A=="function"?function Y(L,D){var B,z,K=L[D];if(K&&typeof K=="object")for(B in h)Object.prototype.hasOwnProperty.call(K,B)&&((z=Y(K,B))!==void 0?K[B]=z:delete K[B]);return A.call(L,D,K)}({"":h},""):h}))}},function(r,i,a){function o(s,c,l){if(c.hasOwnProperty&&c.hasOwnProperty("addEventListener")){for(var u=c.addEventListener;u._rollbarOldAdd&&u.belongsToShim;)u=u._rollbarOldAdd;var d=function(h,m,g){u.call(this,h,s.wrap(m),g)};d._rollbarOldAdd=u,d.belongsToShim=l,c.addEventListener=d;for(var p=c.removeEventListener;p._rollbarOldRemove&&p.belongsToShim;)p=p._rollbarOldRemove;var f=function(h,m,g){p.call(this,h,m&&m._rollbar_wrapped||m,g)};f._rollbarOldRemove=p,f.belongsToShim=l,c.removeEventListener=f}}r.exports=function(s,c,l){if(s){var u,d,p="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(u=0;u<p.length;++u)s[d=p[u]]&&s[d].prototype&&o(c,s[d].prototype,l)}}},function(r,i,a){var o=a(0),s=a(5);function c(g,y){return[g,o.stringify(g,y)]}function l(g,y){var b=g.length;return b>2*y?g.slice(0,y).concat(g.slice(b-y)):g}function u(g,y,b){b=b===void 0?30:b;var w,S=g.data.body;if(S.trace_chain)for(var k=S.trace_chain,E=0;E<k.length;E++)w=l(w=k[E].frames,b),k[E].frames=w;else S.trace&&(w=l(w=S.trace.frames,b),S.trace.frames=w);return[g,o.stringify(g,y)]}function d(g,y){return y&&y.length>g?y.slice(0,g-3).concat("..."):y}function p(g,y,b){return[y=s(y,function w(S,k,E){switch(o.typeName(k)){case"string":return d(g,k);case"object":case"array":return s(k,w,E);default:return k}}),o.stringify(y,b)]}function f(g){return g.exception&&(delete g.exception.description,g.exception.message=d(255,g.exception.message)),g.frames=l(g.frames,1),g}function h(g,y){var b=g.data.body;if(b.trace_chain)for(var w=b.trace_chain,S=0;S<w.length;S++)w[S]=f(w[S]);else b.trace&&(b.trace=f(b.trace));return[g,o.stringify(g,y)]}function m(g,y){return o.maxByteSize(g)>y}r.exports={truncate:function(g,y,b){b=b===void 0?524288:b;for(var w,S,k,E=[c,u,p.bind(null,1024),p.bind(null,512),p.bind(null,256),h];w=E.shift();)if(g=(S=w(g,y))[0],(k=S[1]).error||!m(k.value,b))return k;return k},raw:c,truncateFrames:u,truncateStrings:p,maybeTruncateValue:d}}])})})(pR);var bCe=pR.exports;const _Ce=cn(bCe);function wCe(n){if(typeof n!="string")throw new Error("Param name must be a string");try{const t=`${n}=`,r=document.cookie.split(";");for(let i=0;i<r.length;i++){let a=r[i];for(;a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(t)===0)return a.substring(t.length,a.length)}}catch{}return null}const xCe="disabledThirdParties",CCe=["google","facebook","segment","logrocket","rollbar"];function kCe(){let n=[];try{const t=JSON.parse(wCe(xCe));Array.isArray(t)&&(n=t)}catch{}return n.filter(t=>CCe.includes(t))}const fR=Xe.rollbar.clientToken,W3=new _Ce({accessToken:fR,captureUncaught:!0,captureUnhandledRejections:!0,source_map_enabled:!0,environment:Xe.rollbar.environment||Xe.environment,enabled:!1,ignoredMessages:["The operation is insecure","Script error.","null is not an object (evaluating 'localStorage.getItem')","Unexpected token '<'","expected expression, got '<'","ChunkLoadError","Loading chunk","ResizeObserver loop limit exceeded","Failed to update a ServiceWorker for scope","Object Not Found Matching Id","newestWorker is null"],payload:{client:{javascript:{code_version:"0.12.1",source_map_enabled:!0,guess_uncaught_frames:!0}}},transform:n=>{const{trace:t}=n.body;if(t&&t.frames)for(let r=0;r<t.frames.length;r++){const{filename:i}=t.frames[r];i&&(t.frames[r].filename=t.frames[r].filename.replace(Xe.baseUrl,"https://dynamichost"))}}}),SCe=!!fR&&!kCe().includes("rollbar");window.enableErrorTracker=()=>{SCe&&W3.configure({enabled:!0})};const TCe=[9001,9002,9003,9004,9005,9006],ECe=[401];function $Ce(n){const{payload:t}=n,r=a=>Be.te(`errors:${a}`)&&Be.t(`errors:${a}`);let i=r(n.code);return t.code&&r(t.code)?i=r(t.code):t.fallbackCode&&r(t.fallbackCode)?i=r(t.fallbackCode):t.string&&(i=t.string),i}class ACe{constructor(){Pn(this,"errors",new Map);this.handleError.bind(this)}init({logger:t=console,showMessage:r,onNetworkError:i,clearNetworkError:a}={}){if(this._logger=t,typeof r!="function")throw Error("showMessage must be a function");this._showMessage=r,this._onNetworkError=i,this._clearNetworkError=a}normalizeError(t){return this.getErrorType(t)!=="Error"?t:new j3(t)}_showNotification(t,r){const i=` Tyvärr har ett okänt fel inträffat, vi har loggat felet och kommer snarast att åtgärda det.
|
|
452
452
|
`;this._showMessage({type:r||"error",message:t||i})}logError(t){this._logger?(this._logger.error(t),this._logger.debug(`${t.name}: ${t.message}`,t.payload)):(console.error(t),console.debug(`${t.name}: ${t.message}`,t.payload))}getErrorType(t){return Object.keys(rR).some(i=>t instanceof rR[i])?t.name:"Error"}addCustomData(t,r){hn(r)!=="object"||this.getErrorType(t)==="Error"||t.add(r)}saveError(t){const r=this.getErrorType(t);this.errors.has(r)||this.errors.set(r,[]);const i=this.errors.get(r);this.errors.set(r,{...i,[t.message]:{count:((i[t.message]||{}).count||0)+1,lastError:new Date}})}isDuplicate(t,r=1){const i=this.getErrorType(t),{lastError:a}=(this.errors.get(i)||{})[t.message]||{};return!!(a&&D1e(I1e(a,r)))}notifyUser(t){if(this.isDuplicate(t)||t.payload&&!t.payload.showMessage)return;const r=$Ce(t);r&&this._showNotification(r)}sendRollbarError(t,r=10){if(this.isDuplicate(t,r))return;const{payload:i={},httpStatusCode:a}=t||{},{code:o}=i;o&&TCe.includes(o)||!o&&a&&ECe.includes(a)||W3.error(t,i)}async resolveNetworkError(t){var r;try{await x3e(),(r=this._clearNetworkError)==null||r.call(this)}catch(i){this.getErrorType(i)!=="NetworkError"&&this.handleError(i),setTimeout(()=>{this.resolveNetworkError(t).catch(this.handleError)},5e3)}}}class OCe extends ACe{handleError(t,r){var a;const i=this.normalizeError(t);this.addCustomData(i,r),this.notifyUser(i),this.logError(i),this.sendRollbarError(i),!this.isDuplicate(i)&&this.getErrorType(i)==="NetworkError"&&((a=this._onNetworkError)==null||a.call(this,i),this.resolveNetworkError(i).catch(this.handleError)),this.saveError(i)}onVueException(t,r,i){r.$nextTick(()=>{this.handleError(t)})}}const G3=new OCe,Rr=G3.handleError.bind(G3),es=Ne.observable({messages:[],actions:{}}),DCe=n=>es.messages.push(vp(n)),Zm=n=>{const t=es.messages[n];es.actions[t==null?void 0:t._uniqueId]&&delete es.actions[t._uniqueId],es.messages.splice(n,1)},hR=({index:n,type:t})=>{try{const r={cancel:()=>Zm(n)},i=es.messages[n];if(!i||!i._uniqueId)throw Error("message not found, failed to trigger action");const a=es.actions[i._uniqueId];if(!a)throw Error("message has no actions, failed to trigger action");const o=a[t];if(!o)throw Error(`message has no action of type ${t}`);let s=o;if(typeof o=="string"&&(s=r[o],!s))throw Error(`No predefined action of type ${o}`);if(typeof s!="function")throw Error("Unable to extract function from message action");return s(i)}catch(r){return Rr(r)}},jp=n=>{const{type:t,displayType:r="notification",time:i=5e3,title:a,message:o,closeButton:s,omit:c=""}=n,l={},u={};if((f=>f.split(",").some(h=>{const[m="foo",g="bar"]=h.split(":");return Ne.prototype[m]===g}))(c))return;n.actions&&Object.keys(n.actions).forEach(f=>{const h=n.actions[f];if(typeof h=="object"&&!Array.isArray(h)){if(!h.fn&&!h.callback)throw Error(`No callback function provided for action ${f}`);l[f]=h.fn||h.callback,delete h.fn,delete h.callback,u[f]=h}else if(typeof h=="string")l[f]=h,u[f]={};else if(typeof h=="function")l[f]=h,u[f]={};else throw Error(`Action, ${f} , must be one of: object|string|function`)}),DCe({actions:u,title:a,message:o,type:t,displayType:r,time:i,closeButton:s});const p=es.messages.slice(-1)[0];es.actions[p._uniqueId]=l},Gs=(n,t)=>jp({type:n,message:t}),mR=es,Q9t="";function he(n,t,r,i,a,o,s,c){var l=typeof n=="function"?n.options:n;t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),i&&(l.functional=!0),o&&(l._scopeId="data-v-"+o);var u;if(s?(u=function(f){f=f||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!f&&typeof __VUE_SSR_CONTEXT__<"u"&&(f=__VUE_SSR_CONTEXT__),a&&a.call(this,f),f&&f._registeredComponents&&f._registeredComponents.add(s)},l._ssrRegister=u):a&&(u=c?function(){a.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:a),u)if(l.functional){l._injectStyles=u;var d=l.render;l.render=function(h,m){return u.call(m),d(h,m)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,u):[u]}return{exports:n,options:l}}const MCe={props:{size:{type:String,default:"40px"},strokeWidth:{type:Number,default:6},color:{type:String,default:""}}};var PCe=function(t,r){return t("svg",{staticClass:"spinner spinner--circle inline-block",class:[r.props.color],style:{width:r.props.size,height:r.props.size,lineHeight:r.props.size,...r.data.staticStyle},attrs:{viewBox:"0 0 66 66",xmlns:"http://www.w3.org/2000/svg"}},[t("circle",{staticClass:"path",attrs:{fill:"none","stroke-width":r.props.strokeWidth,"stroke-linecap":"round",cx:"33",cy:"33",r:"30"}})])},ICe=[],RCe=he(MCe,PCe,ICe,!0,null,"c4dd8c6e",null,null);const Jm=RCe.exports,LCe={name:"UserMessages",components:{Spinner:Jm},props:{notification:{type:Object,default:()=>({message:"",time:null,type:"error",actions:[],closeButton:!0})},index:{type:Number,default:null}},data(){return{timer:null,displayTimer:null,countDownInterval:null}},async mounted(){this.notification&&(this.notification.time&&await this.addTimer(this.notification.time),this.notification.type==="countdown"&&this.startCountDown(Math.round(this.notification.time/1e3)))},beforeDestroy(){this.countDownInterval&&this.stopCountDown()},methods:{close(){Zm(this.index)},async addTimer(n){if(typeof this.notification.time=="function"){await this.notification.time()==="close"&&this.close();return}const t=()=>Zm(this.index);this.timer=setTimeout(t,n)},clearTimer(){this.timer&&clearTimeout(this.timer)},onMouseOver(){this.clearTimer()},onMouseOut(){this.notification.time,this.addTimer(3e3)},onActionClick(n){hR({index:this.index,type:n}),Zm(this.index)},startCountDown(n){this.displayTimer=n,this.countDownInterval=setInterval(()=>{this.displayTimer===0&&this.stopCountDown(),this.displayTimer-=1},1e3)},stopCountDown(){clearInterval(this.countDownInterval)}}};var FCe=function(){var t=this,r=t._self._c;return r("transition",{attrs:{appear:"","enter-active-class":"transition-all duration-200 ease-out","enter-class":"translate-y-full opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-all duration-200 ease-in","leave-class":"opacity-100","leave-to-class":"translate-y-full opacity-0"}},[r("div",{staticClass:"flex justify-center w-full left-1/2 fixed z-[2147483647] -translate-x-1/2 bottom-4 pointer-events-none",class:[t.notification.type]},[r("div",{staticClass:"z-[100] flex items-center leading-none text-white font-medium h-11 pl-4 rounded-lg pointer-events-auto",class:["notification",t.notification.type,t.notification.closeButton||Object.keys(t.notification.actions||{}).length?"pr-2":"pr-5",{"bg-green-600":t.notification.type==="success","bg-red-500":t.notification.type==="error","bg-orange-600":t.notification.type==="warning","bg-primary-500":!["success","error","warning"].includes(t.notification.type)}],staticStyle:{"max-width":"calc(100% - calc(2 * var(--rem)))"},on:{"mouse-over":t.onMouseOver,"mouse-leave":t.onMouseOut}},[r("div",{staticClass:"block mt-px mr-3 font-semibold"},[t.notification.type==="success"?r("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[r("path",{attrs:{d:"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"}})]):t.notification.type==="error"?r("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[r("polygon",{attrs:{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"}}),r("line",{attrs:{x1:"12",y1:"8",x2:"12",y2:"12"}}),r("line",{attrs:{x1:"12",y1:"16",x2:"12",y2:"16"}})]):t.notification.type==="warning"?r("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[r("path",{attrs:{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}}),r("line",{attrs:{x1:"12",y1:"9",x2:"12",y2:"13"}}),r("line",{attrs:{x1:"12",y1:"17",x2:"12",y2:"17"}})]):["spinner","countdown"].includes(t.notification.type)?r("Spinner",{attrs:{size:"18px",color:"white","stroke-width":8}}):r("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[r("path",{attrs:{d:"M22 17H2a3 3 0 0 0 3-3V9a7 7 0 0 1 14 0v5a3 3 0 0 0 3 3zm-8.27 4a2 2 0 0 1-3.46 0"}})])],1),r("div",{staticClass:"flex-auto text-sm"},[t._v(" "+t._s(t.notification.message)+" ")]),t.notification.type==="countdown"?r("div",{staticClass:"ml-5 font-medium countdown-text"},[t._v(" "+t._s(t.$t("time.secondsLeft",{time:t.displayTimer}))+" ")]):t._e(),Object.keys(t.notification.actions||{}).length?r("div",{staticClass:"w-4"}):t._e(),t.notification.actions&&t.notification.actions.submit?r("div",{staticClass:"px-3 py-2 ml-1 font-semibold leading-none text-white transition-all rounded-md cursor-pointer font-sm bg-white/20 hover:bg-white/30 active:scale-95",on:{click:function(i){return i.preventDefault(),t.onActionClick("submit")}}},[t._v(" "+t._s(t.notification.actions.submit.text)+" ")]):t._e(),t.notification.actions&&t.notification.actions.undo?r("div",{staticClass:"px-3 py-2 ml-1 font-semibold leading-none text-white transition-all rounded-md cursor-pointer font-sm bg-white/20 hover:bg-white/30 active:scale-95",on:{click:function(i){return i.preventDefault(),t.onActionClick("undo")}}},[t._v(" "+t._s(t.notification.actions.undo.text||t.$t("undo"))+" ")]):t._e(),t.notification.closeButton?r("div",{staticClass:"flex items-center justify-center p-2 ml-1 text-white transition-all rounded-full cursor-pointer hover:bg-white/30 active:scale-95",on:{click:function(i){return i.preventDefault(),t.close.apply(null,arguments)}}},[r("BaseIcon",{attrs:{type:"x",size:"14"}})],1):t._e()])])])},NCe=[],BCe=he(LCe,FCe,NCe,!1,null,null,null,null);const jCe=BCe.exports,e$t="",zCe={name:"Dialog",props:{dialog:{type:Object,default:()=>({type:""})},index:{type:Number,default:null}},data(){return{name:"dialog-modal"}},computed:{hasSubmit(){const{submit:n}=this.dialog.actions||{};return typeof n=="object"&&!Array.isArray(n)},submitText(){const{submit:n={}}=this.dialog.actions||{};return n.text||this.$t("continue")},submitType(){return this.dialog.type||"danger"},hasCancel(){const{cancel:n}=this.dialog.actions||{};return typeof n=="object"&&!Array.isArray(n)},cancelText(){const{cancel:n={}}=this.dialog.actions||{};return n.text||this.$t("cancel")}},mounted(){this.$modal.show(this.name),setTimeout(()=>{this.$refs.action&&this.$refs.action.$el.focus()},100),window.addEventListener("keyup",this.handleEscapeKeyUp)},beforeDestroy(){this.$modal.hide(this.name),window.removeEventListener("keyup",this.handleEscapeKeyUp)},methods:{onMessageAction(n){hR({index:this.index,type:n}),Zm(this.index),this.$modal.hide(this.name)},handleEscapeKeyUp(n){n.which===27&&this.onMessageAction("cancel")}}};var VCe=function(){var t=this,r=t._self._c;return r("modal",{staticClass:"transition-fix",staticStyle:{"z-index":"99999999"},attrs:{classes:["v--modal",t.name,"bg-white !rounded-xl shadow-2xl py-4 px-4 duration-100 border border-gray-200"],adaptive:!0,width:"90%","max-width":380,scrollable:!1,height:"auto","click-to-close":!1,transition:"modal-pop",name:"dialog-modal"}},[r("div",{staticClass:"p-2 mb-6 text-base font-normal text-gray-700 select-none"},[t.dialog.title?r("div",{staticClass:"text-md font-bold mb-1 text-gray-900"},[t._v(" "+t._s(t.dialog.title)+" ")]):t._e(),r("div",{staticClass:"text-sm"},[t._v(" "+t._s(t.dialog.message)+" ")])]),r("div",{staticClass:"button-row flex justify-end"},[t.hasCancel?r("CButton",{attrs:{type:"none",pattern:"tertiary",tabindex:"-1",size:"small",taller:""},on:{click:function(i){return t.onMessageAction("cancel")}}},[t._v(" "+t._s(t.cancelText)+" ")]):t._e(),t.hasSubmit?r("CButton",{ref:"action",staticStyle:{"margin-left":"calc(1 * var(--rem))"},attrs:{type:t.submitType,tabindex:"0",size:"small",taller:""},on:{click:function(i){return t.onMessageAction("submit")}}},[t._v(" "+t._s(t.submitText)+" ")]):t._e()],1)])},UCe=[],HCe=he(zCe,VCe,UCe,!1,null,null,null,null);const WCe=HCe.exports,GCe={name:"UserMessages",components:{Notification:jCe,Dialog:WCe},props:{disableNotification:{type:Boolean,default:!1},disableDialog:{type:Boolean,default:!1}},computed:{notification(){const{messages:n}=mR,t=n.findIndex(r=>r.displayType==="notification");return t!==-1&&{index:t,data:n[t]}},dialog(){const{messages:n}=mR,t=n.findIndex(r=>r.displayType==="dialog");return t!==-1&&{index:t,data:n[t]}}}};var qCe=function(){var t=this,r=t._self._c;return r("div",[t.notification&&!t.disableNotification?r("Notification",{key:t.notification.data&&t.notification.data._uniqueId,attrs:{notification:t.notification.data,index:t.notification.index}}):t._e(),t.dialog&&!t.disableDialog?r("Dialog",{key:t.dialog.data&&t.dialog.data._uniqueId,attrs:{dialog:t.dialog.data,index:t.dialog.index}}):t._e()],1)},YCe=[],KCe=he(GCe,qCe,YCe,!1,null,null,null,null);const ZCe=KCe.exports;var ny=function(n){return n&&n.Math==Math&&n},Ur=ny(typeof globalThis=="object"&&globalThis)||ny(typeof window=="object"&&window)||ny(typeof self=="object"&&self)||ny(typeof Zt=="object"&&Zt)||function(){return this}()||Function("return this")(),q3={},Vn=function(n){try{return!!n()}catch{return!0}},JCe=Vn,fo=!JCe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),XCe=Vn,ry=!XCe(function(){var n=function(){}.bind();return typeof n!="function"||n.hasOwnProperty("prototype")}),QCe=ry,iy=Function.prototype.call,Fa=QCe?iy.bind(iy):function(){return iy.apply(iy,arguments)},Y3={},gR={}.propertyIsEnumerable,vR=Object.getOwnPropertyDescriptor,eke=vR&&!gR.call({1:2},1);Y3.f=eke?function(t){var r=vR(this,t);return!!r&&r.enumerable}:gR;var ay=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}},yR=ry,bR=Function.prototype,K3=bR.call,tke=yR&&bR.bind.bind(K3,K3),_R=yR?tke:function(n){return function(){return K3.apply(n,arguments)}},wR=_R,nke=wR({}.toString),rke=wR("".slice),Ql=function(n){return rke(nke(n),8,-1)},ike=Ql,ake=_R,qn=function(n){if(ike(n)==="Function")return ake(n)},oke=qn,ske=Vn,lke=Ql,Z3=Object,cke=oke("".split),oy=ske(function(){return!Z3("z").propertyIsEnumerable(0)})?function(n){return lke(n)=="String"?cke(n,""):Z3(n)}:Z3,Au=function(n){return n==null},uke=Au,dke=TypeError,zp=function(n){if(uke(n))throw dke("Can't call method on "+n);return n},pke=oy,fke=zp,Vp=function(n){return pke(fke(n))},J3=typeof document=="object"&&document.all,hke=typeof J3>"u"&&J3!==void 0,xR={all:J3,IS_HTMLDDA:hke},CR=xR,mke=CR.all,Er=CR.IS_HTMLDDA?function(n){return typeof n=="function"||n===mke}:function(n){return typeof n=="function"},kR=Er,SR=xR,gke=SR.all,Ki=SR.IS_HTMLDDA?function(n){return typeof n=="object"?n!==null:kR(n)||n===gke}:function(n){return typeof n=="object"?n!==null:kR(n)},X3=Ur,vke=Er,yke=function(n){return vke(n)?n:void 0},Xm=function(n,t){return arguments.length<2?yke(X3[n]):X3[n]&&X3[n][t]},bke=qn,Q3=bke({}.isPrototypeOf),_ke=Xm,wke=_ke("navigator","userAgent")||"",TR=Ur,eC=wke,ER=TR.process,$R=TR.Deno,AR=ER&&ER.versions||$R&&$R.version,OR=AR&&AR.v8,ho,sy;OR&&(ho=OR.split("."),sy=ho[0]>0&&ho[0]<4?1:+(ho[0]+ho[1])),!sy&&eC&&(ho=eC.match(/Edge\/(\d+)/),(!ho||ho[1]>=74)&&(ho=eC.match(/Chrome\/(\d+)/),ho&&(sy=+ho[1])));var ly=sy,DR=ly,xke=Vn,MR=!!Object.getOwnPropertySymbols&&!xke(function(){var n=Symbol();return!String(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&DR&&DR<41}),Cke=MR,PR=Cke&&!Symbol.sham&&typeof Symbol.iterator=="symbol",kke=Xm,Ske=Er,Tke=Q3,Eke=PR,$ke=Object,IR=Eke?function(n){return typeof n=="symbol"}:function(n){var t=kke("Symbol");return Ske(t)&&Tke(t.prototype,$ke(n))},Ake=String,tC=function(n){try{return Ake(n)}catch{return"Object"}},Oke=Er,Dke=tC,Mke=TypeError,cy=function(n){if(Oke(n))return n;throw Mke(Dke(n)+" is not a function")},Pke=cy,Ike=Au,Qm=function(n,t){var r=n[t];return Ike(r)?void 0:Pke(r)},nC=Fa,rC=Er,iC=Ki,Rke=TypeError,Lke=function(n,t){var r,i;if(t==="string"&&rC(r=n.toString)&&!iC(i=nC(r,n))||rC(r=n.valueOf)&&!iC(i=nC(r,n))||t!=="string"&&rC(r=n.toString)&&!iC(i=nC(r,n)))return i;throw Rke("Can't convert object to primitive value")},RR={exports:{}},LR=Ur,Fke=Object.defineProperty,aC=function(n,t){try{Fke(LR,n,{value:t,configurable:!0,writable:!0})}catch{LR[n]=t}return t},Nke=Ur,Bke=aC,FR="__core-js_shared__",jke=Nke[FR]||Bke(FR,{}),oC=jke,NR=oC;(RR.exports=function(n,t){return NR[n]||(NR[n]=t!==void 0?t:{})})("versions",[]).push({version:"3.26.0",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.0/LICENSE",source:"https://github.com/zloirock/core-js"});var sC=RR.exports,zke=zp,Vke=Object,Ou=function(n){return Vke(zke(n))},Uke=qn,Hke=Ou,Wke=Uke({}.hasOwnProperty),mo=Object.hasOwn||function(t,r){return Wke(Hke(t),r)},Gke=qn,qke=0,Yke=Math.random(),Kke=Gke(1 .toString),lC=function(n){return"Symbol("+(n===void 0?"":n)+")_"+Kke(++qke+Yke,36)},Zke=Ur,Jke=sC,BR=mo,Xke=lC,jR=MR,zR=PR,Up=Jke("wks"),Du=Zke.Symbol,VR=Du&&Du.for,Qke=zR?Du:Du&&Du.withoutSetter||Xke,vi=function(n){if(!BR(Up,n)||!(jR||typeof Up[n]=="string")){var t="Symbol."+n;jR&&BR(Du,n)?Up[n]=Du[n]:zR&&VR?Up[n]=VR(t):Up[n]=Qke(t)}return Up[n]},e6e=Fa,UR=Ki,HR=IR,t6e=Qm,n6e=Lke,r6e=vi,i6e=TypeError,a6e=r6e("toPrimitive"),o6e=function(n,t){if(!UR(n)||HR(n))return n;var r=t6e(n,a6e),i;if(r){if(t===void 0&&(t="default"),i=e6e(r,n,t),!UR(i)||HR(i))return i;throw i6e("Can't convert object to primitive value")}return t===void 0&&(t="number"),n6e(n,t)},s6e=o6e,l6e=IR,cC=function(n){var t=s6e(n,"string");return l6e(t)?t:t+""},c6e=Ur,WR=Ki,uC=c6e.document,u6e=WR(uC)&&WR(uC.createElement),dC=function(n){return u6e?uC.createElement(n):{}},d6e=fo,p6e=Vn,f6e=dC,GR=!d6e&&!p6e(function(){return Object.defineProperty(f6e("div"),"a",{get:function(){return 7}}).a!=7}),h6e=fo,m6e=Fa,g6e=Y3,v6e=ay,y6e=Vp,b6e=cC,_6e=mo,w6e=GR,qR=Object.getOwnPropertyDescriptor;q3.f=h6e?qR:function(t,r){if(t=y6e(t),r=b6e(r),w6e)try{return qR(t,r)}catch{}if(_6e(t,r))return v6e(!m6e(g6e.f,t,r),t[r])};var go={},x6e=fo,C6e=Vn,YR=x6e&&C6e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),k6e=Ki,S6e=String,T6e=TypeError,ma=function(n){if(k6e(n))return n;throw T6e(S6e(n)+" is not an object")},E6e=fo,$6e=GR,A6e=YR,uy=ma,KR=cC,O6e=TypeError,pC=Object.defineProperty,D6e=Object.getOwnPropertyDescriptor,fC="enumerable",hC="configurable",mC="writable";go.f=E6e?A6e?function(t,r,i){if(uy(t),r=KR(r),uy(i),typeof t=="function"&&r==="prototype"&&"value"in i&&mC in i&&!i[mC]){var a=D6e(t,r);a&&a[mC]&&(t[r]=i.value,i={configurable:hC in i?i[hC]:a[hC],enumerable:fC in i?i[fC]:a[fC],writable:!1})}return pC(t,r,i)}:pC:function(t,r,i){if(uy(t),r=KR(r),uy(i),$6e)try{return pC(t,r,i)}catch{}if("get"in i||"set"in i)throw O6e("Accessors not supported");return"value"in i&&(t[r]=i.value),t};var M6e=fo,P6e=go,I6e=ay,Hp=M6e?function(n,t,r){return P6e.f(n,t,I6e(1,r))}:function(n,t,r){return n[t]=r,n},ZR={exports:{}},gC=fo,R6e=mo,JR=Function.prototype,L6e=gC&&Object.getOwnPropertyDescriptor,vC=R6e(JR,"name"),F6e=vC&&function(){}.name==="something",N6e=vC&&(!gC||gC&&L6e(JR,"name").configurable),yC={EXISTS:vC,PROPER:F6e,CONFIGURABLE:N6e},B6e=qn,j6e=Er,bC=oC,z6e=B6e(Function.toString);j6e(bC.inspectSource)||(bC.inspectSource=function(n){return z6e(n)});var XR=bC.inspectSource,V6e=Ur,U6e=Er,QR=V6e.WeakMap,eL=U6e(QR)&&/native code/.test(String(QR)),H6e=sC,W6e=lC,tL=H6e("keys"),_C=function(n){return tL[n]||(tL[n]=W6e(n))},dy={},G6e=eL,nL=Ur,q6e=Ki,Y6e=Hp,wC=mo,xC=oC,K6e=_C,Z6e=dy,rL="Object already initialized",CC=nL.TypeError,J6e=nL.WeakMap,py,eg,fy,X6e=function(n){return fy(n)?eg(n):py(n,{})},Q6e=function(n){return function(t){var r;if(!q6e(t)||(r=eg(t)).type!==n)throw CC("Incompatible receiver, "+n+" required");return r}};if(G6e||xC.state){var ts=xC.state||(xC.state=new J6e);ts.get=ts.get,ts.has=ts.has,ts.set=ts.set,py=function(n,t){if(ts.has(n))throw CC(rL);return t.facade=n,ts.set(n,t),t},eg=function(n){return ts.get(n)||{}},fy=function(n){return ts.has(n)}}else{var Wp=K6e("state");Z6e[Wp]=!0,py=function(n,t){if(wC(n,Wp))throw CC(rL);return t.facade=n,Y6e(n,Wp,t),t},eg=function(n){return wC(n,Wp)?n[Wp]:{}},fy=function(n){return wC(n,Wp)}}var Gp={set:py,get:eg,has:fy,enforce:X6e,getterFor:Q6e},eSe=Vn,tSe=Er,hy=mo,kC=fo,nSe=yC.CONFIGURABLE,rSe=XR,iL=Gp,iSe=iL.enforce,aSe=iL.get,my=Object.defineProperty,oSe=kC&&!eSe(function(){return my(function(){},"length",{value:8}).length!==8}),sSe=String(String).split("String"),lSe=ZR.exports=function(n,t,r){String(t).slice(0,7)==="Symbol("&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hy(n,"name")||nSe&&n.name!==t)&&(kC?my(n,"name",{value:t,configurable:!0}):n.name=t),oSe&&r&&hy(r,"arity")&&n.length!==r.arity&&my(n,"length",{value:r.arity});try{r&&hy(r,"constructor")&&r.constructor?kC&&my(n,"prototype",{writable:!1}):n.prototype&&(n.prototype=void 0)}catch{}var i=iSe(n);return hy(i,"source")||(i.source=sSe.join(typeof t=="string"?t:"")),n};Function.prototype.toString=lSe(function(){return tSe(this)&&aSe(this).source||rSe(this)},"toString");var cSe=ZR.exports,uSe=Er,dSe=go,pSe=cSe,fSe=aC,Mu=function(n,t,r,i){i||(i={});var a=i.enumerable,o=i.name!==void 0?i.name:t;if(uSe(r)&&pSe(r,o,i),i.global)a?n[t]=r:fSe(t,r);else{try{i.unsafe?n[t]&&(a=!0):delete n[t]}catch{}a?n[t]=r:dSe.f(n,t,{value:r,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return n},gy={},hSe=Math.ceil,mSe=Math.floor,gSe=Math.trunc||function(t){var r=+t;return(r>0?mSe:hSe)(r)},vSe=gSe,vy=function(n){var t=+n;return t!==t||t===0?0:vSe(t)},ySe=vy,bSe=Math.max,_Se=Math.min,aL=function(n,t){var r=ySe(n);return r<0?bSe(r+t,0):_Se(r,t)},wSe=vy,xSe=Math.min,SC=function(n){return n>0?xSe(wSe(n),9007199254740991):0},CSe=SC,qp=function(n){return CSe(n.length)},kSe=Vp,SSe=aL,TSe=qp,oL=function(n){return function(t,r,i){var a=kSe(t),o=TSe(a),s=SSe(i,o),c;if(n&&r!=r){for(;o>s;)if(c=a[s++],c!=c)return!0}else for(;o>s;s++)if((n||s in a)&&a[s]===r)return n||s||0;return!n&&-1}},ESe={includes:oL(!0),indexOf:oL(!1)},$Se=qn,TC=mo,ASe=Vp,OSe=ESe.indexOf,DSe=dy,sL=$Se([].push),lL=function(n,t){var r=ASe(n),i=0,a=[],o;for(o in r)!TC(DSe,o)&&TC(r,o)&&sL(a,o);for(;t.length>i;)TC(r,o=t[i++])&&(~OSe(a,o)||sL(a,o));return a},EC=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],MSe=lL,PSe=EC,ISe=PSe.concat("length","prototype");gy.f=Object.getOwnPropertyNames||function(t){return MSe(t,ISe)};var $C={};$C.f=Object.getOwnPropertySymbols;var RSe=Xm,LSe=qn,FSe=gy,NSe=$C,BSe=ma,jSe=LSe([].concat),zSe=RSe("Reflect","ownKeys")||function(t){var r=FSe.f(BSe(t)),i=NSe.f;return i?jSe(r,i(t)):r},cL=mo,VSe=zSe,USe=q3,HSe=go,WSe=function(n,t,r){for(var i=VSe(t),a=HSe.f,o=USe.f,s=0;s<i.length;s++){var c=i[s];!cL(n,c)&&!(r&&cL(r,c))&&a(n,c,o(t,c))}},GSe=Vn,qSe=Er,YSe=/#|\.prototype\./,tg=function(n,t){var r=ZSe[KSe(n)];return r==XSe?!0:r==JSe?!1:qSe(t)?GSe(t):!!t},KSe=tg.normalize=function(n){return String(n).replace(YSe,".").toLowerCase()},ZSe=tg.data={},JSe=tg.NATIVE="N",XSe=tg.POLYFILL="P",uL=tg,AC=Ur,QSe=q3.f,e8e=Hp,t8e=Mu,n8e=aC,r8e=WSe,i8e=uL,qs=function(n,t){var r=n.target,i=n.global,a=n.stat,o,s,c,l,u,d;if(i?s=AC:a?s=AC[r]||n8e(r,{}):s=(AC[r]||{}).prototype,s)for(c in t){if(u=t[c],n.dontCallGetSet?(d=QSe(s,c),l=d&&d.value):l=s[c],o=i8e(i?c:r+(a?".":"#")+c,n.forced),!o&&l!==void 0){if(typeof u==typeof l)continue;r8e(u,l)}(n.sham||l&&l.sham)&&e8e(u,"sham",!0),t8e(s,c,u,n)}},a8e=Ql,dL=Array.isArray||function(t){return a8e(t)=="Array"},o8e=TypeError,s8e=9007199254740991,l8e=function(n){if(n>s8e)throw o8e("Maximum allowed index exceeded");return n},c8e=cC,u8e=go,d8e=ay,pL=function(n,t,r){var i=c8e(t);i in n?u8e.f(n,i,d8e(0,r)):n[i]=r},p8e=vi,f8e=p8e("toStringTag"),fL={};fL[f8e]="z";var OC=String(fL)==="[object z]",h8e=OC,m8e=Er,yy=Ql,g8e=vi,v8e=g8e("toStringTag"),y8e=Object,b8e=yy(function(){return arguments}())=="Arguments",_8e=function(n,t){try{return n[t]}catch{}},by=h8e?yy:function(n){var t,r,i;return n===void 0?"Undefined":n===null?"Null":typeof(r=_8e(t=y8e(n),v8e))=="string"?r:b8e?yy(t):(i=yy(t))=="Object"&&m8e(t.callee)?"Arguments":i},w8e=qn,x8e=Vn,hL=Er,C8e=by,k8e=Xm,S8e=XR,mL=function(){},T8e=[],gL=k8e("Reflect","construct"),DC=/^\s*(?:class|function)\b/,E8e=w8e(DC.exec),$8e=!DC.exec(mL),ng=function(t){if(!hL(t))return!1;try{return gL(mL,T8e,t),!0}catch{return!1}},vL=function(t){if(!hL(t))return!1;switch(C8e(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $8e||!!E8e(DC,S8e(t))}catch{return!0}};vL.sham=!0;var A8e=!gL||x8e(function(){var n;return ng(ng.call)||!ng(Object)||!ng(function(){n=!0})||n})?vL:ng,yL=dL,O8e=A8e,D8e=Ki,M8e=vi,P8e=M8e("species"),bL=Array,I8e=function(n){var t;return yL(n)&&(t=n.constructor,O8e(t)&&(t===bL||yL(t.prototype))?t=void 0:D8e(t)&&(t=t[P8e],t===null&&(t=void 0))),t===void 0?bL:t},R8e=I8e,_L=function(n,t){return new(R8e(n))(t===0?0:t)},L8e=Vn,F8e=vi,N8e=ly,B8e=F8e("species"),wL=function(n){return N8e>=51||!L8e(function(){var t=[],r=t.constructor={};return r[B8e]=function(){return{foo:1}},t[n](Boolean).foo!==1})},j8e=qs,z8e=Vn,V8e=dL,U8e=Ki,H8e=Ou,W8e=qp,xL=l8e,CL=pL,G8e=_L,q8e=wL,Y8e=vi,K8e=ly,kL=Y8e("isConcatSpreadable"),Z8e=K8e>=51||!z8e(function(){var n=[];return n[kL]=!1,n.concat()[0]!==n}),J8e=q8e("concat"),X8e=function(n){if(!U8e(n))return!1;var t=n[kL];return t!==void 0?!!t:V8e(n)},Q8e=!Z8e||!J8e;j8e({target:"Array",proto:!0,arity:1,forced:Q8e},{concat:function(t){var r=H8e(this),i=G8e(r,0),a=0,o,s,c,l,u;for(o=-1,c=arguments.length;o<c;o++)if(u=o===-1?r:arguments[o],X8e(u))for(l=W8e(u),xL(a+l),s=0;s<l;s++,a++)s in u&&CL(i,a,u[s]);else xL(a+1),CL(i,a++,u);return i.length=a,i}});var e7e=OC,t7e=by,n7e=e7e?{}.toString:function(){return"[object "+t7e(this)+"]"},r7e=OC,i7e=Mu,a7e=n7e;r7e||i7e(Object.prototype,"toString",a7e,{unsafe:!0});var SL={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},o7e=dC,MC=o7e("span").classList,TL=MC&&MC.constructor&&MC.constructor.prototype,EL=TL===Object.prototype?void 0:TL,$L=qn,s7e=cy,l7e=ry,c7e=$L($L.bind),AL=function(n,t){return s7e(n),t===void 0?n:l7e?c7e(n,t):function(){return n.apply(t,arguments)}},u7e=AL,d7e=qn,p7e=oy,f7e=Ou,h7e=qp,m7e=_L,OL=d7e([].push),ec=function(n){var t=n==1,r=n==2,i=n==3,a=n==4,o=n==6,s=n==7,c=n==5||o;return function(l,u,d,p){for(var f=f7e(l),h=p7e(f),m=u7e(u,d),g=h7e(h),y=0,b=p||m7e,w=t?b(l,g):r||s?b(l,0):void 0,S,k;g>y;y++)if((c||y in h)&&(S=h[y],k=m(S,y,f),n))if(t)w[y]=k;else if(k)switch(n){case 3:return!0;case 5:return S;case 6:return y;case 2:OL(w,S)}else switch(n){case 4:return!1;case 7:OL(w,S)}return o?-1:i||a?a:w}},PC={forEach:ec(0),map:ec(1),filter:ec(2),some:ec(3),every:ec(4),find:ec(5),findIndex:ec(6),filterReject:ec(7)},g7e=Vn,DL=function(n,t){var r=[][n];return!!r&&g7e(function(){r.call(null,t||function(){return 1},1)})},v7e=PC.forEach,y7e=DL,b7e=y7e("forEach"),_7e=b7e?[].forEach:function(t){return v7e(this,t,arguments.length>1?arguments[1]:void 0)},ML=Ur,PL=SL,w7e=EL,IC=_7e,x7e=Hp,IL=function(n){if(n&&n.forEach!==IC)try{x7e(n,"forEach",IC)}catch{n.forEach=IC}};for(var RC in PL)PL[RC]&&IL(ML[RC]&&ML[RC].prototype);IL(w7e);var C7e=!!(typeof window<"u"&&window.document&&window.document.createElement),k7e=C7e;const LC=cn(k7e);var S7e=by,T7e=String,Pu=function(n){if(S7e(n)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return T7e(n)},RL=`
|
|
453
453
|
\v\f\r \u2028\u2029\uFEFF`,E7e=qn,$7e=zp,A7e=Pu,O7e=RL,LL=E7e("".replace),_y="["+O7e+"]",D7e=RegExp("^"+_y+_y+"*"),M7e=RegExp(_y+_y+"*$"),FC=function(n){return function(t){var r=A7e($7e(t));return n&1&&(r=LL(r,D7e,"")),n&2&&(r=LL(r,M7e,"")),r}},P7e={start:FC(1),end:FC(2),trim:FC(3)},FL=Ur,I7e=Vn,R7e=qn,L7e=Pu,F7e=P7e.trim,NL=RL,rg=FL.parseInt,BL=FL.Symbol,jL=BL&&BL.iterator,zL=/^[+-]?0x/i,N7e=R7e(zL.exec),B7e=rg(NL+"08")!==8||rg(NL+"0x16")!==22||jL&&!I7e(function(){rg(Object(jL))}),j7e=B7e?function(t,r){var i=F7e(L7e(t));return rg(i,r>>>0||(N7e(zL,i)?16:10))}:rg,z7e=qs,VL=j7e;z7e({global:!0,forced:parseInt!=VL},{parseInt:VL});var V7e=lL,U7e=EC,UL=Object.keys||function(t){return V7e(t,U7e)},HL=fo,H7e=qn,W7e=Fa,G7e=Vn,NC=UL,q7e=$C,Y7e=Y3,K7e=Ou,Z7e=oy,Yp=Object.assign,WL=Object.defineProperty,J7e=H7e([].concat),X7e=!Yp||G7e(function(){if(HL&&Yp({b:1},Yp(WL({},"a",{enumerable:!0,get:function(){WL(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var n={},t={},r=Symbol(),i="abcdefghijklmnopqrst";return n[r]=7,i.split("").forEach(function(a){t[a]=a}),Yp({},n)[r]!=7||NC(Yp({},t)).join("")!=i})?function(t,r){for(var i=K7e(t),a=arguments.length,o=1,s=q7e.f,c=Y7e.f;a>o;)for(var l=Z7e(arguments[o++]),u=s?J7e(NC(l),s(l)):NC(l),d=u.length,p=0,f;d>p;)f=u[p++],(!HL||W7e(c,l,f))&&(i[f]=l[f]);return i}:Yp,Q7e=qs,GL=X7e;Q7e({target:"Object",stat:!0,arity:2,forced:Object.assign!==GL},{assign:GL});var eTe=qs,tTe=PC.filter,nTe=wL,rTe=nTe("filter");eTe({target:"Array",proto:!0,forced:!rTe},{filter:function(t){return tTe(this,t,arguments.length>1?arguments[1]:void 0)}});var qL={},iTe=fo,aTe=YR,oTe=go,sTe=ma,lTe=Vp,cTe=UL;qL.f=iTe&&!aTe?Object.defineProperties:function(t,r){sTe(t);for(var i=lTe(r),a=cTe(r),o=a.length,s=0,c;o>s;)oTe.f(t,c=a[s++],i[c]);return t};var uTe=Xm,dTe=uTe("document","documentElement"),pTe=ma,fTe=qL,YL=EC,hTe=dy,mTe=dTe,gTe=dC,vTe=_C,KL=">",ZL="<",BC="prototype",jC="script",JL=vTe("IE_PROTO"),zC=function(){},XL=function(n){return ZL+jC+KL+n+ZL+"/"+jC+KL},QL=function(n){n.write(XL("")),n.close();var t=n.parentWindow.Object;return n=null,t},yTe=function(){var n=gTe("iframe"),t="java"+jC+":",r;return n.style.display="none",mTe.appendChild(n),n.src=String(t),r=n.contentWindow.document,r.open(),r.write(XL("document.F=Object")),r.close(),r.F},wy,xy=function(){try{wy=new ActiveXObject("htmlfile")}catch{}xy=typeof document<"u"?document.domain&&wy?QL(wy):yTe():QL(wy);for(var n=YL.length;n--;)delete xy[BC][YL[n]];return xy()};hTe[JL]=!0;var VC=Object.create||function(t,r){var i;return t!==null?(zC[BC]=pTe(t),i=new zC,zC[BC]=null,i[JL]=t):i=xy(),r===void 0?i:fTe.f(i,r)},bTe=vi,_Te=VC,wTe=go.f,UC=bTe("unscopables"),HC=Array.prototype;HC[UC]==null&&wTe(HC,UC,{configurable:!0,value:_Te(null)});var xTe=function(n){HC[UC][n]=!0},ig={},CTe=Vn,kTe=!CTe(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype}),STe=mo,TTe=Er,ETe=Ou,$Te=_C,ATe=kTe,eF=$Te("IE_PROTO"),WC=Object,OTe=WC.prototype,tF=ATe?WC.getPrototypeOf:function(n){var t=ETe(n);if(STe(t,eF))return t[eF];var r=t.constructor;return TTe(r)&&t instanceof r?r.prototype:t instanceof WC?OTe:null},DTe=Vn,MTe=Er,PTe=Ki,nF=tF,ITe=Mu,RTe=vi,GC=RTe("iterator"),rF=!1,Iu,qC,YC;[].keys&&(YC=[].keys(),"next"in YC?(qC=nF(nF(YC)),qC!==Object.prototype&&(Iu=qC)):rF=!0);var LTe=!PTe(Iu)||DTe(function(){var n={};return Iu[GC].call(n)!==n});LTe&&(Iu={}),MTe(Iu[GC])||ITe(Iu,GC,function(){return this});var iF={IteratorPrototype:Iu,BUGGY_SAFARI_ITERATORS:rF},FTe=go.f,NTe=mo,BTe=vi,aF=BTe("toStringTag"),KC=function(n,t,r){n&&!r&&(n=n.prototype),n&&!NTe(n,aF)&&FTe(n,aF,{configurable:!0,value:t})},jTe=iF.IteratorPrototype,zTe=VC,VTe=ay,UTe=KC,HTe=ig,WTe=function(){return this},GTe=function(n,t,r,i){var a=t+" Iterator";return n.prototype=zTe(jTe,{next:VTe(+!i,r)}),UTe(n,a,!1),HTe[a]=WTe,n},qTe=Er,YTe=String,KTe=TypeError,ZTe=function(n){if(typeof n=="object"||qTe(n))return n;throw KTe("Can't set "+YTe(n)+" as a prototype")},JTe=qn,XTe=ma,QTe=ZTe,oF=Object.setPrototypeOf||("__proto__"in{}?function(){var n=!1,t={},r;try{r=JTe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),r(t,[]),n=t instanceof Array}catch{}return function(a,o){return XTe(a),QTe(o),n?r(a,o):a.__proto__=o,a}}():void 0),eEe=qs,tEe=Fa,sF=yC,nEe=Er,rEe=GTe,lF=tF,cF=oF,iEe=KC,aEe=Hp,ZC=Mu,oEe=vi,sEe=ig,uF=iF,lEe=sF.PROPER,cEe=sF.CONFIGURABLE,dF=uF.IteratorPrototype,Cy=uF.BUGGY_SAFARI_ITERATORS,ag=oEe("iterator"),pF="keys",og="values",fF="entries",uEe=function(){return this},hF=function(n,t,r,i,a,o,s){rEe(r,t,i);var c=function(b){if(b===a&&f)return f;if(!Cy&&b in d)return d[b];switch(b){case pF:return function(){return new r(this,b)};case og:return function(){return new r(this,b)};case fF:return function(){return new r(this,b)}}return function(){return new r(this)}},l=t+" Iterator",u=!1,d=n.prototype,p=d[ag]||d["@@iterator"]||a&&d[a],f=!Cy&&p||c(a),h=t=="Array"&&d.entries||p,m,g,y;if(h&&(m=lF(h.call(new n)),m!==Object.prototype&&m.next&&(lF(m)!==dF&&(cF?cF(m,dF):nEe(m[ag])||ZC(m,ag,uEe)),iEe(m,l,!0))),lEe&&a==og&&p&&p.name!==og&&(cEe?aEe(d,"name",og):(u=!0,f=function(){return tEe(p,this)})),a)if(g={values:c(og),keys:o?f:c(pF),entries:c(fF)},s)for(y in g)(Cy||u||!(y in d))&&ZC(d,y,g[y]);else eEe({target:t,proto:!0,forced:Cy||u},g);return d[ag]!==f&&ZC(d,ag,f,{name:a}),sEe[t]=f,g},mF=function(n,t){return{value:n,done:t}},dEe=Vp,JC=xTe,gF=ig,vF=Gp,pEe=go.f,fEe=hF,ky=mF,hEe=fo,yF="Array Iterator",mEe=vF.set,gEe=vF.getterFor(yF),vEe=fEe(Array,"Array",function(n,t){mEe(this,{type:yF,target:dEe(n),index:0,kind:t})},function(){var n=gEe(this),t=n.target,r=n.kind,i=n.index++;return!t||i>=t.length?(n.target=void 0,ky(void 0,!0)):r=="keys"?ky(i,!1):r=="values"?ky(t[i],!1):ky([i,t[i]],!1)},"values"),bF=gF.Arguments=gF.Array;if(JC("keys"),JC("values"),JC("entries"),hEe&&bF.name!=="values")try{pEe(bF,"name",{value:"values"})}catch{}var XC=qn,yEe=vy,bEe=Pu,_Ee=zp,wEe=XC("".charAt),_F=XC("".charCodeAt),xEe=XC("".slice),wF=function(n){return function(t,r){var i=bEe(_Ee(t)),a=yEe(r),o=i.length,s,c;return a<0||a>=o?n?"":void 0:(s=_F(i,a),s<55296||s>56319||a+1===o||(c=_F(i,a+1))<56320||c>57343?n?wEe(i,a):s:n?xEe(i,a,a+2):(s-55296<<10)+(c-56320)+65536)}},xF={codeAt:wF(!1),charAt:wF(!0)},CEe=xF.charAt,kEe=Pu,CF=Gp,SEe=hF,kF=mF,SF="String Iterator",TEe=CF.set,EEe=CF.getterFor(SF);SEe(String,"String",function(n){TEe(this,{type:SF,string:kEe(n),index:0})},function(){var t=EEe(this),r=t.string,i=t.index,a;return i>=r.length?kF(void 0,!0):(a=CEe(r,i),t.index+=a.length,kF(a,!1))});var $Ee=Mu,TF=function(n,t,r){for(var i in t)$Ee(n,i,t[i],r);return n},EF={exports:{}},$F={},AF=aL,AEe=qp,OEe=pL,DEe=Array,MEe=Math.max,PEe=function(n,t,r){for(var i=AEe(n),a=AF(t,i),o=AF(r===void 0?i:r,i),s=DEe(MEe(o-a,0)),c=0;a<o;a++,c++)OEe(s,c,n[a]);return s.length=c,s},IEe=Ql,REe=Vp,OF=gy.f,LEe=PEe,DF=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],FEe=function(n){try{return OF(n)}catch{return LEe(DF)}};$F.f=function(t){return DF&&IEe(t)=="Window"?FEe(t):OF(REe(t))};var NEe=Vn,BEe=NEe(function(){if(typeof ArrayBuffer=="function"){var n=new ArrayBuffer(8);Object.isExtensible(n)&&Object.defineProperty(n,"a",{value:8})}}),jEe=Vn,zEe=Ki,VEe=Ql,MF=BEe,Sy=Object.isExtensible,UEe=jEe(function(){Sy(1)}),PF=UEe||MF?function(t){return!zEe(t)||MF&&VEe(t)=="ArrayBuffer"?!1:Sy?Sy(t):!0}:Sy,HEe=Vn,WEe=!HEe(function(){return Object.isExtensible(Object.preventExtensions({}))}),GEe=qs,qEe=qn,YEe=dy,KEe=Ki,QC=mo,ZEe=go.f,IF=gy,JEe=$F,ek=PF,XEe=lC,QEe=WEe,RF=!1,Ys=XEe("meta"),e9e=0,tk=function(n){ZEe(n,Ys,{value:{objectID:"O"+e9e++,weakData:{}}})},t9e=function(n,t){if(!KEe(n))return typeof n=="symbol"?n:(typeof n=="string"?"S":"P")+n;if(!QC(n,Ys)){if(!ek(n))return"F";if(!t)return"E";tk(n)}return n[Ys].objectID},n9e=function(n,t){if(!QC(n,Ys)){if(!ek(n))return!0;if(!t)return!1;tk(n)}return n[Ys].weakData},r9e=function(n){return QEe&&RF&&ek(n)&&!QC(n,Ys)&&tk(n),n},i9e=function(){a9e.enable=function(){},RF=!0;var n=IF.f,t=qEe([].splice),r={};r[Ys]=1,n(r).length&&(IF.f=function(i){for(var a=n(i),o=0,s=a.length;o<s;o++)if(a[o]===Ys){t(a,o,1);break}return a},GEe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:JEe.f}))},a9e=EF.exports={enable:i9e,fastKey:t9e,getWeakData:n9e,onFreeze:r9e};YEe[Ys]=!0;var nk=EF.exports,o9e=vi,s9e=ig,l9e=o9e("iterator"),c9e=Array.prototype,u9e=function(n){return n!==void 0&&(s9e.Array===n||c9e[l9e]===n)},d9e=by,LF=Qm,p9e=Au,f9e=ig,h9e=vi,m9e=h9e("iterator"),FF=function(n){if(!p9e(n))return LF(n,m9e)||LF(n,"@@iterator")||f9e[d9e(n)]},g9e=Fa,v9e=cy,y9e=ma,b9e=tC,_9e=FF,w9e=TypeError,x9e=function(n,t){var r=arguments.length<2?_9e(n):t;if(v9e(r))return y9e(g9e(r,n));throw w9e(b9e(n)+" is not iterable")},C9e=Fa,NF=ma,k9e=Qm,S9e=function(n,t,r){var i,a;NF(n);try{if(i=k9e(n,"return"),!i){if(t==="throw")throw r;return r}i=C9e(i,n)}catch(o){a=!0,i=o}if(t==="throw")throw r;if(a)throw i;return NF(i),r},T9e=AL,E9e=Fa,$9e=ma,A9e=tC,O9e=u9e,D9e=qp,BF=Q3,M9e=x9e,P9e=FF,jF=S9e,I9e=TypeError,Ty=function(n,t){this.stopped=n,this.result=t},zF=Ty.prototype,VF=function(n,t,r){var i=r&&r.that,a=!!(r&&r.AS_ENTRIES),o=!!(r&&r.IS_RECORD),s=!!(r&&r.IS_ITERATOR),c=!!(r&&r.INTERRUPTED),l=T9e(t,i),u,d,p,f,h,m,g,y=function(w){return u&&jF(u,"normal",w),new Ty(!0,w)},b=function(w){return a?($9e(w),c?l(w[0],w[1],y):l(w[0],w[1])):c?l(w,y):l(w)};if(o)u=n.iterator;else if(s)u=n;else{if(d=P9e(n),!d)throw I9e(A9e(n)+" is not iterable");if(O9e(d)){for(p=0,f=D9e(n);f>p;p++)if(h=b(n[p]),h&&BF(zF,h))return h;return new Ty(!1)}u=M9e(n,d)}for(m=o?n.next:u.next;!(g=E9e(m,u)).done;){try{h=b(g.value)}catch(w){jF(u,"throw",w)}if(typeof h=="object"&&h&&BF(zF,h))return h}return new Ty(!1)},R9e=Q3,L9e=TypeError,UF=function(n,t){if(R9e(t,n))return n;throw L9e("Incorrect invocation")},F9e=vi,HF=F9e("iterator"),WF=!1;try{var N9e=0,GF={next:function(){return{done:!!N9e++}},return:function(){WF=!0}};GF[HF]=function(){return this},Array.from(GF,function(){throw 2})}catch{}var B9e=function(n,t){if(!t&&!WF)return!1;var r=!1;try{var i={};i[HF]=function(){return{next:function(){return{done:r=!0}}}},n(i)}catch{}return r},j9e=Er,z9e=Ki,qF=oF,V9e=function(n,t,r){var i,a;return qF&&j9e(i=t.constructor)&&i!==r&&z9e(a=i.prototype)&&a!==r.prototype&&qF(n,a),n},U9e=qs,H9e=Ur,W9e=qn,YF=uL,G9e=Mu,q9e=nk,Y9e=VF,K9e=UF,Z9e=Er,J9e=Au,rk=Ki,ik=Vn,X9e=B9e,Q9e=KC,e$e=V9e,t$e=function(n,t,r){var i=n.indexOf("Map")!==-1,a=n.indexOf("Weak")!==-1,o=i?"set":"add",s=H9e[n],c=s&&s.prototype,l=s,u={},d=function(b){var w=W9e(c[b]);G9e(c,b,b=="add"?function(k){return w(this,k===0?0:k),this}:b=="delete"?function(S){return a&&!rk(S)?!1:w(this,S===0?0:S)}:b=="get"?function(k){return a&&!rk(k)?void 0:w(this,k===0?0:k)}:b=="has"?function(k){return a&&!rk(k)?!1:w(this,k===0?0:k)}:function(k,E){return w(this,k===0?0:k,E),this})},p=YF(n,!Z9e(s)||!(a||c.forEach&&!ik(function(){new s().entries().next()})));if(p)l=r.getConstructor(t,n,i,o),q9e.enable();else if(YF(n,!0)){var f=new l,h=f[o](a?{}:-0,1)!=f,m=ik(function(){f.has(1)}),g=X9e(function(b){new s(b)}),y=!a&&ik(function(){for(var b=new s,w=5;w--;)b[o](w,w);return!b.has(-0)});g||(l=t(function(b,w){K9e(b,c);var S=e$e(new s,b,l);return J9e(w)||Y9e(w,S[o],{that:S,AS_ENTRIES:i}),S}),l.prototype=c,c.constructor=l),(m||y)&&(d("delete"),d("has"),i&&d("get")),(y||h)&&d(o),a&&c.clear&&delete c.clear}return u[n]=l,U9e({global:!0,constructor:!0,forced:l!=s},u),Q9e(l,n),a||r.setStrong(l,n,i),l},n$e=qn,KF=TF,Ey=nk.getWeakData,r$e=UF,i$e=ma,a$e=Au,ak=Ki,o$e=VF,ZF=PC,JF=mo,XF=Gp,s$e=XF.set,l$e=XF.getterFor,c$e=ZF.find,u$e=ZF.findIndex,d$e=n$e([].splice),p$e=0,$y=function(n){return n.frozen||(n.frozen=new QF)},QF=function(){this.entries=[]},ok=function(n,t){return c$e(n.entries,function(r){return r[0]===t})};QF.prototype={get:function(n){var t=ok(this,n);if(t)return t[1]},has:function(n){return!!ok(this,n)},set:function(n,t){var r=ok(this,n);r?r[1]=t:this.entries.push([n,t])},delete:function(n){var t=u$e(this.entries,function(r){return r[0]===n});return~t&&d$e(this.entries,t,1),!!~t}};var f$e={getConstructor:function(n,t,r,i){var a=n(function(l,u){r$e(l,o),s$e(l,{type:t,id:p$e++,frozen:void 0}),a$e(u)||o$e(u,l[i],{that:l,AS_ENTRIES:r})}),o=a.prototype,s=l$e(t),c=function(l,u,d){var p=s(l),f=Ey(i$e(u),!0);return f===!0?$y(p).set(u,d):f[p.id]=d,l};return KF(o,{delete:function(l){var u=s(this);if(!ak(l))return!1;var d=Ey(l);return d===!0?$y(u).delete(l):d&&JF(d,u.id)&&delete d[u.id]},has:function(u){var d=s(this);if(!ak(u))return!1;var p=Ey(u);return p===!0?$y(d).has(u):p&&JF(p,d.id)}}),KF(o,r?{get:function(u){var d=s(this);if(ak(u)){var p=Ey(u);return p===!0?$y(d).get(u):p?p[d.id]:void 0}},set:function(u,d){return c(this,u,d)}}:{add:function(u){return c(this,u,!0)}}),a}},eN=Ur,Ay=qn,h$e=TF,m$e=nk,g$e=t$e,tN=f$e,Oy=Ki,Dy=PF,My=Gp.enforce,v$e=eL,y$e=!eN.ActiveXObject&&"ActiveXObject"in eN,sg,nN=function(n){return function(){return n(this,arguments.length?arguments[0]:void 0)}},b$e=g$e("WeakMap",nN,tN);if(v$e&&y$e){sg=tN.getConstructor(nN,"WeakMap",!0),m$e.enable();var lg=b$e.prototype,rN=Ay(lg.delete),Py=Ay(lg.has),iN=Ay(lg.get),aN=Ay(lg.set);h$e(lg,{delete:function(n){if(Oy(n)&&!Dy(n)){var t=My(this);return t.frozen||(t.frozen=new sg),rN(this,n)||t.frozen.delete(n)}return rN(this,n)},has:function(t){if(Oy(t)&&!Dy(t)){var r=My(this);return r.frozen||(r.frozen=new sg),Py(this,t)||r.frozen.has(t)}return Py(this,t)},get:function(t){if(Oy(t)&&!Dy(t)){var r=My(this);return r.frozen||(r.frozen=new sg),Py(this,t)?iN(this,t):r.frozen.get(t)}return iN(this,t)},set:function(t,r){if(Oy(t)&&!Dy(t)){var i=My(this);i.frozen||(i.frozen=new sg),Py(this,t)?aN(this,t,r):i.frozen.set(t,r)}else aN(this,t,r);return this}})}var oN=Ur,sN=SL,_$e=EL,cg=vEe,sk=Hp,lN=vi,lk=lN("iterator"),cN=lN("toStringTag"),ck=cg.values,uN=function(n,t){if(n){if(n[lk]!==ck)try{sk(n,lk,ck)}catch{n[lk]=ck}if(n[cN]||sk(n,cN,t),sN[t]){for(var r in cg)if(n[r]!==cg[r])try{sk(n,r,cg[r])}catch{n[r]=cg[r]}}}};for(var uk in sN)uN(oN[uk]&&oN[uk].prototype,uk);uN(_$e,"DOMTokenList");var dN="Expected a function",pN=0/0,w$e="[object Symbol]",x$e=/^\s+|\s+$/g,C$e=/^[-+]0x[0-9a-f]+$/i,k$e=/^0b[01]+$/i,S$e=/^0o[0-7]+$/i,T$e=parseInt,E$e=typeof Zt=="object"&&Zt&&Zt.Object===Object&&Zt,$$e=typeof self=="object"&&self&&self.Object===Object&&self,A$e=E$e||$$e||Function("return this")(),O$e=Object.prototype,D$e=O$e.toString,M$e=Math.max,P$e=Math.min,dk=function(){return A$e.Date.now()};function I$e(n,t,r){var i,a,o,s,c,l,u=0,d=!1,p=!1,f=!0;if(typeof n!="function")throw new TypeError(dN);t=fN(t)||0,Iy(r)&&(d=!!r.leading,p="maxWait"in r,o=p?M$e(fN(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f);function h(T){var A=i,$=a;return i=a=void 0,u=T,s=n.apply($,A),s}function m(T){return u=T,c=setTimeout(b,t),d?h(T):s}function g(T){var A=T-l,$=T-u,I=t-A;return p?P$e(I,o-$):I}function y(T){var A=T-l,$=T-u;return l===void 0||A>=t||A<0||p&&$>=o}function b(){var T=dk();if(y(T))return w(T);c=setTimeout(b,g(T))}function w(T){return c=void 0,f&&i?h(T):(i=a=void 0,s)}function S(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function k(){return c===void 0?s:w(dk())}function E(){var T=dk(),A=y(T);if(i=arguments,a=this,l=T,A){if(c===void 0)return m(l);if(p)return c=setTimeout(b,t),h(l)}return c===void 0&&(c=setTimeout(b,t)),s}return E.cancel=S,E.flush=k,E}function R$e(n,t,r){var i=!0,a=!0;if(typeof n!="function")throw new TypeError(dN);return Iy(r)&&(i="leading"in r?!!r.leading:i,a="trailing"in r?!!r.trailing:a),I$e(n,t,{leading:i,maxWait:t,trailing:a})}function Iy(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function L$e(n){return!!n&&typeof n=="object"}function F$e(n){return typeof n=="symbol"||L$e(n)&&D$e.call(n)==w$e}function fN(n){if(typeof n=="number")return n;if(F$e(n))return pN;if(Iy(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=Iy(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(x$e,"");var r=k$e.test(n);return r||S$e.test(n)?T$e(n.slice(2),r?2:8):C$e.test(n)?pN:+n}var N$e=R$e;const hN=cn(N$e);var B$e="Expected a function",mN=0/0,j$e="[object Symbol]",z$e=/^\s+|\s+$/g,V$e=/^[-+]0x[0-9a-f]+$/i,U$e=/^0b[01]+$/i,H$e=/^0o[0-7]+$/i,W$e=parseInt,G$e=typeof Zt=="object"&&Zt&&Zt.Object===Object&&Zt,q$e=typeof self=="object"&&self&&self.Object===Object&&self,Y$e=G$e||q$e||Function("return this")(),K$e=Object.prototype,Z$e=K$e.toString,J$e=Math.max,X$e=Math.min,pk=function(){return Y$e.Date.now()};function Q$e(n,t,r){var i,a,o,s,c,l,u=0,d=!1,p=!1,f=!0;if(typeof n!="function")throw new TypeError(B$e);t=gN(t)||0,fk(r)&&(d=!!r.leading,p="maxWait"in r,o=p?J$e(gN(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f);function h(T){var A=i,$=a;return i=a=void 0,u=T,s=n.apply($,A),s}function m(T){return u=T,c=setTimeout(b,t),d?h(T):s}function g(T){var A=T-l,$=T-u,I=t-A;return p?X$e(I,o-$):I}function y(T){var A=T-l,$=T-u;return l===void 0||A>=t||A<0||p&&$>=o}function b(){var T=pk();if(y(T))return w(T);c=setTimeout(b,g(T))}function w(T){return c=void 0,f&&i?h(T):(i=a=void 0,s)}function S(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function k(){return c===void 0?s:w(pk())}function E(){var T=pk(),A=y(T);if(i=arguments,a=this,l=T,A){if(c===void 0)return m(l);if(p)return c=setTimeout(b,t),h(l)}return c===void 0&&(c=setTimeout(b,t)),s}return E.cancel=S,E.flush=k,E}function fk(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function eAe(n){return!!n&&typeof n=="object"}function tAe(n){return typeof n=="symbol"||eAe(n)&&Z$e.call(n)==j$e}function gN(n){if(typeof n=="number")return n;if(tAe(n))return mN;if(fk(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=fk(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(z$e,"");var r=U$e.test(n);return r||H$e.test(n)?W$e(n.slice(2),r?2:8):V$e.test(n)?mN:+n}var nAe=Q$e;const vN=cn(nAe);var rAe="Expected a function",yN="__lodash_hash_undefined__",iAe="[object Function]",aAe="[object GeneratorFunction]",oAe=/[\\^$.*+?()[\]{}|]/g,sAe=/^\[object .+?Constructor\]$/,lAe=typeof Zt=="object"&&Zt&&Zt.Object===Object&&Zt,cAe=typeof self=="object"&&self&&self.Object===Object&&self,bN=lAe||cAe||Function("return this")();function uAe(n,t){return n==null?void 0:n[t]}function dAe(n){var t=!1;if(n!=null&&typeof n.toString!="function")try{t=!!(n+"")}catch{}return t}var pAe=Array.prototype,fAe=Function.prototype,_N=Object.prototype,hk=bN["__core-js_shared__"],wN=function(){var n=/[^.]+$/.exec(hk&&hk.keys&&hk.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),xN=fAe.toString,mk=_N.hasOwnProperty,hAe=_N.toString,mAe=RegExp("^"+xN.call(mk).replace(oAe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gAe=pAe.splice,vAe=CN(bN,"Map"),ug=CN(Object,"create");function Ru(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function yAe(){this.__data__=ug?ug(null):{}}function bAe(n){return this.has(n)&&delete this.__data__[n]}function _Ae(n){var t=this.__data__;if(ug){var r=t[n];return r===yN?void 0:r}return mk.call(t,n)?t[n]:void 0}function wAe(n){var t=this.__data__;return ug?t[n]!==void 0:mk.call(t,n)}function xAe(n,t){var r=this.__data__;return r[n]=ug&&t===void 0?yN:t,this}Ru.prototype.clear=yAe,Ru.prototype.delete=bAe,Ru.prototype.get=_Ae,Ru.prototype.has=wAe,Ru.prototype.set=xAe;function Kp(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function CAe(){this.__data__=[]}function kAe(n){var t=this.__data__,r=Ry(t,n);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():gAe.call(t,r,1),!0}function SAe(n){var t=this.__data__,r=Ry(t,n);return r<0?void 0:t[r][1]}function TAe(n){return Ry(this.__data__,n)>-1}function EAe(n,t){var r=this.__data__,i=Ry(r,n);return i<0?r.push([n,t]):r[i][1]=t,this}Kp.prototype.clear=CAe,Kp.prototype.delete=kAe,Kp.prototype.get=SAe,Kp.prototype.has=TAe,Kp.prototype.set=EAe;function Lu(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function $Ae(){this.__data__={hash:new Ru,map:new(vAe||Kp),string:new Ru}}function AAe(n){return Ly(this,n).delete(n)}function OAe(n){return Ly(this,n).get(n)}function DAe(n){return Ly(this,n).has(n)}function MAe(n,t){return Ly(this,n).set(n,t),this}Lu.prototype.clear=$Ae,Lu.prototype.delete=AAe,Lu.prototype.get=OAe,Lu.prototype.has=DAe,Lu.prototype.set=MAe;function Ry(n,t){for(var r=n.length;r--;)if(FAe(n[r][0],t))return r;return-1}function PAe(n){if(!kN(n)||RAe(n))return!1;var t=NAe(n)||dAe(n)?mAe:sAe;return t.test(LAe(n))}function Ly(n,t){var r=n.__data__;return IAe(t)?r[typeof t=="string"?"string":"hash"]:r.map}function CN(n,t){var r=uAe(n,t);return PAe(r)?r:void 0}function IAe(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function RAe(n){return!!wN&&wN in n}function LAe(n){if(n!=null){try{return xN.call(n)}catch{}try{return n+""}catch{}}return""}function gk(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new TypeError(rAe);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],o=r.cache;if(o.has(a))return o.get(a);var s=n.apply(this,i);return r.cache=o.set(a,s),s};return r.cache=new(gk.Cache||Lu),r}gk.Cache=Lu;function FAe(n,t){return n===t||n!==n&&t!==t}function NAe(n){var t=kN(n)?hAe.call(n):"";return t==iAe||t==aAe}function kN(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}var BAe=gk;const jAe=cn(BAe);var Fu=[],zAe=function(){return Fu.some(function(n){return n.activeTargets.length>0})},VAe=function(){return Fu.some(function(n){return n.skippedTargets.length>0})},SN="ResizeObserver loop completed with undelivered notifications.",UAe=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:SN}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=SN),window.dispatchEvent(n)},dg;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(dg||(dg={}));var Nu=function(n){return Object.freeze(n)},HAe=function(){function n(t,r){this.inlineSize=t,this.blockSize=r,Nu(this)}return n}(),TN=function(){function n(t,r,i,a){return this.x=t,this.y=r,this.width=i,this.height=a,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Nu(this)}return n.prototype.toJSON=function(){var t=this,r=t.x,i=t.y,a=t.top,o=t.right,s=t.bottom,c=t.left,l=t.width,u=t.height;return{x:r,y:i,top:a,right:o,bottom:s,left:c,width:l,height:u}},n.fromRect=function(t){return new n(t.x,t.y,t.width,t.height)},n}(),vk=function(n){return n instanceof SVGElement&&"getBBox"in n},EN=function(n){if(vk(n)){var t=n.getBBox(),r=t.width,i=t.height;return!r&&!i}var a=n,o=a.offsetWidth,s=a.offsetHeight;return!(o||s||n.getClientRects().length)},$N=function(n){var t;if(n instanceof Element)return!0;var r=(t=n==null?void 0:n.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&n instanceof r.Element)},WAe=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},pg=typeof window<"u"?window:{},Fy=new WeakMap,AN=/auto|scroll/,GAe=/^tb|vertical/,qAe=/msie|trident/i.test(pg.navigator&&pg.navigator.userAgent),ns=function(n){return parseFloat(n||"0")},Zp=function(n,t,r){return n===void 0&&(n=0),t===void 0&&(t=0),r===void 0&&(r=!1),new HAe((r?t:n)||0,(r?n:t)||0)},ON=Nu({devicePixelContentBoxSize:Zp(),borderBoxSize:Zp(),contentBoxSize:Zp(),contentRect:new TN(0,0,0,0)}),DN=function(n,t){if(t===void 0&&(t=!1),Fy.has(n)&&!t)return Fy.get(n);if(EN(n))return Fy.set(n,ON),ON;var r=getComputedStyle(n),i=vk(n)&&n.ownerSVGElement&&n.getBBox(),a=!qAe&&r.boxSizing==="border-box",o=GAe.test(r.writingMode||""),s=!i&&AN.test(r.overflowY||""),c=!i&&AN.test(r.overflowX||""),l=i?0:ns(r.paddingTop),u=i?0:ns(r.paddingRight),d=i?0:ns(r.paddingBottom),p=i?0:ns(r.paddingLeft),f=i?0:ns(r.borderTopWidth),h=i?0:ns(r.borderRightWidth),m=i?0:ns(r.borderBottomWidth),g=i?0:ns(r.borderLeftWidth),y=p+u,b=l+d,w=g+h,S=f+m,k=c?n.offsetHeight-S-n.clientHeight:0,E=s?n.offsetWidth-w-n.clientWidth:0,T=a?y+w:0,A=a?b+S:0,$=i?i.width:ns(r.width)-T-E,I=i?i.height:ns(r.height)-A-k,R=$+y+E+w,Y=I+b+k+S,L=Nu({devicePixelContentBoxSize:Zp(Math.round($*devicePixelRatio),Math.round(I*devicePixelRatio),o),borderBoxSize:Zp(R,Y,o),contentBoxSize:Zp($,I,o),contentRect:new TN(p,l,$,I)});return Fy.set(n,L),L},MN=function(n,t,r){var i=DN(n,r),a=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(t){case dg.DEVICE_PIXEL_CONTENT_BOX:return s;case dg.BORDER_BOX:return a;default:return o}},YAe=function(){function n(t){var r=DN(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Nu([r.borderBoxSize]),this.contentBoxSize=Nu([r.contentBoxSize]),this.devicePixelContentBoxSize=Nu([r.devicePixelContentBoxSize])}return n}(),PN=function(n){if(EN(n))return 1/0;for(var t=0,r=n.parentNode;r;)t+=1,r=r.parentNode;return t},KAe=function(){var n=1/0,t=[];Fu.forEach(function(s){if(s.activeTargets.length!==0){var c=[];s.activeTargets.forEach(function(u){var d=new YAe(u.target),p=PN(u.target);c.push(d),u.lastReportedSize=MN(u.target,u.observedBox),p<n&&(n=p)}),t.push(function(){s.callback.call(s.observer,c,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var r=0,i=t;r<i.length;r++){var a=i[r];a()}return n},IN=function(n){Fu.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(a){a.isActive()&&(PN(a.target)>n?r.activeTargets.push(a):r.skippedTargets.push(a))})})},ZAe=function(){var n=0;for(IN(n);zAe();)n=KAe(),IN(n);return VAe()&&UAe(),n>0},yk,RN=[],JAe=function(){return RN.splice(0).forEach(function(n){return n()})},XAe=function(n){if(!yk){var t=0,r=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return JAe()}).observe(r,i),yk=function(){r.textContent="".concat(t?t--:t++)}}RN.push(n),yk()},QAe=function(n){XAe(function(){requestAnimationFrame(n)})},Ny=0,eOe=function(){return!!Ny},tOe=250,nOe={attributes:!0,characterData:!0,childList:!0,subtree:!0},LN=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],FN=function(n){return n===void 0&&(n=0),Date.now()+n},bk=!1,rOe=function(){function n(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return n.prototype.run=function(t){var r=this;if(t===void 0&&(t=tOe),!bk){bk=!0;var i=FN(t);QAe(function(){var a=!1;try{a=ZAe()}finally{if(bk=!1,t=i-FN(),!eOe())return;a?r.run(1e3):t>0?r.run(t):r.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,nOe)};document.body?r():pg.addEventListener("DOMContentLoaded",r)},n.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),LN.forEach(function(r){return pg.addEventListener(r,t.listener,!0)}))},n.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),LN.forEach(function(r){return pg.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},n}(),_k=new rOe,NN=function(n){!Ny&&n>0&&_k.start(),Ny+=n,!Ny&&_k.stop()},iOe=function(n){return!vk(n)&&!WAe(n)&&getComputedStyle(n).display==="inline"},aOe=function(){function n(t,r){this.target=t,this.observedBox=r||dg.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var t=MN(this.target,this.observedBox,!0);return iOe(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},n}(),oOe=function(){function n(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return n}(),By=new WeakMap,BN=function(n,t){for(var r=0;r<n.length;r+=1)if(n[r].target===t)return r;return-1},jy=function(){function n(){}return n.connect=function(t,r){var i=new oOe(t,r);By.set(t,i)},n.observe=function(t,r,i){var a=By.get(t),o=a.observationTargets.length===0;BN(a.observationTargets,r)<0&&(o&&Fu.push(a),a.observationTargets.push(new aOe(r,i&&i.box)),NN(1),_k.schedule())},n.unobserve=function(t,r){var i=By.get(t),a=BN(i.observationTargets,r),o=i.observationTargets.length===1;a>=0&&(o&&Fu.splice(Fu.indexOf(i),1),i.observationTargets.splice(a,1),NN(-1))},n.disconnect=function(t){var r=this,i=By.get(t);i.observationTargets.slice().forEach(function(a){return r.unobserve(t,a.target)}),i.activeTargets.splice(0,i.activeTargets.length)},n}(),sOe=function(){function n(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");jy.connect(this,t)}return n.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!$N(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");jy.observe(this,t,r)},n.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!$N(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");jy.unobserve(this,t)},n.prototype.disconnect=function(){jy.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}(),lOe=cy,cOe=Ou,uOe=oy,dOe=qp,pOe=TypeError,jN=function(n){return function(t,r,i,a){lOe(r);var o=cOe(t),s=uOe(o),c=dOe(o),l=n?c-1:0,u=n?-1:1;if(i<2)for(;;){if(l in s){a=s[l],l+=u;break}if(l+=u,n?l<0:c<=l)throw pOe("Reduce of empty array with no initial value")}for(;n?l>=0:c>l;l+=u)l in s&&(a=r(a,s[l],l,o));return a}},fOe={left:jN(!1),right:jN(!0)},hOe=Ql,mOe=Ur,gOe=hOe(mOe.process)=="process",vOe=qs,yOe=fOe.left,bOe=DL,zN=ly,_Oe=gOe,wOe=bOe("reduce"),xOe=!_Oe&&zN>79&&zN<83;vOe({target:"Array",proto:!0,forced:!wOe||xOe},{reduce:function(t){var r=arguments.length;return yOe(this,t,r,r>1?arguments[1]:void 0)}});var COe=ma,kOe=function(){var n=COe(this),t="";return n.hasIndices&&(t+="d"),n.global&&(t+="g"),n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.dotAll&&(t+="s"),n.unicode&&(t+="u"),n.unicodeSets&&(t+="v"),n.sticky&&(t+="y"),t},wk=Vn,SOe=Ur,xk=SOe.RegExp,Ck=wk(function(){var n=xk("a","y");return n.lastIndex=2,n.exec("abcd")!=null}),TOe=Ck||wk(function(){return!xk("a","y").sticky}),EOe=Ck||wk(function(){var n=xk("^r","gy");return n.lastIndex=2,n.exec("str")!=null}),$Oe={BROKEN_CARET:EOe,MISSED_STICKY:TOe,UNSUPPORTED_Y:Ck},AOe=Vn,OOe=Ur,DOe=OOe.RegExp,MOe=AOe(function(){var n=DOe(".","s");return!(n.dotAll&&n.exec(`
|
|
454
454
|
`)&&n.flags==="s")}),POe=Vn,IOe=Ur,ROe=IOe.RegExp,LOe=POe(function(){var n=ROe("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),Jp=Fa,zy=qn,FOe=Pu,NOe=kOe,BOe=$Oe,jOe=sC,zOe=VC,VOe=Gp.get,UOe=MOe,HOe=LOe,WOe=jOe("native-string-replace",String.prototype.replace),Vy=RegExp.prototype.exec,kk=Vy,GOe=zy("".charAt),qOe=zy("".indexOf),YOe=zy("".replace),Sk=zy("".slice),Tk=function(){var n=/a/,t=/b*/g;return Jp(Vy,n,"a"),Jp(Vy,t,"a"),n.lastIndex!==0||t.lastIndex!==0}(),VN=BOe.BROKEN_CARET,Ek=/()??/.exec("")[1]!==void 0,KOe=Tk||Ek||VN||UOe||HOe;KOe&&(kk=function(t){var r=this,i=VOe(r),a=FOe(t),o=i.raw,s,c,l,u,d,p,f;if(o)return o.lastIndex=r.lastIndex,s=Jp(kk,o,a),r.lastIndex=o.lastIndex,s;var h=i.groups,m=VN&&r.sticky,g=Jp(NOe,r),y=r.source,b=0,w=a;if(m&&(g=YOe(g,"y",""),qOe(g,"g")===-1&&(g+="g"),w=Sk(a,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&GOe(a,r.lastIndex-1)!==`
|
|
@@ -2958,7 +2958,7 @@ img.ProseMirror-separator {
|
|
|
2958
2958
|
() => {
|
|
2959
2959
|
if (btn.popup) popupOpen = false
|
|
2960
2960
|
}
|
|
2961
|
-
`}],key:a,staticClass:"menu-button",class:{"is-active":i.active&&i.active()},attrs:{"data-texteditor-tooltip":i.tooltip},on:{mousedown:o=>{i.popup?i.onClick():o.preventDefault()},click:i.onClick}},[r("BaseIcon",{attrs:{type:i.icon||"info",size:"22"}}),i.popup&&t.popupOpen?r("div",{staticStyle:{position:"absolute",left:"50%",bottom:"calc(100% + 1em)","background-color":"white",padding:"10px 10px calc(2 * var(--rem)) 10px",transform:"translate(-50%, 0%)",color:"hsl(0, 0%, 35%)",width:"250px","box-shadow":"0 8px 14px rgba(0, 0, 0, 0.2)",border:"1px solid hsl(0, 0%, 88%)","border-radius":"8px",cursor:"default"}},t._l(i.popup(),function(o,s){return r("FormInputRow",{key:s,attrs:{label:o.label,inputs:o.inputs}})}),1):t._e()],1)]}),t.extensions.snippets&&!t.editor.isActive("table")?r("TextTemplates",{attrs:{placement:"top"},on:{open:function(i){t.popupOpen=!0},select:t.setTextToEditor,close:function(i){t.popupOpen=!1}},nativeOn:{mousedown:function(i){i.preventDefault()}}},[r("div",{staticClass:"menu-button",attrs:{"data-texteditor-tooltip":t.$t("_common:insert",{thing:t.$t("_common:snippet")})}},[r("BaseIcon",{attrs:{type:"editorSnippets",size:"22"}})],1)]):t._e(),r("input",{ref:"inputImgUpload",staticStyle:{display:"none"},attrs:{type:"file"},on:{change:i=>{t.$emit("upload-image",{file:i}),t.popupOpen=!1}}})],2):t._e()])],1)},ybt=[],bbt=he(gbt,vbt,ybt,!1,null,"7c55b91c",null,null);const _bt=bbt.exports;function wbt(n){var t;const{char:r,allowSpaces:i,allowedPrefixes:a,startOfLine:o,$position:s}=n,c=gyt(r),l=new RegExp(`\\s${c}$`),u=o?"^":"",d=i?new RegExp(`${u}${c}.*?(?=\\s${c}|$)`,"gm"):new RegExp(`${u}(?:^)?${c}[^\\s${c}]*`,"gm"),p=((t=s.nodeBefore)===null||t===void 0?void 0:t.isText)&&s.nodeBefore.text;if(!p)return null;const f=s.pos-p.length,h=Array.from(p.matchAll(d)).pop();if(!h||h.input===void 0||h.index===void 0)return null;const m=h.input.slice(Math.max(0,h.index-1),h.index),g=new RegExp(`^[${a==null?void 0:a.join("")}\0]?$`).test(m);if(a!==null&&!g)return null;const y=f+h.index;let b=y+h[0].length;return i&&l.test(p.slice(b-1,b+1))&&(h[0]+=" ",b+=1),y<s.pos&&b>=s.pos?{range:{from:y,to:b},query:h[0].slice(r.length),text:h[0]}:null}const xbt=new Mr("suggestion");function FJ({pluginKey:n=xbt,editor:t,char:r="@",allowSpaces:i=!1,allowedPrefixes:a=null,startOfLine:o=!1,decorationTag:s="span",decorationClass:c="suggestion",command:l=()=>null,items:u=()=>[],render:d=()=>({}),allow:p=()=>!0}){let f;const h=d==null?void 0:d(),m=new ir({key:n,view(){return{update:async(g,y)=>{var b,w,S,k,E,T,A;const $=(b=this.key)===null||b===void 0?void 0:b.getState(y),I=(w=this.key)===null||w===void 0?void 0:w.getState(g.state),R=$.active&&I.active&&$.range.from!==I.range.from,Y=!$.active&&I.active,L=$.active&&!I.active,D=!Y&&!L&&$.query!==I.query,B=Y||R,z=D&&!R,K=L||R;if(!B&&!z&&!K)return;const te=K&&!B?$:I,j=g.dom.querySelector(`[data-decoration-id="${te.decorationId}"]`);f={editor:t,range:te.range,query:te.query,text:te.text,items:[],command:M=>{l({editor:t,range:te.range,props:M})},decorationNode:j,clientRect:j?()=>{var M;const{decorationId:q}=(M=this.key)===null||M===void 0?void 0:M.getState(t.state),G=g.dom.querySelector(`[data-decoration-id="${q}"]`);return(G==null?void 0:G.getBoundingClientRect())||null}:null},B&&((S=h==null?void 0:h.onBeforeStart)===null||S===void 0||S.call(h,f)),z&&((k=h==null?void 0:h.onBeforeUpdate)===null||k===void 0||k.call(h,f)),(z||B)&&(f.items=await u({editor:t,query:te.query})),K&&((E=h==null?void 0:h.onExit)===null||E===void 0||E.call(h,f)),z&&((T=h==null?void 0:h.onUpdate)===null||T===void 0||T.call(h,f)),B&&((A=h==null?void 0:h.onStart)===null||A===void 0||A.call(h,f))},destroy:()=>{var g;f&&((g=h==null?void 0:h.onExit)===null||g===void 0||g.call(h,f))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(g,y,b,w){const{isEditable:S}=t,{composing:k}=t.view,{selection:E}=g,{empty:T,from:A}=E,$={...y};if($.composing=k,S&&(T||t.view.composing)){(A<y.range.from||A>y.range.to)&&!k&&!y.composing&&($.active=!1);const I=wbt({char:r,allowSpaces:i,allowedPrefixes:a,startOfLine:o,$position:E.$from}),R=`id_${Math.floor(Math.random()*4294967295)}`;I&&p({editor:t,state:w,range:I.range})?($.active=!0,$.decorationId=y.decorationId?y.decorationId:R,$.range=I.range,$.query=I.query,$.text=I.text):$.active=!1}else $.active=!1;return $.active||($.decorationId=null,$.range={from:0,to:0},$.query=null,$.text=null),$}},props:{handleKeyDown(g,y){var b;const{active:w,range:S}=m.getState(g.state);return w&&((b=h==null?void 0:h.onKeyDown)===null||b===void 0?void 0:b.call(h,{view:g,event:y,range:S}))||!1},decorations(g){const{active:y,range:b,decorationId:w}=m.getState(g);return y?wr.create(g.doc,[Ei.inline(b.from,b.to,{nodeName:s,class:c,"data-decoration-id":w})]):null}}});return m}const Cbt=new Mr("mention"),kbt=ui.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:n,node:t}){var r;return`${n.suggestion.char}${(r=t.attrs.label)!==null&&r!==void 0?r:t.attrs.id}`},suggestion:{char:"@",pluginKey:Cbt,command:({editor:n,range:t,props:r})=>{var i,a;const o=n.view.state.selection.$to.nodeAfter;((i=o==null?void 0:o.text)===null||i===void 0?void 0:i.startsWith(" "))&&(t.to+=1),n.chain().focus().insertContentAt(t,[{type:this.name,attrs:r},{type:"text",text:" "}]).run(),(a=window.getSelection())===null||a===void 0||a.collapseToEnd()},allow:({state:n,range:t})=>{const r=n.doc.resolve(t.from),i=n.schema.nodes[this.name];return!!r.parent.type.contentMatch.matchType(i)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:n=>n.getAttribute("data-id"),renderHTML:n=>n.id?{"data-id":n.id}:{}},label:{default:null,parseHTML:n=>n.getAttribute("data-label"),renderHTML:n=>n.label?{"data-label":n.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:n,HTMLAttributes:t}){return["span",Wn({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:n})]},renderText({node:n}){return this.options.renderLabel({options:this.options,node:n})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:n,state:t})=>{let r=!1;const{selection:i}=t,{empty:a,anchor:o}=i;return a?(t.doc.nodesBetween(o-1,o,(s,c)=>{if(s.type.name===this.name)return r=!0,n.insertText(this.options.suggestion.char||"",c,c+s.nodeSize),!1}),r):!1})}},addProseMirrorPlugins(){return[FJ({editor:this.editor,...this.options.suggestion})]}}),RDt="",Sbt={name:"TextEditorMentionList",i18nOptions:{namespaces:"TextEditorMentionList",messages:{en:{referenceTooltipTitle:"Reference info from..."},sv:{referenceTooltipTitle:"Referera till info från..."}}},props:{items:{type:Array,required:!0},command:{type:Function,required:!0}},data(){return{navigatedIndex:0}},watch:{items(){this.navigatedIndex=0}},methods:{onKeyDown({event:n}){return n.key==="ArrowUp"?(this.upHandler(),!0):n.key==="ArrowDown"?(this.downHandler(),!0):n.key==="Enter"?(this.enterHandler(),!0):!1},upHandler(){this.navigatedIndex=(this.navigatedIndex+this.items.length-1)%this.items.length,this.scrollToHighlightedMention()},downHandler(){this.navigatedIndex=(this.navigatedIndex+1)%this.items.length,this.scrollToHighlightedMention()},scrollToHighlightedMention(){!this.$refs.mention||!this.$refs.mention[this.navigatedIndex]||this.$refs.mention[this.navigatedIndex].scrollIntoView({block:"nearest"})},enterHandler(){const n=this.items[this.navigatedIndex];n&&this.selectItem(n)},selectItem(n){this.command(n)}}};var Tbt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"suggestion-list"},[t.items.length?[r("div",{staticClass:"suggestion-list__title"},[t._v(" "+t._s(t.$t("referenceTooltipTitle"))+" ")]),r("div",{staticStyle:{flex:"1 1 auto",overflow:"auto"}},t._l(t.items,function(i,a){return r("div",{key:i.id+a,ref:"mention",refInFor:!0,staticClass:"suggestion-list__item",class:{"is-selected":t.navigatedIndex===a},on:{mousedown:function(o){o.preventDefault()},click:function(o){return t.selectItem(i)}}},[t._v(" "+t._s(i.label)+" ")])}),0)]:r("div",{staticClass:"suggestion-list__item is-empty"},[t._v(" "+t._s(t.$t("_common:noResults"))+" ")])],2)},Ebt=[],$bt=he(Sbt,Tbt,Ebt,!1,null,"10928a97",null,null);const Abt=$bt.exports,NJ="mention",BJ=(n,t)=>(t||[]).filter(({label:r=""})=>r.toLowerCase().includes(n.toLowerCase()));function Obt(n=null){let t=[];const r=typeof n=="function"?n:()=>[];return{render:()=>{let i,a;return{onStart:o=>{t=r(),o.items=BJ(o.query,t);const{el:s,isShadow:c}=F4(this.$el),l=c?s:s.body;i=new _J(Abt,{parent:this,propsData:o}),a=Dc("body",{getReferenceClientRect:o.clientRect,appendTo:l,content:i.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",plugins:[Nct]})},onUpdate(o){o.items=BJ(o.query,t),i.updateProps(o),a[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown(o){return o.event.key==="Escape"?(a[0].hide(),!0):i.ref.onKeyDown(o)},onExit(){a[0].destroy(),i.destroy()}}}}}function Dbt(n=null){return kbt.extend({addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-mention-id"),renderHTML:t=>({"data-mention-id":t.id})},label:{default:null,parseHTML:t=>t.innerText.split(this.options.suggestion.char).join("")},tooltip:{default:null,parseHTML:t=>t.getAttribute("data-tooltip"),renderHTML:t=>({"data-tooltip":t.tooltip})}}},parseHTML(){return[{tag:"span[data-mention-id]"}]},renderHTML({HTMLAttributes:t}){return["span",{class:[NJ,...t["data-tooltip"]?[]:["empty"]].join(" "),...t,"data-tooltip":t["data-tooltip"]||Be.t("_common:missing",{thing:Be.t("_common:value")})},`${t.label}`]},addProseMirrorPlugins(){const t=typeof n=="function"?n:()=>[];let r=t();return[FJ({editor:this.editor,...this.options.suggestion}),new ir({key:new Mr("mention-paste-handler"),props:{handlePaste(i,a){if(i.props.editable&&!i.props.editable(i.state))return!1;const o=a.clipboardData||a.originalEvent.clipboardData;if(!o)return!1;const s=o.getData("text/plain");if(typeof s!="string"||!s.startsWith("{{")||!s.endsWith("}}"))return!1;const c=s.substring(2,s.length-2);r=t();const l=r.find(h=>h.id===c);if(!l)return!1;const{state:u,dispatch:d}=i,p=u.schema.nodes.mention.create(l),f=u.tr.replaceSelectionWith(p);return d(f),!0}}})]}}).configure({HTMLAttributes:{class:NJ},suggestion:Obt.call(this,n)})}const Mbt=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Pbt=ui.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",Wn(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:t})=>t.insertContent({type:this.name,attrs:n})}},addInputRules(){return[yJ({find:Mbt,type:this.type,getAttributes:n=>{const[,,t,r,i]=n;return{src:r,alt:t,title:i}}})]}}),LDt="",Ibt={name:"TextEditorImageView",components:{NodeViewWrapper:wyt},props:xyt,data(){return{displayOptions:[{value:"left",icon:'<rect x="1" y="5" width="11" height="15" rx="0" ry="2"></rect><line x1="16" y1="7" x2="22" y2="7"></line><line x1="16" y1="12" x2="22" y2="12"></line><line x1="16" y1="17" x2="22" y2="17"></line>',tooltip:this.$t("_common:align",{thing:this.$t("_common:left")})},{value:"block",icon:'<rect x="2" y="7" width="19" height="11" rx="0" ry="2"></rect><line x1="2" y1="3" y2="3" x2="21"></line><line x1="2" y1="22" x2="21" y2="22"></line>',tooltip:this.$t("_common:center",{thing:this.$t("_common:image")}).capitalize()},{value:"right",icon:'<rect x="11" y="5" width="11" height="15" rx="0" ry="2"></rect><line x1="0" y1="7" y2="7" x2="6"></line><line x1="0" y1="12" x2="6" y2="12"></line><line x1="0" y1="17" x2="6" y2="17"></line>',tooltip:this.$t("_common:align",{thing:this.$t("_common:right")})}]}},computed:{isSelected(){return this.selected&&this.editor.isEditable},src(){return Ce(this,"node.attrs.src","")},display(){return Ce(this,"node.attrs.display","block")}},methods:{selectImage(){this.editor.isEditable?this.editor.chain().focus().setNodeSelection(this.getPos()).run():this.openPreview()},remove(){this.deleteNode(this.getPos())},changeDisplay(n){this.updateAttributes({display:n}),this.selectImage()},async openPreview(){var i;const n=()=>Promise.resolve().then(()=>Bmt),{src:t,title:r}=((i=this.node)==null?void 0:i.attrs)||{};this.$modal.show(n,{index:0,list:[{url:t,name:r}]},{adaptive:!0,height:"100%",width:"100%",classes:"",transition:""})}}};var Rbt=function(){var t=this,r=t._self._c;return r("NodeViewWrapper",{staticClass:"texteditor-image-view",class:[{"texteditor-image-view-inline":t.display&&t.display!=="block","outline outline-2 outline-primary-300":t.isSelected},`texteditor-image-view-${t.display}`],attrs:{as:"span",draggable:"true","data-drag-handle":""}},[r("img",{class:{selected:t.isSelected},attrs:{src:t.src},on:{click:t.selectImage}}),t.isSelected?r("div",{staticClass:"bg-gray-800 rounded-md image-menu top-2"},[t._l(t.displayOptions,function(i,a){return r("CButton",{key:a,class:{"!text-primary-300":t.display===i.value},attrs:{"data-texteditor-tooltip":i.tooltip,type:"none",size:"small"},on:{click:function(o){return t.changeDisplay(i.value)}}},[r("svg",{attrs:{viewBox:"0 0 24 24",width:"21",height:"21",stroke:"currentColor","stroke-width":"2",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},domProps:{innerHTML:t._s(i.icon)}})])}),r("div",{staticClass:"bg-gray-500",staticStyle:{width:"1px",height:"1.5em",margin:"0 2px"}}),r("CButton",{attrs:{"data-texteditor-tooltip":t.$t("_common:remove"),type:"none",size:"small"},on:{click:t.remove}},[r("BaseIcon",{attrs:{size:18,type:"trash"}})],1)],2):t._e()])},Lbt=[],Fbt=he(Ibt,Rbt,Lbt,!1,null,"50515611",null,null);const Nbt=Fbt.exports,Bbt=n=>Pbt.extend({addOptions(){return{inline:!0,HTMLAttributes:{}}},addAttributes(){return{...this.parent?this.parent():null,display:{default:"block",parseHTML:t=>t.getAttribute("data-display"),renderHTML:t=>({"data-display":t.display})}}},addNodeView(){return kyt(Nbt)},addProseMirrorPlugins(){return[new ir({key:new Mr("image-handler"),props:{handlePaste(t,r){const{items:i}=r.clipboardData||r.originalEvent.clipboardData;for(const a of i)if(a.type.indexOf("image")===0){r.preventDefault();const{schema:o}=t.state,s=a.getAsFile();if(n)n(s).then(c=>{const l=o.nodes.image.create({src:c}),u=t.state.tr.replaceSelectionWith(l);t.dispatch(u)});else{const c=new FileReader;c.onload=l=>{const u=o.nodes.image.create({src:l.target.result}),d=t.state.tr.replaceSelectionWith(u);t.dispatch(d)},c.readAsDataURL(s)}}return!1},handleDOMEvents:{drop(t,r){if(!(r.dataTransfer&&r.dataTransfer.files&&r.dataTransfer.files.length))return;const a=Array.from(r.dataTransfer.files).filter(c=>/image/i.test(c.type));if(a.length===0)return;r.preventDefault();const{schema:o}=t.state,s=t.posAtCoords({left:r.clientX,top:r.clientY});a.forEach(async c=>{const l=new FileReader;if(n){const u=o.nodes.image.create({src:await n(c)}),d=t.state.tr.insert(s.pos,u);t.dispatch(d)}else l.onload=u=>{const d=o.nodes.image.create({src:u.target.result}),p=t.state.tr.insert(s.pos,d);t.dispatch(p)},l.readAsDataURL(c)})}}}})]}});let kE,SE;if(typeof WeakMap<"u"){let n=new WeakMap;kE=t=>n.get(t),SE=(t,r)=>(n.set(t,r),r)}else{let n=[],t=10,r=0;kE=i=>{for(let a=0;a<n.length;a+=2)if(n[a]==i)return n[a+1]},SE=(i,a)=>(r==t&&(r=0),n[r++]=i,n[r++]=a)}class yh{constructor(t,r,i,a){this.left=t,this.top=r,this.right=i,this.bottom=a}}class gr{constructor(t,r,i,a){this.width=t,this.height=r,this.map=i,this.problems=a}findCell(t){for(let r=0;r<this.map.length;r++){let i=this.map[r];if(i!=t)continue;let a=r%this.width,o=r/this.width|0,s=a+1,c=o+1;for(let l=1;s<this.width&&this.map[r+l]==i;l++)s++;for(let l=1;c<this.height&&this.map[r+this.width*l]==i;l++)c++;return new yh(a,o,s,c)}throw new RangeError("No cell with offset "+t+" found")}colCount(t){for(let r=0;r<this.map.length;r++)if(this.map[r]==t)return r%this.width;throw new RangeError("No cell with offset "+t+" found")}nextCell(t,r,i){let{left:a,right:o,top:s,bottom:c}=this.findCell(t);return r=="horiz"?(i<0?a==0:o==this.width)?null:this.map[s*this.width+(i<0?a-1:o)]:(i<0?s==0:c==this.height)?null:this.map[a+this.width*(i<0?s-1:c)]}rectBetween(t,r){let{left:i,right:a,top:o,bottom:s}=this.findCell(t),{left:c,right:l,top:u,bottom:d}=this.findCell(r);return new yh(Math.min(i,c),Math.min(o,u),Math.max(a,l),Math.max(s,d))}cellsInRect(t){let r=[],i={};for(let a=t.top;a<t.bottom;a++)for(let o=t.left;o<t.right;o++){let s=a*this.width+o,c=this.map[s];i[c]||(i[c]=!0,(o!=t.left||!o||this.map[s-1]!=c)&&(a!=t.top||!a||this.map[s-this.width]!=c)&&r.push(c))}return r}positionAt(t,r,i){for(let a=0,o=0;;a++){let s=o+i.child(a).nodeSize;if(a==t){let c=r+t*this.width,l=(t+1)*this.width;for(;c<l&&this.map[c]<o;)c++;return c==l?s-1:this.map[c]}o=s}}static get(t){return kE(t)||SE(t,jbt(t))}}function jbt(n){if(n.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+n.type.name);let t=zbt(n),r=n.childCount,i=[],a=0,o=null,s=[];for(let u=0,d=t*r;u<d;u++)i[u]=0;for(let u=0,d=0;u<r;u++){let p=n.child(u);d++;for(let m=0;;m++){for(;a<i.length&&i[a]!=0;)a++;if(m==p.childCount)break;let g=p.child(m),{colspan:y,rowspan:b,colwidth:w}=g.attrs;for(let S=0;S<b;S++){if(S+u>=r){(o||(o=[])).push({type:"overlong_rowspan",pos:d,n:b-S});break}let k=a+S*t;for(let E=0;E<y;E++){i[k+E]==0?i[k+E]=d:(o||(o=[])).push({type:"collision",row:u,pos:d,n:y-E});let T=w&&w[E];if(T){let A=(k+E)%t*2,$=s[A];$==null||$!=T&&s[A+1]==1?(s[A]=T,s[A+1]=1):$==T&&s[A+1]++}}}a+=y,d+=g.nodeSize}let f=(u+1)*t,h=0;for(;a<f;)i[a++]==0&&h++;h&&(o||(o=[])).push({type:"missing",row:u,n:h}),d++}let c=new gr(t,r,i,o),l=!1;for(let u=0;!l&&u<s.length;u+=2)s[u]!=null&&s[u+1]<r&&(l=!0);return l&&Vbt(c,s,n),c}function zbt(n){let t=-1,r=!1;for(let i=0;i<n.childCount;i++){let a=n.child(i),o=0;if(r)for(let s=0;s<i;s++){let c=n.child(s);for(let l=0;l<c.childCount;l++){let u=c.child(l);s+u.attrs.rowspan>i&&(o+=u.attrs.colspan)}}for(let s=0;s<a.childCount;s++){let c=a.child(s);o+=c.attrs.colspan,c.attrs.rowspan>1&&(r=!0)}t==-1?t=o:t!=o&&(t=Math.max(t,o))}return t}function Vbt(n,t,r){n.problems||(n.problems=[]);for(let i=0,a={};i<n.map.length;i++){let o=n.map[i];if(a[o])continue;a[o]=!0;let s=r.nodeAt(o),c=null;for(let l=0;l<s.attrs.colspan;l++){let u=(i+l)%n.width,d=t[u*2];d!=null&&(!s.attrs.colwidth||s.attrs.colwidth[l]!=d)&&((c||(c=Ubt(s.attrs)))[l]=d)}c&&n.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:c})}}function Ubt(n){if(n.colwidth)return n.colwidth.slice();let t=[];for(let r=0;r<n.colspan;r++)t.push(0);return t}function Oi(n){let t=n.cached.tableNodeTypes;if(!t){t=n.cached.tableNodeTypes={};for(let r in n.nodes){let i=n.nodes[r],a=i.spec.tableRole;a&&(t[a]=i)}}return t}const Kc=new Mr("selectingCells");function bh(n){for(let t=n.depth-1;t>0;t--)if(n.node(t).type.spec.tableRole=="row")return n.node(0).resolve(n.before(t+1));return null}function Hbt(n){for(let t=n.depth;t>0;t--){const r=n.node(t).type.spec.tableRole;if(r==="cell"||r==="header_cell")return n.node(t)}return null}function No(n){let t=n.selection.$head;for(let r=t.depth;r>0;r--)if(t.node(r).type.spec.tableRole=="row")return!0;return!1}function Lw(n){let t=n.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&t.node.type.spec.tableRole=="cell"?t.$anchor:bh(t.$head)||Wbt(t.$head)}function Wbt(n){for(let t=n.nodeAfter,r=n.pos;t;t=t.firstChild,r++){let i=t.type.spec.tableRole;if(i=="cell"||i=="header_cell")return n.doc.resolve(r)}for(let t=n.nodeBefore,r=n.pos;t;t=t.lastChild,r--){let i=t.type.spec.tableRole;if(i=="cell"||i=="header_cell")return n.doc.resolve(r-t.nodeSize)}}function TE(n){return n.parent.type.spec.tableRole=="row"&&n.nodeAfter}function Gbt(n){return n.node(0).resolve(n.pos+n.nodeAfter.nodeSize)}function EE(n,t){return n.depth==t.depth&&n.pos>=t.start(-1)&&n.pos<=t.end(-1)}function jJ(n,t,r){let i=n.start(-1),o=gr.get(n.node(-1)).nextCell(n.pos-i,t,r);return o==null?null:n.node(0).resolve(i+o)}function Zr(n,t,r){let i={};for(let a in n)i[a]=n[a];return i[t]=r,i}function Ad(n,t,r=1){let i=Zr(n,"colspan",n.colspan-r);return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(t,r),i.colwidth.some(a=>a>0)||(i.colwidth=null)),i}function zJ(n,t,r=1){let i=Zr(n,"colspan",n.colspan+r);if(i.colwidth){i.colwidth=i.colwidth.slice();for(let a=0;a<r;a++)i.colwidth.splice(t,0,0)}return i}function qbt(n,t,r){let i=Oi(t.type.schema).header_cell;for(let a=0;a<n.height;a++)if(t.nodeAt(n.map[r+a*n.width]).type!=i)return!1;return!0}class en extends Et{constructor(t,r=t){let i=t.node(-1),a=gr.get(i),o=t.start(-1),s=a.rectBetween(t.pos-o,r.pos-o),c=t.node(0),l=a.cellsInRect(s).filter(d=>d!=r.pos-o);l.unshift(r.pos-o);let u=l.map(d=>{let p=i.nodeAt(d),f=d+o+1;return new DK(c.resolve(f),c.resolve(f+p.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=r}map(t,r){let i=t.resolve(r.map(this.$anchorCell.pos)),a=t.resolve(r.map(this.$headCell.pos));if(TE(i)&&TE(a)&&EE(i,a)){let o=this.$anchorCell.node(-1)!=i.node(-1);return o&&this.isRowSelection()?en.rowSelection(i,a):o&&this.isColSelection()?en.colSelection(i,a):new en(i,a)}return $t.between(i,a)}content(){let t=this.$anchorCell.node(-1),r=gr.get(t),i=this.$anchorCell.start(-1),a=r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},s=[];for(let l=a.top;l<a.bottom;l++){let u=[];for(let d=l*r.width+a.left,p=a.left;p<a.right;p++,d++){let f=r.map[d];if(!o[f]){o[f]=!0;let h=r.findCell(f),m=t.nodeAt(f),g=a.left-h.left,y=h.right-a.right;if(g>0||y>0){let b=m.attrs;g>0&&(b=Ad(b,0,g)),y>0&&(b=Ad(b,b.colspan-y,y)),h.left<a.left?m=m.type.createAndFill(b):m=m.type.create(b,m.content)}if(h.top<a.top||h.bottom>a.bottom){let b=Zr(m.attrs,"rowspan",Math.min(h.bottom,a.bottom)-Math.max(h.top,a.top));h.top<a.top?m=m.type.createAndFill(b):m=m.type.create(b,m.content)}u.push(m)}}s.push(t.child(l).copy(qe.from(u)))}const c=this.isColSelection()&&this.isRowSelection()?t:s;return new rt(qe.from(c),1,1)}replace(t,r=rt.empty){let i=t.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:c,$to:l}=a[s],u=t.mapping.slice(i);t.replace(u.map(c.pos),u.map(l.pos),s?rt.empty:r)}let o=Et.findFrom(t.doc.resolve(t.mapping.slice(i).map(this.to)),-1);o&&t.setSelection(o)}replaceWith(t,r){this.replace(t,new rt(qe.from(r),0,0))}forEachCell(t){let r=this.$anchorCell.node(-1),i=gr.get(r),a=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-a,this.$headCell.pos-a));for(let s=0;s<o.length;s++)t(r.nodeAt(o[s]),a+o[s])}isColSelection(){let t=this.$anchorCell.index(-1),r=this.$headCell.index(-1);if(Math.min(t,r)>0)return!1;let i=t+this.$anchorCell.nodeAfter.attrs.rowspan,a=r+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(i,a)==this.$headCell.node(-1).childCount}static colSelection(t,r=t){let i=gr.get(t.node(-1)),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(r.pos-a),c=t.node(0);return o.top<=s.top?(o.top>0&&(t=c.resolve(a+i.map[o.left])),s.bottom<i.height&&(r=c.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(r=c.resolve(a+i.map[s.left])),o.bottom<i.height&&(t=c.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new en(t,r)}isRowSelection(){let t=gr.get(this.$anchorCell.node(-1)),r=this.$anchorCell.start(-1),i=t.colCount(this.$anchorCell.pos-r),a=t.colCount(this.$headCell.pos-r);if(Math.min(i,a)>0)return!1;let o=i+this.$anchorCell.nodeAfter.attrs.colspan,s=a+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,s)==t.width}eq(t){return t instanceof en&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,r=t){let i=gr.get(t.node(-1)),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(r.pos-a),c=t.node(0);return o.left<=s.left?(o.left>0&&(t=c.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(r=c.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(r=c.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(t=c.resolve(a+i.map[i.width*(o.top+1)-1]))),new en(t,r)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,r){return new en(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,i=r){return new en(t.resolve(r),t.resolve(i))}getBookmark(){return new $E(this.$anchorCell.pos,this.$headCell.pos)}}en.prototype.visible=!1,Et.jsonID("cell",en);class $E{constructor(t,r){this.anchor=t,this.head=r}map(t){return new $E(t.map(this.anchor),t.map(this.head))}resolve(t){let r=t.resolve(this.anchor),i=t.resolve(this.head);return r.parent.type.spec.tableRole=="row"&&i.parent.type.spec.tableRole=="row"&&r.index()<r.parent.childCount&&i.index()<i.parent.childCount&&EE(r,i)?new en(r,i):Et.near(i,1)}}function Ybt(n){if(!(n.selection instanceof en))return null;let t=[];return n.selection.forEachCell((r,i)=>{t.push(Ei.node(i,i+r.nodeSize,{class:"selectedCell"}))}),wr.create(n.doc,t)}function Kbt({$from:n,$to:t}){if(n.pos==t.pos||n.pos<n.pos-6)return!1;let r=n.pos,i=t.pos,a=n.depth;for(;a>=0&&!(n.after(a+1)<n.end(a));a--,r++);for(let o=t.depth;o>=0&&!(t.before(o+1)>t.start(o));o--,i--);return r==i&&/row|table/.test(n.node(a).type.spec.tableRole)}function Zbt({$from:n,$to:t}){let r,i;for(let a=n.depth;a>0;a--){let o=n.node(a);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=o;break}}for(let a=t.depth;a>0;a--){let o=t.node(a);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){i=o;break}}return r!==i&&t.parentOffset===0}function Jbt(n,t,r){let i=(t||n).selection,a=(t||n).doc,o,s;if(i instanceof kt&&(s=i.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=en.create(a,i.from);else if(s=="row"){let c=a.resolve(i.from+1);o=en.rowSelection(c,c)}else if(!r){let c=gr.get(i.node),l=i.from+1,u=l+c.map[c.width*c.height-1];o=en.create(a,l+1,u)}}else i instanceof $t&&Kbt(i)?o=$t.create(a,i.from):i instanceof $t&&Zbt(i)&&(o=$t.create(a,i.$from.start(),i.$from.end()));return o&&(t||(t=n.tr)).setSelection(o),t}function Xbt(n){if(!n.size)return null;let{content:t,openStart:r,openEnd:i}=n;for(;t.childCount==1&&(r>0&&i>0||t.firstChild.type.spec.tableRole=="table");)r--,i--,t=t.firstChild.content;let a=t.firstChild,o=a.type.spec.tableRole,s=a.type.schema,c=[];if(o=="row")for(let l=0;l<t.childCount;l++){let u=t.child(l).content,d=l?0:Math.max(0,r-1),p=l<t.childCount-1?0:Math.max(0,i-1);(d||p)&&(u=AE(Oi(s).row,new rt(u,d,p)).content),c.push(u)}else if(o=="cell"||o=="header_cell")c.push(r||i?AE(Oi(s).row,new rt(t,r,i)).content:t);else return null;return Qbt(s,c)}function Qbt(n,t){let r=[];for(let a=0;a<t.length;a++){let o=t[a];for(let s=o.childCount-1;s>=0;s--){let{rowspan:c,colspan:l}=o.child(s).attrs;for(let u=a;u<a+c;u++)r[u]=(r[u]||0)+l}}let i=0;for(let a=0;a<r.length;a++)i=Math.max(i,r[a]);for(let a=0;a<r.length;a++)if(a>=t.length&&t.push(qe.empty),r[a]<i){let o=Oi(n).cell.createAndFill(),s=[];for(let c=r[a];c<i;c++)s.push(o);t[a]=t[a].append(qe.from(s))}return{height:t.length,width:i,rows:t}}function AE(n,t){let r=n.createAndFill();return new gT(r).replace(0,r.content.size,t).doc}function e_t({width:n,height:t,rows:r},i,a){if(n!=i){let o=[],s=[];for(let c=0;c<r.length;c++){let l=r[c],u=[];for(let d=o[c]||0,p=0;d<i;p++){let f=l.child(p%l.childCount);d+f.attrs.colspan>i&&(f=f.type.create(Ad(f.attrs,f.attrs.colspan,d+f.attrs.colspan-i),f.content)),u.push(f),d+=f.attrs.colspan;for(let h=1;h<f.attrs.rowspan;h++)o[c+h]=(o[c+h]||0)+f.attrs.colspan}s.push(qe.from(u))}r=s,n=i}if(t!=a){let o=[];for(let s=0,c=0;s<a;s++,c++){let l=[],u=r[c%t];for(let d=0;d<u.childCount;d++){let p=u.child(d);s+p.attrs.rowspan>a&&(p=p.type.create(Zr(p.attrs,"rowspan",Math.max(1,a-p.attrs.rowspan)),p.content)),l.push(p)}o.push(qe.from(l))}r=o,t=a}return{width:n,height:t,rows:r}}function t_t(n,t,r,i,a,o,s){let c=n.doc.type.schema,l=Oi(c),u,d;if(a>t.width)for(let p=0,f=0;p<t.height;p++){let h=r.child(p);f+=h.nodeSize;let m=[],g;h.lastChild==null||h.lastChild.type==l.cell?g=u||(u=l.cell.createAndFill()):g=d||(d=l.header_cell.createAndFill());for(let y=t.width;y<a;y++)m.push(g);n.insert(n.mapping.slice(s).map(f-1+i),m)}if(o>t.height){let p=[];for(let m=0,g=(t.height-1)*t.width;m<Math.max(t.width,a);m++){let y=m>=t.width?!1:r.nodeAt(t.map[g+m]).type==l.header_cell;p.push(y?d||(d=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}let f=l.row.create(null,qe.from(p)),h=[];for(let m=t.height;m<o;m++)h.push(f);n.insert(n.mapping.slice(s).map(i+r.nodeSize-2),h)}return!!(u||d)}function VJ(n,t,r,i,a,o,s,c){if(s==0||s==t.height)return!1;let l=!1;for(let u=a;u<o;u++){let d=s*t.width+u,p=t.map[d];if(t.map[d-t.width]==p){l=!0;let f=r.nodeAt(p),{top:h,left:m}=t.findCell(p);n.setNodeMarkup(n.mapping.slice(c).map(p+i),null,Zr(f.attrs,"rowspan",s-h)),n.insert(n.mapping.slice(c).map(t.positionAt(s,m,r)),f.type.createAndFill(Zr(f.attrs,"rowspan",h+f.attrs.rowspan-s))),u+=f.attrs.colspan-1}}return l}function UJ(n,t,r,i,a,o,s,c){if(s==0||s==t.width)return!1;let l=!1;for(let u=a;u<o;u++){let d=u*t.width+s,p=t.map[d];if(t.map[d-1]==p){l=!0;let f=r.nodeAt(p),h=t.colCount(p),m=n.mapping.slice(c).map(p+i);n.setNodeMarkup(m,null,Ad(f.attrs,s-h,f.attrs.colspan-(s-h))),n.insert(m+f.nodeSize,f.type.createAndFill(Ad(f.attrs,0,s-h))),u+=f.attrs.rowspan-1}}return l}function HJ(n,t,r,i,a){let o=r?n.doc.nodeAt(r-1):n.doc,s=gr.get(o),{top:c,left:l}=i,u=l+a.width,d=c+a.height,p=n.tr,f=0;function h(){o=r?p.doc.nodeAt(r-1):p.doc,s=gr.get(o),f=p.mapping.maps.length}t_t(p,s,o,r,u,d,f)&&h(),VJ(p,s,o,r,l,u,c,f)&&h(),VJ(p,s,o,r,l,u,d,f)&&h(),UJ(p,s,o,r,c,d,l,f)&&h(),UJ(p,s,o,r,c,d,u,f)&&h();for(let m=c;m<d;m++){let g=s.positionAt(m,l,o),y=s.positionAt(m,u,o);p.replace(p.mapping.slice(f).map(g+r),p.mapping.slice(f).map(y+r),new rt(a.rows[m-c],0,0))}h(),p.setSelection(new en(p.doc.resolve(r+s.positionAt(c,l,o)),p.doc.resolve(r+s.positionAt(d-1,u-1,o)))),t(p)}const n_t=KT({ArrowLeft:Nw("horiz",-1),ArrowRight:Nw("horiz",1),ArrowUp:Nw("vert",-1),ArrowDown:Nw("vert",1),"Shift-ArrowLeft":Bw("horiz",-1),"Shift-ArrowRight":Bw("horiz",1),"Shift-ArrowUp":Bw("vert",-1),"Shift-ArrowDown":Bw("vert",1),Backspace:jw,"Mod-Backspace":jw,Delete:jw,"Mod-Delete":jw});function Fw(n,t,r){return r.eq(n.selection)?!1:(t&&t(n.tr.setSelection(r).scrollIntoView()),!0)}function Nw(n,t){return(r,i,a)=>{let o=r.selection;if(o instanceof en)return Fw(r,i,Et.near(o.$headCell,t));if(n!="horiz"&&!o.empty)return!1;let s=WJ(a,n,t);if(s==null)return!1;if(n=="horiz")return Fw(r,i,Et.near(r.doc.resolve(o.head+t),t));{let c=r.doc.resolve(s),l=jJ(c,n,t),u;return l?u=Et.near(l,1):t<0?u=Et.near(r.doc.resolve(c.before(-1)),-1):u=Et.near(r.doc.resolve(c.after(-1)),1),Fw(r,i,u)}}}function Bw(n,t){return(r,i,a)=>{let o=r.selection;if(!(o instanceof en)){let c=WJ(a,n,t);if(c==null)return!1;o=new en(r.doc.resolve(c))}let s=jJ(o.$headCell,n,t);return s?Fw(r,i,new en(o.$anchorCell,s)):!1}}function jw(n,t){let r=n.selection;if(!(r instanceof en))return!1;if(t){let i=n.tr,a=Oi(n.schema).cell.createAndFill().content;r.forEachCell((o,s)=>{o.content.eq(a)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new rt(a,0,0))}),i.docChanged&&t(i)}return!0}function r_t(n,t){let r=n.state.doc,i=bh(r.resolve(t));return i?(n.dispatch(n.state.tr.setSelection(new en(i))),!0):!1}function i_t(n,t,r){if(!No(n.state))return!1;let i=Xbt(r),a=n.state.selection;if(a instanceof en){i||(i={width:1,height:1,rows:[qe.from(AE(Oi(n.state.schema).cell,r))]});let o=a.$anchorCell.node(-1),s=a.$anchorCell.start(-1),c=gr.get(o).rectBetween(a.$anchorCell.pos-s,a.$headCell.pos-s);return i=e_t(i,c.right-c.left,c.bottom-c.top),HJ(n.state,n.dispatch,s,c,i),!0}else if(i){let o=Lw(n.state),s=o.start(-1);return HJ(n.state,n.dispatch,s,gr.get(o.node(-1)).findCell(o.pos-s),i),!0}else return!1}function a_t(n,t){if(t.ctrlKey||t.metaKey)return;let r=GJ(n,t.target),i;if(t.shiftKey&&n.state.selection instanceof en)a(n.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=bh(n.state.selection.$anchor))!=null&&OE(n,t).pos!=i.pos)a(i,t),t.preventDefault();else if(!r)return;function a(c,l){let u=OE(n,l),d=Kc.getState(n.state)==null;if(!u||!EE(c,u))if(d)u=c;else return;let p=new en(c,u);if(d||!n.state.selection.eq(p)){let f=n.state.tr.setSelection(p);d&&f.setMeta(Kc,c.pos),n.dispatch(f)}}function o(){n.root.removeEventListener("mouseup",o),n.root.removeEventListener("dragstart",o),n.root.removeEventListener("mousemove",s),Kc.getState(n.state)!=null&&n.dispatch(n.state.tr.setMeta(Kc,-1))}function s(c){let l=Kc.getState(n.state),u;if(l!=null)u=n.state.doc.resolve(l);else if(GJ(n,c.target)!=r&&(u=OE(n,t),!u))return o();u&&a(u,c)}n.root.addEventListener("mouseup",o),n.root.addEventListener("dragstart",o),n.root.addEventListener("mousemove",s)}function WJ(n,t,r){if(!(n.state.selection instanceof $t))return null;let{$head:i}=n.state.selection;for(let a=i.depth-1;a>=0;a--){let o=i.node(a);if((r<0?i.index(a):i.indexAfter(a))!=(r<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){let c=i.before(a),l=t=="vert"?r>0?"down":"up":r>0?"right":"left";return n.endOfTextblock(l)?c:null}}return null}function GJ(n,t){for(;t&&t!=n.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t}function OE(n,t){let r=n.posAtCoords({left:t.clientX,top:t.clientY});return r&&r?bh(n.state.doc.resolve(r.pos)):null}const o_t=new Mr("fix-tables");function qJ(n,t,r,i){let a=n.childCount,o=t.childCount;e:for(let s=0,c=0;s<o;s++){let l=t.child(s);for(let u=c,d=Math.min(a,s+3);u<d;u++)if(n.child(u)==l){c=u+1,r+=l.nodeSize;continue e}i(l,r),c<a&&n.child(c).sameMarkup(l)?qJ(n.child(c),l,r+1,i):l.nodesBetween(0,l.content.size,i,r+1),r+=l.nodeSize}}function YJ(n,t){let r,i=(a,o)=>{a.type.spec.tableRole=="table"&&(r=s_t(n,a,o,r))};return t?t.doc!=n.doc&&qJ(t.doc,n.doc,0,i):n.doc.descendants(i),r}function s_t(n,t,r,i){let a=gr.get(t);if(!a.problems)return i;i||(i=n.tr);let o=[];for(let l=0;l<a.height;l++)o.push(0);for(let l=0;l<a.problems.length;l++){let u=a.problems[l];if(u.type=="collision"){let d=t.nodeAt(u.pos);for(let p=0;p<d.attrs.rowspan;p++)o[u.row+p]+=u.n;i.setNodeMarkup(i.mapping.map(r+1+u.pos),null,Ad(d.attrs,d.attrs.colspan-u.n,u.n))}else if(u.type=="missing")o[u.row]+=u.n;else if(u.type=="overlong_rowspan"){let d=t.nodeAt(u.pos);i.setNodeMarkup(i.mapping.map(r+1+u.pos),null,Zr(d.attrs,"rowspan",d.attrs.rowspan-u.n))}else if(u.type=="colwidth mismatch"){let d=t.nodeAt(u.pos);i.setNodeMarkup(i.mapping.map(r+1+u.pos),null,Zr(d.attrs,"colwidth",u.colwidth))}}let s,c;for(let l=0;l<o.length;l++)o[l]&&(s==null&&(s=l),c=l);for(let l=0,u=r+1;l<a.height;l++){let d=t.child(l),p=u+d.nodeSize,f=o[l];if(f>0){let h="cell";d.firstChild&&(h=d.firstChild.type.spec.tableRole);let m=[];for(let y=0;y<f;y++)m.push(Oi(n.schema)[h].createAndFill());let g=(l==0||s==l-1)&&c==l?u+1:p-1;i.insert(i.mapping.map(g),m)}u=p}return i.setMeta(o_t,{fixTables:!0})}function As(n){let t=n.selection,r=Lw(n),i=r.node(-1),a=r.start(-1),o=gr.get(i),s;return t instanceof en?s=o.rectBetween(t.$anchorCell.pos-a,t.$headCell.pos-a):s=o.findCell(r.pos-a),s.tableStart=a,s.map=o,s.table=i,s}function KJ(n,{map:t,tableStart:r,table:i},a){let o=a>0?-1:0;qbt(t,i,a+o)&&(o=a==0||a==t.width?null:0);for(let s=0;s<t.height;s++){let c=s*t.width+a;if(a>0&&a<t.width&&t.map[c-1]==t.map[c]){let l=t.map[c],u=i.nodeAt(l);n.setNodeMarkup(n.mapping.map(r+l),null,zJ(u.attrs,a-t.colCount(l))),s+=u.attrs.rowspan-1}else{let l=o==null?Oi(i.type.schema).cell:i.nodeAt(t.map[c+o]).type,u=t.positionAt(s,a,i);n.insert(n.mapping.map(r+u),l.createAndFill())}}return n}function l_t(n,t){if(!No(n))return!1;if(t){let r=As(n);t(KJ(n.tr,r,r.left))}return!0}function c_t(n,t){if(!No(n))return!1;if(t){let r=As(n);t(KJ(n.tr,r,r.right))}return!0}function u_t(n,{map:t,table:r,tableStart:i},a){let o=n.mapping.maps.length;for(let s=0;s<t.height;){let c=s*t.width+a,l=t.map[c],u=r.nodeAt(l);if(a>0&&t.map[c-1]==l||a<t.width-1&&t.map[c+1]==l)n.setNodeMarkup(n.mapping.slice(o).map(i+l),null,Ad(u.attrs,a-t.colCount(l)));else{let d=n.mapping.slice(o).map(i+l);n.delete(d,d+u.nodeSize)}s+=u.attrs.rowspan}}function d_t(n,t){if(!No(n))return!1;if(t){let r=As(n),i=n.tr;if(r.left==0&&r.right==r.map.width)return!1;for(let a=r.right-1;u_t(i,r,a),a!=r.left;a--)r.table=r.tableStart?i.doc.nodeAt(r.tableStart-1):i.doc,r.map=gr.get(r.table);t(i)}return!0}function p_t(n,t,r){let i=Oi(t.type.schema).header_cell;for(let a=0;a<n.width;a++)if(t.nodeAt(n.map[a+r*n.width]).type!=i)return!1;return!0}function ZJ(n,{map:t,tableStart:r,table:i},a){let o=r;for(let l=0;l<a;l++)o+=i.child(l).nodeSize;let s=[],c=a>0?-1:0;p_t(t,i,a+c)&&(c=a==0||a==t.height?null:0);for(let l=0,u=t.width*a;l<t.width;l++,u++)if(a>0&&a<t.height&&t.map[u]==t.map[u-t.width]){let d=t.map[u],p=i.nodeAt(d).attrs;n.setNodeMarkup(r+d,null,Zr(p,"rowspan",p.rowspan+1)),l+=p.colspan-1}else{let d=c==null?Oi(i.type.schema).cell:i.nodeAt(t.map[u+c*t.width]).type;s.push(d.createAndFill())}return n.insert(o,Oi(i.type.schema).row.create(null,s)),n}function f_t(n,t){if(!No(n))return!1;if(t){let r=As(n);t(ZJ(n.tr,r,r.top))}return!0}function h_t(n,t){if(!No(n))return!1;if(t){let r=As(n);t(ZJ(n.tr,r,r.bottom))}return!0}function m_t(n,{map:t,table:r,tableStart:i},a){let o=0;for(let l=0;l<a;l++)o+=r.child(l).nodeSize;let s=o+r.child(a).nodeSize,c=n.mapping.maps.length;n.delete(o+i,s+i);for(let l=0,u=a*t.width;l<t.width;l++,u++){let d=t.map[u];if(a>0&&d==t.map[u-t.width]){let p=r.nodeAt(d).attrs;n.setNodeMarkup(n.mapping.slice(c).map(d+i),null,Zr(p,"rowspan",p.rowspan-1)),l+=p.colspan-1}else if(a<t.width&&d==t.map[u+t.width]){let p=r.nodeAt(d),f=p.type.create(Zr(p.attrs,"rowspan",p.attrs.rowspan-1),p.content),h=t.positionAt(a+1,l,r);n.insert(n.mapping.slice(c).map(i+h),f),l+=p.attrs.colspan-1}}}function g_t(n,t){if(!No(n))return!1;if(t){let r=As(n),i=n.tr;if(r.top==0&&r.bottom==r.map.height)return!1;for(let a=r.bottom-1;m_t(i,r,a),a!=r.top;a--)r.table=r.tableStart?i.doc.nodeAt(r.tableStart-1):i.doc,r.map=gr.get(r.table);t(i)}return!0}function JJ(n){let t=n.content;return t.childCount==1&&t.firstChild.isTextblock&&t.firstChild.childCount==0}function v_t({width:n,height:t,map:r},i){let a=i.top*n+i.left,o=a,s=(i.bottom-1)*n+i.left,c=a+(i.right-i.left-1);for(let l=i.top;l<i.bottom;l++){if(i.left>0&&r[o]==r[o-1]||i.right<n&&r[c]==r[c+1])return!0;o+=n,c+=n}for(let l=i.left;l<i.right;l++){if(i.top>0&&r[a]==r[a-n]||i.bottom<t&&r[s]==r[s+n])return!0;a++,s++}return!1}function XJ(n,t){let r=n.selection;if(!(r instanceof en)||r.$anchorCell.pos==r.$headCell.pos)return!1;let i=As(n),{map:a}=i;if(v_t(a,i))return!1;if(t){let o=n.tr,s={},c=qe.empty,l,u;for(let d=i.top;d<i.bottom;d++)for(let p=i.left;p<i.right;p++){let f=a.map[d*a.width+p],h=i.table.nodeAt(f);if(!s[f])if(s[f]=!0,l==null)l=f,u=h;else{JJ(h)||(c=c.append(h.content));let m=o.mapping.map(f+i.tableStart);o.delete(m,m+h.nodeSize)}}if(o.setNodeMarkup(l+i.tableStart,null,Zr(zJ(u.attrs,u.attrs.colspan,i.right-i.left-u.attrs.colspan),"rowspan",i.bottom-i.top)),c.size){let d=l+1+u.content.size,p=JJ(u)?l+1:d;o.replaceWith(p+i.tableStart,d+i.tableStart,c)}o.setSelection(new en(o.doc.resolve(l+i.tableStart))),t(o)}return!0}function QJ(n,t){const r=Oi(n.schema);return y_t(({node:i})=>r[i.type.spec.tableRole])(n,t)}function y_t(n){return(t,r)=>{let i=t.selection,a,o;if(i instanceof en){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;a=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(a=Hbt(i.$from),!a)return!1;o=bh(i.$from).pos}if(a.attrs.colspan==1&&a.attrs.rowspan==1)return!1;if(r){let s=a.attrs,c=[],l=s.colwidth;s.rowspan>1&&(s=Zr(s,"rowspan",1)),s.colspan>1&&(s=Zr(s,"colspan",1));let u=As(t),d=t.tr;for(let f=0;f<u.right-u.left;f++)c.push(l?Zr(s,"colwidth",l&&l[f]?[l[f]]:null):s);let p;for(let f=u.top;f<u.bottom;f++){let h=u.map.positionAt(f,u.left,u.table);f==u.top&&(h+=a.nodeSize);for(let m=u.left,g=0;m<u.right;m++,g++)m==u.left&&f==u.top||d.insert(p=d.mapping.map(h+u.tableStart,1),n({node:a,row:f,col:m}).createAndFill(c[g]))}d.setNodeMarkup(o,n({node:a,row:u.top,col:u.left}),c[0]),i instanceof en&&d.setSelection(new en(d.doc.resolve(i.$anchorCell.pos),p&&d.doc.resolve(p))),r(d)}return!0}}function b_t(n,t){return function(r,i){if(!No(r))return!1;let a=Lw(r);if(a.nodeAfter.attrs[n]===t)return!1;if(i){let o=r.tr;r.selection instanceof en?r.selection.forEachCell((s,c)=>{s.attrs[n]!==t&&o.setNodeMarkup(c,null,Zr(s.attrs,n,t))}):o.setNodeMarkup(a.pos,null,Zr(a.nodeAfter.attrs,n,t)),i(o)}return!0}}function __t(n){return function(t,r){if(!No(t))return!1;if(r){let i=Oi(t.schema),a=As(t),o=t.tr,s=a.map.cellsInRect(n=="column"?new yh(a.left,0,a.right,a.map.height):n=="row"?new yh(0,a.top,a.map.width,a.bottom):a),c=s.map(l=>a.table.nodeAt(l));for(let l=0;l<s.length;l++)c[l].type==i.header_cell&&o.setNodeMarkup(a.tableStart+s[l],i.cell,c[l].attrs);if(o.steps.length==0)for(let l=0;l<s.length;l++)o.setNodeMarkup(a.tableStart+s[l],i.header_cell,c[l].attrs);r(o)}return!0}}function eX(n,t,r){const i=t.map.cellsInRect({left:0,top:0,right:n=="row"?t.map.width:1,bottom:n=="column"?t.map.height:1});for(let a=0;a<i.length;a++){const o=t.table.nodeAt(i[a]);if(o&&o.type!==r.header_cell)return!1}return!0}function j1(n,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?__t(n):function(r,i){if(!No(r))return!1;if(i){let a=Oi(r.schema),o=As(r),s=r.tr,c=eX("row",o,a),l=eX("column",o,a),d=(n==="column"?c:n==="row"?l:!1)?1:0,p=n=="column"?new yh(0,d,1,o.map.height):n=="row"?new yh(d,0,o.map.width,1):o,f=n=="column"?l?a.cell:a.header_cell:n=="row"?c?a.cell:a.header_cell:a.cell;o.map.cellsInRect(p).forEach(h=>{const m=h+o.tableStart,g=s.doc.nodeAt(m);g&&s.setNodeMarkup(m,f,g.attrs)}),i(s)}return!0}}j1("row",{useDeprecatedLogic:!0}),j1("column",{useDeprecatedLogic:!0});let w_t=j1("cell",{useDeprecatedLogic:!0});function x_t(n,t){if(t<0){let r=n.nodeBefore;if(r)return n.pos-r.nodeSize;for(let i=n.index(-1)-1,a=n.before();i>=0;i--){let o=n.node(-1).child(i);if(o.childCount)return a-1-o.lastChild.nodeSize;a-=o.nodeSize}}else{if(n.index()<n.parent.childCount-1)return n.pos+n.nodeAfter.nodeSize;let r=n.node(-1);for(let i=n.indexAfter(-1),a=n.after();i<r.childCount;i++){let o=r.child(i);if(o.childCount)return a+1;a+=o.nodeSize}}}function tX(n){return function(t,r){if(!No(t))return!1;let i=x_t(Lw(t),n);if(i!=null){if(r){let a=t.doc.resolve(i);r(t.tr.setSelection($t.between(a,Gbt(a))).scrollIntoView())}return!0}}}function C_t(n,t){let r=n.selection.$anchor;for(let i=r.depth;i>0;i--)if(r.node(i).type.spec.tableRole=="table")return t&&t(n.tr.delete(r.before(i),r.after(i)).scrollIntoView()),!0;return!1}let k_t=class{constructor(t,r){this.node=t,this.cellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),DE(t,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,DE(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function DE(n,t,r,i,a,o){let s=0,c=!0,l=t.firstChild,u=n.firstChild;for(let d=0,p=0;d<u.childCount;d++){let{colspan:f,colwidth:h}=u.child(d).attrs;for(let m=0;m<f;m++,p++){let g=a==p?o:h&&h[m],y=g?g+"px":"";s+=g||i,g||(c=!1),l?(l.style.width!=y&&(l.style.width=y),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=y}}for(;l;){let d=l.nextSibling;l.parentNode.removeChild(l),l=d}c?(r.style.width=s+"px",r.style.minWidth=""):(r.style.width="",r.style.minWidth=s+"px")}const to=new Mr("tableColumnResizing");function S_t({handleWidth:n=5,cellMinWidth:t=25,View:r=k_t,lastColumnResizable:i=!0}={}){return new ir({key:to,state:{init(o,s){return this.spec.props.nodeViews[Oi(s.schema).table.name]=(c,l)=>new r(c,t,l),new z1(-1,!1)},apply(o,s){return s.apply(o)}},props:{attributes(o){return to.getState(o).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove(o,s){T_t(o,s,n,t,i)},mouseleave(o){E_t(o)},mousedown(o,s){$_t(o,s,t)}},decorations(o){let s=to.getState(o);if(s.activeHandle>-1)return I_t(o,s.activeHandle)},nodeViews:{}}})}class z1{constructor(t,r){this.activeHandle=t,this.dragging=r}apply(t){let r=this,i=t.getMeta(to);if(i&&i.setHandle!=null)return new z1(i.setHandle,null);if(i&&i.setDragging!==void 0)return new z1(r.activeHandle,i.setDragging);if(r.activeHandle>-1&&t.docChanged){let a=t.mapping.map(r.activeHandle,-1);TE(t.doc.resolve(a))||(a=null),r=new z1(a,r.dragging)}return r}}function T_t(n,t,r,i,a){let o=to.getState(n.state);if(!o.dragging){let s=O_t(t.target),c=-1;if(s){let{left:l,right:u}=s.getBoundingClientRect();t.clientX-l<=r?c=nX(n,t,"left"):u-t.clientX<=r&&(c=nX(n,t,"right"))}if(c!=o.activeHandle){if(!a&&c!==-1){let l=n.state.doc.resolve(c),u=l.node(-1),d=gr.get(u),p=l.start(-1);if(d.colCount(l.pos-p)+l.nodeAfter.attrs.colspan-1==d.width-1)return}iX(n,c)}}}function E_t(n){let t=to.getState(n.state);t.activeHandle>-1&&!t.dragging&&iX(n,-1)}function $_t(n,t,r){let i=to.getState(n.state);if(i.activeHandle==-1||i.dragging)return!1;let a=n.state.doc.nodeAt(i.activeHandle),o=A_t(n,i.activeHandle,a.attrs);n.dispatch(n.state.tr.setMeta(to,{setDragging:{startX:t.clientX,startWidth:o}}));function s(l){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",c);let u=to.getState(n.state);u.dragging&&(D_t(n,u.activeHandle,rX(u.dragging,l,r)),n.dispatch(n.state.tr.setMeta(to,{setDragging:null})))}function c(l){if(!l.which)return s(l);let u=to.getState(n.state),d=rX(u.dragging,l,r);M_t(n,u.activeHandle,d,r)}return window.addEventListener("mouseup",s),window.addEventListener("mousemove",c),t.preventDefault(),!0}function A_t(n,t,{colspan:r,colwidth:i}){let a=i&&i[i.length-1];if(a)return a;let o=n.domAtPos(t),c=o.node.childNodes[o.offset].offsetWidth,l=r;if(i)for(let u=0;u<r;u++)i[u]&&(c-=i[u],l--);return c/l}function O_t(n){for(;n&&n.nodeName!="TD"&&n.nodeName!="TH";)n=n.classList.contains("ProseMirror")?null:n.parentNode;return n}function nX(n,t,r){let i=n.posAtCoords({left:t.clientX,top:t.clientY});if(!i)return-1;let{pos:a}=i,o=bh(n.state.doc.resolve(a));if(!o)return-1;if(r=="right")return o.pos;let s=gr.get(o.node(-1)),c=o.start(-1),l=s.map.indexOf(o.pos-c);return l%s.width==0?-1:c+s.map[l-1]}function rX(n,t,r){let i=t.clientX-n.startX;return Math.max(r,n.startWidth+i)}function iX(n,t){n.dispatch(n.state.tr.setMeta(to,{setHandle:t}))}function D_t(n,t,r){let i=n.state.doc.resolve(t),a=i.node(-1),o=gr.get(a),s=i.start(-1),c=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=n.state.tr;for(let u=0;u<o.height;u++){let d=u*o.width+c;if(u&&o.map[d]==o.map[d-o.width])continue;let p=o.map[d],{attrs:f}=a.nodeAt(p),h=f.colspan==1?0:c-o.colCount(p);if(f.colwidth&&f.colwidth[h]==r)continue;let m=f.colwidth?f.colwidth.slice():P_t(f.colspan);m[h]=r,l.setNodeMarkup(s+p,null,Zr(f,"colwidth",m))}l.docChanged&&n.dispatch(l)}function M_t(n,t,r,i){let a=n.state.doc.resolve(t),o=a.node(-1),s=a.start(-1),c=gr.get(o).colCount(a.pos-s)+a.nodeAfter.attrs.colspan-1,l=n.domAtPos(a.start(-1)).node;for(;l.nodeName!="TABLE";)l=l.parentNode;DE(o,l.firstChild,l,i,c,r)}function P_t(n){let t=[];for(let r=0;r<n;r++)t.push(0);return t}function I_t(n,t){let r=[],i=n.doc.resolve(t),a=i.node(-1),o=gr.get(a),s=i.start(-1),c=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan;for(let l=0;l<o.height;l++){let u=c+l*o.width-1;if((c==o.width||o.map[u]!=o.map[u+1])&&(l==0||o.map[u-1]!=o.map[u-1-o.width])){let d=o.map[u],p=s+d+a.nodeAt(d).nodeSize-1,f=document.createElement("div");f.className="column-resize-handle",r.push(Ei.widget(p,f))}}return wr.create(n.doc,r)}function R_t({allowTableNodeSelection:n=!1}={}){return new ir({key:Kc,state:{init(){return null},apply(t,r){let i=t.getMeta(Kc);if(i!=null)return i==-1?null:i;if(r==null||!t.docChanged)return r;let{deleted:a,pos:o}=t.mapping.mapResult(r);return a?null:o}},props:{decorations:Ybt,handleDOMEvents:{mousedown:a_t},createSelectionBetween(t){if(Kc.getState(t.state)!=null)return t.state.selection},handleTripleClick:r_t,handleKeyDown:n_t,handlePaste:i_t},appendTransaction(t,r,i){return Jbt(i,YJ(i,r),n)}})}function aX(n,t,r,i,a,o){let s=0,c=!0,l=t.firstChild;const u=n.firstChild;for(let d=0,p=0;d<u.childCount;d+=1){const{colspan:f,colwidth:h}=u.child(d).attrs;for(let m=0;m<f;m+=1,p+=1){const g=a===p?o:h&&h[m],y=g?`${g}px`:"";s+=g||i,g||(c=!1),l?(l.style.width!==y&&(l.style.width=y),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=y}}for(;l;){const d=l.nextSibling;l.parentNode.removeChild(l),l=d}c?(r.style.width=`${s}px`,r.style.minWidth=""):(r.style.width="",r.style.minWidth=`${s}px`)}let L_t=class{constructor(t,r){this.node=t,this.cellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),aX(t,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,aX(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type==="attributes"&&(t.target===this.table||this.colgroup.contains(t.target))}};function oX(n,t){return t?n.createChecked(null,t):n.createAndFill()}function F_t(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const t={};return Object.keys(n.nodes).forEach(r=>{const i=n.nodes[r];i.spec.tableRole&&(t[i.spec.tableRole]=i)}),n.cached.tableNodeTypes=t,t}function N_t(n,t,r,i,a){const o=F_t(n),s=[],c=[];for(let u=0;u<r;u+=1){const d=oX(o.cell,a);if(d&&c.push(d),i){const p=oX(o.header_cell,a);p&&s.push(p)}}const l=[];for(let u=0;u<t;u+=1)l.push(o.row.createChecked(null,i&&u===0?s:c));return o.table.createChecked(null,l)}function B_t(n){return n instanceof en}const zw=({editor:n})=>{const{selection:t}=n.state;if(!B_t(t))return!1;let r=0;const i=pJ(t.ranges[0].$from,o=>o.type.name==="table");return i==null||i.node.descendants(o=>{if(o.type.name==="table")return!1;["tableCell","tableHeader"].includes(o.type.name)&&(r+=1)}),r===t.ranges.length?(n.commands.deleteTable(),!0):!1},j_t=ui.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:L_t,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({HTMLAttributes:n}){return["table",Wn(this.options.HTMLAttributes,n),["tbody",0]]},addCommands(){return{insertTable:({rows:n=3,cols:t=3,withHeaderRow:r=!0}={})=>({tr:i,dispatch:a,editor:o})=>{const s=N_t(o.schema,n,t,r);if(a){const c=i.selection.anchor+1;i.replaceSelectionWith(s).scrollIntoView().setSelection($t.near(i.doc.resolve(c)))}return!0},addColumnBefore:()=>({state:n,dispatch:t})=>l_t(n,t),addColumnAfter:()=>({state:n,dispatch:t})=>c_t(n,t),deleteColumn:()=>({state:n,dispatch:t})=>d_t(n,t),addRowBefore:()=>({state:n,dispatch:t})=>f_t(n,t),addRowAfter:()=>({state:n,dispatch:t})=>h_t(n,t),deleteRow:()=>({state:n,dispatch:t})=>g_t(n,t),deleteTable:()=>({state:n,dispatch:t})=>C_t(n,t),mergeCells:()=>({state:n,dispatch:t})=>XJ(n,t),splitCell:()=>({state:n,dispatch:t})=>QJ(n,t),toggleHeaderColumn:()=>({state:n,dispatch:t})=>j1("column")(n,t),toggleHeaderRow:()=>({state:n,dispatch:t})=>j1("row")(n,t),toggleHeaderCell:()=>({state:n,dispatch:t})=>w_t(n,t),mergeOrSplit:()=>({state:n,dispatch:t})=>XJ(n,t)?!0:QJ(n,t),setCellAttribute:(n,t)=>({state:r,dispatch:i})=>b_t(n,t)(r,i),goToNextCell:()=>({state:n,dispatch:t})=>tX(1)(n,t),goToPreviousCell:()=>({state:n,dispatch:t})=>tX(-1)(n,t),fixTables:()=>({state:n,dispatch:t})=>(t&&YJ(n),!0),setCellSelection:n=>({tr:t,dispatch:r})=>{if(r){const i=en.create(t.doc,n.anchorCell,n.headCell);t.setSelection(i)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:zw,"Mod-Backspace":zw,Delete:zw,"Mod-Delete":zw}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[S_t({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],R_t({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(n){const t={name:n.name,options:n.options,storage:n.storage};return{tableRole:Vt(ut(n,"tableRole",t))}}});function ME(n,t,r,i,a,o){let s=0,c=!0,l=t.firstChild;const u=n.firstChild;for(let d=0,p=0;d<u.childCount;d+=1){const{colspan:f,colwidth:h}=u.child(d).attrs;for(let m=0;m<f;m+=1,p+=1){const g=a===p?o:h&&h[m],y=g?`${g}px`:"";s+=g||i,g||(c=!1),l?(l.style.width!==y&&(l.style.width=y),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=y}}for(;l;){const d=l.nextSibling;l.parentNode.removeChild(l),l=d}c?(r.style.width=`${s}px`,r.style.minWidth=""):(r.style.width="",r.style.minWidth=`${s}px`),r.style.setProperty("--borderWidth",n.attrs.borderWidth),r.style.setProperty("--borderColor",n.attrs.borderColor),r.style.setProperty("--cellPadding",n.attrs.cellPadding),r.style.setProperty("--headerBackground",n.attrs.headerBackground)}class Vw{constructor(t,r){this.node=t,this.cellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",Object.keys(this.node.attrs).forEach(i=>{this.dom.dataset[i]=this.node.attrs[i]}),this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ME(t,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,ME(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type==="attributes"&&(t.target===this.table||this.colgroup.contains(t.target))}}const PE=j_t.extend({addAttributes(){return{...this.parent?this.parent():null,borderColor:{default:"#dedee3",parseHTML:n=>n.getAttribute("data-border-color"),renderHTML:n=>({"data-border-color":n.borderColor})},borderWidth:{default:"1px",parseHTML:n=>n.getAttribute("data-border-width"),renderHTML:n=>({"data-border-width":n.borderWidth})},cellPadding:{default:"5px",parseHTML:n=>n.getAttribute("data-cell-padding"),renderHTML:n=>({"data-cell-padding":n.cellPadding})},headerBackground:{default:"#eeeef1",parseHTML:n=>n.getAttribute("data-header-background"),renderHTML:n=>({"data-header-background":n.headerBackground})}}}}),sX=PE.extend({addNodeView(){return({node:n})=>{const t=document.createElement("div");t.className="tableWrapper";const r=t.appendChild(document.createElement("table")),i=r.appendChild(document.createElement("colgroup"));ME(n,i,r);const a=r.appendChild(document.createElement("tbody"));return{dom:t,contentDOM:a}}},addProseMirrorPlugins(){return[]}}),z_t=PE.configure({resizable:!0,View:Vw}),V_t=sX.configure({resizable:!0,View:Vw});PE.configure({resizable:!0,View:Vw}),sX.configure({resizable:!0,View:Vw});function lX({types:n,node:t}){return Array.isArray(n)&&n.includes(t.type)||t.type===n}const U_t=Yr.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:["paragraph","heading"]}},addProseMirrorPlugins(){const n=new Mr(this.name),t=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>this.options.notAfter.includes(r.name));return[new ir({key:n,appendTransaction:(r,i,a)=>{const{doc:o,tr:s,schema:c}=a,l=n.getState(a),u=o.content.size,d=c.nodes[this.options.node];if(l)return s.insert(u,d.create())},state:{init:(r,i)=>{const a=i.tr.doc.lastChild;return!lX({node:a,types:t})},apply:(r,i)=>{if(!r.docChanged)return i;const a=r.doc.lastChild;return!lX({node:a,types:t})}}})]}}),FDt="",cX=async n=>{const t=new FormData;t.append("file",n,n.name);const{data:r}=await rn("/file",t,{timeout:6e4});return r.url},H_t=$J.extend({addAttributes(){return{...this.parent?this.parent():null,typography:{default:null,parseHTML:n=>n.getAttribute("data-typography"),renderHTML:n=>({"data-typography":n.typography})}}},addCommands(){return{setParagraph:(n={})=>({commands:t})=>t.setNode("paragraph",n)}}}),W_t={name:"TextEditor",i18nOptions:{namespaces:"TextEditor",messages:{en:{placeholder:"Type something"},sv:{placeholder:"Skriv något"}}},components:{EditorContent:_yt,BubbleMenu:mbt,EditorFixedMenu:_bt},props:{value:{type:String,default:""},placeholder:{type:String,default:""},editable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},extensions:{type:[Object,String],default:()=>({})},mentions:{type:Function,default:null},snippets:{type:Boolean,default:!1},classList:{type:String,default:""},size:{type:String,default:null},unstyled:{type:Boolean,default:!1},textareaStyle:{type:Boolean,default:!1},filled:{type:Boolean,default:!1},static:{type:Boolean,default:!1}},data(){return{editor:null,isHover:!1}},computed:{enabledExtensions(){const n={bulletList:!0,heading:[1,2,3],bold:!0,link:!0,underline:!0,textAlign:!0,color:!0,table:!0,image:!1,highlight:!1,blockquote:!1,...this.extensions,...typeof this.mentions=="function"&&{mentions:this.mentions},snippets:this.snippets};return this.extensions==="all"&&(n.image=!0,n.highlight=!0,n.blockquote=!0),n}},watch:{value(n){!this.editor||this.editor.getHTML()===n||this.editor.commands.setContent(n,!1)},editable(n){this.setEditable(n)}},created(){window.initalizedEditorTooltips||(this.createGeneralTooltip(),window.initalizedEditorTooltips=!0)},mounted(){this.init(),this.$nextTick(()=>this.createTooltips())},beforeDestroy(){this.editor&&this.editor.destroy(),this.destroyDynamicTooltips()},methods:{init(){const{bulletList:n,blockquote:t,heading:r,image:i,mentions:a,bold:o,highlight:s,italic:c,link:l,underline:u,color:d,textAlign:p,table:f}=this.enabledExtensions,h=[H2t.configure({emptyEditorClass:"is-empty",placeholder:this.placeholder||this.$t("placeholder"),showOnlyWhenEditable:!0}),x2t.configure({blockquote:t,bulletList:n,...r&&{heading:{levels:r}},bold:o,italic:c,strike:!0,code:!0,codeBlock:!0,paragraph:!1}),H_t,U_t];l&&h.push(U2t),d&&h.push(G2t,q2t),s&&h.push(S2t),u&&h.push(T2t),p&&h.push(W2t.configure({types:["paragraph","heading","list_item","todo_item","title"],defaultAlignment:""})),f&&h.push(this.editable?z_t:V_t,Y2t,K2t,Z2t),i&&h.push(Bbt(cX)),a&&h.push(Dbt.call(this,a)),this.editor=new byt({editable:this.editable,content:this.value||"",extensions:h,onFocus:({event:m})=>this.$emit("focus",m),onBlur:({editor:m,event:g})=>{this.$emit("input",m.isEmpty?"":m.getHTML()),this.$emit("blur",g)}})},setContent(n){this.editor.commands.setContent((this.value||"")+n,!0)},setEditable(n){if(typeof n!="boolean")throw Error("Invalid param editable");this.editor&&this.editor.setOptions({editable:n})},focus(){return this.setFocus()},setFocus(){this.editor&&this.editor.isEditable&&this.editor.commands.focus("end")},async onUploadImage({file:n}){const t=n.target.files[0],r=await cX(t);this.editor&&this.editor.chain().focus().setImage({src:r}).run()},createTooltips(){var a;const{el:n,isShadow:t}=F4((a=this.$root)==null?void 0:a.$el),r=t?n:n.body,i=t?this.$el:`.uid-${this._uid}`;this.dynamicTooltips=G7(i,{target:"span[data-tooltip]",appendTo:r,content(o){return`
|
|
2961
|
+
`}],key:a,staticClass:"menu-button",class:{"is-active":i.active&&i.active()},attrs:{"data-texteditor-tooltip":i.tooltip},on:{mousedown:o=>{i.popup?i.onClick():o.preventDefault()},click:i.onClick}},[r("BaseIcon",{attrs:{type:i.icon||"info",size:"22"}}),i.popup&&t.popupOpen?r("div",{staticStyle:{position:"absolute",left:"50%",bottom:"calc(100% + 1em)","background-color":"white",padding:"10px 10px calc(2 * var(--rem)) 10px",transform:"translate(-50%, 0%)",color:"hsl(0, 0%, 35%)",width:"250px","box-shadow":"0 8px 14px rgba(0, 0, 0, 0.2)",border:"1px solid hsl(0, 0%, 88%)","border-radius":"8px",cursor:"default"}},t._l(i.popup(),function(o,s){return r("FormInputRow",{key:s,attrs:{label:o.label,inputs:o.inputs}})}),1):t._e()],1)]}),t.extensions.snippets&&!t.editor.isActive("table")?r("TextTemplates",{attrs:{placement:"top"},on:{open:function(i){t.popupOpen=!0},select:t.setTextToEditor,close:function(i){t.popupOpen=!1}},nativeOn:{mousedown:function(i){i.preventDefault()}}},[r("div",{staticClass:"menu-button",attrs:{"data-texteditor-tooltip":t.$t("_common:insert",{thing:t.$t("_common:snippet")})}},[r("BaseIcon",{attrs:{type:"editorSnippets",size:"22"}})],1)]):t._e(),r("input",{ref:"inputImgUpload",staticStyle:{display:"none"},attrs:{type:"file"},on:{change:i=>{t.$emit("upload-image",{file:i}),t.popupOpen=!1}}})],2):t._e()])],1)},ybt=[],bbt=he(gbt,vbt,ybt,!1,null,"7c55b91c",null,null);const _bt=bbt.exports;function wbt(n){var t;const{char:r,allowSpaces:i,allowedPrefixes:a,startOfLine:o,$position:s}=n,c=gyt(r),l=new RegExp(`\\s${c}$`),u=o?"^":"",d=i?new RegExp(`${u}${c}.*?(?=\\s${c}|$)`,"gm"):new RegExp(`${u}(?:^)?${c}[^\\s${c}]*`,"gm"),p=((t=s.nodeBefore)===null||t===void 0?void 0:t.isText)&&s.nodeBefore.text;if(!p)return null;const f=s.pos-p.length,h=Array.from(p.matchAll(d)).pop();if(!h||h.input===void 0||h.index===void 0)return null;const m=h.input.slice(Math.max(0,h.index-1),h.index),g=new RegExp(`^[${a==null?void 0:a.join("")}\0]?$`).test(m);if(a!==null&&!g)return null;const y=f+h.index;let b=y+h[0].length;return i&&l.test(p.slice(b-1,b+1))&&(h[0]+=" ",b+=1),y<s.pos&&b>=s.pos?{range:{from:y,to:b},query:h[0].slice(r.length),text:h[0]}:null}const xbt=new Mr("suggestion");function FJ({pluginKey:n=xbt,editor:t,char:r="@",allowSpaces:i=!1,allowedPrefixes:a=null,startOfLine:o=!1,decorationTag:s="span",decorationClass:c="suggestion",command:l=()=>null,items:u=()=>[],render:d=()=>({}),allow:p=()=>!0}){let f;const h=d==null?void 0:d(),m=new ir({key:n,view(){return{update:async(g,y)=>{var b,w,S,k,E,T,A;const $=(b=this.key)===null||b===void 0?void 0:b.getState(y),I=(w=this.key)===null||w===void 0?void 0:w.getState(g.state),R=$.active&&I.active&&$.range.from!==I.range.from,Y=!$.active&&I.active,L=$.active&&!I.active,D=!Y&&!L&&$.query!==I.query,B=Y||R,z=D&&!R,K=L||R;if(!B&&!z&&!K)return;const te=K&&!B?$:I,j=g.dom.querySelector(`[data-decoration-id="${te.decorationId}"]`);f={editor:t,range:te.range,query:te.query,text:te.text,items:[],command:M=>{l({editor:t,range:te.range,props:M})},decorationNode:j,clientRect:j?()=>{var M;const{decorationId:q}=(M=this.key)===null||M===void 0?void 0:M.getState(t.state),G=g.dom.querySelector(`[data-decoration-id="${q}"]`);return(G==null?void 0:G.getBoundingClientRect())||null}:null},B&&((S=h==null?void 0:h.onBeforeStart)===null||S===void 0||S.call(h,f)),z&&((k=h==null?void 0:h.onBeforeUpdate)===null||k===void 0||k.call(h,f)),(z||B)&&(f.items=await u({editor:t,query:te.query})),K&&((E=h==null?void 0:h.onExit)===null||E===void 0||E.call(h,f)),z&&((T=h==null?void 0:h.onUpdate)===null||T===void 0||T.call(h,f)),B&&((A=h==null?void 0:h.onStart)===null||A===void 0||A.call(h,f))},destroy:()=>{var g;f&&((g=h==null?void 0:h.onExit)===null||g===void 0||g.call(h,f))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(g,y,b,w){const{isEditable:S}=t,{composing:k}=t.view,{selection:E}=g,{empty:T,from:A}=E,$={...y};if($.composing=k,S&&(T||t.view.composing)){(A<y.range.from||A>y.range.to)&&!k&&!y.composing&&($.active=!1);const I=wbt({char:r,allowSpaces:i,allowedPrefixes:a,startOfLine:o,$position:E.$from}),R=`id_${Math.floor(Math.random()*4294967295)}`;I&&p({editor:t,state:w,range:I.range})?($.active=!0,$.decorationId=y.decorationId?y.decorationId:R,$.range=I.range,$.query=I.query,$.text=I.text):$.active=!1}else $.active=!1;return $.active||($.decorationId=null,$.range={from:0,to:0},$.query=null,$.text=null),$}},props:{handleKeyDown(g,y){var b;const{active:w,range:S}=m.getState(g.state);return w&&((b=h==null?void 0:h.onKeyDown)===null||b===void 0?void 0:b.call(h,{view:g,event:y,range:S}))||!1},decorations(g){const{active:y,range:b,decorationId:w}=m.getState(g);return y?wr.create(g.doc,[Ei.inline(b.from,b.to,{nodeName:s,class:c,"data-decoration-id":w})]):null}}});return m}const Cbt=new Mr("mention"),kbt=ui.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:n,node:t}){var r;return`${n.suggestion.char}${(r=t.attrs.label)!==null&&r!==void 0?r:t.attrs.id}`},suggestion:{char:"@",pluginKey:Cbt,command:({editor:n,range:t,props:r})=>{var i,a;const o=n.view.state.selection.$to.nodeAfter;((i=o==null?void 0:o.text)===null||i===void 0?void 0:i.startsWith(" "))&&(t.to+=1),n.chain().focus().insertContentAt(t,[{type:this.name,attrs:r},{type:"text",text:" "}]).run(),(a=window.getSelection())===null||a===void 0||a.collapseToEnd()},allow:({state:n,range:t})=>{const r=n.doc.resolve(t.from),i=n.schema.nodes[this.name];return!!r.parent.type.contentMatch.matchType(i)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:n=>n.getAttribute("data-id"),renderHTML:n=>n.id?{"data-id":n.id}:{}},label:{default:null,parseHTML:n=>n.getAttribute("data-label"),renderHTML:n=>n.label?{"data-label":n.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:n,HTMLAttributes:t}){return["span",Wn({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:n})]},renderText({node:n}){return this.options.renderLabel({options:this.options,node:n})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:n,state:t})=>{let r=!1;const{selection:i}=t,{empty:a,anchor:o}=i;return a?(t.doc.nodesBetween(o-1,o,(s,c)=>{if(s.type.name===this.name)return r=!0,n.insertText(this.options.suggestion.char||"",c,c+s.nodeSize),!1}),r):!1})}},addProseMirrorPlugins(){return[FJ({editor:this.editor,...this.options.suggestion})]}}),RDt="",Sbt={name:"TextEditorMentionList",i18nOptions:{namespaces:"TextEditorMentionList",messages:{en:{referenceTooltipTitle:"Reference info from..."},sv:{referenceTooltipTitle:"Referera till info från..."}}},props:{items:{type:Array,required:!0},command:{type:Function,required:!0}},data(){return{navigatedIndex:0}},watch:{items(){this.navigatedIndex=0}},methods:{onKeyDown({event:n}){return n.key==="ArrowUp"?(this.upHandler(),!0):n.key==="ArrowDown"?(this.downHandler(),!0):n.key==="Enter"?(this.enterHandler(),!0):!1},upHandler(){this.navigatedIndex=(this.navigatedIndex+this.items.length-1)%this.items.length,this.scrollToHighlightedMention()},downHandler(){this.navigatedIndex=(this.navigatedIndex+1)%this.items.length,this.scrollToHighlightedMention()},scrollToHighlightedMention(){!this.$refs.mention||!this.$refs.mention[this.navigatedIndex]||this.$refs.mention[this.navigatedIndex].scrollIntoView({block:"nearest"})},enterHandler(){const n=this.items[this.navigatedIndex];n&&this.selectItem(n)},selectItem(n){this.command(n)}}};var Tbt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"suggestion-list"},[t.items.length?[r("div",{staticClass:"suggestion-list__title"},[t._v(" "+t._s(t.$t("referenceTooltipTitle"))+" ")]),r("div",{staticStyle:{flex:"1 1 auto",overflow:"auto"}},t._l(t.items,function(i,a){return r("div",{key:i.id+a,ref:"mention",refInFor:!0,staticClass:"suggestion-list__item",class:{"is-selected":t.navigatedIndex===a},on:{mousedown:function(o){o.preventDefault()},click:function(o){return t.selectItem(i)}}},[t._v(" "+t._s(i.label)+" ")])}),0)]:r("div",{staticClass:"suggestion-list__item is-empty"},[t._v(" "+t._s(t.$t("_common:noResults"))+" ")])],2)},Ebt=[],$bt=he(Sbt,Tbt,Ebt,!1,null,"10928a97",null,null);const Abt=$bt.exports,NJ="mention",BJ=(n,t)=>(t||[]).filter(({label:r=""})=>r.toLowerCase().includes(n.toLowerCase()));function Obt(n=null){let t=[];const r=typeof n=="function"?n:()=>[];return{render:()=>{let i,a;return{onStart:o=>{t=r(),o.items=BJ(o.query,t);const{el:s,isShadow:c}=F4(this.$el),l=c?s:s.body;i=new _J(Abt,{parent:this,propsData:o}),a=Dc("body",{getReferenceClientRect:o.clientRect,appendTo:l,content:i.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",plugins:[Nct]})},onUpdate(o){o.items=BJ(o.query,t),i.updateProps(o),a[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown(o){return o.event.key==="Escape"?(a[0].hide(),!0):i.ref.onKeyDown(o)},onExit(){a[0].destroy(),i.destroy()}}}}}function Dbt(n=null){return kbt.extend({addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-mention-id"),renderHTML:t=>({"data-mention-id":t.id})},label:{default:null,parseHTML:t=>t.innerText.split(this.options.suggestion.char).join("")},tooltip:{default:null,parseHTML:t=>t.getAttribute("data-tooltip"),renderHTML:t=>({"data-tooltip":t.tooltip})}}},parseHTML(){return[{tag:"span[data-mention-id]"}]},renderHTML({HTMLAttributes:t}){return["span",{class:[NJ,...t["data-tooltip"]?[]:["empty"]].join(" "),...t,"data-tooltip":t["data-tooltip"]||Be.t("_common:missing",{thing:Be.t("_common:value")})},`${t.label}`]},addProseMirrorPlugins(){const t=typeof n=="function"?n:()=>[];let r=t();return[FJ({editor:this.editor,...this.options.suggestion}),new ir({key:new Mr("mention-paste-handler"),props:{handlePaste(i,a){if(i.props.editable&&!i.props.editable(i.state))return!1;const o=a.clipboardData||a.originalEvent.clipboardData;if(!o)return!1;const s=o.getData("text/plain");if(typeof s!="string"||!s.startsWith("{{")||!s.endsWith("}}"))return!1;const c=s.substring(2,s.length-2);r=t();const l=r.find(h=>h.id===c);if(!l)return!1;const{state:u,dispatch:d}=i,p=u.schema.nodes.mention.create(l),f=u.tr.replaceSelectionWith(p);return d(f),!0}}})]}}).configure({HTMLAttributes:{class:NJ},suggestion:Obt.call(this,n)})}const Mbt=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Pbt=ui.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",Wn(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:t})=>t.insertContent({type:this.name,attrs:n})}},addInputRules(){return[yJ({find:Mbt,type:this.type,getAttributes:n=>{const[,,t,r,i]=n;return{src:r,alt:t,title:i}}})]}}),LDt="",Ibt={name:"TextEditorImageView",components:{NodeViewWrapper:wyt},props:xyt,data(){return{displayOptions:[{value:"left",icon:'<rect x="1" y="5" width="11" height="15" rx="0" ry="2"></rect><line x1="16" y1="7" x2="22" y2="7"></line><line x1="16" y1="12" x2="22" y2="12"></line><line x1="16" y1="17" x2="22" y2="17"></line>',tooltip:this.$t("_common:align",{thing:this.$t("_common:left")})},{value:"block",icon:'<rect x="2" y="7" width="19" height="11" rx="0" ry="2"></rect><line x1="2" y1="3" y2="3" x2="21"></line><line x1="2" y1="22" x2="21" y2="22"></line>',tooltip:this.$t("_common:center",{thing:this.$t("_common:image")}).capitalize()},{value:"right",icon:'<rect x="11" y="5" width="11" height="15" rx="0" ry="2"></rect><line x1="0" y1="7" y2="7" x2="6"></line><line x1="0" y1="12" x2="6" y2="12"></line><line x1="0" y1="17" x2="6" y2="17"></line>',tooltip:this.$t("_common:align",{thing:this.$t("_common:right")})}]}},computed:{isSelected(){return this.selected&&this.editor.isEditable},src(){return Ce(this,"node.attrs.src","")},display(){return Ce(this,"node.attrs.display","block")}},methods:{selectImage(){this.editor.isEditable?this.editor.chain().focus().setNodeSelection(this.getPos()).run():this.openPreview()},remove(){this.deleteNode(this.getPos())},changeDisplay(n){this.updateAttributes({display:n}),this.selectImage()},async openPreview(){var i;const n=()=>Promise.resolve().then(()=>Bmt),{src:t,title:r}=((i=this.node)==null?void 0:i.attrs)||{};this.$modal.show(n,{index:0,list:[{url:t,name:r}]},{adaptive:!0,height:"100%",width:"100%",classes:"",transition:""})}}};var Rbt=function(){var t=this,r=t._self._c;return r("NodeViewWrapper",{staticClass:"texteditor-image-view",class:[{"texteditor-image-view-inline":t.display&&t.display!=="block","outline outline-2 outline-primary-300":t.isSelected},`texteditor-image-view-${t.display}`],attrs:{as:"span",draggable:"true","data-drag-handle":""}},[r("img",{class:{selected:t.isSelected},attrs:{src:t.src},on:{click:t.selectImage}}),t.isSelected?r("div",{staticClass:"bg-gray-800 rounded-md image-menu top-2"},[t._l(t.displayOptions,function(i,a){return r("CButton",{key:a,class:{"!text-primary-300":t.display===i.value},attrs:{"data-texteditor-tooltip":i.tooltip,type:"none",size:"small"},on:{click:function(o){return t.changeDisplay(i.value)}}},[r("svg",{attrs:{viewBox:"0 0 24 24",width:"21",height:"21",stroke:"currentColor","stroke-width":"2",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},domProps:{innerHTML:t._s(i.icon)}})])}),r("div",{staticClass:"bg-gray-500",staticStyle:{width:"1px",height:"1.5em",margin:"0 2px"}}),r("CButton",{attrs:{"data-texteditor-tooltip":t.$t("_common:remove"),type:"none",size:"small"},on:{click:t.remove}},[r("BaseIcon",{attrs:{size:18,type:"trash"}})],1)],2):t._e()])},Lbt=[],Fbt=he(Ibt,Rbt,Lbt,!1,null,"50515611",null,null);const Nbt=Fbt.exports,Bbt=n=>Pbt.extend({addOptions(){return{inline:!0,HTMLAttributes:{}}},addAttributes(){return{...this.parent?this.parent():null,display:{default:"block",parseHTML:t=>t.getAttribute("data-display"),renderHTML:t=>({"data-display":t.display})}}},addNodeView(){return kyt(Nbt)},addProseMirrorPlugins(){return[new ir({key:new Mr("image-handler"),props:{handlePaste(t,r){const{items:i}=r.clipboardData||r.originalEvent.clipboardData;for(const a of i)if(a.type.indexOf("image")===0){r.preventDefault();const{schema:o}=t.state,s=a.getAsFile();if(n)n(s).then(c=>{const l=o.nodes.image.create({src:c}),u=t.state.tr.replaceSelectionWith(l);t.dispatch(u)});else{const c=new FileReader;c.onload=l=>{const u=o.nodes.image.create({src:l.target.result}),d=t.state.tr.replaceSelectionWith(u);t.dispatch(d)},c.readAsDataURL(s)}}return!1},handleDOMEvents:{drop(t,r){if(!(r.dataTransfer&&r.dataTransfer.files&&r.dataTransfer.files.length))return;const a=Array.from(r.dataTransfer.files).filter(c=>/image/i.test(c.type));if(a.length===0)return;r.preventDefault();const{schema:o}=t.state,s=t.posAtCoords({left:r.clientX,top:r.clientY});a.forEach(async c=>{const l=new FileReader;if(n){const u=o.nodes.image.create({src:await n(c)}),d=t.state.tr.insert(s.pos,u);t.dispatch(d)}else l.onload=u=>{const d=o.nodes.image.create({src:u.target.result}),p=t.state.tr.insert(s.pos,d);t.dispatch(p)},l.readAsDataURL(c)})}}}})]}});let kE,SE;if(typeof WeakMap<"u"){let n=new WeakMap;kE=t=>n.get(t),SE=(t,r)=>(n.set(t,r),r)}else{let n=[],t=10,r=0;kE=i=>{for(let a=0;a<n.length;a+=2)if(n[a]==i)return n[a+1]},SE=(i,a)=>(r==t&&(r=0),n[r++]=i,n[r++]=a)}class yh{constructor(t,r,i,a){this.left=t,this.top=r,this.right=i,this.bottom=a}}class gr{constructor(t,r,i,a){this.width=t,this.height=r,this.map=i,this.problems=a}findCell(t){for(let r=0;r<this.map.length;r++){let i=this.map[r];if(i!=t)continue;let a=r%this.width,o=r/this.width|0,s=a+1,c=o+1;for(let l=1;s<this.width&&this.map[r+l]==i;l++)s++;for(let l=1;c<this.height&&this.map[r+this.width*l]==i;l++)c++;return new yh(a,o,s,c)}throw new RangeError("No cell with offset "+t+" found")}colCount(t){for(let r=0;r<this.map.length;r++)if(this.map[r]==t)return r%this.width;throw new RangeError("No cell with offset "+t+" found")}nextCell(t,r,i){let{left:a,right:o,top:s,bottom:c}=this.findCell(t);return r=="horiz"?(i<0?a==0:o==this.width)?null:this.map[s*this.width+(i<0?a-1:o)]:(i<0?s==0:c==this.height)?null:this.map[a+this.width*(i<0?s-1:c)]}rectBetween(t,r){let{left:i,right:a,top:o,bottom:s}=this.findCell(t),{left:c,right:l,top:u,bottom:d}=this.findCell(r);return new yh(Math.min(i,c),Math.min(o,u),Math.max(a,l),Math.max(s,d))}cellsInRect(t){let r=[],i={};for(let a=t.top;a<t.bottom;a++)for(let o=t.left;o<t.right;o++){let s=a*this.width+o,c=this.map[s];i[c]||(i[c]=!0,(o!=t.left||!o||this.map[s-1]!=c)&&(a!=t.top||!a||this.map[s-this.width]!=c)&&r.push(c))}return r}positionAt(t,r,i){for(let a=0,o=0;;a++){let s=o+i.child(a).nodeSize;if(a==t){let c=r+t*this.width,l=(t+1)*this.width;for(;c<l&&this.map[c]<o;)c++;return c==l?s-1:this.map[c]}o=s}}static get(t){return kE(t)||SE(t,jbt(t))}}function jbt(n){if(n.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+n.type.name);let t=zbt(n),r=n.childCount,i=[],a=0,o=null,s=[];for(let u=0,d=t*r;u<d;u++)i[u]=0;for(let u=0,d=0;u<r;u++){let p=n.child(u);d++;for(let m=0;;m++){for(;a<i.length&&i[a]!=0;)a++;if(m==p.childCount)break;let g=p.child(m),{colspan:y,rowspan:b,colwidth:w}=g.attrs;for(let S=0;S<b;S++){if(S+u>=r){(o||(o=[])).push({type:"overlong_rowspan",pos:d,n:b-S});break}let k=a+S*t;for(let E=0;E<y;E++){i[k+E]==0?i[k+E]=d:(o||(o=[])).push({type:"collision",row:u,pos:d,n:y-E});let T=w&&w[E];if(T){let A=(k+E)%t*2,$=s[A];$==null||$!=T&&s[A+1]==1?(s[A]=T,s[A+1]=1):$==T&&s[A+1]++}}}a+=y,d+=g.nodeSize}let f=(u+1)*t,h=0;for(;a<f;)i[a++]==0&&h++;h&&(o||(o=[])).push({type:"missing",row:u,n:h}),d++}let c=new gr(t,r,i,o),l=!1;for(let u=0;!l&&u<s.length;u+=2)s[u]!=null&&s[u+1]<r&&(l=!0);return l&&Vbt(c,s,n),c}function zbt(n){let t=-1,r=!1;for(let i=0;i<n.childCount;i++){let a=n.child(i),o=0;if(r)for(let s=0;s<i;s++){let c=n.child(s);for(let l=0;l<c.childCount;l++){let u=c.child(l);s+u.attrs.rowspan>i&&(o+=u.attrs.colspan)}}for(let s=0;s<a.childCount;s++){let c=a.child(s);o+=c.attrs.colspan,c.attrs.rowspan>1&&(r=!0)}t==-1?t=o:t!=o&&(t=Math.max(t,o))}return t}function Vbt(n,t,r){n.problems||(n.problems=[]);for(let i=0,a={};i<n.map.length;i++){let o=n.map[i];if(a[o])continue;a[o]=!0;let s=r.nodeAt(o),c=null;for(let l=0;l<s.attrs.colspan;l++){let u=(i+l)%n.width,d=t[u*2];d!=null&&(!s.attrs.colwidth||s.attrs.colwidth[l]!=d)&&((c||(c=Ubt(s.attrs)))[l]=d)}c&&n.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:c})}}function Ubt(n){if(n.colwidth)return n.colwidth.slice();let t=[];for(let r=0;r<n.colspan;r++)t.push(0);return t}function Oi(n){let t=n.cached.tableNodeTypes;if(!t){t=n.cached.tableNodeTypes={};for(let r in n.nodes){let i=n.nodes[r],a=i.spec.tableRole;a&&(t[a]=i)}}return t}const Kc=new Mr("selectingCells");function bh(n){for(let t=n.depth-1;t>0;t--)if(n.node(t).type.spec.tableRole=="row")return n.node(0).resolve(n.before(t+1));return null}function Hbt(n){for(let t=n.depth;t>0;t--){const r=n.node(t).type.spec.tableRole;if(r==="cell"||r==="header_cell")return n.node(t)}return null}function No(n){let t=n.selection.$head;for(let r=t.depth;r>0;r--)if(t.node(r).type.spec.tableRole=="row")return!0;return!1}function Lw(n){let t=n.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&t.node.type.spec.tableRole=="cell"?t.$anchor:bh(t.$head)||Wbt(t.$head)}function Wbt(n){for(let t=n.nodeAfter,r=n.pos;t;t=t.firstChild,r++){let i=t.type.spec.tableRole;if(i=="cell"||i=="header_cell")return n.doc.resolve(r)}for(let t=n.nodeBefore,r=n.pos;t;t=t.lastChild,r--){let i=t.type.spec.tableRole;if(i=="cell"||i=="header_cell")return n.doc.resolve(r-t.nodeSize)}}function TE(n){return n.parent.type.spec.tableRole=="row"&&n.nodeAfter}function Gbt(n){return n.node(0).resolve(n.pos+n.nodeAfter.nodeSize)}function EE(n,t){return n.depth==t.depth&&n.pos>=t.start(-1)&&n.pos<=t.end(-1)}function jJ(n,t,r){let i=n.start(-1),o=gr.get(n.node(-1)).nextCell(n.pos-i,t,r);return o==null?null:n.node(0).resolve(i+o)}function Zr(n,t,r){let i={};for(let a in n)i[a]=n[a];return i[t]=r,i}function Ad(n,t,r=1){let i=Zr(n,"colspan",n.colspan-r);return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(t,r),i.colwidth.some(a=>a>0)||(i.colwidth=null)),i}function zJ(n,t,r=1){let i=Zr(n,"colspan",n.colspan+r);if(i.colwidth){i.colwidth=i.colwidth.slice();for(let a=0;a<r;a++)i.colwidth.splice(t,0,0)}return i}function qbt(n,t,r){let i=Oi(t.type.schema).header_cell;for(let a=0;a<n.height;a++)if(t.nodeAt(n.map[r+a*n.width]).type!=i)return!1;return!0}class en extends Et{constructor(t,r=t){let i=t.node(-1),a=gr.get(i),o=t.start(-1),s=a.rectBetween(t.pos-o,r.pos-o),c=t.node(0),l=a.cellsInRect(s).filter(d=>d!=r.pos-o);l.unshift(r.pos-o);let u=l.map(d=>{let p=i.nodeAt(d),f=d+o+1;return new DK(c.resolve(f),c.resolve(f+p.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=r}map(t,r){let i=t.resolve(r.map(this.$anchorCell.pos)),a=t.resolve(r.map(this.$headCell.pos));if(TE(i)&&TE(a)&&EE(i,a)){let o=this.$anchorCell.node(-1)!=i.node(-1);return o&&this.isRowSelection()?en.rowSelection(i,a):o&&this.isColSelection()?en.colSelection(i,a):new en(i,a)}return $t.between(i,a)}content(){let t=this.$anchorCell.node(-1),r=gr.get(t),i=this.$anchorCell.start(-1),a=r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},s=[];for(let l=a.top;l<a.bottom;l++){let u=[];for(let d=l*r.width+a.left,p=a.left;p<a.right;p++,d++){let f=r.map[d];if(!o[f]){o[f]=!0;let h=r.findCell(f),m=t.nodeAt(f),g=a.left-h.left,y=h.right-a.right;if(g>0||y>0){let b=m.attrs;g>0&&(b=Ad(b,0,g)),y>0&&(b=Ad(b,b.colspan-y,y)),h.left<a.left?m=m.type.createAndFill(b):m=m.type.create(b,m.content)}if(h.top<a.top||h.bottom>a.bottom){let b=Zr(m.attrs,"rowspan",Math.min(h.bottom,a.bottom)-Math.max(h.top,a.top));h.top<a.top?m=m.type.createAndFill(b):m=m.type.create(b,m.content)}u.push(m)}}s.push(t.child(l).copy(qe.from(u)))}const c=this.isColSelection()&&this.isRowSelection()?t:s;return new rt(qe.from(c),1,1)}replace(t,r=rt.empty){let i=t.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:c,$to:l}=a[s],u=t.mapping.slice(i);t.replace(u.map(c.pos),u.map(l.pos),s?rt.empty:r)}let o=Et.findFrom(t.doc.resolve(t.mapping.slice(i).map(this.to)),-1);o&&t.setSelection(o)}replaceWith(t,r){this.replace(t,new rt(qe.from(r),0,0))}forEachCell(t){let r=this.$anchorCell.node(-1),i=gr.get(r),a=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-a,this.$headCell.pos-a));for(let s=0;s<o.length;s++)t(r.nodeAt(o[s]),a+o[s])}isColSelection(){let t=this.$anchorCell.index(-1),r=this.$headCell.index(-1);if(Math.min(t,r)>0)return!1;let i=t+this.$anchorCell.nodeAfter.attrs.rowspan,a=r+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(i,a)==this.$headCell.node(-1).childCount}static colSelection(t,r=t){let i=gr.get(t.node(-1)),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(r.pos-a),c=t.node(0);return o.top<=s.top?(o.top>0&&(t=c.resolve(a+i.map[o.left])),s.bottom<i.height&&(r=c.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(r=c.resolve(a+i.map[s.left])),o.bottom<i.height&&(t=c.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new en(t,r)}isRowSelection(){let t=gr.get(this.$anchorCell.node(-1)),r=this.$anchorCell.start(-1),i=t.colCount(this.$anchorCell.pos-r),a=t.colCount(this.$headCell.pos-r);if(Math.min(i,a)>0)return!1;let o=i+this.$anchorCell.nodeAfter.attrs.colspan,s=a+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,s)==t.width}eq(t){return t instanceof en&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,r=t){let i=gr.get(t.node(-1)),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(r.pos-a),c=t.node(0);return o.left<=s.left?(o.left>0&&(t=c.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(r=c.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(r=c.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(t=c.resolve(a+i.map[i.width*(o.top+1)-1]))),new en(t,r)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,r){return new en(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,i=r){return new en(t.resolve(r),t.resolve(i))}getBookmark(){return new $E(this.$anchorCell.pos,this.$headCell.pos)}}en.prototype.visible=!1,Et.jsonID("cell",en);class $E{constructor(t,r){this.anchor=t,this.head=r}map(t){return new $E(t.map(this.anchor),t.map(this.head))}resolve(t){let r=t.resolve(this.anchor),i=t.resolve(this.head);return r.parent.type.spec.tableRole=="row"&&i.parent.type.spec.tableRole=="row"&&r.index()<r.parent.childCount&&i.index()<i.parent.childCount&&EE(r,i)?new en(r,i):Et.near(i,1)}}function Ybt(n){if(!(n.selection instanceof en))return null;let t=[];return n.selection.forEachCell((r,i)=>{t.push(Ei.node(i,i+r.nodeSize,{class:"selectedCell"}))}),wr.create(n.doc,t)}function Kbt({$from:n,$to:t}){if(n.pos==t.pos||n.pos<n.pos-6)return!1;let r=n.pos,i=t.pos,a=n.depth;for(;a>=0&&!(n.after(a+1)<n.end(a));a--,r++);for(let o=t.depth;o>=0&&!(t.before(o+1)>t.start(o));o--,i--);return r==i&&/row|table/.test(n.node(a).type.spec.tableRole)}function Zbt({$from:n,$to:t}){let r,i;for(let a=n.depth;a>0;a--){let o=n.node(a);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=o;break}}for(let a=t.depth;a>0;a--){let o=t.node(a);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){i=o;break}}return r!==i&&t.parentOffset===0}function Jbt(n,t,r){let i=(t||n).selection,a=(t||n).doc,o,s;if(i instanceof kt&&(s=i.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=en.create(a,i.from);else if(s=="row"){let c=a.resolve(i.from+1);o=en.rowSelection(c,c)}else if(!r){let c=gr.get(i.node),l=i.from+1,u=l+c.map[c.width*c.height-1];o=en.create(a,l+1,u)}}else i instanceof $t&&Kbt(i)?o=$t.create(a,i.from):i instanceof $t&&Zbt(i)&&(o=$t.create(a,i.$from.start(),i.$from.end()));return o&&(t||(t=n.tr)).setSelection(o),t}function Xbt(n){if(!n.size)return null;let{content:t,openStart:r,openEnd:i}=n;for(;t.childCount==1&&(r>0&&i>0||t.firstChild.type.spec.tableRole=="table");)r--,i--,t=t.firstChild.content;let a=t.firstChild,o=a.type.spec.tableRole,s=a.type.schema,c=[];if(o=="row")for(let l=0;l<t.childCount;l++){let u=t.child(l).content,d=l?0:Math.max(0,r-1),p=l<t.childCount-1?0:Math.max(0,i-1);(d||p)&&(u=AE(Oi(s).row,new rt(u,d,p)).content),c.push(u)}else if(o=="cell"||o=="header_cell")c.push(r||i?AE(Oi(s).row,new rt(t,r,i)).content:t);else return null;return Qbt(s,c)}function Qbt(n,t){let r=[];for(let a=0;a<t.length;a++){let o=t[a];for(let s=o.childCount-1;s>=0;s--){let{rowspan:c,colspan:l}=o.child(s).attrs;for(let u=a;u<a+c;u++)r[u]=(r[u]||0)+l}}let i=0;for(let a=0;a<r.length;a++)i=Math.max(i,r[a]);for(let a=0;a<r.length;a++)if(a>=t.length&&t.push(qe.empty),r[a]<i){let o=Oi(n).cell.createAndFill(),s=[];for(let c=r[a];c<i;c++)s.push(o);t[a]=t[a].append(qe.from(s))}return{height:t.length,width:i,rows:t}}function AE(n,t){let r=n.createAndFill();return new gT(r).replace(0,r.content.size,t).doc}function e_t({width:n,height:t,rows:r},i,a){if(n!=i){let o=[],s=[];for(let c=0;c<r.length;c++){let l=r[c],u=[];for(let d=o[c]||0,p=0;d<i;p++){let f=l.child(p%l.childCount);d+f.attrs.colspan>i&&(f=f.type.create(Ad(f.attrs,f.attrs.colspan,d+f.attrs.colspan-i),f.content)),u.push(f),d+=f.attrs.colspan;for(let h=1;h<f.attrs.rowspan;h++)o[c+h]=(o[c+h]||0)+f.attrs.colspan}s.push(qe.from(u))}r=s,n=i}if(t!=a){let o=[];for(let s=0,c=0;s<a;s++,c++){let l=[],u=r[c%t];for(let d=0;d<u.childCount;d++){let p=u.child(d);s+p.attrs.rowspan>a&&(p=p.type.create(Zr(p.attrs,"rowspan",Math.max(1,a-p.attrs.rowspan)),p.content)),l.push(p)}o.push(qe.from(l))}r=o,t=a}return{width:n,height:t,rows:r}}function t_t(n,t,r,i,a,o,s){let c=n.doc.type.schema,l=Oi(c),u,d;if(a>t.width)for(let p=0,f=0;p<t.height;p++){let h=r.child(p);f+=h.nodeSize;let m=[],g;h.lastChild==null||h.lastChild.type==l.cell?g=u||(u=l.cell.createAndFill()):g=d||(d=l.header_cell.createAndFill());for(let y=t.width;y<a;y++)m.push(g);n.insert(n.mapping.slice(s).map(f-1+i),m)}if(o>t.height){let p=[];for(let m=0,g=(t.height-1)*t.width;m<Math.max(t.width,a);m++){let y=m>=t.width?!1:r.nodeAt(t.map[g+m]).type==l.header_cell;p.push(y?d||(d=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}let f=l.row.create(null,qe.from(p)),h=[];for(let m=t.height;m<o;m++)h.push(f);n.insert(n.mapping.slice(s).map(i+r.nodeSize-2),h)}return!!(u||d)}function VJ(n,t,r,i,a,o,s,c){if(s==0||s==t.height)return!1;let l=!1;for(let u=a;u<o;u++){let d=s*t.width+u,p=t.map[d];if(t.map[d-t.width]==p){l=!0;let f=r.nodeAt(p),{top:h,left:m}=t.findCell(p);n.setNodeMarkup(n.mapping.slice(c).map(p+i),null,Zr(f.attrs,"rowspan",s-h)),n.insert(n.mapping.slice(c).map(t.positionAt(s,m,r)),f.type.createAndFill(Zr(f.attrs,"rowspan",h+f.attrs.rowspan-s))),u+=f.attrs.colspan-1}}return l}function UJ(n,t,r,i,a,o,s,c){if(s==0||s==t.width)return!1;let l=!1;for(let u=a;u<o;u++){let d=u*t.width+s,p=t.map[d];if(t.map[d-1]==p){l=!0;let f=r.nodeAt(p),h=t.colCount(p),m=n.mapping.slice(c).map(p+i);n.setNodeMarkup(m,null,Ad(f.attrs,s-h,f.attrs.colspan-(s-h))),n.insert(m+f.nodeSize,f.type.createAndFill(Ad(f.attrs,0,s-h))),u+=f.attrs.rowspan-1}}return l}function HJ(n,t,r,i,a){let o=r?n.doc.nodeAt(r-1):n.doc,s=gr.get(o),{top:c,left:l}=i,u=l+a.width,d=c+a.height,p=n.tr,f=0;function h(){o=r?p.doc.nodeAt(r-1):p.doc,s=gr.get(o),f=p.mapping.maps.length}t_t(p,s,o,r,u,d,f)&&h(),VJ(p,s,o,r,l,u,c,f)&&h(),VJ(p,s,o,r,l,u,d,f)&&h(),UJ(p,s,o,r,c,d,l,f)&&h(),UJ(p,s,o,r,c,d,u,f)&&h();for(let m=c;m<d;m++){let g=s.positionAt(m,l,o),y=s.positionAt(m,u,o);p.replace(p.mapping.slice(f).map(g+r),p.mapping.slice(f).map(y+r),new rt(a.rows[m-c],0,0))}h(),p.setSelection(new en(p.doc.resolve(r+s.positionAt(c,l,o)),p.doc.resolve(r+s.positionAt(d-1,u-1,o)))),t(p)}const n_t=KT({ArrowLeft:Nw("horiz",-1),ArrowRight:Nw("horiz",1),ArrowUp:Nw("vert",-1),ArrowDown:Nw("vert",1),"Shift-ArrowLeft":Bw("horiz",-1),"Shift-ArrowRight":Bw("horiz",1),"Shift-ArrowUp":Bw("vert",-1),"Shift-ArrowDown":Bw("vert",1),Backspace:jw,"Mod-Backspace":jw,Delete:jw,"Mod-Delete":jw});function Fw(n,t,r){return r.eq(n.selection)?!1:(t&&t(n.tr.setSelection(r).scrollIntoView()),!0)}function Nw(n,t){return(r,i,a)=>{let o=r.selection;if(o instanceof en)return Fw(r,i,Et.near(o.$headCell,t));if(n!="horiz"&&!o.empty)return!1;let s=WJ(a,n,t);if(s==null)return!1;if(n=="horiz")return Fw(r,i,Et.near(r.doc.resolve(o.head+t),t));{let c=r.doc.resolve(s),l=jJ(c,n,t),u;return l?u=Et.near(l,1):t<0?u=Et.near(r.doc.resolve(c.before(-1)),-1):u=Et.near(r.doc.resolve(c.after(-1)),1),Fw(r,i,u)}}}function Bw(n,t){return(r,i,a)=>{let o=r.selection;if(!(o instanceof en)){let c=WJ(a,n,t);if(c==null)return!1;o=new en(r.doc.resolve(c))}let s=jJ(o.$headCell,n,t);return s?Fw(r,i,new en(o.$anchorCell,s)):!1}}function jw(n,t){let r=n.selection;if(!(r instanceof en))return!1;if(t){let i=n.tr,a=Oi(n.schema).cell.createAndFill().content;r.forEachCell((o,s)=>{o.content.eq(a)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new rt(a,0,0))}),i.docChanged&&t(i)}return!0}function r_t(n,t){let r=n.state.doc,i=bh(r.resolve(t));return i?(n.dispatch(n.state.tr.setSelection(new en(i))),!0):!1}function i_t(n,t,r){if(!No(n.state))return!1;let i=Xbt(r),a=n.state.selection;if(a instanceof en){i||(i={width:1,height:1,rows:[qe.from(AE(Oi(n.state.schema).cell,r))]});let o=a.$anchorCell.node(-1),s=a.$anchorCell.start(-1),c=gr.get(o).rectBetween(a.$anchorCell.pos-s,a.$headCell.pos-s);return i=e_t(i,c.right-c.left,c.bottom-c.top),HJ(n.state,n.dispatch,s,c,i),!0}else if(i){let o=Lw(n.state),s=o.start(-1);return HJ(n.state,n.dispatch,s,gr.get(o.node(-1)).findCell(o.pos-s),i),!0}else return!1}function a_t(n,t){if(t.ctrlKey||t.metaKey)return;let r=GJ(n,t.target),i;if(t.shiftKey&&n.state.selection instanceof en)a(n.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=bh(n.state.selection.$anchor))!=null&&OE(n,t).pos!=i.pos)a(i,t),t.preventDefault();else if(!r)return;function a(c,l){let u=OE(n,l),d=Kc.getState(n.state)==null;if(!u||!EE(c,u))if(d)u=c;else return;let p=new en(c,u);if(d||!n.state.selection.eq(p)){let f=n.state.tr.setSelection(p);d&&f.setMeta(Kc,c.pos),n.dispatch(f)}}function o(){n.root.removeEventListener("mouseup",o),n.root.removeEventListener("dragstart",o),n.root.removeEventListener("mousemove",s),Kc.getState(n.state)!=null&&n.dispatch(n.state.tr.setMeta(Kc,-1))}function s(c){let l=Kc.getState(n.state),u;if(l!=null)u=n.state.doc.resolve(l);else if(GJ(n,c.target)!=r&&(u=OE(n,t),!u))return o();u&&a(u,c)}n.root.addEventListener("mouseup",o),n.root.addEventListener("dragstart",o),n.root.addEventListener("mousemove",s)}function WJ(n,t,r){if(!(n.state.selection instanceof $t))return null;let{$head:i}=n.state.selection;for(let a=i.depth-1;a>=0;a--){let o=i.node(a);if((r<0?i.index(a):i.indexAfter(a))!=(r<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){let c=i.before(a),l=t=="vert"?r>0?"down":"up":r>0?"right":"left";return n.endOfTextblock(l)?c:null}}return null}function GJ(n,t){for(;t&&t!=n.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t}function OE(n,t){let r=n.posAtCoords({left:t.clientX,top:t.clientY});return r&&r?bh(n.state.doc.resolve(r.pos)):null}const o_t=new Mr("fix-tables");function qJ(n,t,r,i){let a=n.childCount,o=t.childCount;e:for(let s=0,c=0;s<o;s++){let l=t.child(s);for(let u=c,d=Math.min(a,s+3);u<d;u++)if(n.child(u)==l){c=u+1,r+=l.nodeSize;continue e}i(l,r),c<a&&n.child(c).sameMarkup(l)?qJ(n.child(c),l,r+1,i):l.nodesBetween(0,l.content.size,i,r+1),r+=l.nodeSize}}function YJ(n,t){let r,i=(a,o)=>{a.type.spec.tableRole=="table"&&(r=s_t(n,a,o,r))};return t?t.doc!=n.doc&&qJ(t.doc,n.doc,0,i):n.doc.descendants(i),r}function s_t(n,t,r,i){let a=gr.get(t);if(!a.problems)return i;i||(i=n.tr);let o=[];for(let l=0;l<a.height;l++)o.push(0);for(let l=0;l<a.problems.length;l++){let u=a.problems[l];if(u.type=="collision"){let d=t.nodeAt(u.pos);for(let p=0;p<d.attrs.rowspan;p++)o[u.row+p]+=u.n;i.setNodeMarkup(i.mapping.map(r+1+u.pos),null,Ad(d.attrs,d.attrs.colspan-u.n,u.n))}else if(u.type=="missing")o[u.row]+=u.n;else if(u.type=="overlong_rowspan"){let d=t.nodeAt(u.pos);i.setNodeMarkup(i.mapping.map(r+1+u.pos),null,Zr(d.attrs,"rowspan",d.attrs.rowspan-u.n))}else if(u.type=="colwidth mismatch"){let d=t.nodeAt(u.pos);i.setNodeMarkup(i.mapping.map(r+1+u.pos),null,Zr(d.attrs,"colwidth",u.colwidth))}}let s,c;for(let l=0;l<o.length;l++)o[l]&&(s==null&&(s=l),c=l);for(let l=0,u=r+1;l<a.height;l++){let d=t.child(l),p=u+d.nodeSize,f=o[l];if(f>0){let h="cell";d.firstChild&&(h=d.firstChild.type.spec.tableRole);let m=[];for(let y=0;y<f;y++)m.push(Oi(n.schema)[h].createAndFill());let g=(l==0||s==l-1)&&c==l?u+1:p-1;i.insert(i.mapping.map(g),m)}u=p}return i.setMeta(o_t,{fixTables:!0})}function As(n){let t=n.selection,r=Lw(n),i=r.node(-1),a=r.start(-1),o=gr.get(i),s;return t instanceof en?s=o.rectBetween(t.$anchorCell.pos-a,t.$headCell.pos-a):s=o.findCell(r.pos-a),s.tableStart=a,s.map=o,s.table=i,s}function KJ(n,{map:t,tableStart:r,table:i},a){let o=a>0?-1:0;qbt(t,i,a+o)&&(o=a==0||a==t.width?null:0);for(let s=0;s<t.height;s++){let c=s*t.width+a;if(a>0&&a<t.width&&t.map[c-1]==t.map[c]){let l=t.map[c],u=i.nodeAt(l);n.setNodeMarkup(n.mapping.map(r+l),null,zJ(u.attrs,a-t.colCount(l))),s+=u.attrs.rowspan-1}else{let l=o==null?Oi(i.type.schema).cell:i.nodeAt(t.map[c+o]).type,u=t.positionAt(s,a,i);n.insert(n.mapping.map(r+u),l.createAndFill())}}return n}function l_t(n,t){if(!No(n))return!1;if(t){let r=As(n);t(KJ(n.tr,r,r.left))}return!0}function c_t(n,t){if(!No(n))return!1;if(t){let r=As(n);t(KJ(n.tr,r,r.right))}return!0}function u_t(n,{map:t,table:r,tableStart:i},a){let o=n.mapping.maps.length;for(let s=0;s<t.height;){let c=s*t.width+a,l=t.map[c],u=r.nodeAt(l);if(a>0&&t.map[c-1]==l||a<t.width-1&&t.map[c+1]==l)n.setNodeMarkup(n.mapping.slice(o).map(i+l),null,Ad(u.attrs,a-t.colCount(l)));else{let d=n.mapping.slice(o).map(i+l);n.delete(d,d+u.nodeSize)}s+=u.attrs.rowspan}}function d_t(n,t){if(!No(n))return!1;if(t){let r=As(n),i=n.tr;if(r.left==0&&r.right==r.map.width)return!1;for(let a=r.right-1;u_t(i,r,a),a!=r.left;a--)r.table=r.tableStart?i.doc.nodeAt(r.tableStart-1):i.doc,r.map=gr.get(r.table);t(i)}return!0}function p_t(n,t,r){let i=Oi(t.type.schema).header_cell;for(let a=0;a<n.width;a++)if(t.nodeAt(n.map[a+r*n.width]).type!=i)return!1;return!0}function ZJ(n,{map:t,tableStart:r,table:i},a){let o=r;for(let l=0;l<a;l++)o+=i.child(l).nodeSize;let s=[],c=a>0?-1:0;p_t(t,i,a+c)&&(c=a==0||a==t.height?null:0);for(let l=0,u=t.width*a;l<t.width;l++,u++)if(a>0&&a<t.height&&t.map[u]==t.map[u-t.width]){let d=t.map[u],p=i.nodeAt(d).attrs;n.setNodeMarkup(r+d,null,Zr(p,"rowspan",p.rowspan+1)),l+=p.colspan-1}else{let d=c==null?Oi(i.type.schema).cell:i.nodeAt(t.map[u+c*t.width]).type;s.push(d.createAndFill())}return n.insert(o,Oi(i.type.schema).row.create(null,s)),n}function f_t(n,t){if(!No(n))return!1;if(t){let r=As(n);t(ZJ(n.tr,r,r.top))}return!0}function h_t(n,t){if(!No(n))return!1;if(t){let r=As(n);t(ZJ(n.tr,r,r.bottom))}return!0}function m_t(n,{map:t,table:r,tableStart:i},a){let o=0;for(let l=0;l<a;l++)o+=r.child(l).nodeSize;let s=o+r.child(a).nodeSize,c=n.mapping.maps.length;n.delete(o+i,s+i);for(let l=0,u=a*t.width;l<t.width;l++,u++){let d=t.map[u];if(a>0&&d==t.map[u-t.width]){let p=r.nodeAt(d).attrs;n.setNodeMarkup(n.mapping.slice(c).map(d+i),null,Zr(p,"rowspan",p.rowspan-1)),l+=p.colspan-1}else if(a<t.width&&d==t.map[u+t.width]){let p=r.nodeAt(d),f=p.type.create(Zr(p.attrs,"rowspan",p.attrs.rowspan-1),p.content),h=t.positionAt(a+1,l,r);n.insert(n.mapping.slice(c).map(i+h),f),l+=p.attrs.colspan-1}}}function g_t(n,t){if(!No(n))return!1;if(t){let r=As(n),i=n.tr;if(r.top==0&&r.bottom==r.map.height)return!1;for(let a=r.bottom-1;m_t(i,r,a),a!=r.top;a--)r.table=r.tableStart?i.doc.nodeAt(r.tableStart-1):i.doc,r.map=gr.get(r.table);t(i)}return!0}function JJ(n){let t=n.content;return t.childCount==1&&t.firstChild.isTextblock&&t.firstChild.childCount==0}function v_t({width:n,height:t,map:r},i){let a=i.top*n+i.left,o=a,s=(i.bottom-1)*n+i.left,c=a+(i.right-i.left-1);for(let l=i.top;l<i.bottom;l++){if(i.left>0&&r[o]==r[o-1]||i.right<n&&r[c]==r[c+1])return!0;o+=n,c+=n}for(let l=i.left;l<i.right;l++){if(i.top>0&&r[a]==r[a-n]||i.bottom<t&&r[s]==r[s+n])return!0;a++,s++}return!1}function XJ(n,t){let r=n.selection;if(!(r instanceof en)||r.$anchorCell.pos==r.$headCell.pos)return!1;let i=As(n),{map:a}=i;if(v_t(a,i))return!1;if(t){let o=n.tr,s={},c=qe.empty,l,u;for(let d=i.top;d<i.bottom;d++)for(let p=i.left;p<i.right;p++){let f=a.map[d*a.width+p],h=i.table.nodeAt(f);if(!s[f])if(s[f]=!0,l==null)l=f,u=h;else{JJ(h)||(c=c.append(h.content));let m=o.mapping.map(f+i.tableStart);o.delete(m,m+h.nodeSize)}}if(o.setNodeMarkup(l+i.tableStart,null,Zr(zJ(u.attrs,u.attrs.colspan,i.right-i.left-u.attrs.colspan),"rowspan",i.bottom-i.top)),c.size){let d=l+1+u.content.size,p=JJ(u)?l+1:d;o.replaceWith(p+i.tableStart,d+i.tableStart,c)}o.setSelection(new en(o.doc.resolve(l+i.tableStart))),t(o)}return!0}function QJ(n,t){const r=Oi(n.schema);return y_t(({node:i})=>r[i.type.spec.tableRole])(n,t)}function y_t(n){return(t,r)=>{let i=t.selection,a,o;if(i instanceof en){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;a=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(a=Hbt(i.$from),!a)return!1;o=bh(i.$from).pos}if(a.attrs.colspan==1&&a.attrs.rowspan==1)return!1;if(r){let s=a.attrs,c=[],l=s.colwidth;s.rowspan>1&&(s=Zr(s,"rowspan",1)),s.colspan>1&&(s=Zr(s,"colspan",1));let u=As(t),d=t.tr;for(let f=0;f<u.right-u.left;f++)c.push(l?Zr(s,"colwidth",l&&l[f]?[l[f]]:null):s);let p;for(let f=u.top;f<u.bottom;f++){let h=u.map.positionAt(f,u.left,u.table);f==u.top&&(h+=a.nodeSize);for(let m=u.left,g=0;m<u.right;m++,g++)m==u.left&&f==u.top||d.insert(p=d.mapping.map(h+u.tableStart,1),n({node:a,row:f,col:m}).createAndFill(c[g]))}d.setNodeMarkup(o,n({node:a,row:u.top,col:u.left}),c[0]),i instanceof en&&d.setSelection(new en(d.doc.resolve(i.$anchorCell.pos),p&&d.doc.resolve(p))),r(d)}return!0}}function b_t(n,t){return function(r,i){if(!No(r))return!1;let a=Lw(r);if(a.nodeAfter.attrs[n]===t)return!1;if(i){let o=r.tr;r.selection instanceof en?r.selection.forEachCell((s,c)=>{s.attrs[n]!==t&&o.setNodeMarkup(c,null,Zr(s.attrs,n,t))}):o.setNodeMarkup(a.pos,null,Zr(a.nodeAfter.attrs,n,t)),i(o)}return!0}}function __t(n){return function(t,r){if(!No(t))return!1;if(r){let i=Oi(t.schema),a=As(t),o=t.tr,s=a.map.cellsInRect(n=="column"?new yh(a.left,0,a.right,a.map.height):n=="row"?new yh(0,a.top,a.map.width,a.bottom):a),c=s.map(l=>a.table.nodeAt(l));for(let l=0;l<s.length;l++)c[l].type==i.header_cell&&o.setNodeMarkup(a.tableStart+s[l],i.cell,c[l].attrs);if(o.steps.length==0)for(let l=0;l<s.length;l++)o.setNodeMarkup(a.tableStart+s[l],i.header_cell,c[l].attrs);r(o)}return!0}}function eX(n,t,r){const i=t.map.cellsInRect({left:0,top:0,right:n=="row"?t.map.width:1,bottom:n=="column"?t.map.height:1});for(let a=0;a<i.length;a++){const o=t.table.nodeAt(i[a]);if(o&&o.type!==r.header_cell)return!1}return!0}function j1(n,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?__t(n):function(r,i){if(!No(r))return!1;if(i){let a=Oi(r.schema),o=As(r),s=r.tr,c=eX("row",o,a),l=eX("column",o,a),d=(n==="column"?c:n==="row"?l:!1)?1:0,p=n=="column"?new yh(0,d,1,o.map.height):n=="row"?new yh(d,0,o.map.width,1):o,f=n=="column"?l?a.cell:a.header_cell:n=="row"?c?a.cell:a.header_cell:a.cell;o.map.cellsInRect(p).forEach(h=>{const m=h+o.tableStart,g=s.doc.nodeAt(m);g&&s.setNodeMarkup(m,f,g.attrs)}),i(s)}return!0}}j1("row",{useDeprecatedLogic:!0}),j1("column",{useDeprecatedLogic:!0});let w_t=j1("cell",{useDeprecatedLogic:!0});function x_t(n,t){if(t<0){let r=n.nodeBefore;if(r)return n.pos-r.nodeSize;for(let i=n.index(-1)-1,a=n.before();i>=0;i--){let o=n.node(-1).child(i);if(o.childCount)return a-1-o.lastChild.nodeSize;a-=o.nodeSize}}else{if(n.index()<n.parent.childCount-1)return n.pos+n.nodeAfter.nodeSize;let r=n.node(-1);for(let i=n.indexAfter(-1),a=n.after();i<r.childCount;i++){let o=r.child(i);if(o.childCount)return a+1;a+=o.nodeSize}}}function tX(n){return function(t,r){if(!No(t))return!1;let i=x_t(Lw(t),n);if(i!=null){if(r){let a=t.doc.resolve(i);r(t.tr.setSelection($t.between(a,Gbt(a))).scrollIntoView())}return!0}}}function C_t(n,t){let r=n.selection.$anchor;for(let i=r.depth;i>0;i--)if(r.node(i).type.spec.tableRole=="table")return t&&t(n.tr.delete(r.before(i),r.after(i)).scrollIntoView()),!0;return!1}let k_t=class{constructor(t,r){this.node=t,this.cellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),DE(t,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,DE(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function DE(n,t,r,i,a,o){let s=0,c=!0,l=t.firstChild,u=n.firstChild;for(let d=0,p=0;d<u.childCount;d++){let{colspan:f,colwidth:h}=u.child(d).attrs;for(let m=0;m<f;m++,p++){let g=a==p?o:h&&h[m],y=g?g+"px":"";s+=g||i,g||(c=!1),l?(l.style.width!=y&&(l.style.width=y),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=y}}for(;l;){let d=l.nextSibling;l.parentNode.removeChild(l),l=d}c?(r.style.width=s+"px",r.style.minWidth=""):(r.style.width="",r.style.minWidth=s+"px")}const to=new Mr("tableColumnResizing");function S_t({handleWidth:n=5,cellMinWidth:t=25,View:r=k_t,lastColumnResizable:i=!0}={}){return new ir({key:to,state:{init(o,s){return this.spec.props.nodeViews[Oi(s.schema).table.name]=(c,l)=>new r(c,t,l),new z1(-1,!1)},apply(o,s){return s.apply(o)}},props:{attributes(o){return to.getState(o).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove(o,s){T_t(o,s,n,t,i)},mouseleave(o){E_t(o)},mousedown(o,s){$_t(o,s,t)}},decorations(o){let s=to.getState(o);if(s.activeHandle>-1)return I_t(o,s.activeHandle)},nodeViews:{}}})}class z1{constructor(t,r){this.activeHandle=t,this.dragging=r}apply(t){let r=this,i=t.getMeta(to);if(i&&i.setHandle!=null)return new z1(i.setHandle,null);if(i&&i.setDragging!==void 0)return new z1(r.activeHandle,i.setDragging);if(r.activeHandle>-1&&t.docChanged){let a=t.mapping.map(r.activeHandle,-1);TE(t.doc.resolve(a))||(a=null),r=new z1(a,r.dragging)}return r}}function T_t(n,t,r,i,a){let o=to.getState(n.state);if(!o.dragging){let s=O_t(t.target),c=-1;if(s){let{left:l,right:u}=s.getBoundingClientRect();t.clientX-l<=r?c=nX(n,t,"left"):u-t.clientX<=r&&(c=nX(n,t,"right"))}if(c!=o.activeHandle){if(!a&&c!==-1){let l=n.state.doc.resolve(c),u=l.node(-1),d=gr.get(u),p=l.start(-1);if(d.colCount(l.pos-p)+l.nodeAfter.attrs.colspan-1==d.width-1)return}iX(n,c)}}}function E_t(n){let t=to.getState(n.state);t.activeHandle>-1&&!t.dragging&&iX(n,-1)}function $_t(n,t,r){let i=to.getState(n.state);if(i.activeHandle==-1||i.dragging)return!1;let a=n.state.doc.nodeAt(i.activeHandle),o=A_t(n,i.activeHandle,a.attrs);n.dispatch(n.state.tr.setMeta(to,{setDragging:{startX:t.clientX,startWidth:o}}));function s(l){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",c);let u=to.getState(n.state);u.dragging&&(D_t(n,u.activeHandle,rX(u.dragging,l,r)),n.dispatch(n.state.tr.setMeta(to,{setDragging:null})))}function c(l){if(!l.which)return s(l);let u=to.getState(n.state),d=rX(u.dragging,l,r);M_t(n,u.activeHandle,d,r)}return window.addEventListener("mouseup",s),window.addEventListener("mousemove",c),t.preventDefault(),!0}function A_t(n,t,{colspan:r,colwidth:i}){let a=i&&i[i.length-1];if(a)return a;let o=n.domAtPos(t),c=o.node.childNodes[o.offset].offsetWidth,l=r;if(i)for(let u=0;u<r;u++)i[u]&&(c-=i[u],l--);return c/l}function O_t(n){for(;n&&n.nodeName!="TD"&&n.nodeName!="TH";)n=n.classList.contains("ProseMirror")?null:n.parentNode;return n}function nX(n,t,r){let i=n.posAtCoords({left:t.clientX,top:t.clientY});if(!i)return-1;let{pos:a}=i,o=bh(n.state.doc.resolve(a));if(!o)return-1;if(r=="right")return o.pos;let s=gr.get(o.node(-1)),c=o.start(-1),l=s.map.indexOf(o.pos-c);return l%s.width==0?-1:c+s.map[l-1]}function rX(n,t,r){let i=t.clientX-n.startX;return Math.max(r,n.startWidth+i)}function iX(n,t){n.dispatch(n.state.tr.setMeta(to,{setHandle:t}))}function D_t(n,t,r){let i=n.state.doc.resolve(t),a=i.node(-1),o=gr.get(a),s=i.start(-1),c=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=n.state.tr;for(let u=0;u<o.height;u++){let d=u*o.width+c;if(u&&o.map[d]==o.map[d-o.width])continue;let p=o.map[d],{attrs:f}=a.nodeAt(p),h=f.colspan==1?0:c-o.colCount(p);if(f.colwidth&&f.colwidth[h]==r)continue;let m=f.colwidth?f.colwidth.slice():P_t(f.colspan);m[h]=r,l.setNodeMarkup(s+p,null,Zr(f,"colwidth",m))}l.docChanged&&n.dispatch(l)}function M_t(n,t,r,i){let a=n.state.doc.resolve(t),o=a.node(-1),s=a.start(-1),c=gr.get(o).colCount(a.pos-s)+a.nodeAfter.attrs.colspan-1,l=n.domAtPos(a.start(-1)).node;for(;l.nodeName!="TABLE";)l=l.parentNode;DE(o,l.firstChild,l,i,c,r)}function P_t(n){let t=[];for(let r=0;r<n;r++)t.push(0);return t}function I_t(n,t){let r=[],i=n.doc.resolve(t),a=i.node(-1),o=gr.get(a),s=i.start(-1),c=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan;for(let l=0;l<o.height;l++){let u=c+l*o.width-1;if((c==o.width||o.map[u]!=o.map[u+1])&&(l==0||o.map[u-1]!=o.map[u-1-o.width])){let d=o.map[u],p=s+d+a.nodeAt(d).nodeSize-1,f=document.createElement("div");f.className="column-resize-handle",r.push(Ei.widget(p,f))}}return wr.create(n.doc,r)}function R_t({allowTableNodeSelection:n=!1}={}){return new ir({key:Kc,state:{init(){return null},apply(t,r){let i=t.getMeta(Kc);if(i!=null)return i==-1?null:i;if(r==null||!t.docChanged)return r;let{deleted:a,pos:o}=t.mapping.mapResult(r);return a?null:o}},props:{decorations:Ybt,handleDOMEvents:{mousedown:a_t},createSelectionBetween(t){if(Kc.getState(t.state)!=null)return t.state.selection},handleTripleClick:r_t,handleKeyDown:n_t,handlePaste:i_t},appendTransaction(t,r,i){return Jbt(i,YJ(i,r),n)}})}function aX(n,t,r,i,a,o){let s=0,c=!0,l=t.firstChild;const u=n.firstChild;for(let d=0,p=0;d<u.childCount;d+=1){const{colspan:f,colwidth:h}=u.child(d).attrs;for(let m=0;m<f;m+=1,p+=1){const g=a===p?o:h&&h[m],y=g?`${g}px`:"";s+=g||i,g||(c=!1),l?(l.style.width!==y&&(l.style.width=y),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=y}}for(;l;){const d=l.nextSibling;l.parentNode.removeChild(l),l=d}c?(r.style.width=`${s}px`,r.style.minWidth=""):(r.style.width="",r.style.minWidth=`${s}px`)}let L_t=class{constructor(t,r){this.node=t,this.cellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),aX(t,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,aX(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type==="attributes"&&(t.target===this.table||this.colgroup.contains(t.target))}};function oX(n,t){return t?n.createChecked(null,t):n.createAndFill()}function F_t(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const t={};return Object.keys(n.nodes).forEach(r=>{const i=n.nodes[r];i.spec.tableRole&&(t[i.spec.tableRole]=i)}),n.cached.tableNodeTypes=t,t}function N_t(n,t,r,i,a){const o=F_t(n),s=[],c=[];for(let u=0;u<r;u+=1){const d=oX(o.cell,a);if(d&&c.push(d),i){const p=oX(o.header_cell,a);p&&s.push(p)}}const l=[];for(let u=0;u<t;u+=1)l.push(o.row.createChecked(null,i&&u===0?s:c));return o.table.createChecked(null,l)}function B_t(n){return n instanceof en}const zw=({editor:n})=>{const{selection:t}=n.state;if(!B_t(t))return!1;let r=0;const i=pJ(t.ranges[0].$from,o=>o.type.name==="table");return i==null||i.node.descendants(o=>{if(o.type.name==="table")return!1;["tableCell","tableHeader"].includes(o.type.name)&&(r+=1)}),r===t.ranges.length?(n.commands.deleteTable(),!0):!1},j_t=ui.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:L_t,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({HTMLAttributes:n}){return["table",Wn(this.options.HTMLAttributes,n),["tbody",0]]},addCommands(){return{insertTable:({rows:n=3,cols:t=3,withHeaderRow:r=!0}={})=>({tr:i,dispatch:a,editor:o})=>{const s=N_t(o.schema,n,t,r);if(a){const c=i.selection.anchor+1;i.replaceSelectionWith(s).scrollIntoView().setSelection($t.near(i.doc.resolve(c)))}return!0},addColumnBefore:()=>({state:n,dispatch:t})=>l_t(n,t),addColumnAfter:()=>({state:n,dispatch:t})=>c_t(n,t),deleteColumn:()=>({state:n,dispatch:t})=>d_t(n,t),addRowBefore:()=>({state:n,dispatch:t})=>f_t(n,t),addRowAfter:()=>({state:n,dispatch:t})=>h_t(n,t),deleteRow:()=>({state:n,dispatch:t})=>g_t(n,t),deleteTable:()=>({state:n,dispatch:t})=>C_t(n,t),mergeCells:()=>({state:n,dispatch:t})=>XJ(n,t),splitCell:()=>({state:n,dispatch:t})=>QJ(n,t),toggleHeaderColumn:()=>({state:n,dispatch:t})=>j1("column")(n,t),toggleHeaderRow:()=>({state:n,dispatch:t})=>j1("row")(n,t),toggleHeaderCell:()=>({state:n,dispatch:t})=>w_t(n,t),mergeOrSplit:()=>({state:n,dispatch:t})=>XJ(n,t)?!0:QJ(n,t),setCellAttribute:(n,t)=>({state:r,dispatch:i})=>b_t(n,t)(r,i),goToNextCell:()=>({state:n,dispatch:t})=>tX(1)(n,t),goToPreviousCell:()=>({state:n,dispatch:t})=>tX(-1)(n,t),fixTables:()=>({state:n,dispatch:t})=>(t&&YJ(n),!0),setCellSelection:n=>({tr:t,dispatch:r})=>{if(r){const i=en.create(t.doc,n.anchorCell,n.headCell);t.setSelection(i)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:zw,"Mod-Backspace":zw,Delete:zw,"Mod-Delete":zw}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[S_t({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],R_t({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(n){const t={name:n.name,options:n.options,storage:n.storage};return{tableRole:Vt(ut(n,"tableRole",t))}}});function ME(n,t,r,i,a,o){let s=0,c=!0,l=t.firstChild;const u=n.firstChild;for(let d=0,p=0;d<u.childCount;d+=1){const{colspan:f,colwidth:h}=u.child(d).attrs;for(let m=0;m<f;m+=1,p+=1){const g=a===p?o:h&&h[m],y=g?`${g}px`:"";s+=g||i,g||(c=!1),l?(l.style.width!==y&&(l.style.width=y),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=y}}for(;l;){const d=l.nextSibling;l.parentNode.removeChild(l),l=d}c?(r.style.width=`${s}px`,r.style.minWidth=""):(r.style.width="",r.style.minWidth=`${s}px`),r.style.setProperty("--borderWidth",n.attrs.borderWidth),r.style.setProperty("--borderColor",n.attrs.borderColor),r.style.setProperty("--cellPadding",n.attrs.cellPadding),r.style.setProperty("--headerBackground",n.attrs.headerBackground)}class Vw{constructor(t,r){this.node=t,this.cellMinWidth=r,this.dom=document.createElement("div"),this.dom.className="tableWrapper",Object.keys(this.node.attrs).forEach(i=>{this.dom.dataset[i]=this.node.attrs[i]}),this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ME(t,this.colgroup,this.table,r),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,ME(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type==="attributes"&&(t.target===this.table||this.colgroup.contains(t.target))}}const PE=j_t.extend({addAttributes(){return{...this.parent?this.parent():null,borderColor:{default:"#dedee3",parseHTML:n=>n.getAttribute("data-border-color"),renderHTML:n=>({"data-border-color":n.borderColor})},borderWidth:{default:"1px",parseHTML:n=>n.getAttribute("data-border-width"),renderHTML:n=>({"data-border-width":n.borderWidth})},cellPadding:{default:"5px",parseHTML:n=>n.getAttribute("data-cell-padding"),renderHTML:n=>({"data-cell-padding":n.cellPadding})},headerBackground:{default:"#eeeef1",parseHTML:n=>n.getAttribute("data-header-background"),renderHTML:n=>({"data-header-background":n.headerBackground})}}}}),sX=PE.extend({addNodeView(){return({node:n})=>{const t=document.createElement("div");t.className="tableWrapper";const r=t.appendChild(document.createElement("table")),i=r.appendChild(document.createElement("colgroup"));ME(n,i,r);const a=r.appendChild(document.createElement("tbody"));return{dom:t,contentDOM:a}}},addProseMirrorPlugins(){return[]}}),z_t=PE.configure({resizable:!0,View:Vw}),V_t=sX.configure({resizable:!0,View:Vw});PE.configure({resizable:!0,View:Vw}),sX.configure({resizable:!0,View:Vw});function lX({types:n,node:t}){return Array.isArray(n)&&n.includes(t.type)||t.type===n}const U_t=Yr.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:["paragraph","heading"]}},addProseMirrorPlugins(){const n=new Mr(this.name),t=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>this.options.notAfter.includes(r.name));return[new ir({key:n,appendTransaction:(r,i,a)=>{const{doc:o,tr:s,schema:c}=a,l=n.getState(a),u=o.content.size,d=c.nodes[this.options.node];if(l)return s.insert(u,d.create())},state:{init:(r,i)=>{var o;const a=i.tr.doc.lastChild;return((o=this.editor)==null?void 0:o.isEditable)&&!lX({node:a,types:t})},apply:(r,i)=>{if(!r.docChanged)return i;const a=r.doc.lastChild;return!lX({node:a,types:t})}}})]}}),FDt="",cX=async n=>{const t=new FormData;t.append("file",n,n.name);const{data:r}=await rn("/file",t,{timeout:6e4});return r.url},H_t=$J.extend({addAttributes(){return{...this.parent?this.parent():null,typography:{default:null,parseHTML:n=>n.getAttribute("data-typography"),renderHTML:n=>({"data-typography":n.typography})}}},addCommands(){return{setParagraph:(n={})=>({commands:t})=>t.setNode("paragraph",n)}}}),W_t={name:"TextEditor",i18nOptions:{namespaces:"TextEditor",messages:{en:{placeholder:"Type something"},sv:{placeholder:"Skriv något"}}},components:{EditorContent:_yt,BubbleMenu:mbt,EditorFixedMenu:_bt},props:{value:{type:String,default:""},placeholder:{type:String,default:""},editable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},extensions:{type:[Object,String],default:()=>({})},mentions:{type:Function,default:null},snippets:{type:Boolean,default:!1},classList:{type:String,default:""},size:{type:String,default:null},unstyled:{type:Boolean,default:!1},textareaStyle:{type:Boolean,default:!1},filled:{type:Boolean,default:!1},static:{type:Boolean,default:!1}},data(){return{editor:null,isHover:!1}},computed:{enabledExtensions(){const n={bulletList:!0,heading:[1,2,3],bold:!0,link:!0,underline:!0,textAlign:!0,color:!0,table:!0,image:!1,highlight:!1,blockquote:!1,...this.extensions,...typeof this.mentions=="function"&&{mentions:this.mentions},snippets:this.snippets};return this.extensions==="all"&&(n.image=!0,n.highlight=!0,n.blockquote=!0),n}},watch:{value(n){!this.editor||this.editor.getHTML()===n||this.editor.commands.setContent(n,!1)},editable(n){this.setEditable(n)}},created(){window.initalizedEditorTooltips||(this.createGeneralTooltip(),window.initalizedEditorTooltips=!0)},mounted(){this.init(),this.$nextTick(()=>this.createTooltips())},beforeDestroy(){this.editor&&this.editor.destroy(),this.destroyDynamicTooltips()},methods:{init(){const{bulletList:n,blockquote:t,heading:r,image:i,mentions:a,bold:o,highlight:s,italic:c,link:l,underline:u,color:d,textAlign:p,table:f}=this.enabledExtensions,h=[H2t.configure({emptyEditorClass:"is-empty",placeholder:this.placeholder||this.$t("placeholder"),showOnlyWhenEditable:!0}),x2t.configure({blockquote:t,bulletList:n,...r&&{heading:{levels:r}},bold:o,italic:c,strike:!0,code:!0,codeBlock:!0,paragraph:!1}),H_t,U_t];l&&h.push(U2t),d&&h.push(G2t,q2t),s&&h.push(S2t),u&&h.push(T2t),p&&h.push(W2t.configure({types:["paragraph","heading","list_item","todo_item","title"],defaultAlignment:""})),f&&h.push(this.editable?z_t:V_t,Y2t,K2t,Z2t),i&&h.push(Bbt(cX)),a&&h.push(Dbt.call(this,a)),this.editor=new byt({editable:this.editable,content:this.value||"",extensions:h,onFocus:({event:m})=>this.$emit("focus",m),onBlur:({editor:m,event:g})=>{this.$emit("input",m.isEmpty?"":m.getHTML()),this.$emit("blur",g)}})},setContent(n){this.editor.commands.setContent((this.value||"")+n,!0)},setEditable(n){if(typeof n!="boolean")throw Error("Invalid param editable");this.editor&&this.editor.setOptions({editable:n})},focus(){return this.setFocus()},setFocus(){this.editor&&this.editor.isEditable&&this.editor.commands.focus("end")},async onUploadImage({file:n}){const t=n.target.files[0],r=await cX(t);this.editor&&this.editor.chain().focus().setImage({src:r}).run()},createTooltips(){var a;const{el:n,isShadow:t}=F4((a=this.$root)==null?void 0:a.$el),r=t?n:n.body,i=t?this.$el:`.uid-${this._uid}`;this.dynamicTooltips=G7(i,{target:"span[data-tooltip]",appendTo:r,content(o){return`
|
|
2962
2962
|
<div class="tooltip">
|
|
2963
2963
|
<div class="tooltip-inner">
|
|
2964
2964
|
${o.getAttribute("data-tooltip")}
|