@cling-se/widget 0.10.3 → 0.10.4
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-a67db64b.js → AddClientCallout-6a8119e5.js} +5 -5
- package/dist/{AnswerModal-f5962911.js → AnswerModal-2312329e.js} +3 -3
- package/dist/{AttachmentItem-42f4c5e4.js → AttachmentItem-0ff6b9f0.js} +3 -3
- package/dist/{BaseDatePicker-e2c90cb7.js → BaseDatePicker-5520110f.js} +2 -2
- package/dist/{BaseInput-54743017.js → BaseInput-b8be1507.js} +1 -1
- package/dist/{BaseUpload-f8a1bdc4.js → BaseUpload-85af01dc.js} +2 -2
- package/dist/{BlockMedia-d11b58cd.js → BlockMedia-ec321a5b.js} +1 -1
- package/dist/{CCallout-effbcd3a.js → CCallout-f2beeada.js} +2 -2
- package/dist/{CDropdownItem-644ff968.js → CDropdownItem-642ee41d.js} +1 -1
- package/dist/{CField-b018f09e.js → CField-f50ea503.js} +1 -1
- package/dist/{CPhoneFormat-0f000579.js → CPhoneFormat-482ae481.js} +1 -1
- package/dist/{CSlider.vue_vue_type_style_index_0_lang-b940169f.js → CSlider.vue_vue_type_style_index_0_lang-9eca5fa6.js} +1 -1
- package/dist/{ClientAutocomplete-2611b91c.js → ClientAutocomplete-7b30c01b.js} +2 -2
- package/dist/{ClientModal-63de0888.js → ClientModal-713c58fc.js} +5 -5
- package/dist/{ColorPicker-a05f9585.js → ColorPicker-6286cc83.js} +1 -1
- package/dist/{CompanyModal-95e54444.js → CompanyModal-69de7c0f.js} +3 -3
- package/dist/{ContentWrapper-bd894ef8.js → ContentWrapper-f6d78bf5.js} +13 -13
- package/dist/{CoverBlockSettings-f8da049e.js → CoverBlockSettings-5d3854e6.js} +7 -7
- package/dist/{DocAnswer-216569bd.js → DocAnswer-b8bc6257.js} +4 -4
- package/dist/{DocDetails-0019b07b.js → DocDetails-9978354c.js} +4 -4
- package/dist/{DocForm-367639d7.js → DocForm-989214c6.js} +37 -28
- package/dist/{DocFormSend-e3987ade.js → DocFormSend-1ee1f68a.js} +17 -17
- package/dist/{DocLinks-4c36d77a.js → DocLinks-34d0490a.js} +2 -2
- package/dist/{DocModalBase-aa6e60c7.js → DocModalBase-fc287bf6.js} +1 -1
- package/dist/{DocPrint-fbc4cc44.js → DocPrint-75bb1150.js} +1 -1
- package/dist/{DocReceipt-58e79748.js → DocReceipt-9e99f057.js} +1 -1
- package/dist/{DocSendReminder-622fcc32.js → DocSendReminder-df2a88ba.js} +1 -1
- package/dist/{DocTextEditor-8116c861.js → DocTextEditor-e2d88db6.js} +8 -8
- package/dist/{DocTimeline-cac1f08d.js → DocTimeline-739bf140.js} +1 -1
- package/dist/{DocumentClient-916e202f.js → DocumentClient-e658c495.js} +7 -7
- package/dist/{DocumentLayout-87a878b2.js → DocumentLayout-0f09e494.js} +4 -4
- package/dist/{DocumentLogotype-0c092083.js → DocumentLogotype-915e6b00.js} +3 -3
- package/dist/{DocumentVoided-37078367.js → DocumentVoided-bffa3146.js} +1 -1
- package/dist/{EmbedInput-55c36399.js → EmbedInput-9b1c63dd.js} +2 -2
- package/dist/{EmbedSettings-84201694.js → EmbedSettings-f2266667.js} +3 -3
- package/dist/{ErrorCallout-1153a103.js → ErrorCallout-3d5c933a.js} +1 -1
- package/dist/{FilePreviewModal-ea0f2b25.js → FilePreviewModal-2f2935c2.js} +5 -5
- package/dist/{Flag-0262c2c8.js → Flag-d9d67716.js} +1 -1
- package/dist/{HeaderSettings-cef632da.js → HeaderSettings-9acb4649.js} +15 -15
- package/dist/{ImageSelectModal-302e8cc8.js → ImageSelectModal-7f85c65c.js} +8 -8
- package/dist/{ImageUploadWrapper-89e29444.js → ImageUploadWrapper-fa9e82ef.js} +2 -2
- package/dist/{Index-c7279324.js → Index-01fd738e.js} +13 -13
- package/dist/{Index-ec05297d.js → Index-0ba87797.js} +7 -7
- package/dist/{Index-c27c9afb.js → Index-191c5e99.js} +3 -3
- package/dist/{Index-02850e02.js → Index-2a4d37de.js} +2 -2
- package/dist/{Index-15fc4f60.js → Index-2b5a8060.js} +4 -4
- package/dist/{Index-b0c75cbc.js → Index-310e5e69.js} +6 -6
- package/dist/{Index-57823314.js → Index-34503c26.js} +2 -2
- package/dist/{Index-c06bc13a.js → Index-3b56c601.js} +2 -2
- package/dist/{Index-0f881cf5.js → Index-3d01fa94.js} +1 -1
- package/dist/{Index-b9be3ffe.js → Index-3d60f6d6.js} +9 -9
- package/dist/{Index-6f8a1594.js → Index-407f4c9f.js} +6 -6
- package/dist/{Index-00621b36.js → Index-4dff7839.js} +4 -4
- package/dist/{Index-174bd7d2.js → Index-55b54780.js} +4 -4
- package/dist/{Index-9b0839f2.js → Index-576e34eb.js} +6 -6
- package/dist/{Index-fc6a2c72.js → Index-599bfb2e.js} +2 -2
- package/dist/{Index-c6c2644c.js → Index-5afe4ec4.js} +4 -4
- package/dist/{Index-902cb556.js → Index-77a69ff2.js} +2 -2
- package/dist/{Index-f952d60d.js → Index-77e66982.js} +14 -14
- package/dist/{Index-0c64f25d.js → Index-783874da.js} +7 -7
- package/dist/{Index-90d0ebea.js → Index-78549bca.js} +5 -5
- package/dist/{Index-9855d4be.js → Index-80a1a768.js} +5 -5
- package/dist/{Index-2e462958.js → Index-8381deea.js} +4 -4
- package/dist/{Index-254e2704.js → Index-a1e82453.js} +2 -2
- package/dist/{Index-43ab376d.js → Index-a203da43.js} +4 -4
- package/dist/{Index-fb618dec.js → Index-ae65644e.js} +9 -9
- package/dist/{Index-59958630.js → Index-aeb05a07.js} +10 -10
- package/dist/{Index-7131dbe6.js → Index-b23da695.js} +2 -2
- package/dist/{Index-d88d28d5.js → Index-b2e299e0.js} +1 -1
- package/dist/{Index-2b6b602c.js → Index-bfcaa5f8.js} +4 -4
- package/dist/{Index-1d50c553.js → Index-c194b7f3.js} +4 -4
- package/dist/{Index-0278e08c.js → Index-d1f8437c.js} +2 -2
- package/dist/{Index-e8cf7d0d.js → Index-debe28e1.js} +8 -8
- package/dist/{Index-9a36b568.js → Index-e0764201.js} +6 -6
- package/dist/{Index-1a6d5867.js → Index-e9ddb919.js} +14 -14
- package/dist/{InputToggleRow-7d5df2f4.js → InputToggleRow-7de5d793.js} +1 -1
- package/dist/{IsPremiumPreStep-a5eb23f3.js → IsPremiumPreStep-e926df6e.js} +2 -2
- package/dist/{ManualPopover-276f53f4.js → ManualPopover-f7b583dc.js} +1 -1
- package/dist/{MediaWrapper-592185a8.js → MediaWrapper-a4be5c39.js} +3 -3
- package/dist/{NotBindingText-e1283e6f.js → NotBindingText-26119634.js} +2 -2
- package/dist/{PackageGroup-346fec74.js → PackageGroup-39136833.js} +12 -12
- package/dist/{PdfTerms-070d191a.js → PdfTerms-629b55fd.js} +5 -5
- package/dist/{PdfViewer-c366d420.js → PdfViewer-16ecf54b.js} +39 -39
- package/dist/{PlainHtml-6c218ab2.js → PlainHtml-833ecc83.js} +1 -1
- package/dist/{PriceHeader-684b12a2.js → PriceHeader-8ef3ce7e.js} +13 -13
- package/dist/{SearchApi-de4b046e.js → SearchApi-f6cb9e83.js} +2 -2
- package/dist/{Setup-b65d4bce.js → Setup-c45a8f01.js} +1 -1
- package/dist/{TermsSettings-7acea3f2.js → TermsSettings-74598cc4.js} +7 -7
- package/dist/{ThemeColorRow-13f31f53.js → ThemeColorRow-78eefc5a.js} +3 -3
- package/dist/{ToggleBinding-4c1959f8.js → ToggleBinding-3a7e5ae4.js} +3 -3
- package/dist/{UploadModal-a0f53ba8.js → UploadModal-90d0c903.js} +3 -3
- package/dist/{VideoPlayerInput-6e57ab1b.js → VideoPlayerInput-3763fb41.js} +3 -3
- package/dist/{VideoPlayerSettings-ef00b9d0.js → VideoPlayerSettings-6c74809b.js} +4 -4
- package/dist/{VideoSelectModal-4fd1ab97.js → VideoSelectModal-c54ee0fb.js} +8 -8
- package/dist/{answerDocumentMixin-b22c219e.js → answerDocumentMixin-64524ea9.js} +3 -3
- package/dist/{debounce-dcf9bd55.js → debounce-d4cedc14.js} +1 -1
- package/dist/{focusDrawerMixin-29f9a0f2.js → focusDrawerMixin-e05de32e.js} +1 -1
- package/dist/{formComponentsInstall-8cd66f50.js → formComponentsInstall-0f942242.js} +12 -12
- package/dist/{formDrawerState-ea7d3145.js → formDrawerState-4fb1a82b.js} +1 -1
- package/dist/{formValidationMixin-6e049e59.js → formValidationMixin-f9e8cdb9.js} +1 -1
- package/dist/{index-7f53a6f9.js → index-22b737a3.js} +1 -1
- package/dist/{index-cbbd5973.js → index-444c264c.js} +5 -5
- package/dist/{index-bd99344b.js → index-593f6d91.js} +9 -9
- package/dist/{index-9cab2d95.js → index-75781c49.js} +1 -1
- package/dist/{index-1f7d0e08.js → index-a99ede42.js} +3 -3
- package/dist/{index-ade1bd00.js → index-e7151425.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/{main-bacd9406.js → main-5f88b483.js} +14 -14
- package/dist/{mapFormMixin-3b4fa1be.js → mapFormMixin-4523f41b.js} +1 -1
- package/dist/{publicSenderState-dfa47123.js → publicSenderState-b52906b6.js} +1 -1
- package/dist/{throttle-bcc6b8c7.js → throttle-6a88764f.js} +2 -2
- package/dist/{tinycolor-8dd5f651.js → tinycolor-1ea4c524.js} +1 -1
- package/dist/{tippy.esm-1b70a907.js → tippy.esm-17027c70.js} +5 -5
- package/dist/{utils-7db98ae7.js → utils-16fc9baf.js} +1 -1
- package/dist/{vuedraggable.umd-d94aa97c.js → vuedraggable.umd-2831ccf8.js} +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -434,7 +434,7 @@ $t(documentTemplateView.smsContent) $t(documentTemplateView.readMore)
|
|
|
434
434
|
* (c) 2017 Evan You
|
|
435
435
|
* @license MIT
|
|
436
436
|
*/function C3(n){return Object.prototype.toString.call(n).indexOf("Error")>-1}var axe={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=oxe(u,h.props&&h.props[l]);if(g){g=s.props=sxe({},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 oxe(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 sxe(n,t){for(var r in t)n[r]=t[r];return n}var lxe=/[!'()*]/g,cxe=function(n){return"%"+n.charCodeAt(0).toString(16)},uxe=/%2C/g,Mp=function(n){return encodeURIComponent(n).replace(lxe,cxe).replace(uxe,",")},nI=decodeURIComponent;function dxe(n,t,r){t===void 0&&(t={});var i=r||pxe,a;try{a=i(n||"")}catch{a={}}for(var o in t)a[o]=t[o];return a}function pxe(n){var t={};return n=n.trim().replace(/^(\?|#|&)/,""),n&&n.split("&").forEach(function(r){var i=r.replace(/\+/g," ").split("="),a=nI(i.shift()),o=i.length>0?nI(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 fxe(n){var t=n?Object.keys(n).map(function(r){var i=n[r];if(i===void 0)return"";if(i===null)return Mp(r);if(Array.isArray(i)){var a=[];return i.forEach(function(o){o!==void 0&&(o===null?a.push(Mp(r)):a.push(Mp(r)+"="+Mp(o)))}),a.join("&")}return Mp(r)+"="+Mp(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=k3(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:rI(t,a),matched:n?hxe(n):[]};return r&&(s.redirectedFrom=rI(r,a)),Object.freeze(s)}function k3(n){if(Array.isArray(n))return n.map(k3);if(n&&typeof n=="object"){var t={};for(var r in n)t[r]=k3(n[r]);return t}else return n}var H0=U0(null,{path:"/"});function hxe(n){for(var t=[];n;)t.unshift(n),n=n.parent;return t}function rI(n,t){var r=n.path,i=n.query;i===void 0&&(i={});var a=n.hash;a===void 0&&(a="");var o=t||fxe;return(r||"/")+o(i)+a}function iI(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 mxe(n,t){return n.path.replace(V0,"/").indexOf(t.path.replace(V0,"/"))===0&&(!t.hash||n.hash===t.hash)&&gxe(n.query,t.query)}function gxe(n,t){for(var r in t)if(!(r in n))return!1;return!0}var vxe=[String,Object],yxe=[String,Array],bxe={name:"router-link",props:{to:{type:vxe,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:yxe,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]=iI(a,y),u[m]=this.exact?u[g]:mxe(a,y);var b=function(E){aI(E)&&(r.replace?i.replace(s):i.push(s))},w={click:aI};Array.isArray(this.event)?this.event.forEach(function(E){w[E]=b}):w[this.event]=b;var S={class:u};if(this.tag==="a")S.on=w,S.attrs={href:l};else{var k=oI(this.$slots.default);if(k){k.isStatic=!1;var $=Um.util.extend,T=k.data=$({},k.data);T.on=w;var A=k.data.attrs=$({},k.data.attrs);A.href=l}else S.on=w}return t(this.tag,S,this.$slots.default)}};function aI(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 oI(n){if(n){for(var t,r=0;r<n.length;r++)if(t=n[r],t.tag==="a"||t.children&&(t=oI(t.children)))return t}}var Um;function S3(n){if(!(S3.installed&&Um===n)){S3.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",axe),n.component("router-link",bxe);var i=n.config.optionMergeStrategies;i.beforeRouteEnter=i.beforeRouteLeave=i.beforeRouteUpdate=i.created}}var Hm=typeof window<"u";function sI(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 _xe(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]"},Pp=dI,wxe=T3,xxe=Txe,Cxe=lI,kxe=uI,Sxe=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function T3(n,t){for(var r=[],i=0,a=0,o="",s=t&&t.delimiter||"/",c;(c=Sxe.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==="*",$=c[2]||s,T=m||g;r.push({name:h||i++,prefix:f||"",delimiter:$,optional:k,repeat:S,partial:w,asterisk:!!b,pattern:T?Axe(T):b?".*":"[^"+q0($)+"]+?"})}return a<n.length&&(o+=n.substr(a)),o&&r.push(o),r}function Txe(n,t){return lI(T3(n,t))}function Exe(n){return encodeURI(n).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function $xe(n){return encodeURI(n).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function lI(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?Exe: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?$xe(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 Axe(n){return n.replace(/([=!:$\/()])/g,"\\$1")}function E3(n,t){return n.keys=t,n}function cI(n){return n.sensitive?"":"i"}function Oxe(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 E3(n,t)}function Dxe(n,t,r){for(var i=[],a=0;a<n.length;a++)i.push(dI(n[a],t,r).source);var o=new RegExp("(?:"+i.join("|")+")",cI(r));return E3(o,t)}function Mxe(n,t,r){return uI(T3(n,r),t,r)}function uI(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+"|$)",E3(new RegExp("^"+o,cI(r)),t)}function dI(n,t,r){return G0(t)||(r=t||r,t=[]),r=r||{},n instanceof RegExp?Oxe(n,t):G0(n)?Dxe(n,t,r):Mxe(n,t,r)}Pp.parse=wxe,Pp.compile=xxe,Pp.tokensToFunction=Cxe,Pp.tokensToRegExp=kxe;var pI=Object.create(null);function Y0(n,t,r){try{var i=pI[n]||(pI[n]=Pp.compile(n));return i(t||{},{pretty:!0})}catch{return""}}function fI(n,t,r,i){var a=t||[],o=r||Object.create(null),s=i||Object.create(null);n.forEach(function(u){$3(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 $3(n,t,r,i,a,o){var s=i.path,c=i.name,l=i.pathToRegexpOptions||{},u=Ixe(s,a,l.strict);typeof i.caseSensitive=="boolean"&&(l.sensitive=i.caseSensitive);var d={path:u,regex:Pxe(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;$3(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};$3(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 Pxe(n,t){var r=Pp(n,[],t);return r}function Ixe(n,t,r){return r||(n=n.replace(/\/$/,"")),n[0]==="/"||t==null?n:$u(t.path+"/"+n)}function hI(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=A3({},a),a._normalized=!0;var o=A3(A3({},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=_xe(a.path||""),l=t&&t.path||"/",u=c.path?sI(c.path,l,r||a.append):l,d=dxe(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 A3(n,t){for(var r in t)n[r]=t[r];return n}function Rxe(n,t){var r=fI(n),i=r.pathList,a=r.pathMap,o=r.nameMap;function s(p){fI(p,i,a,o)}function c(p,f,h){var m=hI(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],$=a[k];if(Lxe($.regex,m.path,m.params))return d($,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 $=Fxe(b,p),T=Y0($,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 Lxe(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 Fxe(n,t){return sI(n,t.parent?t.parent.path:"/",!0)}var mI=Object.create(null);function gI(){window.history.replaceState({key:O3()},""),window.addEventListener("popstate",function(n){vI(),n.state&&n.state.key&&Vxe(n.state.key)})}function Ip(n,t,r,i){if(n.app){var a=n.options.scrollBehavior;a&&n.app.$nextTick(function(){var o=Nxe(),s=a(t,r,i?o:null);s&&(typeof s.then=="function"?s.then(function(c){_I(c,o)}).catch(function(c){}):_I(s,o))})}}function vI(){var n=O3();n&&(mI[n]={x:window.pageXOffset,y:window.pageYOffset})}function Nxe(){var n=O3();if(n)return mI[n]}function Bxe(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 yI(n){return Rp(n.x)||Rp(n.y)}function bI(n){return{x:Rp(n.x)?n.x:window.pageXOffset,y:Rp(n.y)?n.y:window.pageYOffset}}function jxe(n){return{x:Rp(n.x)?n.x:0,y:Rp(n.y)?n.y:0}}function Rp(n){return typeof n=="number"}function _I(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=jxe(a),t=Bxe(i,a)}else yI(n)&&(t=bI(n))}else r&&yI(n)&&(t=bI(n));t&&window.scrollTo(t.x,t.y)}var Lp=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}(),zxe=Hm&&window.performance&&window.performance.now?window.performance:Date,Wm=wI();function wI(){return zxe.now().toFixed(3)}function O3(){return Wm}function Vxe(n){Wm=n}function K0(n,t){vI();var r=window.history;try{t?r.replaceState({key:Wm},"",n):(Wm=wI(),r.pushState({key:Wm},"",n))}catch{window.location[t?"replace":"assign"](n)}}function D3(n){K0(n,!0)}function xI(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 Uxe(n){return function(t,r,i){var a=!1,o=0,s=null;CI(n,function(c,l,u,d){if(typeof c=="function"&&c.cid===void 0){a=!0,o++;var p=SI(function(g){Wxe(g)&&(g=g.default),c.resolved=typeof g=="function"?g:Um.extend(g),u.components[d]=g,o--,o<=0&&i()}),f=SI(function(g){var y="Failed to resolve async component "+d+": "+g;s||(s=C3(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 CI(n,t){return kI(n.map(function(r){return Object.keys(r.components).map(function(i){return t(r.components[i],r.instances[i],r,i)})}))}function kI(n){return Array.prototype.concat.apply([],n)}var Hxe=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Wxe(n){return n.__esModule||Hxe&&n[Symbol.toStringTag]==="Module"}function SI(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=Gxe(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){C3(h)&&(a.errorCbs.length?a.errorCbs.forEach(function(m){m(h)}):console.error(h)),i&&i(h)};if(iI(t,o)&&t.matched.length===o.matched.length)return this.ensureURL(),s();var c=qxe(this.current.matched,t.matched),l=c.updated,u=c.deactivated,d=c.activated,p=[].concat(Kxe(u),this.router.beforeHooks,Zxe(l),d.map(function(h){return h.beforeEnter}),Uxe(d));this.pending=t;var f=function(h,m){if(a.pending!==t)return s();try{h(t,o,function(g){g===!1||C3(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)}};xI(p,f,function(){var h=[],m=function(){return a.current===t},g=Jxe(d,h,m),y=g.concat(a.router.resolveHooks);xI(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 Gxe(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 qxe(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 M3(n,t,r,i){var a=CI(n,function(o,s,c,l){var u=Yxe(o,t);if(u)return Array.isArray(u)?u.map(function(d){return r(d,s,c,l)}):r(u,s,c,l)});return kI(i?a.reverse():a)}function Yxe(n,t){return typeof n!="function"&&(n=Um.extend(n)),n.options[t]}function Kxe(n){return M3(n,"beforeRouteLeave",TI,!0)}function Zxe(n){return M3(n,"beforeRouteUpdate",TI)}function TI(n,t){if(t)return function(){return n.apply(t,arguments)}}function Jxe(n,t,r){return M3(n,"beforeRouteEnter",function(i,a,o,s){return Xxe(i,o,s,t,r)})}function Xxe(n,t,r,i,a){return function(s,c,l){return n(s,c,function(u){l(u),typeof u=="function"&&i.push(function(){EI(u,t.instances,r,a)})})}}function EI(n,t,r,i){t[r]?n(t[r]):i()&&setTimeout(function(){EI(n,t,r,i)},16)}var $I=function(n){function t(r,i){var a=this;n.call(this,r,i);var o=r.options.scrollBehavior;o&&gI();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&&Ip(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)),Ip(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){D3($u(s.base+u.fullPath)),Ip(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):D3(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 AI=function(n){function t(r,i,a){n.call(this,r,i),!(a&&Qxe(this.base))&&OI()}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=Lp&&o;s&&gI(),window.addEventListener(Lp?"popstate":"hashchange",function(){var c=i.current;OI()&&i.transitionTo(Z0(),function(l){s&&Ip(i.router,l,c,!0),Lp||J0(l.fullPath)})})},t.prototype.push=function(i,a,o){var s=this,c=this,l=c.current;this.transitionTo(i,function(u){DI(u.fullPath),Ip(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),Ip(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?DI(a):J0(a))},t.prototype.getCurrentLocation=function(){return Z0()},t}(Us);function Qxe(n){var t=Gm(n);if(!/^\/#/.test(t))return window.location.replace($u(n+"/#"+t)),!0}function OI(){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 P3(n){var t=window.location.href,r=t.indexOf("#"),i=r>=0?t.slice(0,r):t;return i+"#"+n}function DI(n){Lp?K0(P3(n)):window.location.hash=n}function J0(n){Lp?D3(P3(n)):window.location.replace(P3(n))}var e5e=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=Rxe(t.routes||[],this);var r=t.mode||"hash";switch(this.fallback=r==="history"&&!Lp&&t.fallback!==!1,this.fallback&&(r="hash"),Hm||(r="abstract"),this.mode=r,r){case"history":this.history=new $I(this,t.base);break;case"hash":this.history=new AI(this,t.base,this.fallback);break;case"abstract":this.history=new e5e(this,t.base);break}},MI={currentRoute:{configurable:!0}};yr.prototype.match=function(t,r,i){return this.matcher.match(t,r,i)},MI.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 $I)i.transitionTo(i.getCurrentLocation());else if(i instanceof AI){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 I3(this.beforeHooks,t)},yr.prototype.beforeResolve=function(t){return I3(this.resolveHooks,t)},yr.prototype.afterEach=function(t){return I3(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=hI(t,r||this.history.current,i,this),o=this.match(a,r),s=o.redirectedFrom||o.fullPath,c=this.history.base,l=t5e(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,MI);function I3(n,t){return n.push(t),function(){var r=n.indexOf(t);r>-1&&n.splice(r,1)}}function t5e(n,t,r){var i=r==="hash"?"#"+t:t;return n?$u(n+"/"+i):i}yr.install=S3,yr.version="3.0.1",Hm&&window.Vue&&window.Vue.use(yr);const n5e=[{name:"form",path:"/form",component:()=>Promise.resolve().then(()=>qpt),props:!0,meta:{mode:"modal",placement:"center",width:"100vw",height:"100vh"}},{name:"document",path:"/document",component:()=>Promise.resolve().then(()=>PXe),props:!0,meta:{mode:"modal",placement:"center",width:"100vw",height:"100vh",scroll:!0}},{name:"send",path:"/send",component:()=>Promise.resolve().then(()=>Qpt),props:!0,meta:{mode:"drawer",placement:"right",width:620,height:"100%"}},{name:"print",path:"/print",component:()=>Promise.resolve().then(()=>cft),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(()=>Wft),props:!0,meta:{mode:"modal",width:400}},{name:"receipt",path:"/receipt",component:()=>Promise.resolve().then(()=>tht),props:!0,meta:{mode:"modal",width:600}},{name:"clientLinks",path:"/clientLinks",component:()=>Promise.resolve().then(()=>sht),props:!0,meta:{mode:"modal",width:400}},{name:"documentClient",path:"/documentClient",component:()=>Promise.resolve().then(()=>Cht),props:!0,meta:{mode:"modal",placement:"center",width:"100vw",height:"100vh"}},{name:"setup",path:"/setup",component:()=>Promise.resolve().then(()=>Aht),props:!0,meta:{mode:"modal",placement:"center",width:"500px",height:"700px"}},{name:"docAnswer",path:"/docAnswer",component:()=>Promise.resolve().then(()=>Rht),props:!0,meta:{mode:"modal",placement:"center",width:420}},{name:"docDetails",path:"/docDetails",component:()=>Promise.resolve().then(()=>emt),props:!0,meta:{mode:"drawer",placement:"right",width:540,height:"100%"}}];Ne.use(yr);const Hs=new yr({mode:"abstract",routes:n5e}),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 r5e=dp,i5e=zs,a5e="[object Symbol]";function o5e(n){return typeof n=="symbol"||i5e(n)&&r5e(n)==a5e}var X0=o5e,s5e=Zo,l5e=X0,c5e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u5e=/^\w*$/;function d5e(n,t){if(s5e(n))return!1;var r=typeof n;return r=="number"||r=="symbol"||r=="boolean"||n==null||l5e(n)?!0:u5e.test(n)||!c5e.test(n)||t!=null&&n in Object(t)}var R3=d5e,PI=m4,p5e="Expected a function";function L3(n,t){if(typeof n!="function"||t!=null&&typeof t!="function")throw new TypeError(p5e);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(L3.Cache||PI),r}L3.Cache=PI;var f5e=L3,h5e=f5e,m5e=500;function g5e(n){var t=h5e(n,function(i){return r.size===m5e&&r.clear(),i}),r=t.cache;return t}var v5e=g5e,y5e=v5e,b5e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_5e=/\\(\\)?/g,w5e=y5e(function(n){var t=[];return n.charCodeAt(0)===46&&t.push(""),n.replace(b5e,function(r,i,a,o){t.push(a?o.replace(_5e,"$1"):i||r)}),t}),x5e=w5e;function C5e(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 F3=C5e,II=up,k5e=F3,S5e=Zo,T5e=X0,E5e=1/0,RI=II?II.prototype:void 0,LI=RI?RI.toString:void 0;function FI(n){if(typeof n=="string")return n;if(S5e(n))return k5e(n,FI)+"";if(T5e(n))return LI?LI.call(n):"";var t=n+"";return t=="0"&&1/n==-E5e?"-0":t}var $5e=FI,A5e=$5e;function O5e(n){return n==null?"":A5e(n)}var D5e=O5e,M5e=Zo,P5e=R3,I5e=x5e,R5e=D5e;function L5e(n,t){return M5e(n)?n:P5e(n,t)?[n]:I5e(R5e(n))}var Fp=L5e,F5e=X0,N5e=1/0;function B5e(n){if(typeof n=="string"||F5e(n))return n;var t=n+"";return t=="0"&&1/n==-N5e?"-0":t}var Np=B5e,j5e=Fp,z5e=Np;function V5e(n,t){t=j5e(t,n);for(var r=0,i=t.length;n!=null&&r<i;)n=n[z5e(t[r++])];return r&&r==i?n:void 0}var Q0=V5e,U5e=v4,H5e=Fp,W5e=_4,NI=Ko,G5e=Np;function q5e(n,t,r,i){if(!NI(n))return n;t=H5e(t,n);for(var a=-1,o=t.length,s=o-1,c=n;c!=null&&++a<o;){var l=G5e(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=NI(d)?d:W5e(t[a+1])?[]:{})}U5e(c,l,u),c=c[l]}return n}var BI=q5e,Y5e=Q0,K5e=BI,Z5e=Fp;function J5e(n,t,r){for(var i=-1,a=t.length,o={};++i<a;){var s=t[i],c=Y5e(n,s);r(c,s)&&K5e(o,Z5e(s,n),c)}return o}var X5e=J5e;function Q5e(n,t){return n!=null&&t in Object(n)}var e4e=Q5e,t4e=Fp,n4e=y4,r4e=Zo,i4e=_4,a4e=w4,o4e=Np;function s4e(n,t,r){t=t4e(t,n);for(var i=-1,a=t.length,o=!1;++i<a;){var s=o4e(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&&a4e(a)&&i4e(s,a)&&(r4e(n)||n4e(n)))}var l4e=s4e,c4e=e4e,u4e=l4e;function d4e(n,t){return n!=null&&u4e(n,t,c4e)}var jI=d4e,p4e=X5e,f4e=jI;function h4e(n,t){return p4e(n,t,function(r,i){return f4e(n,i)})}var m4e=h4e,zI=up,g4e=y4,v4e=Zo,VI=zI?zI.isConcatSpreadable:void 0;function y4e(n){return v4e(n)||g4e(n)||!!(VI&&n&&n[VI])}var b4e=y4e,_4e=E4,w4e=b4e;function UI(n,t,r,i,a){var o=-1,s=n.length;for(r||(r=w4e),a||(a=[]);++o<s;){var c=n[o];t>0&&r(c)?t>1?UI(c,t-1,r,i,a):_4e(a,c):i||(a[a.length]=c)}return a}var HI=UI,x4e=HI;function C4e(n){var t=n==null?0:n.length;return t?x4e(n,1):[]}var k4e=C4e;function S4e(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 T4e=S4e,E4e=T4e,WI=Math.max;function $4e(n,t,r){return t=WI(t===void 0?n.length-1:t,0),function(){for(var i=arguments,a=-1,o=WI(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),E4e(n,this,c)}}var GI=$4e;function A4e(n){return function(){return n}}var O4e=A4e;function D4e(n){return n}var N3=D4e,M4e=O4e,qI=wD,P4e=N3,I4e=qI?function(n,t){return qI(n,"toString",{configurable:!0,enumerable:!1,value:M4e(t),writable:!0})}:P4e,R4e=I4e,L4e=800,F4e=16,N4e=Date.now;function B4e(n){var t=0,r=0;return function(){var i=N4e(),a=F4e-(i-r);if(r=i,a>0){if(++t>=L4e)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}var j4e=B4e,z4e=R4e,V4e=j4e,U4e=V4e(z4e),YI=U4e,H4e=k4e,W4e=GI,G4e=YI;function q4e(n){return G4e(W4e(n,void 0,H4e),n+"")}var KI=q4e,Y4e=m4e,K4e=KI,Z4e=K4e(function(n,t){return n==null?{}:Y4e(n,t)}),J4e=Z4e;const X4e=cn(J4e);var Q4e=R4,e3e=1,t3e=4;function n3e(n){return Q4e(n,e3e|t3e)}var r3e=n3e;const Ws=cn(r3e);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}
|
|
437
|
-
`))}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 ZI 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 JI 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 XI 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 QI 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 B3 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 eR=Object.freeze(Object.defineProperty({__proto__:null,ForbiddenError:JI,GeneralError:B3,NetworkError:QI,NotFoundError:ZI,ValidationError:XI},Symbol.toStringTag,{value:"Module"})),i3e=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)},tR=n=>{j3.push(n)},a3e=n=>{j3.map(t=>t(n))};function nR(){console.error("User should be logged out!!"),_t.removeItem("token"),_t.removeItem("tokenExpires"),_t.removeItem("refreshToken"),Tr.trigger("user:unauthorized",{error})}let Ym=!1,j3=[];const o3e=(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=_t.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=>{tR(d=>{i.headers["X-TOKEN"]=d,u(i)})})}return i},r=>Promise.reject(r))},s3e=(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=_t.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=>{tR(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);nR()}return Promise.reject(r)})},rR=n=>(v0(n.data),n),l3e=n=>{n.interceptors.response.use(rR,t=>{const{response:r,config:i}=t;if(!r)throw new QI(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 ZI(t);case 401:throw new JI(t);case 412:throw new XI(t);default:throw new B3(t)}})},c3e=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))},u3e=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))},d3e=({baseUrl:n,withCredentials:t,cache:r})=>{const i=gi.create({baseURL:n,timeout:2e4,adapter:r,withCredentials:t,paramsSerializer:p=>i3e(p)});i.defaults.headers["X-CLIENT"]="widget",i.defaults.headers["X-CLIENT-VERSION"]="0.10.3";const a=async(p,f,h=null,m={})=>{const g=f.startsWith("/public/"),y=_t.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=_t.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;_t.setItem("token",h),_t.setItem("tokenExpires",m),g&&_t.setItem("refreshToken",g),Ym=!1,a3e(h),j3=[]}catch(p){return console.error(p),nR()}finally{Ym=!1}};return o3e(i,{renewToken:d}),s3e(i,{renewToken:d}),rR(i),l3e(i),u3e(i),c3e(i),{instance:i,get:o,put:s,post:c,del:l,patch:u,renewToken:d}},z3=new Map;function p3e(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}=z3.get(n)||{};return Date.now()>r+6e4*30||i&&Date.now()>i?(z3.delete(n),null):t}const f3e=async n=>{const{url:t,params:r={}}=n,i=Object.keys(r).map(s=>`${s}=${r[s]}`).join("&"),a=`${t}${i?`?${i}`:""}`;return p3e(a),await gi({...n,adapter:gi.defaults.adapter})},Bp={withCredentials:!0,baseUrl:Xe.api.baseUrl},{get:xt,post:rn,put:Vr,patch:Xo,del:qi,instance:H9t,renewToken:h3e}=d3e({withCredentials:Bp.withCredentials,baseUrl:Bp.baseUrl,cache:f3e});async function iR(n){const t=N1e(n);return xt(`/project${t}`,{saveCache:!0})}const m3e=async(n,t={})=>xt("/project",n,{params:t}),g3e=async(n,t={})=>xt(`/project/${n}`,{params:t,saveCache:!0}),v3e=async(n,t,r={})=>Vr(`/project/${n}`,t,{params:r,invalidateCache:{type:"project",id:n}}),y3e=async n=>Xo(`/project/${n}`),b3e=async(n,t={})=>qi(`/project/${n}`,{params:t,invalidateCache:{type:"project",id:n}}),_3e=async()=>xt("/project/createDemo"),w3e=()=>xt("/"),x3e=async(n,t={})=>rn("/auth/actionlink",{token:n,...t}),C3e=async n=>rn("/register",n),k3e=async(n,t)=>rn("/companyUser/forgottenPassword/new",{password:n,resetPasswordToken:t}),S3e=async n=>rn("/public/consent",n),T3e=async n=>xt(`/projectFile/${n}`),E3e=async n=>rn("/projectFile",n),$3e=async(n,t)=>Vr(`/projectFile/${n}`,t),A3e=async n=>qi(`/projectFile/${n}`),O3e=async n=>Xo(`/projectFile/${n}`),D3e=async(n,t={})=>xt(`/projectNote/${n}`,{params:t}),M3e=async(n,t={})=>rn("/projectNote",n,{params:t}),P3e=async(n,t,r={})=>Vr(`/projectNote/${n}`,t,{params:r}),I3e=async n=>xt(`/file/${n}`),aR=async n=>rn("/file",n),R3e=async(n,t)=>Vr(`/file/${n}`,t),L3e=async n=>qi(`/file/${n}`),F3e=async n=>Xo(`/file/${n}`),N3e=async(n={})=>xt("/article",{params:n}),B3e=async n=>xt(`/article/${n}`),j3e=async n=>rn("/article",n),z3e=async(n,t)=>Vr(`/article/${n}`,t),V3e=async n=>qi(`/article/${n}`),U3e=async n=>Xo(`/article/${n}`),H3e=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}})},W3e=async(n={})=>xt("/templateMessage",{params:n,saveCache:!0}),G3e=async(n,t={})=>xt(`/templateMessage/${n}`,{params:t,saveCache:!0}),q3e=async(n,t={})=>rn("/templateMessage",n,{params:t}),Y3e=async(n,t,r={})=>Vr(`/templateMessage/${n}`,t,{params:r,invalidateCache:{type:"templateMessage",id:n}}),K3e=async(n,t={})=>qi(`/templateMessage/${n}`,{params:t,invalidateCache:{type:"templateMessage",id:n}}),Z3e=async(n,t={})=>Xo(`/templateMessage/${n}`,{params:t}),J3e=async(n={})=>xt("/endCustomer",{params:n}),X3e=async(n,t={})=>xt(`/endCustomer/${n}`,{params:t}),Q3e=async(n,t={})=>rn("/endCustomer",n,{params:t}),eCe=async(n,t,r={})=>Vr(`/endCustomer/${n}`,t,{params:r}),tCe=async(n,t={})=>qi(`/endCustomer/${n}`,{params:t}),nCe=async(n,t={})=>Xo(`/endCustomer/${n}`,{params:t}),rCe=async(n={})=>xt("/companyUser",{params:n,saveCache:!0}),iCe=async(n,t={})=>xt(`/companyUser/${n}`,{params:t,saveCache:!0}),aCe=async(n,t={})=>rn("/companyUser",n,{params:t}),oCe=async(n,t,r={})=>Vr(`/companyUser/${n}`,t,{params:r,invalidateCache:{type:"companyUser",id:n}}),sCe=async(n,t={})=>qi(`/companyUser/${n}`,{params:t,invalidateCache:{type:"companyUser",id:n}}),lCe=async(n,t={})=>Xo(`/companyUser/${n}`,{params:t}),oR={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})},cCe=async(n,t=null,r={})=>Vr(`/companyAccount/accountType/${n}`,t,{params:r}),uCe=async(n={})=>xt("/companyAccount/getNumberOfManagers",{params:n}),dCe=async(n={})=>rn("/companyAccount/addUserLicenseInvoice",{},{params:n}),pCe=async(n,t={})=>xt(`/promotionCode/${n}/canUse`,{params:t}),fCe=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})},hCe=async(n,t)=>rn(`/project/${n}/projectMember/${t}`,null,{invalidateCache:{type:"project",id:n}}),mCe=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={})=>Xo(`/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={})=>Xo(`/template/${n}`,{params:t})},sR={get:async(n={})=>xt("/templateGallery",{params:n})},gCe={get:async(n,t={})=>xt(`/public/templateStat/${n}`,{params:t})},jp={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})},lR={get:async(n,t={})=>xt(`/public/pdfJob/${n}`,{params:t}),addDocument:async(n,t={})=>xt(`/public/document/${n}/pdfJob/start`,{params:t})},cR={getDocuments:async(n={})=>{const t=_t.getItem("clientToken");return gi.get(`${Bp.baseUrl}/client/document`,{headers:{Authorization:t},params:n})},requestMagicLink:async(n,t={})=>gi.post(`${Bp.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})},vCe={get:async(n,t={})=>xt(`${Bp.baseUrl}/public/signature/${n}`,{params:t})},V3={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:Xo,authData:Bp,getProjects:iR};var uR={exports:{}};(function(n,t){(function(r,i){n.exports=i()})(Kt,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($,T){return T===l($)}function l($){var T=typeof $;return T!=="object"?T:$?$ instanceof Error?"error":{}.toString.call($).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function u($){return c($,"function")}function d($){var T=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),A=RegExp("^"+T+"$");return p($)&&A.test($)}function p($){var T=typeof $;return $!=null&&(T=="object"||T=="function")}function f(){var $=k();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(T){var A=($+16*Math.random())%16|0;return $=Math.floor($/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($,T){var A,E;try{A=s.stringify($)}catch(I){if(T&&u(T))try{A=T($)}catch(R){E=R}else E=I}return{error:E,value:A}}function g($,T){return function(A,E){try{T(A,E)}catch(I){$.error(I)}}}function y($){return function T(A,E){var I,R,Y,L={};try{for(R in A)(I=A[R])&&(c(I,"object")||c(I,"array"))?E.includes(I)?L[R]="Removed circular reference: "+l(I):((Y=E.slice()).push(I),L[R]=T(I,Y)):L[R]=I}catch(D){L="Failed cloning custom data: "+D.message}return L}($,[$])}var b=["log","network","dom","navigation","error","manual"],w=["critical","error","warning","info","debug"];function S($,T){for(var A=0;A<$.length;++A)if($[A]===T)return!0;return!1}function k(){return Date.now?+Date.now():+new Date}r.exports={addParamsAndAccessTokenToPath:function($,T,A){(A=A||{}).access_token=$;var E,I=[];for(E in A)Object.prototype.hasOwnProperty.call(A,E)&&I.push([E,A[E]].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($,T,A,E,I){for(var R,Y,L,D,B,z,K=[],te=[],j=0,M=$.length;j<M;++j){var q=l(z=$[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(E&&q==="object"&&!B){for(var G=0,ee=E.length;G<ee;++G)if(z[E[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),E&&B&&(ae.request=B),I&&(ae.lambdaContext=I),ae._originalArgs=$,ae.diagnostic.original_arg_types=te,ae},addErrorContext:function($,T){var A=$.data.custom||{},E=!1;try{for(var I=0;I<T.length;++I)T[I].hasOwnProperty("rollbarContext")&&(A=o(A,y(T[I].rollbarContext)),E=!0);E&&($.data.custom=A)}catch(R){$.diagnostic.error_context="Failed: "+R.message}},createTelemetryEvent:function($){for(var T,A,E,I,R=0,Y=$.length;R<Y;++R)switch(l(I=$[R])){case"string":!T&&S(b,I)?T=I:!E&&S(w,I)&&(E=I);break;case"object":A=I}return{type:T||"manual",metadata:A||{},level:E}},filterIp:function($,T){if($&&$.user_ip&&T!==!0){var A=$.user_ip;if(T)try{var E;if(A.indexOf(".")!==-1)(E=A.split(".")).pop(),E.push("0"),A=E.join(".");else if(A.indexOf(":")!==-1){if((E=A.split(":")).length>2){var I=E.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;$.user_ip=A}},formatArgsAsString:function($){var T,A,E,I=[];for(T=0,A=$.length;T<A;++T){switch(l(E=$[T])){case"object":(E=(E=m(E)).error||E.value).length>500&&(E=E.substr(0,497)+"...");break;case"null":E="null";break;case"undefined":E="undefined";break;case"symbol":E=E.toString()}I.push(E)}return I.join(" ")},formatUrl:function($,T){if(!(T=T||$.protocol)&&$.port&&($.port===80?T="http:":$.port===443&&(T="https:")),T=T||"https:",!$.hostname)return null;var A=T+"//"+$.hostname;return $.port&&(A=A+":"+$.port),$.path&&(A+=$.path),A},get:function($,T){if($){var A=T.split("."),E=$;try{for(var I=0,R=A.length;I<R;++I)E=E[A[I]]}catch{E=void 0}return E}},handleOptions:function($,T,A,E){var I=o($,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,E),!T||T.overwriteScrubFields||T.scrubFields&&(I.scrubFields=($.scrubFields||[]).concat(T.scrubFields)),I},isError:function($){return c($,"error")||c($,"exception")},isFiniteNumber:function($){return Number.isFinite($)},isFunction:u,isIterable:function($){var T=l($);return T==="object"||T==="array"},isNativeFunction:d,isObject:p,isString:function($){return typeof $=="string"||$ instanceof String},isType:c,isPromise:function($){return p($)&&c($.then,"function")},jsonParse:function($){var T,A;try{T=s.parse($)}catch(E){A=E}return{error:A,value:T}},LEVELS:{debug:0,info:1,warning:2,error:3,critical:4},makeUnhandledStackInfo:function($,T,A,E,I,R,Y,L){var D={url:T||"",line:A,column:E};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):$||Y,url:B,stack:[D],useragent:z}},merge:o,now:k,redact:function(){return"********"},RollbarJSON:s,sanitizeUrl:function($){var T=function(A){if(c(A,"string")){for(var E=h,I=E.parser[E.strictMode?"strict":"loose"].exec(A),R={},Y=0,L=E.key.length;Y<L;++Y)R[E.key[Y]]=I[Y]||"";return R[E.q.name]={},R[E.key[12]].replace(E.q.parser,function(D,B,z){B&&(R[E.q.name][B]=z)}),R}}($);return T?(T.anchor===""&&(T.source=T.source.replace("#","")),$=T.source.replace("?"+T.query,"")):"(unknown)"},set:function($,T,A){if($){var E=T.split("."),I=E.length;if(!(I<1))if(I!==1)try{for(var R=$[E[0]]||{},Y=R,L=1;L<I-1;++L)R[E[L]]=R[E[L]]||{},R=R[E[L]];R[E[I-1]]=A,$[E[0]]=Y}catch{return}else $[E[0]]=A}},setupJSON:function($){u(s.stringify)&&u(s.parse)||(c(JSON,"undefined")||($?(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)||$&&$(s))},stringify:m,maxByteSize:function($){for(var T=0,A=$.length,E=0;E<A;E++){var I=$.charCodeAt(E);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,$){var T;for(T=0;T<f.length;++T)if(f[T].test(k)){$=o.redact();break}return $}(y,b);return S===b?o.isType(b,"object")||o.isType(b,"array")?s(b,g,w):function(k){var $;if(o.isType(k,"string"))for($=0;$<h.length;++$)k=k.replace(h[$],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(E,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=$(),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 $(){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=$();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),E={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,$){var T,A=w.environment||w.payload&&w.payload.environment;T=$?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var E={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"?(E.platform="browser",E.framework="browser-js",E.notifier.name="rollbar-browser-js"):b==="server"?(E.framework=w.framework||"node-js",E.notifier.name=w.notifier.name):b==="react-native"&&(E.framework=w.framework||"react-native",E.notifier.name=w.notifier.name),E}(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")}],$=k.length;for(S=0;S<$;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(($=g)&&$.status&&$.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 $};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,$,T,A,E,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)$={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&&($.url=k.url),$.method&&$.method.endsWith&&$.method.endsWith("_rollbar_wrapped")||(T=A=E=null,(I=k.context?k.context.length:0)&&(Y=Math.floor(I/2),A=k.context.slice(0,Y),T=k.context[Y],E=k.context.slice(Y)),T&&($.code=T),(A||E)&&($.context={},A&&A.length&&($.context.pre=A),E&&E.length&&($.context.post=E)),k.args&&($.args=k.args),S.frames.push($));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,$=0;$<k;$++){var T=d(g,w[$],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),$=p(S,k[0],y),T=k[1];g.message=$+": "+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
|
+
`))}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 ZI 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 JI 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 XI 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 QI 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 B3 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 eR=Object.freeze(Object.defineProperty({__proto__:null,ForbiddenError:JI,GeneralError:B3,NetworkError:QI,NotFoundError:ZI,ValidationError:XI},Symbol.toStringTag,{value:"Module"})),i3e=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)},tR=n=>{j3.push(n)},a3e=n=>{j3.map(t=>t(n))};function nR(){console.error("User should be logged out!!"),_t.removeItem("token"),_t.removeItem("tokenExpires"),_t.removeItem("refreshToken"),Tr.trigger("user:unauthorized",{error})}let Ym=!1,j3=[];const o3e=(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=_t.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=>{tR(d=>{i.headers["X-TOKEN"]=d,u(i)})})}return i},r=>Promise.reject(r))},s3e=(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=_t.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=>{tR(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);nR()}return Promise.reject(r)})},rR=n=>(v0(n.data),n),l3e=n=>{n.interceptors.response.use(rR,t=>{const{response:r,config:i}=t;if(!r)throw new QI(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 ZI(t);case 401:throw new JI(t);case 412:throw new XI(t);default:throw new B3(t)}})},c3e=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))},u3e=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))},d3e=({baseUrl:n,withCredentials:t,cache:r})=>{const i=gi.create({baseURL:n,timeout:2e4,adapter:r,withCredentials:t,paramsSerializer:p=>i3e(p)});i.defaults.headers["X-CLIENT"]="widget",i.defaults.headers["X-CLIENT-VERSION"]="0.10.4";const a=async(p,f,h=null,m={})=>{const g=f.startsWith("/public/"),y=_t.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=_t.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;_t.setItem("token",h),_t.setItem("tokenExpires",m),g&&_t.setItem("refreshToken",g),Ym=!1,a3e(h),j3=[]}catch(p){return console.error(p),nR()}finally{Ym=!1}};return o3e(i,{renewToken:d}),s3e(i,{renewToken:d}),rR(i),l3e(i),u3e(i),c3e(i),{instance:i,get:o,put:s,post:c,del:l,patch:u,renewToken:d}},z3=new Map;function p3e(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}=z3.get(n)||{};return Date.now()>r+6e4*30||i&&Date.now()>i?(z3.delete(n),null):t}const f3e=async n=>{const{url:t,params:r={}}=n,i=Object.keys(r).map(s=>`${s}=${r[s]}`).join("&"),a=`${t}${i?`?${i}`:""}`;return p3e(a),await gi({...n,adapter:gi.defaults.adapter})},Bp={withCredentials:!0,baseUrl:Xe.api.baseUrl},{get:xt,post:rn,put:Vr,patch:Xo,del:qi,instance:H9t,renewToken:h3e}=d3e({withCredentials:Bp.withCredentials,baseUrl:Bp.baseUrl,cache:f3e});async function iR(n){const t=N1e(n);return xt(`/project${t}`,{saveCache:!0})}const m3e=async(n,t={})=>xt("/project",n,{params:t}),g3e=async(n,t={})=>xt(`/project/${n}`,{params:t,saveCache:!0}),v3e=async(n,t,r={})=>Vr(`/project/${n}`,t,{params:r,invalidateCache:{type:"project",id:n}}),y3e=async n=>Xo(`/project/${n}`),b3e=async(n,t={})=>qi(`/project/${n}`,{params:t,invalidateCache:{type:"project",id:n}}),_3e=async()=>xt("/project/createDemo"),w3e=()=>xt("/"),x3e=async(n,t={})=>rn("/auth/actionlink",{token:n,...t}),C3e=async n=>rn("/register",n),k3e=async(n,t)=>rn("/companyUser/forgottenPassword/new",{password:n,resetPasswordToken:t}),S3e=async n=>rn("/public/consent",n),T3e=async n=>xt(`/projectFile/${n}`),E3e=async n=>rn("/projectFile",n),$3e=async(n,t)=>Vr(`/projectFile/${n}`,t),A3e=async n=>qi(`/projectFile/${n}`),O3e=async n=>Xo(`/projectFile/${n}`),D3e=async(n,t={})=>xt(`/projectNote/${n}`,{params:t}),M3e=async(n,t={})=>rn("/projectNote",n,{params:t}),P3e=async(n,t,r={})=>Vr(`/projectNote/${n}`,t,{params:r}),I3e=async n=>xt(`/file/${n}`),aR=async n=>rn("/file",n),R3e=async(n,t)=>Vr(`/file/${n}`,t),L3e=async n=>qi(`/file/${n}`),F3e=async n=>Xo(`/file/${n}`),N3e=async(n={})=>xt("/article",{params:n}),B3e=async n=>xt(`/article/${n}`),j3e=async n=>rn("/article",n),z3e=async(n,t)=>Vr(`/article/${n}`,t),V3e=async n=>qi(`/article/${n}`),U3e=async n=>Xo(`/article/${n}`),H3e=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}})},W3e=async(n={})=>xt("/templateMessage",{params:n,saveCache:!0}),G3e=async(n,t={})=>xt(`/templateMessage/${n}`,{params:t,saveCache:!0}),q3e=async(n,t={})=>rn("/templateMessage",n,{params:t}),Y3e=async(n,t,r={})=>Vr(`/templateMessage/${n}`,t,{params:r,invalidateCache:{type:"templateMessage",id:n}}),K3e=async(n,t={})=>qi(`/templateMessage/${n}`,{params:t,invalidateCache:{type:"templateMessage",id:n}}),Z3e=async(n,t={})=>Xo(`/templateMessage/${n}`,{params:t}),J3e=async(n={})=>xt("/endCustomer",{params:n}),X3e=async(n,t={})=>xt(`/endCustomer/${n}`,{params:t}),Q3e=async(n,t={})=>rn("/endCustomer",n,{params:t}),eCe=async(n,t,r={})=>Vr(`/endCustomer/${n}`,t,{params:r}),tCe=async(n,t={})=>qi(`/endCustomer/${n}`,{params:t}),nCe=async(n,t={})=>Xo(`/endCustomer/${n}`,{params:t}),rCe=async(n={})=>xt("/companyUser",{params:n,saveCache:!0}),iCe=async(n,t={})=>xt(`/companyUser/${n}`,{params:t,saveCache:!0}),aCe=async(n,t={})=>rn("/companyUser",n,{params:t}),oCe=async(n,t,r={})=>Vr(`/companyUser/${n}`,t,{params:r,invalidateCache:{type:"companyUser",id:n}}),sCe=async(n,t={})=>qi(`/companyUser/${n}`,{params:t,invalidateCache:{type:"companyUser",id:n}}),lCe=async(n,t={})=>Xo(`/companyUser/${n}`,{params:t}),oR={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})},cCe=async(n,t=null,r={})=>Vr(`/companyAccount/accountType/${n}`,t,{params:r}),uCe=async(n={})=>xt("/companyAccount/getNumberOfManagers",{params:n}),dCe=async(n={})=>rn("/companyAccount/addUserLicenseInvoice",{},{params:n}),pCe=async(n,t={})=>xt(`/promotionCode/${n}/canUse`,{params:t}),fCe=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})},hCe=async(n,t)=>rn(`/project/${n}/projectMember/${t}`,null,{invalidateCache:{type:"project",id:n}}),mCe=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={})=>Xo(`/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={})=>Xo(`/template/${n}`,{params:t})},sR={get:async(n={})=>xt("/templateGallery",{params:n})},gCe={get:async(n,t={})=>xt(`/public/templateStat/${n}`,{params:t})},jp={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})},lR={get:async(n,t={})=>xt(`/public/pdfJob/${n}`,{params:t}),addDocument:async(n,t={})=>xt(`/public/document/${n}/pdfJob/start`,{params:t})},cR={getDocuments:async(n={})=>{const t=_t.getItem("clientToken");return gi.get(`${Bp.baseUrl}/client/document`,{headers:{Authorization:t},params:n})},requestMagicLink:async(n,t={})=>gi.post(`${Bp.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})},vCe={get:async(n,t={})=>xt(`${Bp.baseUrl}/public/signature/${n}`,{params:t})},V3={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:Xo,authData:Bp,getProjects:iR};var uR={exports:{}};(function(n,t){(function(r,i){n.exports=i()})(Kt,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($,T){return T===l($)}function l($){var T=typeof $;return T!=="object"?T:$?$ instanceof Error?"error":{}.toString.call($).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function u($){return c($,"function")}function d($){var T=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),A=RegExp("^"+T+"$");return p($)&&A.test($)}function p($){var T=typeof $;return $!=null&&(T=="object"||T=="function")}function f(){var $=k();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(T){var A=($+16*Math.random())%16|0;return $=Math.floor($/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($,T){var A,E;try{A=s.stringify($)}catch(I){if(T&&u(T))try{A=T($)}catch(R){E=R}else E=I}return{error:E,value:A}}function g($,T){return function(A,E){try{T(A,E)}catch(I){$.error(I)}}}function y($){return function T(A,E){var I,R,Y,L={};try{for(R in A)(I=A[R])&&(c(I,"object")||c(I,"array"))?E.includes(I)?L[R]="Removed circular reference: "+l(I):((Y=E.slice()).push(I),L[R]=T(I,Y)):L[R]=I}catch(D){L="Failed cloning custom data: "+D.message}return L}($,[$])}var b=["log","network","dom","navigation","error","manual"],w=["critical","error","warning","info","debug"];function S($,T){for(var A=0;A<$.length;++A)if($[A]===T)return!0;return!1}function k(){return Date.now?+Date.now():+new Date}r.exports={addParamsAndAccessTokenToPath:function($,T,A){(A=A||{}).access_token=$;var E,I=[];for(E in A)Object.prototype.hasOwnProperty.call(A,E)&&I.push([E,A[E]].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($,T,A,E,I){for(var R,Y,L,D,B,z,K=[],te=[],j=0,M=$.length;j<M;++j){var q=l(z=$[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(E&&q==="object"&&!B){for(var G=0,ee=E.length;G<ee;++G)if(z[E[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),E&&B&&(ae.request=B),I&&(ae.lambdaContext=I),ae._originalArgs=$,ae.diagnostic.original_arg_types=te,ae},addErrorContext:function($,T){var A=$.data.custom||{},E=!1;try{for(var I=0;I<T.length;++I)T[I].hasOwnProperty("rollbarContext")&&(A=o(A,y(T[I].rollbarContext)),E=!0);E&&($.data.custom=A)}catch(R){$.diagnostic.error_context="Failed: "+R.message}},createTelemetryEvent:function($){for(var T,A,E,I,R=0,Y=$.length;R<Y;++R)switch(l(I=$[R])){case"string":!T&&S(b,I)?T=I:!E&&S(w,I)&&(E=I);break;case"object":A=I}return{type:T||"manual",metadata:A||{},level:E}},filterIp:function($,T){if($&&$.user_ip&&T!==!0){var A=$.user_ip;if(T)try{var E;if(A.indexOf(".")!==-1)(E=A.split(".")).pop(),E.push("0"),A=E.join(".");else if(A.indexOf(":")!==-1){if((E=A.split(":")).length>2){var I=E.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;$.user_ip=A}},formatArgsAsString:function($){var T,A,E,I=[];for(T=0,A=$.length;T<A;++T){switch(l(E=$[T])){case"object":(E=(E=m(E)).error||E.value).length>500&&(E=E.substr(0,497)+"...");break;case"null":E="null";break;case"undefined":E="undefined";break;case"symbol":E=E.toString()}I.push(E)}return I.join(" ")},formatUrl:function($,T){if(!(T=T||$.protocol)&&$.port&&($.port===80?T="http:":$.port===443&&(T="https:")),T=T||"https:",!$.hostname)return null;var A=T+"//"+$.hostname;return $.port&&(A=A+":"+$.port),$.path&&(A+=$.path),A},get:function($,T){if($){var A=T.split("."),E=$;try{for(var I=0,R=A.length;I<R;++I)E=E[A[I]]}catch{E=void 0}return E}},handleOptions:function($,T,A,E){var I=o($,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,E),!T||T.overwriteScrubFields||T.scrubFields&&(I.scrubFields=($.scrubFields||[]).concat(T.scrubFields)),I},isError:function($){return c($,"error")||c($,"exception")},isFiniteNumber:function($){return Number.isFinite($)},isFunction:u,isIterable:function($){var T=l($);return T==="object"||T==="array"},isNativeFunction:d,isObject:p,isString:function($){return typeof $=="string"||$ instanceof String},isType:c,isPromise:function($){return p($)&&c($.then,"function")},jsonParse:function($){var T,A;try{T=s.parse($)}catch(E){A=E}return{error:A,value:T}},LEVELS:{debug:0,info:1,warning:2,error:3,critical:4},makeUnhandledStackInfo:function($,T,A,E,I,R,Y,L){var D={url:T||"",line:A,column:E};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):$||Y,url:B,stack:[D],useragent:z}},merge:o,now:k,redact:function(){return"********"},RollbarJSON:s,sanitizeUrl:function($){var T=function(A){if(c(A,"string")){for(var E=h,I=E.parser[E.strictMode?"strict":"loose"].exec(A),R={},Y=0,L=E.key.length;Y<L;++Y)R[E.key[Y]]=I[Y]||"";return R[E.q.name]={},R[E.key[12]].replace(E.q.parser,function(D,B,z){B&&(R[E.q.name][B]=z)}),R}}($);return T?(T.anchor===""&&(T.source=T.source.replace("#","")),$=T.source.replace("?"+T.query,"")):"(unknown)"},set:function($,T,A){if($){var E=T.split("."),I=E.length;if(!(I<1))if(I!==1)try{for(var R=$[E[0]]||{},Y=R,L=1;L<I-1;++L)R[E[L]]=R[E[L]]||{},R=R[E[L]];R[E[I-1]]=A,$[E[0]]=Y}catch{return}else $[E[0]]=A}},setupJSON:function($){u(s.stringify)&&u(s.parse)||(c(JSON,"undefined")||($?(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)||$&&$(s))},stringify:m,maxByteSize:function($){for(var T=0,A=$.length,E=0;E<A;E++){var I=$.charCodeAt(E);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,$){var T;for(T=0;T<f.length;++T)if(f[T].test(k)){$=o.redact();break}return $}(y,b);return S===b?o.isType(b,"object")||o.isType(b,"array")?s(b,g,w):function(k){var $;if(o.isType(k,"string"))for($=0;$<h.length;++$)k=k.replace(h[$],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(E,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=$(),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 $(){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=$();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),E={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,$){var T,A=w.environment||w.payload&&w.payload.environment;T=$?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var E={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"?(E.platform="browser",E.framework="browser-js",E.notifier.name="rollbar-browser-js"):b==="server"?(E.framework=w.framework||"node-js",E.notifier.name=w.notifier.name):b==="react-native"&&(E.framework=w.framework||"react-native",E.notifier.name=w.notifier.name),E}(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")}],$=k.length;for(S=0;S<$;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(($=g)&&$.status&&$.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 $};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,$,T,A,E,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)$={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&&($.url=k.url),$.method&&$.method.endsWith&&$.method.endsWith("_rollbar_wrapped")||(T=A=E=null,(I=k.context?k.context.length:0)&&(Y=Math.floor(I/2),A=k.context.slice(0,Y),T=k.context[Y],E=k.context.slice(Y)),T&&($.code=T),(A||E)&&($.context={},A&&A.length&&($.context.pre=A),E&&E.length&&($.context.post=E)),k.args&&($.args=k.args),S.frames.push($));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,$=0;$<k;$++){var T=d(g,w[$],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),$=p(S,k[0],y),T=k[1];g.message=$+": "+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(`
|
|
438
438
|
`).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(`
|
|
439
439
|
`).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(`
|
|
440
440
|
`)>-1&&m.message.split(`
|
|
@@ -449,7 +449,7 @@ $t(documentTemplateView.smsContent) $t(documentTemplateView.readMore)
|
|
|
449
449
|
`+o+te.join(`,
|
|
450
450
|
`+o)+`
|
|
451
451
|
`+j+"}":"{"+te.join(",")+"}",o=j,z}}("",{"":T})}),typeof a.parse!="function"&&(a.parse=(m={"\\":"\\",'"':'"',"/":"/",t:" ",n:`
|
|
452
|
-
`,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 E,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(;E=R.exec(T);)E[1]?b[E[1]][u]():E[2]?(h=+E[2],y[u]()):(I=E[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(E[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,$=0;$<k.length;$++)w=l(w=k[$].frames,b),k[$].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,$){switch(o.typeName(k)){case"string":return d(g,k);case"object":case"array":return s(k,w,$);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,$=[c,u,p.bind(null,1024),p.bind(null,512),p.bind(null,256),h];w=$.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}}])})})(uR);var yCe=uR.exports;const bCe=cn(yCe);function _Ce(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 wCe="disabledThirdParties",xCe=["google","facebook","segment","logrocket","rollbar"];function CCe(){let n=[];try{const t=JSON.parse(_Ce(wCe));Array.isArray(t)&&(n=t)}catch{}return n.filter(t=>xCe.includes(t))}const dR=Xe.rollbar.clientToken,U3=new bCe({accessToken:dR,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.10.
|
|
452
|
+
`,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 E,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(;E=R.exec(T);)E[1]?b[E[1]][u]():E[2]?(h=+E[2],y[u]()):(I=E[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(E[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,$=0;$<k.length;$++)w=l(w=k[$].frames,b),k[$].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,$){switch(o.typeName(k)){case"string":return d(g,k);case"object":case"array":return s(k,w,$);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,$=[c,u,p.bind(null,1024),p.bind(null,512),p.bind(null,256),h];w=$.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}}])})})(uR);var yCe=uR.exports;const bCe=cn(yCe);function _Ce(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 wCe="disabledThirdParties",xCe=["google","facebook","segment","logrocket","rollbar"];function CCe(){let n=[];try{const t=JSON.parse(_Ce(wCe));Array.isArray(t)&&(n=t)}catch{}return n.filter(t=>xCe.includes(t))}const dR=Xe.rollbar.clientToken,U3=new bCe({accessToken:dR,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.10.4",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"))}}}),kCe=!!dR&&!CCe().includes("rollbar");window.enableErrorTracker=()=>{kCe&&U3.configure({enabled:!0})};const SCe=[9001,9002,9003,9004,9005,9006],TCe=[401];function ECe(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 $Ce{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 B3(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.
|
|
453
453
|
`;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(eR).some(i=>t instanceof eR[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&&$1e(D1e(a,r)))}notifyUser(t){if(this.isDuplicate(t)||t.payload&&!t.payload.showMessage)return;const r=ECe(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&&SCe.includes(o)||!o&&a&&TCe.includes(a)||U3.error(t,i)}async resolveNetworkError(t){var r;try{await w3e(),(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 ACe extends $Ce{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 pR=new ACe,Rr=pR.handleError.bind(pR),Qo=Ne.observable({messages:[],actions:{}}),OCe=n=>Qo.messages.push(yp(n)),Zm=n=>{const t=Qo.messages[n];Qo.actions[t==null?void 0:t._uniqueId]&&delete Qo.actions[t._uniqueId],Qo.messages.splice(n,1)},fR=({index:n,type:t})=>{try{const r={cancel:()=>Zm(n)},i=Qo.messages[n];if(!i||!i._uniqueId)throw Error("message not found, failed to trigger action");const a=Qo.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)}},Jm=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`)}),OCe({actions:u,title:a,message:o,type:t,displayType:r,time:i,closeButton:s});const p=Qo.messages.slice(-1)[0];Qo.actions[p._uniqueId]=l},Gs=(n,t)=>Jm({type:n,message:t}),hR=Qo,W9t="";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 DCe={props:{size:{type:String,default:"40px"},strokeWidth:{type:Number,default:6},color:{type:String,default:""}}};var MCe=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"}})])},PCe=[],ICe=he(DCe,MCe,PCe,!0,null,"c4dd8c6e",null,null);const Xm=ICe.exports,RCe={name:"UserMessages",components:{Spinner:Xm},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){fR({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 LCe=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()])])])},FCe=[],NCe=he(RCe,LCe,FCe,!1,null,null,null,null);const BCe=NCe.exports,G9t="",jCe={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){fR({index:this.index,type:n}),Zm(this.index),this.$modal.hide(this.name)},handleEscapeKeyUp(n){n.which===27&&this.onMessageAction("cancel")}}};var zCe=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)])},VCe=[],UCe=he(jCe,zCe,VCe,!1,null,null,null,null);const HCe=UCe.exports,WCe={name:"UserMessages",components:{Notification:BCe,Dialog:HCe},props:{disableNotification:{type:Boolean,default:!1},disableDialog:{type:Boolean,default:!1}},computed:{notification(){const{messages:n}=hR,t=n.findIndex(r=>r.displayType==="notification");return t!==-1&&{index:t,data:n[t]}},dialog(){const{messages:n}=hR,t=n.findIndex(r=>r.displayType==="dialog");return t!==-1&&{index:t,data:n[t]}}}};var GCe=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)},qCe=[],YCe=he(WCe,GCe,qCe,!1,null,null,null,null);const KCe=YCe.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 Kt=="object"&&Kt)||function(){return this}()||Function("return this")(),H3={},Vn=function(n){try{return!!n()}catch{return!0}},ZCe=Vn,fo=!ZCe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),JCe=Vn,ry=!JCe(function(){var n=function(){}.bind();return typeof n!="function"||n.hasOwnProperty("prototype")}),XCe=ry,iy=Function.prototype.call,Fa=XCe?iy.bind(iy):function(){return iy.apply(iy,arguments)},W3={},mR={}.propertyIsEnumerable,gR=Object.getOwnPropertyDescriptor,QCe=gR&&!mR.call({1:2},1);W3.f=QCe?function(t){var r=gR(this,t);return!!r&&r.enumerable}:mR;var ay=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}},vR=ry,yR=Function.prototype,G3=yR.call,eke=vR&&yR.bind.bind(G3,G3),bR=vR?eke:function(n){return function(){return G3.apply(n,arguments)}},_R=bR,tke=_R({}.toString),nke=_R("".slice),Ql=function(n){return nke(tke(n),8,-1)},rke=Ql,ike=bR,qn=function(n){if(rke(n)==="Function")return ike(n)},ake=qn,oke=Vn,ske=Ql,q3=Object,lke=ake("".split),oy=oke(function(){return!q3("z").propertyIsEnumerable(0)})?function(n){return ske(n)=="String"?lke(n,""):q3(n)}:q3,Au=function(n){return n==null},cke=Au,uke=TypeError,zp=function(n){if(cke(n))throw uke("Can't call method on "+n);return n},dke=oy,pke=zp,Vp=function(n){return dke(pke(n))},Y3=typeof document=="object"&&document.all,fke=typeof Y3>"u"&&Y3!==void 0,wR={all:Y3,IS_HTMLDDA:fke},xR=wR,hke=xR.all,Er=xR.IS_HTMLDDA?function(n){return typeof n=="function"||n===hke}:function(n){return typeof n=="function"},CR=Er,kR=wR,mke=kR.all,Ki=kR.IS_HTMLDDA?function(n){return typeof n=="object"?n!==null:CR(n)||n===mke}:function(n){return typeof n=="object"?n!==null:CR(n)},K3=Ur,gke=Er,vke=function(n){return gke(n)?n:void 0},Qm=function(n,t){return arguments.length<2?vke(K3[n]):K3[n]&&K3[n][t]},yke=qn,Z3=yke({}.isPrototypeOf),bke=Qm,_ke=bke("navigator","userAgent")||"",SR=Ur,J3=_ke,TR=SR.process,ER=SR.Deno,$R=TR&&TR.versions||ER&&ER.version,AR=$R&&$R.v8,ho,sy;AR&&(ho=AR.split("."),sy=ho[0]>0&&ho[0]<4?1:+(ho[0]+ho[1])),!sy&&J3&&(ho=J3.match(/Edge\/(\d+)/),(!ho||ho[1]>=74)&&(ho=J3.match(/Chrome\/(\d+)/),ho&&(sy=+ho[1])));var ly=sy,OR=ly,wke=Vn,DR=!!Object.getOwnPropertySymbols&&!wke(function(){var n=Symbol();return!String(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&OR&&OR<41}),xke=DR,MR=xke&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Cke=Qm,kke=Er,Ske=Z3,Tke=MR,Eke=Object,PR=Tke?function(n){return typeof n=="symbol"}:function(n){var t=Cke("Symbol");return kke(t)&&Ske(t.prototype,Eke(n))},$ke=String,X3=function(n){try{return $ke(n)}catch{return"Object"}},Ake=Er,Oke=X3,Dke=TypeError,cy=function(n){if(Ake(n))return n;throw Dke(Oke(n)+" is not a function")},Mke=cy,Pke=Au,eg=function(n,t){var r=n[t];return Pke(r)?void 0:Mke(r)},Q3=Fa,eC=Er,tC=Ki,Ike=TypeError,Rke=function(n,t){var r,i;if(t==="string"&&eC(r=n.toString)&&!tC(i=Q3(r,n))||eC(r=n.valueOf)&&!tC(i=Q3(r,n))||t!=="string"&&eC(r=n.toString)&&!tC(i=Q3(r,n)))return i;throw Ike("Can't convert object to primitive value")},IR={exports:{}},RR=Ur,Lke=Object.defineProperty,nC=function(n,t){try{Lke(RR,n,{value:t,configurable:!0,writable:!0})}catch{RR[n]=t}return t},Fke=Ur,Nke=nC,LR="__core-js_shared__",Bke=Fke[LR]||Nke(LR,{}),rC=Bke,FR=rC;(IR.exports=function(n,t){return FR[n]||(FR[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 iC=IR.exports,jke=zp,zke=Object,Ou=function(n){return zke(jke(n))},Vke=qn,Uke=Ou,Hke=Vke({}.hasOwnProperty),mo=Object.hasOwn||function(t,r){return Hke(Uke(t),r)},Wke=qn,Gke=0,qke=Math.random(),Yke=Wke(1 .toString),aC=function(n){return"Symbol("+(n===void 0?"":n)+")_"+Yke(++Gke+qke,36)},Kke=Ur,Zke=iC,NR=mo,Jke=aC,BR=DR,jR=MR,Up=Zke("wks"),Du=Kke.Symbol,zR=Du&&Du.for,Xke=jR?Du:Du&&Du.withoutSetter||Jke,vi=function(n){if(!NR(Up,n)||!(BR||typeof Up[n]=="string")){var t="Symbol."+n;BR&&NR(Du,n)?Up[n]=Du[n]:jR&&zR?Up[n]=zR(t):Up[n]=Xke(t)}return Up[n]},Qke=Fa,VR=Ki,UR=PR,e6e=eg,t6e=Rke,n6e=vi,r6e=TypeError,i6e=n6e("toPrimitive"),a6e=function(n,t){if(!VR(n)||UR(n))return n;var r=e6e(n,i6e),i;if(r){if(t===void 0&&(t="default"),i=Qke(r,n,t),!VR(i)||UR(i))return i;throw r6e("Can't convert object to primitive value")}return t===void 0&&(t="number"),t6e(n,t)},o6e=a6e,s6e=PR,oC=function(n){var t=o6e(n,"string");return s6e(t)?t:t+""},l6e=Ur,HR=Ki,sC=l6e.document,c6e=HR(sC)&&HR(sC.createElement),lC=function(n){return c6e?sC.createElement(n):{}},u6e=fo,d6e=Vn,p6e=lC,WR=!u6e&&!d6e(function(){return Object.defineProperty(p6e("div"),"a",{get:function(){return 7}}).a!=7}),f6e=fo,h6e=Fa,m6e=W3,g6e=ay,v6e=Vp,y6e=oC,b6e=mo,_6e=WR,GR=Object.getOwnPropertyDescriptor;H3.f=f6e?GR:function(t,r){if(t=v6e(t),r=y6e(r),_6e)try{return GR(t,r)}catch{}if(b6e(t,r))return g6e(!h6e(m6e.f,t,r),t[r])};var go={},w6e=fo,x6e=Vn,qR=w6e&&x6e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),C6e=Ki,k6e=String,S6e=TypeError,ma=function(n){if(C6e(n))return n;throw S6e(k6e(n)+" is not an object")},T6e=fo,E6e=WR,$6e=qR,uy=ma,YR=oC,A6e=TypeError,cC=Object.defineProperty,O6e=Object.getOwnPropertyDescriptor,uC="enumerable",dC="configurable",pC="writable";go.f=T6e?$6e?function(t,r,i){if(uy(t),r=YR(r),uy(i),typeof t=="function"&&r==="prototype"&&"value"in i&&pC in i&&!i[pC]){var a=O6e(t,r);a&&a[pC]&&(t[r]=i.value,i={configurable:dC in i?i[dC]:a[dC],enumerable:uC in i?i[uC]:a[uC],writable:!1})}return cC(t,r,i)}:cC:function(t,r,i){if(uy(t),r=YR(r),uy(i),E6e)try{return cC(t,r,i)}catch{}if("get"in i||"set"in i)throw A6e("Accessors not supported");return"value"in i&&(t[r]=i.value),t};var D6e=fo,M6e=go,P6e=ay,Hp=D6e?function(n,t,r){return M6e.f(n,t,P6e(1,r))}:function(n,t,r){return n[t]=r,n},KR={exports:{}},fC=fo,I6e=mo,ZR=Function.prototype,R6e=fC&&Object.getOwnPropertyDescriptor,hC=I6e(ZR,"name"),L6e=hC&&function(){}.name==="something",F6e=hC&&(!fC||fC&&R6e(ZR,"name").configurable),mC={EXISTS:hC,PROPER:L6e,CONFIGURABLE:F6e},N6e=qn,B6e=Er,gC=rC,j6e=N6e(Function.toString);B6e(gC.inspectSource)||(gC.inspectSource=function(n){return j6e(n)});var JR=gC.inspectSource,z6e=Ur,V6e=Er,XR=z6e.WeakMap,QR=V6e(XR)&&/native code/.test(String(XR)),U6e=iC,H6e=aC,eL=U6e("keys"),vC=function(n){return eL[n]||(eL[n]=H6e(n))},dy={},W6e=QR,tL=Ur,G6e=Ki,q6e=Hp,yC=mo,bC=rC,Y6e=vC,K6e=dy,nL="Object already initialized",_C=tL.TypeError,Z6e=tL.WeakMap,py,tg,fy,J6e=function(n){return fy(n)?tg(n):py(n,{})},X6e=function(n){return function(t){var r;if(!G6e(t)||(r=tg(t)).type!==n)throw _C("Incompatible receiver, "+n+" required");return r}};if(W6e||bC.state){var es=bC.state||(bC.state=new Z6e);es.get=es.get,es.has=es.has,es.set=es.set,py=function(n,t){if(es.has(n))throw _C(nL);return t.facade=n,es.set(n,t),t},tg=function(n){return es.get(n)||{}},fy=function(n){return es.has(n)}}else{var Wp=Y6e("state");K6e[Wp]=!0,py=function(n,t){if(yC(n,Wp))throw _C(nL);return t.facade=n,q6e(n,Wp,t),t},tg=function(n){return yC(n,Wp)?n[Wp]:{}},fy=function(n){return yC(n,Wp)}}var Gp={set:py,get:tg,has:fy,enforce:J6e,getterFor:X6e},Q6e=Vn,eSe=Er,hy=mo,wC=fo,tSe=mC.CONFIGURABLE,nSe=JR,rL=Gp,rSe=rL.enforce,iSe=rL.get,my=Object.defineProperty,aSe=wC&&!Q6e(function(){return my(function(){},"length",{value:8}).length!==8}),oSe=String(String).split("String"),sSe=KR.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")||tSe&&n.name!==t)&&(wC?my(n,"name",{value:t,configurable:!0}):n.name=t),aSe&&r&&hy(r,"arity")&&n.length!==r.arity&&my(n,"length",{value:r.arity});try{r&&hy(r,"constructor")&&r.constructor?wC&&my(n,"prototype",{writable:!1}):n.prototype&&(n.prototype=void 0)}catch{}var i=rSe(n);return hy(i,"source")||(i.source=oSe.join(typeof t=="string"?t:"")),n};Function.prototype.toString=sSe(function(){return eSe(this)&&iSe(this).source||nSe(this)},"toString");var lSe=KR.exports,cSe=Er,uSe=go,dSe=lSe,pSe=nC,Mu=function(n,t,r,i){i||(i={});var a=i.enumerable,o=i.name!==void 0?i.name:t;if(cSe(r)&&dSe(r,o,i),i.global)a?n[t]=r:pSe(t,r);else{try{i.unsafe?n[t]&&(a=!0):delete n[t]}catch{}a?n[t]=r:uSe.f(n,t,{value:r,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return n},gy={},fSe=Math.ceil,hSe=Math.floor,mSe=Math.trunc||function(t){var r=+t;return(r>0?hSe:fSe)(r)},gSe=mSe,vy=function(n){var t=+n;return t!==t||t===0?0:gSe(t)},vSe=vy,ySe=Math.max,bSe=Math.min,iL=function(n,t){var r=vSe(n);return r<0?ySe(r+t,0):bSe(r,t)},_Se=vy,wSe=Math.min,xC=function(n){return n>0?wSe(_Se(n),9007199254740991):0},xSe=xC,qp=function(n){return xSe(n.length)},CSe=Vp,kSe=iL,SSe=qp,aL=function(n){return function(t,r,i){var a=CSe(t),o=SSe(a),s=kSe(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}},TSe={includes:aL(!0),indexOf:aL(!1)},ESe=qn,CC=mo,$Se=Vp,ASe=TSe.indexOf,OSe=dy,oL=ESe([].push),sL=function(n,t){var r=$Se(n),i=0,a=[],o;for(o in r)!CC(OSe,o)&&CC(r,o)&&oL(a,o);for(;t.length>i;)CC(r,o=t[i++])&&(~ASe(a,o)||oL(a,o));return a},kC=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],DSe=sL,MSe=kC,PSe=MSe.concat("length","prototype");gy.f=Object.getOwnPropertyNames||function(t){return DSe(t,PSe)};var SC={};SC.f=Object.getOwnPropertySymbols;var ISe=Qm,RSe=qn,LSe=gy,FSe=SC,NSe=ma,BSe=RSe([].concat),jSe=ISe("Reflect","ownKeys")||function(t){var r=LSe.f(NSe(t)),i=FSe.f;return i?BSe(r,i(t)):r},lL=mo,zSe=jSe,VSe=H3,USe=go,HSe=function(n,t,r){for(var i=zSe(t),a=USe.f,o=VSe.f,s=0;s<i.length;s++){var c=i[s];!lL(n,c)&&!(r&&lL(r,c))&&a(n,c,o(t,c))}},WSe=Vn,GSe=Er,qSe=/#|\.prototype\./,ng=function(n,t){var r=KSe[YSe(n)];return r==JSe?!0:r==ZSe?!1:GSe(t)?WSe(t):!!t},YSe=ng.normalize=function(n){return String(n).replace(qSe,".").toLowerCase()},KSe=ng.data={},ZSe=ng.NATIVE="N",JSe=ng.POLYFILL="P",cL=ng,TC=Ur,XSe=H3.f,QSe=Hp,e8e=Mu,t8e=nC,n8e=HSe,r8e=cL,qs=function(n,t){var r=n.target,i=n.global,a=n.stat,o,s,c,l,u,d;if(i?s=TC:a?s=TC[r]||t8e(r,{}):s=(TC[r]||{}).prototype,s)for(c in t){if(u=t[c],n.dontCallGetSet?(d=XSe(s,c),l=d&&d.value):l=s[c],o=r8e(i?c:r+(a?".":"#")+c,n.forced),!o&&l!==void 0){if(typeof u==typeof l)continue;n8e(u,l)}(n.sham||l&&l.sham)&&QSe(u,"sham",!0),e8e(s,c,u,n)}},i8e=Ql,uL=Array.isArray||function(t){return i8e(t)=="Array"},a8e=TypeError,o8e=9007199254740991,s8e=function(n){if(n>o8e)throw a8e("Maximum allowed index exceeded");return n},l8e=oC,c8e=go,u8e=ay,dL=function(n,t,r){var i=l8e(t);i in n?c8e.f(n,i,u8e(0,r)):n[i]=r},d8e=vi,p8e=d8e("toStringTag"),pL={};pL[p8e]="z";var EC=String(pL)==="[object z]",f8e=EC,h8e=Er,yy=Ql,m8e=vi,g8e=m8e("toStringTag"),v8e=Object,y8e=yy(function(){return arguments}())=="Arguments",b8e=function(n,t){try{return n[t]}catch{}},by=f8e?yy:function(n){var t,r,i;return n===void 0?"Undefined":n===null?"Null":typeof(r=b8e(t=v8e(n),g8e))=="string"?r:y8e?yy(t):(i=yy(t))=="Object"&&h8e(t.callee)?"Arguments":i},_8e=qn,w8e=Vn,fL=Er,x8e=by,C8e=Qm,k8e=JR,hL=function(){},S8e=[],mL=C8e("Reflect","construct"),$C=/^\s*(?:class|function)\b/,T8e=_8e($C.exec),E8e=!$C.exec(hL),rg=function(t){if(!fL(t))return!1;try{return mL(hL,S8e,t),!0}catch{return!1}},gL=function(t){if(!fL(t))return!1;switch(x8e(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return E8e||!!T8e($C,k8e(t))}catch{return!0}};gL.sham=!0;var $8e=!mL||w8e(function(){var n;return rg(rg.call)||!rg(Object)||!rg(function(){n=!0})||n})?gL:rg,vL=uL,A8e=$8e,O8e=Ki,D8e=vi,M8e=D8e("species"),yL=Array,P8e=function(n){var t;return vL(n)&&(t=n.constructor,A8e(t)&&(t===yL||vL(t.prototype))?t=void 0:O8e(t)&&(t=t[M8e],t===null&&(t=void 0))),t===void 0?yL:t},I8e=P8e,bL=function(n,t){return new(I8e(n))(t===0?0:t)},R8e=Vn,L8e=vi,F8e=ly,N8e=L8e("species"),_L=function(n){return F8e>=51||!R8e(function(){var t=[],r=t.constructor={};return r[N8e]=function(){return{foo:1}},t[n](Boolean).foo!==1})},B8e=qs,j8e=Vn,z8e=uL,V8e=Ki,U8e=Ou,H8e=qp,wL=s8e,xL=dL,W8e=bL,G8e=_L,q8e=vi,Y8e=ly,CL=q8e("isConcatSpreadable"),K8e=Y8e>=51||!j8e(function(){var n=[];return n[CL]=!1,n.concat()[0]!==n}),Z8e=G8e("concat"),J8e=function(n){if(!V8e(n))return!1;var t=n[CL];return t!==void 0?!!t:z8e(n)},X8e=!K8e||!Z8e;B8e({target:"Array",proto:!0,arity:1,forced:X8e},{concat:function(t){var r=U8e(this),i=W8e(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],J8e(u))for(l=H8e(u),wL(a+l),s=0;s<l;s++,a++)s in u&&xL(i,a,u[s]);else wL(a+1),xL(i,a++,u);return i.length=a,i}});var Q8e=EC,e7e=by,t7e=Q8e?{}.toString:function(){return"[object "+e7e(this)+"]"},n7e=EC,r7e=Mu,i7e=t7e;n7e||r7e(Object.prototype,"toString",i7e,{unsafe:!0});var kL={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},a7e=lC,AC=a7e("span").classList,SL=AC&&AC.constructor&&AC.constructor.prototype,TL=SL===Object.prototype?void 0:SL,EL=qn,o7e=cy,s7e=ry,l7e=EL(EL.bind),$L=function(n,t){return o7e(n),t===void 0?n:s7e?l7e(n,t):function(){return n.apply(t,arguments)}},c7e=$L,u7e=qn,d7e=oy,p7e=Ou,f7e=qp,h7e=bL,AL=u7e([].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=p7e(l),h=d7e(f),m=c7e(u,d),g=f7e(h),y=0,b=p||h7e,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:AL(w,S)}else switch(n){case 4:return!1;case 7:AL(w,S)}return o?-1:i||a?a:w}},OC={forEach:ec(0),map:ec(1),filter:ec(2),some:ec(3),every:ec(4),find:ec(5),findIndex:ec(6),filterReject:ec(7)},m7e=Vn,OL=function(n,t){var r=[][n];return!!r&&m7e(function(){r.call(null,t||function(){return 1},1)})},g7e=OC.forEach,v7e=OL,y7e=v7e("forEach"),b7e=y7e?[].forEach:function(t){return g7e(this,t,arguments.length>1?arguments[1]:void 0)},DL=Ur,ML=kL,_7e=TL,DC=b7e,w7e=Hp,PL=function(n){if(n&&n.forEach!==DC)try{w7e(n,"forEach",DC)}catch{n.forEach=DC}};for(var MC in ML)ML[MC]&&PL(DL[MC]&&DL[MC].prototype);PL(_7e);var x7e=!!(typeof window<"u"&&window.document&&window.document.createElement),C7e=x7e;const PC=cn(C7e);var k7e=by,S7e=String,Pu=function(n){if(k7e(n)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return S7e(n)},IL=`
|
|
454
454
|
\v\f\r \u2028\u2029\uFEFF`,T7e=qn,E7e=zp,$7e=Pu,A7e=IL,RL=T7e("".replace),_y="["+A7e+"]",O7e=RegExp("^"+_y+_y+"*"),D7e=RegExp(_y+_y+"*$"),IC=function(n){return function(t){var r=$7e(E7e(t));return n&1&&(r=RL(r,O7e,"")),n&2&&(r=RL(r,D7e,"")),r}},M7e={start:IC(1),end:IC(2),trim:IC(3)},LL=Ur,P7e=Vn,I7e=qn,R7e=Pu,L7e=M7e.trim,FL=IL,ig=LL.parseInt,NL=LL.Symbol,BL=NL&&NL.iterator,jL=/^[+-]?0x/i,F7e=I7e(jL.exec),N7e=ig(FL+"08")!==8||ig(FL+"0x16")!==22||BL&&!P7e(function(){ig(Object(BL))}),B7e=N7e?function(t,r){var i=L7e(R7e(t));return ig(i,r>>>0||(F7e(jL,i)?16:10))}:ig,j7e=qs,zL=B7e;j7e({global:!0,forced:parseInt!=zL},{parseInt:zL});var z7e=sL,V7e=kC,VL=Object.keys||function(t){return z7e(t,V7e)},UL=fo,U7e=qn,H7e=Fa,W7e=Vn,RC=VL,G7e=SC,q7e=W3,Y7e=Ou,K7e=oy,Yp=Object.assign,HL=Object.defineProperty,Z7e=U7e([].concat),J7e=!Yp||W7e(function(){if(UL&&Yp({b:1},Yp(HL({},"a",{enumerable:!0,get:function(){HL(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||RC(Yp({},t)).join("")!=i})?function(t,r){for(var i=Y7e(t),a=arguments.length,o=1,s=G7e.f,c=q7e.f;a>o;)for(var l=K7e(arguments[o++]),u=s?Z7e(RC(l),s(l)):RC(l),d=u.length,p=0,f;d>p;)f=u[p++],(!UL||H7e(c,l,f))&&(i[f]=l[f]);return i}:Yp,X7e=qs,WL=J7e;X7e({target:"Object",stat:!0,arity:2,forced:Object.assign!==WL},{assign:WL});var Q7e=qs,eTe=OC.filter,tTe=_L,nTe=tTe("filter");Q7e({target:"Array",proto:!0,forced:!nTe},{filter:function(t){return eTe(this,t,arguments.length>1?arguments[1]:void 0)}});var GL={},rTe=fo,iTe=qR,aTe=go,oTe=ma,sTe=Vp,lTe=VL;GL.f=rTe&&!iTe?Object.defineProperties:function(t,r){oTe(t);for(var i=sTe(r),a=lTe(r),o=a.length,s=0,c;o>s;)aTe.f(t,c=a[s++],i[c]);return t};var cTe=Qm,uTe=cTe("document","documentElement"),dTe=ma,pTe=GL,qL=kC,fTe=dy,hTe=uTe,mTe=lC,gTe=vC,YL=">",KL="<",LC="prototype",FC="script",ZL=gTe("IE_PROTO"),NC=function(){},JL=function(n){return KL+FC+YL+n+KL+"/"+FC+YL},XL=function(n){n.write(JL("")),n.close();var t=n.parentWindow.Object;return n=null,t},vTe=function(){var n=mTe("iframe"),t="java"+FC+":",r;return n.style.display="none",hTe.appendChild(n),n.src=String(t),r=n.contentWindow.document,r.open(),r.write(JL("document.F=Object")),r.close(),r.F},wy,xy=function(){try{wy=new ActiveXObject("htmlfile")}catch{}xy=typeof document<"u"?document.domain&&wy?XL(wy):vTe():XL(wy);for(var n=qL.length;n--;)delete xy[LC][qL[n]];return xy()};fTe[ZL]=!0;var BC=Object.create||function(t,r){var i;return t!==null?(NC[LC]=dTe(t),i=new NC,NC[LC]=null,i[ZL]=t):i=xy(),r===void 0?i:pTe.f(i,r)},yTe=vi,bTe=BC,_Te=go.f,jC=yTe("unscopables"),zC=Array.prototype;zC[jC]==null&&_Te(zC,jC,{configurable:!0,value:bTe(null)});var wTe=function(n){zC[jC][n]=!0},ag={},xTe=Vn,CTe=!xTe(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype}),kTe=mo,STe=Er,TTe=Ou,ETe=vC,$Te=CTe,QL=ETe("IE_PROTO"),VC=Object,ATe=VC.prototype,eF=$Te?VC.getPrototypeOf:function(n){var t=TTe(n);if(kTe(t,QL))return t[QL];var r=t.constructor;return STe(r)&&t instanceof r?r.prototype:t instanceof VC?ATe:null},OTe=Vn,DTe=Er,MTe=Ki,tF=eF,PTe=Mu,ITe=vi,UC=ITe("iterator"),nF=!1,Iu,HC,WC;[].keys&&(WC=[].keys(),"next"in WC?(HC=tF(tF(WC)),HC!==Object.prototype&&(Iu=HC)):nF=!0);var RTe=!MTe(Iu)||OTe(function(){var n={};return Iu[UC].call(n)!==n});RTe&&(Iu={}),DTe(Iu[UC])||PTe(Iu,UC,function(){return this});var rF={IteratorPrototype:Iu,BUGGY_SAFARI_ITERATORS:nF},LTe=go.f,FTe=mo,NTe=vi,iF=NTe("toStringTag"),GC=function(n,t,r){n&&!r&&(n=n.prototype),n&&!FTe(n,iF)&<e(n,iF,{configurable:!0,value:t})},BTe=rF.IteratorPrototype,jTe=BC,zTe=ay,VTe=GC,UTe=ag,HTe=function(){return this},WTe=function(n,t,r,i){var a=t+" Iterator";return n.prototype=jTe(BTe,{next:zTe(+!i,r)}),VTe(n,a,!1),UTe[a]=HTe,n},GTe=Er,qTe=String,YTe=TypeError,KTe=function(n){if(typeof n=="object"||GTe(n))return n;throw YTe("Can't set "+qTe(n)+" as a prototype")},ZTe=qn,JTe=ma,XTe=KTe,aF=Object.setPrototypeOf||("__proto__"in{}?function(){var n=!1,t={},r;try{r=ZTe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),r(t,[]),n=t instanceof Array}catch{}return function(a,o){return JTe(a),XTe(o),n?r(a,o):a.__proto__=o,a}}():void 0),QTe=qs,eEe=Fa,oF=mC,tEe=Er,nEe=WTe,sF=eF,lF=aF,rEe=GC,iEe=Hp,qC=Mu,aEe=vi,oEe=ag,cF=rF,sEe=oF.PROPER,lEe=oF.CONFIGURABLE,uF=cF.IteratorPrototype,Cy=cF.BUGGY_SAFARI_ITERATORS,og=aEe("iterator"),dF="keys",sg="values",pF="entries",cEe=function(){return this},fF=function(n,t,r,i,a,o,s){nEe(r,t,i);var c=function(b){if(b===a&&f)return f;if(!Cy&&b in d)return d[b];switch(b){case dF:return function(){return new r(this,b)};case sg:return function(){return new r(this,b)};case pF:return function(){return new r(this,b)}}return function(){return new r(this)}},l=t+" Iterator",u=!1,d=n.prototype,p=d[og]||d["@@iterator"]||a&&d[a],f=!Cy&&p||c(a),h=t=="Array"&&d.entries||p,m,g,y;if(h&&(m=sF(h.call(new n)),m!==Object.prototype&&m.next&&(sF(m)!==uF&&(lF?lF(m,uF):tEe(m[og])||qC(m,og,cEe)),rEe(m,l,!0))),sEe&&a==sg&&p&&p.name!==sg&&(lEe?iEe(d,"name",sg):(u=!0,f=function(){return eEe(p,this)})),a)if(g={values:c(sg),keys:o?f:c(dF),entries:c(pF)},s)for(y in g)(Cy||u||!(y in d))&&qC(d,y,g[y]);else QTe({target:t,proto:!0,forced:Cy||u},g);return d[og]!==f&&qC(d,og,f,{name:a}),oEe[t]=f,g},hF=function(n,t){return{value:n,done:t}},uEe=Vp,YC=wTe,mF=ag,gF=Gp,dEe=go.f,pEe=fF,ky=hF,fEe=fo,vF="Array Iterator",hEe=gF.set,mEe=gF.getterFor(vF),gEe=pEe(Array,"Array",function(n,t){hEe(this,{type:vF,target:uEe(n),index:0,kind:t})},function(){var n=mEe(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"),yF=mF.Arguments=mF.Array;if(YC("keys"),YC("values"),YC("entries"),fEe&&yF.name!=="values")try{dEe(yF,"name",{value:"values"})}catch{}var KC=qn,vEe=vy,yEe=Pu,bEe=zp,_Ee=KC("".charAt),bF=KC("".charCodeAt),wEe=KC("".slice),_F=function(n){return function(t,r){var i=yEe(bEe(t)),a=vEe(r),o=i.length,s,c;return a<0||a>=o?n?"":void 0:(s=bF(i,a),s<55296||s>56319||a+1===o||(c=bF(i,a+1))<56320||c>57343?n?_Ee(i,a):s:n?wEe(i,a,a+2):(s-55296<<10)+(c-56320)+65536)}},wF={codeAt:_F(!1),charAt:_F(!0)},xEe=wF.charAt,CEe=Pu,xF=Gp,kEe=fF,CF=hF,kF="String Iterator",SEe=xF.set,TEe=xF.getterFor(kF);kEe(String,"String",function(n){SEe(this,{type:kF,string:CEe(n),index:0})},function(){var t=TEe(this),r=t.string,i=t.index,a;return i>=r.length?CF(void 0,!0):(a=xEe(r,i),t.index+=a.length,CF(a,!1))});var EEe=Mu,SF=function(n,t,r){for(var i in t)EEe(n,i,t[i],r);return n},TF={exports:{}},EF={},$F=iL,$Ee=qp,AEe=dL,OEe=Array,DEe=Math.max,MEe=function(n,t,r){for(var i=$Ee(n),a=$F(t,i),o=$F(r===void 0?i:r,i),s=OEe(DEe(o-a,0)),c=0;a<o;a++,c++)AEe(s,c,n[a]);return s.length=c,s},PEe=Ql,IEe=Vp,AF=gy.f,REe=MEe,OF=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],LEe=function(n){try{return AF(n)}catch{return REe(OF)}};EF.f=function(t){return OF&&PEe(t)=="Window"?LEe(t):AF(IEe(t))};var FEe=Vn,NEe=FEe(function(){if(typeof ArrayBuffer=="function"){var n=new ArrayBuffer(8);Object.isExtensible(n)&&Object.defineProperty(n,"a",{value:8})}}),BEe=Vn,jEe=Ki,zEe=Ql,DF=NEe,Sy=Object.isExtensible,VEe=BEe(function(){Sy(1)}),MF=VEe||DF?function(t){return!jEe(t)||DF&&zEe(t)=="ArrayBuffer"?!1:Sy?Sy(t):!0}:Sy,UEe=Vn,HEe=!UEe(function(){return Object.isExtensible(Object.preventExtensions({}))}),WEe=qs,GEe=qn,qEe=dy,YEe=Ki,ZC=mo,KEe=go.f,PF=gy,ZEe=EF,JC=MF,JEe=aC,XEe=HEe,IF=!1,Ys=JEe("meta"),QEe=0,XC=function(n){KEe(n,Ys,{value:{objectID:"O"+QEe++,weakData:{}}})},e9e=function(n,t){if(!YEe(n))return typeof n=="symbol"?n:(typeof n=="string"?"S":"P")+n;if(!ZC(n,Ys)){if(!JC(n))return"F";if(!t)return"E";XC(n)}return n[Ys].objectID},t9e=function(n,t){if(!ZC(n,Ys)){if(!JC(n))return!0;if(!t)return!1;XC(n)}return n[Ys].weakData},n9e=function(n){return XEe&&IF&&JC(n)&&!ZC(n,Ys)&&XC(n),n},r9e=function(){i9e.enable=function(){},IF=!0;var n=PF.f,t=GEe([].splice),r={};r[Ys]=1,n(r).length&&(PF.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},WEe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ZEe.f}))},i9e=TF.exports={enable:r9e,fastKey:e9e,getWeakData:t9e,onFreeze:n9e};qEe[Ys]=!0;var QC=TF.exports,a9e=vi,o9e=ag,s9e=a9e("iterator"),l9e=Array.prototype,c9e=function(n){return n!==void 0&&(o9e.Array===n||l9e[s9e]===n)},u9e=by,RF=eg,d9e=Au,p9e=ag,f9e=vi,h9e=f9e("iterator"),LF=function(n){if(!d9e(n))return RF(n,h9e)||RF(n,"@@iterator")||p9e[u9e(n)]},m9e=Fa,g9e=cy,v9e=ma,y9e=X3,b9e=LF,_9e=TypeError,w9e=function(n,t){var r=arguments.length<2?b9e(n):t;if(g9e(r))return v9e(m9e(r,n));throw _9e(y9e(n)+" is not iterable")},x9e=Fa,FF=ma,C9e=eg,k9e=function(n,t,r){var i,a;FF(n);try{if(i=C9e(n,"return"),!i){if(t==="throw")throw r;return r}i=x9e(i,n)}catch(o){a=!0,i=o}if(t==="throw")throw r;if(a)throw i;return FF(i),r},S9e=$L,T9e=Fa,E9e=ma,$9e=X3,A9e=c9e,O9e=qp,NF=Z3,D9e=w9e,M9e=LF,BF=k9e,P9e=TypeError,Ty=function(n,t){this.stopped=n,this.result=t},jF=Ty.prototype,zF=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=S9e(t,i),u,d,p,f,h,m,g,y=function(w){return u&&BF(u,"normal",w),new Ty(!0,w)},b=function(w){return a?(E9e(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=M9e(n),!d)throw P9e($9e(n)+" is not iterable");if(A9e(d)){for(p=0,f=O9e(n);f>p;p++)if(h=b(n[p]),h&&NF(jF,h))return h;return new Ty(!1)}u=D9e(n,d)}for(m=o?n.next:u.next;!(g=T9e(m,u)).done;){try{h=b(g.value)}catch(w){BF(u,"throw",w)}if(typeof h=="object"&&h&&NF(jF,h))return h}return new Ty(!1)},I9e=Z3,R9e=TypeError,VF=function(n,t){if(I9e(t,n))return n;throw R9e("Incorrect invocation")},L9e=vi,UF=L9e("iterator"),HF=!1;try{var F9e=0,WF={next:function(){return{done:!!F9e++}},return:function(){HF=!0}};WF[UF]=function(){return this},Array.from(WF,function(){throw 2})}catch{}var N9e=function(n,t){if(!t&&!HF)return!1;var r=!1;try{var i={};i[UF]=function(){return{next:function(){return{done:r=!0}}}},n(i)}catch{}return r},B9e=Er,j9e=Ki,GF=aF,z9e=function(n,t,r){var i,a;return GF&&B9e(i=t.constructor)&&i!==r&&j9e(a=i.prototype)&&a!==r.prototype&&GF(n,a),n},V9e=qs,U9e=Ur,H9e=qn,qF=cL,W9e=Mu,G9e=QC,q9e=zF,Y9e=VF,K9e=Er,Z9e=Au,ek=Ki,tk=Vn,J9e=N9e,X9e=GC,Q9e=z9e,e$e=function(n,t,r){var i=n.indexOf("Map")!==-1,a=n.indexOf("Weak")!==-1,o=i?"set":"add",s=U9e[n],c=s&&s.prototype,l=s,u={},d=function(b){var w=H9e(c[b]);W9e(c,b,b=="add"?function(k){return w(this,k===0?0:k),this}:b=="delete"?function(S){return a&&!ek(S)?!1:w(this,S===0?0:S)}:b=="get"?function(k){return a&&!ek(k)?void 0:w(this,k===0?0:k)}:b=="has"?function(k){return a&&!ek(k)?!1:w(this,k===0?0:k)}:function(k,$){return w(this,k===0?0:k,$),this})},p=qF(n,!K9e(s)||!(a||c.forEach&&!tk(function(){new s().entries().next()})));if(p)l=r.getConstructor(t,n,i,o),G9e.enable();else if(qF(n,!0)){var f=new l,h=f[o](a?{}:-0,1)!=f,m=tk(function(){f.has(1)}),g=J9e(function(b){new s(b)}),y=!a&&tk(function(){for(var b=new s,w=5;w--;)b[o](w,w);return!b.has(-0)});g||(l=t(function(b,w){Y9e(b,c);var S=Q9e(new s,b,l);return Z9e(w)||q9e(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,V9e({global:!0,constructor:!0,forced:l!=s},u),X9e(l,n),a||r.setStrong(l,n,i),l},t$e=qn,YF=SF,Ey=QC.getWeakData,n$e=VF,r$e=ma,i$e=Au,nk=Ki,a$e=zF,KF=OC,ZF=mo,JF=Gp,o$e=JF.set,s$e=JF.getterFor,l$e=KF.find,c$e=KF.findIndex,u$e=t$e([].splice),d$e=0,$y=function(n){return n.frozen||(n.frozen=new XF)},XF=function(){this.entries=[]},rk=function(n,t){return l$e(n.entries,function(r){return r[0]===t})};XF.prototype={get:function(n){var t=rk(this,n);if(t)return t[1]},has:function(n){return!!rk(this,n)},set:function(n,t){var r=rk(this,n);r?r[1]=t:this.entries.push([n,t])},delete:function(n){var t=c$e(this.entries,function(r){return r[0]===n});return~t&&u$e(this.entries,t,1),!!~t}};var p$e={getConstructor:function(n,t,r,i){var a=n(function(l,u){n$e(l,o),o$e(l,{type:t,id:d$e++,frozen:void 0}),i$e(u)||a$e(u,l[i],{that:l,AS_ENTRIES:r})}),o=a.prototype,s=s$e(t),c=function(l,u,d){var p=s(l),f=Ey(r$e(u),!0);return f===!0?$y(p).set(u,d):f[p.id]=d,l};return YF(o,{delete:function(l){var u=s(this);if(!nk(l))return!1;var d=Ey(l);return d===!0?$y(u).delete(l):d&&ZF(d,u.id)&&delete d[u.id]},has:function(u){var d=s(this);if(!nk(u))return!1;var p=Ey(u);return p===!0?$y(d).has(u):p&&ZF(p,d.id)}}),YF(o,r?{get:function(u){var d=s(this);if(nk(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}},QF=Ur,Ay=qn,f$e=SF,h$e=QC,m$e=e$e,eN=p$e,Oy=Ki,Dy=MF,My=Gp.enforce,g$e=QR,v$e=!QF.ActiveXObject&&"ActiveXObject"in QF,lg,tN=function(n){return function(){return n(this,arguments.length?arguments[0]:void 0)}},y$e=m$e("WeakMap",tN,eN);if(g$e&&v$e){lg=eN.getConstructor(tN,"WeakMap",!0),h$e.enable();var cg=y$e.prototype,nN=Ay(cg.delete),Py=Ay(cg.has),rN=Ay(cg.get),iN=Ay(cg.set);f$e(cg,{delete:function(n){if(Oy(n)&&!Dy(n)){var t=My(this);return t.frozen||(t.frozen=new lg),nN(this,n)||t.frozen.delete(n)}return nN(this,n)},has:function(t){if(Oy(t)&&!Dy(t)){var r=My(this);return r.frozen||(r.frozen=new lg),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 lg),Py(this,t)?rN(this,t):r.frozen.get(t)}return rN(this,t)},set:function(t,r){if(Oy(t)&&!Dy(t)){var i=My(this);i.frozen||(i.frozen=new lg),Py(this,t)?iN(this,t,r):i.frozen.set(t,r)}else iN(this,t,r);return this}})}var aN=Ur,oN=kL,b$e=TL,ug=gEe,ik=Hp,sN=vi,ak=sN("iterator"),lN=sN("toStringTag"),ok=ug.values,cN=function(n,t){if(n){if(n[ak]!==ok)try{ik(n,ak,ok)}catch{n[ak]=ok}if(n[lN]||ik(n,lN,t),oN[t]){for(var r in ug)if(n[r]!==ug[r])try{ik(n,r,ug[r])}catch{n[r]=ug[r]}}}};for(var sk in oN)cN(aN[sk]&&aN[sk].prototype,sk);cN(b$e,"DOMTokenList");var uN="Expected a function",dN=0/0,_$e="[object Symbol]",w$e=/^\s+|\s+$/g,x$e=/^[-+]0x[0-9a-f]+$/i,C$e=/^0b[01]+$/i,k$e=/^0o[0-7]+$/i,S$e=parseInt,T$e=typeof Kt=="object"&&Kt&&Kt.Object===Object&&Kt,E$e=typeof self=="object"&&self&&self.Object===Object&&self,$$e=T$e||E$e||Function("return this")(),A$e=Object.prototype,O$e=A$e.toString,D$e=Math.max,M$e=Math.min,lk=function(){return $$e.Date.now()};function P$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(uN);t=pN(t)||0,Iy(r)&&(d=!!r.leading,p="maxWait"in r,o=p?D$e(pN(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f);function h(T){var A=i,E=a;return i=a=void 0,u=T,s=n.apply(E,A),s}function m(T){return u=T,c=setTimeout(b,t),d?h(T):s}function g(T){var A=T-l,E=T-u,I=t-A;return p?M$e(I,o-E):I}function y(T){var A=T-l,E=T-u;return l===void 0||A>=t||A<0||p&&E>=o}function b(){var T=lk();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(lk())}function $(){var T=lk(),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 $.cancel=S,$.flush=k,$}function I$e(n,t,r){var i=!0,a=!0;if(typeof n!="function")throw new TypeError(uN);return Iy(r)&&(i="leading"in r?!!r.leading:i,a="trailing"in r?!!r.trailing:a),P$e(n,t,{leading:i,maxWait:t,trailing:a})}function Iy(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function R$e(n){return!!n&&typeof n=="object"}function L$e(n){return typeof n=="symbol"||R$e(n)&&O$e.call(n)==_$e}function pN(n){if(typeof n=="number")return n;if(L$e(n))return dN;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(w$e,"");var r=C$e.test(n);return r||k$e.test(n)?S$e(n.slice(2),r?2:8):x$e.test(n)?dN:+n}var F$e=I$e;const fN=cn(F$e);var N$e="Expected a function",hN=0/0,B$e="[object Symbol]",j$e=/^\s+|\s+$/g,z$e=/^[-+]0x[0-9a-f]+$/i,V$e=/^0b[01]+$/i,U$e=/^0o[0-7]+$/i,H$e=parseInt,W$e=typeof Kt=="object"&&Kt&&Kt.Object===Object&&Kt,G$e=typeof self=="object"&&self&&self.Object===Object&&self,q$e=W$e||G$e||Function("return this")(),Y$e=Object.prototype,K$e=Y$e.toString,Z$e=Math.max,J$e=Math.min,ck=function(){return q$e.Date.now()};function X$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(N$e);t=mN(t)||0,uk(r)&&(d=!!r.leading,p="maxWait"in r,o=p?Z$e(mN(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f);function h(T){var A=i,E=a;return i=a=void 0,u=T,s=n.apply(E,A),s}function m(T){return u=T,c=setTimeout(b,t),d?h(T):s}function g(T){var A=T-l,E=T-u,I=t-A;return p?J$e(I,o-E):I}function y(T){var A=T-l,E=T-u;return l===void 0||A>=t||A<0||p&&E>=o}function b(){var T=ck();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(ck())}function $(){var T=ck(),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 $.cancel=S,$.flush=k,$}function uk(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function Q$e(n){return!!n&&typeof n=="object"}function eAe(n){return typeof n=="symbol"||Q$e(n)&&K$e.call(n)==B$e}function mN(n){if(typeof n=="number")return n;if(eAe(n))return hN;if(uk(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=uk(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(j$e,"");var r=V$e.test(n);return r||U$e.test(n)?H$e(n.slice(2),r?2:8):z$e.test(n)?hN:+n}var tAe=X$e;const gN=cn(tAe);var nAe="Expected a function",vN="__lodash_hash_undefined__",rAe="[object Function]",iAe="[object GeneratorFunction]",aAe=/[\\^$.*+?()[\]{}|]/g,oAe=/^\[object .+?Constructor\]$/,sAe=typeof Kt=="object"&&Kt&&Kt.Object===Object&&Kt,lAe=typeof self=="object"&&self&&self.Object===Object&&self,yN=sAe||lAe||Function("return this")();function cAe(n,t){return n==null?void 0:n[t]}function uAe(n){var t=!1;if(n!=null&&typeof n.toString!="function")try{t=!!(n+"")}catch{}return t}var dAe=Array.prototype,pAe=Function.prototype,bN=Object.prototype,dk=yN["__core-js_shared__"],_N=function(){var n=/[^.]+$/.exec(dk&&dk.keys&&dk.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),wN=pAe.toString,pk=bN.hasOwnProperty,fAe=bN.toString,hAe=RegExp("^"+wN.call(pk).replace(aAe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mAe=dAe.splice,gAe=xN(yN,"Map"),dg=xN(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 vAe(){this.__data__=dg?dg(null):{}}function yAe(n){return this.has(n)&&delete this.__data__[n]}function bAe(n){var t=this.__data__;if(dg){var r=t[n];return r===vN?void 0:r}return pk.call(t,n)?t[n]:void 0}function _Ae(n){var t=this.__data__;return dg?t[n]!==void 0:pk.call(t,n)}function wAe(n,t){var r=this.__data__;return r[n]=dg&&t===void 0?vN:t,this}Ru.prototype.clear=vAe,Ru.prototype.delete=yAe,Ru.prototype.get=bAe,Ru.prototype.has=_Ae,Ru.prototype.set=wAe;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 xAe(){this.__data__=[]}function CAe(n){var t=this.__data__,r=Ry(t,n);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():mAe.call(t,r,1),!0}function kAe(n){var t=this.__data__,r=Ry(t,n);return r<0?void 0:t[r][1]}function SAe(n){return Ry(this.__data__,n)>-1}function TAe(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=xAe,Kp.prototype.delete=CAe,Kp.prototype.get=kAe,Kp.prototype.has=SAe,Kp.prototype.set=TAe;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 EAe(){this.__data__={hash:new Ru,map:new(gAe||Kp),string:new Ru}}function $Ae(n){return Ly(this,n).delete(n)}function AAe(n){return Ly(this,n).get(n)}function OAe(n){return Ly(this,n).has(n)}function DAe(n,t){return Ly(this,n).set(n,t),this}Lu.prototype.clear=EAe,Lu.prototype.delete=$Ae,Lu.prototype.get=AAe,Lu.prototype.has=OAe,Lu.prototype.set=DAe;function Ry(n,t){for(var r=n.length;r--;)if(LAe(n[r][0],t))return r;return-1}function MAe(n){if(!CN(n)||IAe(n))return!1;var t=FAe(n)||uAe(n)?hAe:oAe;return t.test(RAe(n))}function Ly(n,t){var r=n.__data__;return PAe(t)?r[typeof t=="string"?"string":"hash"]:r.map}function xN(n,t){var r=cAe(n,t);return MAe(r)?r:void 0}function PAe(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function IAe(n){return!!_N&&_N in n}function RAe(n){if(n!=null){try{return wN.call(n)}catch{}try{return n+""}catch{}}return""}function fk(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new TypeError(nAe);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(fk.Cache||Lu),r}fk.Cache=Lu;function LAe(n,t){return n===t||n!==n&&t!==t}function FAe(n){var t=CN(n)?fAe.call(n):"";return t==rAe||t==iAe}function CN(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}var NAe=fk;const BAe=cn(NAe);var Fu=[],jAe=function(){return Fu.some(function(n){return n.activeTargets.length>0})},zAe=function(){return Fu.some(function(n){return n.skippedTargets.length>0})},kN="ResizeObserver loop completed with undelivered notifications.",VAe=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:kN}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=kN),window.dispatchEvent(n)},pg;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(pg||(pg={}));var Nu=function(n){return Object.freeze(n)},UAe=function(){function n(t,r){this.inlineSize=t,this.blockSize=r,Nu(this)}return n}(),SN=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}(),hk=function(n){return n instanceof SVGElement&&"getBBox"in n},TN=function(n){if(hk(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)},EN=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)},HAe=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},fg=typeof window<"u"?window:{},Fy=new WeakMap,$N=/auto|scroll/,WAe=/^tb|vertical/,GAe=/msie|trident/i.test(fg.navigator&&fg.navigator.userAgent),ts=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 UAe((r?t:n)||0,(r?n:t)||0)},AN=Nu({devicePixelContentBoxSize:Zp(),borderBoxSize:Zp(),contentBoxSize:Zp(),contentRect:new SN(0,0,0,0)}),ON=function(n,t){if(t===void 0&&(t=!1),Fy.has(n)&&!t)return Fy.get(n);if(TN(n))return Fy.set(n,AN),AN;var r=getComputedStyle(n),i=hk(n)&&n.ownerSVGElement&&n.getBBox(),a=!GAe&&r.boxSizing==="border-box",o=WAe.test(r.writingMode||""),s=!i&&$N.test(r.overflowY||""),c=!i&&$N.test(r.overflowX||""),l=i?0:ts(r.paddingTop),u=i?0:ts(r.paddingRight),d=i?0:ts(r.paddingBottom),p=i?0:ts(r.paddingLeft),f=i?0:ts(r.borderTopWidth),h=i?0:ts(r.borderRightWidth),m=i?0:ts(r.borderBottomWidth),g=i?0:ts(r.borderLeftWidth),y=p+u,b=l+d,w=g+h,S=f+m,k=c?n.offsetHeight-S-n.clientHeight:0,$=s?n.offsetWidth-w-n.clientWidth:0,T=a?y+w:0,A=a?b+S:0,E=i?i.width:ts(r.width)-T-$,I=i?i.height:ts(r.height)-A-k,R=E+y+$+w,Y=I+b+k+S,L=Nu({devicePixelContentBoxSize:Zp(Math.round(E*devicePixelRatio),Math.round(I*devicePixelRatio),o),borderBoxSize:Zp(R,Y,o),contentBoxSize:Zp(E,I,o),contentRect:new SN(p,l,E,I)});return Fy.set(n,L),L},DN=function(n,t,r){var i=ON(n,r),a=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(t){case pg.DEVICE_PIXEL_CONTENT_BOX:return s;case pg.BORDER_BOX:return a;default:return o}},qAe=function(){function n(t){var r=ON(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}(),MN=function(n){if(TN(n))return 1/0;for(var t=0,r=n.parentNode;r;)t+=1,r=r.parentNode;return t},YAe=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 qAe(u.target),p=MN(u.target);c.push(d),u.lastReportedSize=DN(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},PN=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()&&(MN(a.target)>n?r.activeTargets.push(a):r.skippedTargets.push(a))})})},KAe=function(){var n=0;for(PN(n);jAe();)n=YAe(),PN(n);return zAe()&&VAe(),n>0},mk,IN=[],ZAe=function(){return IN.splice(0).forEach(function(n){return n()})},JAe=function(n){if(!mk){var t=0,r=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return ZAe()}).observe(r,i),mk=function(){r.textContent="".concat(t?t--:t++)}}IN.push(n),mk()},XAe=function(n){JAe(function(){requestAnimationFrame(n)})},Ny=0,QAe=function(){return!!Ny},eOe=250,tOe={attributes:!0,characterData:!0,childList:!0,subtree:!0},RN=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],LN=function(n){return n===void 0&&(n=0),Date.now()+n},gk=!1,nOe=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=eOe),!gk){gk=!0;var i=LN(t);XAe(function(){var a=!1;try{a=KAe()}finally{if(gk=!1,t=i-LN(),!QAe())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,tOe)};document.body?r():fg.addEventListener("DOMContentLoaded",r)},n.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),RN.forEach(function(r){return fg.addEventListener(r,t.listener,!0)}))},n.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),RN.forEach(function(r){return fg.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},n}(),vk=new nOe,FN=function(n){!Ny&&n>0&&vk.start(),Ny+=n,!Ny&&vk.stop()},rOe=function(n){return!hk(n)&&!HAe(n)&&getComputedStyle(n).display==="inline"},iOe=function(){function n(t,r){this.target=t,this.observedBox=r||pg.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var t=DN(this.target,this.observedBox,!0);return rOe(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},n}(),aOe=function(){function n(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return n}(),By=new WeakMap,NN=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 aOe(t,r);By.set(t,i)},n.observe=function(t,r,i){var a=By.get(t),o=a.observationTargets.length===0;NN(a.observationTargets,r)<0&&(o&&Fu.push(a),a.observationTargets.push(new iOe(r,i&&i.box)),FN(1),vk.schedule())},n.unobserve=function(t,r){var i=By.get(t),a=NN(i.observationTargets,r),o=i.observationTargets.length===1;a>=0&&(o&&Fu.splice(Fu.indexOf(i),1),i.observationTargets.splice(a,1),FN(-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}(),oOe=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(!EN(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(!EN(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}(),sOe=cy,lOe=Ou,cOe=oy,uOe=qp,dOe=TypeError,BN=function(n){return function(t,r,i,a){sOe(r);var o=lOe(t),s=cOe(o),c=uOe(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 dOe("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}},pOe={left:BN(!1),right:BN(!0)},fOe=Ql,hOe=Ur,mOe=fOe(hOe.process)=="process",gOe=qs,vOe=pOe.left,yOe=OL,jN=ly,bOe=mOe,_Oe=yOe("reduce"),wOe=!bOe&&jN>79&&jN<83;gOe({target:"Array",proto:!0,forced:!_Oe||wOe},{reduce:function(t){var r=arguments.length;return vOe(this,t,r,r>1?arguments[1]:void 0)}});var xOe=ma,COe=function(){var n=xOe(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},yk=Vn,kOe=Ur,bk=kOe.RegExp,_k=yk(function(){var n=bk("a","y");return n.lastIndex=2,n.exec("abcd")!=null}),SOe=_k||yk(function(){return!bk("a","y").sticky}),TOe=_k||yk(function(){var n=bk("^r","gy");return n.lastIndex=2,n.exec("str")!=null}),EOe={BROKEN_CARET:TOe,MISSED_STICKY:SOe,UNSUPPORTED_Y:_k},$Oe=Vn,AOe=Ur,OOe=AOe.RegExp,DOe=$Oe(function(){var n=OOe(".","s");return!(n.dotAll&&n.exec(`
|
|
455
455
|
`)&&n.flags==="s")}),MOe=Vn,POe=Ur,IOe=POe.RegExp,ROe=MOe(function(){var n=IOe("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),Jp=Fa,zy=qn,LOe=Pu,FOe=COe,NOe=EOe,BOe=iC,jOe=BC,zOe=Gp.get,VOe=DOe,UOe=ROe,HOe=BOe("native-string-replace",String.prototype.replace),Vy=RegExp.prototype.exec,wk=Vy,WOe=zy("".charAt),GOe=zy("".indexOf),qOe=zy("".replace),xk=zy("".slice),Ck=function(){var n=/a/,t=/b*/g;return Jp(Vy,n,"a"),Jp(Vy,t,"a"),n.lastIndex!==0||t.lastIndex!==0}(),zN=NOe.BROKEN_CARET,kk=/()??/.exec("")[1]!==void 0,YOe=Ck||kk||zN||VOe||UOe;YOe&&(wk=function(t){var r=this,i=zOe(r),a=LOe(t),o=i.raw,s,c,l,u,d,p,f;if(o)return o.lastIndex=r.lastIndex,s=Jp(wk,o,a),r.lastIndex=o.lastIndex,s;var h=i.groups,m=zN&&r.sticky,g=Jp(FOe,r),y=r.source,b=0,w=a;if(m&&(g=qOe(g,"y",""),GOe(g,"g")===-1&&(g+="g"),w=xk(a,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&WOe(a,r.lastIndex-1)!==`
|
|
@@ -2844,7 +2844,7 @@ Minimum version required to store current data is: `+q+`.
|
|
|
2844
2844
|
`);var G=R(B,z,te),ee=s.getSymbolSize(B),ae=new u(ee);return k(ae,B),$(ae),T(ae,B),E(ae,z,0),B>=7&&A(ae,B),I(ae,G),isNaN(K)&&(K=f.getBestMask(ae,E.bind(null,ae,z))),f.applyMask(K,ae),E(ae,z,K),{modules:ae,version:B,errorCorrectionLevel:z,maskPattern:K,segments:te}}a.create=function(B,z){if(typeof B>"u"||B==="")throw new Error("No input text");var K=c.M,te,j;return typeof z<"u"&&(K=c.from(z.errorCorrectionLevel,c.M),te=g.from(z.version),j=f.from(z.maskPattern),z.toSJISFunc&&s.setToSJISFunction(z.toSJISFunc)),L(B,te,K,j)}},{"../utils/buffer":28,"./alignment-pattern":2,"./bit-buffer":4,"./bit-matrix":5,"./error-correction-code":7,"./error-correction-level":8,"./finder-pattern":9,"./format-info":10,"./mask-pattern":13,"./mode":14,"./reed-solomon-encoder":18,"./segments":20,"./utils":21,"./version":23,isarray:33}],18:[function(r,i,a){var o=r("../utils/buffer"),s=r("./polynomial"),c=r("buffer").Buffer;function l(u){this.genPoly=void 0,this.degree=u,this.degree&&this.initialize(this.degree)}l.prototype.initialize=function(d){this.degree=d,this.genPoly=s.generateECPolynomial(this.degree)},l.prototype.encode=function(d){if(!this.genPoly)throw new Error("Encoder not initialized");var p=o.alloc(this.degree),f=c.concat([d,p],d.length+this.degree),h=s.mod(f,this.genPoly),m=this.degree-h.length;if(m>0){var g=o.alloc(this.degree);return h.copy(g,m),g}return h},i.exports=l},{"../utils/buffer":28,"./polynomial":16,buffer:30}],19:[function(r,i,a){var o="[0-9]+",s="[A-Z $%*+\\-./:]+",c="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";c=c.replace(/u/g,"\\u");var l="(?:(?![A-Z0-9 $%*+\\-./:]|"+c+`)(?:.|[\r
|
|
2845
2845
|
]))+`;a.KANJI=new RegExp(c,"g"),a.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),a.BYTE=new RegExp(l,"g"),a.NUMERIC=new RegExp(o,"g"),a.ALPHANUMERIC=new RegExp(s,"g");var u=new RegExp("^"+c+"$"),d=new RegExp("^"+o+"$"),p=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");a.testKanji=function(h){return u.test(h)},a.testNumeric=function(h){return d.test(h)},a.testAlphanumeric=function(h){return p.test(h)}},{}],20:[function(r,i,a){var o=r("./mode"),s=r("./numeric-data"),c=r("./alphanumeric-data"),l=r("./byte-data"),u=r("./kanji-data"),d=r("./regex"),p=r("./utils"),f=r("dijkstrajs");function h($){return unescape(encodeURIComponent($)).length}function m($,T,A){for(var E=[],I;(I=$.exec(A))!==null;)E.push({data:I[0],index:I.index,mode:T,length:I[0].length});return E}function g($){var T=m(d.NUMERIC,o.NUMERIC,$),A=m(d.ALPHANUMERIC,o.ALPHANUMERIC,$),E,I;p.isKanjiModeEnabled()?(E=m(d.BYTE,o.BYTE,$),I=m(d.KANJI,o.KANJI,$)):(E=m(d.BYTE_KANJI,o.BYTE,$),I=[]);var R=T.concat(A,E,I);return R.sort(function(Y,L){return Y.index-L.index}).map(function(Y){return{data:Y.data,mode:Y.mode,length:Y.length}})}function y($,T){switch(T){case o.NUMERIC:return s.getBitsLength($);case o.ALPHANUMERIC:return c.getBitsLength($);case o.KANJI:return u.getBitsLength($);case o.BYTE:return l.getBitsLength($)}}function b($){return $.reduce(function(T,A){var E=T.length-1>=0?T[T.length-1]:null;return E&&E.mode===A.mode?(T[T.length-1].data+=A.data,T):(T.push(A),T)},[])}function w($){for(var T=[],A=0;A<$.length;A++){var E=$[A];switch(E.mode){case o.NUMERIC:T.push([E,{data:E.data,mode:o.ALPHANUMERIC,length:E.length},{data:E.data,mode:o.BYTE,length:E.length}]);break;case o.ALPHANUMERIC:T.push([E,{data:E.data,mode:o.BYTE,length:E.length}]);break;case o.KANJI:T.push([E,{data:E.data,mode:o.BYTE,length:h(E.data)}]);break;case o.BYTE:T.push([{data:E.data,mode:o.BYTE,length:h(E.data)}])}}return T}function S($,T){for(var A={},E={start:{}},I=["start"],R=0;R<$.length;R++){for(var Y=$[R],L=[],D=0;D<Y.length;D++){var B=Y[D],z=""+R+D;L.push(z),A[z]={node:B,lastCount:0},E[z]={};for(var K=0;K<I.length;K++){var te=I[K];A[te]&&A[te].node.mode===B.mode?(E[te][z]=y(A[te].lastCount+B.length,B.mode)-y(A[te].lastCount,B.mode),A[te].lastCount+=B.length):(A[te]&&(A[te].lastCount=B.length),E[te][z]=y(B.length,B.mode)+4+o.getCharCountIndicator(B.mode,T))}}I=L}for(K=0;K<I.length;K++)E[I[K]].end=0;return{map:E,table:A}}function k($,T){var A,E=o.getBestModeForData($);if(A=o.from(T,E),A!==o.BYTE&&A.bit<E.bit)throw new Error('"'+$+'" cannot be encoded with mode '+o.toString(A)+`.
|
|
2846
2846
|
Suggested mode is: `+o.toString(E));switch(A===o.KANJI&&!p.isKanjiModeEnabled()&&(A=o.BYTE),A){case o.NUMERIC:return new s($);case o.ALPHANUMERIC:return new c($);case o.KANJI:return new u($);case o.BYTE:return new l($)}}a.fromArray=function(T){return T.reduce(function(A,E){return typeof E=="string"?A.push(k(E,null)):E.data&&A.push(k(E.data,E.mode)),A},[])},a.fromString=function(T,A){for(var E=g(T,p.isKanjiModeEnabled()),I=w(E),R=S(I,A),Y=f.find_path(R.map,"start","end"),L=[],D=1;D<Y.length-1;D++)L.push(R.table[Y[D]].node);return a.fromArray(b(L))},a.rawSplit=function(T){return a.fromArray(g(T,p.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:31}],21:[function(r,i,a){var o,s=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];a.getSymbolSize=function(l){if(!l)throw new Error('"version" cannot be null or undefined');if(l<1||l>40)throw new Error('"version" should be in range from 1 to 40');return l*4+17},a.getSymbolTotalCodewords=function(l){return s[l]},a.getBCHDigit=function(c){for(var l=0;c!==0;)l++,c>>>=1;return l},a.setToSJISFunction=function(l){if(typeof l!="function")throw new Error('"toSJISFunc" is not a valid function.');o=l},a.isKanjiModeEnabled=function(){return typeof o<"u"},a.toSJIS=function(l){return o(l)}},{}],22:[function(r,i,a){a.isValid=function(s){return!isNaN(s)&&s>=1&&s<=40}},{}],23:[function(r,i,a){var o=r("./utils"),s=r("./error-correction-code"),c=r("./error-correction-level"),l=r("./mode"),u=r("./version-check"),d=r("isarray"),p=7973,f=o.getBCHDigit(p);function h(b,w,S){for(var k=1;k<=40;k++)if(w<=a.getCapacity(k,S,b))return k}function m(b,w){return l.getCharCountIndicator(b,w)+4}function g(b,w){var S=0;return b.forEach(function(k){var $=m(k.mode,w);S+=$+k.getBitsLength()}),S}function y(b,w){for(var S=1;S<=40;S++){var k=g(b,S);if(k<=a.getCapacity(S,w,l.MIXED))return S}}a.from=function(w,S){return u.isValid(w)?parseInt(w,10):S},a.getCapacity=function(w,S,k){if(!u.isValid(w))throw new Error("Invalid QR Code version");typeof k>"u"&&(k=l.BYTE);var $=o.getSymbolTotalCodewords(w),T=s.getTotalCodewordsCount(w,S),A=($-T)*8;if(k===l.MIXED)return A;var E=A-m(k,w);switch(k){case l.NUMERIC:return Math.floor(E/10*3);case l.ALPHANUMERIC:return Math.floor(E/11*2);case l.KANJI:return Math.floor(E/13);case l.BYTE:default:return Math.floor(E/8)}},a.getBestVersionForData=function(w,S){var k,$=c.from(S,c.M);if(d(w)){if(w.length>1)return y(w,$);if(w.length===0)return 1;k=w[0]}else k=w;return h(k.mode,k.getLength(),$)},a.getEncodedBits=function(w){if(!u.isValid(w)||w<7)throw new Error("Invalid QR Code version");for(var S=w<<12;o.getBCHDigit(S)-f>=0;)S^=p<<o.getBCHDigit(S)-f;return w<<12|S}},{"./error-correction-code":7,"./error-correction-level":8,"./mode":14,"./utils":21,"./version-check":22,isarray:33}],24:[function(r,i,a){var o=r("./can-promise"),s=r("./core/qrcode"),c=r("./renderer/canvas"),l=r("./renderer/svg-tag.js");function u(d,p,f,h,m){var g=[].slice.call(arguments,1),y=g.length,b=typeof g[y-1]=="function";if(!b&&!o())throw new Error("Callback required as last argument");if(b){if(y<2)throw new Error("Too few arguments provided");y===2?(m=f,f=p,p=h=void 0):y===3&&(p.getContext&&typeof m>"u"?(m=h,h=void 0):(m=h,h=f,f=p,p=void 0))}else{if(y<1)throw new Error("Too few arguments provided");return y===1?(f=p,p=h=void 0):y===2&&!p.getContext&&(h=f,f=p,p=void 0),new Promise(function(S,k){try{var $=s.create(f,h);S(d($,p,h))}catch(T){k(T)}})}try{var w=s.create(f,h);m(null,d(w,p,h))}catch(S){m(S)}}a.create=s.create,a.toCanvas=u.bind(null,c.render),a.toDataURL=u.bind(null,c.renderToDataURL),a.toString=u.bind(null,function(d,p,f){return l.render(d,f)})},{"./can-promise":1,"./core/qrcode":17,"./renderer/canvas":25,"./renderer/svg-tag.js":26}],25:[function(r,i,a){var o=r("./utils");function s(l,u,d){l.clearRect(0,0,u.width,u.height),u.style||(u.style={}),u.height=d,u.width=d,u.style.height=d+"px",u.style.width=d+"px"}function c(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}a.render=function(u,d,p){var f=p,h=d;typeof f>"u"&&(!d||!d.getContext)&&(f=d,d=void 0),d||(h=c()),f=o.getOptions(f);var m=o.getImageWidth(u.modules.size,f),g=h.getContext("2d"),y=g.createImageData(m,m);return o.qrToImageData(y.data,u,f),s(g,h,m),g.putImageData(y,0,0),h},a.renderToDataURL=function(u,d,p){var f=p;typeof f>"u"&&(!d||!d.getContext)&&(f=d,d=void 0),f||(f={});var h=a.render(u,d,f),m=f.type||"image/png",g=f.rendererOpts||{};return h.toDataURL(m,g.quality)}},{"./utils":27}],26:[function(r,i,a){var o=r("./utils");function s(u,d){var p=u.a/255,f=d+'="'+u.hex+'"';return p<1?f+" "+d+'-opacity="'+p.toFixed(2).slice(1)+'"':f}function c(u,d,p){var f=u+d;return typeof p<"u"&&(f+=" "+p),f}function l(u,d,p){for(var f="",h=0,m=!1,g=0,y=0;y<u.length;y++){var b=Math.floor(y%d),w=Math.floor(y/d);!b&&!m&&(m=!0),u[y]?(g++,y>0&&b>0&&u[y-1]||(f+=m?c("M",b+p,.5+w+p):c("m",h,0),h=0,m=!1),b+1<d&&u[y+1]||(f+=c("h",g),g=0)):h++}return f}a.render=function(d,p,f){var h=o.getOptions(p),m=d.modules.size,g=d.modules.data,y=m+h.margin*2,b=h.color.light.a?"<path "+s(h.color.light,"fill")+' d="M0 0h'+y+"v"+y+'H0z"/>':"",w="<path "+s(h.color.dark,"stroke")+' d="'+l(g,m,h.margin)+'"/>',S='viewBox="0 0 '+y+" "+y+'"',k=h.width?'width="'+h.width+'" height="'+h.width+'" ':"",$='<svg xmlns="http://www.w3.org/2000/svg" '+k+S+' shape-rendering="crispEdges">'+b+w+`</svg>
|
|
2847
|
-
`;return typeof f=="function"&&f(null,$),$}},{"./utils":27}],27:[function(r,i,a){function o(s){if(typeof s=="number"&&(s=s.toString()),typeof s!="string")throw new Error("Color should be defined as hex string");var c=s.slice().replace("#","").split("");if(c.length<3||c.length===5||c.length>8)throw new Error("Invalid hex color: "+s);(c.length===3||c.length===4)&&(c=Array.prototype.concat.apply([],c.map(function(u){return[u,u]}))),c.length===6&&c.push("F","F");var l=parseInt(c.join(""),16);return{r:l>>24&255,g:l>>16&255,b:l>>8&255,a:l&255,hex:"#"+c.slice(0,6).join("")}}a.getOptions=function(c){c||(c={}),c.color||(c.color={});var l=typeof c.margin>"u"||c.margin===null||c.margin<0?4:c.margin,u=c.width&&c.width>=21?c.width:void 0,d=c.scale||4;return{width:u,scale:u?4:d,margin:l,color:{dark:o(c.color.dark||"#000000ff"),light:o(c.color.light||"#ffffffff")},type:c.type,rendererOpts:c.rendererOpts||{}}},a.getScale=function(c,l){return l.width&&l.width>=c+l.margin*2?l.width/(c+l.margin*2):l.scale},a.getImageWidth=function(c,l){var u=a.getScale(c,l);return Math.floor((c+l.margin*2)*u)},a.qrToImageData=function(c,l,u){for(var d=l.modules.size,p=l.modules.data,f=a.getScale(d,u),h=Math.floor((d+u.margin*2)*f),m=u.margin*f,g=[u.color.light,u.color.dark],y=0;y<h;y++)for(var b=0;b<h;b++){var w=(y*h+b)*4,S=u.color.light;if(y>=m&&b>=m&&y<h-m&&b<h-m){var k=Math.floor((y-m)/f),$=Math.floor((b-m)/f);S=g[p[k*d+$]?1:0]}c[w++]=S.r,c[w++]=S.g,c[w++]=S.b,c[w]=S.a}}},{}],28:[function(r,i,a){var o=r("isarray");function s(){try{var T=new Uint8Array(1);return T.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},T.foo()===42}catch{return!1}}l.TYPED_ARRAY_SUPPORT=s();var c=l.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function l(T,A,E){return!l.TYPED_ARRAY_SUPPORT&&!(this instanceof l)?new l(T,A,E):typeof T=="number"?f(this,T):$(this,T,A,E)}l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function u(T){if(T>=c)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c.toString(16)+" bytes");return T|0}function d(T){return T!==T}function p(T,A){var E;return l.TYPED_ARRAY_SUPPORT?(E=new Uint8Array(A),E.__proto__=l.prototype):(E=T,E===null&&(E=new l(A)),E.length=A),E}function f(T,A){var E=p(T,A<0?0:u(A)|0);if(!l.TYPED_ARRAY_SUPPORT)for(var I=0;I<A;++I)E[I]=0;return E}function h(T,A){var E=w(A)|0,I=p(T,E),R=I.write(A);return R!==E&&(I=I.slice(0,R)),I}function m(T,A){for(var E=A.length<0?0:u(A.length)|0,I=p(T,E),R=0;R<E;R+=1)I[R]=A[R]&255;return I}function g(T,A,E,I){if(E<0||A.byteLength<E)throw new RangeError("'offset' is out of bounds");if(A.byteLength<E+(I||0))throw new RangeError("'length' is out of bounds");var R;return E===void 0&&I===void 0?R=new Uint8Array(A):I===void 0?R=new Uint8Array(A,E):R=new Uint8Array(A,E,I),l.TYPED_ARRAY_SUPPORT?R.__proto__=l.prototype:R=m(T,R),R}function y(T,A){if(l.isBuffer(A)){var E=u(A.length)|0,I=p(T,E);return I.length===0||A.copy(I,0,0,E),I}if(A){if(typeof ArrayBuffer<"u"&&A.buffer instanceof ArrayBuffer||"length"in A)return typeof A.length!="number"||d(A.length)?p(T,0):m(T,A);if(A.type==="Buffer"&&Array.isArray(A.data))return m(T,A.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function b(T,A){A=A||1/0;for(var E,I=T.length,R=null,Y=[],L=0;L<I;++L){if(E=T.charCodeAt(L),E>55295&&E<57344){if(!R){if(E>56319){(A-=3)>-1&&Y.push(239,191,189);continue}else if(L+1===I){(A-=3)>-1&&Y.push(239,191,189);continue}R=E;continue}if(E<56320){(A-=3)>-1&&Y.push(239,191,189),R=E;continue}E=(R-55296<<10|E-56320)+65536}else R&&(A-=3)>-1&&Y.push(239,191,189);if(R=null,E<128){if((A-=1)<0)break;Y.push(E)}else if(E<2048){if((A-=2)<0)break;Y.push(E>>6|192,E&63|128)}else if(E<65536){if((A-=3)<0)break;Y.push(E>>12|224,E>>6&63|128,E&63|128)}else if(E<1114112){if((A-=4)<0)break;Y.push(E>>18|240,E>>12&63|128,E>>6&63|128,E&63|128)}else throw new Error("Invalid code point")}return Y}function w(T){if(l.isBuffer(T))return T.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(T)||T instanceof ArrayBuffer))return T.byteLength;typeof T!="string"&&(T=""+T);var A=T.length;return A===0?0:b(T).length}function S(T,A,E,I){for(var R=0;R<I&&!(R+E>=A.length||R>=T.length);++R)A[R+E]=T[R];return R}function k(T,A,E,I){return S(b(A,T.length-E),T,E,I)}function $(T,A,E,I){if(typeof A=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&A instanceof ArrayBuffer?g(T,A,E,I):typeof A=="string"?h(T,A):y(T,A)}l.prototype.write=function(A,E,I){E===void 0?(I=this.length,E=0):I===void 0&&typeof E=="string"?(I=this.length,E=0):isFinite(E)&&(E=E|0,isFinite(I)?I=I|0:I=void 0);var R=this.length-E;if((I===void 0||I>R)&&(I=R),A.length>0&&(I<0||E<0)||E>this.length)throw new RangeError("Attempt to write outside buffer bounds");return k(this,A,E,I)},l.prototype.slice=function(A,E){var I=this.length;A=~~A,E=E===void 0?I:~~E,A<0?(A+=I,A<0&&(A=0)):A>I&&(A=I),E<0?(E+=I,E<0&&(E=0)):E>I&&(E=I),E<A&&(E=A);var R;if(l.TYPED_ARRAY_SUPPORT)R=this.subarray(A,E),R.__proto__=l.prototype;else{var Y=E-A;R=new l(Y,void 0);for(var L=0;L<Y;++L)R[L]=this[L+A]}return R},l.prototype.copy=function(A,E,I,R){if(I||(I=0),!R&&R!==0&&(R=this.length),E>=A.length&&(E=A.length),E||(E=0),R>0&&R<I&&(R=I),R===I||A.length===0||this.length===0)return 0;if(E<0)throw new RangeError("targetStart out of bounds");if(I<0||I>=this.length)throw new RangeError("sourceStart out of bounds");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),A.length-E<R-I&&(R=A.length-E+I);var Y=R-I,L;if(this===A&&I<E&&E<R)for(L=Y-1;L>=0;--L)A[L+E]=this[L+I];else if(Y<1e3||!l.TYPED_ARRAY_SUPPORT)for(L=0;L<Y;++L)A[L+E]=this[L+I];else Uint8Array.prototype.set.call(A,this.subarray(I,I+Y),E);return Y},l.prototype.fill=function(A,E,I){if(typeof A=="string"){if(typeof E=="string"?(E=0,I=this.length):typeof I=="string"&&(I=this.length),A.length===1){var R=A.charCodeAt(0);R<256&&(A=R)}}else typeof A=="number"&&(A=A&255);if(E<0||this.length<E||this.length<I)throw new RangeError("Out of range index");if(I<=E)return this;E=E>>>0,I=I===void 0?this.length:I>>>0,A||(A=0);var Y;if(typeof A=="number")for(Y=E;Y<I;++Y)this[Y]=A;else{var L=l.isBuffer(A)?A:new l(A),D=L.length;for(Y=0;Y<I-E;++Y)this[Y+E]=L[Y%D]}return this},l.concat=function(A,E){if(!o(A))throw new TypeError('"list" argument must be an Array of Buffers');if(A.length===0)return p(null,0);var I;if(E===void 0)for(E=0,I=0;I<A.length;++I)E+=A[I].length;var R=f(null,E),Y=0;for(I=0;I<A.length;++I){var L=A[I];if(!l.isBuffer(L))throw new TypeError('"list" argument must be an Array of Buffers');L.copy(R,Y),Y+=L.length}return R},l.byteLength=w,l.prototype._isBuffer=!0,l.isBuffer=function(A){return!!(A!=null&&A._isBuffer)},i.exports.alloc=function(T){var A=new l(T);return A.fill(0),A},i.exports.from=function(T){return new l(T)}},{isarray:33}],29:[function(r,i,a){a.byteLength=f,a.toByteArray=m,a.fromByteArray=b;for(var o=[],s=[],c=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,d=l.length;u<d;++u)o[u]=l[u],s[l.charCodeAt(u)]=u;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63;function p(w){var S=w.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=w.indexOf("=");k===-1&&(k=S);var $=k===S?0:4-k%4;return[k,$]}function f(w){var S=p(w),k=S[0],$=S[1];return(k+$)*3/4-$}function h(w,S,k){return(S+k)*3/4-k}function m(w){var S,k=p(w),$=k[0],T=k[1],A=new c(h(w,$,T)),E=0,I=T>0?$-4:$,R;for(R=0;R<I;R+=4)S=s[w.charCodeAt(R)]<<18|s[w.charCodeAt(R+1)]<<12|s[w.charCodeAt(R+2)]<<6|s[w.charCodeAt(R+3)],A[E++]=S>>16&255,A[E++]=S>>8&255,A[E++]=S&255;return T===2&&(S=s[w.charCodeAt(R)]<<2|s[w.charCodeAt(R+1)]>>4,A[E++]=S&255),T===1&&(S=s[w.charCodeAt(R)]<<10|s[w.charCodeAt(R+1)]<<4|s[w.charCodeAt(R+2)]>>2,A[E++]=S>>8&255,A[E++]=S&255),A}function g(w){return o[w>>18&63]+o[w>>12&63]+o[w>>6&63]+o[w&63]}function y(w,S,k){for(var $,T=[],A=S;A<k;A+=3)$=(w[A]<<16&16711680)+(w[A+1]<<8&65280)+(w[A+2]&255),T.push(g($));return T.join("")}function b(w){for(var S,k=w.length,$=k%3,T=[],A=16383,E=0,I=k-$;E<I;E+=A)T.push(y(w,E,E+A>I?I:E+A));return $===1?(S=w[k-1],T.push(o[S>>2]+o[S<<4&63]+"==")):$===2&&(S=(w[k-2]<<8)+w[k-1],T.push(o[S>>10]+o[S>>4&63]+o[S<<2&63]+"=")),T.join("")}},{}],30:[function(r,i,a){var o=r("base64-js"),s=r("ieee754"),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=p,a.SlowBuffer=$,a.INSPECT_MAX_BYTES=50;var l=2147483647;a.kMaxLength=l,p.TYPED_ARRAY_SUPPORT=u(),!p.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{var V=new Uint8Array(1),P={foo:function(){return 42}};return Object.setPrototypeOf(P,Uint8Array.prototype),Object.setPrototypeOf(V,P),V.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function d(V){if(V>l)throw new RangeError('The value "'+V+'" is invalid for option "size"');var P=new Uint8Array(V);return Object.setPrototypeOf(P,p.prototype),P}function p(V,P,C){if(typeof V=="number"){if(typeof P=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(V)}return f(V,P,C)}typeof Symbol<"u"&&Symbol.species!=null&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),p.poolSize=8192;function f(V,P,C){if(typeof V=="string")return y(V,P);if(ArrayBuffer.isView(V))return b(V);if(V==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof V);if(U(V,ArrayBuffer)||V&&U(V.buffer,ArrayBuffer))return w(V,P,C);if(typeof V=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var N=V.valueOf&&V.valueOf();if(N!=null&&N!==V)return p.from(N,P,C);var Z=S(V);if(Z)return Z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof V[Symbol.toPrimitive]=="function")return p.from(V[Symbol.toPrimitive]("string"),P,C);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof V)}p.from=function(V,P,C){return f(V,P,C)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function h(V){if(typeof V!="number")throw new TypeError('"size" argument must be of type number');if(V<0)throw new RangeError('The value "'+V+'" is invalid for option "size"')}function m(V,P,C){return h(V),V<=0?d(V):P!==void 0?typeof C=="string"?d(V).fill(P,C):d(V).fill(P):d(V)}p.alloc=function(V,P,C){return m(V,P,C)};function g(V){return h(V),d(V<0?0:k(V)|0)}p.allocUnsafe=function(V){return g(V)},p.allocUnsafeSlow=function(V){return g(V)};function y(V,P){if((typeof P!="string"||P==="")&&(P="utf8"),!p.isEncoding(P))throw new TypeError("Unknown encoding: "+P);var C=T(V,P)|0,N=d(C),Z=N.write(V,P);return Z!==C&&(N=N.slice(0,Z)),N}function b(V){for(var P=V.length<0?0:k(V.length)|0,C=d(P),N=0;N<P;N+=1)C[N]=V[N]&255;return C}function w(V,P,C){if(P<0||V.byteLength<P)throw new RangeError('"offset" is outside of buffer bounds');if(V.byteLength<P+(C||0))throw new RangeError('"length" is outside of buffer bounds');var N;return P===void 0&&C===void 0?N=new Uint8Array(V):C===void 0?N=new Uint8Array(V,P):N=new Uint8Array(V,P,C),Object.setPrototypeOf(N,p.prototype),N}function S(V){if(p.isBuffer(V)){var P=k(V.length)|0,C=d(P);return C.length===0||V.copy(C,0,0,P),C}if(V.length!==void 0)return typeof V.length!="number"||oe(V.length)?d(0):b(V);if(V.type==="Buffer"&&Array.isArray(V.data))return b(V.data)}function k(V){if(V>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return V|0}function $(V){return+V!=V&&(V=0),p.alloc(+V)}p.isBuffer=function(P){return P!=null&&P._isBuffer===!0&&P!==p.prototype},p.compare=function(P,C){if(U(P,Uint8Array)&&(P=p.from(P,P.offset,P.byteLength)),U(C,Uint8Array)&&(C=p.from(C,C.offset,C.byteLength)),!p.isBuffer(P)||!p.isBuffer(C))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(P===C)return 0;for(var N=P.length,Z=C.length,pe=0,be=Math.min(N,Z);pe<be;++pe)if(P[pe]!==C[pe]){N=P[pe],Z=C[pe];break}return N<Z?-1:Z<N?1:0},p.isEncoding=function(P){switch(String(P).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(P,C){if(!Array.isArray(P))throw new TypeError('"list" argument must be an Array of Buffers');if(P.length===0)return p.alloc(0);var N;if(C===void 0)for(C=0,N=0;N<P.length;++N)C+=P[N].length;var Z=p.allocUnsafe(C),pe=0;for(N=0;N<P.length;++N){var be=P[N];if(U(be,Uint8Array)&&(be=p.from(be)),!p.isBuffer(be))throw new TypeError('"list" argument must be an Array of Buffers');be.copy(Z,pe),pe+=be.length}return Z};function T(V,P){if(p.isBuffer(V))return V.length;if(ArrayBuffer.isView(V)||U(V,ArrayBuffer))return V.byteLength;if(typeof V!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof V);var C=V.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&C===0)return 0;for(var Z=!1;;)switch(P){case"ascii":case"latin1":case"binary":return C;case"utf8":case"utf-8":return we(V).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C*2;case"hex":return C>>>1;case"base64":return ie(V).length;default:if(Z)return N?-1:we(V).length;P=(""+P).toLowerCase(),Z=!0}}p.byteLength=T;function A(V,P,C){var N=!1;if((P===void 0||P<0)&&(P=0),P>this.length||((C===void 0||C>this.length)&&(C=this.length),C<=0)||(C>>>=0,P>>>=0,C<=P))return"";for(V||(V="utf8");;)switch(V){case"hex":return ae(this,P,C);case"utf8":case"utf-8":return j(this,P,C);case"ascii":return G(this,P,C);case"latin1":case"binary":return ee(this,P,C);case"base64":return te(this,P,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,P,C);default:if(N)throw new TypeError("Unknown encoding: "+V);V=(V+"").toLowerCase(),N=!0}}p.prototype._isBuffer=!0;function E(V,P,C){var N=V[P];V[P]=V[C],V[C]=N}p.prototype.swap16=function(){var P=this.length;if(P%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var C=0;C<P;C+=2)E(this,C,C+1);return this},p.prototype.swap32=function(){var P=this.length;if(P%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var C=0;C<P;C+=4)E(this,C,C+3),E(this,C+1,C+2);return this},p.prototype.swap64=function(){var P=this.length;if(P%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var C=0;C<P;C+=8)E(this,C,C+7),E(this,C+1,C+6),E(this,C+2,C+5),E(this,C+3,C+4);return this},p.prototype.toString=function(){var P=this.length;return P===0?"":arguments.length===0?j(this,0,P):A.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(P){if(!p.isBuffer(P))throw new TypeError("Argument must be a Buffer");return this===P?!0:p.compare(this,P)===0},p.prototype.inspect=function(){var P="",C=a.INSPECT_MAX_BYTES;return P=this.toString("hex",0,C).replace(/(.{2})/g,"$1 ").trim(),this.length>C&&(P+=" ... "),"<Buffer "+P+">"},c&&(p.prototype[c]=p.prototype.inspect),p.prototype.compare=function(P,C,N,Z,pe){if(U(P,Uint8Array)&&(P=p.from(P,P.offset,P.byteLength)),!p.isBuffer(P))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof P);if(C===void 0&&(C=0),N===void 0&&(N=P?P.length:0),Z===void 0&&(Z=0),pe===void 0&&(pe=this.length),C<0||N>P.length||Z<0||pe>this.length)throw new RangeError("out of range index");if(Z>=pe&&C>=N)return 0;if(Z>=pe)return-1;if(C>=N)return 1;if(C>>>=0,N>>>=0,Z>>>=0,pe>>>=0,this===P)return 0;for(var be=pe-Z,Te=N-C,Ee=Math.min(be,Te),ze=this.slice(Z,pe),Ve=P.slice(C,N),Ge=0;Ge<Ee;++Ge)if(ze[Ge]!==Ve[Ge]){be=ze[Ge],Te=Ve[Ge];break}return be<Te?-1:Te<be?1:0};function I(V,P,C,N,Z){if(V.length===0)return-1;if(typeof C=="string"?(N=C,C=0):C>2147483647?C=2147483647:C<-2147483648&&(C=-2147483648),C=+C,oe(C)&&(C=Z?0:V.length-1),C<0&&(C=V.length+C),C>=V.length){if(Z)return-1;C=V.length-1}else if(C<0)if(Z)C=0;else return-1;if(typeof P=="string"&&(P=p.from(P,N)),p.isBuffer(P))return P.length===0?-1:R(V,P,C,N,Z);if(typeof P=="number")return P=P&255,typeof Uint8Array.prototype.indexOf=="function"?Z?Uint8Array.prototype.indexOf.call(V,P,C):Uint8Array.prototype.lastIndexOf.call(V,P,C):R(V,[P],C,N,Z);throw new TypeError("val must be string, number or Buffer")}function R(V,P,C,N,Z){var pe=1,be=V.length,Te=P.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(V.length<2||P.length<2)return-1;pe=2,be/=2,Te/=2,C/=2}function Ee(Ye,Ae){return pe===1?Ye[Ae]:Ye.readUInt16BE(Ae*pe)}var ze;if(Z){var Ve=-1;for(ze=C;ze<be;ze++)if(Ee(V,ze)===Ee(P,Ve===-1?0:ze-Ve)){if(Ve===-1&&(Ve=ze),ze-Ve+1===Te)return Ve*pe}else Ve!==-1&&(ze-=ze-Ve),Ve=-1}else for(C+Te>be&&(C=be-Te),ze=C;ze>=0;ze--){for(var Ge=!0,nt=0;nt<Te;nt++)if(Ee(V,ze+nt)!==Ee(P,nt)){Ge=!1;break}if(Ge)return ze}return-1}p.prototype.includes=function(P,C,N){return this.indexOf(P,C,N)!==-1},p.prototype.indexOf=function(P,C,N){return I(this,P,C,N,!0)},p.prototype.lastIndexOf=function(P,C,N){return I(this,P,C,N,!1)};function Y(V,P,C,N){C=Number(C)||0;var Z=V.length-C;N?(N=Number(N),N>Z&&(N=Z)):N=Z;var pe=P.length;N>pe/2&&(N=pe/2);for(var be=0;be<N;++be){var Te=parseInt(P.substr(be*2,2),16);if(oe(Te))return be;V[C+be]=Te}return be}function L(V,P,C,N){return ke(we(P,V.length-C),V,C,N)}function D(V,P,C,N){return ke(X(P),V,C,N)}function B(V,P,C,N){return D(V,P,C,N)}function z(V,P,C,N){return ke(ie(P),V,C,N)}function K(V,P,C,N){return ke(ue(P,V.length-C),V,C,N)}p.prototype.write=function(P,C,N,Z){if(C===void 0)Z="utf8",N=this.length,C=0;else if(N===void 0&&typeof C=="string")Z=C,N=this.length,C=0;else if(isFinite(C))C=C>>>0,isFinite(N)?(N=N>>>0,Z===void 0&&(Z="utf8")):(Z=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-C;if((N===void 0||N>pe)&&(N=pe),P.length>0&&(N<0||C<0)||C>this.length)throw new RangeError("Attempt to write outside buffer bounds");Z||(Z="utf8");for(var be=!1;;)switch(Z){case"hex":return Y(this,P,C,N);case"utf8":case"utf-8":return L(this,P,C,N);case"ascii":return D(this,P,C,N);case"latin1":case"binary":return B(this,P,C,N);case"base64":return z(this,P,C,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,P,C,N);default:if(be)throw new TypeError("Unknown encoding: "+Z);Z=(""+Z).toLowerCase(),be=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function te(V,P,C){return P===0&&C===V.length?o.fromByteArray(V):o.fromByteArray(V.slice(P,C))}function j(V,P,C){C=Math.min(V.length,C);for(var N=[],Z=P;Z<C;){var pe=V[Z],be=null,Te=pe>239?4:pe>223?3:pe>191?2:1;if(Z+Te<=C){var Ee,ze,Ve,Ge;switch(Te){case 1:pe<128&&(be=pe);break;case 2:Ee=V[Z+1],(Ee&192)===128&&(Ge=(pe&31)<<6|Ee&63,Ge>127&&(be=Ge));break;case 3:Ee=V[Z+1],ze=V[Z+2],(Ee&192)===128&&(ze&192)===128&&(Ge=(pe&15)<<12|(Ee&63)<<6|ze&63,Ge>2047&&(Ge<55296||Ge>57343)&&(be=Ge));break;case 4:Ee=V[Z+1],ze=V[Z+2],Ve=V[Z+3],(Ee&192)===128&&(ze&192)===128&&(Ve&192)===128&&(Ge=(pe&15)<<18|(Ee&63)<<12|(ze&63)<<6|Ve&63,Ge>65535&&Ge<1114112&&(be=Ge))}}be===null?(be=65533,Te=1):be>65535&&(be-=65536,N.push(be>>>10&1023|55296),be=56320|be&1023),N.push(be),Z+=Te}return q(N)}var M=4096;function q(V){var P=V.length;if(P<=M)return String.fromCharCode.apply(String,V);for(var C="",N=0;N<P;)C+=String.fromCharCode.apply(String,V.slice(N,N+=M));return C}function G(V,P,C){var N="";C=Math.min(V.length,C);for(var Z=P;Z<C;++Z)N+=String.fromCharCode(V[Z]&127);return N}function ee(V,P,C){var N="";C=Math.min(V.length,C);for(var Z=P;Z<C;++Z)N+=String.fromCharCode(V[Z]);return N}function ae(V,P,C){var N=V.length;(!P||P<0)&&(P=0),(!C||C<0||C>N)&&(C=N);for(var Z="",pe=P;pe<C;++pe)Z+=re[V[pe]];return Z}function ve(V,P,C){for(var N=V.slice(P,C),Z="",pe=0;pe<N.length;pe+=2)Z+=String.fromCharCode(N[pe]+N[pe+1]*256);return Z}p.prototype.slice=function(P,C){var N=this.length;P=~~P,C=C===void 0?N:~~C,P<0?(P+=N,P<0&&(P=0)):P>N&&(P=N),C<0?(C+=N,C<0&&(C=0)):C>N&&(C=N),C<P&&(C=P);var Z=this.subarray(P,C);return Object.setPrototypeOf(Z,p.prototype),Z};function ye(V,P,C){if(V%1!==0||V<0)throw new RangeError("offset is not uint");if(V+P>C)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUIntLE=function(P,C,N){P=P>>>0,C=C>>>0,N||ye(P,C,this.length);for(var Z=this[P],pe=1,be=0;++be<C&&(pe*=256);)Z+=this[P+be]*pe;return Z},p.prototype.readUIntBE=function(P,C,N){P=P>>>0,C=C>>>0,N||ye(P,C,this.length);for(var Z=this[P+--C],pe=1;C>0&&(pe*=256);)Z+=this[P+--C]*pe;return Z},p.prototype.readUInt8=function(P,C){return P=P>>>0,C||ye(P,1,this.length),this[P]},p.prototype.readUInt16LE=function(P,C){return P=P>>>0,C||ye(P,2,this.length),this[P]|this[P+1]<<8},p.prototype.readUInt16BE=function(P,C){return P=P>>>0,C||ye(P,2,this.length),this[P]<<8|this[P+1]},p.prototype.readUInt32LE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),(this[P]|this[P+1]<<8|this[P+2]<<16)+this[P+3]*16777216},p.prototype.readUInt32BE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),this[P]*16777216+(this[P+1]<<16|this[P+2]<<8|this[P+3])},p.prototype.readIntLE=function(P,C,N){P=P>>>0,C=C>>>0,N||ye(P,C,this.length);for(var Z=this[P],pe=1,be=0;++be<C&&(pe*=256);)Z+=this[P+be]*pe;return pe*=128,Z>=pe&&(Z-=Math.pow(2,8*C)),Z},p.prototype.readIntBE=function(P,C,N){P=P>>>0,C=C>>>0,N||ye(P,C,this.length);for(var Z=C,pe=1,be=this[P+--Z];Z>0&&(pe*=256);)be+=this[P+--Z]*pe;return pe*=128,be>=pe&&(be-=Math.pow(2,8*C)),be},p.prototype.readInt8=function(P,C){return P=P>>>0,C||ye(P,1,this.length),this[P]&128?(255-this[P]+1)*-1:this[P]},p.prototype.readInt16LE=function(P,C){P=P>>>0,C||ye(P,2,this.length);var N=this[P]|this[P+1]<<8;return N&32768?N|4294901760:N},p.prototype.readInt16BE=function(P,C){P=P>>>0,C||ye(P,2,this.length);var N=this[P+1]|this[P]<<8;return N&32768?N|4294901760:N},p.prototype.readInt32LE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),this[P]|this[P+1]<<8|this[P+2]<<16|this[P+3]<<24},p.prototype.readInt32BE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),this[P]<<24|this[P+1]<<16|this[P+2]<<8|this[P+3]},p.prototype.readFloatLE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),s.read(this,P,!0,23,4)},p.prototype.readFloatBE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),s.read(this,P,!1,23,4)},p.prototype.readDoubleLE=function(P,C){return P=P>>>0,C||ye(P,8,this.length),s.read(this,P,!0,52,8)},p.prototype.readDoubleBE=function(P,C){return P=P>>>0,C||ye(P,8,this.length),s.read(this,P,!1,52,8)};function me(V,P,C,N,Z,pe){if(!p.isBuffer(V))throw new TypeError('"buffer" argument must be a Buffer instance');if(P>Z||P<pe)throw new RangeError('"value" argument is out of bounds');if(C+N>V.length)throw new RangeError("Index out of range")}p.prototype.writeUIntLE=function(P,C,N,Z){if(P=+P,C=C>>>0,N=N>>>0,!Z){var pe=Math.pow(2,8*N)-1;me(this,P,C,N,pe,0)}var be=1,Te=0;for(this[C]=P&255;++Te<N&&(be*=256);)this[C+Te]=P/be&255;return C+N},p.prototype.writeUIntBE=function(P,C,N,Z){if(P=+P,C=C>>>0,N=N>>>0,!Z){var pe=Math.pow(2,8*N)-1;me(this,P,C,N,pe,0)}var be=N-1,Te=1;for(this[C+be]=P&255;--be>=0&&(Te*=256);)this[C+be]=P/Te&255;return C+N},p.prototype.writeUInt8=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,1,255,0),this[C]=P&255,C+1},p.prototype.writeUInt16LE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,2,65535,0),this[C]=P&255,this[C+1]=P>>>8,C+2},p.prototype.writeUInt16BE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,2,65535,0),this[C]=P>>>8,this[C+1]=P&255,C+2},p.prototype.writeUInt32LE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,4,4294967295,0),this[C+3]=P>>>24,this[C+2]=P>>>16,this[C+1]=P>>>8,this[C]=P&255,C+4},p.prototype.writeUInt32BE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,4,4294967295,0),this[C]=P>>>24,this[C+1]=P>>>16,this[C+2]=P>>>8,this[C+3]=P&255,C+4},p.prototype.writeIntLE=function(P,C,N,Z){if(P=+P,C=C>>>0,!Z){var pe=Math.pow(2,8*N-1);me(this,P,C,N,pe-1,-pe)}var be=0,Te=1,Ee=0;for(this[C]=P&255;++be<N&&(Te*=256);)P<0&&Ee===0&&this[C+be-1]!==0&&(Ee=1),this[C+be]=(P/Te>>0)-Ee&255;return C+N},p.prototype.writeIntBE=function(P,C,N,Z){if(P=+P,C=C>>>0,!Z){var pe=Math.pow(2,8*N-1);me(this,P,C,N,pe-1,-pe)}var be=N-1,Te=1,Ee=0;for(this[C+be]=P&255;--be>=0&&(Te*=256);)P<0&&Ee===0&&this[C+be+1]!==0&&(Ee=1),this[C+be]=(P/Te>>0)-Ee&255;return C+N},p.prototype.writeInt8=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,1,127,-128),P<0&&(P=255+P+1),this[C]=P&255,C+1},p.prototype.writeInt16LE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,2,32767,-32768),this[C]=P&255,this[C+1]=P>>>8,C+2},p.prototype.writeInt16BE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,2,32767,-32768),this[C]=P>>>8,this[C+1]=P&255,C+2},p.prototype.writeInt32LE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,4,2147483647,-2147483648),this[C]=P&255,this[C+1]=P>>>8,this[C+2]=P>>>16,this[C+3]=P>>>24,C+4},p.prototype.writeInt32BE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,4,2147483647,-2147483648),P<0&&(P=4294967295+P+1),this[C]=P>>>24,this[C+1]=P>>>16,this[C+2]=P>>>8,this[C+3]=P&255,C+4};function de(V,P,C,N,Z,pe){if(C+N>V.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("Index out of range")}function W(V,P,C,N,Z){return P=+P,C=C>>>0,Z||de(V,P,C,4),s.write(V,P,C,N,23,4),C+4}p.prototype.writeFloatLE=function(P,C,N){return W(this,P,C,!0,N)},p.prototype.writeFloatBE=function(P,C,N){return W(this,P,C,!1,N)};function J(V,P,C,N,Z){return P=+P,C=C>>>0,Z||de(V,P,C,8),s.write(V,P,C,N,52,8),C+8}p.prototype.writeDoubleLE=function(P,C,N){return J(this,P,C,!0,N)},p.prototype.writeDoubleBE=function(P,C,N){return J(this,P,C,!1,N)},p.prototype.copy=function(P,C,N,Z){if(!p.isBuffer(P))throw new TypeError("argument should be a Buffer");if(N||(N=0),!Z&&Z!==0&&(Z=this.length),C>=P.length&&(C=P.length),C||(C=0),Z>0&&Z<N&&(Z=N),Z===N||P.length===0||this.length===0)return 0;if(C<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(Z<0)throw new RangeError("sourceEnd out of bounds");Z>this.length&&(Z=this.length),P.length-C<Z-N&&(Z=P.length-C+N);var pe=Z-N;if(this===P&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(C,N,Z);else if(this===P&&N<C&&C<Z)for(var be=pe-1;be>=0;--be)P[be+C]=this[be+N];else Uint8Array.prototype.set.call(P,this.subarray(N,Z),C);return pe},p.prototype.fill=function(P,C,N,Z){if(typeof P=="string"){if(typeof C=="string"?(Z=C,C=0,N=this.length):typeof N=="string"&&(Z=N,N=this.length),Z!==void 0&&typeof Z!="string")throw new TypeError("encoding must be a string");if(typeof Z=="string"&&!p.isEncoding(Z))throw new TypeError("Unknown encoding: "+Z);if(P.length===1){var pe=P.charCodeAt(0);(Z==="utf8"&&pe<128||Z==="latin1")&&(P=pe)}}else typeof P=="number"?P=P&255:typeof P=="boolean"&&(P=Number(P));if(C<0||this.length<C||this.length<N)throw new RangeError("Out of range index");if(N<=C)return this;C=C>>>0,N=N===void 0?this.length:N>>>0,P||(P=0);var be;if(typeof P=="number")for(be=C;be<N;++be)this[be]=P;else{var Te=p.isBuffer(P)?P:p.from(P,Z),Ee=Te.length;if(Ee===0)throw new TypeError('The value "'+P+'" is invalid for argument "value"');for(be=0;be<N-C;++be)this[be+C]=Te[be%Ee]}return this};var Q=/[^+/0-9A-Za-z-_]/g;function xe(V){if(V=V.split("=")[0],V=V.trim().replace(Q,""),V.length<2)return"";for(;V.length%4!==0;)V=V+"=";return V}function we(V,P){P=P||1/0;for(var C,N=V.length,Z=null,pe=[],be=0;be<N;++be){if(C=V.charCodeAt(be),C>55295&&C<57344){if(!Z){if(C>56319){(P-=3)>-1&&pe.push(239,191,189);continue}else if(be+1===N){(P-=3)>-1&&pe.push(239,191,189);continue}Z=C;continue}if(C<56320){(P-=3)>-1&&pe.push(239,191,189),Z=C;continue}C=(Z-55296<<10|C-56320)+65536}else Z&&(P-=3)>-1&&pe.push(239,191,189);if(Z=null,C<128){if((P-=1)<0)break;pe.push(C)}else if(C<2048){if((P-=2)<0)break;pe.push(C>>6|192,C&63|128)}else if(C<65536){if((P-=3)<0)break;pe.push(C>>12|224,C>>6&63|128,C&63|128)}else if(C<1114112){if((P-=4)<0)break;pe.push(C>>18|240,C>>12&63|128,C>>6&63|128,C&63|128)}else throw new Error("Invalid code point")}return pe}function X(V){for(var P=[],C=0;C<V.length;++C)P.push(V.charCodeAt(C)&255);return P}function ue(V,P){for(var C,N,Z,pe=[],be=0;be<V.length&&!((P-=2)<0);++be)C=V.charCodeAt(be),N=C>>8,Z=C%256,pe.push(Z),pe.push(N);return pe}function ie(V){return o.toByteArray(xe(V))}function ke(V,P,C,N){for(var Z=0;Z<N&&!(Z+C>=P.length||Z>=V.length);++Z)P[Z+C]=V[Z];return Z}function U(V,P){return V instanceof P||V!=null&&V.constructor!=null&&V.constructor.name!=null&&V.constructor.name===P.name}function oe(V){return V!==V}var re=function(){for(var V="0123456789abcdef",P=new Array(256),C=0;C<16;++C)for(var N=C*16,Z=0;Z<16;++Z)P[N+Z]=V[C]+V[Z];return P}()},{"base64-js":29,ieee754:32}],31:[function(r,i,a){var o={single_source_shortest_paths:function(s,c,l){var u={},d={};d[c]=0;var p=o.PriorityQueue.make();p.push(c,0);for(var f,h,m,g,y,b,w,S,k;!p.empty();){f=p.pop(),h=f.value,g=f.cost,y=s[h]||{};for(m in y)y.hasOwnProperty(m)&&(b=y[m],w=g+b,S=d[m],k=typeof d[m]>"u",(k||S>w)&&(d[m]=w,p.push(m,w),u[m]=h))}if(typeof l<"u"&&typeof d[l]>"u"){var $=["Could not find a path from ",c," to ",l,"."].join("");throw new Error($)}return u},extract_shortest_path_from_predecessor_list:function(s,c){for(var l=[],u=c;u;)l.push(u),s[u],u=s[u];return l.reverse(),l},find_path:function(s,c,l){var u=o.single_source_shortest_paths(s,c,l);return o.extract_shortest_path_from_predecessor_list(u,l)},PriorityQueue:{make:function(s){var c=o.PriorityQueue,l={},u;s=s||{};for(u in c)c.hasOwnProperty(u)&&(l[u]=c[u]);return l.queue=[],l.sorter=s.sorter||c.default_sorter,l},default_sorter:function(s,c){return s.cost-c.cost},push:function(s,c){var l={value:s,cost:c};this.queue.push(l),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof i<"u"&&(i.exports=o)},{}],32:[function(r,i,a){a.read=function(o,s,c,l,u){var d,p,f=u*8-l-1,h=(1<<f)-1,m=h>>1,g=-7,y=c?u-1:0,b=c?-1:1,w=o[s+y];for(y+=b,d=w&(1<<-g)-1,w>>=-g,g+=f;g>0;d=d*256+o[s+y],y+=b,g-=8);for(p=d&(1<<-g)-1,d>>=-g,g+=l;g>0;p=p*256+o[s+y],y+=b,g-=8);if(d===0)d=1-m;else{if(d===h)return p?NaN:(w?-1:1)*(1/0);p=p+Math.pow(2,l),d=d-m}return(w?-1:1)*p*Math.pow(2,d-l)},a.write=function(o,s,c,l,u,d){var p,f,h,m=d*8-u-1,g=(1<<m)-1,y=g>>1,b=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=l?0:d-1,S=l?1:-1,k=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(f=isNaN(s)?1:0,p=g):(p=Math.floor(Math.log(s)/Math.LN2),s*(h=Math.pow(2,-p))<1&&(p--,h*=2),p+y>=1?s+=b/h:s+=b*Math.pow(2,1-y),s*h>=2&&(p++,h/=2),p+y>=g?(f=0,p=g):p+y>=1?(f=(s*h-1)*Math.pow(2,u),p=p+y):(f=s*Math.pow(2,y-1)*Math.pow(2,u),p=0));u>=8;o[c+w]=f&255,w+=S,f/=256,u-=8);for(p=p<<u|f,m+=u;m>0;o[c+w]=p&255,w+=S,p/=256,m-=8);o[c+w-S]|=k*128}},{}],33:[function(r,i,a){var o={}.toString;i.exports=Array.isArray||function(s){return o.call(s)=="[object Array]"}},{}]},{},[24])(24)})}),gdt={name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(t){return t(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var t=this,r=this.options,i=this.tag,a=String(this.value);i==="canvas"?G7.toCanvas(this.$el,a,r,function(o){if(o)throw o}):i==="img"?G7.toDataURL(a,r,function(o,s){if(o)throw o;t.$el.src=s}):G7.toString(a,r,function(o,s){if(o)throw o;t.$el.innerHTML=s})}},mounted:function(){this.generate()}};const xOt="";function vdt(n){window.history.replaceState({},"",window.location.href);let t="";const r=(navigator==null?void 0:navigator.userAgent)||"";return r.match("CriOS")?t="googlechromes://":r.match("FxiOS")?t="firefox://":r.match("GSA")&&(t="googleapp://open-url?url="),t+encodeURIComponent(`${window.location.href}#${n}`)}const ydt={name:"BankIdAnswer",components:{QrCode:gdt},mixins:[pt([])],props:{demo:{type:Boolean,default:!1}},data(){return{signAnswerId:null,signInterval:null,view:"form",errorMessage:"",isLoading:!1,qrCode:null,autoStartToken:null,isMobile:!1}},computed:{viewText(){const n=t=>this._document.$t(`answerModal.bankId.component.viewText.${t}`);return{new:{title:n("new.title"),text:n("new.text"),spinnerText:n("new.spinnerText")},waiting:{title:n("waiting.title"),text:n("waiting.text"),spinnerText:n("waiting.spinnerText")},started:{title:n("waiting.title"),text:n("waiting.text"),spinnerText:n("waiting.spinnerText")},signing:{title:n("signing.title"),text:n("signing.text"),spinnerText:n("signing.spinnerText")},error:{title:n("error.title"),text:n("error.text")},canceled:{title:n("canceled.title"),text:n("canceled.text")}}}},watch:{isLoading(n){this.$emit("loading",n)},$route:{immediate:!0,handler(n){n!=null&&n.hash&&this.resumePolling(n.hash.slice(1))}}},created(){this.isMobile=uM()},beforeDestroy(){this.signInterval&&this.stopPolling()},methods:{async submit({answer:n}){try{if(this.isLoading=!0,this.demo){this.view="new",await vp(1e3),this.view="waiting",await vp(1e3),this.view="signing",await vp(1e3),this.onComplete();return}const{id:t,autoStartToken:r,qrCodeData:i}=await n({body:{isAccepted:!0}});r&&(this.autoStartToken=r),i&&(this.qrCode=i),this.signAnswerId=t,this.startPolling(),this.isMobile&&this.triggerAutoStart();return}catch(t){this.onError(t)}},async requestStatus(){if(!this.signAnswerId)throw Error("Missing signAnswerId");try{const{data:n}=await vCe.get(this.signAnswerId);n.qrCodeData&&(this.qrCode=n.qrCodeData),n.status==="completed"?this.onComplete():n.status==="canceled"?this.onCanceled():this.view=n.status}catch(n){this.onError(n)}},async startPolling(){if(!this.signAnswerId)throw Error("Missing signAnswerId");this.signInterval=setInterval(this.requestStatus,1e3)},stopPolling(){clearInterval(this.signInterval),this.autoStartToken=null,this.qrCode=null,this.isLoading=!1},onComplete(){this.stopPolling(),this.$emit("complete")},onCanceled(){this.stopPolling(),this.view="canceled",this.errorMessage=this._document.$t("answerModal.bankId.component.signingInterrupted")},onError(n){var r,i;if(this.stopPolling(),n.httpStatusCode===409)throw n;this.$emit("error"),this.view="error";const t=(i=(r=n.response)==null?void 0:r.data)==null?void 0:i.errorCode;switch(t){case 9001:case 9002:case 9003:case 9004:case 9005:case 9006:case 9007:co.warn(n);break;case 9009:this.$emit("complete");break;default:Rr(n,{showMessage:!1})}this.errorMessage=this.$i18n.te(`errors:${t}`)&&this._document.$t(`answerModal.bankId.component.errors.${t}`)||this._document.$t("answerModal.bankId.component.defaultError")},resumePolling(n){this.view="signing",this.signAnswerId=n,this.startPolling();const t=new URL(window.location.href);t.search="",t.hash="",window.history.replaceState({},"",t.href)},triggerAutoStart(){if(!this.autoStartToken)return;let n="bankid://",t="null";if(this.isMobile){const i=K1e(),a=(navigator==null?void 0:navigator.userAgent)||(navigator==null?void 0:navigator.vendor)||(window==null?void 0:window.opera),o=i==="iOS"&&(/Version\/[\d\.]+.*Safari/.test(a)||/GSA/.test(a)),s=i==="Android"&&/Version\/[\d\.]+.*Chrome/.test(a);(o||s)&&(n="https://app.bankid.com"),i==="iOS"&&this.$view!=="widget"&&(t=vdt(this.signAnswerId))}const r=`${n}/?autostarttoken=${this.autoStartToken}&redirect=${t}`;this.isMobile?document.location=r:document.getElementById("autoStartFrame").src=r}}};var bdt=function(){var i;var t=this,r=t._self._c;return r("div",{staticClass:"flex flex-col items-center -my-4"},[r("iframe",{staticClass:"hidden",attrs:{id:"autoStartFrame",height:"0",width:"0"}}),["form","signing","error","canceled"].includes(t.view)?r("div",{staticClass:"w-[250px] h-[250px] bg-gray-100 rounded-xl flex justify-center items-center"},[r("BaseIcon",{staticClass:"text-gray-500",attrs:{type:"bankId",size:"50"}})],1):t._e(),["new","waiting","started"].includes(t.view)?[t.qrCode?r("QrCode",{attrs:{value:t.qrCode,options:{width:250,errorCorrectionLevel:"L",color:{dark:"#000000"}}}}):t._e()]:t._e(),r("Animation",{staticClass:"w-full"},[r("div",{key:"a",staticClass:"text-sm text-gray-500 pt-4 min-h-[20px]",domProps:{textContent:t._s((i=t.viewText[t.view])==null?void 0:i.spinnerText)}}),!t.isMobile&&["new","waiting","started"].includes(t.view)?r("CButton",{key:"b",staticClass:"mt-4",attrs:{type:"none",pattern:"secondary",size:"small"},on:{click:t.triggerAutoStart}},[t._v(" "+t._s(t._document.$t("answerModal.bankId.component.startOnThisDevice"))+" ")]):t._e()],1),["form","new","waiting","started"].includes(t.view)?t._e():r("div",[r("transition",{attrs:{name:"pop-in"}},[r("div",{staticClass:"bankid-popup",on:{click:()=>{t.view="form",t.isLoading=!1}}},[r("div",{staticClass:"flex flex-col items-center justify-center",staticStyle:{"background-color":"#183e4f",padding:"calc(2.5 * var(--rem)) calc(3 * var(--rem))"}},[r("BaseIcon",{staticClass:"text-white",attrs:{type:"bankId",size:"34"}}),r("div",{staticClass:"pt-4 text-sm font-medium text-white opacity-75",domProps:{textContent:t._s(t.viewText[t.view].text)}})],1),r("div",{staticClass:"flex flex-col items-center justify-center w-full text-center",staticStyle:{padding:"calc(3 * var(--rem)) calc(2 * var(--rem))"}},[t.view==="signing"?[r("div",{staticClass:"spinner"}),r("div",{staticClass:"pt-8 text-gray-500",domProps:{textContent:t._s(t.viewText[t.view].spinnerText)}})]:["error","canceled"].includes(t.view)?[r("BaseIcon",{staticClass:"mb-2.5 text-gray-400",attrs:{type:"error",size:"22"}}),r("div",{staticStyle:{"font-size":"14px"},domProps:{textContent:t._s(t.errorMessage)}}),r("CButton",{staticStyle:{"margin-top":"calc(2.5 * var(--rem))",padding:"1em",height:"initial"},attrs:{loading:t.isLoading,type:"none",pattern:"secondary",size:"small"},on:{click:function(a){t.view="form"}}},[t._v(" "+t._s(t._document.$t("tryAgain"))+" ")])]:t._e()],2)])])],1)],2)},_dt=[],wdt=he(ydt,bdt,_dt,!1,null,"70ee74c1",null,null);const xdt=wdt.exports,COt="",Cdt={name:"DenyAnswer",props:{demo:{type:Boolean,default:!1}},mixins:[pt([])],data(){return{rejectReason:""}},methods:{async submit({update:n,answer:t}){const r=[];this.rejectReason&&r.push({key:"unclear-other",category:"misc",description:this.rejectReason,sentAt:this._document.lastSentAt}),this.demo||(await n({body:{"data.rejectReasons":r}}),await t({body:{isAccepted:!1}})),this.$emit("complete")}}};var kdt=function(){var t=this,r=t._self._c;return r("CInput",{staticStyle:{"margin-bottom":"calc(1.5 * var(--rem))"},attrs:{placeholder:t._document.$t("answerModal.decline.component.inputPlaceholder"),type:"textarea",filled:"","custom-class":"decline-input"},model:{value:t.rejectReason,callback:function(i){t.rejectReason=i},expression:"rejectReason"}})},Sdt=[],Tdt=he(Cdt,kdt,Sdt,!1,null,null,null,null);const Edt=Tdt.exports,kOt="",$dt={components:{Feedback:tdt,Signature:hdt,BankId:xdt,Deny:Edt},mixins:[pt([])],i18nOptions:{namespaces:"temporary",messages:{en:{previewMode:"Preview answer mode"},sv:{previewMode:"Demo - Förhandsgranska"}}},props:{mode:{type:String,default:"accept"},isSender:{type:Boolean,default:!1},fullScreen:{type:Boolean,default:!1},senderActions:{type:Object,default:()=>({})},calcHeight:{type:Boolean,default:!1}},data(){return{page:"start",isFeedbackInitiated:!1,isPosting:!1,actionInvalid:!1}},computed:{answerComponentName(){return this.mode==="decline"?"Deny":this.answerMethod==="bankId"?"BankId":"Signature"},answerType(){return this.mode==="decline"?"decline":this.answerMethod==="bankId"?"bankId":"signature"},isDemo(){return this._document.isPreview&&!this.isSender},signee(){var n,t;return this.isSender?this._document.senderClient:this._document.isPreview?{socialNo:"198710126130",email:"richard@piedpier.com",name:"Richard Hendricks",answerMethod:{accept:(t=(n=this._document.data)==null?void 0:n.defaultAnswerMethod)==null?void 0:t.accept}}:this._document.viewer},answerMethod(){var n;return(n=this.signee.answerMethod)==null?void 0:n.accept},successStrings(){const n=this.signee.email?this._document.$t(`answerModal.${this.answerType}.success.text`,{email:this.signee.email}):this._document.$t(`answerModal.${this.answerType}.success.textFallback`),t=this.signee.email?this._document.$t("answerModal.successTextSingle",{email:this.signee.email}):this._document.$t("answerModal.successTextFallbackSingle"),r=this._document.remainingSignatures===0?t:n;return{title:this._document.$t(`answerModal.${this.answerType}.success.title`),text:r}}},created(){this.calcHeight&&this.$nextTick(()=>this.setFixedHeight())},methods:{...xn({answerCurrentDoc:He.ANSWER_CURRENT_PUBLIC_DOCUMENT,putCurrentDoc:He.PUT_CURRENT_PUBLIC_DOCUMENT,reloadCurrentDocument:He.RELOAD_CURRENT_DOCUMENT}),async onSubmit(){this.setFixedHeight(),await this.submit()},async submit(){if(!this.isPosting){this.isPosting=!0;try{const{submit:n}=this.$refs.answerComponent;if(typeof n!="function")throw Error("Missing answer type submit method");await n({update:t=>this.putCurrentDoc({includeChanges:!0,...t}),answer:this.answerCurrentDoc,...this.isSender?this.senderActions:null})}catch(n){this.isPosting=!1,n.httpStatusCode===409?this.page="versionError":Rr(n)}}},async onComplete(){var n,t;if(this.isSender&&this.senderActions.send){this.$emit("close"),await this.senderActions.send();return}!this.isDemo&&this.mode==="accept"&&this.answerMethod==="bankId"?this.reloadCurrentDocument().then(()=>{var r,i;return Tr.trigger("document:answer",{id:(r=this._document)==null?void 0:r.id,...(i=this.signee)==null?void 0:i.answer})}):Tr.trigger("document:answer",{id:(n=this._document)==null?void 0:n.id,...(t=this.signee)==null?void 0:t.answer}),await vp(800),this.page="intermediate",await vp(2e3),this.page="success",this.isPosting=!1},reload(){window.location.reload()},setFixedHeight(){this.$el.style.minHeight=`${this.$el.offsetHeight}px`},minimizeHeight(n,t){Ct({targets:n,height:0,flexGrow:[1,0],opacity:[1,0],duration:900,easing:"easeOutQuint",complete:t}),Ct({targets:this.$refs.feedback.$el,height:0,flexGrow:1,duration:900,easing:"easeOutQuint"})},enterAnim(n,t){Ct({targets:n.querySelectorAll(".stagger-anim"),opacity:[0,1],delay:Ct.stagger(180,{start:800}),duration:340,easing:"linear",complete:t})},leaveAnim(n,t){n.style.position="absolute",Ct({targets:n.querySelectorAll(".stagger-anim"),opacity:0,delay:Ct.stagger(200),duration:200,easing:"linear",complete:t})}}};var Adt=function(){var i;var t=this,r=t._self._c;return r("transition-group",{staticClass:"a-root font-inter",attrs:{tag:"div",css:!1,mode:"out-in"},on:{enter:t.enterAnim,leave:t.leaveAnim}},[r("portal",{key:"previewChip",attrs:{to:"modal"}},[r("transition",{attrs:{name:"fade-in",appear:""}},[t.isDemo?r("div",{staticClass:"preview-chip"},[r("span",{domProps:{textContent:t._s(t.$t("previewMode"))}})]):t._e()])],1),r("CButton",{key:"btn",staticStyle:{position:"absolute",right:"20px",top:"20px","z-index":"9",color:"hsl(0, 0%, 45%)"},attrs:{icon:"x",circle:""},on:{click:function(a){t.$parent.$emit("cancel"),t.$emit("close")}}}),t.page==="start"?r("div",{key:"start",staticClass:"flex-grow root-padding"},[r("div",{staticClass:"stagger-anim",staticStyle:{"padding-bottom":"40px"}},[r("div",{staticClass:"a-title",domProps:{textContent:t._s(t._document.$t(`answerModal.${t.answerType}.start.title`))}}),r("div",{staticStyle:{color:"hsl(0, 0%, 40%)"},domProps:{textContent:t._s(t._document.$t(`answerModal.${t.answerType}.start.text`))}})]),r(t.answerComponentName,{ref:"answerComponent",tag:"component",staticClass:"stagger-anim",attrs:{_document:t._document,signee:t.signee,demo:t.isDemo},on:{invalid:function(a){t.actionInvalid=a},loading:function(a){t.isPosting=a},complete:t.onComplete}}),r("div",{staticClass:"stagger-anim",staticStyle:{"padding-top":"3em"}},[r("CButton",{staticClass:"a-btn",attrs:{loading:t.isPosting,disabled:t.actionInvalid,type:t.mode==="decline"?"none":"secondary",icon:t.answerType==="bankId"?"bankId":""},on:{click:t.onSubmit}},[t._v(" "+t._s(t._document.$t(`answerModal.${t.answerType}.start.action`))+" ")])],1)],1):t.page==="intermediate"?r("div",{key:"intermediate",staticClass:"flex flex-col items-center justify-center flex-grow w-full text-center",staticStyle:{height:"100%"}},[r("div",{staticClass:"a-title stagger-anim",domProps:{textContent:t._s(t._document.$t("answerModal.answerSuccess"))}})]):t.page==="success"?r("div",{key:"success",staticClass:"flex flex-col flex-grow w-full",staticStyle:{height:"100%"}},[r("transition",{attrs:{css:!1},on:{leave:t.minimizeHeight}},[t.isFeedbackInitiated?t._e():r("div",{staticClass:"flex flex-col items-center justify-center flex-grow w-full",staticStyle:{overflow:"hidden"}},[r("div",{staticClass:"flex flex-col items-center justify-center w-full root-padding",staticStyle:{height:"100%"}},[r("div",{staticClass:"a-title stagger-anim",staticStyle:{padding:"calc(2.5 * var(--rem)) 0 calc(2 * var(--rem))"}},[r("div",{domProps:{textContent:t._s(t.successStrings.title)}})]),r("div",{staticClass:"stagger-anim",domProps:{textContent:t._s(t.successStrings.text)}})])])]),r("Feedback",{ref:"feedback",staticClass:"stagger-anim",staticStyle:{flex:"0 0",overflow:"hidden","min-height":"200px"},attrs:{"public-id":(i=t._document.viewer)==null?void 0:i.publicDocumentId,demo:t.isDemo,_document:t._document},on:{page:()=>t.isFeedbackInitiated=!0,close:function(a){return t.$emit("close")}}})],1):t.page==="versionError"?r("div",{key:"versionError",staticClass:"flex flex-col items-center justify-center flex-grow text-center root-padding"},[r("div",{staticClass:"stagger-anim"},[r("div",{staticClass:"flex items-center justify-center",staticStyle:{padding:"20px 0"}},[r("div",{staticClass:"flex items-center justify-center",staticStyle:{width:"52px",height:"52px","border-radius":"50%"}},[r("BaseIcon",{attrs:{size:30,type:"error"}})],1)]),r("div",{staticClass:"a-title",domProps:{textContent:t._s(t._document.$t(`answerModal.versionError.${t.mode}.title`))}}),r("div",{domProps:{textContent:t._s(t._document.$t("answerModal.versionError.text"))}})]),r("div",{staticClass:"stagger-anim",staticStyle:{"padding-top":"3em"}},[r("CButton",{staticClass:"a-btn",attrs:{loading:t.isPosting,type:"none"},on:{click:t.reload}},[t._v(" "+t._s(t._document.$t("answerModal.versionError.btn"))+" ")])],1)]):t._e()],1)},Odt=[],Ddt=he($dt,Adt,Odt,!1,null,"de27e507",null,null);const q7=Ddt.exports,Mdt=Object.freeze(Object.defineProperty({__proto__:null,default:q7},Symbol.toStringTag,{value:"Module"})),SOt="",Pdt={name:"DocumentPostSendStep",mixins:[br],i18nOptions:{namespaces:"PostDocumentSend",messages:{en:{title:"Document successfully sent!"},sv:{title:"Dokumentet skickades!"}}},props:{document:{type:Object,required:!0},onCloseFunc:{type:Function,default:null},onCancelFunc:{type:Function,default:null},onSendFunc:{type:Function,default:null}},computed:{modalHeight(){return this.mq==="sm"?"100%":"auto"},usesManualDelivery(){const n=M2(this.document);return!n.sms&&!n.email}},async created(){var n;(n=this.document)!=null&&n.senderClient?await this.senderAnswer():await this.onSend()},methods:{...xn({updateDocument:He.DO_UPDATE_DOCUMENT2,answerDocument:He.ANSWER_OWN_DOCUMENT2,sendDocument:He.DO_SEND_DOCUMENT2}),async handleDocumentLinks(){const{id:n}=this.document,t=M2(this.document),r=!t.sms&&!t.email;r&&(await this.updateDocument({id:n,body:{status:"sent"},showMessage:!1}),Yut({id:n})),r||setTimeout(()=>this.close(),2e3)},async onSend(){typeof this.onSendFunc=="function"&&this.onSendFunc(this.document),await this.handleDocumentLinks()},async senderAnswer(){const{id:n}=this.document,{senderClient:t}=this.document;if(!t||!t.publicDocumentId)return!1;const{accept:r}=t.answerMethod||{};if(!r||r==="button")return!1;const{checksum:i}=this.document._doc||{};return r==="login"?(await this.answerDocument({id:n,publicId:t.publicDocumentId,body:{isAccepted:!0},checksum:i}),await this.sendDocument({id:n}),this.onSend()):(this.$modal.show(q7,{_document:this.document,fullScreen:this.modalHeight==="100%",isSender:!0,senderActions:{answer:async function({body:o}){var s;return this.answerDocument({id:n,publicId:t.publicDocumentId,body:o,checksum:(s=this.document._doc)==null?void 0:s.checksum})}.bind(this),send:async function(){return await this.sendDocument({id:n}),this.onSend()}.bind(this)}},{adaptive:!0,scrollable:!0,height:this.modalHeight,maxWidth:this.modalHeight==="100%"?999:450,classes:"overflow-visible",transition:"fade-in-slide-up"},{cancel:()=>{var a;return(a=this.onCancelFunc)==null?void 0:a.call(this)}}),!0)},close(){this.onCloseFunc&&this.onCloseFunc()}}};var Idt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"font-inter root"},[r("div",{staticClass:"container"},[r("div",{staticClass:"icon-wrapper"},[r("BaseIcon",{attrs:{size:20,type:"email"}})],1),r("div",{staticClass:"title",domProps:{textContent:t._s(t.$t("title"))}}),r("div",{staticClass:"divider"}),r("CButton",{staticClass:"close-button",attrs:{type:"secondary"},on:{click:t.close}},[t._v(" "+t._s(t.$t("_common:close"))+" ")])],1)])},Rdt=[],Ldt=he(Pdt,Idt,Rdt,!1,null,"673cd86f",null,null);const Fdt=Ldt.exports;var Ndt=he({name:"CSkeleton",functional:!0,props:{active:{type:Boolean,default:!0},animated:{type:Boolean,default:!1},width:[Number,String],height:[Number,String],circle:Boolean,rounded:{type:Boolean,default:!0},count:{type:Number,default:1},hidden:{type:[Boolean,String],default:!1},color:{type:String,default:null}},render(n,t){if(!t.props.active)return;const r=[],i=t.props.width,a=t.props.height;for(let o=0;o<t.props.count;o++)r.push(n("div",{staticClass:"c-skeleton-item",class:{"is-rounded":t.props.rounded},key:o,style:{height:a===void 0?null:isNaN(a)?a:a+"px",width:i===void 0?null:isNaN(i)?i:i+"px",borderRadius:t.props.circle?"50%":null,background:t.props.color?t.props.color:null}}));return n("div",{staticStyle:t.data.staticStyle,staticClass:"c-skeleton",class:[t.data.staticClass,{"is-animated":t.props.animated,"is-invisible":t.props.hidden}]},r)}},null,null,!1,null,null,null,null);const xY=Ndt.exports,AOt="",Bdt={name:"CAutocomplete",components:{CInput:al},mixins:[OS],inheritAttrs:!1,props:{value:[Number,String],data:{type:Array,default:()=>[]},field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean,customFormatter:Function,checkInfiniteScroll:Boolean,keepOpen:Boolean,clearable:Boolean,maxHeight:[String,Number],dropdownPosition:{type:String,default:"auto"},iconRight:String,iconRightClickable:Boolean,appendToBody:Boolean},data(){return{selected:null,hovered:null,isActive:!1,newValue:this.value,newAutocomplete:this.autocomplete||"off",isListInViewportVertically:!0,hasFocus:!1,style:{},_isAutocomplete:!0,_elementRef:"input",_bodyEl:void 0}},computed:{whiteList(){const n=[];if(n.push(this.$refs.input.$el.querySelector("input")),n.push(this.$refs.dropdown),this.$refs.dropdown!==void 0){const t=this.$refs.dropdown.querySelectorAll("*");for(const r of t)n.push(r)}if(this.$parent.$data._isTaginput){n.push(this.$parent.$el);const t=this.$parent.$el.querySelectorAll("*");for(const r of t)n.push(r)}return n},hasDefaultSlot(){return!!this.$scopedSlots.default},hasEmptySlot(){return!!this.$slots.empty},hasHeaderSlot(){return!!this.$slots.header},hasFooterSlot(){return!!this.$slots.footer},isOpenedTop(){return this.dropdownPosition==="top"||this.dropdownPosition==="auto"&&!this.isListInViewportVertically},newIconRight(){return this.clearable&&this.newValue?"close-circle":this.iconRight},newIconRightClickable(){return this.clearable?!0:this.iconRightClickable},contentStyle(){return{maxHeight:this.maxHeight===void 0?null:isNaN(this.maxHeight)?this.maxHeight:`${this.maxHeight}px`}},isDropdownOpen(){return this.isActive&&(this.data.length>0||this.hasEmptySlot||this.hasHeaderSlot)}},watch:{isActive(n){this.dropdownPosition==="auto"&&(n?this.calcDropdownInViewportVertical():setTimeout(()=>{this.calcDropdownInViewportVertical()},100)),n&&this.$nextTick(()=>this.setHovered(null))},newValue(n){this.$emit("input",n);const t=this.getValue(this.selected);t&&t!==n&&this.setSelected(null,!1),this.hasFocus&&(!this.openOnFocus||n)&&(this.isActive=!!n)},value(n){this.newValue=n},data(n){this.keepFirst&&this.selectFirstOption(n)}},created(){typeof window<"u"&&(document.addEventListener("click",this.clickedOutside),this.dropdownPosition==="auto"&&window.addEventListener("resize",this.calcDropdownInViewportVertical))},mounted(){if(this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content")){const n=this.$refs.dropdown.querySelector(".dropdown-content");n.addEventListener("scroll",()=>this.checkIfReachedTheEndOfScroll(n))}this.appendToBody&&(this.$data._bodyEl=IW(this.$refs.dropdown),this.updateAppendToBody())},beforeDestroy(){typeof window<"u"&&(document.removeEventListener("click",this.clickedOutside),this.dropdownPosition==="auto"&&window.removeEventListener("resize",this.calcDropdownInViewportVertical)),this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content")&&this.$refs.dropdown.querySelector(".dropdown-content").removeEventListener("scroll",this.checkIfReachedTheEndOfScroll),this.appendToBody&&PW(this.$data._bodyEl)},methods:{setHovered(n){n!==void 0&&(this.hovered=n)},setSelected(n,t=!0){n!==void 0&&(this.selected=n,this.$emit("select",this.selected),this.selected!==null&&(this.newValue=this.clearOnSelect?"":this.getValue(this.selected),this.setHovered(this.clearOnSelect?null:this.hovered)),t&&this.$nextTick(()=>{this.isActive=!1}),this.checkValidity())},selectFirstOption(n){this.$nextTick(()=>{n.length?(this.openOnFocus||this.newValue!==""&&this.hovered!==n[0])&&this.setHovered(n[0]):this.setHovered(null)})},enterPressed(n){this.isDropdownOpen&&(n.preventDefault(),this.hovered!==null&&this.setSelected(this.hovered,!this.keepOpen))},tabPressed(){if(this.hovered===null){this.isActive=!1;return}this.setSelected(this.hovered,!this.keepOpen)},clickedOutside(n){var r;const t=((r=n.path)==null?void 0:r[0])||n.target;this.whiteList.indexOf(t)<0&&(this.isActive=!1)},getValue(n){if(n!==null)return typeof this.customFormatter<"u"?this.customFormatter(n):typeof n=="object"?EJe(n,this.field):n},checkIfReachedTheEndOfScroll(n){n.clientHeight!==n.scrollHeight&&n.scrollTop+n.clientHeight>=n.scrollHeight&&this.$emit("infinite-scroll")},calcDropdownInViewportVertical(){this.$nextTick(()=>{if(this.$refs.dropdown===void 0)return;const n=this.$refs.dropdown.getBoundingClientRect();this.isListInViewportVertically=n.top>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight),this.appendToBody&&this.updateAppendToBody()})},keyArrows(n){const t=n==="down"?1:-1;if(this.isActive){let r=this.data.indexOf(this.hovered)+t;r=r>this.data.length-1?this.data.length:r,r=r<0?0:r,this.setHovered(this.data[r]);const i=this.$refs.dropdown.querySelector(".dropdown-content"),a=i.querySelectorAll("a.dropdown-item:not(.is-disabled)")[r];if(!a)return;const o=i.scrollTop,s=i.scrollTop+i.clientHeight-a.clientHeight;a.offsetTop<o?i.scrollTop=a.offsetTop:a.offsetTop>=s&&(i.scrollTop=a.offsetTop-i.clientHeight+a.clientHeight)}else this.isActive=!0},focused(n){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.data)),this.hasFocus=!0,this.$emit("focus",n)},onBlur(n){this.hasFocus=!1,this.$emit("blur",n)},onInput(n){const t=this.getValue(this.selected);t&&t===this.newValue||(this.$emit("typing",this.newValue),this.checkValidity())},rightIconClick(n){this.clearable?this.newValue="":this.$emit("icon-right-click",n)},checkValidity(){this.useHtml5Validation&&this.$nextTick(()=>{this.checkHtml5Validity()})},updateAppendToBody(){const n=this.$refs.dropdown,t=this.$refs.input.$el;if(n&&t){const r=this.$data._bodyEl;r.classList.forEach(s=>r.classList.remove(s)),r.classList.add("autocomplete"),r.classList.add("control"),this.expandend&&r.classList.add("is-expandend");const i=t.getBoundingClientRect();let a=i.top+window.scrollY;const o=i.left+window.scrollX;this.isOpenedTop?a-=n.clientHeight:a+=t.clientHeight,this.style={position:"absolute",top:`${a}px`,left:`${o}px`,width:`${t.clientWidth}px`,maxWidth:`${t.clientWidth}px`,zIndex:"99"}}}}};var jdt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"autocomplete control",class:{"is-expanded":t.expanded}},[r("CInput",t._b({ref:"input",attrs:{size:t.size,loading:t.loading,rounded:t.rounded,icon:t.icon,"icon-right":t.newIconRight,"icon-right-clickable":t.newIconRightClickable,"icon-pack":t.iconPack,maxlength:t.maxlength,autocomplete:t.newAutocomplete,"use-html5-validation":!1,type:"text"},on:{input:t.onInput,focus:t.focused,blur:t.onBlur,"icon-right-click":t.rightIconClick,"icon-click":i=>t.$emit("icon-click",i)},nativeOn:{keyup:function(i){if(!i.type.indexOf("key")&&t._k(i.keyCode,"esc",27,i.key,["Esc","Escape"]))return null;i.preventDefault(),t.isActive=!1},keydown:[function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"tab",9,i.key,"Tab")?null:t.tabPressed.apply(null,arguments)},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"enter",13,i.key,"Enter")?null:t.enterPressed.apply(null,arguments)},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"up",38,i.key,["Up","ArrowUp"])?null:(i.preventDefault(),t.keyArrows("up"))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"down",40,i.key,["Down","ArrowDown"])?null:(i.preventDefault(),t.keyArrows("down"))}]},model:{value:t.newValue,callback:function(i){t.newValue=i},expression:"newValue"}},"CInput",t.$attrs,!1)),r("transition",{attrs:{name:"fade"}},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isDropdownOpen,expression:"isDropdownOpen"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":t.isOpenedTop&&!t.appendToBody},style:t.style},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"dropdown-content",style:t.contentStyle},[t.hasHeaderSlot?r("div",{staticClass:"dropdown-item"},[t._t("header")],2):t._e(),t._l(t.data,function(i,a){return r("a",{key:a,staticClass:"dropdown-item",class:{"is-hovered":i===t.hovered},on:{click:function(o){return t.setSelected(i,void 0,o)}}},[t.hasDefaultSlot?t._t("default",null,{option:i,index:a}):r("span",[t._v(" "+t._s(t.getValue(i,!0))+" ")])],2)}),t.data.length===0&&t.hasEmptySlot?r("div",{staticClass:"dropdown-item is-disabled"},[t._t("empty")],2):t._e(),t.hasFooterSlot?r("div",{staticClass:"dropdown-item"},[t._t("footer")],2):t._e()],2)])])],1)},zdt=[],Vdt=he(Bdt,jdt,zdt,!1,null,null,null,null);const Udt=Vdt.exports,OOt="",Hdt={name:"CRadio",mixins:[DS]};var Wdt=function(){var t=this,r=t._self._c;return r("label",{ref:"label",staticClass:"b-radio radio",class:[`is-${t.size}`,{"is-disabled":t.disabled}],attrs:{disabled:t.disabled},on:{click:t.focus,keydown:function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"enter",13,i.key,"Enter")?null:(i.preventDefault(),t.$refs.label.click())}}},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.computedValue,expression:"computedValue"}],ref:"input",attrs:{disabled:t.disabled,required:t.required,name:t.name,type:"radio"},domProps:{value:t.nativeValue,checked:t._q(t.computedValue,t.nativeValue)},on:{click:function(i){i.stopPropagation()},change:function(i){t.computedValue=t.nativeValue}}}),r("span",{staticClass:"check",class:`is-${t.type}`}),r("span",{staticClass:"control-label"},[t._t("default")],2)])},Gdt=[],qdt=he(Hdt,Wdt,Gdt,!1,null,null,null,null);const CY=qdt.exports,DOt="",Ydt={name:"CRadioButton",mixins:[DS],components:{CButton:kf},props:{type:{type:String,default:"primary"},expanded:Boolean},data(){return{isFocused:!1}}};var Kdt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"control",class:{"is-expanded":t.expanded}},[r("CButton",{ref:"label",staticClass:"c-radio radio button",class:[{"is-disabled":t.disabled,"is-focused":t.isFocused}],attrs:{tag:"label",type:t.newValue===t.nativeValue?t.type:null,size:t.size,disabled:t.disabled},on:{click:t.focus,keydown:function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"enter",13,i.key,"Enter")?null:(i.preventDefault(),t.$refs.$el.label.click())}}},[t._t("default"),r("input",{directives:[{name:"model",rawName:"v-model",value:t.computedValue,expression:"computedValue"}],ref:"input",attrs:{disabled:t.disabled,required:t.required,name:t.name,type:"radio"},domProps:{value:t.nativeValue,checked:t._q(t.computedValue,t.nativeValue)},on:{click:function(i){i.stopPropagation()},focus:function(i){t.isFocused=!0},blur:function(i){t.isFocused=!1},change:function(i){t.computedValue=t.nativeValue}}})],2)],1)},Zdt=[],Jdt=he(Ydt,Kdt,Zdt,!1,null,null,null,null);const kY=Jdt.exports,MOt="",Xdt={name:"CSelect",mixins:[OS],inheritAttrs:!1,props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},placeholder:String,multiple:Boolean,selectClass:[String,Object,Array],nativeSize:[String,Number]},data(){return{selected:this.value,_elementRef:"select"}},computed:{computedValue:{get(){return this.selected},set(n){this.selected=n,this.$emit("input",n),!this.isValid&&this.checkHtml5Validity()}},spanClasses(){return[this.size,this.statusType,{"is-fullwidth":this.expanded,"is-loading":this.loading,"is-multiple":this.multiple,"is-rounded":this.rounded,"is-empty":this.selected===null}]}},watch:{value(n){this.selected=n,!this.isValid&&this.checkHtml5Validity()}}};var Qdt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"control",class:{"is-expanded":t.expanded,"has-icons-left":t.icon}},[r("span",{staticClass:"select",class:t.spanClasses},[r("select",t._b({directives:[{name:"model",rawName:"v-model",value:t.computedValue,expression:"computedValue"}],ref:"select",class:t.selectClass,attrs:{multiple:t.multiple,size:t.nativeSize},on:{blur:function(i){t.$emit("blur",i)&&t.checkHtml5Validity()},focus:function(i){return t.$emit("focus",i)},change:function(i){var a=Array.prototype.filter.call(i.target.options,function(o){return o.selected}).map(function(o){var s="_value"in o?o._value:o.value;return s});t.computedValue=i.target.multiple?a:a[0]}}},"select",t.$attrs,!1),[t.placeholder&&t.computedValue==null?r("option",{attrs:{disabled:"",hidden:""},domProps:{value:null}},[t._v(" "+t._s(t.placeholder)+" ")]):t._e(),t._t("default")],2)])])},ept=[],tpt=he(Xdt,Qdt,ept,!1,null,"e050ad8b",null,null);const SY=tpt.exports,POt="",npt={name:"CCallout",components:{CButton:kf},props:{title:String,size:String,type:String,padding:String,closable:{type:Boolean,default:!1},legacy:{type:Boolean,default:!0},icon:{type:String,default:null}}};var rpt=function(){var t=this,r=t._self._c;return r("transition",{attrs:{name:"fade"}},[t.legacy?r("article",{staticClass:"message",class:[`is-${t.type}`,`is-${t.size}`]},[r("section",{staticClass:"message-body",style:{padding:t.padding}},[t.title?r("header",{staticClass:"message-header"},[t._v(" "+t._s(t.title)+" ")]):t._e(),r("div",{staticClass:"media"},[r("div",{staticClass:"media-content"},[t._t("default")],2)])]),t.closable?r("CButton",{staticStyle:{right:"calc(0.5 * var(--rem))",position:"absolute",top:"calc(0.5 * var(--rem))"},attrs:{type:t.type,size:"small",pattern:"secondary",circle:"",icon:"x"},on:{click:function(i){return t.$emit("close")}}}):t._e()],1):r("div",{staticClass:"flex p-4 border border-gray-200 rounded-md bg-gray-50"},[t.icon?r("div",{staticClass:"mr-3 -mt-px"},[r("BaseIcon",{attrs:{type:t.icon,size:"16"}})],1):t._e(),r("div",[r("div",[t._t("title",function(){return[r("div",{staticClass:"font-medium"},[t._v(t._s(t.title))])]})],2),r("div",{staticClass:"text-gray-800"},[t._t("default",function(){return[r("div",{staticClass:"mb-2 text-gray-500"},[t._v(t._s(t.text))])]})],2)])])])},ipt=[],apt=he(npt,rpt,ipt,!1,null,"d41b9cf0",null,null);const Y7=apt.exports,IOt="",opt={name:"CSwitch",props:{value:[String,Number,Boolean,Function,Object,Array,Date],nativeValue:[String,Number,Boolean,Function,Object,Array,Date],disabled:Boolean,type:String,name:String,required:Boolean,size:{size:String,default:"default"},trueValue:{type:[String,Number,Boolean,Function,Object,Array,Date],default:!0},falseValue:{type:[String,Number,Boolean,Function,Object,Array,Date],default:!1},rounded:{type:Boolean,default:!0}},data(){return{newValue:this.value}},computed:{computedValue:{get(){return this.newValue},set(n){this.newValue=n,this.$emit("input",n)}},newClass(){return[`is-${this.size}`,{"is-disabled":this.disabled,"is-rounded":this.rounded}]}},watch:{value(n){this.newValue=n}},methods:{focus(){this.$refs.input.focus()}}};var spt=function(){var t=this,r=t._self._c;return r("label",{ref:"label",staticClass:"switch",class:t.newClass,attrs:{disabled:t.disabled},on:{click:t.focus,keydown:function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"enter",13,i.key,"Enter")?null:(i.preventDefault(),t.$refs.label.click())}}},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.computedValue,expression:"computedValue"}],ref:"input",attrs:{disabled:t.disabled,name:t.name,required:t.required,"true-value":t.trueValue,"false-value":t.falseValue,type:"checkbox"},domProps:{value:t.nativeValue,checked:Array.isArray(t.computedValue)?t._i(t.computedValue,t.nativeValue)>-1:t._q(t.computedValue,t.trueValue)},on:{click:function(i){i.stopPropagation()},change:function(i){var a=t.computedValue,o=i.target,s=o.checked?t.trueValue:t.falseValue;if(Array.isArray(a)){var c=t.nativeValue,l=t._i(a,c);o.checked?l<0&&(t.computedValue=a.concat([c])):l>-1&&(t.computedValue=a.slice(0,l).concat(a.slice(l+1)))}else t.computedValue=s}}}),r("span",{staticClass:"check",class:[`is-${t.type}`]}),r("span",{staticClass:"control-label"},[t._t("default")],2)])},lpt=[],cpt=he(opt,spt,lpt,!1,null,"e8ba33eb",null,null);const TY=cpt.exports,upt={name:"CSlotComponent",props:{component:{type:Object,required:!0},name:{type:String,default:"default"},scoped:{type:Boolean},props:{type:Object},tag:{type:String,default:"div"},event:{type:String,default:"hook:updated"}},methods:{refresh(){this.$forceUpdate()},isVueComponent(){return this.component&&this.component._isVue}},created(){this.isVueComponent()&&this.component.$on(this.event,this.refresh)},beforeDestroy(){this.isVueComponent()&&this.component.$off(this.event,this.refresh)},render(n){if(this.isVueComponent())return n(this.tag,{},this.scoped?this.component.$scopedSlots[this.name](this.props):this.component.$slots[this.name])}},ROt="",dpt={name:"CTabs",components:{CSlotComponent:upt},props:{value:[Number,String],expanded:Boolean,type:String,size:String,position:{type:String,validator(n){return["left","right","center"].indexOf(n)>-1},default:null},animated:{type:Boolean,default:!0},destroyOnHide:{type:Boolean,default:!1},vertical:Boolean,multiline:Boolean},data(){return{activeTab:0,defaultSlots:[],contentHeight:0,isTransitioning:!1,_isTabs:!0}},computed:{mainClasses(){return{"is-fullwidth":this.expanded,"is-vertical":this.vertical,"is-multiline":this.multiline,[`is-${this.position}`]:this.position&&this.vertical}},navClasses(){return[this.type,{[`is-${this.size}`]:!!this.size,[`is-${this.position}`]:this.position&&!this.vertical,"is-fullwidth":this.expanded,"is-toggle-rounded is-toggle":this.type==="is-toggle-rounded"}]},tabItems(){return this.defaultSlots.filter(n=>n.componentInstance&&n.componentInstance.$data&&n.componentInstance.$data._isTabItem).map(n=>n.componentInstance)}},watch:{value(n){const t=this.getIndexByValue(n,n);this.changeTab(t)},tabItems(){if(this.activeTab<this.tabItems.length){let n=this.activeTab;this.tabItems.map((t,r)=>{t.isActive&&(n=r,n<this.tabItems.length&&(this.tabItems[n].isActive=!1))}),this.tabItems[this.activeTab].isActive=!0}else this.activeTab>0&&this.changeTab(this.activeTab-1)}},mounted(){this.activeTab=this.getIndexByValue(this.value||0),this.activeTab<this.tabItems.length&&(this.tabItems[this.activeTab].isActive=!0),this.refreshSlots()},methods:{changeTab(n){this.activeTab===n||this.tabItems[n]===void 0||(this.activeTab<this.tabItems.length&&this.tabItems[this.activeTab].deactivate(this.activeTab,n),this.tabItems[n].activate(this.activeTab,n),this.activeTab=n,this.$emit("change",this.getValueByIndex(n)))},tabClick(n){this.activeTab!==n&&(this.$emit("input",this.getValueByIndex(n)),this.changeTab(n))},refreshSlots(){this.defaultSlots=this.$slots.default||[]},getIndexByValue(n){const t=this.tabItems.map(r=>r.$options.propsData?r.$options.propsData.value:void 0).indexOf(n);return t>=0?t:n},getValueByIndex(n){const{propsData:t}=this.tabItems[n].$options;return t&&t.value?t.value:n}}};var ppt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"c-tabs",class:t.mainClasses},[r("nav",{staticClass:"tabs",class:t.navClasses},[r("ul",t._l(t.tabItems,function(i,a){return r("li",{directives:[{name:"show",rawName:"v-show",value:i.visible,expression:"tabItem.visible"}],key:a,class:{"is-active":t.activeTab===a,"is-disabled":i.disabled}},[i.$slots.header?r("CSlotComponent",{attrs:{component:i,name:"header",tag:"a"},nativeOn:{click:function(o){return t.tabClick(a)}}}):r("a",{on:{click:function(o){return t.tabClick(a)}}},[i.icon?r("BaseIcon",{attrs:{size:t.size,type:i.icon}}):t._e(),r("span",[t._v(t._s(i.label))])],1)],1)}),0)]),r("section",{staticClass:"tab-content",class:{"is-transitioning":t.isTransitioning}},[t._t("default")],2)])},fpt=[],hpt=he(dpt,ppt,fpt,!1,null,"e8891cc0",null,null);const EY=hpt.exports;var mpt=he({name:"CTabItem",props:{label:String,icon:String,iconPack:String,disabled:Boolean,visible:{type:Boolean,default:!0},value:[String,Number]},data(){return{isActive:!1,transitionName:null,_isTabItem:!0}},created(){if(!this.$parent.$data._isTabs)throw this.$destroy(),new Error("You should wrap bTabItem on a bTabs");this.$parent.refreshSlots()},beforeDestroy(){this.$parent.refreshSlots()},methods:{activate(n,t){this.transitionName=t<n?this.$parent.vertical?"slide-down":"slide-next":this.$parent.vertical?"slide-up":"slide-prev",this.isActive=!0},deactivate(n,t){this.transitionName=t<n?this.$parent.vertical?"slide-down":"slide-next":this.$parent.vertical?"slide-up":"slide-prev",this.isActive=!1}},render(n){if(this.$parent.destroyOnHide&&(!this.isActive||!this.visible))return;const t=n("div",{directives:[{name:"show",value:this.isActive&&this.visible}],class:"tab-item"},this.$slots.default);return this.$parent.animated?n("transition",{props:{name:this.transitionName,mode:"out-in"},on:{"before-enter":()=>{this.$parent.isTransitioning=!0},"after-enter":()=>{this.$parent.isTransitioning=!1}}},[t]):t}},null,null,!1,null,null,null,null);const $Y=mpt.exports,BOt="",gpt={name:"CMessage",props:{type:{type:String,default:"secondary"},badge:{type:String,default:""},text:{type:String,default:""}}};var vpt=function(t,r){return t("div",{class:[r.data.class,r.data.staticClass],staticStyle:{padding:"0.75em 1em",display:"flex","align-items":"flex-start","border-radius":"0.6em","background-color":"hsl(var(--gray-color-100) / 1)"},style:{...r.data.staticStyle}},[t("div",{class:[`has-background-${r.props.type}`],staticStyle:{display:"inline-block",padding:"0.5em","border-radius":"0.45em","font-weight":"700",color:"white","line-height":"1","font-size":"12px","margin-right":"1.25em"}},[r._v(" "+r._s(r.props.badge||r.parent.$t("components:cling.message.tip"))+" ")]),t("div",{staticStyle:{color:"hsl(0, 0%, 25%)"}},[r.props.text?[r._v(" "+r._s(r.props.text)+" ")]:r._e(),r._t("default")],2)])},ypt=[],bpt=he(gpt,vpt,ypt,!0,null,"9be3b227",null,null);const AY=bpt.exports,_pt={name:"FlagIcon",props:{region:{type:String,default:null},title:{type:String,default:null},isSquared:{type:Boolean,default:!1}},mounted(){var o,s;const n="FLAG_ICONS",t=(s=(o=this.$el).getRootNode)==null?void 0:s.call(o),i=(t==null?void 0:t.toString())==="[object ShadowRoot]"?t:document.head;if(i.querySelector(`#${n}`))return;const a=document.createElement("link");a.id=n,a.rel="stylesheet",a.type="text/css",a.href="https://www.unpkg.com/flag-icons@6.6.6/css/flag-icons.min.css",a.media="all",i.appendChild(a)}};var wpt=function(){var t=this,r=t._self._c;return t.region?r("span",{staticClass:"fi",class:[`fi-${this.region.toLowerCase()}`,{fis:this.isSquared}],attrs:{title:t.title||t.region}}):t._e()},xpt=[],Cpt=he(_pt,wpt,xpt,!1,null,null,null,null);const OY=Cpt.exports,kpt={name:"CPhoneInput",components:{Flag:OY,CInput:al,CDropdown:Of,CDropdownItem:nd,CButton:kf,CField:i7,SmartList:o_},props:{value:{type:[String,Number],default:""},region:{type:String,default:""},defaultRegion:{type:String,required:!0},label:{type:String,default:""},labelPosition:{type:String,default:""}},data(){return{internalPrefix:null,searchQuery:""}},computed:{defaultPrefix(){return zr[this.internalRegion].callingCode},currentRegion(){return this.getRegionByCallingCode(this.prefix)},internalRegion:{get(){if(this.region)return this.region;if(this.value){const n=(Object.keys(zr)||[]).find(t=>zr[t].callingCode&&this.value&&this.value.startsWith(zr[t].callingCode));if(n)return n}return this.internalPrefix?this.getRegionByCallingCode(this.internalPrefix):this.defaultRegion},set(n){this.$emit("update:region",n),this.updateValue({prefix:zr[n].callingCode})}},prefix(){if(!this.value)return this.internalPrefix||this.defaultPrefix;const n=(Object.keys(zr)||[]).find(t=>zr[t].callingCode&&this.value&&this.value.startsWith(zr[t].callingCode));return n?zr[n].callingCode:this.defaultPrefix},phone:{get(){return this.prefix&&this.value&&this.value.startsWith(this.prefix)?this.value.substring(this.prefix.length):this.value},set(n){this.updateValue({phone:n})}},sortedRegions(){return(Object.keys(zr)||[]).map(n=>({key:n,title:`${zr[n].name} (${n})`,callingCode:zr[n].callingCode})).sort((n,t)=>n.title.localeCompare(t.title))}},methods:{getRegionByCallingCode(n){return n?(Object.keys(zr)||[]).find(r=>n===zr[r].callingCode):null},updateValue({prefix:n,phone:t}){const r=n!==void 0?n:this.prefix||"",i=t!==void 0?t:this.phone||"",a=`${r}${i}`;a!==r?(this.$emit("input",a),this.region||this.$emit("update:region",this.internalRegion),this.internalPrefix=null):(this.internalPrefix=r,this.$emit("input",""))}}};var Spt=function(){var t=this,r=t._self._c;return r("CField",{staticClass:"has-addons",attrs:{expanded:""}},[r("div",{staticClass:"control"},[r("SmartList",{attrs:{query:t.searchQuery,items:t.sortedRegions},scopedSlots:t._u([{key:"default",fn:function({items:i}){return[r("CDropdown",{staticClass:"control",staticStyle:{height:"100%"},attrs:{size:t.$attrs.size,disabled:t.$attrs.disabled,"menu-styling":{maxWidth:"300px"},scrollable:!0,position:"is-bottom-right","max-height":"240px"},model:{value:t.internalRegion,callback:function(a){t.internalRegion=a},expression:"internalRegion"}},[r("CButton",{staticStyle:{height:"100%"},attrs:{slot:"trigger",size:t.$attrs.size,type:"none",pattern:"secondary"},slot:"trigger"},[r("Flag",{staticStyle:{"margin-right":"0.35em"},attrs:{region:t.internalRegion}}),t._v(" "+t._s(t.prefix)+" ")],1),r("CInput",{staticStyle:{"margin-bottom":"0.25em"},attrs:{slot:"header",placeholder:t.$t("_common:search"),filled:""},slot:"header",model:{value:t.searchQuery,callback:function(a){t.searchQuery=a},expression:"searchQuery"}}),t._l(i,function({key:a,title:o,callingCode:s}){return r("CDropdownItem",{key:a,staticClass:"truncate-text",attrs:{value:a}},[r("Flag",{staticStyle:{"margin-right":"0.75em",flex:"0 0 auto"},attrs:{region:a,title:o}}),r("span",{staticClass:"truncate-text"},[t._v(" "+t._s(o)+" ("+t._s(s)+") ")])],1)})],2)]}}])})],1),r("CField",{staticClass:"control",attrs:{label:t.label,"label-position":t.labelPosition,expanded:""}},[r("CInput",t._b({attrs:{size:t.$attrs.size,placeholder:t.$attrs.placeholder,type:"tel"},model:{value:t.phone,callback:function(i){t.phone=i},expression:"phone"}},"CInput",{...t.$attrs,...t.$props},!1))],1)],1)},Tpt=[],Ept=he(kpt,Spt,Tpt,!1,null,null,null,null);const DY=Ept.exports,$pt={name:"CSliderThumb",inheritAttrs:!1,props:{value:{type:Number,default:0},type:{type:String,default:""},tooltip:{type:Boolean,default:!0},customFormatter:Function},data(){return{isFocused:!1,dragging:!1,startX:0,startPosition:0,newPosition:null,oldValue:this.value}},computed:{disabled(){return this.$parent.disabled},max(){return this.$parent.max},min(){return this.$parent.min},step(){return this.$parent.step},precision(){return this.$parent.precision},currentPosition(){return`${(this.value-this.min)/(this.max-this.min)*100}%`},wrapperStyle(){return{left:this.currentPosition}},tooltipLabel(){return typeof this.customFormatter<"u"?this.customFormatter(this.value):this.value.toString()}},methods:{onFocus(){this.isFocused=!0},onBlur(){this.isFocused=!1},onButtonDown(n){this.disabled||(n.preventDefault(),this.onDragStart(n),typeof window<"u"&&(document.addEventListener("mousemove",this.onDragging),document.addEventListener("touchmove",this.onDragging),document.addEventListener("mouseup",this.onDragEnd),document.addEventListener("touchend",this.onDragEnd),document.addEventListener("contextmenu",this.onDragEnd)))},onLeftKeyDown(){this.disabled||this.value===this.min||(this.newPosition=parseFloat(this.currentPosition)-this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onRightKeyDown(){this.disabled||this.value===this.max||(this.newPosition=parseFloat(this.currentPosition)+this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onHomeKeyDown(){this.disabled||this.value===this.min||(this.newPosition=0,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onEndKeyDown(){this.disabled||this.value===this.max||(this.newPosition=100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onDragStart(n){this.dragging=!0,this.$emit("dragstart"),n.type==="touchstart"&&(n.clientX=n.touches[0].clientX),this.startX=n.clientX,this.startPosition=parseFloat(this.currentPosition),this.newPosition=this.startPosition},onDragging(n){if(this.dragging){n.type==="touchmove"&&(n.clientX=n.touches[0].clientX);const t=(n.clientX-this.startX)/this.$parent.sliderSize()*100;this.newPosition=this.startPosition+t,this.setPosition(this.newPosition)}},onDragEnd(){this.dragging=!1,this.$emit("dragend"),this.value!==this.oldValue&&this.$parent.emitValue("change"),this.setPosition(this.newPosition),typeof window<"u"&&(document.removeEventListener("mousemove",this.onDragging),document.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd),document.removeEventListener("contextmenu",this.onDragEnd))},setPosition(n){if(n===null||isNaN(n))return;n<0?n=0:n>100&&(n=100);const t=100/((this.max-this.min)/this.step);let i=Math.round(n/t)*t/100*(this.max-this.min)+this.min;i=parseFloat(i.toFixed(this.precision)),this.$emit("input",i),!this.dragging&&i!==this.oldValue&&(this.oldValue=i)}}};var Apt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"c-slider-thumb-wrapper",class:{"is-dragging":t.dragging},style:t.wrapperStyle},[r("div",t._b({staticClass:"c-slider-thumb",attrs:{tabindex:t.disabled?!1:0},on:{mousedown:t.onButtonDown,touchstart:t.onButtonDown,focus:t.onFocus,blur:t.onBlur,keydown:[function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"left",37,i.key,["Left","ArrowLeft"])||"button"in i&&i.button!==0?null:(i.preventDefault(),t.onLeftKeyDown.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"right",39,i.key,["Right","ArrowRight"])||"button"in i&&i.button!==2?null:(i.preventDefault(),t.onRightKeyDown.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"down",40,i.key,["Down","ArrowDown"])?null:(i.preventDefault(),t.onLeftKeyDown.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"up",38,i.key,["Up","ArrowUp"])?null:(i.preventDefault(),t.onRightKeyDown.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"home",void 0,i.key,void 0)?null:(i.preventDefault(),t.onHomeKeyDown.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"end",void 0,i.key,void 0)?null:(i.preventDefault(),t.onEndKeyDown.apply(null,arguments))}]}},"div",t.$attrs,!1))])},Opt=[],Dpt=he($pt,Apt,Opt,!1,null,null,null,null);const Mpt=Dpt.exports,Ppt={name:"CSliderTick",props:{value:{type:Number,default:0}},computed:{position(){const n=(this.value-this.$parent.min)/(this.$parent.max-this.$parent.min)*100;return n>=0&&n<=100?n:0},hidden(){return this.value===this.$parent.min||this.value===this.$parent.max}},created(){if(!this.$parent.$data._isSlider)throw this.$destroy(),new Error("You should wrap bSliderTick on a bSlider")},methods:{getTickStyle(n){return{left:`${n}%`}}}};var Ipt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"c-slider-tick",class:{"is-tick-hidden":t.hidden},style:t.getTickStyle(t.position)},[t.$slots.default?r("span",{staticClass:"c-slider-tick-label"},[t._t("default")],2):t._e()])},Rpt=[],Lpt=he(Ppt,Ipt,Rpt,!1,null,null,null,null);const Fpt=Lpt.exports,jOt="",Npt={name:"CSlider",components:{CSliderThumb:Mpt,CSliderTick:Fpt},props:{value:{type:[Number,Array],default:0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},type:{type:String,default:"primary"},size:String,ticks:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!0},tooltipType:String,rounded:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},customFormatter:Function,ariaLabel:[String,Array],biggerSliderFocus:{type:Boolean,default:!1}},data(){return{value1:null,value2:null,dragging:!1,isRange:!1,_isSlider:!0}},computed:{newTooltipType(){return this.tooltipType?this.tooltipType:this.type},tickValues(){if(!this.ticks||this.min>this.max||this.step===0)return[];const n=[];for(let t=this.min+this.step;t<this.max;t+=this.step)n.push(t);return n},minValue(){return Math.min(this.value1,this.value2)},maxValue(){return Math.max(this.value1,this.value2)},barSize(){return this.isRange?`${100*(this.maxValue-this.minValue)/(this.max-this.min)}%`:`${100*(this.value1-this.min)/(this.max-this.min)}%`},barStart(){return this.isRange?`${100*(this.minValue-this.min)/(this.max-this.min)}%`:"0%"},precision(){const n=[this.min,this.max,this.step].map(t=>{const r=`${t}`.split(".")[1];return r?r.length:0});return Math.max(...n)},barStyle(){return{width:this.barSize,left:this.barStart}},rootClasses(){return{"is-rounded":this.rounded,"is-dragging":this.dragging,"is-disabled":this.disabled,"slider-focus":this.biggerSliderFocus}}},watch:{value(n){this.setValues(n)},value1(){this.onInternalValueUpdate()},value2(){this.onInternalValueUpdate()},min(){this.setValues(this.value)},max(){this.setValues(this.value)}},created(){this.isThumbReversed=!1,this.isTrackClickDisabled=!1,this.setValues(this.value)},methods:{setValues(n){if(!(this.min>this.max))if(Array.isArray(n)){this.isRange=!0;const t=typeof n[0]!="number"||isNaN(n[0])?this.min:v8(n[0],this.min,this.max),r=typeof n[1]!="number"||isNaN(n[1])?this.max:v8(n[1],this.min,this.max);this.value1=this.isThumbReversed?r:t,this.value2=this.isThumbReversed?t:r}else this.isRange=!1,this.value1=isNaN(n)?this.min:v8(n,this.min,this.max),this.value2=null},onInternalValueUpdate(){this.isRange&&(this.isThumbReversed=this.value1>this.value2),(!this.lazy||!this.dragging)&&this.emitValue("input"),this.dragging&&this.emitValue("dragging")},sliderSize(){return this.$refs.slider.getBoundingClientRect().width},onSliderClick(n){if(this.disabled||this.isTrackClickDisabled)return;const t=this.$refs.slider.getBoundingClientRect().left,r=(n.clientX-t)/this.sliderSize()*100,i=this.min+r*(this.max-this.min)/100,a=Math.abs(i-this.value1);if(this.isRange){const o=Math.abs(i-this.value2);if(a<=o){if(a<this.step/2)return;this.$refs.button1.setPosition(r)}else{if(o<this.step/2)return;this.$refs.button2.setPosition(r)}}else{if(a<this.step/2)return;this.$refs.button1.setPosition(r)}this.emitValue("change")},onDragStart(){this.dragging=!0,this.$emit("dragstart")},onDragEnd(){this.isTrackClickDisabled=!0,setTimeout(()=>{this.isTrackClickDisabled=!1},0),this.dragging=!1,this.$emit("dragend"),this.lazy&&this.emitValue("input")},emitValue(n){this.$emit(n,this.isRange?[this.minValue,this.maxValue]:this.value1)}}};var Bpt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"c-slider",class:[`is-${t.size}`,`is-${t.type}`,t.rootClasses],on:{click:t.onSliderClick}},[r("div",{ref:"slider",staticClass:"c-slider-track"},[r("div",{staticClass:"c-slider-fill",style:t.barStyle}),t.ticks?t._l(t.tickValues,function(i,a){return r("CSliderTick",{key:a,attrs:{value:i}})}):t._e(),t._t("default"),r("CSliderThumb",{ref:"button1",attrs:{type:`is-${t.newTooltipType}`,tooltip:t.tooltip,"custom-formatter":t.customFormatter,"aria-valuenow":t.value1,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-label":Array.isArray(t.ariaLabel)?t.ariaLabel[0]:t.ariaLabel,"aria-disabled":t.disabled,role:"slider","aria-orientation":"horizontal"},on:{dragstart:t.onDragStart,dragend:t.onDragEnd},model:{value:t.value1,callback:function(i){t.value1=i},expression:"value1"}}),t.isRange?r("CSliderThumb",{ref:"button2",attrs:{type:t.newTooltipType,tooltip:t.tooltip,"custom-formatter":t.customFormatter,"aria-valuenow":t.value2,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-label":Array.isArray(t.ariaLabel)?t.ariaLabel[1]:"","aria-disabled":t.disabled,role:"slider","aria-orientation":"horizontal"},on:{dragstart:t.onDragStart,dragend:t.onDragEnd},model:{value:t.value2,callback:function(i){t.value2=i},expression:"value2"}}):t._e()],2)])},jpt=[],zpt=he(Npt,Bpt,jpt,!1,null,null,null,null);const MY=zpt.exports;function PY(n){n.component(xY.name,xY),n.component("CAutocomplete",Udt),n.component(Qu.name,Qu),n.component(CY.name,CY),n.component(kY.name,kY),n.component(Of.name,Of),n.component(nd.name,nd),n.component(SY.name,SY),n.component(Y7.name,Y7),n.component(TY.name,TY),n.component(EY.name,EY),n.component($Y.name,$Y),n.component("CField",a7),n.component(AY.name,AY),n.component(DY.name,DY),n.component(MY.name,MY)}Ne.use(PY);const Vpt={name:"DocForm",i18nOptions:{namespaces:"widgetDocForm",messages:{en:{selectNavTitle:"Select a template"},sv:{selectNavTitle:"Välj en mall"}}},components:{TemplateSelector:wQe,DocumentForm:Uut,PostSend:Fdt},props:{setFormValue:{type:Function,default:null},onSaveTemplate:{type:Function,default:null},removeFormValue:{type:Function,default:null},closeFunc:{type:Function,default:null},beforeSave:{type:Function,default:null},beforeSend:{type:Function,default:null},galleryCategory:{type:String,default:null},showBackButton:{type:Boolean,default:!0}},data(){return{view:"editor",document:null}},computed:{...Yy({company:"application/company",feature:"application/feature",can:"application/can",rawDoc:"forms/document",isPosting:"documents2/isPosting",docById:"documents2/byId"})},watch:{rawDoc:{immediate:!0,handler(){this.initDoc()}},document:{immediate:!0,handler(n){const{companyUserId:t,sender:r={}}=n||{},{user:i={}}=r||{};t&&!Object.keys(i).length&&this.loadCompanyUser({id:t})}}},created(){var n;(!this.rawDoc||(n=this.rawDoc)!=null&&n.__isNew)&&(this.view="templateSelect")},methods:{...Ky({removeFormKeyValue:He.REMOVE_FORM_KEY_VALUE,loadDocumentForm:He.LOAD_DOCUMENT2_FORM,duplicateDocumentForm:He.LOAD_DUPLICATE_DOCUMENT2_FORM,saveDocument:He.SAVE_DYNDOC_FORM,loadCompanyUser:He.LOAD_COMPANY_USER}),async initDoc(){if(!this.rawDoc)throw new Error("Missing initiated form document");this.document=new uc({data:this.rawDoc,can:this.can,getters:this.$store.getters,updateSender:!0})},async onTemplateSelect({templateId:n,documentId:t,formData:r}){var a;const i=X4e({...this.rawDoc},["__tempId","externalReferences","subscriberCompanyUserIds","clients","data"]);t?await this.duplicateDocumentForm({id:t,_formData:i}):await this.loadDocumentForm({templateId:n,formData:r?cm(r,i):null,_formData:i}),(a=i==null?void 0:i.data)!=null&&a.name&&this.setDocValue({key:"data.name",value:i.data.name}),await this.initDoc(),this.view="editor"},setDocValue({key:n,value:t}){return this.setFormValue({key:n,value:t})},removeDocValue(n){return this.removeFormValue(n)},removeDocKeyValue(n){return this.removeFormKeyValue(`document2.${n}`)},async onSaveDocument({doSend:n=!1}={}){var o;let t;if(typeof this.beforeSave=="function"&&(t=await this.beforeSave(this.document)),n&&typeof this.beforeSend=="function"&&(t=await this.beforeSend(this.document)),t)return;const r=await this.saveDocument({doSend:n});if(!r)return;const i=this.docById(r);let a;n&&(a=!!(i!=null&&i.senderClient)||this.isManualDelivery(i)),a?(this.document=i,this.view="postSend"):(o=this.closeFunc)==null||o.call(this)},goBack(){this.view="templateSelect",this.setDocValue({key:"__isNew",value:!0})},isManualDelivery(n){const t=M2(n);return!t.sms&&!t.email}}};var Upt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"flex flex-col w-full h-full"},[t.view==="templateSelect"?r("div",{staticClass:"flex flex-col w-full h-full"},[r("div",{staticClass:"relative flex items-center justify-center h-16 border-b border-gray-200"},[t.closeFunc?r("CButton",{staticClass:"absolute -translate-y-1/2 top-1/2 left-4",attrs:{icon:"x",circle:""},on:{click:t.closeFunc}}):t._e(),r("div",[t._v(t._s(t.$t("selectNavTitle")))])],1),r("TemplateSelector",{staticClass:"min-h-0 body-scroll",attrs:{"on-use-template":t.onTemplateSelect,"show-gallery":t.feature("templateGallery"),"show-gallery-template-author":!1,"gallery-category":t.galleryCategory,"on-save-template":t.onSaveTemplate,"include-partner-templates":""}})],1):t.view==="editor"?r("DocumentForm",{attrs:{document:t.document,"set-doc-value":t.setDocValue,"set-form-value":t.setFormValue,"remove-doc-value":t.removeDocValue,"remove-doc-key-value":t.removeDocKeyValue,"on-save-template":t.onSaveTemplate,"on-save-document":t.onSaveDocument,"is-loading":t.isPosting,close:t.closeFunc,"go-back":!t.document.id&&t.showBackButton?t.goBack:null,"can-show-banner":!1}}):r("PostSend",{attrs:{document:t.document,"on-send-func":t.closeFunc,"on-close-func":t.closeFunc}})],1)},Hpt=[],Wpt=he(Vpt,Upt,Hpt,!1,null,null,null,null);const Gpt=Wpt.exports,qpt=Object.freeze(Object.defineProperty({__proto__:null,default:Gpt},Symbol.toStringTag,{value:"Module"}));Ne.use(PY);const K7=Ne.observable({canEdit:!1,isForm:!0,setFormValue:null,removeFormValue:null}),Ypt={name:"DocFormSend",components:{SendForm:lq},provide:()=>({viewSettings:K7,allowSenderSign:!1}),props:{showName:{type:Boolean,default:!0},showSave:{type:Boolean,default:!0},showSchedule:{type:Boolean,default:!0},allowManualDelivery:{type:Boolean,default:!1},contentSlot:{type:String,default:null},footerSlot:{type:String,default:null},setFormValue:{type:Function,default:null},removeFormValue:{type:Function,default:null},closeFunc:{type:Function,default:null},beforeSave:{type:Function,default:null},beforeSend:{type:Function,default:null}},data(){return{document:null}},computed:{...Yy({company:"application/company",can:"application/can",rawDoc:"forms/document",isPosting:"documents2/isPosting"})},watch:{rawDoc:{immediate:!0,handler(){this.initDoc()}}},async created(){this.setDocValue&&(K7.setFormValue=this.setDocValue),this.removeDocValue&&(K7.removeFormValue=this.removeDocValue)},methods:{...Ky({saveDocument:He.SAVE_DYNDOC_FORM}),async initDoc(){if(!this.rawDoc)throw new Error("Missing initiated form document");this.document=new uc({data:this.rawDoc,can:this.can,getters:this.$store.getters,updateSender:!0})},setDocValue({key:n,value:t}){return this.setFormValue({key:n,value:t})},removeDocValue(n){return this.removeFormValue(n)},async onSaveDocument({doSend:n=!1}={}){let t=!1;typeof this.beforeSave=="function"&&(t=await this.beforeSave(this.document)),n&&typeof this.beforeSend=="function"&&(t=await this.beforeSend(this.document)),!(t||!await this.saveDocument({doSend:n}))&&this.close()},close(){this.closeFunc()}}};var Kpt=function(){var t=this,r=t._self._c;return t.document?r("SendForm",{staticClass:"w-full h-full",attrs:{_document:t.document,_value:{expiresAt:"data.expiresAt",personalMessage:"data.personalMessage",defaultAnswerMethod:"data.defaultAnswerMethod",clients:"clients",reminders:"data.reminders",name:"data.name"},"show-name":t.showName,"show-save":t.showSave,"show-schedule":t.showSchedule,"allow-manual-delivery":t.allowManualDelivery,"set-form-value":t.setDocValue,"remove-form-value":t.removeDocValue,"on-save-document":t.onSaveDocument,"use-scroll":""}},[t.contentSlot?r("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.contentSlot)},slot:"content"}):t._e(),t.footerSlot?r("div",{attrs:{slot:"footer"},domProps:{innerHTML:t._s(t.footerSlot)},slot:"footer"}):t._e()]):r("div",{staticClass:"grid w-full h-full place-items-center"},[r("BaseIcon",{staticClass:"text-gray-400 animate-spin",attrs:{type:"loader",size:28}})],1)},Zpt=[],Jpt=he(Ypt,Kpt,Zpt,!1,null,null,null,null);const Xpt=Jpt.exports,Qpt=Object.freeze(Object.defineProperty({__proto__:null,default:Xpt},Symbol.toStringTag,{value:"Module"})),zOt="",eft={i18nOptions:{namespaces:"documentPrint",messages:{en:{title:"Print options",appendAttachments:"Append attachments",appendAttachmentsSub:"Append attachments",hideDocumentAttachmentBlocks:"Hide document attachment blocks",hideDocumentAttachmentBlocksTooltip:"Hide blocks with the type of attachments.",showVerification:"Include verification",showVerificationSub:"Signature verification.",showLast4ssn:"Include the last 4 digits of the personal identification number from the BankID signature.",showEvents:"Show events",buttonText:"Download PDF",preparingPdf:"Preparing PDF...",preparingPdfDone:"PDF is complete",preparingPdfError:"Could not create PDF. Try again."},sv:{title:"Utskriftsinställningar",appendAttachments:"Bifoga bilagor",appendAttachmentsSub:"Inkludera bilagor i slutet av PDF:en.",hideDocumentAttachmentBlocks:"Göm dokumentblock som är bilagor",hideDocumentAttachmentBlocksTooltip:"Dölj blocken av typen bilagor.",showVerification:"Inkludera verifikat",showVerificationSub:"Signaturverifikat.",showLast4ssn:"Inkludera de sista 4-siffrorna i personnummret från BankID-signaturen",showEvents:"Visa händelser",buttonText:"Ladda ner PDF",preparingPdf:"Förbereder PDF...",preparingPdfDone:"PDF är redo",preparingPdfError:"Kunde inte skapa PDF. Pröva igen."}}},name:"DocumentPrint",components:{CCheckbox:Qu},props:{document:{type:Object,required:!0},isSuperUser:{type:Boolean,required:!1}},data(){return{options:{appendAttachments:!0,hideDocumentAttachmentBlocks:!1,showVerification:!0,showEvents:!0,showLast4ssn:!0,forceDoCreatePdf:!1,debugPage:!1,extraTimeout:0},showMoreOptions:!1,omitAttachmentBlockTooltip:{content:'<svg style="margin-top: 2px;" width="193" height="122" viewBox="0 0 193 122" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="193" height="122" rx="5" fill="white"/><text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" font-weight="bold" letter-spacing="0em"><tspan x="13" y="25.5">'+this.$t("_common:attachment_plural").capitalize()+`</tspan></text><path d="M14 33H25.2941L30 38.225V52H14V33Z" fill="#FFC4C4"/><path opacity="0.34" d="M14 60H25.5L30 64.5V79H14V60Z" fill="#42A4FF"/><text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0em"><tspan x="41" y="46.5">${this.$t("_common:file").capitalize()} #1</tspan></text><text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0em"><tspan x="41" y="73.5">${this.$t("_common:file").capitalize()} #2</tspan></text><rect x="13" y="87" width="61" height="12" fill="#E2E2E2"/><rect x="13" y="103" width="168" height="6" fill="#E2E2E2"/><rect x="13" y="112" width="151" height="6" fill="#E2E2E2"/><rect x="13" y="3" width="97" height="6" fill="#E2E2E2"/><rect x="14" y="47" width="16" height="5" fill="#FF1515"/><rect x="14" y="74" width="16" height="5" fill="#42A4FF"/></svg><div style="max-width: 193px; padding: 2px 0 8px 0;">
|
|
2847
|
+
`;return typeof f=="function"&&f(null,$),$}},{"./utils":27}],27:[function(r,i,a){function o(s){if(typeof s=="number"&&(s=s.toString()),typeof s!="string")throw new Error("Color should be defined as hex string");var c=s.slice().replace("#","").split("");if(c.length<3||c.length===5||c.length>8)throw new Error("Invalid hex color: "+s);(c.length===3||c.length===4)&&(c=Array.prototype.concat.apply([],c.map(function(u){return[u,u]}))),c.length===6&&c.push("F","F");var l=parseInt(c.join(""),16);return{r:l>>24&255,g:l>>16&255,b:l>>8&255,a:l&255,hex:"#"+c.slice(0,6).join("")}}a.getOptions=function(c){c||(c={}),c.color||(c.color={});var l=typeof c.margin>"u"||c.margin===null||c.margin<0?4:c.margin,u=c.width&&c.width>=21?c.width:void 0,d=c.scale||4;return{width:u,scale:u?4:d,margin:l,color:{dark:o(c.color.dark||"#000000ff"),light:o(c.color.light||"#ffffffff")},type:c.type,rendererOpts:c.rendererOpts||{}}},a.getScale=function(c,l){return l.width&&l.width>=c+l.margin*2?l.width/(c+l.margin*2):l.scale},a.getImageWidth=function(c,l){var u=a.getScale(c,l);return Math.floor((c+l.margin*2)*u)},a.qrToImageData=function(c,l,u){for(var d=l.modules.size,p=l.modules.data,f=a.getScale(d,u),h=Math.floor((d+u.margin*2)*f),m=u.margin*f,g=[u.color.light,u.color.dark],y=0;y<h;y++)for(var b=0;b<h;b++){var w=(y*h+b)*4,S=u.color.light;if(y>=m&&b>=m&&y<h-m&&b<h-m){var k=Math.floor((y-m)/f),$=Math.floor((b-m)/f);S=g[p[k*d+$]?1:0]}c[w++]=S.r,c[w++]=S.g,c[w++]=S.b,c[w]=S.a}}},{}],28:[function(r,i,a){var o=r("isarray");function s(){try{var T=new Uint8Array(1);return T.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},T.foo()===42}catch{return!1}}l.TYPED_ARRAY_SUPPORT=s();var c=l.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function l(T,A,E){return!l.TYPED_ARRAY_SUPPORT&&!(this instanceof l)?new l(T,A,E):typeof T=="number"?f(this,T):$(this,T,A,E)}l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function u(T){if(T>=c)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c.toString(16)+" bytes");return T|0}function d(T){return T!==T}function p(T,A){var E;return l.TYPED_ARRAY_SUPPORT?(E=new Uint8Array(A),E.__proto__=l.prototype):(E=T,E===null&&(E=new l(A)),E.length=A),E}function f(T,A){var E=p(T,A<0?0:u(A)|0);if(!l.TYPED_ARRAY_SUPPORT)for(var I=0;I<A;++I)E[I]=0;return E}function h(T,A){var E=w(A)|0,I=p(T,E),R=I.write(A);return R!==E&&(I=I.slice(0,R)),I}function m(T,A){for(var E=A.length<0?0:u(A.length)|0,I=p(T,E),R=0;R<E;R+=1)I[R]=A[R]&255;return I}function g(T,A,E,I){if(E<0||A.byteLength<E)throw new RangeError("'offset' is out of bounds");if(A.byteLength<E+(I||0))throw new RangeError("'length' is out of bounds");var R;return E===void 0&&I===void 0?R=new Uint8Array(A):I===void 0?R=new Uint8Array(A,E):R=new Uint8Array(A,E,I),l.TYPED_ARRAY_SUPPORT?R.__proto__=l.prototype:R=m(T,R),R}function y(T,A){if(l.isBuffer(A)){var E=u(A.length)|0,I=p(T,E);return I.length===0||A.copy(I,0,0,E),I}if(A){if(typeof ArrayBuffer<"u"&&A.buffer instanceof ArrayBuffer||"length"in A)return typeof A.length!="number"||d(A.length)?p(T,0):m(T,A);if(A.type==="Buffer"&&Array.isArray(A.data))return m(T,A.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function b(T,A){A=A||1/0;for(var E,I=T.length,R=null,Y=[],L=0;L<I;++L){if(E=T.charCodeAt(L),E>55295&&E<57344){if(!R){if(E>56319){(A-=3)>-1&&Y.push(239,191,189);continue}else if(L+1===I){(A-=3)>-1&&Y.push(239,191,189);continue}R=E;continue}if(E<56320){(A-=3)>-1&&Y.push(239,191,189),R=E;continue}E=(R-55296<<10|E-56320)+65536}else R&&(A-=3)>-1&&Y.push(239,191,189);if(R=null,E<128){if((A-=1)<0)break;Y.push(E)}else if(E<2048){if((A-=2)<0)break;Y.push(E>>6|192,E&63|128)}else if(E<65536){if((A-=3)<0)break;Y.push(E>>12|224,E>>6&63|128,E&63|128)}else if(E<1114112){if((A-=4)<0)break;Y.push(E>>18|240,E>>12&63|128,E>>6&63|128,E&63|128)}else throw new Error("Invalid code point")}return Y}function w(T){if(l.isBuffer(T))return T.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(T)||T instanceof ArrayBuffer))return T.byteLength;typeof T!="string"&&(T=""+T);var A=T.length;return A===0?0:b(T).length}function S(T,A,E,I){for(var R=0;R<I&&!(R+E>=A.length||R>=T.length);++R)A[R+E]=T[R];return R}function k(T,A,E,I){return S(b(A,T.length-E),T,E,I)}function $(T,A,E,I){if(typeof A=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&A instanceof ArrayBuffer?g(T,A,E,I):typeof A=="string"?h(T,A):y(T,A)}l.prototype.write=function(A,E,I){E===void 0?(I=this.length,E=0):I===void 0&&typeof E=="string"?(I=this.length,E=0):isFinite(E)&&(E=E|0,isFinite(I)?I=I|0:I=void 0);var R=this.length-E;if((I===void 0||I>R)&&(I=R),A.length>0&&(I<0||E<0)||E>this.length)throw new RangeError("Attempt to write outside buffer bounds");return k(this,A,E,I)},l.prototype.slice=function(A,E){var I=this.length;A=~~A,E=E===void 0?I:~~E,A<0?(A+=I,A<0&&(A=0)):A>I&&(A=I),E<0?(E+=I,E<0&&(E=0)):E>I&&(E=I),E<A&&(E=A);var R;if(l.TYPED_ARRAY_SUPPORT)R=this.subarray(A,E),R.__proto__=l.prototype;else{var Y=E-A;R=new l(Y,void 0);for(var L=0;L<Y;++L)R[L]=this[L+A]}return R},l.prototype.copy=function(A,E,I,R){if(I||(I=0),!R&&R!==0&&(R=this.length),E>=A.length&&(E=A.length),E||(E=0),R>0&&R<I&&(R=I),R===I||A.length===0||this.length===0)return 0;if(E<0)throw new RangeError("targetStart out of bounds");if(I<0||I>=this.length)throw new RangeError("sourceStart out of bounds");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),A.length-E<R-I&&(R=A.length-E+I);var Y=R-I,L;if(this===A&&I<E&&E<R)for(L=Y-1;L>=0;--L)A[L+E]=this[L+I];else if(Y<1e3||!l.TYPED_ARRAY_SUPPORT)for(L=0;L<Y;++L)A[L+E]=this[L+I];else Uint8Array.prototype.set.call(A,this.subarray(I,I+Y),E);return Y},l.prototype.fill=function(A,E,I){if(typeof A=="string"){if(typeof E=="string"?(E=0,I=this.length):typeof I=="string"&&(I=this.length),A.length===1){var R=A.charCodeAt(0);R<256&&(A=R)}}else typeof A=="number"&&(A=A&255);if(E<0||this.length<E||this.length<I)throw new RangeError("Out of range index");if(I<=E)return this;E=E>>>0,I=I===void 0?this.length:I>>>0,A||(A=0);var Y;if(typeof A=="number")for(Y=E;Y<I;++Y)this[Y]=A;else{var L=l.isBuffer(A)?A:new l(A),D=L.length;for(Y=0;Y<I-E;++Y)this[Y+E]=L[Y%D]}return this},l.concat=function(A,E){if(!o(A))throw new TypeError('"list" argument must be an Array of Buffers');if(A.length===0)return p(null,0);var I;if(E===void 0)for(E=0,I=0;I<A.length;++I)E+=A[I].length;var R=f(null,E),Y=0;for(I=0;I<A.length;++I){var L=A[I];if(!l.isBuffer(L))throw new TypeError('"list" argument must be an Array of Buffers');L.copy(R,Y),Y+=L.length}return R},l.byteLength=w,l.prototype._isBuffer=!0,l.isBuffer=function(A){return!!(A!=null&&A._isBuffer)},i.exports.alloc=function(T){var A=new l(T);return A.fill(0),A},i.exports.from=function(T){return new l(T)}},{isarray:33}],29:[function(r,i,a){a.byteLength=f,a.toByteArray=m,a.fromByteArray=b;for(var o=[],s=[],c=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,d=l.length;u<d;++u)o[u]=l[u],s[l.charCodeAt(u)]=u;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63;function p(w){var S=w.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=w.indexOf("=");k===-1&&(k=S);var $=k===S?0:4-k%4;return[k,$]}function f(w){var S=p(w),k=S[0],$=S[1];return(k+$)*3/4-$}function h(w,S,k){return(S+k)*3/4-k}function m(w){var S,k=p(w),$=k[0],T=k[1],A=new c(h(w,$,T)),E=0,I=T>0?$-4:$,R;for(R=0;R<I;R+=4)S=s[w.charCodeAt(R)]<<18|s[w.charCodeAt(R+1)]<<12|s[w.charCodeAt(R+2)]<<6|s[w.charCodeAt(R+3)],A[E++]=S>>16&255,A[E++]=S>>8&255,A[E++]=S&255;return T===2&&(S=s[w.charCodeAt(R)]<<2|s[w.charCodeAt(R+1)]>>4,A[E++]=S&255),T===1&&(S=s[w.charCodeAt(R)]<<10|s[w.charCodeAt(R+1)]<<4|s[w.charCodeAt(R+2)]>>2,A[E++]=S>>8&255,A[E++]=S&255),A}function g(w){return o[w>>18&63]+o[w>>12&63]+o[w>>6&63]+o[w&63]}function y(w,S,k){for(var $,T=[],A=S;A<k;A+=3)$=(w[A]<<16&16711680)+(w[A+1]<<8&65280)+(w[A+2]&255),T.push(g($));return T.join("")}function b(w){for(var S,k=w.length,$=k%3,T=[],A=16383,E=0,I=k-$;E<I;E+=A)T.push(y(w,E,E+A>I?I:E+A));return $===1?(S=w[k-1],T.push(o[S>>2]+o[S<<4&63]+"==")):$===2&&(S=(w[k-2]<<8)+w[k-1],T.push(o[S>>10]+o[S>>4&63]+o[S<<2&63]+"=")),T.join("")}},{}],30:[function(r,i,a){var o=r("base64-js"),s=r("ieee754"),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=p,a.SlowBuffer=$,a.INSPECT_MAX_BYTES=50;var l=2147483647;a.kMaxLength=l,p.TYPED_ARRAY_SUPPORT=u(),!p.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{var V=new Uint8Array(1),P={foo:function(){return 42}};return Object.setPrototypeOf(P,Uint8Array.prototype),Object.setPrototypeOf(V,P),V.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function d(V){if(V>l)throw new RangeError('The value "'+V+'" is invalid for option "size"');var P=new Uint8Array(V);return Object.setPrototypeOf(P,p.prototype),P}function p(V,P,C){if(typeof V=="number"){if(typeof P=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(V)}return f(V,P,C)}typeof Symbol<"u"&&Symbol.species!=null&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),p.poolSize=8192;function f(V,P,C){if(typeof V=="string")return y(V,P);if(ArrayBuffer.isView(V))return b(V);if(V==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof V);if(U(V,ArrayBuffer)||V&&U(V.buffer,ArrayBuffer))return w(V,P,C);if(typeof V=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var N=V.valueOf&&V.valueOf();if(N!=null&&N!==V)return p.from(N,P,C);var Z=S(V);if(Z)return Z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof V[Symbol.toPrimitive]=="function")return p.from(V[Symbol.toPrimitive]("string"),P,C);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof V)}p.from=function(V,P,C){return f(V,P,C)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function h(V){if(typeof V!="number")throw new TypeError('"size" argument must be of type number');if(V<0)throw new RangeError('The value "'+V+'" is invalid for option "size"')}function m(V,P,C){return h(V),V<=0?d(V):P!==void 0?typeof C=="string"?d(V).fill(P,C):d(V).fill(P):d(V)}p.alloc=function(V,P,C){return m(V,P,C)};function g(V){return h(V),d(V<0?0:k(V)|0)}p.allocUnsafe=function(V){return g(V)},p.allocUnsafeSlow=function(V){return g(V)};function y(V,P){if((typeof P!="string"||P==="")&&(P="utf8"),!p.isEncoding(P))throw new TypeError("Unknown encoding: "+P);var C=T(V,P)|0,N=d(C),Z=N.write(V,P);return Z!==C&&(N=N.slice(0,Z)),N}function b(V){for(var P=V.length<0?0:k(V.length)|0,C=d(P),N=0;N<P;N+=1)C[N]=V[N]&255;return C}function w(V,P,C){if(P<0||V.byteLength<P)throw new RangeError('"offset" is outside of buffer bounds');if(V.byteLength<P+(C||0))throw new RangeError('"length" is outside of buffer bounds');var N;return P===void 0&&C===void 0?N=new Uint8Array(V):C===void 0?N=new Uint8Array(V,P):N=new Uint8Array(V,P,C),Object.setPrototypeOf(N,p.prototype),N}function S(V){if(p.isBuffer(V)){var P=k(V.length)|0,C=d(P);return C.length===0||V.copy(C,0,0,P),C}if(V.length!==void 0)return typeof V.length!="number"||oe(V.length)?d(0):b(V);if(V.type==="Buffer"&&Array.isArray(V.data))return b(V.data)}function k(V){if(V>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return V|0}function $(V){return+V!=V&&(V=0),p.alloc(+V)}p.isBuffer=function(P){return P!=null&&P._isBuffer===!0&&P!==p.prototype},p.compare=function(P,C){if(U(P,Uint8Array)&&(P=p.from(P,P.offset,P.byteLength)),U(C,Uint8Array)&&(C=p.from(C,C.offset,C.byteLength)),!p.isBuffer(P)||!p.isBuffer(C))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(P===C)return 0;for(var N=P.length,Z=C.length,pe=0,be=Math.min(N,Z);pe<be;++pe)if(P[pe]!==C[pe]){N=P[pe],Z=C[pe];break}return N<Z?-1:Z<N?1:0},p.isEncoding=function(P){switch(String(P).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(P,C){if(!Array.isArray(P))throw new TypeError('"list" argument must be an Array of Buffers');if(P.length===0)return p.alloc(0);var N;if(C===void 0)for(C=0,N=0;N<P.length;++N)C+=P[N].length;var Z=p.allocUnsafe(C),pe=0;for(N=0;N<P.length;++N){var be=P[N];if(U(be,Uint8Array)&&(be=p.from(be)),!p.isBuffer(be))throw new TypeError('"list" argument must be an Array of Buffers');be.copy(Z,pe),pe+=be.length}return Z};function T(V,P){if(p.isBuffer(V))return V.length;if(ArrayBuffer.isView(V)||U(V,ArrayBuffer))return V.byteLength;if(typeof V!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof V);var C=V.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&C===0)return 0;for(var Z=!1;;)switch(P){case"ascii":case"latin1":case"binary":return C;case"utf8":case"utf-8":return we(V).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C*2;case"hex":return C>>>1;case"base64":return ie(V).length;default:if(Z)return N?-1:we(V).length;P=(""+P).toLowerCase(),Z=!0}}p.byteLength=T;function A(V,P,C){var N=!1;if((P===void 0||P<0)&&(P=0),P>this.length||((C===void 0||C>this.length)&&(C=this.length),C<=0)||(C>>>=0,P>>>=0,C<=P))return"";for(V||(V="utf8");;)switch(V){case"hex":return ae(this,P,C);case"utf8":case"utf-8":return j(this,P,C);case"ascii":return G(this,P,C);case"latin1":case"binary":return ee(this,P,C);case"base64":return te(this,P,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,P,C);default:if(N)throw new TypeError("Unknown encoding: "+V);V=(V+"").toLowerCase(),N=!0}}p.prototype._isBuffer=!0;function E(V,P,C){var N=V[P];V[P]=V[C],V[C]=N}p.prototype.swap16=function(){var P=this.length;if(P%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var C=0;C<P;C+=2)E(this,C,C+1);return this},p.prototype.swap32=function(){var P=this.length;if(P%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var C=0;C<P;C+=4)E(this,C,C+3),E(this,C+1,C+2);return this},p.prototype.swap64=function(){var P=this.length;if(P%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var C=0;C<P;C+=8)E(this,C,C+7),E(this,C+1,C+6),E(this,C+2,C+5),E(this,C+3,C+4);return this},p.prototype.toString=function(){var P=this.length;return P===0?"":arguments.length===0?j(this,0,P):A.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(P){if(!p.isBuffer(P))throw new TypeError("Argument must be a Buffer");return this===P?!0:p.compare(this,P)===0},p.prototype.inspect=function(){var P="",C=a.INSPECT_MAX_BYTES;return P=this.toString("hex",0,C).replace(/(.{2})/g,"$1 ").trim(),this.length>C&&(P+=" ... "),"<Buffer "+P+">"},c&&(p.prototype[c]=p.prototype.inspect),p.prototype.compare=function(P,C,N,Z,pe){if(U(P,Uint8Array)&&(P=p.from(P,P.offset,P.byteLength)),!p.isBuffer(P))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof P);if(C===void 0&&(C=0),N===void 0&&(N=P?P.length:0),Z===void 0&&(Z=0),pe===void 0&&(pe=this.length),C<0||N>P.length||Z<0||pe>this.length)throw new RangeError("out of range index");if(Z>=pe&&C>=N)return 0;if(Z>=pe)return-1;if(C>=N)return 1;if(C>>>=0,N>>>=0,Z>>>=0,pe>>>=0,this===P)return 0;for(var be=pe-Z,Te=N-C,Ee=Math.min(be,Te),ze=this.slice(Z,pe),Ve=P.slice(C,N),Ge=0;Ge<Ee;++Ge)if(ze[Ge]!==Ve[Ge]){be=ze[Ge],Te=Ve[Ge];break}return be<Te?-1:Te<be?1:0};function I(V,P,C,N,Z){if(V.length===0)return-1;if(typeof C=="string"?(N=C,C=0):C>2147483647?C=2147483647:C<-2147483648&&(C=-2147483648),C=+C,oe(C)&&(C=Z?0:V.length-1),C<0&&(C=V.length+C),C>=V.length){if(Z)return-1;C=V.length-1}else if(C<0)if(Z)C=0;else return-1;if(typeof P=="string"&&(P=p.from(P,N)),p.isBuffer(P))return P.length===0?-1:R(V,P,C,N,Z);if(typeof P=="number")return P=P&255,typeof Uint8Array.prototype.indexOf=="function"?Z?Uint8Array.prototype.indexOf.call(V,P,C):Uint8Array.prototype.lastIndexOf.call(V,P,C):R(V,[P],C,N,Z);throw new TypeError("val must be string, number or Buffer")}function R(V,P,C,N,Z){var pe=1,be=V.length,Te=P.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(V.length<2||P.length<2)return-1;pe=2,be/=2,Te/=2,C/=2}function Ee(Ye,Ae){return pe===1?Ye[Ae]:Ye.readUInt16BE(Ae*pe)}var ze;if(Z){var Ve=-1;for(ze=C;ze<be;ze++)if(Ee(V,ze)===Ee(P,Ve===-1?0:ze-Ve)){if(Ve===-1&&(Ve=ze),ze-Ve+1===Te)return Ve*pe}else Ve!==-1&&(ze-=ze-Ve),Ve=-1}else for(C+Te>be&&(C=be-Te),ze=C;ze>=0;ze--){for(var Ge=!0,nt=0;nt<Te;nt++)if(Ee(V,ze+nt)!==Ee(P,nt)){Ge=!1;break}if(Ge)return ze}return-1}p.prototype.includes=function(P,C,N){return this.indexOf(P,C,N)!==-1},p.prototype.indexOf=function(P,C,N){return I(this,P,C,N,!0)},p.prototype.lastIndexOf=function(P,C,N){return I(this,P,C,N,!1)};function Y(V,P,C,N){C=Number(C)||0;var Z=V.length-C;N?(N=Number(N),N>Z&&(N=Z)):N=Z;var pe=P.length;N>pe/2&&(N=pe/2);for(var be=0;be<N;++be){var Te=parseInt(P.substr(be*2,2),16);if(oe(Te))return be;V[C+be]=Te}return be}function L(V,P,C,N){return ke(we(P,V.length-C),V,C,N)}function D(V,P,C,N){return ke(X(P),V,C,N)}function B(V,P,C,N){return D(V,P,C,N)}function z(V,P,C,N){return ke(ie(P),V,C,N)}function K(V,P,C,N){return ke(ue(P,V.length-C),V,C,N)}p.prototype.write=function(P,C,N,Z){if(C===void 0)Z="utf8",N=this.length,C=0;else if(N===void 0&&typeof C=="string")Z=C,N=this.length,C=0;else if(isFinite(C))C=C>>>0,isFinite(N)?(N=N>>>0,Z===void 0&&(Z="utf8")):(Z=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-C;if((N===void 0||N>pe)&&(N=pe),P.length>0&&(N<0||C<0)||C>this.length)throw new RangeError("Attempt to write outside buffer bounds");Z||(Z="utf8");for(var be=!1;;)switch(Z){case"hex":return Y(this,P,C,N);case"utf8":case"utf-8":return L(this,P,C,N);case"ascii":return D(this,P,C,N);case"latin1":case"binary":return B(this,P,C,N);case"base64":return z(this,P,C,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,P,C,N);default:if(be)throw new TypeError("Unknown encoding: "+Z);Z=(""+Z).toLowerCase(),be=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function te(V,P,C){return P===0&&C===V.length?o.fromByteArray(V):o.fromByteArray(V.slice(P,C))}function j(V,P,C){C=Math.min(V.length,C);for(var N=[],Z=P;Z<C;){var pe=V[Z],be=null,Te=pe>239?4:pe>223?3:pe>191?2:1;if(Z+Te<=C){var Ee,ze,Ve,Ge;switch(Te){case 1:pe<128&&(be=pe);break;case 2:Ee=V[Z+1],(Ee&192)===128&&(Ge=(pe&31)<<6|Ee&63,Ge>127&&(be=Ge));break;case 3:Ee=V[Z+1],ze=V[Z+2],(Ee&192)===128&&(ze&192)===128&&(Ge=(pe&15)<<12|(Ee&63)<<6|ze&63,Ge>2047&&(Ge<55296||Ge>57343)&&(be=Ge));break;case 4:Ee=V[Z+1],ze=V[Z+2],Ve=V[Z+3],(Ee&192)===128&&(ze&192)===128&&(Ve&192)===128&&(Ge=(pe&15)<<18|(Ee&63)<<12|(ze&63)<<6|Ve&63,Ge>65535&&Ge<1114112&&(be=Ge))}}be===null?(be=65533,Te=1):be>65535&&(be-=65536,N.push(be>>>10&1023|55296),be=56320|be&1023),N.push(be),Z+=Te}return q(N)}var M=4096;function q(V){var P=V.length;if(P<=M)return String.fromCharCode.apply(String,V);for(var C="",N=0;N<P;)C+=String.fromCharCode.apply(String,V.slice(N,N+=M));return C}function G(V,P,C){var N="";C=Math.min(V.length,C);for(var Z=P;Z<C;++Z)N+=String.fromCharCode(V[Z]&127);return N}function ee(V,P,C){var N="";C=Math.min(V.length,C);for(var Z=P;Z<C;++Z)N+=String.fromCharCode(V[Z]);return N}function ae(V,P,C){var N=V.length;(!P||P<0)&&(P=0),(!C||C<0||C>N)&&(C=N);for(var Z="",pe=P;pe<C;++pe)Z+=re[V[pe]];return Z}function ve(V,P,C){for(var N=V.slice(P,C),Z="",pe=0;pe<N.length;pe+=2)Z+=String.fromCharCode(N[pe]+N[pe+1]*256);return Z}p.prototype.slice=function(P,C){var N=this.length;P=~~P,C=C===void 0?N:~~C,P<0?(P+=N,P<0&&(P=0)):P>N&&(P=N),C<0?(C+=N,C<0&&(C=0)):C>N&&(C=N),C<P&&(C=P);var Z=this.subarray(P,C);return Object.setPrototypeOf(Z,p.prototype),Z};function ye(V,P,C){if(V%1!==0||V<0)throw new RangeError("offset is not uint");if(V+P>C)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUIntLE=function(P,C,N){P=P>>>0,C=C>>>0,N||ye(P,C,this.length);for(var Z=this[P],pe=1,be=0;++be<C&&(pe*=256);)Z+=this[P+be]*pe;return Z},p.prototype.readUIntBE=function(P,C,N){P=P>>>0,C=C>>>0,N||ye(P,C,this.length);for(var Z=this[P+--C],pe=1;C>0&&(pe*=256);)Z+=this[P+--C]*pe;return Z},p.prototype.readUInt8=function(P,C){return P=P>>>0,C||ye(P,1,this.length),this[P]},p.prototype.readUInt16LE=function(P,C){return P=P>>>0,C||ye(P,2,this.length),this[P]|this[P+1]<<8},p.prototype.readUInt16BE=function(P,C){return P=P>>>0,C||ye(P,2,this.length),this[P]<<8|this[P+1]},p.prototype.readUInt32LE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),(this[P]|this[P+1]<<8|this[P+2]<<16)+this[P+3]*16777216},p.prototype.readUInt32BE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),this[P]*16777216+(this[P+1]<<16|this[P+2]<<8|this[P+3])},p.prototype.readIntLE=function(P,C,N){P=P>>>0,C=C>>>0,N||ye(P,C,this.length);for(var Z=this[P],pe=1,be=0;++be<C&&(pe*=256);)Z+=this[P+be]*pe;return pe*=128,Z>=pe&&(Z-=Math.pow(2,8*C)),Z},p.prototype.readIntBE=function(P,C,N){P=P>>>0,C=C>>>0,N||ye(P,C,this.length);for(var Z=C,pe=1,be=this[P+--Z];Z>0&&(pe*=256);)be+=this[P+--Z]*pe;return pe*=128,be>=pe&&(be-=Math.pow(2,8*C)),be},p.prototype.readInt8=function(P,C){return P=P>>>0,C||ye(P,1,this.length),this[P]&128?(255-this[P]+1)*-1:this[P]},p.prototype.readInt16LE=function(P,C){P=P>>>0,C||ye(P,2,this.length);var N=this[P]|this[P+1]<<8;return N&32768?N|4294901760:N},p.prototype.readInt16BE=function(P,C){P=P>>>0,C||ye(P,2,this.length);var N=this[P+1]|this[P]<<8;return N&32768?N|4294901760:N},p.prototype.readInt32LE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),this[P]|this[P+1]<<8|this[P+2]<<16|this[P+3]<<24},p.prototype.readInt32BE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),this[P]<<24|this[P+1]<<16|this[P+2]<<8|this[P+3]},p.prototype.readFloatLE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),s.read(this,P,!0,23,4)},p.prototype.readFloatBE=function(P,C){return P=P>>>0,C||ye(P,4,this.length),s.read(this,P,!1,23,4)},p.prototype.readDoubleLE=function(P,C){return P=P>>>0,C||ye(P,8,this.length),s.read(this,P,!0,52,8)},p.prototype.readDoubleBE=function(P,C){return P=P>>>0,C||ye(P,8,this.length),s.read(this,P,!1,52,8)};function me(V,P,C,N,Z,pe){if(!p.isBuffer(V))throw new TypeError('"buffer" argument must be a Buffer instance');if(P>Z||P<pe)throw new RangeError('"value" argument is out of bounds');if(C+N>V.length)throw new RangeError("Index out of range")}p.prototype.writeUIntLE=function(P,C,N,Z){if(P=+P,C=C>>>0,N=N>>>0,!Z){var pe=Math.pow(2,8*N)-1;me(this,P,C,N,pe,0)}var be=1,Te=0;for(this[C]=P&255;++Te<N&&(be*=256);)this[C+Te]=P/be&255;return C+N},p.prototype.writeUIntBE=function(P,C,N,Z){if(P=+P,C=C>>>0,N=N>>>0,!Z){var pe=Math.pow(2,8*N)-1;me(this,P,C,N,pe,0)}var be=N-1,Te=1;for(this[C+be]=P&255;--be>=0&&(Te*=256);)this[C+be]=P/Te&255;return C+N},p.prototype.writeUInt8=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,1,255,0),this[C]=P&255,C+1},p.prototype.writeUInt16LE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,2,65535,0),this[C]=P&255,this[C+1]=P>>>8,C+2},p.prototype.writeUInt16BE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,2,65535,0),this[C]=P>>>8,this[C+1]=P&255,C+2},p.prototype.writeUInt32LE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,4,4294967295,0),this[C+3]=P>>>24,this[C+2]=P>>>16,this[C+1]=P>>>8,this[C]=P&255,C+4},p.prototype.writeUInt32BE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,4,4294967295,0),this[C]=P>>>24,this[C+1]=P>>>16,this[C+2]=P>>>8,this[C+3]=P&255,C+4},p.prototype.writeIntLE=function(P,C,N,Z){if(P=+P,C=C>>>0,!Z){var pe=Math.pow(2,8*N-1);me(this,P,C,N,pe-1,-pe)}var be=0,Te=1,Ee=0;for(this[C]=P&255;++be<N&&(Te*=256);)P<0&&Ee===0&&this[C+be-1]!==0&&(Ee=1),this[C+be]=(P/Te>>0)-Ee&255;return C+N},p.prototype.writeIntBE=function(P,C,N,Z){if(P=+P,C=C>>>0,!Z){var pe=Math.pow(2,8*N-1);me(this,P,C,N,pe-1,-pe)}var be=N-1,Te=1,Ee=0;for(this[C+be]=P&255;--be>=0&&(Te*=256);)P<0&&Ee===0&&this[C+be+1]!==0&&(Ee=1),this[C+be]=(P/Te>>0)-Ee&255;return C+N},p.prototype.writeInt8=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,1,127,-128),P<0&&(P=255+P+1),this[C]=P&255,C+1},p.prototype.writeInt16LE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,2,32767,-32768),this[C]=P&255,this[C+1]=P>>>8,C+2},p.prototype.writeInt16BE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,2,32767,-32768),this[C]=P>>>8,this[C+1]=P&255,C+2},p.prototype.writeInt32LE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,4,2147483647,-2147483648),this[C]=P&255,this[C+1]=P>>>8,this[C+2]=P>>>16,this[C+3]=P>>>24,C+4},p.prototype.writeInt32BE=function(P,C,N){return P=+P,C=C>>>0,N||me(this,P,C,4,2147483647,-2147483648),P<0&&(P=4294967295+P+1),this[C]=P>>>24,this[C+1]=P>>>16,this[C+2]=P>>>8,this[C+3]=P&255,C+4};function de(V,P,C,N,Z,pe){if(C+N>V.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("Index out of range")}function W(V,P,C,N,Z){return P=+P,C=C>>>0,Z||de(V,P,C,4),s.write(V,P,C,N,23,4),C+4}p.prototype.writeFloatLE=function(P,C,N){return W(this,P,C,!0,N)},p.prototype.writeFloatBE=function(P,C,N){return W(this,P,C,!1,N)};function J(V,P,C,N,Z){return P=+P,C=C>>>0,Z||de(V,P,C,8),s.write(V,P,C,N,52,8),C+8}p.prototype.writeDoubleLE=function(P,C,N){return J(this,P,C,!0,N)},p.prototype.writeDoubleBE=function(P,C,N){return J(this,P,C,!1,N)},p.prototype.copy=function(P,C,N,Z){if(!p.isBuffer(P))throw new TypeError("argument should be a Buffer");if(N||(N=0),!Z&&Z!==0&&(Z=this.length),C>=P.length&&(C=P.length),C||(C=0),Z>0&&Z<N&&(Z=N),Z===N||P.length===0||this.length===0)return 0;if(C<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(Z<0)throw new RangeError("sourceEnd out of bounds");Z>this.length&&(Z=this.length),P.length-C<Z-N&&(Z=P.length-C+N);var pe=Z-N;if(this===P&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(C,N,Z);else if(this===P&&N<C&&C<Z)for(var be=pe-1;be>=0;--be)P[be+C]=this[be+N];else Uint8Array.prototype.set.call(P,this.subarray(N,Z),C);return pe},p.prototype.fill=function(P,C,N,Z){if(typeof P=="string"){if(typeof C=="string"?(Z=C,C=0,N=this.length):typeof N=="string"&&(Z=N,N=this.length),Z!==void 0&&typeof Z!="string")throw new TypeError("encoding must be a string");if(typeof Z=="string"&&!p.isEncoding(Z))throw new TypeError("Unknown encoding: "+Z);if(P.length===1){var pe=P.charCodeAt(0);(Z==="utf8"&&pe<128||Z==="latin1")&&(P=pe)}}else typeof P=="number"?P=P&255:typeof P=="boolean"&&(P=Number(P));if(C<0||this.length<C||this.length<N)throw new RangeError("Out of range index");if(N<=C)return this;C=C>>>0,N=N===void 0?this.length:N>>>0,P||(P=0);var be;if(typeof P=="number")for(be=C;be<N;++be)this[be]=P;else{var Te=p.isBuffer(P)?P:p.from(P,Z),Ee=Te.length;if(Ee===0)throw new TypeError('The value "'+P+'" is invalid for argument "value"');for(be=0;be<N-C;++be)this[be+C]=Te[be%Ee]}return this};var Q=/[^+/0-9A-Za-z-_]/g;function xe(V){if(V=V.split("=")[0],V=V.trim().replace(Q,""),V.length<2)return"";for(;V.length%4!==0;)V=V+"=";return V}function we(V,P){P=P||1/0;for(var C,N=V.length,Z=null,pe=[],be=0;be<N;++be){if(C=V.charCodeAt(be),C>55295&&C<57344){if(!Z){if(C>56319){(P-=3)>-1&&pe.push(239,191,189);continue}else if(be+1===N){(P-=3)>-1&&pe.push(239,191,189);continue}Z=C;continue}if(C<56320){(P-=3)>-1&&pe.push(239,191,189),Z=C;continue}C=(Z-55296<<10|C-56320)+65536}else Z&&(P-=3)>-1&&pe.push(239,191,189);if(Z=null,C<128){if((P-=1)<0)break;pe.push(C)}else if(C<2048){if((P-=2)<0)break;pe.push(C>>6|192,C&63|128)}else if(C<65536){if((P-=3)<0)break;pe.push(C>>12|224,C>>6&63|128,C&63|128)}else if(C<1114112){if((P-=4)<0)break;pe.push(C>>18|240,C>>12&63|128,C>>6&63|128,C&63|128)}else throw new Error("Invalid code point")}return pe}function X(V){for(var P=[],C=0;C<V.length;++C)P.push(V.charCodeAt(C)&255);return P}function ue(V,P){for(var C,N,Z,pe=[],be=0;be<V.length&&!((P-=2)<0);++be)C=V.charCodeAt(be),N=C>>8,Z=C%256,pe.push(Z),pe.push(N);return pe}function ie(V){return o.toByteArray(xe(V))}function ke(V,P,C,N){for(var Z=0;Z<N&&!(Z+C>=P.length||Z>=V.length);++Z)P[Z+C]=V[Z];return Z}function U(V,P){return V instanceof P||V!=null&&V.constructor!=null&&V.constructor.name!=null&&V.constructor.name===P.name}function oe(V){return V!==V}var re=function(){for(var V="0123456789abcdef",P=new Array(256),C=0;C<16;++C)for(var N=C*16,Z=0;Z<16;++Z)P[N+Z]=V[C]+V[Z];return P}()},{"base64-js":29,ieee754:32}],31:[function(r,i,a){var o={single_source_shortest_paths:function(s,c,l){var u={},d={};d[c]=0;var p=o.PriorityQueue.make();p.push(c,0);for(var f,h,m,g,y,b,w,S,k;!p.empty();){f=p.pop(),h=f.value,g=f.cost,y=s[h]||{};for(m in y)y.hasOwnProperty(m)&&(b=y[m],w=g+b,S=d[m],k=typeof d[m]>"u",(k||S>w)&&(d[m]=w,p.push(m,w),u[m]=h))}if(typeof l<"u"&&typeof d[l]>"u"){var $=["Could not find a path from ",c," to ",l,"."].join("");throw new Error($)}return u},extract_shortest_path_from_predecessor_list:function(s,c){for(var l=[],u=c;u;)l.push(u),s[u],u=s[u];return l.reverse(),l},find_path:function(s,c,l){var u=o.single_source_shortest_paths(s,c,l);return o.extract_shortest_path_from_predecessor_list(u,l)},PriorityQueue:{make:function(s){var c=o.PriorityQueue,l={},u;s=s||{};for(u in c)c.hasOwnProperty(u)&&(l[u]=c[u]);return l.queue=[],l.sorter=s.sorter||c.default_sorter,l},default_sorter:function(s,c){return s.cost-c.cost},push:function(s,c){var l={value:s,cost:c};this.queue.push(l),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof i<"u"&&(i.exports=o)},{}],32:[function(r,i,a){a.read=function(o,s,c,l,u){var d,p,f=u*8-l-1,h=(1<<f)-1,m=h>>1,g=-7,y=c?u-1:0,b=c?-1:1,w=o[s+y];for(y+=b,d=w&(1<<-g)-1,w>>=-g,g+=f;g>0;d=d*256+o[s+y],y+=b,g-=8);for(p=d&(1<<-g)-1,d>>=-g,g+=l;g>0;p=p*256+o[s+y],y+=b,g-=8);if(d===0)d=1-m;else{if(d===h)return p?NaN:(w?-1:1)*(1/0);p=p+Math.pow(2,l),d=d-m}return(w?-1:1)*p*Math.pow(2,d-l)},a.write=function(o,s,c,l,u,d){var p,f,h,m=d*8-u-1,g=(1<<m)-1,y=g>>1,b=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=l?0:d-1,S=l?1:-1,k=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(f=isNaN(s)?1:0,p=g):(p=Math.floor(Math.log(s)/Math.LN2),s*(h=Math.pow(2,-p))<1&&(p--,h*=2),p+y>=1?s+=b/h:s+=b*Math.pow(2,1-y),s*h>=2&&(p++,h/=2),p+y>=g?(f=0,p=g):p+y>=1?(f=(s*h-1)*Math.pow(2,u),p=p+y):(f=s*Math.pow(2,y-1)*Math.pow(2,u),p=0));u>=8;o[c+w]=f&255,w+=S,f/=256,u-=8);for(p=p<<u|f,m+=u;m>0;o[c+w]=p&255,w+=S,p/=256,m-=8);o[c+w-S]|=k*128}},{}],33:[function(r,i,a){var o={}.toString;i.exports=Array.isArray||function(s){return o.call(s)=="[object Array]"}},{}]},{},[24])(24)})}),gdt={name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(t){return t(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var t=this,r=this.options,i=this.tag,a=String(this.value);i==="canvas"?G7.toCanvas(this.$el,a,r,function(o){if(o)throw o}):i==="img"?G7.toDataURL(a,r,function(o,s){if(o)throw o;t.$el.src=s}):G7.toString(a,r,function(o,s){if(o)throw o;t.$el.innerHTML=s})}},mounted:function(){this.generate()}};const xOt="";function vdt(n){window.history.replaceState({},"",window.location.href);let t="";const r=(navigator==null?void 0:navigator.userAgent)||"";return r.match("CriOS")?t="googlechromes://":r.match("FxiOS")?t="firefox://":r.match("GSA")&&(t="googleapp://open-url?url="),t+encodeURIComponent(`${window.location.href}#${n}`)}const ydt={name:"BankIdAnswer",components:{QrCode:gdt},mixins:[pt([])],props:{demo:{type:Boolean,default:!1}},data(){return{signAnswerId:null,signInterval:null,view:"form",errorMessage:"",isLoading:!1,qrCode:null,autoStartToken:null,isMobile:!1}},computed:{viewText(){const n=t=>this._document.$t(`answerModal.bankId.component.viewText.${t}`);return{new:{title:n("new.title"),text:n("new.text"),spinnerText:n("new.spinnerText")},waiting:{title:n("waiting.title"),text:n("waiting.text"),spinnerText:n("waiting.spinnerText")},started:{title:n("waiting.title"),text:n("waiting.text"),spinnerText:n("waiting.spinnerText")},signing:{title:n("signing.title"),text:n("signing.text"),spinnerText:n("signing.spinnerText")},error:{title:n("error.title"),text:n("error.text")},canceled:{title:n("canceled.title"),text:n("canceled.text")}}}},watch:{isLoading(n){this.$emit("loading",n)},$route:{immediate:!0,handler(n){n!=null&&n.hash&&this.resumePolling(n.hash.slice(1))}}},created(){this.isMobile=uM()},beforeDestroy(){this.signInterval&&this.stopPolling()},methods:{async submit({answer:n}){try{if(this.isLoading=!0,this.demo){this.view="new",await vp(1e3),this.view="waiting",await vp(1e3),this.view="signing",await vp(1e3),this.onComplete();return}const{id:t,autoStartToken:r,qrCodeData:i}=await n({body:{isAccepted:!0}});r&&(this.autoStartToken=r),i&&(this.qrCode=i),this.signAnswerId=t,this.startPolling(),this.isMobile&&this.triggerAutoStart();return}catch(t){this.onError(t)}},async requestStatus(){if(!this.signAnswerId)throw Error("Missing signAnswerId");try{const{data:n}=await vCe.get(this.signAnswerId);n.qrCodeData&&(this.qrCode=n.qrCodeData),n.status==="completed"?this.onComplete():n.status==="canceled"?this.onCanceled():this.view=n.status}catch(n){this.onError(n)}},async startPolling(){if(!this.signAnswerId)throw Error("Missing signAnswerId");this.signInterval=setInterval(this.requestStatus,1e3)},stopPolling(){clearInterval(this.signInterval),this.autoStartToken=null,this.qrCode=null,this.isLoading=!1},onComplete(){this.stopPolling(),this.$emit("complete")},onCanceled(){this.stopPolling(),this.view="canceled",this.errorMessage=this._document.$t("answerModal.bankId.component.signingInterrupted")},onError(n){var r,i;if(this.stopPolling(),n.httpStatusCode===409)throw n;this.$emit("error"),this.view="error";const t=(i=(r=n.response)==null?void 0:r.data)==null?void 0:i.errorCode;switch(t){case 9001:case 9002:case 9003:case 9004:case 9005:case 9006:case 9007:co.warn(n);break;case 9009:this.$emit("complete");break;default:Rr(n,{showMessage:!1})}this.errorMessage=this.$i18n.te(`errors:${t}`)&&this._document.$t(`answerModal.bankId.component.errors.${t}`)||this._document.$t("answerModal.bankId.component.defaultError")},resumePolling(n){this.view="signing",this.signAnswerId=n,this.startPolling();const t=new URL(window.location.href);t.search="",t.hash="",window.history.replaceState({},"",t.href)},triggerAutoStart(){if(!this.autoStartToken)return;let n="bankid://",t="null";if(this.isMobile){const i=K1e(),a=(navigator==null?void 0:navigator.userAgent)||(navigator==null?void 0:navigator.vendor)||(window==null?void 0:window.opera),o=i==="iOS"&&(/Version\/[\d\.]+.*Safari/.test(a)||/GSA/.test(a)),s=i==="Android"&&/Version\/[\d\.]+.*Chrome/.test(a);(o||s)&&(n="https://app.bankid.com"),i==="iOS"&&this.$view!=="widget"&&(t=vdt(this.signAnswerId))}const r=`${n}/?autostarttoken=${this.autoStartToken}&redirect=${t}`;this.isMobile?document.location=r:document.getElementById("autoStartFrame").src=r}}};var bdt=function(){var i;var t=this,r=t._self._c;return r("div",{staticClass:"flex flex-col items-center -my-4"},[r("iframe",{staticClass:"hidden",attrs:{id:"autoStartFrame",height:"0",width:"0"}}),["form","signing","error","canceled"].includes(t.view)?r("div",{staticClass:"w-[250px] h-[250px] bg-gray-100 rounded-xl flex justify-center items-center"},[r("BaseIcon",{staticClass:"text-gray-500",attrs:{type:"bankId",size:"50"}})],1):t._e(),["new","waiting","started"].includes(t.view)?[t.qrCode?r("QrCode",{attrs:{value:t.qrCode,options:{width:250,errorCorrectionLevel:"L",color:{dark:"#000000"}}}}):t._e()]:t._e(),r("Animation",{staticClass:"w-full"},[r("div",{key:"a",staticClass:"text-sm text-gray-500 pt-4 min-h-[20px]",domProps:{textContent:t._s((i=t.viewText[t.view])==null?void 0:i.spinnerText)}}),!t.isMobile&&["new","waiting","started"].includes(t.view)?r("CButton",{key:"b",staticClass:"mt-4",attrs:{type:"none",pattern:"secondary",size:"small"},on:{click:t.triggerAutoStart}},[t._v(" "+t._s(t._document.$t("answerModal.bankId.component.startOnThisDevice"))+" ")]):t._e()],1),["form","new","waiting","started"].includes(t.view)?t._e():r("div",[r("transition",{attrs:{name:"pop-in"}},[r("div",{staticClass:"bankid-popup",on:{click:()=>{t.view="form",t.isLoading=!1}}},[r("div",{staticClass:"flex flex-col items-center justify-center",staticStyle:{"background-color":"#183e4f",padding:"calc(2.5 * var(--rem)) calc(3 * var(--rem))"}},[r("BaseIcon",{staticClass:"text-white",attrs:{type:"bankId",size:"34"}}),r("div",{staticClass:"pt-4 text-sm font-medium text-white opacity-75",domProps:{textContent:t._s(t.viewText[t.view].text)}})],1),r("div",{staticClass:"flex flex-col items-center justify-center w-full text-center",staticStyle:{padding:"calc(3 * var(--rem)) calc(2 * var(--rem))"}},[t.view==="signing"?[r("div",{staticClass:"spinner"}),r("div",{staticClass:"pt-8 text-gray-500",domProps:{textContent:t._s(t.viewText[t.view].spinnerText)}})]:["error","canceled"].includes(t.view)?[r("BaseIcon",{staticClass:"mb-2.5 text-gray-400",attrs:{type:"error",size:"22"}}),r("div",{staticStyle:{"font-size":"14px"},domProps:{textContent:t._s(t.errorMessage)}}),r("CButton",{staticStyle:{"margin-top":"calc(2.5 * var(--rem))",padding:"1em",height:"initial"},attrs:{loading:t.isLoading,type:"none",pattern:"secondary",size:"small"},on:{click:function(a){t.view="form"}}},[t._v(" "+t._s(t._document.$t("tryAgain"))+" ")])]:t._e()],2)])])],1)],2)},_dt=[],wdt=he(ydt,bdt,_dt,!1,null,"70ee74c1",null,null);const xdt=wdt.exports,COt="",Cdt={name:"DenyAnswer",props:{demo:{type:Boolean,default:!1}},mixins:[pt([])],data(){return{rejectReason:""}},methods:{async submit({update:n,answer:t}){const r=[];this.rejectReason&&r.push({key:"unclear-other",category:"misc",description:this.rejectReason,sentAt:this._document.lastSentAt}),this.demo||(await n({body:{"data.rejectReasons":r}}),await t({body:{isAccepted:!1}})),this.$emit("complete")}}};var kdt=function(){var t=this,r=t._self._c;return r("CInput",{staticStyle:{"margin-bottom":"calc(1.5 * var(--rem))"},attrs:{placeholder:t._document.$t("answerModal.decline.component.inputPlaceholder"),type:"textarea",filled:"","custom-class":"decline-input"},model:{value:t.rejectReason,callback:function(i){t.rejectReason=i},expression:"rejectReason"}})},Sdt=[],Tdt=he(Cdt,kdt,Sdt,!1,null,null,null,null);const Edt=Tdt.exports,kOt="",$dt={components:{Feedback:tdt,Signature:hdt,BankId:xdt,Deny:Edt},mixins:[pt([])],i18nOptions:{namespaces:"temporary",messages:{en:{previewMode:"Preview answer mode"},sv:{previewMode:"Demo - Förhandsgranska"}}},props:{mode:{type:String,default:"accept"},isSender:{type:Boolean,default:!1},fullScreen:{type:Boolean,default:!1},senderActions:{type:Object,default:()=>({})},calcHeight:{type:Boolean,default:!1}},data(){return{page:"start",isFeedbackInitiated:!1,isPosting:!1,actionInvalid:!1}},computed:{answerComponentName(){return this.mode==="decline"?"Deny":this.answerMethod==="bankId"?"BankId":"Signature"},answerType(){return this.mode==="decline"?"decline":this.answerMethod==="bankId"?"bankId":"signature"},isDemo(){return this._document.isPreview&&!this.isSender},signee(){var n,t;return this.isSender?this._document.senderClient:this._document.isPreview?{socialNo:"198710126130",email:"richard@piedpier.com",name:"Richard Hendricks",answerMethod:{accept:(t=(n=this._document.data)==null?void 0:n.defaultAnswerMethod)==null?void 0:t.accept}}:this._document.viewer},answerMethod(){var n;return(n=this.signee.answerMethod)==null?void 0:n.accept},successStrings(){const n=this.signee.email?this._document.$t(`answerModal.${this.answerType}.success.text`,{email:this.signee.email}):this._document.$t(`answerModal.${this.answerType}.success.textFallback`),t=this.signee.email?this._document.$t("answerModal.successTextSingle",{email:this.signee.email}):this._document.$t("answerModal.successTextFallbackSingle"),r=this._document.remainingSignatures===0?t:n;return{title:this._document.$t(`answerModal.${this.answerType}.success.title`),text:r}}},created(){this.calcHeight&&this.$nextTick(()=>this.setFixedHeight())},methods:{...xn({answerCurrentDoc:He.ANSWER_CURRENT_PUBLIC_DOCUMENT,putCurrentDoc:He.PUT_CURRENT_PUBLIC_DOCUMENT,reloadCurrentDocument:He.RELOAD_CURRENT_DOCUMENT}),async onSubmit(){this.setFixedHeight(),await this.submit()},async submit(){if(!this.isPosting){this.isPosting=!0;try{const{submit:n}=this.$refs.answerComponent;if(typeof n!="function")throw Error("Missing answer type submit method");await n({update:t=>this.putCurrentDoc({includeChanges:!0,...t}),answer:this.answerCurrentDoc,...this.isSender?this.senderActions:null})}catch(n){this.isPosting=!1,n.httpStatusCode===409?this.page="versionError":Rr(n)}}},async onComplete(){var n,t;if(this.isSender&&this.senderActions.send){this.$emit("close"),await this.senderActions.send();return}!this.isDemo&&this.mode==="accept"&&this.answerMethod==="bankId"?this.reloadCurrentDocument().then(()=>{var r,i;return Tr.trigger("document:answer",{id:(r=this._document)==null?void 0:r.id,...(i=this.signee)==null?void 0:i.answer})}):Tr.trigger("document:answer",{id:(n=this._document)==null?void 0:n.id,...(t=this.signee)==null?void 0:t.answer}),await vp(800),this.page="intermediate",await vp(2e3),this.page="success",this.isPosting=!1},reload(){window.location.reload()},setFixedHeight(){this.$el.style.minHeight=`${this.$el.offsetHeight}px`},minimizeHeight(n,t){Ct({targets:n,height:0,flexGrow:[1,0],opacity:[1,0],duration:900,easing:"easeOutQuint",complete:t}),Ct({targets:this.$refs.feedback.$el,height:0,flexGrow:1,duration:900,easing:"easeOutQuint"})},enterAnim(n,t){Ct({targets:n.querySelectorAll(".stagger-anim"),opacity:[0,1],delay:Ct.stagger(180,{start:800}),duration:340,easing:"linear",complete:t})},leaveAnim(n,t){n.style.position="absolute",Ct({targets:n.querySelectorAll(".stagger-anim"),opacity:0,delay:Ct.stagger(200),duration:200,easing:"linear",complete:t})}}};var Adt=function(){var i;var t=this,r=t._self._c;return r("transition-group",{staticClass:"a-root font-inter",attrs:{tag:"div",css:!1,mode:"out-in"},on:{enter:t.enterAnim,leave:t.leaveAnim}},[r("portal",{key:"previewChip",attrs:{to:"modal"}},[r("transition",{attrs:{name:"fade-in",appear:""}},[t.isDemo?r("div",{staticClass:"preview-chip"},[r("span",{domProps:{textContent:t._s(t.$t("previewMode"))}})]):t._e()])],1),r("CButton",{key:"btn",staticStyle:{position:"absolute",right:"20px",top:"20px","z-index":"9",color:"hsl(0, 0%, 45%)"},attrs:{icon:"x",circle:""},on:{click:function(a){t.$parent.$emit("cancel"),t.$emit("close")}}}),t.page==="start"?r("div",{key:"start",staticClass:"flex-grow root-padding"},[r("div",{staticClass:"stagger-anim",staticStyle:{"padding-bottom":"40px"}},[r("div",{staticClass:"a-title",domProps:{textContent:t._s(t._document.$t(`answerModal.${t.answerType}.start.title`))}}),r("div",{staticStyle:{color:"hsl(0, 0%, 40%)"},domProps:{textContent:t._s(t._document.$t(`answerModal.${t.answerType}.start.text`))}})]),r(t.answerComponentName,{ref:"answerComponent",tag:"component",staticClass:"stagger-anim",attrs:{_document:t._document,signee:t.signee,demo:t.isDemo},on:{invalid:function(a){t.actionInvalid=a},loading:function(a){t.isPosting=a},complete:t.onComplete}}),r("div",{staticClass:"stagger-anim",staticStyle:{"padding-top":"3em"}},[r("CButton",{staticClass:"a-btn",attrs:{loading:t.isPosting,disabled:t.actionInvalid,type:t.mode==="decline"?"none":"secondary",icon:t.answerType==="bankId"?"bankId":""},on:{click:t.onSubmit}},[t._v(" "+t._s(t._document.$t(`answerModal.${t.answerType}.start.action`))+" ")])],1)],1):t.page==="intermediate"?r("div",{key:"intermediate",staticClass:"flex flex-col items-center justify-center flex-grow w-full text-center",staticStyle:{height:"100%"}},[r("div",{staticClass:"a-title stagger-anim",domProps:{textContent:t._s(t._document.$t("answerModal.answerSuccess"))}})]):t.page==="success"?r("div",{key:"success",staticClass:"flex flex-col flex-grow w-full",staticStyle:{height:"100%"}},[r("transition",{attrs:{css:!1},on:{leave:t.minimizeHeight}},[t.isFeedbackInitiated?t._e():r("div",{staticClass:"flex flex-col items-center justify-center flex-grow w-full",staticStyle:{overflow:"hidden"}},[r("div",{staticClass:"flex flex-col items-center justify-center w-full root-padding",staticStyle:{height:"100%"}},[r("div",{staticClass:"a-title stagger-anim",staticStyle:{padding:"calc(2.5 * var(--rem)) 0 calc(2 * var(--rem))"}},[r("div",{domProps:{textContent:t._s(t.successStrings.title)}})]),r("div",{staticClass:"stagger-anim",domProps:{textContent:t._s(t.successStrings.text)}})])])]),r("Feedback",{ref:"feedback",staticClass:"stagger-anim",staticStyle:{flex:"0 0",overflow:"hidden","min-height":"200px"},attrs:{"public-id":(i=t._document.viewer)==null?void 0:i.publicDocumentId,demo:t.isDemo,_document:t._document},on:{page:()=>t.isFeedbackInitiated=!0,close:function(a){return t.$emit("close")}}})],1):t.page==="versionError"?r("div",{key:"versionError",staticClass:"flex flex-col items-center justify-center flex-grow text-center root-padding"},[r("div",{staticClass:"stagger-anim"},[r("div",{staticClass:"flex items-center justify-center",staticStyle:{padding:"20px 0"}},[r("div",{staticClass:"flex items-center justify-center",staticStyle:{width:"52px",height:"52px","border-radius":"50%"}},[r("BaseIcon",{attrs:{size:30,type:"error"}})],1)]),r("div",{staticClass:"a-title",domProps:{textContent:t._s(t._document.$t(`answerModal.versionError.${t.mode}.title`))}}),r("div",{domProps:{textContent:t._s(t._document.$t("answerModal.versionError.text"))}})]),r("div",{staticClass:"stagger-anim",staticStyle:{"padding-top":"3em"}},[r("CButton",{staticClass:"a-btn",attrs:{loading:t.isPosting,type:"none"},on:{click:t.reload}},[t._v(" "+t._s(t._document.$t("answerModal.versionError.btn"))+" ")])],1)]):t._e()],1)},Odt=[],Ddt=he($dt,Adt,Odt,!1,null,"de27e507",null,null);const q7=Ddt.exports,Mdt=Object.freeze(Object.defineProperty({__proto__:null,default:q7},Symbol.toStringTag,{value:"Module"})),SOt="",Pdt={name:"DocumentPostSendStep",mixins:[br],i18nOptions:{namespaces:"PostDocumentSend",messages:{en:{title:"Document successfully sent!"},sv:{title:"Dokumentet skickades!"}}},props:{document:{type:Object,required:!0},onCloseFunc:{type:Function,default:null},onCancelFunc:{type:Function,default:null},onSendFunc:{type:Function,default:null}},computed:{modalHeight(){return this.mq==="sm"?"100%":"auto"},usesManualDelivery(){const n=M2(this.document);return!n.sms&&!n.email}},async created(){var n;(n=this.document)!=null&&n.senderClient?await this.senderAnswer():await this.onSend()},methods:{...xn({updateDocument:He.DO_UPDATE_DOCUMENT2,answerDocument:He.ANSWER_OWN_DOCUMENT2,sendDocument:He.DO_SEND_DOCUMENT2}),async handleDocumentLinks(){const{id:n}=this.document,t=M2(this.document),r=!t.sms&&!t.email;r&&(await this.updateDocument({id:n,body:{status:"sent"},showMessage:!1}),Yut({id:n})),r||setTimeout(()=>this.close(),2e3)},async onSend(){typeof this.onSendFunc=="function"&&this.onSendFunc(this.document),await this.handleDocumentLinks()},async senderAnswer(){const{id:n}=this.document,{senderClient:t}=this.document;if(!t||!t.publicDocumentId)return!1;const{accept:r}=t.answerMethod||{};if(!r||r==="button")return!1;const{checksum:i}=this.document._doc||{};return r==="login"?(await this.answerDocument({id:n,publicId:t.publicDocumentId,body:{isAccepted:!0},checksum:i}),await this.sendDocument({id:n}),this.onSend()):(this.$modal.show(q7,{_document:this.document,fullScreen:this.modalHeight==="100%",isSender:!0,senderActions:{answer:async function({body:o}){var s;return this.answerDocument({id:n,publicId:t.publicDocumentId,body:o,checksum:(s=this.document._doc)==null?void 0:s.checksum})}.bind(this),send:async function(){return await this.sendDocument({id:n}),this.onSend()}.bind(this)}},{adaptive:!0,scrollable:!0,height:this.modalHeight,maxWidth:this.modalHeight==="100%"?999:450,classes:"overflow-visible",transition:"fade-in-slide-up"},{cancel:()=>{var a;return(a=this.onCancelFunc)==null?void 0:a.call(this)}}),!0)},close(){this.onCloseFunc&&this.onCloseFunc()}}};var Idt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"font-inter root"},[r("div",{staticClass:"container"},[r("div",{staticClass:"icon-wrapper"},[r("BaseIcon",{attrs:{size:20,type:"email"}})],1),r("div",{staticClass:"title",domProps:{textContent:t._s(t.$t("title"))}}),r("div",{staticClass:"divider"}),r("CButton",{staticClass:"close-button",attrs:{type:"secondary"},on:{click:t.close}},[t._v(" "+t._s(t.$t("_common:close"))+" ")])],1)])},Rdt=[],Ldt=he(Pdt,Idt,Rdt,!1,null,"673cd86f",null,null);const Fdt=Ldt.exports;var Ndt=he({name:"CSkeleton",functional:!0,props:{active:{type:Boolean,default:!0},animated:{type:Boolean,default:!1},width:[Number,String],height:[Number,String],circle:Boolean,rounded:{type:Boolean,default:!0},count:{type:Number,default:1},hidden:{type:[Boolean,String],default:!1},color:{type:String,default:null}},render(n,t){if(!t.props.active)return;const r=[],i=t.props.width,a=t.props.height;for(let o=0;o<t.props.count;o++)r.push(n("div",{staticClass:"c-skeleton-item",class:{"is-rounded":t.props.rounded},key:o,style:{height:a===void 0?null:isNaN(a)?a:a+"px",width:i===void 0?null:isNaN(i)?i:i+"px",borderRadius:t.props.circle?"50%":null,background:t.props.color?t.props.color:null}}));return n("div",{staticStyle:t.data.staticStyle,staticClass:"c-skeleton",class:[t.data.staticClass,{"is-animated":t.props.animated,"is-invisible":t.props.hidden}]},r)}},null,null,!1,null,null,null,null);const xY=Ndt.exports,AOt="",Bdt={name:"CAutocomplete",components:{CInput:al},mixins:[OS],inheritAttrs:!1,props:{value:[Number,String],data:{type:Array,default:()=>[]},field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean,customFormatter:Function,checkInfiniteScroll:Boolean,keepOpen:Boolean,clearable:Boolean,maxHeight:[String,Number],dropdownPosition:{type:String,default:"auto"},iconRight:String,iconRightClickable:Boolean,appendToBody:Boolean},data(){return{selected:null,hovered:null,isActive:!1,newValue:this.value,newAutocomplete:this.autocomplete||"off",isListInViewportVertically:!0,hasFocus:!1,style:{},_isAutocomplete:!0,_elementRef:"input",_bodyEl:void 0}},computed:{whiteList(){const n=[];if(n.push(this.$refs.input.$el.querySelector("input")),n.push(this.$refs.dropdown),this.$refs.dropdown!==void 0){const t=this.$refs.dropdown.querySelectorAll("*");for(const r of t)n.push(r)}if(this.$parent.$data._isTaginput){n.push(this.$parent.$el);const t=this.$parent.$el.querySelectorAll("*");for(const r of t)n.push(r)}return n},hasDefaultSlot(){return!!this.$scopedSlots.default},hasEmptySlot(){return!!this.$slots.empty},hasHeaderSlot(){return!!this.$slots.header},hasFooterSlot(){return!!this.$slots.footer},isOpenedTop(){return this.dropdownPosition==="top"||this.dropdownPosition==="auto"&&!this.isListInViewportVertically},newIconRight(){return this.clearable&&this.newValue?"close-circle":this.iconRight},newIconRightClickable(){return this.clearable?!0:this.iconRightClickable},contentStyle(){return{maxHeight:this.maxHeight===void 0?null:isNaN(this.maxHeight)?this.maxHeight:`${this.maxHeight}px`}},isDropdownOpen(){return this.isActive&&(this.data.length>0||this.hasEmptySlot||this.hasHeaderSlot)}},watch:{isActive(n){this.dropdownPosition==="auto"&&(n?this.calcDropdownInViewportVertical():setTimeout(()=>{this.calcDropdownInViewportVertical()},100)),n&&this.$nextTick(()=>this.setHovered(null))},newValue(n){this.$emit("input",n);const t=this.getValue(this.selected);t&&t!==n&&this.setSelected(null,!1),this.hasFocus&&(!this.openOnFocus||n)&&(this.isActive=!!n)},value(n){this.newValue=n},data(n){this.keepFirst&&this.selectFirstOption(n)}},created(){typeof window<"u"&&(document.addEventListener("click",this.clickedOutside),this.dropdownPosition==="auto"&&window.addEventListener("resize",this.calcDropdownInViewportVertical))},mounted(){if(this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content")){const n=this.$refs.dropdown.querySelector(".dropdown-content");n.addEventListener("scroll",()=>this.checkIfReachedTheEndOfScroll(n))}this.appendToBody&&(this.$data._bodyEl=IW(this.$refs.dropdown),this.updateAppendToBody())},beforeDestroy(){typeof window<"u"&&(document.removeEventListener("click",this.clickedOutside),this.dropdownPosition==="auto"&&window.removeEventListener("resize",this.calcDropdownInViewportVertical)),this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content")&&this.$refs.dropdown.querySelector(".dropdown-content").removeEventListener("scroll",this.checkIfReachedTheEndOfScroll),this.appendToBody&&PW(this.$data._bodyEl)},methods:{setHovered(n){n!==void 0&&(this.hovered=n)},setSelected(n,t=!0){n!==void 0&&(this.selected=n,this.$emit("select",this.selected),this.selected!==null&&(this.newValue=this.clearOnSelect?"":this.getValue(this.selected),this.setHovered(this.clearOnSelect?null:this.hovered)),t&&this.$nextTick(()=>{this.isActive=!1}),this.checkValidity())},selectFirstOption(n){this.$nextTick(()=>{n.length?(this.openOnFocus||this.newValue!==""&&this.hovered!==n[0])&&this.setHovered(n[0]):this.setHovered(null)})},enterPressed(n){this.isDropdownOpen&&(n.preventDefault(),this.hovered!==null&&this.setSelected(this.hovered,!this.keepOpen))},tabPressed(){if(this.hovered===null){this.isActive=!1;return}this.setSelected(this.hovered,!this.keepOpen)},clickedOutside(n){var r;const t=((r=n.path)==null?void 0:r[0])||n.target;this.whiteList.indexOf(t)<0&&(this.isActive=!1)},getValue(n){if(n!==null)return typeof this.customFormatter<"u"?this.customFormatter(n):typeof n=="object"?EJe(n,this.field):n},checkIfReachedTheEndOfScroll(n){n.clientHeight!==n.scrollHeight&&n.scrollTop+n.clientHeight>=n.scrollHeight&&this.$emit("infinite-scroll")},calcDropdownInViewportVertical(){this.$nextTick(()=>{if(this.$refs.dropdown===void 0)return;const n=this.$refs.dropdown.getBoundingClientRect();this.isListInViewportVertically=n.top>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight),this.appendToBody&&this.updateAppendToBody()})},keyArrows(n){const t=n==="down"?1:-1;if(this.isActive){let r=this.data.indexOf(this.hovered)+t;r=r>this.data.length-1?this.data.length:r,r=r<0?0:r,this.setHovered(this.data[r]);const i=this.$refs.dropdown.querySelector(".dropdown-content"),a=i.querySelectorAll("a.dropdown-item:not(.is-disabled)")[r];if(!a)return;const o=i.scrollTop,s=i.scrollTop+i.clientHeight-a.clientHeight;a.offsetTop<o?i.scrollTop=a.offsetTop:a.offsetTop>=s&&(i.scrollTop=a.offsetTop-i.clientHeight+a.clientHeight)}else this.isActive=!0},focused(n){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.data)),this.hasFocus=!0,this.$emit("focus",n)},onBlur(n){this.hasFocus=!1,this.$emit("blur",n)},onInput(n){const t=this.getValue(this.selected);t&&t===this.newValue||(this.$emit("typing",this.newValue),this.checkValidity())},rightIconClick(n){this.clearable?this.newValue="":this.$emit("icon-right-click",n)},checkValidity(){this.useHtml5Validation&&this.$nextTick(()=>{this.checkHtml5Validity()})},updateAppendToBody(){const n=this.$refs.dropdown,t=this.$refs.input.$el;if(n&&t){const r=this.$data._bodyEl;r.classList.forEach(s=>r.classList.remove(s)),r.classList.add("autocomplete"),r.classList.add("control"),this.expandend&&r.classList.add("is-expandend");const i=t.getBoundingClientRect();let a=i.top+window.scrollY;const o=i.left+window.scrollX;this.isOpenedTop?a-=n.clientHeight:a+=t.clientHeight,this.style={position:"absolute",top:`${a}px`,left:`${o}px`,width:`${t.clientWidth}px`,maxWidth:`${t.clientWidth}px`,zIndex:"99"}}}}};var jdt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"autocomplete control",class:{"is-expanded":t.expanded}},[r("CInput",t._b({ref:"input",attrs:{size:t.size,loading:t.loading,rounded:t.rounded,icon:t.icon,"icon-right":t.newIconRight,"icon-right-clickable":t.newIconRightClickable,"icon-pack":t.iconPack,maxlength:t.maxlength,autocomplete:t.newAutocomplete,"use-html5-validation":!1,type:"text"},on:{input:t.onInput,focus:t.focused,blur:t.onBlur,"icon-right-click":t.rightIconClick,"icon-click":i=>t.$emit("icon-click",i)},nativeOn:{keyup:function(i){if(!i.type.indexOf("key")&&t._k(i.keyCode,"esc",27,i.key,["Esc","Escape"]))return null;i.preventDefault(),t.isActive=!1},keydown:[function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"tab",9,i.key,"Tab")?null:t.tabPressed.apply(null,arguments)},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"enter",13,i.key,"Enter")?null:t.enterPressed.apply(null,arguments)},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"up",38,i.key,["Up","ArrowUp"])?null:(i.preventDefault(),t.keyArrows("up"))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"down",40,i.key,["Down","ArrowDown"])?null:(i.preventDefault(),t.keyArrows("down"))}]},model:{value:t.newValue,callback:function(i){t.newValue=i},expression:"newValue"}},"CInput",t.$attrs,!1)),r("transition",{attrs:{name:"fade"}},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isDropdownOpen,expression:"isDropdownOpen"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":t.isOpenedTop&&!t.appendToBody},style:t.style},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"dropdown-content",style:t.contentStyle},[t.hasHeaderSlot?r("div",{staticClass:"dropdown-item"},[t._t("header")],2):t._e(),t._l(t.data,function(i,a){return r("a",{key:a,staticClass:"dropdown-item",class:{"is-hovered":i===t.hovered},on:{click:function(o){return t.setSelected(i,void 0,o)}}},[t.hasDefaultSlot?t._t("default",null,{option:i,index:a}):r("span",[t._v(" "+t._s(t.getValue(i,!0))+" ")])],2)}),t.data.length===0&&t.hasEmptySlot?r("div",{staticClass:"dropdown-item is-disabled"},[t._t("empty")],2):t._e(),t.hasFooterSlot?r("div",{staticClass:"dropdown-item"},[t._t("footer")],2):t._e()],2)])])],1)},zdt=[],Vdt=he(Bdt,jdt,zdt,!1,null,null,null,null);const Udt=Vdt.exports,OOt="",Hdt={name:"CRadio",mixins:[DS]};var Wdt=function(){var t=this,r=t._self._c;return r("label",{ref:"label",staticClass:"b-radio radio",class:[`is-${t.size}`,{"is-disabled":t.disabled}],attrs:{disabled:t.disabled},on:{click:t.focus,keydown:function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"enter",13,i.key,"Enter")?null:(i.preventDefault(),t.$refs.label.click())}}},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.computedValue,expression:"computedValue"}],ref:"input",attrs:{disabled:t.disabled,required:t.required,name:t.name,type:"radio"},domProps:{value:t.nativeValue,checked:t._q(t.computedValue,t.nativeValue)},on:{click:function(i){i.stopPropagation()},change:function(i){t.computedValue=t.nativeValue}}}),r("span",{staticClass:"check",class:`is-${t.type}`}),r("span",{staticClass:"control-label"},[t._t("default")],2)])},Gdt=[],qdt=he(Hdt,Wdt,Gdt,!1,null,null,null,null);const CY=qdt.exports,DOt="",Ydt={name:"CRadioButton",mixins:[DS],components:{CButton:kf},props:{type:{type:String,default:"primary"},expanded:Boolean},data(){return{isFocused:!1}}};var Kdt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"control",class:{"is-expanded":t.expanded}},[r("CButton",{ref:"label",staticClass:"c-radio radio button",class:[{"is-disabled":t.disabled,"is-focused":t.isFocused}],attrs:{tag:"label",type:t.newValue===t.nativeValue?t.type:null,size:t.size,disabled:t.disabled},on:{click:t.focus,keydown:function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"enter",13,i.key,"Enter")?null:(i.preventDefault(),t.$refs.$el.label.click())}}},[t._t("default"),r("input",{directives:[{name:"model",rawName:"v-model",value:t.computedValue,expression:"computedValue"}],ref:"input",attrs:{disabled:t.disabled,required:t.required,name:t.name,type:"radio"},domProps:{value:t.nativeValue,checked:t._q(t.computedValue,t.nativeValue)},on:{click:function(i){i.stopPropagation()},focus:function(i){t.isFocused=!0},blur:function(i){t.isFocused=!1},change:function(i){t.computedValue=t.nativeValue}}})],2)],1)},Zdt=[],Jdt=he(Ydt,Kdt,Zdt,!1,null,null,null,null);const kY=Jdt.exports,MOt="",Xdt={name:"CSelect",mixins:[OS],inheritAttrs:!1,props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},placeholder:String,multiple:Boolean,selectClass:[String,Object,Array],nativeSize:[String,Number]},data(){return{selected:this.value,_elementRef:"select"}},computed:{computedValue:{get(){return this.selected},set(n){this.selected=n,this.$emit("input",n),!this.isValid&&this.checkHtml5Validity()}},spanClasses(){return[this.size,this.statusType,{"is-fullwidth":this.expanded,"is-loading":this.loading,"is-multiple":this.multiple,"is-rounded":this.rounded,"is-empty":this.selected===null}]}},watch:{value(n){this.selected=n,!this.isValid&&this.checkHtml5Validity()}}};var Qdt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"control",class:{"is-expanded":t.expanded,"has-icons-left":t.icon}},[r("span",{staticClass:"select",class:t.spanClasses},[r("select",t._b({directives:[{name:"model",rawName:"v-model",value:t.computedValue,expression:"computedValue"}],ref:"select",class:t.selectClass,attrs:{multiple:t.multiple,size:t.nativeSize},on:{blur:function(i){t.$emit("blur",i)&&t.checkHtml5Validity()},focus:function(i){return t.$emit("focus",i)},change:function(i){var a=Array.prototype.filter.call(i.target.options,function(o){return o.selected}).map(function(o){var s="_value"in o?o._value:o.value;return s});t.computedValue=i.target.multiple?a:a[0]}}},"select",t.$attrs,!1),[t.placeholder&&t.computedValue==null?r("option",{attrs:{disabled:"",hidden:""},domProps:{value:null}},[t._v(" "+t._s(t.placeholder)+" ")]):t._e(),t._t("default")],2)])])},ept=[],tpt=he(Xdt,Qdt,ept,!1,null,"e050ad8b",null,null);const SY=tpt.exports,POt="",npt={name:"CCallout",components:{CButton:kf},props:{title:String,size:String,type:String,padding:String,closable:{type:Boolean,default:!1},legacy:{type:Boolean,default:!0},icon:{type:String,default:null}}};var rpt=function(){var t=this,r=t._self._c;return r("transition",{attrs:{name:"fade"}},[t.legacy?r("article",{staticClass:"message",class:[`is-${t.type}`,`is-${t.size}`]},[r("section",{staticClass:"message-body",style:{padding:t.padding}},[t.title?r("header",{staticClass:"message-header"},[t._v(" "+t._s(t.title)+" ")]):t._e(),r("div",{staticClass:"media"},[r("div",{staticClass:"media-content"},[t._t("default")],2)])]),t.closable?r("CButton",{staticStyle:{right:"calc(0.5 * var(--rem))",position:"absolute",top:"calc(0.5 * var(--rem))"},attrs:{type:t.type,size:"small",pattern:"secondary",circle:"",icon:"x"},on:{click:function(i){return t.$emit("close")}}}):t._e()],1):r("div",{staticClass:"flex p-4 border border-gray-200 rounded-md bg-gray-50"},[t.icon?r("div",{staticClass:"mr-3 -mt-px"},[r("BaseIcon",{attrs:{type:t.icon,size:"16"}})],1):t._e(),r("div",[r("div",[t._t("title",function(){return[r("div",{staticClass:"font-medium"},[t._v(t._s(t.title))])]})],2),r("div",{staticClass:"text-gray-800"},[t._t("default",function(){return[r("div",{staticClass:"mb-2 text-gray-500"},[t._v(t._s(t.text))])]})],2)])])])},ipt=[],apt=he(npt,rpt,ipt,!1,null,"d41b9cf0",null,null);const Y7=apt.exports,IOt="",opt={name:"CSwitch",props:{value:[String,Number,Boolean,Function,Object,Array,Date],nativeValue:[String,Number,Boolean,Function,Object,Array,Date],disabled:Boolean,type:String,name:String,required:Boolean,size:{size:String,default:"default"},trueValue:{type:[String,Number,Boolean,Function,Object,Array,Date],default:!0},falseValue:{type:[String,Number,Boolean,Function,Object,Array,Date],default:!1},rounded:{type:Boolean,default:!0}},data(){return{newValue:this.value}},computed:{computedValue:{get(){return this.newValue},set(n){this.newValue=n,this.$emit("input",n)}},newClass(){return[`is-${this.size}`,{"is-disabled":this.disabled,"is-rounded":this.rounded}]}},watch:{value(n){this.newValue=n}},methods:{focus(){this.$refs.input.focus()}}};var spt=function(){var t=this,r=t._self._c;return r("label",{ref:"label",staticClass:"switch",class:t.newClass,attrs:{disabled:t.disabled},on:{click:t.focus,keydown:function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"enter",13,i.key,"Enter")?null:(i.preventDefault(),t.$refs.label.click())}}},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.computedValue,expression:"computedValue"}],ref:"input",attrs:{disabled:t.disabled,name:t.name,required:t.required,"true-value":t.trueValue,"false-value":t.falseValue,type:"checkbox"},domProps:{value:t.nativeValue,checked:Array.isArray(t.computedValue)?t._i(t.computedValue,t.nativeValue)>-1:t._q(t.computedValue,t.trueValue)},on:{click:function(i){i.stopPropagation()},change:function(i){var a=t.computedValue,o=i.target,s=o.checked?t.trueValue:t.falseValue;if(Array.isArray(a)){var c=t.nativeValue,l=t._i(a,c);o.checked?l<0&&(t.computedValue=a.concat([c])):l>-1&&(t.computedValue=a.slice(0,l).concat(a.slice(l+1)))}else t.computedValue=s}}}),r("span",{staticClass:"check",class:[`is-${t.type}`]}),r("span",{staticClass:"control-label"},[t._t("default")],2)])},lpt=[],cpt=he(opt,spt,lpt,!1,null,"e8ba33eb",null,null);const TY=cpt.exports,upt={name:"CSlotComponent",props:{component:{type:Object,required:!0},name:{type:String,default:"default"},scoped:{type:Boolean},props:{type:Object},tag:{type:String,default:"div"},event:{type:String,default:"hook:updated"}},methods:{refresh(){this.$forceUpdate()},isVueComponent(){return this.component&&this.component._isVue}},created(){this.isVueComponent()&&this.component.$on(this.event,this.refresh)},beforeDestroy(){this.isVueComponent()&&this.component.$off(this.event,this.refresh)},render(n){if(this.isVueComponent())return n(this.tag,{},this.scoped?this.component.$scopedSlots[this.name](this.props):this.component.$slots[this.name])}},ROt="",dpt={name:"CTabs",components:{CSlotComponent:upt},props:{value:[Number,String],expanded:Boolean,type:String,size:String,position:{type:String,validator(n){return["left","right","center"].indexOf(n)>-1},default:null},animated:{type:Boolean,default:!0},destroyOnHide:{type:Boolean,default:!1},vertical:Boolean,multiline:Boolean},data(){return{activeTab:0,defaultSlots:[],contentHeight:0,isTransitioning:!1,_isTabs:!0}},computed:{mainClasses(){return{"is-fullwidth":this.expanded,"is-vertical":this.vertical,"is-multiline":this.multiline,[`is-${this.position}`]:this.position&&this.vertical}},navClasses(){return[this.type,{[`is-${this.size}`]:!!this.size,[`is-${this.position}`]:this.position&&!this.vertical,"is-fullwidth":this.expanded,"is-toggle-rounded is-toggle":this.type==="is-toggle-rounded"}]},tabItems(){return this.defaultSlots.filter(n=>n.componentInstance&&n.componentInstance.$data&&n.componentInstance.$data._isTabItem).map(n=>n.componentInstance)}},watch:{value(n){const t=this.getIndexByValue(n,n);this.changeTab(t)},tabItems(){if(this.activeTab<this.tabItems.length){let n=this.activeTab;this.tabItems.map((t,r)=>{t.isActive&&(n=r,n<this.tabItems.length&&(this.tabItems[n].isActive=!1))}),this.tabItems[this.activeTab].isActive=!0}else this.activeTab>0&&this.changeTab(this.activeTab-1)}},mounted(){this.activeTab=this.getIndexByValue(this.value||0),this.activeTab<this.tabItems.length&&(this.tabItems[this.activeTab].isActive=!0),this.refreshSlots()},methods:{changeTab(n){this.activeTab===n||this.tabItems[n]===void 0||(this.activeTab<this.tabItems.length&&this.tabItems[this.activeTab].deactivate(this.activeTab,n),this.tabItems[n].activate(this.activeTab,n),this.activeTab=n,this.$emit("change",this.getValueByIndex(n)))},tabClick(n){this.activeTab!==n&&(this.$emit("input",this.getValueByIndex(n)),this.changeTab(n))},refreshSlots(){this.defaultSlots=this.$slots.default||[]},getIndexByValue(n){const t=this.tabItems.map(r=>r.$options.propsData?r.$options.propsData.value:void 0).indexOf(n);return t>=0?t:n},getValueByIndex(n){const{propsData:t}=this.tabItems[n].$options;return t&&t.value?t.value:n}}};var ppt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"c-tabs",class:t.mainClasses},[r("nav",{staticClass:"tabs",class:t.navClasses},[r("ul",t._l(t.tabItems,function(i,a){return r("li",{directives:[{name:"show",rawName:"v-show",value:i.visible,expression:"tabItem.visible"}],key:a,class:{"is-active":t.activeTab===a,"is-disabled":i.disabled}},[i.$slots.header?r("CSlotComponent",{attrs:{component:i,name:"header",tag:"a"},nativeOn:{click:function(o){return t.tabClick(a)}}}):r("a",{on:{click:function(o){return t.tabClick(a)}}},[i.icon?r("BaseIcon",{attrs:{size:t.size,type:i.icon}}):t._e(),r("span",[t._v(t._s(i.label))])],1)],1)}),0)]),r("section",{staticClass:"tab-content",class:{"is-transitioning":t.isTransitioning}},[t._t("default")],2)])},fpt=[],hpt=he(dpt,ppt,fpt,!1,null,"e8891cc0",null,null);const EY=hpt.exports;var mpt=he({name:"CTabItem",props:{label:String,icon:String,iconPack:String,disabled:Boolean,visible:{type:Boolean,default:!0},value:[String,Number]},data(){return{isActive:!1,transitionName:null,_isTabItem:!0}},created(){if(!this.$parent.$data._isTabs)throw this.$destroy(),new Error("You should wrap bTabItem on a bTabs");this.$parent.refreshSlots()},beforeDestroy(){this.$parent.refreshSlots()},methods:{activate(n,t){this.transitionName=t<n?this.$parent.vertical?"slide-down":"slide-next":this.$parent.vertical?"slide-up":"slide-prev",this.isActive=!0},deactivate(n,t){this.transitionName=t<n?this.$parent.vertical?"slide-down":"slide-next":this.$parent.vertical?"slide-up":"slide-prev",this.isActive=!1}},render(n){if(this.$parent.destroyOnHide&&(!this.isActive||!this.visible))return;const t=n("div",{directives:[{name:"show",value:this.isActive&&this.visible}],class:"tab-item"},this.$slots.default);return this.$parent.animated?n("transition",{props:{name:this.transitionName,mode:"out-in"},on:{"before-enter":()=>{this.$parent.isTransitioning=!0},"after-enter":()=>{this.$parent.isTransitioning=!1}}},[t]):t}},null,null,!1,null,null,null,null);const $Y=mpt.exports,BOt="",gpt={name:"CMessage",props:{type:{type:String,default:"secondary"},badge:{type:String,default:""},text:{type:String,default:""}}};var vpt=function(t,r){return t("div",{class:[r.data.class,r.data.staticClass],staticStyle:{padding:"0.75em 1em",display:"flex","align-items":"flex-start","border-radius":"0.6em","background-color":"hsl(var(--gray-color-100) / 1)"},style:{...r.data.staticStyle}},[t("div",{class:[`has-background-${r.props.type}`],staticStyle:{display:"inline-block",padding:"0.5em","border-radius":"0.45em","font-weight":"700",color:"white","line-height":"1","font-size":"12px","margin-right":"1.25em"}},[r._v(" "+r._s(r.props.badge||r.parent.$t("components:cling.message.tip"))+" ")]),t("div",{staticStyle:{color:"hsl(0, 0%, 25%)"}},[r.props.text?[r._v(" "+r._s(r.props.text)+" ")]:r._e(),r._t("default")],2)])},ypt=[],bpt=he(gpt,vpt,ypt,!0,null,"9be3b227",null,null);const AY=bpt.exports,_pt={name:"FlagIcon",props:{region:{type:String,default:null},title:{type:String,default:null},isSquared:{type:Boolean,default:!1}},mounted(){var o,s;const n="FLAG_ICONS",t=(s=(o=this.$el).getRootNode)==null?void 0:s.call(o),i=(t==null?void 0:t.toString())==="[object ShadowRoot]"?t:document.head;if(i.querySelector(`#${n}`))return;const a=document.createElement("link");a.id=n,a.rel="stylesheet",a.type="text/css",a.href="https://www.unpkg.com/flag-icons@6.6.6/css/flag-icons.min.css",a.media="all",i.appendChild(a)}};var wpt=function(){var t=this,r=t._self._c;return t.region?r("span",{staticClass:"fi",class:[`fi-${this.region.toLowerCase()}`,{fis:this.isSquared}],attrs:{title:t.title||t.region}}):t._e()},xpt=[],Cpt=he(_pt,wpt,xpt,!1,null,null,null,null);const OY=Cpt.exports,kpt={name:"CPhoneInput",components:{Flag:OY,CInput:al,CDropdown:Of,CDropdownItem:nd,CButton:kf,CField:i7,SmartList:o_},props:{value:{type:[String,Number],default:""},region:{type:String,default:""},defaultRegion:{type:String,required:!0},label:{type:String,default:""},labelPosition:{type:String,default:""}},data(){return{internalPrefix:null,searchQuery:""}},computed:{defaultPrefix(){return zr[this.internalRegion].callingCode},currentRegion(){return this.getRegionByCallingCode(this.prefix)},internalRegion:{get(){if(this.region)return this.region;if(this.value){const n=(Object.keys(zr)||[]).find(t=>zr[t].callingCode&&this.value&&this.value.startsWith(zr[t].callingCode));if(n)return n}return this.internalPrefix?this.getRegionByCallingCode(this.internalPrefix):this.defaultRegion},set(n){this.$emit("update:region",n),this.updateValue({prefix:zr[n].callingCode})}},prefix(){if(!this.value)return this.internalPrefix||this.defaultPrefix;const n=(Object.keys(zr)||[]).find(t=>zr[t].callingCode&&this.value&&this.value.startsWith(zr[t].callingCode));return n?zr[n].callingCode:this.defaultPrefix},phone:{get(){return this.prefix&&this.value&&this.value.startsWith(this.prefix)?this.value.substring(this.prefix.length):this.value},set(n){this.updateValue({phone:n})}},sortedRegions(){return(Object.keys(zr)||[]).map(n=>({key:n,title:`${zr[n].name} (${n})`,callingCode:zr[n].callingCode})).sort((n,t)=>n.title.localeCompare(t.title))}},methods:{getRegionByCallingCode(n){return n?(Object.keys(zr)||[]).find(r=>n===zr[r].callingCode):null},updateValue({prefix:n,phone:t}){const r=n!==void 0?n:this.prefix||"",i=t!==void 0?t:this.phone||"",a=`${r}${i}`;a!==r?(this.$emit("input",a),this.region||this.$emit("update:region",this.internalRegion),this.internalPrefix=null):(this.internalPrefix=r,this.$emit("input",""))}}};var Spt=function(){var t=this,r=t._self._c;return r("CField",{staticClass:"has-addons",attrs:{expanded:""}},[r("div",{staticClass:"control"},[r("SmartList",{attrs:{query:t.searchQuery,items:t.sortedRegions},scopedSlots:t._u([{key:"default",fn:function({items:i}){return[r("CDropdown",{staticClass:"control",staticStyle:{height:"100%"},attrs:{size:t.$attrs.size,disabled:t.$attrs.disabled,"menu-styling":{maxWidth:"300px"},scrollable:!0,position:"is-bottom-right","max-height":"240px"},model:{value:t.internalRegion,callback:function(a){t.internalRegion=a},expression:"internalRegion"}},[r("CButton",{staticStyle:{height:"100%"},attrs:{slot:"trigger",size:t.$attrs.size,type:"none",pattern:"secondary"},slot:"trigger"},[r("Flag",{staticStyle:{"margin-right":"0.35em"},attrs:{region:t.internalRegion}}),t._v(" "+t._s(t.prefix)+" ")],1),r("CInput",{staticStyle:{"margin-bottom":"0.25em"},attrs:{slot:"header",placeholder:t.$t("_common:search"),filled:""},slot:"header",model:{value:t.searchQuery,callback:function(a){t.searchQuery=a},expression:"searchQuery"}}),t._l(i,function({key:a,title:o,callingCode:s}){return r("CDropdownItem",{key:a,staticClass:"truncate-text",attrs:{value:a}},[r("Flag",{staticStyle:{"margin-right":"0.75em",flex:"0 0 auto"},attrs:{region:a,title:o}}),r("span",{staticClass:"truncate-text"},[t._v(" "+t._s(o)+" ("+t._s(s)+") ")])],1)})],2)]}}])})],1),r("CField",{staticClass:"control",attrs:{label:t.label,"label-position":t.labelPosition,expanded:""}},[r("CInput",t._b({attrs:{size:t.$attrs.size,placeholder:t.$attrs.placeholder,type:"tel"},model:{value:t.phone,callback:function(i){t.phone=i},expression:"phone"}},"CInput",{...t.$attrs,...t.$props},!1))],1)],1)},Tpt=[],Ept=he(kpt,Spt,Tpt,!1,null,null,null,null);const DY=Ept.exports,$pt={name:"CSliderThumb",inheritAttrs:!1,props:{value:{type:Number,default:0},type:{type:String,default:""},tooltip:{type:Boolean,default:!0},customFormatter:Function},data(){return{isFocused:!1,dragging:!1,startX:0,startPosition:0,newPosition:null,oldValue:this.value}},computed:{disabled(){return this.$parent.disabled},max(){return this.$parent.max},min(){return this.$parent.min},step(){return this.$parent.step},precision(){return this.$parent.precision},currentPosition(){return`${(this.value-this.min)/(this.max-this.min)*100}%`},wrapperStyle(){return{left:this.currentPosition}},tooltipLabel(){return typeof this.customFormatter<"u"?this.customFormatter(this.value):this.value.toString()}},methods:{onFocus(){this.isFocused=!0},onBlur(){this.isFocused=!1},onButtonDown(n){this.disabled||(n.preventDefault(),this.onDragStart(n),typeof window<"u"&&(document.addEventListener("mousemove",this.onDragging),document.addEventListener("touchmove",this.onDragging),document.addEventListener("mouseup",this.onDragEnd),document.addEventListener("touchend",this.onDragEnd),document.addEventListener("contextmenu",this.onDragEnd)))},onLeftKeyDown(){this.disabled||this.value===this.min||(this.newPosition=parseFloat(this.currentPosition)-this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onRightKeyDown(){this.disabled||this.value===this.max||(this.newPosition=parseFloat(this.currentPosition)+this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onHomeKeyDown(){this.disabled||this.value===this.min||(this.newPosition=0,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onEndKeyDown(){this.disabled||this.value===this.max||(this.newPosition=100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onDragStart(n){this.dragging=!0,this.$emit("dragstart"),n.type==="touchstart"&&(n.clientX=n.touches[0].clientX),this.startX=n.clientX,this.startPosition=parseFloat(this.currentPosition),this.newPosition=this.startPosition},onDragging(n){if(this.dragging){n.type==="touchmove"&&(n.clientX=n.touches[0].clientX);const t=(n.clientX-this.startX)/this.$parent.sliderSize()*100;this.newPosition=this.startPosition+t,this.setPosition(this.newPosition)}},onDragEnd(){this.dragging=!1,this.$emit("dragend"),this.value!==this.oldValue&&this.$parent.emitValue("change"),this.setPosition(this.newPosition),typeof window<"u"&&(document.removeEventListener("mousemove",this.onDragging),document.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd),document.removeEventListener("contextmenu",this.onDragEnd))},setPosition(n){if(n===null||isNaN(n))return;n<0?n=0:n>100&&(n=100);const t=100/((this.max-this.min)/this.step);let i=Math.round(n/t)*t/100*(this.max-this.min)+this.min;i=parseFloat(i.toFixed(this.precision)),this.$emit("input",i),!this.dragging&&i!==this.oldValue&&(this.oldValue=i)}}};var Apt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"c-slider-thumb-wrapper",class:{"is-dragging":t.dragging},style:t.wrapperStyle},[r("div",t._b({staticClass:"c-slider-thumb",attrs:{tabindex:t.disabled?!1:0},on:{mousedown:t.onButtonDown,touchstart:t.onButtonDown,focus:t.onFocus,blur:t.onBlur,keydown:[function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"left",37,i.key,["Left","ArrowLeft"])||"button"in i&&i.button!==0?null:(i.preventDefault(),t.onLeftKeyDown.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"right",39,i.key,["Right","ArrowRight"])||"button"in i&&i.button!==2?null:(i.preventDefault(),t.onRightKeyDown.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"down",40,i.key,["Down","ArrowDown"])?null:(i.preventDefault(),t.onLeftKeyDown.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"up",38,i.key,["Up","ArrowUp"])?null:(i.preventDefault(),t.onRightKeyDown.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"home",void 0,i.key,void 0)?null:(i.preventDefault(),t.onHomeKeyDown.apply(null,arguments))},function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"end",void 0,i.key,void 0)?null:(i.preventDefault(),t.onEndKeyDown.apply(null,arguments))}]}},"div",t.$attrs,!1))])},Opt=[],Dpt=he($pt,Apt,Opt,!1,null,null,null,null);const Mpt=Dpt.exports,Ppt={name:"CSliderTick",props:{value:{type:Number,default:0}},computed:{position(){const n=(this.value-this.$parent.min)/(this.$parent.max-this.$parent.min)*100;return n>=0&&n<=100?n:0},hidden(){return this.value===this.$parent.min||this.value===this.$parent.max}},created(){if(!this.$parent.$data._isSlider)throw this.$destroy(),new Error("You should wrap bSliderTick on a bSlider")},methods:{getTickStyle(n){return{left:`${n}%`}}}};var Ipt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"c-slider-tick",class:{"is-tick-hidden":t.hidden},style:t.getTickStyle(t.position)},[t.$slots.default?r("span",{staticClass:"c-slider-tick-label"},[t._t("default")],2):t._e()])},Rpt=[],Lpt=he(Ppt,Ipt,Rpt,!1,null,null,null,null);const Fpt=Lpt.exports,jOt="",Npt={name:"CSlider",components:{CSliderThumb:Mpt,CSliderTick:Fpt},props:{value:{type:[Number,Array],default:0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},type:{type:String,default:"primary"},size:String,ticks:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!0},tooltipType:String,rounded:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},customFormatter:Function,ariaLabel:[String,Array],biggerSliderFocus:{type:Boolean,default:!1}},data(){return{value1:null,value2:null,dragging:!1,isRange:!1,_isSlider:!0}},computed:{newTooltipType(){return this.tooltipType?this.tooltipType:this.type},tickValues(){if(!this.ticks||this.min>this.max||this.step===0)return[];const n=[];for(let t=this.min+this.step;t<this.max;t+=this.step)n.push(t);return n},minValue(){return Math.min(this.value1,this.value2)},maxValue(){return Math.max(this.value1,this.value2)},barSize(){return this.isRange?`${100*(this.maxValue-this.minValue)/(this.max-this.min)}%`:`${100*(this.value1-this.min)/(this.max-this.min)}%`},barStart(){return this.isRange?`${100*(this.minValue-this.min)/(this.max-this.min)}%`:"0%"},precision(){const n=[this.min,this.max,this.step].map(t=>{const r=`${t}`.split(".")[1];return r?r.length:0});return Math.max(...n)},barStyle(){return{width:this.barSize,left:this.barStart}},rootClasses(){return{"is-rounded":this.rounded,"is-dragging":this.dragging,"is-disabled":this.disabled,"slider-focus":this.biggerSliderFocus}}},watch:{value(n){this.setValues(n)},value1(){this.onInternalValueUpdate()},value2(){this.onInternalValueUpdate()},min(){this.setValues(this.value)},max(){this.setValues(this.value)}},created(){this.isThumbReversed=!1,this.isTrackClickDisabled=!1,this.setValues(this.value)},methods:{setValues(n){if(!(this.min>this.max))if(Array.isArray(n)){this.isRange=!0;const t=typeof n[0]!="number"||isNaN(n[0])?this.min:v8(n[0],this.min,this.max),r=typeof n[1]!="number"||isNaN(n[1])?this.max:v8(n[1],this.min,this.max);this.value1=this.isThumbReversed?r:t,this.value2=this.isThumbReversed?t:r}else this.isRange=!1,this.value1=isNaN(n)?this.min:v8(n,this.min,this.max),this.value2=null},onInternalValueUpdate(){this.isRange&&(this.isThumbReversed=this.value1>this.value2),(!this.lazy||!this.dragging)&&this.emitValue("input"),this.dragging&&this.emitValue("dragging")},sliderSize(){return this.$refs.slider.getBoundingClientRect().width},onSliderClick(n){if(this.disabled||this.isTrackClickDisabled)return;const t=this.$refs.slider.getBoundingClientRect().left,r=(n.clientX-t)/this.sliderSize()*100,i=this.min+r*(this.max-this.min)/100,a=Math.abs(i-this.value1);if(this.isRange){const o=Math.abs(i-this.value2);if(a<=o){if(a<this.step/2)return;this.$refs.button1.setPosition(r)}else{if(o<this.step/2)return;this.$refs.button2.setPosition(r)}}else{if(a<this.step/2)return;this.$refs.button1.setPosition(r)}this.emitValue("change")},onDragStart(){this.dragging=!0,this.$emit("dragstart")},onDragEnd(){this.isTrackClickDisabled=!0,setTimeout(()=>{this.isTrackClickDisabled=!1},0),this.dragging=!1,this.$emit("dragend"),this.lazy&&this.emitValue("input")},emitValue(n){this.$emit(n,this.isRange?[this.minValue,this.maxValue]:this.value1)}}};var Bpt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"c-slider",class:[`is-${t.size}`,`is-${t.type}`,t.rootClasses],on:{click:t.onSliderClick}},[r("div",{ref:"slider",staticClass:"c-slider-track"},[r("div",{staticClass:"c-slider-fill",style:t.barStyle}),t.ticks?t._l(t.tickValues,function(i,a){return r("CSliderTick",{key:a,attrs:{value:i}})}):t._e(),t._t("default"),r("CSliderThumb",{ref:"button1",attrs:{type:`is-${t.newTooltipType}`,tooltip:t.tooltip,"custom-formatter":t.customFormatter,"aria-valuenow":t.value1,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-label":Array.isArray(t.ariaLabel)?t.ariaLabel[0]:t.ariaLabel,"aria-disabled":t.disabled,role:"slider","aria-orientation":"horizontal"},on:{dragstart:t.onDragStart,dragend:t.onDragEnd},model:{value:t.value1,callback:function(i){t.value1=i},expression:"value1"}}),t.isRange?r("CSliderThumb",{ref:"button2",attrs:{type:t.newTooltipType,tooltip:t.tooltip,"custom-formatter":t.customFormatter,"aria-valuenow":t.value2,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-label":Array.isArray(t.ariaLabel)?t.ariaLabel[1]:"","aria-disabled":t.disabled,role:"slider","aria-orientation":"horizontal"},on:{dragstart:t.onDragStart,dragend:t.onDragEnd},model:{value:t.value2,callback:function(i){t.value2=i},expression:"value2"}}):t._e()],2)])},jpt=[],zpt=he(Npt,Bpt,jpt,!1,null,null,null,null);const MY=zpt.exports;function PY(n){n.component(xY.name,xY),n.component("CAutocomplete",Udt),n.component(Qu.name,Qu),n.component(CY.name,CY),n.component(kY.name,kY),n.component(Of.name,Of),n.component(nd.name,nd),n.component(SY.name,SY),n.component(Y7.name,Y7),n.component(TY.name,TY),n.component(EY.name,EY),n.component($Y.name,$Y),n.component("CField",a7),n.component(AY.name,AY),n.component(DY.name,DY),n.component(MY.name,MY)}Ne.use(PY);const Vpt={name:"DocForm",i18nOptions:{namespaces:"widgetDocForm",messages:{en:{selectNavTitle:"Select a template"},sv:{selectNavTitle:"Välj en mall"}}},components:{TemplateSelector:wQe,DocumentForm:Uut,PostSend:Fdt},props:{setFormValue:{type:Function,default:null},onSaveTemplate:{type:Function,default:null},removeFormValue:{type:Function,default:null},closeFunc:{type:Function,default:null},beforeSave:{type:Function,default:null},beforeSend:{type:Function,default:null},galleryCategory:{type:String,default:null},showBackButton:{type:Boolean,default:!0},allowSenderSign:{type:Boolean,default:!0}},provide(){return{allowSenderSign:this.allowSenderSign}},data(){return{view:"editor",document:null}},computed:{...Yy({company:"application/company",feature:"application/feature",can:"application/can",rawDoc:"forms/document",isPosting:"documents2/isPosting",docById:"documents2/byId"})},watch:{rawDoc:{immediate:!0,handler(){this.initDoc()}},document:{immediate:!0,handler(n){const{companyUserId:t,sender:r={}}=n||{},{user:i={}}=r||{};t&&!Object.keys(i).length&&this.loadCompanyUser({id:t})}}},created(){var n;(!this.rawDoc||(n=this.rawDoc)!=null&&n.__isNew)&&(this.view="templateSelect")},methods:{...Ky({removeFormKeyValue:He.REMOVE_FORM_KEY_VALUE,loadDocumentForm:He.LOAD_DOCUMENT2_FORM,duplicateDocumentForm:He.LOAD_DUPLICATE_DOCUMENT2_FORM,saveDocument:He.SAVE_DYNDOC_FORM,loadCompanyUser:He.LOAD_COMPANY_USER}),async initDoc(){if(!this.rawDoc)throw new Error("Missing initiated form document");this.document=new uc({data:this.rawDoc,can:this.can,getters:this.$store.getters,updateSender:!0})},async onTemplateSelect({templateId:n,documentId:t,formData:r}){var a;const i=X4e({...this.rawDoc},["__tempId","externalReferences","subscriberCompanyUserIds","clients","data"]);t?await this.duplicateDocumentForm({id:t,_formData:i}):await this.loadDocumentForm({templateId:n,formData:r?cm(r,i):null,_formData:i}),(a=i==null?void 0:i.data)!=null&&a.name&&this.setDocValue({key:"data.name",value:i.data.name}),await this.initDoc(),this.view="editor"},setDocValue({key:n,value:t}){return this.setFormValue({key:n,value:t})},removeDocValue(n){return this.removeFormValue(n)},removeDocKeyValue(n){return this.removeFormKeyValue(`document2.${n}`)},async onSaveDocument({doSend:n=!1}={}){var o;let t;if(typeof this.beforeSave=="function"&&(t=await this.beforeSave(this.document)),n&&typeof this.beforeSend=="function"&&(t=await this.beforeSend(this.document)),t)return;const r=await this.saveDocument({doSend:n});if(!r)return;const i=this.docById(r);let a;n&&(a=!!(i!=null&&i.senderClient)||this.isManualDelivery(i)),a?(this.document=i,this.view="postSend"):(o=this.closeFunc)==null||o.call(this)},goBack(){this.view="templateSelect",this.setDocValue({key:"__isNew",value:!0})},isManualDelivery(n){const t=M2(n);return!t.sms&&!t.email}}};var Upt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"flex flex-col w-full h-full"},[t.view==="templateSelect"?r("div",{staticClass:"flex flex-col w-full h-full"},[r("div",{staticClass:"relative flex items-center justify-center h-16 border-b border-gray-200"},[t.closeFunc?r("CButton",{staticClass:"absolute -translate-y-1/2 top-1/2 left-4",attrs:{icon:"x",circle:""},on:{click:t.closeFunc}}):t._e(),r("div",[t._v(t._s(t.$t("selectNavTitle")))])],1),r("TemplateSelector",{staticClass:"min-h-0 body-scroll",attrs:{"on-use-template":t.onTemplateSelect,"show-gallery":t.feature("templateGallery"),"show-gallery-template-author":!1,"gallery-category":t.galleryCategory,"on-save-template":t.onSaveTemplate,"include-partner-templates":""}})],1):t.view==="editor"?r("DocumentForm",{attrs:{document:t.document,"set-doc-value":t.setDocValue,"set-form-value":t.setFormValue,"remove-doc-value":t.removeDocValue,"remove-doc-key-value":t.removeDocKeyValue,"on-save-template":t.onSaveTemplate,"on-save-document":t.onSaveDocument,"is-loading":t.isPosting,close:t.closeFunc,"go-back":!t.document.id&&t.showBackButton?t.goBack:null,"can-show-banner":!1}}):r("PostSend",{attrs:{document:t.document,"on-send-func":t.closeFunc,"on-close-func":t.closeFunc}})],1)},Hpt=[],Wpt=he(Vpt,Upt,Hpt,!1,null,null,null,null);const Gpt=Wpt.exports,qpt=Object.freeze(Object.defineProperty({__proto__:null,default:Gpt},Symbol.toStringTag,{value:"Module"}));Ne.use(PY);const K7=Ne.observable({canEdit:!1,isForm:!0,setFormValue:null,removeFormValue:null}),Ypt={name:"DocFormSend",components:{SendForm:lq},provide:()=>({viewSettings:K7,allowSenderSign:!1}),props:{showName:{type:Boolean,default:!0},showSave:{type:Boolean,default:!0},showSchedule:{type:Boolean,default:!0},allowManualDelivery:{type:Boolean,default:!1},contentSlot:{type:String,default:null},footerSlot:{type:String,default:null},setFormValue:{type:Function,default:null},removeFormValue:{type:Function,default:null},closeFunc:{type:Function,default:null},beforeSave:{type:Function,default:null},beforeSend:{type:Function,default:null}},data(){return{document:null}},computed:{...Yy({company:"application/company",can:"application/can",rawDoc:"forms/document",isPosting:"documents2/isPosting"})},watch:{rawDoc:{immediate:!0,handler(){this.initDoc()}}},async created(){this.setDocValue&&(K7.setFormValue=this.setDocValue),this.removeDocValue&&(K7.removeFormValue=this.removeDocValue)},methods:{...Ky({saveDocument:He.SAVE_DYNDOC_FORM}),async initDoc(){if(!this.rawDoc)throw new Error("Missing initiated form document");this.document=new uc({data:this.rawDoc,can:this.can,getters:this.$store.getters,updateSender:!0})},setDocValue({key:n,value:t}){return this.setFormValue({key:n,value:t})},removeDocValue(n){return this.removeFormValue(n)},async onSaveDocument({doSend:n=!1}={}){let t=!1;typeof this.beforeSave=="function"&&(t=await this.beforeSave(this.document)),n&&typeof this.beforeSend=="function"&&(t=await this.beforeSend(this.document)),!(t||!await this.saveDocument({doSend:n}))&&this.close()},close(){this.closeFunc()}}};var Kpt=function(){var t=this,r=t._self._c;return t.document?r("SendForm",{staticClass:"w-full h-full",attrs:{_document:t.document,_value:{expiresAt:"data.expiresAt",personalMessage:"data.personalMessage",defaultAnswerMethod:"data.defaultAnswerMethod",clients:"clients",reminders:"data.reminders",name:"data.name"},"show-name":t.showName,"show-save":t.showSave,"show-schedule":t.showSchedule,"allow-manual-delivery":t.allowManualDelivery,"set-form-value":t.setDocValue,"remove-form-value":t.removeDocValue,"on-save-document":t.onSaveDocument,"use-scroll":""}},[t.contentSlot?r("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.contentSlot)},slot:"content"}):t._e(),t.footerSlot?r("div",{attrs:{slot:"footer"},domProps:{innerHTML:t._s(t.footerSlot)},slot:"footer"}):t._e()]):r("div",{staticClass:"grid w-full h-full place-items-center"},[r("BaseIcon",{staticClass:"text-gray-400 animate-spin",attrs:{type:"loader",size:28}})],1)},Zpt=[],Jpt=he(Ypt,Kpt,Zpt,!1,null,null,null,null);const Xpt=Jpt.exports,Qpt=Object.freeze(Object.defineProperty({__proto__:null,default:Xpt},Symbol.toStringTag,{value:"Module"})),zOt="",eft={i18nOptions:{namespaces:"documentPrint",messages:{en:{title:"Print options",appendAttachments:"Append attachments",appendAttachmentsSub:"Append attachments",hideDocumentAttachmentBlocks:"Hide document attachment blocks",hideDocumentAttachmentBlocksTooltip:"Hide blocks with the type of attachments.",showVerification:"Include verification",showVerificationSub:"Signature verification.",showLast4ssn:"Include the last 4 digits of the personal identification number from the BankID signature.",showEvents:"Show events",buttonText:"Download PDF",preparingPdf:"Preparing PDF...",preparingPdfDone:"PDF is complete",preparingPdfError:"Could not create PDF. Try again."},sv:{title:"Utskriftsinställningar",appendAttachments:"Bifoga bilagor",appendAttachmentsSub:"Inkludera bilagor i slutet av PDF:en.",hideDocumentAttachmentBlocks:"Göm dokumentblock som är bilagor",hideDocumentAttachmentBlocksTooltip:"Dölj blocken av typen bilagor.",showVerification:"Inkludera verifikat",showVerificationSub:"Signaturverifikat.",showLast4ssn:"Inkludera de sista 4-siffrorna i personnummret från BankID-signaturen",showEvents:"Visa händelser",buttonText:"Ladda ner PDF",preparingPdf:"Förbereder PDF...",preparingPdfDone:"PDF är redo",preparingPdfError:"Kunde inte skapa PDF. Pröva igen."}}},name:"DocumentPrint",components:{CCheckbox:Qu},props:{document:{type:Object,required:!0},isSuperUser:{type:Boolean,required:!1}},data(){return{options:{appendAttachments:!0,hideDocumentAttachmentBlocks:!1,showVerification:!0,showEvents:!0,showLast4ssn:!0,forceDoCreatePdf:!1,debugPage:!1,extraTimeout:0},showMoreOptions:!1,omitAttachmentBlockTooltip:{content:'<svg style="margin-top: 2px;" width="193" height="122" viewBox="0 0 193 122" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="193" height="122" rx="5" fill="white"/><text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" font-weight="bold" letter-spacing="0em"><tspan x="13" y="25.5">'+this.$t("_common:attachment_plural").capitalize()+`</tspan></text><path d="M14 33H25.2941L30 38.225V52H14V33Z" fill="#FFC4C4"/><path opacity="0.34" d="M14 60H25.5L30 64.5V79H14V60Z" fill="#42A4FF"/><text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0em"><tspan x="41" y="46.5">${this.$t("_common:file").capitalize()} #1</tspan></text><text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0em"><tspan x="41" y="73.5">${this.$t("_common:file").capitalize()} #2</tspan></text><rect x="13" y="87" width="61" height="12" fill="#E2E2E2"/><rect x="13" y="103" width="168" height="6" fill="#E2E2E2"/><rect x="13" y="112" width="151" height="6" fill="#E2E2E2"/><rect x="13" y="3" width="97" height="6" fill="#E2E2E2"/><rect x="14" y="47" width="16" height="5" fill="#FF1515"/><rect x="14" y="74" width="16" height="5" fill="#42A4FF"/></svg><div style="max-width: 193px; padding: 2px 0 8px 0;">
|
|
2848
2848
|
${this.$t("hideDocumentAttachmentBlocksTooltip")}
|
|
2849
2849
|
</div>`,placement:"left",boundariesElement(){return this.$parent.$el},html:!0}}},computed:{extraTimeout:{get(){return this.options.extraTimeout||null},set(n){n?this.options.extraTimeout=parseInt(n,10):this.options.extraTimeout=0}},allowVerification(){return this.document&&this.document.allowVerification},showAdminOptions(){return Xe.showAdminSettings||this.isSuperUser},hasBankIdSignatures(){var r;const{clients:n,senderClient:t}=this.document;return t!=null&&t.socialNo&&((r=t.answerMethod)==null?void 0:r.accept)==="bankId"?!0:n.some(i=>{var a;return i.socialNo&&((a=i.answerMethod)==null?void 0:a.accept)==="bankId"})}},created(){Object.assign(this.options,JSON.parse(_t.getItem("print-settings"))),this.allowVerification||(this.options.showVerification=!1),this.$watch("options",{deep:!0,handler(n){_t.setItem("print-settings",JSON.stringify(n)),!n.showVerification&&!n.showEvents&&(this.options.showEvents=!0),!n.showVerification&&!n.showLast4ssn&&(this.options.showLast4ssn=!0)}})},methods:{async generatePdf(){if(!this.document||!this.document.publicId)return;const{data:n}=await lR.addDocument(this.document.publicId,{...this.options,brand:Xe.brand});let t,r;const i=async()=>{const{data:o}=await lR.get(n)||{};({status:t,url:r}=o)},a=async()=>{try{if(await i(),t==="canceled")throw new Error(`Canceled preparing document pdf for publicId: ${this.document.publicId}`);if(t==="completed"&&r){const o=()=>{const s=window.open(r,"_blank");return s?(s.focus(),!0):!1};return o()||Jm({type:"success",message:this.$t("preparingPdfDone"),time:null,closeButton:!0,actions:{submit:{text:this.$t("_common:download"),callback:o}}}),"close"}return await vp(3e3),a()}catch(o){return Jm({type:"error",message:this.$t("preparingPdfError")}),this.$error(o,{showMessage:!1}),"close"}};await Jm({type:"spinner",message:this.$t("preparingPdf"),time:a,closeButton:!0}),this.$emit("close")}}};var tft=function(){var t=this,r=t._self._c;return r("div",[r("div",{staticClass:"options-wrapper"},[r("div",{staticClass:"pb-4 text-lg font-semibold"},[t._v(t._s(t.$t("title")))]),r("div",{staticClass:"print-options"},[r("div",{staticClass:"pb-1 text-sm font-medium text-gray-800 select-none"},[t._v(" "+t._s(t.$t("_common:document"))+" ")]),r("div",{staticClass:"option-item"},[r("div",{staticClass:"bg-gray-100 option-item__inner hover:bg-gray-200",class:{disabled:!t.document.attachedFiles.length},on:{click:function(i){t.options.appendAttachments=!t.options.appendAttachments}}},[r("CCheckbox",{staticStyle:{flex:"0 0 30px"},attrs:{value:t.document.attachedFiles.length?t.options.appendAttachments:!1,type:"secondary",size:"small"}}),r("div",[r("div",[t._v(t._s(t.$t("appendAttachments")))]),r("div",{staticClass:"has-text-grey-dark",staticStyle:{"font-size":"13px"}},[t._v(" "+t._s(t.$tc("_common:attachment",{count:t.document.attachedFiles.length}))+" ")])])],1),r("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.omitAttachmentBlockTooltip,expression:"omitAttachmentBlockTooltip"}]},[r("div",{staticClass:"bg-gray-100 option-item__inner hover:bg-gray-200",class:{disabled:!t.document.getAllNodesWithType("attachments").length},staticStyle:{"border-top":"2px solid hsl(0, 0%, 100%)"},on:{click:function(i){t.options.hideDocumentAttachmentBlocks=!t.options.hideDocumentAttachmentBlocks}}},[r("CCheckbox",{staticStyle:{flex:"0 0 30px"},attrs:{value:t.document.getAllNodesWithType("attachments").length?t.options.hideDocumentAttachmentBlocks:!1,type:"secondary",size:"small"}}),r("div",[r("div",[t._v(t._s(t.$t("hideDocumentAttachmentBlocks")))]),r("div",{staticClass:"has-text-grey-dark",staticStyle:{"font-size":"13px"}},[t._v(" "+t._s(t.$tc("_common:block",{count:t.document.getAllNodesWithType("attachments").length}))+" ")])])],1)])]),r("div",{staticStyle:{height:"1.25rem"}}),r("div",{staticClass:"pb-1 text-sm font-medium text-gray-800 select-none"},[t._v(" "+t._s(t.$t("_common:verification").capitalize())+" ")]),r("div",{staticClass:"option-item",class:{disabled:!t.allowVerification}},[r("div",{staticClass:"bg-gray-100 option-item__inner hover:bg-gray-200",on:{click:function(i){t.options.showVerification=!t.options.showVerification}}},[r("CCheckbox",{staticStyle:{flex:"0 0 30px"},attrs:{value:t.options.showVerification,type:"secondary",size:"small"}}),r("div",[r("div",[t._v(t._s(t.$t("showVerification")))]),r("div",{staticClass:"has-text-grey-dark",staticStyle:{"font-size":"13px"}},[t._v(" "+t._s(t.$t("showVerificationSub"))+" ")])])],1),t.options.showVerification?r("div",{staticClass:"bg-gray-100 option-item__inner hover:bg-gray-200",staticStyle:{"padding-left":"2rem","border-top":"2px solid hsl(0, 0%, 100%)"},on:{click:function(i){t.options.showEvents=!t.options.showEvents}}},[r("CCheckbox",{staticStyle:{flex:"0 0 30px"},attrs:{value:t.options.showEvents,type:"secondary",size:"small"}}),r("div",[r("div",[t._v(t._s(t.$t("showEvents")))])])],1):t._e(),t.options.showVerification&&t.hasBankIdSignatures?r("div",[r("div",{staticClass:"inline-flex items-center p-2 mt-3 mb-1 text-xs font-medium leading-none text-gray-500 rounded cursor-pointer select-none hover:bg-gray-100",on:{click:function(i){t.showMoreOptions=!t.showMoreOptions}}},[t._v(" "+t._s(t.$t("_common:more").capitalize())+" "),r("BaseIcon",{staticClass:"ml-0.5 transition-transform",class:{"rotate-90":t.showMoreOptions},attrs:{type:"chevron-right","stroke-width":"2.25",size:"12"}})],1),r("Animation",[t.showMoreOptions?r("div",{staticClass:"bg-gray-100 option-item__inner hover:bg-gray-200",on:{click:function(i){t.options.showLast4ssn=!t.options.showLast4ssn}}},[r("CCheckbox",{staticStyle:{flex:"0 0 30px"},attrs:{value:t.options.showLast4ssn,type:"secondary",size:"small"}}),r("div",[r("div",[t._v(t._s(t.$t("showLast4ssn")))])])],1):t._e()])],1):t._e()]),t.showAdminOptions?r("div",[r("div",{staticStyle:{height:"1.25rem"}}),r("div",{staticClass:"pb-1 text-sm font-medium text-gray-800 select-none"},[t._v(" Superuser + VPN ")]),r("div",{staticClass:"bg-gray-100 option-item__inner hover:bg-gray-200",staticStyle:{"border-top":"2px solid hsl(0, 0%, 100%)",opacity:"0.8","font-size":"10px"},on:{click:function(i){t.options.forceDoCreatePdf=!t.options.forceDoCreatePdf}}},[r("CCheckbox",{staticStyle:{flex:"0 0 30px"},attrs:{value:t.options.forceDoCreatePdf,type:"secondary",size:"small"}}),t._m(0)],1),r("div",{staticClass:"bg-gray-100 option-item__inner hover:bg-gray-200",staticStyle:{"border-top":"2px solid hsl(0, 0%, 100%)",opacity:"0.8","font-size":"10px"},on:{click:function(i){t.options.debugPage=!t.options.debugPage}}},[r("CCheckbox",{staticStyle:{flex:"0 0 30px"},attrs:{value:t.options.debugPage,type:"secondary",size:"small"}}),t._m(1)],1),r("div",{staticClass:"bg-gray-100 hover:bg-gray-200",staticStyle:{"border-top":"2px solid hsl(0, 0%, 100%)",opacity:"0.8","font-size":"10px"}},[r("CInput",{attrs:{type:"number",filled:"",size:"small",placeholder:"Optional extra timeout (ms)"},model:{value:t.extraTimeout,callback:function(i){t.extraTimeout=t._n(i)},expression:"extraTimeout"}})],1)]):t._e()])]),r("CButton",{attrs:{type:"secondary",size:"medium",wide:""},on:{click:t.generatePdf}},[t._v(" "+t._s(t.$t("buttonText"))+" ")])],1)},nft=[function(){var n=this,t=n._self._c;return t("div",[t("div",[n._v("Force re-create PDF")])])},function(){var n=this,t=n._self._c;return t("div",[t("div",[n._v("Debug page output")])])}],rft=he(eft,tft,nft,!1,null,"7d66fef4",null,null);const ift={name:"DocPrint",components:{DocumentPrint:rft.exports},props:{document:{type:Object,required:!0}}};var aft=function(){var t=this,r=t._self._c;return r("div",{staticClass:"h-full w-full overflow-auto px-8 py-12"},[r("DocumentPrint",{attrs:{document:t.document},on:{close:function(i){return t.$router.push("/")}}})],1)},oft=[],sft=he(ift,aft,oft,!1,null,null,null,null);const lft=sft.exports,cft=Object.freeze(Object.defineProperty({__proto__:null,default:lft},Symbol.toStringTag,{value:"Module"})),uft={name:"DocumentSendReminderModal",i18nOptions:{namespaces:"documentSendReminderModal",messages:{en:{alreadySigned:"already signed",cannotSign:"can't sign"},sv:{alreadySigned:"har signerat",cannotSign:"kan ej signera"}}},props:{document:{type:Object,required:!0}},data(){return{clientsToSend:[]}},computed:{...Ut({feature:"application/feature"})},created(){const{events:n=[],clients:t=[]}=this.document||{},r=n.reduce((i,{code:a,data:o})=>a==="sent"&&o&&o.clients&&o.clients.length?[...i,...o.clients.map(({id:s})=>s)]:i,[]);this.clientsToSend=t.filter(({id:i})=>r.includes(i)),this.feature("sms")||this.clientsToSend.forEach((i,a)=>{this.isTypeActive("sms",i)&&this.setDeliveryMethod("sms",a)}),this.clientsToSend.forEach((i,a)=>{(i.answer||i.documentRole==="recipient")&&["sms","email"].forEach(o=>{this.isTypeActive(o,i)&&this.setDeliveryMethod(o,a)})})},methods:{...xn({sendDocumentReminder:He.SEND_REMINDER_DOCUMENT2}),async submit(){await this.sendDocumentReminder({id:this.document.id,body:{clients:this.clientsToSend}}),this.$emit("close")},canSendType(n,t){return!!t[n==="sms"?"cellphone":"email"]},isTypeActive(n,t){return t.deliveryTypes.includes(n)&&this.canSendType(n,t)},setDeliveryMethod(n,t){const r=this.clientsToSend[t].deliveryTypes.findIndex(i=>i===n);r>-1?this.clientsToSend[t].deliveryTypes.splice(r,1):this.clientsToSend[t].deliveryTypes.push(n)}}};var dft=function(){var t=this,r=t._self._c;return r("div",{staticClass:"bg-white rounded-xl p-8"},[r("div",{staticClass:"mb-6 text-lg font-semibold",domProps:{textContent:t._s(t.$t("_common:send",{thing:t.$t("_common:reminder")}))}}),t._l(t.clientsToSend,function(i,a){return r("div",{key:a,staticClass:"border border-gray-200 p-2 rounded-lg mb-3"},[r("div",{staticClass:"mb-2 pl-1"},[r("div",{staticClass:"font-medium text-sm"},[t._v(" "+t._s(i.name||i.companyName)+" ")]),i.answer?r("div",{staticClass:"text-gray-500 text-xs",domProps:{textContent:t._s(t.$t("alreadySigned").capitalize())}}):i.documentRole==="recipient"?r("div",{staticClass:"text-gray-500 text-xs",domProps:{textContent:t._s(t.$t("cannotSign").capitalize())}}):t._e()]),r("div",{staticClass:"flex"},[r("div",{staticClass:"py-1.5 pl-1.5 rounded-md bg-gray-100 border border-gray-200 items-center flex mr-2"},[r("CCheckbox",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{...!t.canSendType("sms",i)&&{content:t.$t("_common:missing",{thing:t.$t("_common:phoneNumber")})}},expression:`{
|
|
2850
2850
|
...(!canSendType('sms', client) && {
|
|
@@ -2856,7 +2856,7 @@ Minimum version required to store current data is: `+q+`.
|
|
|
2856
2856
|
...(!canSendType('email', client) && {
|
|
2857
2857
|
content: $t('_common:missing', { thing: $t('_common:email') })
|
|
2858
2858
|
})
|
|
2859
|
-
}`}],staticClass:"font-medium",attrs:{value:t.isTypeActive("email",i),size:"tiny",disabled:!t.canSendType("email",i)},on:{input:function(o){return t.setDeliveryMethod("email",a)}}},[t._v(" "+t._s(t.$t("_common:email").capitalize())+" ")])],1)])])}),r("CButton",{staticClass:"font-semibold mt-8",attrs:{type:"secondary",size:"small",taller:"",icon:"send",wide:""},on:{click:t.submit}},[t._v(" "+t._s(t.$t("_common:send",{thing:t.$t("_common:reminder")}))+" ")])],2)},pft=[],fft=he(uft,dft,pft,!1,null,null,null,null);const hft=fft.exports,mft={props:{document:{type:Object,required:!0}},components:{DocumentSendReminderModal:hft}};var gft=function(){var t=this,r=t._self._c;return r("DocumentSendReminderModal",{attrs:{document:t.document},on:{close:function(i){return t.$router.push("/")}}})},vft=[],yft=he(mft,gft,vft,!1,null,null,null,null);const bft=yft.exports,_ft=Object.freeze(Object.defineProperty({__proto__:null,default:bft},Symbol.toStringTag,{value:"Module"})),UOt="",IY={new:{statusClass:"draft",icon:"statusDraft"},draft:{statusClass:"draft",icon:"statusDraft"},scheduled:{statusClass:"scheduled",icon:"statusScheduled"},sent:{statusClass:"sent",icon:"statusSent"},denied:{statusClass:"denied",icon:"statusDenied"},accepted:{statusClass:"accepted",icon:"statusAccepted"},signed:{statusClass:"accepted",icon:"statusAccepted"},semiSigned:{statusClass:"accepted",icon:"statusSemiSigned"},expired:{statusClass:"expired",icon:"statusExpired"},voided:{statusClass:"voided",icon:"statusVoided"},active:{statusClass:"active",icon:"statusActive"},completed:{statusClass:"completed",icon:"statusCompleted"},archived:{statusClass:"archived",icon:"statusArchive"}},wft={props:{status:{type:String,default:""},split:{type:String,default:""}},computed:{text(){return this.status?Be.t(`_common:status.${this.status}`):""},className(){const{statusClass:n=""}=IY[this.status]||{};return n},icon(){return Ce(IY,`${this.status}.icon`)}}};var xft=function(){var t=this,r=t._self._c;return r("div",{staticClass:"inline-flex items-center h-6 pl-1 pr-2 text-xs font-medium leading-none rounded-full c-badge_status",class:t.className},[t.icon?r("BaseIcon",{staticClass:"mr-1 status-icon",attrs:{type:t.icon,size:"16"}}):t._e(),r("span",[t._v(t._s(t.text))])],1)},Cft=[],kft=he(wft,xft,Cft,!1,null,null,null,null);const Sft=kft.exports,Tft={name:"DynamicLink",props:{template:{type:String,required:!0}},computed:{transformed(){return{template:this.template}}}};var Eft=function(){var t=this,r=t._self._c;return r(t.transformed,{tag:"component"})},$ft=[],Aft=he(Tft,Eft,$ft,!1,null,null,null,null);const Oft={name:"EventItem",components:{DynamicLink:Aft.exports},props:{title:{type:String,default:""},template:{type:String,default:""},content:{type:[String,Array],default:""},createdAt:{type:String,default:""},icon:{type:String,default:"square"},compact:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},color:{type:String,default:"gray",validator:n=>["blue","teal","orange","green","red","purple","gray","primary"].indexOf(n)!==-1},isFuture:{type:Boolean,default:!1},size:{type:String,default:""}},computed:{date(){return Hl(yu(this.createdAt))?this.$formatDate(this.createdAt,"Pp"):null},dayOfMonth(){return Hl(yu(this.createdAt))?this.$formatDate(this.createdAt,"d"):null},month(){return Hl(yu(this.createdAt))?this.$formatDate(this.createdAt,"MMM"):null},iconClasses(){const n={blue:"text-blue-600 bg-blue-50",teal:"text-cyan-600 bg-cyan-50",orange:"text-orange-600 bg-orange-50",green:"text-green-600 bg-green-50",red:"text-red-600 bg-red-50",purple:"text-purple-600 bg-purple-50",gray:"text-gray-500 bg-gray-100",primary:"text-primary-500 bg-primary-50"};return this.isFuture?"bg-purple-100 text-purple-500":n[this.color]||n.gray},titleSize(){return this.size==="large"?"text-base":"text-sm"},textSize(){return this.size==="large"?"text-[15px]":"text-[13px]"},dateSize(){return this.size==="large"?"text-sm":"text-xs"}}};var Dft=function(){var t=this,r=t._self._c;return r("div",{staticClass:"flex flex-nowrap relative text-primary-500 cursor-default pb-5 ml-4 event before:content-[''] before:absolute before:w-px before:h-full before:bg-gray-300 before:-left-px before:top-4 last:before:hidden"},[r("div",{staticClass:"m-0 h-[23px] relative",staticStyle:{"--bg":"#fff"}},[r("div",{staticClass:"rounded-full absolute left-1/2 top-1/2 z-[1] w-7 h-7 flex items-center justify-center border-none bg-gray-100",class:t.iconClasses,staticStyle:{transform:"translate(-50%, calc(-50% + 8px))","box-shadow":"0 0 0 2px var(--bg)"}},[t.loading?t._e():r("BaseIcon",{attrs:{type:t.icon,size:"14"}})],1)]),r("div",{staticClass:"ml-7 min-w-0 flex-grow flex flex-col pt-1"},[t.loading?[r("CSkeleton",{staticClass:"max-w-md text-gray-900 font-medium",class:t.titleSize,attrs:{width:"80%"}}),r("CSkeleton",{staticClass:"text-gray-600",class:t.textSize,attrs:{width:"40%"}}),r("CSkeleton",{staticClass:"text-center text-gray-500 text-xs inline-flex pt-0.5",class:t.dateSize,attrs:{hidden:""}})]:t._e(),r("div",{staticClass:"max-w-md font-medium",class:[t.isFuture?"text-gray-500":"text-gray-700",t.titleSize]},[t.template?r("DynamicLink",{attrs:{template:t.template}}):[t._v(t._s(t.title))]],2),t.content?r("div",{class:[t.isFuture?"text-gray-400":"text-gray-600",t.textSize]},[r("div",{domProps:{innerHTML:t._s(t.content)}})]):t._e(),r("div",{staticClass:"text-center text-gray-500 inline-flex pt-1",class:t.dateSize},[r("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.date,expression:"date"}]},[t._v(t._s(t.dayOfMonth)+" "+t._s(t.month))])])],2)])},Mft=[],Pft=he(Oft,Dft,Mft,!1,null,null,null,null);const Ift=Pft.exports,Rft={name:"DocumentTimeline",i18nOptions:{namespaces:"documentTimeline",messages:{sv:{clientName:"Kunden",byName:"Av {{- name}}",withBankId:"med BankID",propertyDesignation:"Begäran om fastighetsbeteckning",viewed:"Granskat",viewedContent:"{{- name}} har visat dokumentet",statusChangedAccepted:"Dokumentet har blivit signerat",statusChangedDenied:"Dokumentet har blivit nekat",requestChange:"Markerades manuellt som",mailOpened:"Mail visat",mailOpenedContent:"{{email}} visat",mailDropped:"E-post kunde inte skickas",smsDropped:"SMS kunde inte skickas",expired:"Dokumentet har förfallit",expiredContent:"Giltighetstiden har passerats",toEmail:"Till: {{email}}"},en:{clientName:"Client",byName:"By {{- name}}",withBankId:"with BankID",propertyDesignation:"Request for property designation",viewed:"Viewed",viewedContent:"{{- name}} has viewed the document",statusChangedAccepted:"The document has been signed",statusChangedDenied:"The document has been declined",requestChange:"Manually marked as",mailOpened:"Email opened",mailOpenedContent:"{{email}} viewed",mailDropped:"Could not send email",smsDropped:"Could not send SMS",expired:"Expired",expiredContent:"The expiration date has passed",toEmail:"To: {{email}}"}}},components:{EventItem:Ift},props:{document:{type:Object,required:!0},colors:{type:Object,default:()=>({})},size:{type:String,default:""}},computed:{...Ut({userById:"companyUsers/byId"}),events(){var i,a;const n=[this.formatEvent({code:"created",createdAt:(i=this.document)==null?void 0:i.createdAt})],{events:t,scheduledFirstDelivery:r}=this.document||{};if((r==null?void 0:r.status)==="active"){const o=r.deliveryTypes.join(` ${this.$t("_common:and")} `);n.push({title:this.$t("_common:scheduledDelivery"),content:`${this.$t("_common:via")} ${o}, ${this.$formatDate(r.sendAt)}`,isFuture:!0,icon:"calendar",color:((a=this.colors)==null?void 0:a.scheduledDelivery)||"primary"})}return t==null||t.forEach(o=>n.push(this.formatEvent(o))),n}},methods:{formatEvent({code:n,data:t,createdAt:r,children:i=[]}){var g;const{client:a={},clients:o,email:s,status:c,counter:l,sendSource:u,companyUserId:d}=t||{},p=l||i.length+1,f=a.name,h={created:()=>({title:this.$t("_common:created"),createdAt:r,icon:"folder",color:"primary"}),viewed:()=>({title:this.$t("viewed"),content:(f?this.$t("viewedContent",{name:f}):"")+(p?` ${this.$tc("_common:times",{count:p})}`:""),createdAt:r,icon:"eye",color:"primary"}),accepted:()=>{var b;const y={title:this.$t("_common:status.signed"),content:f?this.$t("byName",{name:f}):"",createdAt:r,icon:"check",color:"primary"};return y.content&&((b=a.answerMethod)==null?void 0:b.accept)==="bankId"&&(y.content+=` ${this.$t("withBankId")}`),y},denied:()=>({title:this.$t("_common:status.denied"),content:f?this.$t("byName",{name:f}):"",createdAt:r,icon:"x",color:"primary"}),sent:()=>{let y=this.$t("_common:sent");return["reminder","propertyDesignation"].includes(u)&&(y=this.$t("_common:sentThing",{thing:u==="reminder"?this.$t("_common:reminder"):this.$t("propertyDesignation")})),{title:y,content:o==null?void 0:o.map(b=>["email","cellphone"].filter(w=>!!b[w]).map(w=>b[w]).join(` ${this.$t("_common:and")} `)).reduce((b,w)=>b?`${b}<div>${w}</div>`:`${this.$t("_common:to")}: ${w}`.capitalize(),""),createdAt:r,icon:u==="reminder"?"bell":"send",color:"primary"}},statusChanged:()=>["accepted","denied"].includes(c)?{title:c==="accepted"?this.$t("statusChangedAccepted"):this.$t("statusChangedDenied"),createdAt:r,icon:c==="accepted"?"check":"x",color:c==="accepted"?"green":"red"}:null,requestChange:()=>{var b;const y=((b=this.userById(d))==null?void 0:b.fullName)||"";return{title:`${this.$t("requestChange")} ${this.$t(`_common:status.${c}`)}`,content:y&&this.$t("byName",{name:y}),createdAt:r,icon:"tool",color:"primary"}},mailDelivered:()=>({title:this.$t("_common:sentThing",{thing:this.$t("_common:email").capitalize()}),content:s?`${this.$t("_common:to")}: ${s}`.capitalize():"",createdAt:r,icon:"inbox",color:"primary"}),mailOpened:()=>({title:this.$t("mailOpened"),content:`${this.$t("mailOpenedContent",{email:s})} ${p?this.$tc("_common:times",{count:p}):""}`,createdAt:r,icon:"email",color:"primary"}),mailDropped:()=>({title:this.$t("mailDropped"),content:s?this.$t("toEmail",{email:s}):null,createdAt:r,icon:"alert-triangle",color:"orange"}),smsDropped:()=>({title:this.$t("smsDropped"),content:t?`${this.$t("_common:to")}: ${t}`.capitalize():"",createdAt:r,icon:"alert-triangle",color:"orange"}),expired:()=>({title:this.$t("expired"),content:this.$t("expiredContent"),createdAt:r,icon:"moon",color:"gray"})},m=(g=this.colors)==null?void 0:g[n];return{...h[n](),...m&&{color:m}}}}};var Lft=function(){var t=this,r=t._self._c;return r("div",[t._t("header"),t._l(t.events,function(i,a){return r("EventItem",{key:a,attrs:{title:i.title,content:i.content,createdAt:i.createdAt,icon:i.icon,color:i.color,"is-future":i.isFuture,size:t.size}})})],2)},Fft=[],Nft=he(Rft,Lft,Fft,!1,null,null,null,null);const Bft=Nft.exports,jft={name:"DocTimeline",components:{StatusBadge:Sft,DocumentTimeline:Bft},props:{document:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},viewType:{type:String,default:"modal"}}};var zft=function(){var t=this,r=t._self._c;return r("div",{class:{"p-8":t.viewType!=="mount"}},[r("DocumentTimeline",{attrs:{document:t.document,size:"large"}},[t.showHeader?r("div",{staticClass:"border-b mb-4 pb-4",attrs:{slot:"header"},slot:"header"},[r("div",{staticClass:"mb-2"},[r("div",{staticClass:"text-xs text-gray-600",domProps:{textContent:t._s(t.$t("_common:document").capitalize())}}),r("div",{staticClass:"font-semibold text-lg"},[t._v(t._s(t.document.name))])]),r("div",{staticClass:"inline-flex items-center -ml-2"},[r("div",{staticClass:"text-xs text-gray-600 mr-1.5 py-1 pl-2",domProps:{textContent:t._s(t.$t("_common:status.status"))}}),r("StatusBadge",{attrs:{status:t.document.status}})],1)]):t._e()])],1)},Vft=[],Uft=he(jft,zft,Vft,!1,null,null,null,null);const Hft=Uft.exports,Wft=Object.freeze(Object.defineProperty({__proto__:null,default:Hft},Symbol.toStringTag,{value:"Module"})),Gft={name:"DocumentReceipt",i18nOptions:{namespaces:"documentReceipt",messages:{sv:{title:"Verifikat på signering",waitingForSign:"Väntar på signatur",signMethod:"Signeringsmetod",remaining:"{{count}} st signaturer kvarstår innan dokumentet är helt signerat.",confirmChangeMessage:"Vill du verkligen byta signeringsmetod för {{- name}}?",bankIdHint:"Identifiering och signering säkerställd med BankID."},en:{title:"Signature verification",waitingForSign:"Waiting for signature",signMethod:"Sign method",remaining:"{{count}} signatures are remaining before the document is completely signed.",confirmChangeMessage:"Do you really want to change sign method for {{- name}}?",bankIdHint:"Identity and signature confirmed with BankID"}}},props:{document:{type:Object,required:!0},allowSignMethodUpdate:{type:Boolean,default:!0}},computed:{...Ut({feature:"application/feature"}),signees(){const{senderClient:n,clients:t}=this.document;return[...n?[n]:[],...(t||[]).map((i,a)=>({...i,index:a}))].filter(i=>{var a;return["signee","approver"].includes(i.documentRole)||((a=i.answer)==null?void 0:a.didAccept)}).map(({name:i="",companyName:a,email:o,socialNo:s=null,answerMethod:c,answer:l,documentRole:u,index:d})=>({name:i||a||o,socialNo:s,method:(c==null?void 0:c.accept)||"",documentRole:u,...l,index:d}))},waitingFor(){return this.document.recipients.reduce((n,t)=>{var r;return t.answer||!["signee","approver"].includes(t.documentRole)||((r=t.answerMethod)==null?void 0:r.accept)==="inPerson"?n:[...n,t]},[])},documentName(){return this.document.name||""},sentByName(){var n,t;return((t=(n=this.document.sender)==null?void 0:n.user)==null?void 0:t.name)||""}},methods:{...xn({showMessage:He.SHOW_MESSAGE,updateDocument:He.UPDATE_DOCUMENT2}),getIconType(n){return n==="signee"?"pen-tool":n==="recipient"?"eye":n==="approver"?"check":"shield"},getBrowserString({browser:n,os:t,device:r}){return[n==null?void 0:n.name,t==null?void 0:t.name,r==null?void 0:r.model].filter(i=>!!i).join(", ")},onUpdate(n,t){this.showMessage({displayType:"dialog",type:"secondary",title:this.$t("_common:change",{thing:this.$t("_common:signMethod.title").toLowerCase()}),message:this.$t("confirmChangeMessage",{name:n.name}),actions:{cancel:{text:this.$t("_common:cancel"),callback:"cancel"},submit:{text:this.$t("actions:updateDocumentDialog.submit"),callback:()=>this.updateSignMethod(n.index,t)}}})},async updateSignMethod(n,t){const{id:r}=this.document||{},i={[`clients.${n}.answerMethod.accept`]:t};await this.updateDocument({id:r,body:i,params:{type:"paths"}})}}};var qft=function(){var t=this,r=t._self._c;return r("div",{staticClass:"rounded-lg text-gray-600 pt-4 px-1 pb-1 bg-gray-100 border border-gray-200"},[r("div",{staticClass:"mb-1 relative leading-5"},[r("div",{staticClass:"pl-4 pb-1"},[r("div",{staticClass:"font-medium text-black"},[t._v(t._s(t.$t("title")))]),r("div",{staticClass:"data-label"},[t._v(t._s(t.documentName))]),r("div",{staticClass:"grid grid-cols-3 gap-2 pb-1 pt-4",staticStyle:{"grid-template-columns":"repeat(auto-fit, minmax(200px, 1fr))"}},[t._l([[t.$t("_common:sentByName"),t.sentByName],[t.$t("_components:status.sent"),t.$formatDate(t.document.sentAt,"Pp")],[t.$t("_components:replyBy"),t.document.status==="sent"&&t.$formatDate(t.document.expiresAt)],[t.$t("_components:status.accepted"),t.$formatDate(t.document.acceptedAt,"Pp")]],function([i,a],o){return[a?r("div",{key:o},[r("div",{staticClass:"text-gray-900 text-xs",domProps:{textContent:t._s(i)}}),r("div",{staticClass:"text-gray-600 mr-1.5",domProps:{textContent:t._s(a)}})]):t._e()]})],2)]),t.waitingFor.length?r("div",{staticClass:"mt-2 inline-flex items-center text-xs font-medium bg-orange-50 border border-orange-200/90 px-1 py-0.5 rounded-full ml-3 text-black/80"},[r("BaseIcon",{staticClass:"text-orange-500/80",attrs:{type:"info",size:"14"}}),r("div",{staticClass:"px-1.5"},[t._v(" "+t._s(t.$t("remaining",{count:t.waitingFor.length}))+" ")])],1):t._e(),r("BaseIcon",{staticClass:"absolute top-1 right-5 text-gray-500",attrs:{type:"lock",size:"18"}})],1),r("div",{staticClass:"flex flex-col gap-2 p-2"},t._l(t.signees,function(i,a){var o,s;return r("div",{key:a,staticClass:"bg-white relative text-gray-700 border border-gray-200 rounded-md"},[r("div",{staticClass:"px-4 py-3"},[i.didAccept&&i.method==="bankId"?r("BaseIcon",{staticClass:"absolute top-3 right-4",attrs:{type:"bankIdColor",size:"22"}}):i.didAccept?r("BaseIcon",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t(`_common:documentRole.${i.documentRole}.label`),expression:"$t(`_common:documentRole.${signee.documentRole}.label`)"}],staticClass:"lock-icon absolute right-6 top-4 opacity-70",attrs:{size:18,type:t.getIconType(i.documentRole)}}):t._e(),i.didAccept===!1?r("div",{staticClass:"absolute right-3 top-3 bg-red-200 border border-red-400/50 rounded-full text-xs py-0.5 px-2 inline-flex font-medium text-red-700"},[t._v(" "+t._s(t.$t("_common:denied").capitalize())+" ")]):!i.didAccept&&i.method!=="inPerson"?r("div",{staticClass:"absolute right-3 top-3 bg-orange-50 border border-orange-200/70 rounded-full text-xs py-0.5 px-2 inline-flex font-medium text-black/80"},[t._v(" "+t._s(t.$t("waitingForSign"))+" ")]):t._e(),r("div",{staticClass:"font-medium text-[15px] text-black pb-1"},[t._v(" "+t._s(((o=i.response)==null?void 0:o.name)||i.name)+" ")]),r("div",{staticClass:"grid grid-cols-3 gap-2 py-1",staticStyle:{"grid-template-columns":"repeat(auto-fit, minmax(190px, 1fr))"}},[t._l([[t.$t("_common:socialNo").capitalize(),i.socialNo],[t.$t("signMethod"),t.$t(`_common:signMethod.${i.method}`),"signMethod"],[`${t.$t("_common:date").capitalize()} & ${t.$t("_common:time.time")}`,t.$formatDate(i.didAnswerAt,"Pp")],["IP-"+t.$t("_common:address"),i.ip],[`${t.$t("_common:browser")}, OS & ${t.$t("_common:device")}`,t.getBrowserString(i)]],function([c,l,u],d){return[l?r("div",{key:d,staticClass:"text-[13px]"},[r("div",{staticClass:"text-gray-900",domProps:{textContent:t._s(c)}}),r("div",{staticClass:"flex items-center"},[r("div",{staticClass:"text-gray-500 mr-1.5",domProps:{textContent:t._s(l)}}),u==="signMethod"&&i.method&&t.allowSignMethodUpdate&&t.document.status!=="accepted"&&i.didAccept===void 0?r("CDropdown",{attrs:{"append-to-body":!0,"menu-styling":{width:"180px"}}},[r("div",{staticClass:"underline text-primary-500 font-medium text-xs",attrs:{slot:"trigger"},domProps:{textContent:t._s(t.$t("_common:change"))},slot:"trigger"}),t._l([...t.feature("bankId")?["bankId"]:[],"signature","inPerson"],function(p){return r("CDropdownItem",{key:p,attrs:{"icon-right":i.method===p?"check":""},on:{click:function(f){i.method!==p&&t.onUpdate(i,p)}}},[t._v(" "+t._s(t.$t(`_common:signMethod.${p}`))+" ")])})],2):t._e()],1)]):t._e()]})],2)],1),i.signatureDataURL?r("div",{staticClass:"h-20 mx-4 py-6 border-t border-gray-100"},[r("img",{staticClass:"h-full",attrs:{src:i.signatureDataURL}})]):i.didAccept&&i.method==="bankId"?r("div",{staticClass:"bg-gray-300 mx-4 mb-4 text-white/90 flex items-center p-1.5 rounded-md",staticStyle:{border:"1px solid #35677e"},style:"background: linear-gradient(45deg,hsl(200deg 35% 17%),hsl(199deg 25% 30%));"},[r("div",{staticClass:"rounded-md w-9 h-9 flex items-center justify-center mr-2 ml-0.5 bg-[#183e4f] border border-[#275369]"},[r("BaseIcon",{attrs:{type:"bankId",size:"22"}})],1),r("div",[r("div",{staticClass:"text-xs font-medium",domProps:{textContent:t._s(t.$t("bankIdHint"))}}),r("div",{staticClass:"text-xs opacity-70"},[t._v(" "+t._s(((s=i.response)==null?void 0:s.name)||i.name)+" · "+t._s(i.socialNo)+" ")])])]):t._e()])}),0)])},Yft=[],Kft=he(Gft,qft,Yft,!1,null,null,null,null);const Zft={name:"DocReceipt",components:{DocumentReceipt:Kft.exports},props:{document:{type:Object,required:!0}}};var Jft=function(){var t=this,r=t._self._c;return r("div",[r("DocumentReceipt",{attrs:{document:t.document,"allow-sign-method-update":!1}})],1)},Xft=[],Qft=he(Zft,Jft,Xft,!1,null,null,null,null);const eht=Qft.exports,tht=Object.freeze(Object.defineProperty({__proto__:null,default:eht},Symbol.toStringTag,{value:"Module"})),nht={name:"DocLinks",components:{ClientLinks:wY},props:{document:{type:Object,required:!0},closeFunc:{type:Function,default:null}},methods:{close(){this.closeFunc&&this.closeFunc()}}};var rht=function(){var t=this,r=t._self._c;return r("div",{staticClass:"h-full w-full overflow-auto"},[r("ClientLinks",{attrs:{id:t.document.id},on:{close:t.close}})],1)},iht=[],aht=he(nht,rht,iht,!1,null,null,null,null);const oht=aht.exports,sht=Object.freeze(Object.defineProperty({__proto__:null,default:oht},Symbol.toStringTag,{value:"Module"})),RY=({documentKey:n="document"}={})=>({mixins:[br],inject:{formValidation:{default:null}},methods:{isValid(){const{isFormValid:t,scrollToInvalidInput:r}=this.formValidation||this;return!t||!r||t()?!0:r({offset:120})},isAnswerModalOpen(){const t=this.$modal.getOpenInstances();return t&&t.length&&t.some(r=>{var i;return((i=r.modalAttrs)==null?void 0:i.name)==="AnswerModal"})},onAnswer(t="accept",r={}){if(this.isAnswerModalOpen())return;const i=Ce(this,n);if(!i)return;const a=t==="decline"?!0:this.isValid();if(!i.isPreview&&!a)return;const o=this.mq==="sm"?"100%":"auto",s=()=>Promise.resolve().then(()=>Mdt);this.$modal.show(s,{mode:t,_document:i,fullScreen:o==="100%",calcHeight:!!r.calcHeight},{name:"AnswerModal",adaptive:!0,height:"auto",width:"90%",maxWidth:420,classes:"overflow-visible",transition:"modal-soft",clickToClose:!1})}}}),lht=n=>{var t;return(t=window==null?void 0:window.parent)==null?void 0:t.postMessage(n,"*")},LY=n=>typeof n=="object"&&"event"in n;class cht{constructor(){this.observers={},this.registered=!0,window.addEventListener("message",this._onMessage.bind(this))}_onMessage(t){if(t.source===window.parent&&LY(t==null?void 0:t.data)){const{event:r,data:i}=t.data;this.observers[r]&&this.observers[r].forEach(a=>a(i))}}on(t,r){this.registered||window.addEventListener("message",this._onMessage.bind(this)),this.observers[t]=this.observers[t]||[],this.observers[t].push(r)}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(i=>i!==r)}}emit(t){if(!LY(t))throw new Error("Invalid message, must be an object including an event property");lht(t)}destroy(){window.removeEventListener("message",this._onMessage.bind(this)),this.registered=!1}}const FY=new cht,uht={name:"DocumentVoided",props:{document:{type:Object,required:!0}}};var dht=function(){var t=this,r=t._self._c;return r("div",{staticClass:"grid h-full text-center place-items-center"},[r("div",{staticClass:"py-12"},[r("BaseIcon",{staticClass:"mb-2 text-primary-500",attrs:{type:"info"}}),r("div",{staticClass:"text-lg font-medium",domProps:{textContent:t._s(t.document.$t("documentVoided.title"))}}),r("div",{staticClass:"text-gray-700",domProps:{textContent:t._s(t.document.$t("documentVoided.description"))}})],1)])},pht=[],fht=he(uht,dht,pht,!1,null,null,null,null);const NY=fht.exports,BY=Ne.observable({canEdit:!1,isForm:!1,setFormValue:null}),hht={props:{document:{type:Object,required:!0},setFormValue:{type:Function,required:!0}},components:{DocumentLayout:k8,DocumentVoided:NY},mixins:[uq,RY()],provide:()=>({viewSettings:BY}),created(){this.setFormValue&&(BY.setFormValue=this.setFormValue),FY.on("answer",this.onAnswerMessage)},beforeDestroy(){FY.off("answer",this.onAnswerMessage)},methods:{onAnswerMessage(n){this.onAnswer(n==null?void 0:n.mode)}}};var mht=function(){var i;var t=this,r=t._self._c;return r("div",[t._t("default"),((i=t.document)==null?void 0:i.status)==="voided"?r("DocumentVoided",{attrs:{document:t.document}}):r("DocumentLayout",{attrs:{document:t.document}})],2)},ght=[],vht=he(hht,mht,ght,!1,null,null,null,null);const yht={name:"DocumentClient",components:{ClientView:vht.exports},props:{document:{type:Object,required:!0},setFormValue:{type:Function,required:!0}}};var bht=function(){var t=this,r=t._self._c;return r("ClientView",{attrs:{document:t.document,"set-form-value":t.setFormValue}})},_ht=[],wht=he(yht,bht,_ht,!1,null,null,null,null);const xht=wht.exports,Cht=Object.freeze(Object.defineProperty({__proto__:null,default:xht},Symbol.toStringTag,{value:"Module"})),kht={name:"Setup",props:{partnerName:{type:String,default:"Partner"},closeFunc:{type:Function,default:()=>{}}},computed:{baseAppUrl(){return Xe.baseUrl},iframeUrl(){return`${this.baseAppUrl}/partner/connect?partnerName=${this.partnerName}`}},created(){window.addEventListener("message",this.onReceiveMessage)},beforeDestroy(){window.removeEventListener("message",this.onReceiveMessage)},methods:{onReceiveMessage({data:n,origin:t,source:r}){var i;t===this.baseAppUrl&&((n==null?void 0:n.type)==="channelPartnerConnect"&&(r==null||r.postMessage({type:"readyForPartnerConnect"},t)),(n==null?void 0:n.type)==="partnerUserConnect"&&(Tr.trigger("account:userConnect",n==null?void 0:n.value),(i=this.closeFunc)==null||i.call(this)))}}};var Sht=function(){var t=this,r=t._self._c;return r("iframe",{staticClass:"w-full h-full",attrs:{title:"Partner Connect",src:t.iframeUrl,frameborder:"0"}})},Tht=[],Eht=he(kht,Sht,Tht,!1,null,null,null,null);const $ht=Eht.exports,Aht=Object.freeze(Object.defineProperty({__proto__:null,default:$ht},Symbol.toStringTag,{value:"Module"})),Oht={components:{AnswerModal:q7},props:{document:{type:Object,required:!0},answerType:{type:String,required:!0},closeFunc:{type:Function,default:null}}};var Dht=function(){var t=this,r=t._self._c;return r("AnswerModal",{attrs:{mode:t.answerType,_document:t.document},on:{close:t.closeFunc}})},Mht=[],Pht=he(Oht,Dht,Mht,!1,null,null,null,null);const Iht=Pht.exports,Rht=Object.freeze(Object.defineProperty({__proto__:null,default:Iht},Symbol.toStringTag,{value:"Module"}));var Lht=he({name:"PublicDocumentEvents",props:{document:{type:Object,default:()=>({})}},computed:{events(){const n=[],{acceptedAt:t}=this.document;return this.document.events.filter(({createdAt:r})=>t?L4(t,r):!0).forEach(r=>{const{code:i,createdAt:a,children:o=[]}=r;let{data:s={}}=r;s===null&&(s={});const{client:c={},clients:l=[],status:u,counter:d}=s,p={sent:()=>l.map(f=>{const h=this.getClientName(f.id),m=this.filteredOxfordComma([f.email,f.cellphone]);return{text:this.document.$t("event.sent",{to:`${h?h+", ":""}${m}`}),time:a}}),viewed:()=>{const f=d||o.length+1;return[{text:`${this.document.$t(`event.${c.name?"viewedName":"viewed"}`,{name:c.name})} ${f?this.document.$tc("times",{count:f}):""}.`,time:a}]},accepted:()=>[{text:this.document.$t("event.accepted",{by:c.name||c.email||c.cellphone}),time:a}],denied:()=>[{text:this.document.$t("event.denied",{by:c.name||c.email||c.cellphone}),time:a}],statusChanged:()=>[{text:this.document.$t("event.statusChanged",{status:this.document.$t(`status.${u}`).toLowerCase()}),time:a}],requestChange:()=>[{text:this.document.$t("event.requestChange",{status:this.document.$t(`status.${u}`).toLowerCase()}),time:a}],expired:()=>[{text:this.document.$t("event.expired"),time:a}]};p[i]&&n.push(...p[i]())}),n}},methods:{filteredOxfordComma(n=[]){const t=n.filter(i=>!!i),r=t.length;return r?r<2?t[0]:`${t.slice(0,-1).join(", ")} ${this.document.$t("and")} ${t.slice(-1)}`:""},getClientName(n){const t=this.document.clients.find(({id:r})=>r===n);return t?t.name:""}},render(){return this.$scopedSlots.default({events:this.events})}},null,null,!1,null,null,null,null);const Fht=Lht.exports;var Nht=he({name:"CPhoneFormat",props:{phone:{type:String,required:!1,default:""},region:{type:String,required:!1,default:null}},data(){return{formattedPhone:""}},watch:{phone:{immediate:!0,async handler(){this.doFormatPhone()}}},methods:{async doFormatPhone(){if(!this.phone){this.formattedPhone="";return}const n=await dM(this.phone,{defaultRegion:this.region});if(!n){this.formattedPhone=this.phone;return}this.formattedPhone=n.national}},render(){return this.$scopedSlots.default?this.$scopedSlots.default({formattedValue:this.formattedPhone}):Cte("span",[this.formattedPhone])}},null,null,!1,null,null,null,null);const jY=Nht.exports,tDt="",nDt="",Bht={name:"PublicRecipientItem",i18nOptions:{namespaces:"components",keyPrefix:"document.myPagesDrawer"},components:{CPhoneFormat:jY},props:{recipient:{type:Object,required:!0}},methods:{get:Ce,getBrowserString({browser:n,os:t,device:r}){return[n&&n.name,t&&t.name,r&&r.model].filter(i=>!!i).join(", ")}}};var jht=function(){var t=this,r=t._self._c;return r("div",{staticStyle:{border:"1px solid hsl(0, 0%, 84%)","border-radius":"3px","margin-bottom":"1em"}},[r("div",{staticStyle:{padding:"0.5em 0.75em"}},[t._l([t.recipient.name,t.recipient.companyName,t.recipient.orgNo],function(i,a){return r("span",{key:`${i}-${a}`,style:a===0?{fontWeight:500}:{opacity:.65}},[t._v(" "+t._s(i&&a>0?"·":"")+" "+t._s(i)+" ")])}),r("div",{staticClass:"flex flex-col w-full",staticStyle:{"font-size":"14px","align-items":"baseline"}},[t.recipient.email?r("a",{attrs:{href:`mailto:${t.recipient.email}`,target:"_blank"}},[t._v(" "+t._s(t.recipient.email)+" ")]):t._e(),t.recipient.cellphone?r("CPhoneFormat",{attrs:{phone:t.recipient.cellphone,region:t.recipient.cellphoneRegion},scopedSlots:t._u([{key:"default",fn:function({formattedValue:i}){return r("a",{attrs:{href:`tel:${t.recipient.cellphone}`}},[t._v(" "+t._s(i)+" ")])}}],null,!1,2469850174)}):t._e()],1)],2),r("div",{staticStyle:{"background-color":"hsl(0, 0%, 94%)",padding:"0.75em 0.75em","font-weight":"500","font-size":"13px","line-height":"1",color:"hsl(0, 0%, 40%)",position:"relative"}},[r("div",[t._v(" "+t._s(t.$t(`_common:documentRole.${t.recipient.documentRole}.label`))+" ")]),r("div",{staticStyle:{position:"absolute",right:"1em",top:"0px",transform:"translate(0, -50%)"}},[r("v-popover",{attrs:{"popover-inner-class":"signee-popover",trigger:"hover",placement:"bottom-end"}},[t.recipient.documentRole==="signee"?r("div",{staticStyle:{padding:"5px 0.75em",background:"hsl(0, 0%, 60%)","border-radius":"4px","font-size":"13px",color:"hsl(0, 0%, 100%)",cursor:"default",display:"inline-flex","align-items":"center"}},[r("BaseIcon",{staticStyle:{"margin-right":"0.5ch"},attrs:{size:15,type:"info","stroke-width":"2"}}),t.recipient.answer&&t.recipient.answer.didAccept?[t._v(" "+t._s(t.$t("_common:approved").capitalize())+" ")]:t.recipient.answer?[t._v(" "+t._s(t.$t("_common:denied").capitalize())+" ")]:[t._v(" "+t._s(t.$t("views:publicDocument.pdfVerification.waitingForAnswer"))+" ")]],2):t._e(),r("div",{staticStyle:{padding:"0"},attrs:{slot:"popover"},slot:"popover"},[r("div",{staticStyle:{padding:"1em 1.5em"}},[t.recipient.answer&&t.recipient.answer.didAccept?[t.recipient.answer.signatureDataURL?r("div",{staticStyle:{"padding-bottom":"0.5em"}},[r("div",{staticClass:"has-text-grey",staticStyle:{"padding-bottom":"1em"}},[t._v(" "+t._s(t.$t("_common:signature").capitalize())+" ")]),r("img",{staticStyle:{width:"80%"},attrs:{src:t.recipient.answer.signatureDataURL}})]):r("div",{staticStyle:{"font-size":"13px","padding-top":"3px"}},[t.get(t.recipient,"answerMethod.accept")==="bankId"?[r("div",{staticStyle:{"font-weight":"500"}},[t._v(" "+t._s(t.$t("views:publicDocument.pdfVerification.recipient.signedBankId"))+" ")]),r("div",[t._v(t._s(t.recipient.answer.response.name))]),r("div",[t._v(t._s(t.recipient.socialNo))])]:t.get(t.recipient,"answerMethod.accept")==="login"?r("div",{staticStyle:{"font-weight":"500"}},[t._v(" "+t._s(t.$t("views:publicDocument.pdfVerification.recipient.verifiedLogin"))+" ")]):t._e()],2)]:t.recipient.answer?r("div",[t._v(" "+t._s(t.$t("_common:denied").capitalize())+" ")]):r("div",[t._v(" "+t._s(t.$t("pendingAnswer"))+" ")])],2),t.recipient.answer?r("div",{staticStyle:{padding:"8px 1.5em","border-top":"1px solid hsl(0deg 0% 88%)","background-color":"hsl(0deg 0% 95%)","font-size":"13px",color:"hsl(0, 0%, 35%)","font-weight":"500"}},[t.recipient.answer.didAnswerAt?r("div",[r("div",[t._v(" "+t._s(t.$t("_common:date").capitalize())+": "+t._s(t.$formatDate(t.recipient.answer.didAnswerAt,"P"))+" ")]),r("div",[t._v(" "+t._s(t.$t("_common:time.time").capitalize())+": "+t._s(t.$formatDate(t.recipient.answer.didAnswerAt,"p"))+" ")])]):t._e(),t.recipient.answer.ip?r("div",[t._v(" IP: "+t._s(t.recipient.answer.ip)+" ")]):t._e(),t.recipient.answer.browser?r("div",[t._v(" Browser: "+t._s(t.getBrowserString(t.recipient.answer))+" ")]):t._e()]):t._e()])])],1)])])},zht=[],Vht=he(Bht,jht,zht,!1,null,"7bf07f05",null,null);const Uht=Vht.exports,rDt="",Hht={name:"DocumentDetails",mixins:[br],components:{PublicDocumentEvents:Fht,PublicRecipientItem:Uht,CDropdown:Of,CDropdownItem:nd},props:{document:{type:Object,required:!0},openPrintFunc:{type:Function,default:null}},data(){return{docLanguages:fM,nativeTranslations:ove}},computed:{viewer(){return this.document.viewer}},methods:{changeLanguage(n){this.document.language=n,this.$root.$i18n.i18next.changeLanguage(XA.includes(n)?n:"en")}}};var Wht=function(){var t=this,r=t._self._c;return r("div",{staticStyle:{width:"100%",height:"100%",display:"flex","flex-direction":"column","font-size":"16px",background:"hsl(0, 0%, 100%)","border-radius":"10px",overflow:"hidden","box-shadow":"0 10px 20px rgba(0, 0, 0, 0.2)",position:"relative"}},[r("div",{staticClass:"flex w-full justify-end items-center",staticStyle:{position:"absolute",top:"20px",right:"20px","z-index":"2"}},[t.openPrintFunc?[r("CButton",{staticStyle:{"padding-left":"1em","padding-right":"1em"},attrs:{"icon-left":"print",type:"none",pattern:"tertiary",taller:"",size:"small"},on:{click:t.openPrintFunc}},[t._v(" "+t._s(t.document.$t("download",{thing:"PDF"}))+" ")]),r("div",{staticStyle:{height:"2rem",width:"1px","background-color":"hsl(0, 0%, 88%)",margin:"0 6px"}})]:t._e(),r("CDropdown",{attrs:{value:t.document.language}},[r("CButton",{staticStyle:{color:"hsla(0, 0%, 45%, 1)"},attrs:{slot:"trigger","icon-props":{size:18},size:"normal",icon:"globe",circle:""},slot:"trigger"}),t._l(t.docLanguages,function(i){return r("CDropdownItem",{key:i,attrs:{value:i},on:{click:function(a){return t.changeLanguage(i)}}},[t._v(" "+t._s(t.nativeTranslations[i])+" ")])})],2),r("CButton",{staticStyle:{"margin-left":"6px",color:"hsla(0, 0%, 45%, 1)"},attrs:{"icon-props":{size:18},size:"normal",icon:"x",circle:""},on:{click:function(i){return t.$emit("close")}}})],2),r("div",{staticClass:"d-root"},[r("div",{staticClass:"flex justify-between",staticStyle:{"margin-bottom":"3em"}},[r("div",[r("div",{staticStyle:{"font-size":"18px","font-weight":"600"}},[t._v(" "+t._s(t.document.$t("detail_plural").capitalize())+" ")]),r("div",{staticClass:"has-text-grey",staticStyle:{"font-size":"14px"}},[t._v(" "+t._s(t.document.$t("documentDetails.subTitle"))+" ")])])]),r("div",{staticClass:"d-option",staticStyle:{"margin-bottom":"3em"}},[r("div",{staticClass:"d-option-title",staticStyle:{"padding-bottom":"0.5rem"}},[t._v(" "+t._s(t.document.$t("participant_plural").capitalize())+" ")]),t._l(t.document.recipients,function(i,a){return r("PublicRecipientItem",{key:i._uniqueId+a,attrs:{recipient:i}})})],2),r("PublicDocumentEvents",{attrs:{document:t.document},scopedSlots:t._u([{key:"default",fn:function({events:i}){return[i&&i.length?r("div",{staticClass:"d-option"},[r("div",{staticClass:"d-option-title"},[t._v(" "+t._s(t.document.$t("event.event_plural").capitalize())+" ")]),r("div",{attrs:{id:"timeline"}},[r("div",t._l(i,function(a,o){return r("div",{key:o,staticClass:"e-item"},[r("div",{staticClass:"e-data"},[r("div",{staticClass:"e-text"},[t._v(t._s(a.text))]),r("div",{staticClass:"e-timestamp"},[r("div",{staticClass:"e-date"},[t._v(t._s(t.$formatDate(a.time,"P")))]),r("div",{staticClass:"e-time",staticStyle:{"padding-left":"0.5ch"}},[t._v(" "+t._s(t.$formatDate(a.time,"p"))+" ")])])])])}),0)])]):t._e()]}}])}),t.mq==="sm"?r("div",[t._t("footer")],2):t._e()],1),t.mq!=="sm"?r("div",[t._t("footer")],2):t._e()])},Ght=[],qht=he(Hht,Wht,Ght,!1,null,"0d868038",null,null);const Yht=qht.exports,iDt="",Kht={components:{DocumentDetails:Yht,DocumentVoided:NY},props:{document:{type:Object,required:!0},closeFunc:{type:Function,default:null}}};var Zht=function(){var t=this,r=t._self._c;return t.document&&t.document.status==="voided"?r("DocumentVoided",{attrs:{document:t.document}}):r("DocumentDetails",{attrs:{document:t.document},on:{close:t.closeFunc}})},Jht=[],Xht=he(Kht,Zht,Jht,!1,null,"d3b68450",null,null);const Qht=Xht.exports,emt=Object.freeze(Object.defineProperty({__proto__:null,default:Qht},Symbol.toStringTag,{value:"Module"})),aDt="",tmt={name:"DocModalBase",components:{},props:{showClose:{type:Boolean,default:!1}}};var nmt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"doc-modal-base"},[t.showClose?r("CButton",{staticClass:"absolute text-gray-500 top-4 right-4",attrs:{circle:"",icon:"x"},on:{click:function(i){return t.$parent.$emit("close")}}}):t._e(),t._t("default")],2)},rmt=[],imt=he(tmt,nmt,rmt,!1,null,"b672a873",null,null);const zY=imt.exports,amt={i18nOptions:{namespaces:"components",keyPrefix:"document.propertyDesignationModal"},mixins:[br],components:{DocModalBase:zY},props:{senderName:{type:String,required:!0},propertyDesignation:{type:Object,default:null},fullScreen:{type:Boolean,default:!1}},data(){return{cornerRadius:0,spacing:0,view:"start",form:"",realEstateId:"",condominiumId:null,condominiumOrgNo:null}},validations:{condominiumId:{required:ln.requiredIf(n=>n.form==="condominium"),minLength:ln.minLength(4),maxLength:ln.maxLength(4)},condominiumOrgNo:{required:ln.requiredIf(n=>n.form==="condominium")},realEstateId:{required:ln.requiredIf(n=>n.form==="realEstate")}},computed:{messages(){const n=t=>this.$t(`validations.${t}`);return{condominiumId:{required:n("condominiumId.required"),minLength:n("condominiumId.minLength"),maxLength:n("condominiumId.maxLength")},condominiumOrgNo:{required:n("condominiumOrgNo.required")},realEstateId:{required:n("realEstateId.required")}}}},created(){if(this.propertyDesignation){const{propertyType:n="",propertyId:t="",condominiumOrgNo:r=null}=this.propertyDesignation;this.form=n,n==="realEstate"?this.realEstateId=t:this.condominiumId=t,this.condominiumOrgNo=r}},mounted(){this.spacing=window.getComputedStyle(this.$refs.root.$el).paddingTop,this.cornerRadius=window.getComputedStyle(this.$refs.root.$el).borderRadius},methods:{...xn({putCurrentDoc:He.PUT_CURRENT_PUBLIC_DOCUMENT,reloadCurrentDocument:He.RELOAD_CURRENT_DOCUMENT}),async updateClientPropertyDesignation(){if(this.$v.$touch(),this.$v.$invalid)return;const n={propertyType:this.form,propertyId:this.form==="realEstate"?this.realEstateId:this.condominiumId,...this.form==="condominium"&&{condominiumOrgNo:this.condominiumOrgNo}};try{const t="clients[0].region.propertyDesignation";await this.putCurrentDoc({body:{[t]:n}}),this.reloadCurrentDocument(),this.view="complete"}catch(t){Rr(t)}}}};var omt=function(){var t=this,r=t._self._c;return r("doc-modal-base",{ref:"root",class:[{"full-screen":t.mq==="sm"}]},[t.fullScreen?r("CButton",{staticClass:"absolute z-50 top-4 right-4",attrs:{icon:"x",circle:""},on:{click:function(i){return t.$emit("close")}}}):t._e(),r("div",[t.view!=="complete"?r("div",{staticClass:"relative pb-8 mb-8 text-center border-b border-gray-100 negate-padding bg-gray-50",style:{paddingTop:t.spacing,marginTop:`-${t.spacing}`,borderRadius:`${t.cornerRadius} ${t.cornerRadius} 0 0`}},[t.view==="start"?r("div",{key:1},[r("div",{staticClass:"mb-2 text-lg font-semibold"},[t._v(t._s(t.$t("title")))]),r("div",{staticClass:"text-gray-700"},[t._v(" "+t._s(t.$t("subTitle",{senderName:t.senderName}))+" ")])]):t._e(),t.view==="form"?r("div",{key:2},[r("CButton",{staticClass:"absolute top-4 left-4",attrs:{circle:"",icon:"arrow-left"},on:{click:function(i){t.view="start"}}}),r("div",{staticClass:"mb-2 text-lg font-semibold"},[t._v(t._s(t.$t("howToFind")))]),r("div",{staticClass:"text-gray-700"},[t._v(" "+t._s(t.$t("goto1"))+" "),r("a",{staticStyle:{"text-decoration":"underline"},attrs:{href:"https://www.lantmateriet.se/",target:"_blank",rel:"noopener"}},[t._v(" "+t._s(t.$t("goto2"))+" ")]),t._v(" "+t._s(t.$t("goto3"))+" ")])],1):t._e()]):t._e(),t.view==="start"?r("div",{key:1,staticClass:"mb-12 text-center"},[r("div",{staticClass:"mb-4 text-base font-medium"},[t._v(t._s(t.$t("whereTitle")))]),r("div",{staticClass:"flex justify-center"},[r("div",{staticClass:"mx-4"},[r("div",{staticClass:"flex items-center justify-center w-24 h-24 mb-2 border border-gray-300 cursor-pointer bg-gray-50 rounded-xl hover:bg-gray-100 active:bg-gray-200",on:{click:function(i){t.view="form",t.form="realEstate"}}},[r("svg",{staticClass:"text-gray-400",attrs:{width:"59",height:"41",viewBox:"0 0 59 59",xmlns:"http://www.w3.org/2000/svg"}},[r("g",{attrs:{fill:"currentColor","fill-rule":"evenodd"}},[r("path",{attrs:{d:"M6 28h47v29H6V28zm6 7.998101V40.0019C12 41.113294 12.89458 42 13.998101 42H18.0019C19.113294 42 20 41.10542 20 40.001899V35.9981C20 34.886706 19.10542 34 18.001899 34H13.9981C12.886706 34 12 34.89458 12 35.998101zm22-.007306V54h11V35.990795C45 34.898212 44.108144 34 43.007983 34h-7.015966C34.900177 34 34 34.89131 34 35.990795zM27.189354 1.837583C28.46549.536998 30.53366.53613 31.813677 1.840673L56.5 27h-54l9.85551-10.044348V7.141778h6.733007v2.95186l8.100837-8.256055zM25.5 15.861211v4.003797c0 1.111395.89458 1.998102 1.998101 1.998102H31.5019c1.111395 0 1.998101-.89458 1.998101-1.998102v-4.003797c0-1.111395-.89458-1.998101-1.998101-1.998101H27.4981c-1.111395 0-1.998101.89458-1.998101 1.998101z"}}),r("path",{attrs:{d:"M0 56.004882C0 54.897616.90314 54 1.996843 54h55.006314C58.105983 54 59 54.8939 59 56.004882V59H0v-2.995118z"}})])])]),r("div",{staticClass:"text-sm leading-tight text-gray-700"},[t._v(" "+t._s(t.$t("house"))),r("br"),t._v("/ "+t._s(t.$t("realEstate"))+" ")])]),r("div",{staticClass:"mx-4"},[r("div",{staticClass:"flex items-center justify-center w-24 h-24 mb-2 border border-gray-300 cursor-pointer bg-gray-50 rounded-xl hover:bg-gray-100 active:bg-gray-200",on:{click:function(i){t.view="form",t.form="condominium"}}},[r("svg",{staticClass:"text-gray-400",attrs:{width:"59",height:"50",viewBox:"0 0 59 73",xmlns:"http://www.w3.org/2000/svg"}},[r("g",{attrs:{fill:"currentColor","fill-rule":"evenodd"}},[r("path",{attrs:{d:"M6 9.004723C6 7.34526 7.343394 6 8.993614 6h41.012771C51.659714 6 53 7.342697 53 9.004723V71H6V9.004723zm5 4.993378V18.0019C11 19.113294 11.89458 20 12.998101 20H17.0019C18.113294 20 19 19.10542 19 18.001899V13.9981C19 12.886706 18.10542 12 17.001899 12H12.9981C11.886706 12 11 12.89458 11 13.998101zm14.5 0V18.0019C25.5 19.113294 26.39458 20 27.498101 20H31.5019C32.613294 20 33.5 19.10542 33.5 18.001899V13.9981C33.5 12.886706 32.60542 12 31.501899 12H27.4981C26.386706 12 25.5 12.89458 25.5 13.998101zm14.5 0V18.0019C40 19.113294 40.89458 20 41.998101 20H46.0019C47.113294 20 48 19.10542 48 18.001899V13.9981C48 12.886706 47.10542 12 46.001899 12H41.9981C40.886706 12 40 12.89458 40 13.998101zm-29 12V30.0019C11 31.113294 11.89458 32 12.998101 32H17.0019C18.113294 32 19 31.10542 19 30.001899V25.9981C19 24.886706 18.10542 24 17.001899 24H12.9981C11.886706 24 11 24.89458 11 25.998101zm14.5 0V30.0019C25.5 31.113294 26.39458 32 27.498101 32H31.5019C32.613294 32 33.5 31.10542 33.5 30.001899V25.9981C33.5 24.886706 32.60542 24 31.501899 24H27.4981C26.386706 24 25.5 24.89458 25.5 25.998101zm14.5 0V30.0019C40 31.113294 40.89458 32 41.998101 32H46.0019C47.113294 32 48 31.10542 48 30.001899V25.9981C48 24.886706 47.10542 24 46.001899 24H41.9981C40.886706 24 40 24.89458 40 25.998101zm-29 12V42.0019C11 43.113294 11.89458 44 12.998101 44H17.0019C18.113294 44 19 43.10542 19 42.001899V37.9981C19 36.886706 18.10542 36 17.001899 36H12.9981C11.886706 36 11 36.89458 11 37.998101zm14.5 0V42.0019C25.5 43.113294 26.39458 44 27.498101 44H31.5019C32.613294 44 33.5 43.10542 33.5 42.001899V37.9981C33.5 36.886706 32.60542 36 31.501899 36H27.4981C26.386706 36 25.5 36.89458 25.5 37.998101zm14.5 0V42.0019C40 43.113294 40.89458 44 41.998101 44H46.0019C47.113294 44 48 43.10542 48 42.001899V37.9981C48 36.886706 47.10542 36 46.001899 36H41.9981C40.886706 36 40 36.89458 40 37.998101zm-29 12V54.0019C11 55.113294 11.89458 56 12.998101 56H17.0019C18.113294 56 19 55.10542 19 54.001899V49.9981C19 48.886706 18.10542 48 17.001899 48H12.9981C11.886706 48 11 48.89458 11 49.998101zm14.5 0V54.0019C25.5 55.113294 26.39458 56 27.498101 56H31.5019C32.613294 56 33.5 55.10542 33.5 54.001899V49.9981C33.5 48.886706 32.60542 48 31.501899 48H27.4981C26.386706 48 25.5 48.89458 25.5 49.998101zM21 60.997391V68h17v-7.002608C38 59.895858 37.104522 59 35.999894 59H23.000106C21.890058 59 21 59.894263 21 60.997392zm19-10.99929V54.0019C40 55.113294 40.89458 56 41.998101 56H46.0019C47.113294 56 48 55.10542 48 54.001899V49.9981C48 48.886706 47.10542 48 46.001899 48H41.9981C40.886706 48 40 48.89458 40 49.998101zM10 2.5C10 1.119288 11.125134 0 12.498953 0h34.002094C47.88118 0 49 1.109662 49 2.5V5H10V2.5z"}}),r("path",{attrs:{d:"M0 70.004881C0 68.897616.90314 68 1.996843 68h55.006314C58.105983 68 59 68.8939 59 70.004881V73H0v-2.995119z"}})])])]),r("div",{staticClass:"text-sm leading-tight text-gray-700"},[t._v(" "+t._s(t.$t("condominium"))),r("br"),t._v("/ "+t._s(t.$t("apartment"))+" ")])])])]):t._e(),t.view==="form"?r("div",{key:2},[r("div",[t.form==="realEstate"?r("CField",{attrs:{vuelidate:t.$v.realEstateId,"vuelidate-messages":t.messages.realEstateId,label:t.$t("propertyDesignation")}},[r("CInput",{attrs:{placeholder:t.$t("propertyDesignationPlaceholder"),autofocus:""},model:{value:t.realEstateId,callback:function(i){t.realEstateId=i},expression:"realEstateId"}})],1):t._e(),t.form==="condominium"?r("CField",{attrs:{vuelidate:t.$v.condominiumId,"vuelidate-messages":t.messages.condominiumId,label:t.$t("condominiumId")}},[r("CInput",{attrs:{placeholder:t.$t("condominiumIdPlaceholder"),autofocus:"",type:"number"},model:{value:t.condominiumId,callback:function(i){t.condominiumId=i},expression:"condominiumId"}})],1):t._e(),t.form==="condominium"?r("CField",{attrs:{vuelidate:t.$v.condominiumOrgNo,"vuelidate-messages":t.messages.condominiumOrgNo,label:t.$t("condominiumOrgNo")}},[r("CInput",{attrs:{placeholder:t.$t("condominiumOrgNoPlaceholder"),type:"number"},model:{value:t.condominiumOrgNo,callback:function(i){t.condominiumOrgNo=i},expression:"condominiumOrgNo"}})],1):t._e(),r("div",{staticClass:"mt-8"},[r("CButton",{attrs:{type:"secondary",wide:""},on:{click:t.updateClientPropertyDesignation}},[t._v(t._s(t.$t("_common:save")))])],1)],1)]):t._e(),t.view==="complete"?r("div",{key:3},[r("div",{staticClass:"flex flex-col items-center justify-center text-center"},[r("div",{staticClass:"flex items-center justify-center w-12 h-12 mb-4 rounded-full bg-primary-50"},[r("BaseIcon",{staticClass:"text-primary-500",attrs:{type:"check"}})],1),r("div",{staticClass:"mb-1 text-base font-semibold"},[t._v(" "+t._s(t.$t("savedTitle"))+" ")]),r("div",{staticClass:"mb-6 text-base text-gray-700"},[t._v(" "+t._s(t.$t("savedSubTitle",{senderName:t.senderName}))+" ")]),r("div",{staticClass:"w-full mt-4"},[r("CButton",{attrs:{type:"secondary",wide:""},on:{click:function(i){return t.$emit("close")}}},[t._v(t._s(t.$t("_common:close")))])],1)])]):t._e()])],1)},smt=[],lmt=he(amt,omt,smt,!1,null,null,null,null);const cmt=lmt.exports,oDt="",umt={i18nOptions:{namespaces:"docAnswer",messages:{en:{previewTooltip:"Preview how your recipients will answer."},sv:{previewTooltip:"Förhandsgranska hur dina mottagare kommer att lämna svar."}}},name:"DocumentAnswerRead",mixins:[RY({documentKey:"_document"}),br],inject:{isPdf:{default:!1}},props:{_document:{type:Object,required:!0}},data(){return{isInViewport:!1,scrollToElement:$m}},computed:{viewerId(){var n;return((n=this._document._doc)==null?void 0:n.viewerId)||null},isPreview(){return this._document.isPreview},modalHeight(){return this.mq==="sm"?"100%":"auto"},allowPropertyDesignation(){const{prices:n}=this._document;if(!n||!n.region)return!1;const{houseWorkType:t}=n.region;return["rot","greenRot15","greenRot20","greenRot50"].includes(t)},propertyDesignation(){return Ce(this._document,"clients[0].region.propertyDesignation",null)}},mounted(){window.addEventListener("scroll",this.scrollHandler,{capture:!0,passive:!0}),this.$route.name==="docPropertyDesignation"&&this.showPropertyDesignation()},destroyed(){window.removeEventListener("scroll",this.scrollHandler)},watch:{$route:{immediate:!0,handler(n){n!=null&&n.hash&&this.onAnswer("accept",{calcHeight:!0})}},isInViewport:{immediate:!0,handler(n,t){n!==t&&Tr.trigger("ui:document.block.answer.visible",n)}}},methods:{scrollHandler(){this.$refs.answerButtons&&(this.isInViewport=aM(this.$refs.answerButtons))},showPropertyDesignation(){this.$modal.show(cmt,{senderName:this._document.sender.user.name,propertyDesignation:this.propertyDesignation,fullScreen:this.modalHeight==="100%"},{adaptive:!0,height:this.modalHeight,width:"100%",maxWidth:this.modalHeight==="100%"?999:400,classes:"overflow-visible",transition:"fade-in-slide-up"})}}};var dmt=function(){var i,a;var t=this,r=t._self._c;return t._document.answerActions.showActions&&!t.isPdf?r("div",{staticStyle:{padding:"calc(3 * var(--rem)) 0"}},[r("div",{ref:"answerButtons",staticClass:"flex justify-center w-full"},[r("transition",{attrs:{name:"fade",mode:"out-in"}},[((a=(i=t._document.viewer)==null?void 0:i.answerMethod)==null?void 0:a.accept)==="inPerson"?r("div",{key:0,staticStyle:{"max-width":"720px",margin:"0 auto",padding:"0 calc(3 * var(--rem))"},style:t.mq==="sm"?{padding:"0 calc(1.5 * var(--rem))"}:null},[t._v(" "+t._s(t._document.$t("chapters.answerButtons.inPersonSignatureHint"))+" "),r(t._document.sender.user.email?"a":"span",{tag:"component",attrs:{href:`mailto:${t._document.sender.user.email}`}},[t._v(" "+t._s(t._document.sender.company.name||t._document.$t("theSender"))+" ")])],1):(t._document.answerActions.canAnswer||t.isPreview)&&t._document.answerActions.showActions?r("div",{key:1,staticClass:"flex justify-center w-full"},[r("CButton",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.isPreview&&t.$t("previewTooltip"),expression:"isPreview && $t('previewTooltip')"}],staticClass:"text-gray-400",attrs:{size:"medium"},on:{click:function(o){return t.onAnswer("decline")}}},[t._v(" "+t._s(t._document.$t("deny").capitalize())+" ")]),r("CButton",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.isPreview&&t.$t("previewTooltip"),expression:"isPreview && $t('previewTooltip')"}],staticStyle:{"margin-left":"1em","padding-left":"1.5em","padding-right":"1.5em"},attrs:{"icon-props":{strokeWidth:2.5},type:"success",size:"medium","icon-left":"check",raised:""},on:{click:function(o){return t.onAnswer("accept")}}},[t._v(" "+t._s(t._document.$t("sign").capitalize())+" ")])],1):t._document.answerActions.hasAnswered&&t._document.answerActions.waitingForOthers?r("div",{key:2,staticClass:"text-center"},[r("div",{staticStyle:{"font-weight":"600","font-size":"calc(calc(1 * var(--rem)) + 2px)","margin-bottom":"calc(0.5 * var(--rem))"}},[t._v(" "+t._s(t._document.$t("chapters.answerButtons.youHave"))+" "),r("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:`${t.$formatDate(t._document.viewer.answer.didAnswerAt,"Pp")}`,expression:"\n `${$formatDate(_document.viewer.answer.didAnswerAt, 'Pp')}`\n "}],staticStyle:{"text-decoration":"underline"}},[t._v(t._s(t._document.viewer.answer.didAccept?t._document.$t("approved"):t._document.$t("denied")))]),t._v(" "+t._s(" "+t._document.$t("theDocument"))+". ")]),r("div",[t._v(" "+t._s(t._document.$t("chapters.answerButtons.waitingDescription",{remaining:t._document.remainingSignatures}))+" ")])]):t._document.status==="accepted"?r("div",{key:3},[r("div",{staticClass:"callout accepted"},[r("div",{staticClass:"title"},[t._v(" "+t._s(t._document.$t("chapters.answerButtons.approveTitle"))+" ")]),r("div",[t._v(" "+t._s(t._document.$t("chapters.answerButtons.approveDescription",{sender:t._document.sender.company.name||t._document.$t("theSender")}))+" ")])])]):t._document.status==="denied"?r("div",{key:4,staticClass:"callout denied"},[r("div",{staticClass:"title"},[t._v(" "+t._s(t._document.$t("chapters.answerButtons.denyTitle"))+" ")]),r("div",[t._v(" "+t._s(t._document.$t("chapters.answerButtons.denyDescription",{sender:t._document.sender.company.name||t._document.$t("theSender")}))+" ")])]):t._document.status==="expired"?r("div",{key:5,staticClass:"callout expired"},[r("div",{staticClass:"title"},[t._v(" "+t._s(t._document.$t("chapters.answerButtons.expiredTitle"))+" ")]),r("div",[t._v(" "+t._s(t._document.$t("chapters.answerButtons.expiredDescription",{sender:t._document.sender.company.name||t._document.$t("theSender")}))+" ")])]):t._e()])],1),t._document.status==="accepted"&&t.allowPropertyDesignation&&t._document.answerActions.hasAnswered?r("div",{staticClass:"flex justify-center"},[r("div",{staticClass:"answer button accept",staticStyle:{"padding-left":"calc(1.5 * var(--rem))","padding-right":"calc(1.5 * var(--rem))"},on:{click:function(o){return t.showPropertyDesignation()}}},[t._v(" "+t._s(t._document.$t(`chapters.answerButtons.${t.propertyDesignation?"editPropDes":"enterPropDes"}`))+" ")])]):t._e()]):t._e()},pmt=[],fmt=he(umt,dmt,pmt,!1,null,"e023f071",null,null);const hmt=fmt.exports,mmt=Object.freeze(Object.defineProperty({__proto__:null,default:hmt},Symbol.toStringTag,{value:"Module"})),sDt="";let VY,UY,HY,WY,GY;function gmt(n){return typeof n=="object"&&n!==null&&n.__PDFDocumentLoadingTask===!0}const vmt={name:"PdfPage",props:{src:{type:[String,Object,Promise],default:""},page:{type:Number,default:1},rotate:{type:Number,default:0},scale:{type:[Number,String],default:"page-width"},resize:{type:Boolean,default:!0},text:{type:Boolean,default:!0},pdfLoadingTask:{type:Promise,required:!0},containerClass:{type:[Array,String],default:""}},components:{WithDimensions:Af},data(){return{internalSrc:this.src,pdf:null,pdfViewer:null,loading:!0}},watch:{pdf(n){const t=n.pdfInfo||n._pdfInfo;this.$emit("numpages",t.numPages)},page(n){this.pdf.getPage(n).then(t=>{this.pdfViewer.setPdfPage(t),this.pdfViewer.draw()})},scale(n){this.drawScaled(n)},rotate(n){this.pdfViewer&&(this.pdfViewer.update({scale:this.scale,rotation:n}),this.pdfViewer.draw())}},mounted(){VY=window.pdfjsViewer.DefaultTextLayerFactory,UY=window.pdfjsViewer.PDFFindController,HY=window.pdfjsViewer.PDFLinkService,WY=window.pdfjsViewer.PDFPageView,GY=window.pdfjsViewer.EventBus,this.init()},beforeDestroy(){this.pdfViewer&&(this.pdfViewer.destroy(),this.pdfViewer=null)},methods:{init(){gmt(this.internalSrc)||(this.internalSrc=this.pdfLoadingTask,this.$emit("loading",!0));const n=this.$refs.container,t=new GY;t.on("pagerendered",i=>{this.$emit("pagerendered",i)}),this.pdfLinkService=new HY({eventBus:t,externalLinkTarget:2}),this.pdfFindController=new UY({eventBus:t,linkService:this.pdfLinkService});let r;this.text&&(r=new VY),this.internalSrc.then(i=>(this.pdf=i,i.getPage(this.page))).then(i=>{this.pdfViewer=new WY({container:n,id:this.page,scale:1,defaultViewport:i.getViewport({scale:1}),eventBus:t,textLayerFactory:r}),this.pdfViewer.setPdfPage(i);const a={scrollPageIntoView:o=>{this.$emit("link-clicked",o)}};return this.pdfLinkService.setDocument(this.pdf),this.pdfLinkService.setViewer(a),this.pdfFindController.setDocument(this.pdf),this.drawScaled(this.scale)}).catch(i=>{this.$emit("error",i),this.loading=!1,this.$emit("loading",!1)})},calculateScale(n=-1,t=-1){return this.pdfViewer.update({scale:1,rotation:this.rotate}),n===-1&&t===-1&&(n=this.$refs.container.offsetWidth),n/this.pdfViewer.viewport.width},calculateScaleHeight(){this.pdfViewer.update({scale:1,rotation:this.rotate});var n=this.$refs.container.offsetHeight,t=this.$refs.container.parentElement.parentElement;return t.offsetHeight/n},async drawScaled(n){this.pdfViewer&&(n==="page-width"?(n=this.calculateScale(),this.$emit("update:scale",n)):n==="page-height"&&(n=this.calculateScaleHeight(),this.$emit("update:scale",n)),this.pdfViewer.update({scale:n,rotation:this.rotate}),await this.pdfViewer.draw(),this.text&&(this.pdfViewer.textLayer.findController=this.pdfFindController),this.loading=!1,this.$emit("loading",!1))},resizeScale(){this.resize&&this.drawScaled("page-width")}}};var ymt=function(){var t=this,r=t._self._c;return r("div",[t.loading?t._t("loading"):t._e(),r("WithDimensions",{on:{resize:t.resizeScale}},[r("div",{ref:"container",staticClass:"pdfViewer",class:t.containerClass})])],2)},bmt=[],_mt=he(vmt,ymt,bmt,!1,null,null,null,null);const wmt=_mt.exports,R_=new gM;function xmt(n,t){let r;if(typeof n=="string")r={url:n};else if(typeof n=="object"&&n!==null)r={...n};else throw new TypeError("invalid src type");const i=window.pdfjsLib.getDocument(r).promise;return i.__PDFDocumentLoadingTask=!0,t&&t.onPassword&&(i.onPassword=t.onPassword),t&&t.onProgress&&(i.onProgress=t.onProgress),i}const Z7={add(n){R_.trigger("add",n)},remove(n){R_.trigger("remove",n)},onAdd(n){R_.on("add",n)},onRemove(n){R_.on("remove",n)}},Cmt={props:{src:{type:String,default:null},docFilePath:{type:String,default:null}},components:{VuePdf:wmt},inject:{isPdf:{default:!1}},data(){return{numPages:void 0,pdfLoadingTask:null,hasLoadedScripts:!1,loading:!1,pdfRenderBus:Z7}},created(){this.isPdf||Z7.add(this._uid)},watch:{src:{immediate:!0,async handler(n){this.hasLoadedScripts||(await g0("https://unpkg.com/pdfjs-dist@3.0.279/build/pdf.min.js"),await g0("https://unpkg.com/pdfjs-dist@3.0.279/web/pdf_viewer.js"),window.pdfjsLib.GlobalWorkerOptions.workerSrc="https://unpkg.com/pdfjs-dist@3.0.279/build/pdf.worker.min.js",this.hasLoadedScripts=!0),this.setPdf(n)}}},methods:{createLoadingTask:xmt,async setPdf(n){n&&(this.loading=!0,this.pdfLoadingTask=this.createLoadingTask(n),this.$nextTick(()=>{this.pdfLoadingTask.then(t=>{this.loading=!1,this.numPages=t.numPages,this.$emit("numPages",t.numPages),this.$emit("rendered"),Z7.remove(this._uid)})}))}}};var kmt=function(){var t=this,r=t._self._c;return r("div",{key:t.src},[t.isPdf?r("pre",[t._v(" ClingPDFReplaceStart:["+t._s(this.docFilePath)+`]ClingPDFReplaceEnd
|
|
2859
|
+
}`}],staticClass:"font-medium",attrs:{value:t.isTypeActive("email",i),size:"tiny",disabled:!t.canSendType("email",i)},on:{input:function(o){return t.setDeliveryMethod("email",a)}}},[t._v(" "+t._s(t.$t("_common:email").capitalize())+" ")])],1)])])}),r("CButton",{staticClass:"font-semibold mt-8",attrs:{type:"secondary",size:"small",taller:"",icon:"send",wide:""},on:{click:t.submit}},[t._v(" "+t._s(t.$t("_common:send",{thing:t.$t("_common:reminder")}))+" ")])],2)},pft=[],fft=he(uft,dft,pft,!1,null,null,null,null);const hft=fft.exports,mft={props:{document:{type:Object,required:!0}},components:{DocumentSendReminderModal:hft}};var gft=function(){var t=this,r=t._self._c;return r("DocumentSendReminderModal",{attrs:{document:t.document},on:{close:function(i){return t.$router.push("/")}}})},vft=[],yft=he(mft,gft,vft,!1,null,null,null,null);const bft=yft.exports,_ft=Object.freeze(Object.defineProperty({__proto__:null,default:bft},Symbol.toStringTag,{value:"Module"})),UOt="",IY={new:{statusClass:"draft",icon:"statusDraft"},draft:{statusClass:"draft",icon:"statusDraft"},scheduled:{statusClass:"scheduled",icon:"statusScheduled"},sent:{statusClass:"sent",icon:"statusSent"},denied:{statusClass:"denied",icon:"statusDenied"},accepted:{statusClass:"accepted",icon:"statusAccepted"},signed:{statusClass:"accepted",icon:"statusAccepted"},semiSigned:{statusClass:"accepted",icon:"statusSemiSigned"},expired:{statusClass:"expired",icon:"statusExpired"},voided:{statusClass:"voided",icon:"statusVoided"},active:{statusClass:"active",icon:"statusActive"},completed:{statusClass:"completed",icon:"statusCompleted"},archived:{statusClass:"archived",icon:"statusArchive"}},wft={props:{status:{type:String,default:""},split:{type:String,default:""}},computed:{text(){return this.status?Be.t(`_common:status.${this.status}`):""},className(){const{statusClass:n=""}=IY[this.status]||{};return n},icon(){return Ce(IY,`${this.status}.icon`)}}};var xft=function(){var t=this,r=t._self._c;return r("div",{staticClass:"inline-flex items-center h-6 pl-1 pr-2 text-xs font-medium leading-none rounded-full c-badge_status",class:t.className},[t.icon?r("BaseIcon",{staticClass:"mr-1 status-icon",attrs:{type:t.icon,size:"16"}}):t._e(),r("span",[t._v(t._s(t.text))])],1)},Cft=[],kft=he(wft,xft,Cft,!1,null,null,null,null);const Sft=kft.exports,Tft={name:"DynamicLink",props:{template:{type:String,required:!0}},computed:{transformed(){return{template:this.template}}}};var Eft=function(){var t=this,r=t._self._c;return r(t.transformed,{tag:"component"})},$ft=[],Aft=he(Tft,Eft,$ft,!1,null,null,null,null);const Oft={name:"EventItem",components:{DynamicLink:Aft.exports},props:{title:{type:String,default:""},template:{type:String,default:""},content:{type:[String,Array],default:""},createdAt:{type:String,default:""},icon:{type:String,default:"square"},compact:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},color:{type:String,default:"gray",validator:n=>["blue","teal","orange","green","red","purple","gray","primary"].indexOf(n)!==-1},isFuture:{type:Boolean,default:!1},size:{type:String,default:""}},computed:{date(){return Hl(yu(this.createdAt))?this.$formatDate(this.createdAt,"Pp"):null},dayOfMonth(){return Hl(yu(this.createdAt))?this.$formatDate(this.createdAt,"d"):null},month(){return Hl(yu(this.createdAt))?this.$formatDate(this.createdAt,"MMM"):null},iconClasses(){const n={blue:"text-blue-600 bg-blue-50",teal:"text-cyan-600 bg-cyan-50",orange:"text-orange-600 bg-orange-50",green:"text-green-600 bg-green-50",red:"text-red-600 bg-red-50",purple:"text-purple-600 bg-purple-50",gray:"text-gray-500 bg-gray-100",primary:"text-primary-500 bg-primary-50"};return this.isFuture?"bg-purple-100 text-purple-500":n[this.color]||n.gray},titleSize(){return this.size==="large"?"text-base":"text-sm"},textSize(){return this.size==="large"?"text-[15px]":"text-[13px]"},dateSize(){return this.size==="large"?"text-sm":"text-xs"}}};var Dft=function(){var t=this,r=t._self._c;return r("div",{staticClass:"flex flex-nowrap relative text-primary-500 cursor-default pb-5 ml-4 event before:content-[''] before:absolute before:w-px before:h-full before:bg-gray-300 before:-left-px before:top-4 last:before:hidden"},[r("div",{staticClass:"m-0 h-[23px] relative",staticStyle:{"--bg":"#fff"}},[r("div",{staticClass:"rounded-full absolute left-1/2 top-1/2 z-[1] w-7 h-7 flex items-center justify-center border-none bg-gray-100",class:t.iconClasses,staticStyle:{transform:"translate(-50%, calc(-50% + 8px))","box-shadow":"0 0 0 2px var(--bg)"}},[t.loading?t._e():r("BaseIcon",{attrs:{type:t.icon,size:"14"}})],1)]),r("div",{staticClass:"ml-7 min-w-0 flex-grow flex flex-col pt-1"},[t.loading?[r("CSkeleton",{staticClass:"max-w-md text-gray-900 font-medium",class:t.titleSize,attrs:{width:"80%"}}),r("CSkeleton",{staticClass:"text-gray-600",class:t.textSize,attrs:{width:"40%"}}),r("CSkeleton",{staticClass:"text-center text-gray-500 text-xs inline-flex pt-0.5",class:t.dateSize,attrs:{hidden:""}})]:t._e(),r("div",{staticClass:"max-w-md font-medium",class:[t.isFuture?"text-gray-500":"text-gray-700",t.titleSize]},[t.template?r("DynamicLink",{attrs:{template:t.template}}):[t._v(t._s(t.title))]],2),t.content?r("div",{class:[t.isFuture?"text-gray-400":"text-gray-600",t.textSize]},[r("div",{domProps:{innerHTML:t._s(t.content)}})]):t._e(),r("div",{staticClass:"text-center text-gray-500 inline-flex pt-1",class:t.dateSize},[r("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.date,expression:"date"}]},[t._v(t._s(t.dayOfMonth)+" "+t._s(t.month))])])],2)])},Mft=[],Pft=he(Oft,Dft,Mft,!1,null,null,null,null);const Ift=Pft.exports,Rft={name:"DocumentTimeline",i18nOptions:{namespaces:"documentTimeline",messages:{sv:{clientName:"Kunden",byName:"Av {{- name}}",withBankId:"med BankID",propertyDesignation:"Begäran om fastighetsbeteckning",viewed:"Granskat",viewedContent:"{{- name}} har visat dokumentet",statusChangedAccepted:"Dokumentet har blivit signerat",statusChangedDenied:"Dokumentet har blivit nekat",requestChange:"Markerades manuellt som",mailOpened:"Mail visat",mailOpenedContent:"{{email}} visat",mailDropped:"E-post kunde inte skickas",smsDropped:"SMS kunde inte skickas",expired:"Dokumentet har förfallit",expiredContent:"Giltighetstiden har passerats",toEmail:"Till: {{email}}"},en:{clientName:"Client",byName:"By {{- name}}",withBankId:"with BankID",propertyDesignation:"Request for property designation",viewed:"Viewed",viewedContent:"{{- name}} has viewed the document",statusChangedAccepted:"The document has been signed",statusChangedDenied:"The document has been declined",requestChange:"Manually marked as",mailOpened:"Email opened",mailOpenedContent:"{{email}} viewed",mailDropped:"Could not send email",smsDropped:"Could not send SMS",expired:"Expired",expiredContent:"The expiration date has passed",toEmail:"To: {{email}}"}}},components:{EventItem:Ift},props:{document:{type:Object,required:!0},colors:{type:Object,default:()=>({})},size:{type:String,default:""}},computed:{...Ut({userById:"companyUsers/byId"}),events(){var i,a;const n=[this.formatEvent({code:"created",createdAt:(i=this.document)==null?void 0:i.createdAt})],{events:t,scheduledFirstDelivery:r}=this.document||{};if((r==null?void 0:r.status)==="active"){const o=r.deliveryTypes.join(` ${this.$t("_common:and")} `);n.push({title:this.$t("_common:scheduledDelivery"),content:`${this.$t("_common:via")} ${o}, ${this.$formatDate(r.sendAt)}`,isFuture:!0,icon:"calendar",color:((a=this.colors)==null?void 0:a.scheduledDelivery)||"primary"})}return t==null||t.forEach(o=>n.push(this.formatEvent(o))),n}},methods:{formatEvent({code:n,data:t,createdAt:r,children:i=[]}){var g;const{client:a={},clients:o,email:s,status:c,counter:l,sendSource:u,companyUserId:d}=t||{},p=l||i.length+1,f=a.name,h={created:()=>({title:this.$t("_common:created"),createdAt:r,icon:"folder",color:"primary"}),viewed:()=>({title:this.$t("viewed"),content:(f?this.$t("viewedContent",{name:f}):"")+(p?` ${this.$tc("_common:times",{count:p})}`:""),createdAt:r,icon:"eye",color:"primary"}),accepted:()=>{var b;const y={title:this.$t("_common:status.signed"),content:f?this.$t("byName",{name:f}):"",createdAt:r,icon:"check",color:"primary"};return y.content&&((b=a.answerMethod)==null?void 0:b.accept)==="bankId"&&(y.content+=` ${this.$t("withBankId")}`),y},denied:()=>({title:this.$t("_common:status.denied"),content:f?this.$t("byName",{name:f}):"",createdAt:r,icon:"x",color:"primary"}),sent:()=>{let y=this.$t("_common:sent");return["reminder","propertyDesignation"].includes(u)&&(y=this.$t("_common:sentThing",{thing:u==="reminder"?this.$t("_common:reminder"):this.$t("propertyDesignation")})),{title:y,content:o==null?void 0:o.map(b=>["email","cellphone"].filter(w=>!!b[w]).map(w=>b[w]).join(` ${this.$t("_common:and")} `)).reduce((b,w)=>b?`${b}<div>${w}</div>`:`${this.$t("_common:to")}: ${w}`.capitalize(),""),createdAt:r,icon:u==="reminder"?"bell":"send",color:"primary"}},statusChanged:()=>["accepted","denied"].includes(c)?{title:c==="accepted"?this.$t("statusChangedAccepted"):this.$t("statusChangedDenied"),createdAt:r,icon:c==="accepted"?"check":"x",color:c==="accepted"?"green":"red"}:null,requestChange:()=>{var b;const y=((b=this.userById(d))==null?void 0:b.fullName)||"";return{title:`${this.$t("requestChange")} ${this.$t(`_common:status.${c}`)}`,content:y&&this.$t("byName",{name:y}),createdAt:r,icon:"tool",color:"primary"}},mailDelivered:()=>({title:this.$t("_common:sentThing",{thing:this.$t("_common:email").capitalize()}),content:s?`${this.$t("_common:to")}: ${s}`.capitalize():"",createdAt:r,icon:"inbox",color:"primary"}),mailOpened:()=>({title:this.$t("mailOpened"),content:`${this.$t("mailOpenedContent",{email:s})} ${p?this.$tc("_common:times",{count:p}):""}`,createdAt:r,icon:"email",color:"primary"}),mailDropped:()=>({title:this.$t("mailDropped"),content:s?this.$t("toEmail",{email:s}):null,createdAt:r,icon:"alert-triangle",color:"orange"}),smsDropped:()=>({title:this.$t("smsDropped"),content:t?`${this.$t("_common:to")}: ${t}`.capitalize():"",createdAt:r,icon:"alert-triangle",color:"orange"}),expired:()=>({title:this.$t("expired"),content:this.$t("expiredContent"),createdAt:r,icon:"moon",color:"gray"})},m=(g=this.colors)==null?void 0:g[n];return{...h[n](),...m&&{color:m}}}}};var Lft=function(){var t=this,r=t._self._c;return r("div",[t._t("header"),t._l(t.events,function(i,a){return r("EventItem",{key:a,attrs:{title:i.title,content:i.content,createdAt:i.createdAt,icon:i.icon,color:i.color,"is-future":i.isFuture,size:t.size}})})],2)},Fft=[],Nft=he(Rft,Lft,Fft,!1,null,null,null,null);const Bft=Nft.exports,jft={name:"DocTimeline",components:{StatusBadge:Sft,DocumentTimeline:Bft},props:{document:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},viewType:{type:String,default:"modal"}}};var zft=function(){var t=this,r=t._self._c;return r("div",{class:{"p-8":t.viewType!=="mount"}},[r("DocumentTimeline",{attrs:{document:t.document,size:"large"}},[t.showHeader?r("div",{staticClass:"border-b mb-4 pb-4",attrs:{slot:"header"},slot:"header"},[r("div",{staticClass:"mb-2"},[r("div",{staticClass:"text-xs text-gray-600",domProps:{textContent:t._s(t.$t("_common:document").capitalize())}}),r("div",{staticClass:"font-semibold text-lg"},[t._v(t._s(t.document.name))])]),r("div",{staticClass:"inline-flex items-center -ml-2"},[r("div",{staticClass:"text-xs text-gray-600 mr-1.5 py-1 pl-2",domProps:{textContent:t._s(t.$t("_common:status.status"))}}),r("StatusBadge",{attrs:{status:t.document.status}})],1)]):t._e()])],1)},Vft=[],Uft=he(jft,zft,Vft,!1,null,null,null,null);const Hft=Uft.exports,Wft=Object.freeze(Object.defineProperty({__proto__:null,default:Hft},Symbol.toStringTag,{value:"Module"})),Gft={name:"DocumentReceipt",i18nOptions:{namespaces:"documentReceipt",messages:{sv:{title:"Verifikat på signering",waitingForSign:"Väntar på signatur",signMethod:"Signeringsmetod",remaining:"{{count}} st signaturer kvarstår innan dokumentet är helt signerat.",confirmChangeMessage:"Vill du verkligen byta signeringsmetod för {{- name}}?",bankIdHint:"Identifiering och signering säkerställd med BankID."},en:{title:"Signature verification",waitingForSign:"Waiting for signature",signMethod:"Sign method",remaining:"{{count}} signatures are remaining before the document is completely signed.",confirmChangeMessage:"Do you really want to change sign method for {{- name}}?",bankIdHint:"Identity and signature confirmed with BankID"}}},props:{document:{type:Object,required:!0},allowSignMethodUpdate:{type:Boolean,default:!0}},computed:{...Ut({feature:"application/feature"}),signees(){const{senderClient:n,clients:t}=this.document;return[...n?[n]:[],...(t||[]).map((i,a)=>({...i,index:a}))].filter(i=>{var a;return["signee","approver"].includes(i.documentRole)||((a=i.answer)==null?void 0:a.didAccept)}).map(({name:i="",companyName:a,email:o,socialNo:s=null,answerMethod:c,answer:l,documentRole:u,index:d})=>({name:i||a||o,socialNo:s,method:(c==null?void 0:c.accept)||"",documentRole:u,...l,index:d}))},waitingFor(){return this.document.recipients.reduce((n,t)=>{var r;return t.answer||!["signee","approver"].includes(t.documentRole)||((r=t.answerMethod)==null?void 0:r.accept)==="inPerson"?n:[...n,t]},[])},documentName(){return this.document.name||""},sentByName(){var n,t;return((t=(n=this.document.sender)==null?void 0:n.user)==null?void 0:t.name)||""}},methods:{...xn({showMessage:He.SHOW_MESSAGE,updateDocument:He.UPDATE_DOCUMENT2}),getIconType(n){return n==="signee"?"pen-tool":n==="recipient"?"eye":n==="approver"?"check":"shield"},getBrowserString({browser:n,os:t,device:r}){return[n==null?void 0:n.name,t==null?void 0:t.name,r==null?void 0:r.model].filter(i=>!!i).join(", ")},onUpdate(n,t){this.showMessage({displayType:"dialog",type:"secondary",title:this.$t("_common:change",{thing:this.$t("_common:signMethod.title").toLowerCase()}),message:this.$t("confirmChangeMessage",{name:n.name}),actions:{cancel:{text:this.$t("_common:cancel"),callback:"cancel"},submit:{text:this.$t("actions:updateDocumentDialog.submit"),callback:()=>this.updateSignMethod(n.index,t)}}})},async updateSignMethod(n,t){const{id:r}=this.document||{},i={[`clients.${n}.answerMethod.accept`]:t};await this.updateDocument({id:r,body:i,params:{type:"paths"}})}}};var qft=function(){var t=this,r=t._self._c;return r("div",{staticClass:"rounded-lg text-gray-600 pt-4 px-1 pb-1 bg-gray-100 border border-gray-200"},[r("div",{staticClass:"mb-1 relative leading-5"},[r("div",{staticClass:"pl-4 pb-1"},[r("div",{staticClass:"font-medium text-black"},[t._v(t._s(t.$t("title")))]),r("div",{staticClass:"data-label"},[t._v(t._s(t.documentName))]),r("div",{staticClass:"grid grid-cols-3 gap-2 pb-1 pt-4",staticStyle:{"grid-template-columns":"repeat(auto-fit, minmax(200px, 1fr))"}},[t._l([[t.$t("_common:sentByName"),t.sentByName],[t.$t("_components:status.sent"),t.$formatDate(t.document.sentAt,"Pp")],[t.$t("_components:replyBy"),t.document.status==="sent"&&t.$formatDate(t.document.expiresAt)],[t.$t("_components:status.accepted"),t.$formatDate(t.document.acceptedAt,"Pp")]],function([i,a],o){return[a?r("div",{key:o},[r("div",{staticClass:"text-gray-900 text-xs",domProps:{textContent:t._s(i)}}),r("div",{staticClass:"text-gray-600 mr-1.5",domProps:{textContent:t._s(a)}})]):t._e()]})],2)]),t.waitingFor.length?r("div",{staticClass:"mt-2 inline-flex items-center text-xs font-medium bg-orange-50 border border-orange-200/90 px-1 py-0.5 rounded-full ml-3 text-black/80"},[r("BaseIcon",{staticClass:"text-orange-500/80",attrs:{type:"info",size:"14"}}),r("div",{staticClass:"px-1.5"},[t._v(" "+t._s(t.$t("remaining",{count:t.waitingFor.length}))+" ")])],1):t._e(),r("BaseIcon",{staticClass:"absolute top-1 right-5 text-gray-500",attrs:{type:"lock",size:"18"}})],1),r("div",{staticClass:"flex flex-col gap-2 p-2"},t._l(t.signees,function(i,a){var o,s;return r("div",{key:a,staticClass:"bg-white relative text-gray-700 border border-gray-200 rounded-md"},[r("div",{staticClass:"px-4 py-3"},[i.didAccept&&i.method==="bankId"?r("BaseIcon",{staticClass:"absolute top-3 right-4",attrs:{type:"bankIdColor",size:"22"}}):i.didAccept?r("BaseIcon",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t(`_common:documentRole.${i.documentRole}.label`),expression:"$t(`_common:documentRole.${signee.documentRole}.label`)"}],staticClass:"lock-icon absolute right-6 top-4 opacity-70",attrs:{size:18,type:t.getIconType(i.documentRole)}}):t._e(),i.didAccept===!1?r("div",{staticClass:"absolute right-3 top-3 bg-red-200 border border-red-400/50 rounded-full text-xs py-0.5 px-2 inline-flex font-medium text-red-700"},[t._v(" "+t._s(t.$t("_common:denied").capitalize())+" ")]):!i.didAccept&&i.method!=="inPerson"?r("div",{staticClass:"absolute right-3 top-3 bg-orange-50 border border-orange-200/70 rounded-full text-xs py-0.5 px-2 inline-flex font-medium text-black/80"},[t._v(" "+t._s(t.$t("waitingForSign"))+" ")]):t._e(),r("div",{staticClass:"font-medium text-[15px] text-black pb-1"},[t._v(" "+t._s(((o=i.response)==null?void 0:o.name)||i.name)+" ")]),r("div",{staticClass:"grid grid-cols-3 gap-2 py-1",staticStyle:{"grid-template-columns":"repeat(auto-fit, minmax(190px, 1fr))"}},[t._l([[t.$t("_common:socialNo").capitalize(),i.socialNo],[t.$t("signMethod"),t.$t(`_common:signMethod.${i.method}`),"signMethod"],[`${t.$t("_common:date").capitalize()} & ${t.$t("_common:time.time")}`,t.$formatDate(i.didAnswerAt,"Pp")],["IP-"+t.$t("_common:address"),i.ip],[`${t.$t("_common:browser")}, OS & ${t.$t("_common:device")}`,t.getBrowserString(i)]],function([c,l,u],d){return[l?r("div",{key:d,staticClass:"text-[13px]"},[r("div",{staticClass:"text-gray-900",domProps:{textContent:t._s(c)}}),r("div",{staticClass:"flex items-center"},[r("div",{staticClass:"text-gray-500 mr-1.5",domProps:{textContent:t._s(l)}}),u==="signMethod"&&i.method&&t.allowSignMethodUpdate&&t.document.status!=="accepted"&&i.didAccept===void 0?r("CDropdown",{attrs:{"append-to-body":!0,"menu-styling":{width:"180px"}}},[r("div",{staticClass:"underline text-primary-500 font-medium text-xs",attrs:{slot:"trigger"},domProps:{textContent:t._s(t.$t("_common:change"))},slot:"trigger"}),t._l([...t.feature("bankId")?["bankId"]:[],"signature","inPerson"],function(p){return r("CDropdownItem",{key:p,attrs:{"icon-right":i.method===p?"check":""},on:{click:function(f){i.method!==p&&t.onUpdate(i,p)}}},[t._v(" "+t._s(t.$t(`_common:signMethod.${p}`))+" ")])})],2):t._e()],1)]):t._e()]})],2)],1),i.signatureDataURL?r("div",{staticClass:"h-20 mx-4 py-6 border-t border-gray-100"},[r("img",{staticClass:"h-full",attrs:{src:i.signatureDataURL}})]):i.didAccept&&i.method==="bankId"?r("div",{staticClass:"bg-gray-300 mx-4 mb-4 text-white/90 flex items-center p-1.5 rounded-md",staticStyle:{border:"1px solid #35677e"},style:"background: linear-gradient(45deg,hsl(200deg 35% 17%),hsl(199deg 25% 30%));"},[r("div",{staticClass:"rounded-md w-9 h-9 flex items-center justify-center mr-2 ml-0.5 bg-[#183e4f] border border-[#275369]"},[r("BaseIcon",{attrs:{type:"bankId",size:"22"}})],1),r("div",[r("div",{staticClass:"text-xs font-medium",domProps:{textContent:t._s(t.$t("bankIdHint"))}}),r("div",{staticClass:"text-xs opacity-70"},[t._v(" "+t._s(((s=i.response)==null?void 0:s.name)||i.name)+" · "+t._s(i.socialNo)+" ")])])]):t._e()])}),0)])},Yft=[],Kft=he(Gft,qft,Yft,!1,null,null,null,null);const Zft={name:"DocReceipt",components:{DocumentReceipt:Kft.exports},props:{document:{type:Object,required:!0}}};var Jft=function(){var t=this,r=t._self._c;return r("div",[r("DocumentReceipt",{attrs:{document:t.document,"allow-sign-method-update":!1}})],1)},Xft=[],Qft=he(Zft,Jft,Xft,!1,null,null,null,null);const eht=Qft.exports,tht=Object.freeze(Object.defineProperty({__proto__:null,default:eht},Symbol.toStringTag,{value:"Module"})),nht={name:"DocLinks",components:{ClientLinks:wY},props:{document:{type:Object,required:!0},closeFunc:{type:Function,default:null}},methods:{close(){this.closeFunc&&this.closeFunc()}}};var rht=function(){var t=this,r=t._self._c;return r("div",{staticClass:"h-full w-full overflow-auto"},[r("ClientLinks",{attrs:{id:t.document.id},on:{close:t.close}})],1)},iht=[],aht=he(nht,rht,iht,!1,null,null,null,null);const oht=aht.exports,sht=Object.freeze(Object.defineProperty({__proto__:null,default:oht},Symbol.toStringTag,{value:"Module"})),RY=({documentKey:n="document"}={})=>({mixins:[br],inject:{formValidation:{default:null}},methods:{isValid(){const{isFormValid:t,scrollToInvalidInput:r}=this.formValidation||this;return!t||!r||t()?!0:r({offset:120})},isAnswerModalOpen(){const t=this.$modal.getOpenInstances();return t&&t.length&&t.some(r=>{var i;return((i=r.modalAttrs)==null?void 0:i.name)==="AnswerModal"})},onAnswer(t="accept",r={}){if(this.isAnswerModalOpen())return;const i=Ce(this,n);if(!i)return;const a=t==="decline"?!0:this.isValid();if(!i.isPreview&&!a)return;const o=this.mq==="sm"?"100%":"auto",s=()=>Promise.resolve().then(()=>Mdt);this.$modal.show(s,{mode:t,_document:i,fullScreen:o==="100%",calcHeight:!!r.calcHeight},{name:"AnswerModal",adaptive:!0,height:"auto",width:"90%",maxWidth:420,classes:"overflow-visible",transition:"modal-soft",clickToClose:!1})}}}),lht=n=>{var t;return(t=window==null?void 0:window.parent)==null?void 0:t.postMessage(n,"*")},LY=n=>typeof n=="object"&&"event"in n;class cht{constructor(){this.observers={},this.registered=!0,window.addEventListener("message",this._onMessage.bind(this))}_onMessage(t){if(t.source===window.parent&&LY(t==null?void 0:t.data)){const{event:r,data:i}=t.data;this.observers[r]&&this.observers[r].forEach(a=>a(i))}}on(t,r){this.registered||window.addEventListener("message",this._onMessage.bind(this)),this.observers[t]=this.observers[t]||[],this.observers[t].push(r)}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(i=>i!==r)}}emit(t){if(!LY(t))throw new Error("Invalid message, must be an object including an event property");lht(t)}destroy(){window.removeEventListener("message",this._onMessage.bind(this)),this.registered=!1}}const FY=new cht,uht={name:"DocumentVoided",props:{document:{type:Object,required:!0}}};var dht=function(){var t=this,r=t._self._c;return r("div",{staticClass:"grid h-full text-center place-items-center"},[r("div",{staticClass:"py-12"},[r("BaseIcon",{staticClass:"mb-2 text-primary-500",attrs:{type:"info"}}),r("div",{staticClass:"text-lg font-medium",domProps:{textContent:t._s(t.document.$t("documentVoided.title"))}}),r("div",{staticClass:"text-gray-700",domProps:{textContent:t._s(t.document.$t("documentVoided.description"))}})],1)])},pht=[],fht=he(uht,dht,pht,!1,null,null,null,null);const NY=fht.exports,BY=Ne.observable({canEdit:!1,isForm:!1,setFormValue:null}),hht={props:{document:{type:Object,required:!0},setFormValue:{type:Function,required:!0}},components:{DocumentLayout:k8,DocumentVoided:NY},mixins:[uq,RY()],provide:()=>({viewSettings:BY}),created(){this.setFormValue&&(BY.setFormValue=this.setFormValue),FY.on("answer",this.onAnswerMessage)},beforeDestroy(){FY.off("answer",this.onAnswerMessage)},methods:{onAnswerMessage(n){this.onAnswer(n==null?void 0:n.mode)}}};var mht=function(){var i;var t=this,r=t._self._c;return r("div",[t._t("default"),((i=t.document)==null?void 0:i.status)==="voided"?r("DocumentVoided",{attrs:{document:t.document}}):r("DocumentLayout",{attrs:{document:t.document}})],2)},ght=[],vht=he(hht,mht,ght,!1,null,null,null,null);const yht={name:"DocumentClient",components:{ClientView:vht.exports},props:{document:{type:Object,required:!0},setFormValue:{type:Function,required:!0}}};var bht=function(){var t=this,r=t._self._c;return r("ClientView",{attrs:{document:t.document,"set-form-value":t.setFormValue}})},_ht=[],wht=he(yht,bht,_ht,!1,null,null,null,null);const xht=wht.exports,Cht=Object.freeze(Object.defineProperty({__proto__:null,default:xht},Symbol.toStringTag,{value:"Module"})),kht={name:"Setup",props:{partnerName:{type:String,default:"Partner"},closeFunc:{type:Function,default:()=>{}}},computed:{baseAppUrl(){return Xe.baseUrl},iframeUrl(){return`${this.baseAppUrl}/partner/connect?partnerName=${this.partnerName}`}},created(){window.addEventListener("message",this.onReceiveMessage)},beforeDestroy(){window.removeEventListener("message",this.onReceiveMessage)},methods:{onReceiveMessage({data:n,origin:t,source:r}){var i;t===this.baseAppUrl&&((n==null?void 0:n.type)==="channelPartnerConnect"&&(r==null||r.postMessage({type:"readyForPartnerConnect"},t)),(n==null?void 0:n.type)==="partnerUserConnect"&&(Tr.trigger("account:userConnect",n==null?void 0:n.value),(i=this.closeFunc)==null||i.call(this)))}}};var Sht=function(){var t=this,r=t._self._c;return r("iframe",{staticClass:"w-full h-full",attrs:{title:"Partner Connect",src:t.iframeUrl,frameborder:"0"}})},Tht=[],Eht=he(kht,Sht,Tht,!1,null,null,null,null);const $ht=Eht.exports,Aht=Object.freeze(Object.defineProperty({__proto__:null,default:$ht},Symbol.toStringTag,{value:"Module"})),Oht={components:{AnswerModal:q7},props:{document:{type:Object,required:!0},answerType:{type:String,required:!0},closeFunc:{type:Function,default:null}}};var Dht=function(){var t=this,r=t._self._c;return r("AnswerModal",{attrs:{mode:t.answerType,_document:t.document},on:{close:t.closeFunc}})},Mht=[],Pht=he(Oht,Dht,Mht,!1,null,null,null,null);const Iht=Pht.exports,Rht=Object.freeze(Object.defineProperty({__proto__:null,default:Iht},Symbol.toStringTag,{value:"Module"}));var Lht=he({name:"PublicDocumentEvents",props:{document:{type:Object,default:()=>({})}},computed:{events(){const n=[],{acceptedAt:t}=this.document;return this.document.events.filter(({createdAt:r})=>t?L4(t,r):!0).forEach(r=>{const{code:i,createdAt:a,children:o=[]}=r;let{data:s={}}=r;s===null&&(s={});const{client:c={},clients:l=[],status:u,counter:d}=s,p={sent:()=>l.map(f=>{const h=this.getClientName(f.id),m=this.filteredOxfordComma([f.email,f.cellphone]);return{text:this.document.$t("event.sent",{to:`${h?h+", ":""}${m}`}),time:a}}),viewed:()=>{const f=d||o.length+1;return[{text:`${this.document.$t(`event.${c.name?"viewedName":"viewed"}`,{name:c.name})} ${f?this.document.$tc("times",{count:f}):""}.`,time:a}]},accepted:()=>[{text:this.document.$t("event.accepted",{by:c.name||c.email||c.cellphone}),time:a}],denied:()=>[{text:this.document.$t("event.denied",{by:c.name||c.email||c.cellphone}),time:a}],statusChanged:()=>[{text:this.document.$t("event.statusChanged",{status:this.document.$t(`status.${u}`).toLowerCase()}),time:a}],requestChange:()=>[{text:this.document.$t("event.requestChange",{status:this.document.$t(`status.${u}`).toLowerCase()}),time:a}],expired:()=>[{text:this.document.$t("event.expired"),time:a}]};p[i]&&n.push(...p[i]())}),n}},methods:{filteredOxfordComma(n=[]){const t=n.filter(i=>!!i),r=t.length;return r?r<2?t[0]:`${t.slice(0,-1).join(", ")} ${this.document.$t("and")} ${t.slice(-1)}`:""},getClientName(n){const t=this.document.clients.find(({id:r})=>r===n);return t?t.name:""}},render(){return this.$scopedSlots.default({events:this.events})}},null,null,!1,null,null,null,null);const Fht=Lht.exports;var Nht=he({name:"CPhoneFormat",props:{phone:{type:String,required:!1,default:""},region:{type:String,required:!1,default:null}},data(){return{formattedPhone:""}},watch:{phone:{immediate:!0,async handler(){this.doFormatPhone()}}},methods:{async doFormatPhone(){if(!this.phone){this.formattedPhone="";return}const n=await dM(this.phone,{defaultRegion:this.region});if(!n){this.formattedPhone=this.phone;return}this.formattedPhone=n.national}},render(){return this.$scopedSlots.default?this.$scopedSlots.default({formattedValue:this.formattedPhone}):Cte("span",[this.formattedPhone])}},null,null,!1,null,null,null,null);const jY=Nht.exports,tDt="",nDt="",Bht={name:"PublicRecipientItem",i18nOptions:{namespaces:"components",keyPrefix:"document.myPagesDrawer"},components:{CPhoneFormat:jY},props:{recipient:{type:Object,required:!0}},methods:{get:Ce,getBrowserString({browser:n,os:t,device:r}){return[n&&n.name,t&&t.name,r&&r.model].filter(i=>!!i).join(", ")}}};var jht=function(){var t=this,r=t._self._c;return r("div",{staticStyle:{border:"1px solid hsl(0, 0%, 84%)","border-radius":"3px","margin-bottom":"1em"}},[r("div",{staticStyle:{padding:"0.5em 0.75em"}},[t._l([t.recipient.name,t.recipient.companyName,t.recipient.orgNo],function(i,a){return r("span",{key:`${i}-${a}`,style:a===0?{fontWeight:500}:{opacity:.65}},[t._v(" "+t._s(i&&a>0?"·":"")+" "+t._s(i)+" ")])}),r("div",{staticClass:"flex flex-col w-full",staticStyle:{"font-size":"14px","align-items":"baseline"}},[t.recipient.email?r("a",{attrs:{href:`mailto:${t.recipient.email}`,target:"_blank"}},[t._v(" "+t._s(t.recipient.email)+" ")]):t._e(),t.recipient.cellphone?r("CPhoneFormat",{attrs:{phone:t.recipient.cellphone,region:t.recipient.cellphoneRegion},scopedSlots:t._u([{key:"default",fn:function({formattedValue:i}){return r("a",{attrs:{href:`tel:${t.recipient.cellphone}`}},[t._v(" "+t._s(i)+" ")])}}],null,!1,2469850174)}):t._e()],1)],2),r("div",{staticStyle:{"background-color":"hsl(0, 0%, 94%)",padding:"0.75em 0.75em","font-weight":"500","font-size":"13px","line-height":"1",color:"hsl(0, 0%, 40%)",position:"relative"}},[r("div",[t._v(" "+t._s(t.$t(`_common:documentRole.${t.recipient.documentRole}.label`))+" ")]),r("div",{staticStyle:{position:"absolute",right:"1em",top:"0px",transform:"translate(0, -50%)"}},[r("v-popover",{attrs:{"popover-inner-class":"signee-popover",trigger:"hover",placement:"bottom-end"}},[t.recipient.documentRole==="signee"?r("div",{staticStyle:{padding:"5px 0.75em",background:"hsl(0, 0%, 60%)","border-radius":"4px","font-size":"13px",color:"hsl(0, 0%, 100%)",cursor:"default",display:"inline-flex","align-items":"center"}},[r("BaseIcon",{staticStyle:{"margin-right":"0.5ch"},attrs:{size:15,type:"info","stroke-width":"2"}}),t.recipient.answer&&t.recipient.answer.didAccept?[t._v(" "+t._s(t.$t("_common:approved").capitalize())+" ")]:t.recipient.answer?[t._v(" "+t._s(t.$t("_common:denied").capitalize())+" ")]:[t._v(" "+t._s(t.$t("views:publicDocument.pdfVerification.waitingForAnswer"))+" ")]],2):t._e(),r("div",{staticStyle:{padding:"0"},attrs:{slot:"popover"},slot:"popover"},[r("div",{staticStyle:{padding:"1em 1.5em"}},[t.recipient.answer&&t.recipient.answer.didAccept?[t.recipient.answer.signatureDataURL?r("div",{staticStyle:{"padding-bottom":"0.5em"}},[r("div",{staticClass:"has-text-grey",staticStyle:{"padding-bottom":"1em"}},[t._v(" "+t._s(t.$t("_common:signature").capitalize())+" ")]),r("img",{staticStyle:{width:"80%"},attrs:{src:t.recipient.answer.signatureDataURL}})]):r("div",{staticStyle:{"font-size":"13px","padding-top":"3px"}},[t.get(t.recipient,"answerMethod.accept")==="bankId"?[r("div",{staticStyle:{"font-weight":"500"}},[t._v(" "+t._s(t.$t("views:publicDocument.pdfVerification.recipient.signedBankId"))+" ")]),r("div",[t._v(t._s(t.recipient.answer.response.name))]),r("div",[t._v(t._s(t.recipient.socialNo))])]:t.get(t.recipient,"answerMethod.accept")==="login"?r("div",{staticStyle:{"font-weight":"500"}},[t._v(" "+t._s(t.$t("views:publicDocument.pdfVerification.recipient.verifiedLogin"))+" ")]):t._e()],2)]:t.recipient.answer?r("div",[t._v(" "+t._s(t.$t("_common:denied").capitalize())+" ")]):r("div",[t._v(" "+t._s(t.$t("pendingAnswer"))+" ")])],2),t.recipient.answer?r("div",{staticStyle:{padding:"8px 1.5em","border-top":"1px solid hsl(0deg 0% 88%)","background-color":"hsl(0deg 0% 95%)","font-size":"13px",color:"hsl(0, 0%, 35%)","font-weight":"500"}},[t.recipient.answer.didAnswerAt?r("div",[r("div",[t._v(" "+t._s(t.$t("_common:date").capitalize())+": "+t._s(t.$formatDate(t.recipient.answer.didAnswerAt,"P"))+" ")]),r("div",[t._v(" "+t._s(t.$t("_common:time.time").capitalize())+": "+t._s(t.$formatDate(t.recipient.answer.didAnswerAt,"p"))+" ")])]):t._e(),t.recipient.answer.ip?r("div",[t._v(" IP: "+t._s(t.recipient.answer.ip)+" ")]):t._e(),t.recipient.answer.browser?r("div",[t._v(" Browser: "+t._s(t.getBrowserString(t.recipient.answer))+" ")]):t._e()]):t._e()])])],1)])])},zht=[],Vht=he(Bht,jht,zht,!1,null,"7bf07f05",null,null);const Uht=Vht.exports,rDt="",Hht={name:"DocumentDetails",mixins:[br],components:{PublicDocumentEvents:Fht,PublicRecipientItem:Uht,CDropdown:Of,CDropdownItem:nd},props:{document:{type:Object,required:!0},openPrintFunc:{type:Function,default:null}},data(){return{docLanguages:fM,nativeTranslations:ove}},computed:{viewer(){return this.document.viewer}},methods:{changeLanguage(n){this.document.language=n,this.$root.$i18n.i18next.changeLanguage(XA.includes(n)?n:"en")}}};var Wht=function(){var t=this,r=t._self._c;return r("div",{staticStyle:{width:"100%",height:"100%",display:"flex","flex-direction":"column","font-size":"16px",background:"hsl(0, 0%, 100%)","border-radius":"10px",overflow:"hidden","box-shadow":"0 10px 20px rgba(0, 0, 0, 0.2)",position:"relative"}},[r("div",{staticClass:"flex w-full justify-end items-center",staticStyle:{position:"absolute",top:"20px",right:"20px","z-index":"2"}},[t.openPrintFunc?[r("CButton",{staticStyle:{"padding-left":"1em","padding-right":"1em"},attrs:{"icon-left":"print",type:"none",pattern:"tertiary",taller:"",size:"small"},on:{click:t.openPrintFunc}},[t._v(" "+t._s(t.document.$t("download",{thing:"PDF"}))+" ")]),r("div",{staticStyle:{height:"2rem",width:"1px","background-color":"hsl(0, 0%, 88%)",margin:"0 6px"}})]:t._e(),r("CDropdown",{attrs:{value:t.document.language}},[r("CButton",{staticStyle:{color:"hsla(0, 0%, 45%, 1)"},attrs:{slot:"trigger","icon-props":{size:18},size:"normal",icon:"globe",circle:""},slot:"trigger"}),t._l(t.docLanguages,function(i){return r("CDropdownItem",{key:i,attrs:{value:i},on:{click:function(a){return t.changeLanguage(i)}}},[t._v(" "+t._s(t.nativeTranslations[i])+" ")])})],2),r("CButton",{staticStyle:{"margin-left":"6px",color:"hsla(0, 0%, 45%, 1)"},attrs:{"icon-props":{size:18},size:"normal",icon:"x",circle:""},on:{click:function(i){return t.$emit("close")}}})],2),r("div",{staticClass:"d-root"},[r("div",{staticClass:"flex justify-between",staticStyle:{"margin-bottom":"3em"}},[r("div",[r("div",{staticStyle:{"font-size":"18px","font-weight":"600"}},[t._v(" "+t._s(t.document.$t("detail_plural").capitalize())+" ")]),r("div",{staticClass:"has-text-grey",staticStyle:{"font-size":"14px"}},[t._v(" "+t._s(t.document.$t("documentDetails.subTitle"))+" ")])])]),r("div",{staticClass:"d-option",staticStyle:{"margin-bottom":"3em"}},[r("div",{staticClass:"d-option-title",staticStyle:{"padding-bottom":"0.5rem"}},[t._v(" "+t._s(t.document.$t("participant_plural").capitalize())+" ")]),t._l(t.document.recipients,function(i,a){return r("PublicRecipientItem",{key:i._uniqueId+a,attrs:{recipient:i}})})],2),r("PublicDocumentEvents",{attrs:{document:t.document},scopedSlots:t._u([{key:"default",fn:function({events:i}){return[i&&i.length?r("div",{staticClass:"d-option"},[r("div",{staticClass:"d-option-title"},[t._v(" "+t._s(t.document.$t("event.event_plural").capitalize())+" ")]),r("div",{attrs:{id:"timeline"}},[r("div",t._l(i,function(a,o){return r("div",{key:o,staticClass:"e-item"},[r("div",{staticClass:"e-data"},[r("div",{staticClass:"e-text"},[t._v(t._s(a.text))]),r("div",{staticClass:"e-timestamp"},[r("div",{staticClass:"e-date"},[t._v(t._s(t.$formatDate(a.time,"P")))]),r("div",{staticClass:"e-time",staticStyle:{"padding-left":"0.5ch"}},[t._v(" "+t._s(t.$formatDate(a.time,"p"))+" ")])])])])}),0)])]):t._e()]}}])}),t.mq==="sm"?r("div",[t._t("footer")],2):t._e()],1),t.mq!=="sm"?r("div",[t._t("footer")],2):t._e()])},Ght=[],qht=he(Hht,Wht,Ght,!1,null,"0d868038",null,null);const Yht=qht.exports,iDt="",Kht={components:{DocumentDetails:Yht,DocumentVoided:NY},props:{document:{type:Object,required:!0},closeFunc:{type:Function,default:null}}};var Zht=function(){var t=this,r=t._self._c;return t.document&&t.document.status==="voided"?r("DocumentVoided",{attrs:{document:t.document}}):r("DocumentDetails",{attrs:{document:t.document},on:{close:t.closeFunc}})},Jht=[],Xht=he(Kht,Zht,Jht,!1,null,"d3b68450",null,null);const Qht=Xht.exports,emt=Object.freeze(Object.defineProperty({__proto__:null,default:Qht},Symbol.toStringTag,{value:"Module"})),aDt="",tmt={name:"DocModalBase",components:{},props:{showClose:{type:Boolean,default:!1}}};var nmt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"doc-modal-base"},[t.showClose?r("CButton",{staticClass:"absolute text-gray-500 top-4 right-4",attrs:{circle:"",icon:"x"},on:{click:function(i){return t.$parent.$emit("close")}}}):t._e(),t._t("default")],2)},rmt=[],imt=he(tmt,nmt,rmt,!1,null,"b672a873",null,null);const zY=imt.exports,amt={i18nOptions:{namespaces:"components",keyPrefix:"document.propertyDesignationModal"},mixins:[br],components:{DocModalBase:zY},props:{senderName:{type:String,required:!0},propertyDesignation:{type:Object,default:null},fullScreen:{type:Boolean,default:!1}},data(){return{cornerRadius:0,spacing:0,view:"start",form:"",realEstateId:"",condominiumId:null,condominiumOrgNo:null}},validations:{condominiumId:{required:ln.requiredIf(n=>n.form==="condominium"),minLength:ln.minLength(4),maxLength:ln.maxLength(4)},condominiumOrgNo:{required:ln.requiredIf(n=>n.form==="condominium")},realEstateId:{required:ln.requiredIf(n=>n.form==="realEstate")}},computed:{messages(){const n=t=>this.$t(`validations.${t}`);return{condominiumId:{required:n("condominiumId.required"),minLength:n("condominiumId.minLength"),maxLength:n("condominiumId.maxLength")},condominiumOrgNo:{required:n("condominiumOrgNo.required")},realEstateId:{required:n("realEstateId.required")}}}},created(){if(this.propertyDesignation){const{propertyType:n="",propertyId:t="",condominiumOrgNo:r=null}=this.propertyDesignation;this.form=n,n==="realEstate"?this.realEstateId=t:this.condominiumId=t,this.condominiumOrgNo=r}},mounted(){this.spacing=window.getComputedStyle(this.$refs.root.$el).paddingTop,this.cornerRadius=window.getComputedStyle(this.$refs.root.$el).borderRadius},methods:{...xn({putCurrentDoc:He.PUT_CURRENT_PUBLIC_DOCUMENT,reloadCurrentDocument:He.RELOAD_CURRENT_DOCUMENT}),async updateClientPropertyDesignation(){if(this.$v.$touch(),this.$v.$invalid)return;const n={propertyType:this.form,propertyId:this.form==="realEstate"?this.realEstateId:this.condominiumId,...this.form==="condominium"&&{condominiumOrgNo:this.condominiumOrgNo}};try{const t="clients[0].region.propertyDesignation";await this.putCurrentDoc({body:{[t]:n}}),this.reloadCurrentDocument(),this.view="complete"}catch(t){Rr(t)}}}};var omt=function(){var t=this,r=t._self._c;return r("doc-modal-base",{ref:"root",class:[{"full-screen":t.mq==="sm"}]},[t.fullScreen?r("CButton",{staticClass:"absolute z-50 top-4 right-4",attrs:{icon:"x",circle:""},on:{click:function(i){return t.$emit("close")}}}):t._e(),r("div",[t.view!=="complete"?r("div",{staticClass:"relative pb-8 mb-8 text-center border-b border-gray-100 negate-padding bg-gray-50",style:{paddingTop:t.spacing,marginTop:`-${t.spacing}`,borderRadius:`${t.cornerRadius} ${t.cornerRadius} 0 0`}},[t.view==="start"?r("div",{key:1},[r("div",{staticClass:"mb-2 text-lg font-semibold"},[t._v(t._s(t.$t("title")))]),r("div",{staticClass:"text-gray-700"},[t._v(" "+t._s(t.$t("subTitle",{senderName:t.senderName}))+" ")])]):t._e(),t.view==="form"?r("div",{key:2},[r("CButton",{staticClass:"absolute top-4 left-4",attrs:{circle:"",icon:"arrow-left"},on:{click:function(i){t.view="start"}}}),r("div",{staticClass:"mb-2 text-lg font-semibold"},[t._v(t._s(t.$t("howToFind")))]),r("div",{staticClass:"text-gray-700"},[t._v(" "+t._s(t.$t("goto1"))+" "),r("a",{staticStyle:{"text-decoration":"underline"},attrs:{href:"https://www.lantmateriet.se/",target:"_blank",rel:"noopener"}},[t._v(" "+t._s(t.$t("goto2"))+" ")]),t._v(" "+t._s(t.$t("goto3"))+" ")])],1):t._e()]):t._e(),t.view==="start"?r("div",{key:1,staticClass:"mb-12 text-center"},[r("div",{staticClass:"mb-4 text-base font-medium"},[t._v(t._s(t.$t("whereTitle")))]),r("div",{staticClass:"flex justify-center"},[r("div",{staticClass:"mx-4"},[r("div",{staticClass:"flex items-center justify-center w-24 h-24 mb-2 border border-gray-300 cursor-pointer bg-gray-50 rounded-xl hover:bg-gray-100 active:bg-gray-200",on:{click:function(i){t.view="form",t.form="realEstate"}}},[r("svg",{staticClass:"text-gray-400",attrs:{width:"59",height:"41",viewBox:"0 0 59 59",xmlns:"http://www.w3.org/2000/svg"}},[r("g",{attrs:{fill:"currentColor","fill-rule":"evenodd"}},[r("path",{attrs:{d:"M6 28h47v29H6V28zm6 7.998101V40.0019C12 41.113294 12.89458 42 13.998101 42H18.0019C19.113294 42 20 41.10542 20 40.001899V35.9981C20 34.886706 19.10542 34 18.001899 34H13.9981C12.886706 34 12 34.89458 12 35.998101zm22-.007306V54h11V35.990795C45 34.898212 44.108144 34 43.007983 34h-7.015966C34.900177 34 34 34.89131 34 35.990795zM27.189354 1.837583C28.46549.536998 30.53366.53613 31.813677 1.840673L56.5 27h-54l9.85551-10.044348V7.141778h6.733007v2.95186l8.100837-8.256055zM25.5 15.861211v4.003797c0 1.111395.89458 1.998102 1.998101 1.998102H31.5019c1.111395 0 1.998101-.89458 1.998101-1.998102v-4.003797c0-1.111395-.89458-1.998101-1.998101-1.998101H27.4981c-1.111395 0-1.998101.89458-1.998101 1.998101z"}}),r("path",{attrs:{d:"M0 56.004882C0 54.897616.90314 54 1.996843 54h55.006314C58.105983 54 59 54.8939 59 56.004882V59H0v-2.995118z"}})])])]),r("div",{staticClass:"text-sm leading-tight text-gray-700"},[t._v(" "+t._s(t.$t("house"))),r("br"),t._v("/ "+t._s(t.$t("realEstate"))+" ")])]),r("div",{staticClass:"mx-4"},[r("div",{staticClass:"flex items-center justify-center w-24 h-24 mb-2 border border-gray-300 cursor-pointer bg-gray-50 rounded-xl hover:bg-gray-100 active:bg-gray-200",on:{click:function(i){t.view="form",t.form="condominium"}}},[r("svg",{staticClass:"text-gray-400",attrs:{width:"59",height:"50",viewBox:"0 0 59 73",xmlns:"http://www.w3.org/2000/svg"}},[r("g",{attrs:{fill:"currentColor","fill-rule":"evenodd"}},[r("path",{attrs:{d:"M6 9.004723C6 7.34526 7.343394 6 8.993614 6h41.012771C51.659714 6 53 7.342697 53 9.004723V71H6V9.004723zm5 4.993378V18.0019C11 19.113294 11.89458 20 12.998101 20H17.0019C18.113294 20 19 19.10542 19 18.001899V13.9981C19 12.886706 18.10542 12 17.001899 12H12.9981C11.886706 12 11 12.89458 11 13.998101zm14.5 0V18.0019C25.5 19.113294 26.39458 20 27.498101 20H31.5019C32.613294 20 33.5 19.10542 33.5 18.001899V13.9981C33.5 12.886706 32.60542 12 31.501899 12H27.4981C26.386706 12 25.5 12.89458 25.5 13.998101zm14.5 0V18.0019C40 19.113294 40.89458 20 41.998101 20H46.0019C47.113294 20 48 19.10542 48 18.001899V13.9981C48 12.886706 47.10542 12 46.001899 12H41.9981C40.886706 12 40 12.89458 40 13.998101zm-29 12V30.0019C11 31.113294 11.89458 32 12.998101 32H17.0019C18.113294 32 19 31.10542 19 30.001899V25.9981C19 24.886706 18.10542 24 17.001899 24H12.9981C11.886706 24 11 24.89458 11 25.998101zm14.5 0V30.0019C25.5 31.113294 26.39458 32 27.498101 32H31.5019C32.613294 32 33.5 31.10542 33.5 30.001899V25.9981C33.5 24.886706 32.60542 24 31.501899 24H27.4981C26.386706 24 25.5 24.89458 25.5 25.998101zm14.5 0V30.0019C40 31.113294 40.89458 32 41.998101 32H46.0019C47.113294 32 48 31.10542 48 30.001899V25.9981C48 24.886706 47.10542 24 46.001899 24H41.9981C40.886706 24 40 24.89458 40 25.998101zm-29 12V42.0019C11 43.113294 11.89458 44 12.998101 44H17.0019C18.113294 44 19 43.10542 19 42.001899V37.9981C19 36.886706 18.10542 36 17.001899 36H12.9981C11.886706 36 11 36.89458 11 37.998101zm14.5 0V42.0019C25.5 43.113294 26.39458 44 27.498101 44H31.5019C32.613294 44 33.5 43.10542 33.5 42.001899V37.9981C33.5 36.886706 32.60542 36 31.501899 36H27.4981C26.386706 36 25.5 36.89458 25.5 37.998101zm14.5 0V42.0019C40 43.113294 40.89458 44 41.998101 44H46.0019C47.113294 44 48 43.10542 48 42.001899V37.9981C48 36.886706 47.10542 36 46.001899 36H41.9981C40.886706 36 40 36.89458 40 37.998101zm-29 12V54.0019C11 55.113294 11.89458 56 12.998101 56H17.0019C18.113294 56 19 55.10542 19 54.001899V49.9981C19 48.886706 18.10542 48 17.001899 48H12.9981C11.886706 48 11 48.89458 11 49.998101zm14.5 0V54.0019C25.5 55.113294 26.39458 56 27.498101 56H31.5019C32.613294 56 33.5 55.10542 33.5 54.001899V49.9981C33.5 48.886706 32.60542 48 31.501899 48H27.4981C26.386706 48 25.5 48.89458 25.5 49.998101zM21 60.997391V68h17v-7.002608C38 59.895858 37.104522 59 35.999894 59H23.000106C21.890058 59 21 59.894263 21 60.997392zm19-10.99929V54.0019C40 55.113294 40.89458 56 41.998101 56H46.0019C47.113294 56 48 55.10542 48 54.001899V49.9981C48 48.886706 47.10542 48 46.001899 48H41.9981C40.886706 48 40 48.89458 40 49.998101zM10 2.5C10 1.119288 11.125134 0 12.498953 0h34.002094C47.88118 0 49 1.109662 49 2.5V5H10V2.5z"}}),r("path",{attrs:{d:"M0 70.004881C0 68.897616.90314 68 1.996843 68h55.006314C58.105983 68 59 68.8939 59 70.004881V73H0v-2.995119z"}})])])]),r("div",{staticClass:"text-sm leading-tight text-gray-700"},[t._v(" "+t._s(t.$t("condominium"))),r("br"),t._v("/ "+t._s(t.$t("apartment"))+" ")])])])]):t._e(),t.view==="form"?r("div",{key:2},[r("div",[t.form==="realEstate"?r("CField",{attrs:{vuelidate:t.$v.realEstateId,"vuelidate-messages":t.messages.realEstateId,label:t.$t("propertyDesignation")}},[r("CInput",{attrs:{placeholder:t.$t("propertyDesignationPlaceholder"),autofocus:""},model:{value:t.realEstateId,callback:function(i){t.realEstateId=i},expression:"realEstateId"}})],1):t._e(),t.form==="condominium"?r("CField",{attrs:{vuelidate:t.$v.condominiumId,"vuelidate-messages":t.messages.condominiumId,label:t.$t("condominiumId")}},[r("CInput",{attrs:{placeholder:t.$t("condominiumIdPlaceholder"),autofocus:"",type:"number"},model:{value:t.condominiumId,callback:function(i){t.condominiumId=i},expression:"condominiumId"}})],1):t._e(),t.form==="condominium"?r("CField",{attrs:{vuelidate:t.$v.condominiumOrgNo,"vuelidate-messages":t.messages.condominiumOrgNo,label:t.$t("condominiumOrgNo")}},[r("CInput",{attrs:{placeholder:t.$t("condominiumOrgNoPlaceholder"),type:"number"},model:{value:t.condominiumOrgNo,callback:function(i){t.condominiumOrgNo=i},expression:"condominiumOrgNo"}})],1):t._e(),r("div",{staticClass:"mt-8"},[r("CButton",{attrs:{type:"secondary",wide:""},on:{click:t.updateClientPropertyDesignation}},[t._v(t._s(t.$t("_common:save")))])],1)],1)]):t._e(),t.view==="complete"?r("div",{key:3},[r("div",{staticClass:"flex flex-col items-center justify-center text-center"},[r("div",{staticClass:"flex items-center justify-center w-12 h-12 mb-4 rounded-full bg-primary-50"},[r("BaseIcon",{staticClass:"text-primary-500",attrs:{type:"check"}})],1),r("div",{staticClass:"mb-1 text-base font-semibold"},[t._v(" "+t._s(t.$t("savedTitle"))+" ")]),r("div",{staticClass:"mb-6 text-base text-gray-700"},[t._v(" "+t._s(t.$t("savedSubTitle",{senderName:t.senderName}))+" ")]),r("div",{staticClass:"w-full mt-4"},[r("CButton",{attrs:{type:"secondary",wide:""},on:{click:function(i){return t.$emit("close")}}},[t._v(t._s(t.$t("_common:close")))])],1)])]):t._e()])],1)},smt=[],lmt=he(amt,omt,smt,!1,null,null,null,null);const cmt=lmt.exports,oDt="",umt={i18nOptions:{namespaces:"docAnswer",messages:{en:{previewTooltip:"Preview how your recipients will answer."},sv:{previewTooltip:"Förhandsgranska hur dina mottagare kommer att lämna svar."}}},name:"DocumentAnswerRead",mixins:[RY({documentKey:"_document"}),br],inject:{isPdf:{default:!1}},props:{_document:{type:Object,required:!0}},data(){return{isInViewport:!1,scrollToElement:$m}},computed:{viewerId(){var n;return((n=this._document._doc)==null?void 0:n.viewerId)||null},isPreview(){return this._document.isPreview},modalHeight(){return this.mq==="sm"?"100%":"auto"},allowPropertyDesignation(){const{prices:n}=this._document;if(!n||!n.region)return!1;const{houseWorkType:t}=n.region;return["rot","greenRot15","greenRot20","greenRot50"].includes(t)},propertyDesignation(){return Ce(this._document,"clients[0].region.propertyDesignation",null)}},mounted(){window.addEventListener("scroll",this.scrollHandler,{capture:!0,passive:!0}),this.$route.name==="docPropertyDesignation"&&this.showPropertyDesignation()},destroyed(){window.removeEventListener("scroll",this.scrollHandler)},watch:{$route:{immediate:!0,handler(n){n!=null&&n.hash&&this.onAnswer("accept",{calcHeight:!0})}},isInViewport:{immediate:!0,handler(n,t){n!==t&&Tr.trigger("ui:document.block.answer.visible",n)}}},methods:{scrollHandler(){this.$refs.answerButtons&&(this.isInViewport=aM(this.$refs.answerButtons))},showPropertyDesignation(){this.$modal.show(cmt,{senderName:this._document.sender.user.name,propertyDesignation:this.propertyDesignation,fullScreen:this.modalHeight==="100%"},{adaptive:!0,height:this.modalHeight,width:"100%",maxWidth:this.modalHeight==="100%"?999:400,classes:"overflow-visible",transition:"fade-in-slide-up"})}}};var dmt=function(){var i,a;var t=this,r=t._self._c;return t._document.answerActions.showActions&&!t.isPdf?r("div",{staticStyle:{padding:"calc(3 * var(--rem)) 0"}},[r("div",{ref:"answerButtons",staticClass:"flex justify-center w-full"},[r("transition",{attrs:{name:"fade",mode:"out-in"}},[((a=(i=t._document.viewer)==null?void 0:i.answerMethod)==null?void 0:a.accept)==="inPerson"?r("div",{key:0,staticStyle:{"max-width":"720px",margin:"0 auto",padding:"0 calc(3 * var(--rem))"},style:t.mq==="sm"?{padding:"0 calc(1.5 * var(--rem))"}:null},[t._v(" "+t._s(t._document.$t("chapters.answerButtons.inPersonSignatureHint"))+" "),r(t._document.sender.user.email?"a":"span",{tag:"component",attrs:{href:`mailto:${t._document.sender.user.email}`}},[t._v(" "+t._s(t._document.sender.company.name||t._document.$t("theSender"))+" ")])],1):(t._document.answerActions.canAnswer||t.isPreview)&&t._document.answerActions.showActions?r("div",{key:1,staticClass:"flex justify-center w-full"},[r("CButton",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.isPreview&&t.$t("previewTooltip"),expression:"isPreview && $t('previewTooltip')"}],staticClass:"text-gray-400",attrs:{size:"medium"},on:{click:function(o){return t.onAnswer("decline")}}},[t._v(" "+t._s(t._document.$t("deny").capitalize())+" ")]),r("CButton",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.isPreview&&t.$t("previewTooltip"),expression:"isPreview && $t('previewTooltip')"}],staticStyle:{"margin-left":"1em","padding-left":"1.5em","padding-right":"1.5em"},attrs:{"icon-props":{strokeWidth:2.5},type:"success",size:"medium","icon-left":"check",raised:""},on:{click:function(o){return t.onAnswer("accept")}}},[t._v(" "+t._s(t._document.$t("sign").capitalize())+" ")])],1):t._document.answerActions.hasAnswered&&t._document.answerActions.waitingForOthers?r("div",{key:2,staticClass:"text-center"},[r("div",{staticStyle:{"font-weight":"600","font-size":"calc(calc(1 * var(--rem)) + 2px)","margin-bottom":"calc(0.5 * var(--rem))"}},[t._v(" "+t._s(t._document.$t("chapters.answerButtons.youHave"))+" "),r("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:`${t.$formatDate(t._document.viewer.answer.didAnswerAt,"Pp")}`,expression:"\n `${$formatDate(_document.viewer.answer.didAnswerAt, 'Pp')}`\n "}],staticStyle:{"text-decoration":"underline"}},[t._v(t._s(t._document.viewer.answer.didAccept?t._document.$t("approved"):t._document.$t("denied")))]),t._v(" "+t._s(" "+t._document.$t("theDocument"))+". ")]),r("div",[t._v(" "+t._s(t._document.$t("chapters.answerButtons.waitingDescription",{remaining:t._document.remainingSignatures}))+" ")])]):t._document.status==="accepted"?r("div",{key:3},[r("div",{staticClass:"callout accepted"},[r("div",{staticClass:"title"},[t._v(" "+t._s(t._document.$t("chapters.answerButtons.approveTitle"))+" ")]),r("div",[t._v(" "+t._s(t._document.$t("chapters.answerButtons.approveDescription",{sender:t._document.sender.company.name||t._document.$t("theSender")}))+" ")])])]):t._document.status==="denied"?r("div",{key:4,staticClass:"callout denied"},[r("div",{staticClass:"title"},[t._v(" "+t._s(t._document.$t("chapters.answerButtons.denyTitle"))+" ")]),r("div",[t._v(" "+t._s(t._document.$t("chapters.answerButtons.denyDescription",{sender:t._document.sender.company.name||t._document.$t("theSender")}))+" ")])]):t._document.status==="expired"?r("div",{key:5,staticClass:"callout expired"},[r("div",{staticClass:"title"},[t._v(" "+t._s(t._document.$t("chapters.answerButtons.expiredTitle"))+" ")]),r("div",[t._v(" "+t._s(t._document.$t("chapters.answerButtons.expiredDescription",{sender:t._document.sender.company.name||t._document.$t("theSender")}))+" ")])]):t._e()])],1),t._document.status==="accepted"&&t.allowPropertyDesignation&&t._document.answerActions.hasAnswered?r("div",{staticClass:"flex justify-center"},[r("div",{staticClass:"answer button accept",staticStyle:{"padding-left":"calc(1.5 * var(--rem))","padding-right":"calc(1.5 * var(--rem))"},on:{click:function(o){return t.showPropertyDesignation()}}},[t._v(" "+t._s(t._document.$t(`chapters.answerButtons.${t.propertyDesignation?"editPropDes":"enterPropDes"}`))+" ")])]):t._e()]):t._e()},pmt=[],fmt=he(umt,dmt,pmt,!1,null,"e023f071",null,null);const hmt=fmt.exports,mmt=Object.freeze(Object.defineProperty({__proto__:null,default:hmt},Symbol.toStringTag,{value:"Module"})),sDt="";let VY,UY,HY,WY,GY;function gmt(n){return typeof n=="object"&&n!==null&&n.__PDFDocumentLoadingTask===!0}const vmt={name:"PdfPage",props:{src:{type:[String,Object,Promise],default:""},page:{type:Number,default:1},rotate:{type:Number,default:0},scale:{type:[Number,String],default:"page-width"},resize:{type:Boolean,default:!0},text:{type:Boolean,default:!0},pdfLoadingTask:{type:Promise,required:!0},containerClass:{type:[Array,String],default:""}},components:{WithDimensions:Af},data(){return{internalSrc:this.src,pdf:null,pdfViewer:null,loading:!0}},watch:{pdf(n){const t=n.pdfInfo||n._pdfInfo;this.$emit("numpages",t.numPages)},page(n){this.pdf.getPage(n).then(t=>{this.pdfViewer.setPdfPage(t),this.pdfViewer.draw()})},scale(n){this.drawScaled(n)},rotate(n){this.pdfViewer&&(this.pdfViewer.update({scale:this.scale,rotation:n}),this.pdfViewer.draw())}},mounted(){VY=window.pdfjsViewer.DefaultTextLayerFactory,UY=window.pdfjsViewer.PDFFindController,HY=window.pdfjsViewer.PDFLinkService,WY=window.pdfjsViewer.PDFPageView,GY=window.pdfjsViewer.EventBus,this.init()},beforeDestroy(){this.pdfViewer&&(this.pdfViewer.destroy(),this.pdfViewer=null)},methods:{init(){gmt(this.internalSrc)||(this.internalSrc=this.pdfLoadingTask,this.$emit("loading",!0));const n=this.$refs.container,t=new GY;t.on("pagerendered",i=>{this.$emit("pagerendered",i)}),this.pdfLinkService=new HY({eventBus:t,externalLinkTarget:2}),this.pdfFindController=new UY({eventBus:t,linkService:this.pdfLinkService});let r;this.text&&(r=new VY),this.internalSrc.then(i=>(this.pdf=i,i.getPage(this.page))).then(i=>{this.pdfViewer=new WY({container:n,id:this.page,scale:1,defaultViewport:i.getViewport({scale:1}),eventBus:t,textLayerFactory:r}),this.pdfViewer.setPdfPage(i);const a={scrollPageIntoView:o=>{this.$emit("link-clicked",o)}};return this.pdfLinkService.setDocument(this.pdf),this.pdfLinkService.setViewer(a),this.pdfFindController.setDocument(this.pdf),this.drawScaled(this.scale)}).catch(i=>{this.$emit("error",i),this.loading=!1,this.$emit("loading",!1)})},calculateScale(n=-1,t=-1){return this.pdfViewer.update({scale:1,rotation:this.rotate}),n===-1&&t===-1&&(n=this.$refs.container.offsetWidth),n/this.pdfViewer.viewport.width},calculateScaleHeight(){this.pdfViewer.update({scale:1,rotation:this.rotate});var n=this.$refs.container.offsetHeight,t=this.$refs.container.parentElement.parentElement;return t.offsetHeight/n},async drawScaled(n){this.pdfViewer&&(n==="page-width"?(n=this.calculateScale(),this.$emit("update:scale",n)):n==="page-height"&&(n=this.calculateScaleHeight(),this.$emit("update:scale",n)),this.pdfViewer.update({scale:n,rotation:this.rotate}),await this.pdfViewer.draw(),this.text&&(this.pdfViewer.textLayer.findController=this.pdfFindController),this.loading=!1,this.$emit("loading",!1))},resizeScale(){this.resize&&this.drawScaled("page-width")}}};var ymt=function(){var t=this,r=t._self._c;return r("div",[t.loading?t._t("loading"):t._e(),r("WithDimensions",{on:{resize:t.resizeScale}},[r("div",{ref:"container",staticClass:"pdfViewer",class:t.containerClass})])],2)},bmt=[],_mt=he(vmt,ymt,bmt,!1,null,null,null,null);const wmt=_mt.exports,R_=new gM;function xmt(n,t){let r;if(typeof n=="string")r={url:n};else if(typeof n=="object"&&n!==null)r={...n};else throw new TypeError("invalid src type");const i=window.pdfjsLib.getDocument(r).promise;return i.__PDFDocumentLoadingTask=!0,t&&t.onPassword&&(i.onPassword=t.onPassword),t&&t.onProgress&&(i.onProgress=t.onProgress),i}const Z7={add(n){R_.trigger("add",n)},remove(n){R_.trigger("remove",n)},onAdd(n){R_.on("add",n)},onRemove(n){R_.on("remove",n)}},Cmt={props:{src:{type:String,default:null},docFilePath:{type:String,default:null}},components:{VuePdf:wmt},inject:{isPdf:{default:!1}},data(){return{numPages:void 0,pdfLoadingTask:null,hasLoadedScripts:!1,loading:!1,pdfRenderBus:Z7}},created(){this.isPdf||Z7.add(this._uid)},watch:{src:{immediate:!0,async handler(n){this.hasLoadedScripts||(await g0(`${Xe.api.baseUrl}/js/pdfjs-dist@3.0.279/build/pdf.min.js`),await g0(`${Xe.api.baseUrl}/js/pdfjs-dist@3.0.279/web/pdf_viewer.js`),window.pdfjsLib.GlobalWorkerOptions.workerSrc=`${Xe.api.baseUrl}/js/pdfjs-dist@3.0.279/build/pdf.worker.min.js`,this.hasLoadedScripts=!0),this.setPdf(n)}}},methods:{createLoadingTask:xmt,async setPdf(n){n&&(this.loading=!0,this.pdfLoadingTask=this.createLoadingTask(n),this.$nextTick(()=>{this.pdfLoadingTask.then(t=>{this.loading=!1,this.numPages=t.numPages,this.$emit("numPages",t.numPages),this.$emit("rendered"),Z7.remove(this._uid)})}))}}};var kmt=function(){var t=this,r=t._self._c;return r("div",{key:t.src},[t.isPdf?r("pre",[t._v(" ClingPDFReplaceStart:["+t._s(this.docFilePath)+`]ClingPDFReplaceEnd
|
|
2860
2860
|
`),r("div",[t._v("This page should have been replaced with URL: "+t._s(t.src))]),t._v(`
|
|
2861
2861
|
`)]):r("div",[t.loading?r("div",{staticClass:"mb-4 border border-gray-100 bg-gray-50 aspect-[210/297] grid place-items-center"},[r("BaseIcon",{staticClass:"animate-spin text-gray-400",attrs:{type:"loader",size:"28"}})],1):t._e(),t._l(t.numPages,function(i){return r("VuePdf",t._b({key:i,ref:"vuePdf",refInFor:!0,attrs:{page:i,"container-class":t.isPdf?"":"mb-4 shadow-[0_2px_4px_hsla(0,0%,0%,0.25)]"},on:{"hook:created":function(a){return t.pdfRenderBus.add(`${t._uid}-${i}`)},loading:a=>a?null:t.pdfRenderBus.remove(`${t._uid}-${i}`)}},"VuePdf",{...t.$attrs,...t.$props,pdfLoadingTask:t.pdfLoadingTask},!1),[t._t("loading",function(){return[r("div",{staticClass:"mb-4 border border-gray-100 bg-gray-50 aspect-[210/297] grid place-items-center",attrs:{slot:"loading"},slot:"loading"},[r("BaseIcon",{staticClass:"animate-spin text-gray-400",attrs:{type:"loader",size:"28"}})],1)]})],2)})],2)])},Smt=[],Tmt=he(Cmt,kmt,Smt,!1,null,null,null,null);const J7=Tmt.exports,lDt="",Emt={name:"FilesPreviewModal",components:{Spinner:Xm,VuePdf:J7},props:{index:{type:Number,default:0},list:{type:Array,required:!0}},data(){return{isLoading:!0,currentIndex:this.index}},computed:{isPdf(){return this.list[this.currentIndex].mime==="application/pdf"}},mounted(){window.addEventListener("keyup",this.handleKey,{capture:!0}),this.toggleIsLoading()},beforeDestroy(){window.removeEventListener("keyup",this.handleKey,{capture:!0})},methods:{onGo(n){const t=this.currentIndex+n;this.list[t]&&(this.currentIndex=t,this.toggleIsLoading())},toggleIsLoading(){this.isLoading=!0,setTimeout(()=>{this.isLoading=!1},1e3)},handleKey(n){n.stopPropagation(),parseInt(n.keyCode,10)===37&&this.onGo(-1),parseInt(n.keyCode,10)===39&&this.onGo(1);const t=n.key||n.keyCode;(t==="Escape"||t==="Esc"||t===27)&&this.$emit("close")}}};var $mt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"flex flex-col w-full",staticStyle:{height:"100%"}},[r("div",{staticClass:"image-modal-overlay"}),r("div",{staticClass:"image-modal-nav",staticStyle:{"z-index":"2"}},[r("div",{staticClass:"truncate-text",staticStyle:{"align-items":"center",display:"flex"}},[r("div",{staticClass:"truncate-text"},[t._v(t._s(t.list[t.currentIndex].name))])]),r("div",{staticStyle:{display:"flex"}},[r("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("show",{thing:t.$t("previous")}),expression:"$t('show', { thing: $t('previous') })"}],staticClass:"image-modal-nav-button",class:{disabled:!t.list[t.currentIndex-1]},on:{click:function(i){return t.onGo(-1)}}},[r("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[r("path",{attrs:{d:"M19 12H6M12 5l-7 7 7 7"}})])]),r("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("show",{thing:t.$t("next")}),expression:"$t('show', { thing: $t('next') })"}],staticClass:"image-modal-nav-button",class:{disabled:!t.list[t.currentIndex+1]},on:{click:function(i){return t.onGo(1)}}},[r("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[r("path",{attrs:{d:"M5 12h13M12 5l7 7-7 7"}})])]),r("a",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("download"),expression:"$t('download')"}],staticClass:"image-modal-nav-button",attrs:{href:t.list[t.currentIndex].url,target:"_blank",download:""}},[r("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[r("path",{attrs:{d:"M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5"}})])]),r("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("close"),expression:"$t('close')"}],staticClass:"image-modal-nav-button",on:{click:function(i){return t.$emit("close")}}},[r("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[r("line",{attrs:{x1:"18",y1:"6",x2:"6",y2:"18"}}),r("line",{attrs:{x1:"6",y1:"6",x2:"18",y2:"18"}})])])])]),r("div",{staticClass:"flex items-center justify-center w-full content-container",staticStyle:{position:"relative"},on:{click:function(i){return t.$emit("close")}}},[t.isLoading?r("Spinner",{staticStyle:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"},attrs:{size:"50px"}}):t._e(),t.isPdf?r("div",{staticClass:"pdf-root"},[r("VuePdf",{staticClass:"pdf-page",attrs:{src:t.list[t.currentIndex].url},on:{rendered:()=>{t.isLoading=!1}},nativeOn:{click:function(i){i.stopPropagation()}}})],1):t.isLoading?t._e():r("img",{staticClass:"modal-image",attrs:{src:t.list[t.currentIndex].url},on:{load:function(i){t.isLoading=!1}}})],1)])},Amt=[],Omt=he(Emt,$mt,Amt,!1,null,"d70d5a87",null,null);const X7=Omt.exports,Dmt=Object.freeze(Object.defineProperty({__proto__:null,default:X7},Symbol.toStringTag,{value:"Module"}));var Mmt=he({name:"FilePreviewWrapper",components:{FilePreviewModal:X7},props:{list:{type:Array,default:()=>[],validator:n=>n.length?!(!n[0].hasOwnProperty("url")||!n[0].hasOwnProperty("name")||!n[0].hasOwnProperty("mime")):!0}},computed:{fileList(){return this.list.reduce((n,t)=>this.isImage(t.mime)||this.isPdf(t.mime)?[...n,t]:n,[])}},methods:{isImage(n){const t=n.toLowerCase(n);return/image\/(gif|jpg|jpeg|png|bmp|svg|svg\+xml|tiff)$/.test(t)},isPdf(n){return n==="application/pdf"},FilePreviewModal(n){this.$modal.show(X7,{index:this.fileList.indexOf(this.list[n]),list:this.fileList},{adaptive:!0,height:"100%",width:"100%",classes:"",transition:""})}},render(){return this.$scopedSlots.default({openModal:n=>this.FilePreviewModal(n),isImageOrPdf:n=>this.isImage(n)||this.isPdf(n)})}},null,null,!1,null,null,null,null);const Pmt={name:"AttachmentList",components:{FilePreviewWrapper:Mmt.exports,BaseUpload:()=>Promise.resolve().then(()=>AX),AttachmentItem:()=>Promise.resolve().then(()=>C3t)},mixins:[pt(["attachments"])],data(){return{hoverIndex:null,newFiles:[]}},computed:{cAttachments(){return[...this.attachments,...this.newFiles.map(({displayName:n,type:t,url:r,progress:i})=>({name:n,mime:t,url:r,progress:parseInt(i,10)}))]},showRecentModal(){return!this.viewSettings.isPublicForm}},methods:{immutable:z4,async onUploadSuccess(n){const{id:t,displayName:r,url:i,mime:a}=n.response;if(!t)throw new Error("Could not read id from uploaded file");this.attachments=[...this.attachments,{fileId:t,name:r,mime:a,url:i}],this.$refs.uploader.remove(n)},remove(n){if(!this.attachments[n])return;const t=this.attachments.slice();t.splice(n,1),this.attachments=t}}};var Imt=function(){var t=this,r=t._self._c;return r("div",{staticClass:"font-inter"},[r("FilePreviewWrapper",{attrs:{list:t.cAttachments},scopedSlots:t._u([{key:"default",fn:function({openModal:i,isImageOrPdf:a}){return[r("div",t._l(t.cAttachments,function(o,s){return r("AttachmentItem",{key:s,attrs:{"is-image-or-pdf":a(o.mime),attachment:o,"can-edit":t.canEdit,"upload-progress":o.progress},on:{click:function(c){a(o.mime)&&i(s)},remove:function(c){return t.remove(s)},input:function(c){t.attachments=t.immutable(t.attachments).set(c,s)}}})}),1)]}}])}),t.canEdit?[r("BaseUpload",{ref:"uploader",attrs:{"recent-modal":t.showRecentModal,"autostart-upload":!0,extensions:"png,gif,jpg,jpeg,svg,bmp,heic,heif,pdf,txt,odp,ods,odt,rtf,doc,docx,xls,xlsx,ppt,pptx,csv,ogv,mp4,webm,m4v,ogg,mp3,wav,zip,rar,json,7z,mpeg,oga,ogv,vsd,weba,webm,webp,xml,gz,tif,jfif,dwg,dwf,dwfx,dwt,msg,ai,psd,md,markdown,mdown,markdn",accept:"*"},on:{"upload-success":t.onUploadSuccess},model:{value:t.newFiles,callback:function(i){t.newFiles=i},expression:"newFiles"}}),r("CButton",{attrs:{type:"none",pattern:"secondary",wide:"","icon-left":"upload-cloud"},on:{click:()=>t.$refs.uploader?t.$refs.uploader.open():null}},[t._v(" "+t._s(t.$t("_common:upload",{thing:t.$t("_common:file")}))+" ")])]:t._e()],2)},Rmt=[],Lmt=he(Pmt,Imt,Rmt,!1,null,null,null,null);const Fmt=Lmt.exports,Nmt=Object.freeze(Object.defineProperty({__proto__:null,default:Fmt},Symbol.toStringTag,{value:"Module"})),v1={inject:{sectionTopNode:{type:[String,Number],default:null}},computed:{showDrawer(){return this.sectionTopNode&&tr.openSection&&this.sectionTopNode===tr.openSection}},methods:{openDrawer(){this.sectionTopNode&&(tr.openSection=this.sectionTopNode)}}};function li(n){this.content=n}li.prototype={constructor:li,find:function(n){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===n)return t;return-1},get:function(n){var t=this.find(n);return t==-1?void 0:this.content[t+1]},update:function(n,t,r){var i=r&&r!=n?this.remove(r):this,a=i.find(n),o=i.content.slice();return a==-1?o.push(r||n,t):(o[a+1]=t,r&&(o[a]=r)),new li(o)},remove:function(n){var t=this.find(n);if(t==-1)return this;var r=this.content.slice();return r.splice(t,2),new li(r)},addToStart:function(n,t){return new li([n,t].concat(this.remove(n).content))},addToEnd:function(n,t){var r=this.remove(n).content.slice();return r.push(n,t),new li(r)},addBefore:function(n,t,r){var i=this.remove(t),a=i.content.slice(),o=i.find(n);return a.splice(o==-1?a.length:o,0,t,r),new li(a)},forEach:function(n){for(var t=0;t<this.content.length;t+=2)n(this.content[t],this.content[t+1])},prepend:function(n){return n=li.from(n),n.size?new li(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=li.from(n),n.size?new li(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var t=this;n=li.from(n);for(var r=0;r<n.content.length;r+=2)t=t.remove(n.content[r]);return t},toObject:function(){var n={};return this.forEach(function(t,r){n[t]=r}),n},get size(){return this.content.length>>1}},li.from=function(n){if(n instanceof li)return n;var t=[];if(n)for(var r in n)t.push(r,n[r]);return new li(t)};function qY(n,t,r){for(let i=0;;i++){if(i==n.childCount||i==t.childCount)return n.childCount==t.childCount?null:r;let a=n.child(i),o=t.child(i);if(a==o){r+=a.nodeSize;continue}if(!a.sameMarkup(o))return r;if(a.isText&&a.text!=o.text){for(let s=0;a.text[s]==o.text[s];s++)r++;return r}if(a.content.size||o.content.size){let s=qY(a.content,o.content,r+1);if(s!=null)return s}r+=a.nodeSize}}function YY(n,t,r,i){for(let a=n.childCount,o=t.childCount;;){if(a==0||o==0)return a==o?null:{a:r,b:i};let s=n.child(--a),c=t.child(--o),l=s.nodeSize;if(s==c){r-=l,i-=l;continue}if(!s.sameMarkup(c))return{a:r,b:i};if(s.isText&&s.text!=c.text){let u=0,d=Math.min(s.text.length,c.text.length);for(;u<d&&s.text[s.text.length-u-1]==c.text[c.text.length-u-1];)u++,r--,i--;return{a:r,b:i}}if(s.content.size||c.content.size){let u=YY(s.content,c.content,r-1,i-1);if(u)return u}r-=l,i-=l}}class qe{constructor(t,r){if(this.content=t,this.size=r||0,r==null)for(let i=0;i<t.length;i++)this.size+=t[i].nodeSize}nodesBetween(t,r,i,a=0,o){for(let s=0,c=0;c<r;s++){let l=this.content[s],u=c+l.nodeSize;if(u>t&&i(l,a+c,o||null,s)!==!1&&l.content.size){let d=c+1;l.nodesBetween(Math.max(0,t-d),Math.min(l.content.size,r-d),i,a+d)}c=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,r,i,a){let o="",s=!0;return this.nodesBetween(t,r,(c,l)=>{c.isText?(o+=c.text.slice(Math.max(t,l)-l,r-l),s=!i):c.isLeaf?(a?o+=typeof a=="function"?a(c):a:c.type.spec.leafText&&(o+=c.type.spec.leafText(c)),s=!i):!s&&c.isBlock&&(o+=i,s=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let r=this.lastChild,i=t.firstChild,a=this.content.slice(),o=0;for(r.isText&&r.sameMarkup(i)&&(a[a.length-1]=r.withText(r.text+i.text),o=1);o<t.content.length;o++)a.push(t.content[o]);return new qe(a,this.size+t.size)}cut(t,r=this.size){if(t==0&&r==this.size)return this;let i=[],a=0;if(r>t)for(let o=0,s=0;s<r;o++){let c=this.content[o],l=s+c.nodeSize;l>t&&((s<t||l>r)&&(c.isText?c=c.cut(Math.max(0,t-s),Math.min(c.text.length,r-s)):c=c.cut(Math.max(0,t-s-1),Math.min(c.content.size,r-s-1))),i.push(c),a+=c.nodeSize),s=l}return new qe(i,a)}cutByIndex(t,r){return t==r?qe.empty:t==0&&r==this.content.length?this:new qe(this.content.slice(t,r))}replaceChild(t,r){let i=this.content[t];if(i==r)return this;let a=this.content.slice(),o=this.size+r.nodeSize-i.nodeSize;return a[t]=r,new qe(a,o)}addToStart(t){return new qe([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new qe(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let r=0;r<this.content.length;r++)if(!this.content[r].eq(t.content[r]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let r=this.content[t];if(!r)throw new RangeError("Index "+t+" out of range for "+this);return r}maybeChild(t){return this.content[t]||null}forEach(t){for(let r=0,i=0;r<this.content.length;r++){let a=this.content[r];t(a,i,r),i+=a.nodeSize}}findDiffStart(t,r=0){return qY(this,t,r)}findDiffEnd(t,r=this.size,i=t.size){return YY(this,t,r,i)}findIndex(t,r=-1){if(t==0)return L_(0,t);if(t==this.size)return L_(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let i=0,a=0;;i++){let o=this.child(i),s=a+o.nodeSize;if(s>=t)return s==t||r>0?L_(i+1,s):L_(i,a);a=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,r){if(!r)return qe.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new qe(r.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return qe.empty;let r,i=0;for(let a=0;a<t.length;a++){let o=t[a];i+=o.nodeSize,a&&o.isText&&t[a-1].sameMarkup(o)?(r||(r=t.slice(0,a)),r[r.length-1]=o.withText(r[r.length-1].text+o.text)):r&&r.push(o)}return new qe(r||t,i)}static from(t){if(!t)return qe.empty;if(t instanceof qe)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new qe([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}qe.empty=new qe([],0);const Q7={index:0,offset:0};function L_(n,t){return Q7.index=n,Q7.offset=t,Q7}function F_(n,t){if(n===t)return!0;if(!(n&&typeof n=="object")||!(t&&typeof t=="object"))return!1;let r=Array.isArray(n);if(Array.isArray(t)!=r)return!1;if(r){if(n.length!=t.length)return!1;for(let i=0;i<n.length;i++)if(!F_(n[i],t[i]))return!1}else{for(let i in n)if(!(i in t)||!F_(n[i],t[i]))return!1;for(let i in t)if(!(i in n))return!1}return!0}let On=class z9{constructor(t,r){this.type=t,this.attrs=r}addToSet(t){let r,i=!1;for(let a=0;a<t.length;a++){let o=t[a];if(this.eq(o))return t;if(this.type.excludes(o.type))r||(r=t.slice(0,a));else{if(o.type.excludes(this.type))return t;!i&&o.type.rank>this.type.rank&&(r||(r=t.slice(0,a)),r.push(this),i=!0),r&&r.push(o)}}return r||(r=t.slice()),i||r.push(this),r}removeFromSet(t){for(let r=0;r<t.length;r++)if(this.eq(t[r]))return t.slice(0,r).concat(t.slice(r+1));return t}isInSet(t){for(let r=0;r<t.length;r++)if(this.eq(t[r]))return!0;return!1}eq(t){return this==t||this.type==t.type&&F_(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let r in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,r){if(!r)throw new RangeError("Invalid input for Mark.fromJSON");let i=t.marks[r.type];if(!i)throw new RangeError(`There is no mark type ${r.type} in this schema`);return i.create(r.attrs)}static sameSet(t,r){if(t==r)return!0;if(t.length!=r.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].eq(r[i]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return z9.none;if(t instanceof z9)return[t];let r=t.slice();return r.sort((i,a)=>i.type.rank-a.type.rank),r}};On.none=[];class y1 extends Error{}class rt{constructor(t,r,i){this.content=t,this.openStart=r,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,r){let i=ZY(this.content,t+this.openStart,r);return i&&new rt(i,this.openStart,this.openEnd)}removeBetween(t,r){return new rt(KY(this.content,t+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,r){if(!r)return rt.empty;let i=r.openStart||0,a=r.openEnd||0;if(typeof i!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new rt(qe.fromJSON(t,r.content),i,a)}static maxOpen(t,r=!0){let i=0,a=0;for(let o=t.firstChild;o&&!o.isLeaf&&(r||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(r||!o.type.spec.isolating);o=o.lastChild)a++;return new rt(t,i,a)}}rt.empty=new rt(qe.empty,0,0);function KY(n,t,r){let{index:i,offset:a}=n.findIndex(t),o=n.maybeChild(i),{index:s,offset:c}=n.findIndex(r);if(a==t||o.isText){if(c!=r&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,t).append(n.cut(r))}if(i!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(i,o.copy(KY(o.content,t-a-1,r-a-1)))}function ZY(n,t,r,i){let{index:a,offset:o}=n.findIndex(t),s=n.maybeChild(a);if(o==t||s.isText)return i&&!i.canReplace(a,a,r)?null:n.cut(0,t).append(r).append(n.cut(t));let c=ZY(s.content,t-o-1,r);return c&&n.replaceChild(a,s.copy(c))}function Bmt(n,t,r){if(r.openStart>n.depth)throw new y1("Inserted content deeper than insertion position");if(n.depth-r.openStart!=t.depth-r.openEnd)throw new y1("Inconsistent open depths");return JY(n,t,r,0)}function JY(n,t,r,i){let a=n.index(i),o=n.node(i);if(a==t.index(i)&&i<n.depth-r.openStart){let s=JY(n,t,r,i+1);return o.copy(o.content.replaceChild(a,s))}else if(r.content.size)if(!r.openStart&&!r.openEnd&&n.depth==i&&t.depth==i){let s=n.parent,c=s.content;return gd(s,c.cut(0,n.parentOffset).append(r.content).append(c.cut(t.parentOffset)))}else{let{start:s,end:c}=jmt(r,n);return gd(o,QY(n,s,c,t,i))}else return gd(o,N_(n,t,i))}function XY(n,t){if(!t.type.compatibleContent(n.type))throw new y1("Cannot join "+t.type.name+" onto "+n.type.name)}function eT(n,t,r){let i=n.node(r);return XY(i,t.node(r)),i}function md(n,t){let r=t.length-1;r>=0&&n.isText&&n.sameMarkup(t[r])?t[r]=n.withText(t[r].text+n.text):t.push(n)}function b1(n,t,r,i){let a=(t||n).node(r),o=0,s=t?t.index(r):a.childCount;n&&(o=n.index(r),n.depth>r?o++:n.textOffset&&(md(n.nodeAfter,i),o++));for(let c=o;c<s;c++)md(a.child(c),i);t&&t.depth==r&&t.textOffset&&md(t.nodeBefore,i)}function gd(n,t){if(!n.type.validContent(t))throw new y1("Invalid content for node "+n.type.name);return n.copy(t)}function QY(n,t,r,i,a){let o=n.depth>a&&eT(n,t,a+1),s=i.depth>a&&eT(r,i,a+1),c=[];return b1(null,n,a,c),o&&s&&t.index(a)==r.index(a)?(XY(o,s),md(gd(o,QY(n,t,r,i,a+1)),c)):(o&&md(gd(o,N_(n,t,a+1)),c),b1(t,r,a,c),s&&md(gd(s,N_(r,i,a+1)),c)),b1(i,null,a,c),new qe(c)}function N_(n,t,r){let i=[];if(b1(null,n,r,i),n.depth>r){let a=eT(n,t,r+1);md(gd(a,N_(n,t,r+1)),i)}return b1(t,null,r,i),new qe(i)}function jmt(n,t){let r=t.depth-n.openStart,a=t.node(r).copy(n.content);for(let o=r-1;o>=0;o--)a=t.node(o).copy(qe.from(a));return{start:a.resolveNoCache(n.openStart+r),end:a.resolveNoCache(a.content.size-n.openEnd-r)}}class _1{constructor(t,r,i){this.pos=t,this.path=r,this.parentOffset=i,this.depth=r.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,r=this.index(this.depth);if(r==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],a=t.child(r);return i?t.child(r).cut(i):a}get nodeBefore(){let t=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(t).cut(0,r):t==0?null:this.parent.child(t-1)}posAtIndex(t,r){r=this.resolveDepth(r);let i=this.path[r*3],a=r==0?0:this.path[r*3-1]+1;for(let o=0;o<t;o++)a+=i.child(o).nodeSize;return a}marks(){let t=this.parent,r=this.index();if(t.content.size==0)return On.none;if(this.textOffset)return t.child(r).marks;let i=t.maybeChild(r-1),a=t.maybeChild(r);if(!i){let c=i;i=a,a=c}let o=i.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!a||!o[s].isInSet(a.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(t){let r=this.parent.maybeChild(this.index());if(!r||!r.isInline)return null;let i=r.marks,a=t.parent.maybeChild(t.index());for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!a||!i[o].isInSet(a.marks))&&(i=i[o--].removeFromSet(i));return i}sharedDepth(t){for(let r=this.depth;r>0;r--)if(this.start(r)<=t&&this.end(r)>=t)return r;return 0}blockRange(t=this,r){if(t.pos<this.pos)return t.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);i>=0;i--)if(t.pos<=this.end(i)&&(!r||r(this.node(i))))return new B_(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let r=1;r<=this.depth;r++)t+=(t?"/":"")+this.node(r).type.name+"_"+this.index(r-1);return t+":"+this.parentOffset}static resolve(t,r){if(!(r>=0&&r<=t.content.size))throw new RangeError("Position "+r+" out of range");let i=[],a=0,o=r;for(let s=t;;){let{index:c,offset:l}=s.content.findIndex(o),u=o-l;if(i.push(s,c,a+l),!u||(s=s.child(c),s.isText))break;o=u-1,a+=l+1}return new _1(r,i,o)}static resolveCached(t,r){for(let a=0;a<tT.length;a++){let o=tT[a];if(o.pos==r&&o.doc==t)return o}let i=tT[nT]=_1.resolve(t,r);return nT=(nT+1)%zmt,i}}let tT=[],nT=0,zmt=12;class B_{constructor(t,r,i){this.$from=t,this.$to=r,this.depth=i}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Vmt=Object.create(null);let vd=class V9{constructor(t,r,i,a=On.none){this.type=t,this.attrs=r,this.marks=a,this.content=i||qe.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,r,i,a=0){this.content.nodesBetween(t,r,i,a,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,r,i,a){return this.content.textBetween(t,r,i,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,r,i){return this.type==t&&F_(this.attrs,r||t.defaultAttrs||Vmt)&&On.sameSet(this.marks,i||On.none)}copy(t=null){return t==this.content?this:new V9(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new V9(this.type,this.attrs,this.content,t)}cut(t,r=this.content.size){return t==0&&r==this.content.size?this:this.copy(this.content.cut(t,r))}slice(t,r=this.content.size,i=!1){if(t==r)return rt.empty;let a=this.resolve(t),o=this.resolve(r),s=i?0:a.sharedDepth(r),c=a.start(s),u=a.node(s).content.cut(a.pos-c,o.pos-c);return new rt(u,a.depth-s,o.depth-s)}replace(t,r,i){return Bmt(this.resolve(t),this.resolve(r),i)}nodeAt(t){for(let r=this;;){let{index:i,offset:a}=r.content.findIndex(t);if(r=r.maybeChild(i),!r)return null;if(a==t||r.isText)return r;t-=a+1}}childAfter(t){let{index:r,offset:i}=this.content.findIndex(t);return{node:this.content.maybeChild(r),index:r,offset:i}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:r,offset:i}=this.content.findIndex(t);if(i<t)return{node:this.content.child(r),index:r,offset:i};let a=this.content.child(r-1);return{node:a,index:r-1,offset:i-a.nodeSize}}resolve(t){return _1.resolveCached(this,t)}resolveNoCache(t){return _1.resolve(this,t)}rangeHasMark(t,r,i){let a=!1;return r>t&&this.nodesBetween(t,r,o=>(i.isInSet(o.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),eK(this.marks,t)}contentMatchAt(t){let r=this.type.contentMatch.matchFragment(this.content,0,t);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(t,r,i=qe.empty,a=0,o=i.childCount){let s=this.contentMatchAt(t).matchFragment(i,a,o),c=s&&s.matchFragment(this.content,r);if(!c||!c.validEnd)return!1;for(let l=a;l<o;l++)if(!this.type.allowsMarks(i.child(l).marks))return!1;return!0}canReplaceWith(t,r,i,a){if(a&&!this.type.allowsMarks(a))return!1;let o=this.contentMatchAt(t).matchType(i),s=o&&o.matchFragment(this.content,r);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){if(!this.type.validContent(this.content))throw new RangeError(`Invalid content for node ${this.type.name}: ${this.content.toString().slice(0,50)}`);let t=On.none;for(let r=0;r<this.marks.length;r++)t=this.marks[r].addToSet(t);if(!On.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(r=>r.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let t={type:this.type.name};for(let r in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(r=>r.toJSON())),t}static fromJSON(t,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let i=null;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=r.marks.map(t.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(r.text,i)}let a=qe.fromJSON(t,r.content);return t.nodeType(r.type).create(r.attrs,a,i)}};vd.prototype.text=void 0;class j_ extends vd{constructor(t,r,i,a){if(super(t,r,null,a),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):eK(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,r){return this.text.slice(t,r)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new j_(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new j_(this.type,this.attrs,t,this.marks)}cut(t=0,r=this.text.length){return t==0&&r==this.text.length?this:this.withText(this.text.slice(t,r))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function eK(n,t){for(let r=n.length-1;r>=0;r--)t=n[r].type.name+"("+t+")";return t}class yd{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,r){let i=new Umt(t,r);if(i.next==null)return yd.empty;let a=tK(i);i.next&&i.err("Unexpected trailing text");let o=Zmt(Kmt(a));return Jmt(o,i),o}matchType(t){for(let r=0;r<this.next.length;r++)if(this.next[r].type==t)return this.next[r].next;return null}matchFragment(t,r=0,i=t.childCount){let a=this;for(let o=r;a&&o<i;o++)a=a.matchType(t.child(o).type);return a}get inlineContent(){return this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:r}=this.next[t];if(!(r.isText||r.hasRequiredAttrs()))return r}return null}compatible(t){for(let r=0;r<this.next.length;r++)for(let i=0;i<t.next.length;i++)if(this.next[r].type==t.next[i].type)return!0;return!1}fillBefore(t,r=!1,i=0){let a=[this];function o(s,c){let l=s.matchFragment(t,i);if(l&&(!r||l.validEnd))return qe.from(c.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:d,next:p}=s.next[u];if(!(d.isText||d.hasRequiredAttrs())&&a.indexOf(p)==-1){a.push(p);let f=o(p,c.concat(d));if(f)return f}}return null}return o(this,[])}findWrapping(t){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==t)return this.wrapCache[i+1];let r=this.computeWrapping(t);return this.wrapCache.push(t,r),r}computeWrapping(t){let r=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let a=i.shift(),o=a.match;if(o.matchType(t)){let s=[];for(let c=a;c.type;c=c.via)s.push(c.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:c,next:l}=o.next[s];!c.isLeaf&&!c.hasRequiredAttrs()&&!(c.name in r)&&(!a.type||l.validEnd)&&(i.push({match:c.contentMatch,type:c,via:a}),r[c.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function r(i){t.push(i);for(let a=0;a<i.next.length;a++)t.indexOf(i.next[a].next)==-1&&r(i.next[a].next)}return r(this),t.map((i,a)=>{let o=a+(i.validEnd?"*":" ")+" ";for(let s=0;s<i.next.length;s++)o+=(s?", ":"")+i.next[s].type.name+"->"+t.indexOf(i.next[s].next);return o}).join(`
|
|
2862
2862
|
`)}}yd.empty=new yd(!0);class Umt{constructor(t,r){this.string=t,this.nodeTypes=r,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function tK(n){let t=[];do t.push(Hmt(n));while(n.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function Hmt(n){let t=[];do t.push(Wmt(n));while(n.next&&n.next!=")"&&n.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function Wmt(n){let t=Ymt(n);for(;;)if(n.eat("+"))t={type:"plus",expr:t};else if(n.eat("*"))t={type:"star",expr:t};else if(n.eat("?"))t={type:"opt",expr:t};else if(n.eat("{"))t=Gmt(n,t);else break;return t}function nK(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let t=Number(n.next);return n.pos++,t}function Gmt(n,t){let r=nK(n),i=r;return n.eat(",")&&(n.next!="}"?i=nK(n):i=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:r,max:i,expr:t}}function qmt(n,t){let r=n.nodeTypes,i=r[t];if(i)return[i];let a=[];for(let o in r){let s=r[o];s.groups.indexOf(t)>-1&&a.push(s)}return a.length==0&&n.err("No node type or group '"+t+"' found"),a}function Ymt(n){if(n.eat("(")){let t=tK(n);return n.eat(")")||n.err("Missing closing paren"),t}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let t=qmt(n,n.next).map(r=>(n.inline==null?n.inline=r.isInline:n.inline!=r.isInline&&n.err("Mixing inline and block content"),{type:"name",value:r}));return n.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function Kmt(n){let t=[[]];return a(o(n,0),r()),t;function r(){return t.push([])-1}function i(s,c,l){let u={term:l,to:c};return t[s].push(u),u}function a(s,c){s.forEach(l=>l.to=c)}function o(s,c){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(o(u,c)),[]);if(s.type=="seq")for(let l=0;;l++){let u=o(s.exprs[l],c);if(l==s.exprs.length-1)return u;a(u,c=r())}else if(s.type=="star"){let l=r();return i(c,l),a(o(s.expr,l),l),[i(l)]}else if(s.type=="plus"){let l=r();return a(o(s.expr,c),l),a(o(s.expr,l),l),[i(l)]}else{if(s.type=="opt")return[i(c)].concat(o(s.expr,c));if(s.type=="range"){let l=c;for(let u=0;u<s.min;u++){let d=r();a(o(s.expr,l),d),l=d}if(s.max==-1)a(o(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let d=r();i(l,d),a(o(s.expr,l),d),l=d}return[i(l)]}else{if(s.type=="name")return[i(c,void 0,s.value)];throw new Error("Unknown expr type")}}}}function rK(n,t){return t-n}function iK(n,t){let r=[];return i(t),r.sort(rK);function i(a){let o=n[a];if(o.length==1&&!o[0].term)return i(o[0].to);r.push(a);for(let s=0;s<o.length;s++){let{term:c,to:l}=o[s];!c&&r.indexOf(l)==-1&&i(l)}}}function Zmt(n){let t=Object.create(null);return r(iK(n,0));function r(i){let a=[];i.forEach(s=>{n[s].forEach(({term:c,to:l})=>{if(!c)return;let u;for(let d=0;d<a.length;d++)a[d][0]==c&&(u=a[d][1]);iK(n,l).forEach(d=>{u||a.push([c,u=[]]),u.indexOf(d)==-1&&u.push(d)})})});let o=t[i.join(",")]=new yd(i.indexOf(n.length-1)>-1);for(let s=0;s<a.length;s++){let c=a[s][1].sort(rK);o.next.push({type:a[s][0],next:t[c.join(",")]||r(c)})}return o}}function Jmt(n,t){for(let r=0,i=[n];r<i.length;r++){let a=i[r],o=!a.validEnd,s=[];for(let c=0;c<a.next.length;c++){let{type:l,next:u}=a.next[c];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),i.indexOf(u)==-1&&i.push(u)}o&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function aK(n){let t=Object.create(null);for(let r in n){let i=n[r];if(!i.hasDefault)return null;t[r]=i.default}return t}function oK(n,t){let r=Object.create(null);for(let i in n){let a=t&&t[i];if(a===void 0){let o=n[i];if(o.hasDefault)a=o.default;else throw new RangeError("No value supplied for attribute "+i)}r[i]=a}return r}function sK(n){let t=Object.create(null);if(n)for(let r in n)t[r]=new Xmt(n[r]);return t}let lK=class xee{constructor(t,r,i){this.name=t,this.schema=r,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=sK(i.attrs),this.defaultAttrs=aK(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==yd.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:oK(this.attrs,t)}create(t=null,r,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new vd(this,this.computeAttrs(t),qe.from(r),On.setFrom(i))}createChecked(t=null,r,i){if(r=qe.from(r),!this.validContent(r))throw new RangeError("Invalid content for node "+this.name);return new vd(this,this.computeAttrs(t),r,On.setFrom(i))}createAndFill(t=null,r,i){if(t=this.computeAttrs(t),r=qe.from(r),r.size){let s=this.contentMatch.fillBefore(r);if(!s)return null;r=s.append(r)}let a=this.contentMatch.matchFragment(r),o=a&&a.fillBefore(qe.empty,!0);return o?new vd(this,t,r.append(o),On.setFrom(i)):null}validContent(t){let r=this.contentMatch.matchFragment(t);if(!r||!r.validEnd)return!1;for(let i=0;i<t.childCount;i++)if(!this.allowsMarks(t.child(i).marks))return!1;return!0}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let r=0;r<t.length;r++)if(!this.allowsMarkType(t[r].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let r;for(let i=0;i<t.length;i++)this.allowsMarkType(t[i].type)?r&&r.push(t[i]):r||(r=t.slice(0,i));return r?r.length?r:On.none:t}static compile(t,r){let i=Object.create(null);t.forEach((o,s)=>i[o]=new xee(o,r,s));let a=r.spec.topNode||"doc";if(!i[a])throw new RangeError("Schema is missing its top node type ('"+a+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};class Xmt{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class z_{constructor(t,r,i,a){this.name=t,this.rank=r,this.schema=i,this.spec=a,this.attrs=sK(a.attrs),this.excluded=null;let o=aK(this.attrs);this.instance=o?new On(this,o):null}create(t=null){return!t&&this.instance?this.instance:new On(this,oK(this.attrs,t))}static compile(t,r){let i=Object.create(null),a=0;return t.forEach((o,s)=>i[o]=new z_(o,a++,r,s)),i}removeFromSet(t){for(var r=0;r<t.length;r++)t[r].type==this&&(t=t.slice(0,r).concat(t.slice(r+1)),r--);return t}isInSet(t){for(let r=0;r<t.length;r++)if(t[r].type==this)return t[r]}excludes(t){return this.excluded.indexOf(t)>-1}}class Qmt{constructor(t){this.cached=Object.create(null),this.spec={nodes:li.from(t.nodes),marks:li.from(t.marks||{}),topNode:t.topNode},this.nodes=lK.compile(this.spec.nodes,this),this.marks=z_.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let a=this.nodes[i],o=a.spec.content||"",s=a.spec.marks;a.contentMatch=r[o]||(r[o]=yd.parse(o,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.markSet=s=="_"?null:s?cK(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let i in this.marks){let a=this.marks[i],o=a.spec.excludes;a.excluded=o==null?[a]:o==""?[]:cK(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,r=null,i,a){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof lK){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(r,i,a)}text(t,r){let i=this.nodes.text;return new j_(i,i.defaultAttrs,t,On.setFrom(r))}mark(t,r){return typeof t=="string"&&(t=this.marks[t]),t.create(r)}nodeFromJSON(t){return vd.fromJSON(this,t)}markFromJSON(t){return On.fromJSON(this,t)}nodeType(t){let r=this.nodes[t];if(!r)throw new RangeError("Unknown node type: "+t);return r}}function cK(n,t){let r=[];for(let i=0;i<t.length;i++){let a=t[i],o=n.marks[a],s=o;if(o)r.push(o);else for(let c in n.marks){let l=n.marks[c];(a=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(a)>-1)&&r.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return r}let rT=class U9{constructor(t,r){this.schema=t,this.rules=r,this.tags=[],this.styles=[],r.forEach(i=>{i.tag?this.tags.push(i):i.style&&this.styles.push(i)}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let a=t.nodes[i.node];return a.contentMatch.matchType(a)})}parse(t,r={}){let i=new fK(this,r,!1);return i.addAll(t,r.from,r.to),i.finish()}parseSlice(t,r={}){let i=new fK(this,r,!0);return i.addAll(t,r.from,r.to),rt.maxOpen(i.finish())}matchTag(t,r,i){for(let a=i?this.tags.indexOf(i)+1:0;a<this.tags.length;a++){let o=this.tags[a];if(ngt(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||r.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(t);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(t,r,i,a){for(let o=a?this.styles.indexOf(a)+1:0;o<this.styles.length;o++){let s=this.styles[o],c=s.style;if(!(c.indexOf(t)!=0||s.context&&!i.matchesContext(s.context)||c.length>t.length&&(c.charCodeAt(t.length)!=61||c.slice(t.length+1)!=r))){if(s.getAttrs){let l=s.getAttrs(r);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let r=[];function i(a){let o=a.priority==null?50:a.priority,s=0;for(;s<r.length;s++){let c=r[s];if((c.priority==null?50:c.priority)<o)break}r.splice(s,0,a)}for(let a in t.marks){let o=t.marks[a].spec.parseDOM;o&&o.forEach(s=>{i(s=hK(s)),s.mark=a})}for(let a in t.nodes){let o=t.nodes[a].spec.parseDOM;o&&o.forEach(s=>{i(s=hK(s)),s.node=a})}return r}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new U9(t,U9.schemaRules(t)))}};const uK={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},egt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},dK={ol:!0,ul:!0},V_=1,U_=2,w1=4;function pK(n,t,r){return t!=null?(t?V_:0)|(t==="full"?U_:0):n&&n.whitespace=="pre"?V_|U_:r&~w1}class H_{constructor(t,r,i,a,o,s,c){this.type=t,this.attrs=r,this.marks=i,this.pendingMarks=a,this.solid=o,this.options=c,this.content=[],this.activeMarks=On.none,this.stashMarks=[],this.match=s||(c&w1?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(qe.from(t));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let i=this.type.contentMatch,a;return(a=i.findWrapping(t.type))?(this.match=i,a):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&V_)){let i=this.content[this.content.length-1],a;if(i&&i.isText&&(a=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==a[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-a[0].length))}}let r=qe.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(qe.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}popFromStashMark(t){for(let r=this.stashMarks.length-1;r>=0;r--)if(t.eq(this.stashMarks[r]))return this.stashMarks.splice(r,1)[0]}applyPending(t){for(let r=0,i=this.pendingMarks;r<i.length;r++){let a=i[r];(this.type?this.type.allowsMarkType(a.type):igt(a.type,t))&&!a.isInSet(this.activeMarks)&&(this.activeMarks=a.addToSet(this.activeMarks),this.pendingMarks=a.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!uK.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class fK{constructor(t,r,i){this.parser=t,this.options=r,this.isOpen=i,this.open=0;let a=r.topNode,o,s=pK(null,r.preserveWhitespace,0)|(i?w1:0);a?o=new H_(a.type,a.attrs,On.none,On.none,!0,r.topMatch||a.type.contentMatch,s):i?o=new H_(null,null,On.none,On.none,!0,null,s):o=new H_(t.schema.topNodeType,null,On.none,On.none,!0,null,s),this.nodes=[o],this.find=r.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){if(t.nodeType==3)this.addTextNode(t);else if(t.nodeType==1){let r=t.getAttribute("style"),i=r?this.readStyles(rgt(r)):null,a=this.top;if(i!=null)for(let o=0;o<i.length;o++)this.addPendingMark(i[o]);if(this.addElement(t),i!=null)for(let o=0;o<i.length;o++)this.removePendingMark(i[o],a)}}addTextNode(t){let r=t.nodeValue,i=this.top;if(i.options&U_||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i.options&V_)i.options&U_?r=r.replace(/\r\n?/g,`
|