@cling-se/widget 0.5.1 → 0.5.2
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/{DocFormSend.a52a2a07.js → DocFormSend.9f94f6f7.js} +1 -1
- package/dist/{DocReceipt.411ff862.js → DocReceipt.732598b3.js} +1 -1
- package/dist/{DocSendReminder.0551a8af.js → DocSendReminder.9ea234d2.js} +1 -1
- package/dist/{DocTimeline.47057965.js → DocTimeline.03fee84e.js} +1 -1
- package/dist/index.es.js +4 -2
- package/dist/index.umd.js +3 -3
- package/dist/{main.ed2b323d.js → main.c91dd7f4.js} +6 -6
- package/package.json +1 -1
- package/stats.html +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Bt,Ft){typeof exports=="object"&&typeof module<"u"?module.exports=Ft():typeof define=="function"&&define.amd?define(Ft):(Bt=typeof globalThis<"u"?globalThis:Bt||self,Bt.widget=Ft())})(this,function(){"use strict";var $4e=Object.defineProperty;var x4e=(Bt,Ft,Zr)=>Ft in Bt?$4e(Bt,Ft,{enumerable:!0,configurable:!0,writable:!0,value:Zr}):Bt[Ft]=Zr;var at=(Bt,Ft,Zr)=>(x4e(Bt,typeof Ft!="symbol"?Ft+"":Ft,Zr),Zr);const Bt="Cling",Ft=window[`${Bt.toLowerCase()}Options`];function Zr(){const t={environment:"development",baseUrl:"https://app.dev2.cling.se",api:{baseUrl:"https://api.dev.cling.se",
|
|
1
|
+
(function(Bt,Ft){typeof exports=="object"&&typeof module<"u"?module.exports=Ft():typeof define=="function"&&define.amd?define(Ft):(Bt=typeof globalThis<"u"?globalThis:Bt||self,Bt.widget=Ft())})(this,function(){"use strict";var $4e=Object.defineProperty;var x4e=(Bt,Ft,Zr)=>Ft in Bt?$4e(Bt,Ft,{enumerable:!0,configurable:!0,writable:!0,value:Zr}):Bt[Ft]=Zr;var at=(Bt,Ft,Zr)=>(x4e(Bt,typeof Ft!="symbol"?Ft+"":Ft,Zr),Zr);const Bt="Cling",Ft=window[`${Bt.toLowerCase()}Options`];function Zr(){const t={environment:"development",baseUrl:"https://app.dev2.cling.se",api:{baseUrl:"https://api.dev.cling.se",socket:{rootUrl:"https://api.dev.cling.se"}},rollbar:{clientToken:"cf75726b70174d4097505ae18d5f9600",environment:"staging"}},e=JSON.stringify(t),n=document.createElement("script");n.id="config",n.type="application/json",n.innerText=e,document.head.appendChild(n)}(Ft==null?void 0:Ft.environment)==="development"&&Zr();const X1={init(t={}){return(t==null?void 0:t.environment)==="development"&&Zr(),Promise.resolve().then(()=>Rwe).then(e=>{const n=e.default;return window[Bt]=n,Object.assign(this,n),n.init({...t,LIB_NAME:Bt})})}};window[Bt]=X1;const l5=()=>{try{const t=window.localStorage;return t.setItem("test","test"),t.removeItem("test"),!0}catch{return!1}};class c5{constructor(){at(this,"_memory",{});at(this,"_isLocalStorageSupport",!1);at(this,"_prefix","");this._isLocalStorageSupport=l5()}setPrefix(e){this._prefix=e}_getKey(e){return`${this._prefix}${e}`}getItem(e){return this._isLocalStorageSupport?localStorage.getItem(this._getKey(e)):this._memory[e]||null}setItem(e,n){this._isLocalStorageSupport?localStorage.setItem(this._getKey(e),n):this._memory[e]=n}removeItem(e){this._isLocalStorageSupport?localStorage.removeItem(this._getKey(e)):delete this._memory[e]}clear(){this._isLocalStorageSupport?localStorage.clear():this._memory={}}}const Ee=new c5;class u5{constructor(){this.events={}}on(e,n){return this.events[e]=this.events[e]||[],this.events[e].push(n),()=>this.off(e,n)}off(e,n){this.events[e]&&(this.events[e]=this.events[e].filter(r=>r.fn!==n))}trigger(e,n){this.events[e]&&this.events[e].forEach(function(r){r(n)})}}const Sr=new u5;/*!
|
|
2
2
|
* Vue.js v2.7.13
|
|
3
3
|
* (c) 2014-2022 Evan You
|
|
4
4
|
* Released under the MIT License.
|
|
@@ -334,7 +334,7 @@ In order to facilitate your application for deduction, {{company.name}} needs yo
|
|
|
334
334
|
{{docLink}}/fastighetsbeteckning`},emailTemplate:{subject:"We need your property designation - {{document.data.name}}",title:"Hello{{clientFirstName}}!",content:"In order to facilitate your application for deduction, {{company.name}} needs your property designation. Click on the button to enter your property designation.",text:`Hello{{clientFirstName}}!
|
|
335
335
|
In order to facilitate your application for deduction, {{company.name}} needs your property designation. Click on the link to enter your property designation.
|
|
336
336
|
|
|
337
|
-
{{docLink}}/fastighetsbeteckning`,actionUrl:"{{docLink}}/fastighetsbeteckning"}},updateDocumentDialog:{title:"Change status and remove answer",message:"Your clients' answers will be removed.",cancel:"Cancel",submit:"Yes, continue"},editDocumentDialog:{accepted:{title:"Edit an accepted document",message:"The document is accepted and locked for changes. Create a copy to make changes.",submit:"Create copy"},hasAnswers:{title:"Edit document with signatures",message:"The document is locked for changes. Existing signatures will be removed.",submit:"Yes, continue"}}},resources:{brand:{cling:{termsOfService:{version:"cling_serviceavtal_sv_1.8",url:"https://api.cling.se/legal/terms"},privacyPolicy:{version:"cling_integritetspolicy_sv_1.8",url:"https://api.cling.se/legal/privacy"},apiDoc:"https://documenter.getpostman.com/view/1358621/Tzm3nxVw"},docspo:{termsOfService:{version:"docspo_terms_en_1.2",url:"https://api.docspo.com/legal/terms"},privacyPolicy:{version:"docspo_privacy_en_1.2",url:"https://api.docspo.com/legal/privacy"},apiDoc:"https://developer.docspo.com"}}},router:{settings:{company:"Company",user:"My Profile",document:"Document",members:"Members",membersForm:"Member",notifications:"Notifications",integrations:"Integrations",billing:"Billing",language:"Language",sms:"SMS sender name",emailDomain:"E-mail domain",subdomain:"Subdomain",websitesSocialMedia:"Social profiles",certificates:"Certificates",theme:"Theme",companyPresentation:"Presentation",tabPhotos:"Settings - Photos",photosVideos:"My Photos",invoice:{documentTitle:"Settings - Bookkeeping",contact:"Invoice - Contact",invoice:"Invoice - Settings",reminders:"Invoice - Reminders",paymentAcc:"Invoice - Payment account",bookkeeping:"Bookkeeping"},templates:"Settings - Templates",templateEditor:"Snippets",termForm:"Edit - Terms",termList:"My Terms"}},iso:{language:{sv:"Swedish",en:"English",fi:"Finish",de:"German",fr:"French",es:"Spanish",nl:"Dutch"}}};var pne={lessThanXSeconds:{one:"mindre \xE4n en sekund",other:"mindre \xE4n {{count}} sekunder"},xSeconds:{one:"en sekund",other:"{{count}} sekunder"},halfAMinute:"en halv minut",lessThanXMinutes:{one:"mindre \xE4n en minut",other:"mindre \xE4n {{count}} minuter"},xMinutes:{one:"en minut",other:"{{count}} minuter"},aboutXHours:{one:"ungef\xE4r en timme",other:"ungef\xE4r {{count}} timmar"},xHours:{one:"en timme",other:"{{count}} timmar"},xDays:{one:"en dag",other:"{{count}} dagar"},aboutXWeeks:{one:"ungef\xE4r en vecka",other:"ungef\xE4r {{count}} vecka"},xWeeks:{one:"en vecka",other:"{{count}} vecka"},aboutXMonths:{one:"ungef\xE4r en m\xE5nad",other:"ungef\xE4r {{count}} m\xE5nader"},xMonths:{one:"en m\xE5nad",other:"{{count}} m\xE5nader"},aboutXYears:{one:"ungef\xE4r ett \xE5r",other:"ungef\xE4r {{count}} \xE5r"},xYears:{one:"ett \xE5r",other:"{{count}} \xE5r"},overXYears:{one:"\xF6ver ett \xE5r",other:"\xF6ver {{count}} \xE5r"},almostXYears:{one:"n\xE4stan ett \xE5r",other:"n\xE4stan {{count}} \xE5r"}},fne=["noll","en","tv\xE5","tre","fyra","fem","sex","sju","\xE5tta","nio","tio","elva","tolv"],hne=function(e,n,r){var i,a=pne[e];return typeof a=="string"?i=a:n===1?i=a.one:r&&r.onlyNumeric?i=a.other.replace("{{count}}",String(n)):i=a.other.replace("{{count}}",n<13?fne[n]:String(n)),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"om "+i:i+" sedan":i};const mne=hne;var gne={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"y-MM-dd"},vne={full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},yne={full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},_ne={date:Fs({formats:gne,defaultWidth:"full"}),time:Fs({formats:vne,defaultWidth:"full"}),dateTime:Fs({formats:yne,defaultWidth:"full"})};const bne=_ne;var Ene={lastWeek:"'i' EEEE's kl.' p",yesterday:"'ig\xE5r kl.' p",today:"'idag kl.' p",tomorrow:"'imorgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},Tne=function(e,n,r,i){return Ene[e]};const wne=Tne;var Sne={narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["f\xF6re Kristus","efter Kristus"]},kne={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"]},Cne={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},One={narrow:["S","M","T","O","T","F","L"],short:["s\xF6","m\xE5","ti","on","to","fr","l\xF6"],abbreviated:["s\xF6n","m\xE5n","tis","ons","tors","fre","l\xF6r"],wide:["s\xF6ndag","m\xE5ndag","tisdag","onsdag","torsdag","fredag","l\xF6rdag"]},Ane={narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"morg.",afternoon:"efterm.",evening:"kv\xE4ll",night:"natt"},abbreviated:{am:"f.m.",pm:"e.m.",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"efterm.",evening:"kv\xE4ll",night:"natt"},wide:{am:"f\xF6rmiddag",pm:"eftermiddag",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"eftermiddag",evening:"kv\xE4ll",night:"natt"}},$ne={narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"p\xE5 morg.",afternoon:"p\xE5 efterm.",evening:"p\xE5 kv\xE4llen",night:"p\xE5 natten"},abbreviated:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"p\xE5 morg.",afternoon:"p\xE5 efterm.",evening:"p\xE5 kv\xE4llen",night:"p\xE5 natten"},wide:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"p\xE5 morgonen",afternoon:"p\xE5 eftermiddagen",evening:"p\xE5 kv\xE4llen",night:"p\xE5 natten"}},xne=function(e,n){var r=Number(e),i=r%100;if(i>20||i<10)switch(i%10){case 1:case 2:return r+":a"}return r+":e"},Ine={ordinalNumber:xne,era:ir({values:Sne,defaultWidth:"wide"}),quarter:ir({values:kne,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:ir({values:Cne,defaultWidth:"wide"}),day:ir({values:One,defaultWidth:"wide"}),dayPeriod:ir({values:Ane,defaultWidth:"wide",formattingValues:$ne,defaultFormattingWidth:"wide"})};const Pne=Ine;var Dne=/^(\d+)(:a|:e)?/i,Rne=/\d+/i,Mne={narrow:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,abbreviated:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,wide:/^(före Kristus|före vår tid|efter Kristus|vår tid)/i},Nne={any:[/^f/i,/^[ev]/i]},Lne={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](:a|:e)? kvartalet/i},Fne={any:[/1/i,/2/i,/3/i,/4/i]},jne={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,wide:/^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i},Une={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vne={narrow:/^[smtofl]/i,short:/^(sö|må|ti|on|to|fr|lö)/i,abbreviated:/^(sön|mån|tis|ons|tors|fre|lör)/i,wide:/^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i},Bne={any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},Hne={any:/^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i},zne={any:{am:/^f/i,pm:/^e/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/eftermiddag/i,evening:/kväll/i,night:/natt/i}},Wne={ordinalNumber:oO({matchPattern:Dne,parsePattern:Rne,valueCallback:function(e){return parseInt(e,10)}}),era:ar({matchPatterns:Mne,defaultMatchWidth:"wide",parsePatterns:Nne,defaultParseWidth:"any"}),quarter:ar({matchPatterns:Lne,defaultMatchWidth:"wide",parsePatterns:Fne,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:ar({matchPatterns:jne,defaultMatchWidth:"wide",parsePatterns:Une,defaultParseWidth:"any"}),day:ar({matchPatterns:Vne,defaultMatchWidth:"wide",parsePatterns:Bne,defaultParseWidth:"any"}),dayPeriod:ar({matchPatterns:Hne,defaultMatchWidth:"any",parsePatterns:zne,defaultParseWidth:"any"})},Gne={code:"sv",formatDistance:mne,formatLong:bne,formatRelative:wne,localize:Pne,match:Wne,options:{weekStartsOn:1,firstWeekContainsDate:4}};const qne=Gne,IO=["af","ar-DZ","ar-MA","ar-SA","az","be","bg","bn","ca","cs","cy","da","de","el","en-AU","en-CA","en-GB","en-US","eo","es","et","eu","fa-IR","fi","fr","fr-CA","gl","gu","he","hi","hr","hu","hy","id","is","it","ja","ka","kk","kn","ko","lt","lv","mk","ms","mt","nb","nl","nn","pl","pt","pt-BR","ro","ru","sk","sl","sr","sr-Latn","sv","ta","te","th","tr","ug","uk","uz","vi","zh-CN","zh-TW"];class PO{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(e,n){if(!!this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(r=>r!==n)}}emit(e,...n){this.observers[e]&&[].concat(this.observers[e]).forEach(i=>{i(...n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(i=>{i.apply(i,[e,...n])})}}const Yne=(t="")=>{if(typeof t!="string")return null;const[e]=t.split("-");return IO.includes(e)?e:null},Kne=()=>navigator&&navigator.languages&&Array.isArray(navigator.languages)&&navigator.languages[0]?navigator.languages[0]:navigator&&navigator.language?navigator.language:null,DO={lookup(t){let e=null;const n=Ee.getItem(t);return n&&(e=n),e},cacheUserLocale(t,e){Ee.setItem(t,e)}};class Jne{constructor(e={}){this.options={localStorageKey:"locale",...e}}detect(){const e=DO.lookup(this.options.localStorageKey)||Kne();return e&&typeof e=="string"?e:null}cacheUserLanguage(e){DO.cacheUserLocale(this.options.localStorageKey,e)}}const vd={sv:qne,"en-US":pv};async function Zne(t){try{const e=`https://cdn.jsdelivr.net/npm/date-fns@2.29.3/esm/locale/${t}/index.js`,{default:n}=await import(e);return n&&(vd[t]=n),null}catch(e){return e}}const Xne=(t,e="P",n)=>t?ite(new Date(t),e,{locale:vd[n]}):"",Qne=(t,e,n)=>t?ute(new Date(t),{...e,locale:vd[n]}):"",ere=typeof window<"u"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;class tre extends PO{constructor(e={}){super(),ere&&PO.call(this),this.options={fallbackLocale:"en-US",...e}}init(e={},n){this.options={...this.options,...e},this.localeLookup=new Jne(this.options);const r=()=>{this.changeLocale(this.options.locale,{cache:!1},i=>{this.isInitialized=!0,this.emit("initialized",this.options),n&&n(i)})};this.options.initImmediate?setTimeout(r,0):r()}changeLocale(e,n={cache:!0},r){this.isLocaleChangingTo=e,this.emit("localeChanging",e);const i=o=>{let l=o;IO.includes(l)||(l=Yne(l)||this.options.fallbackLocale),vd[l]?this.dateFnsLocale=l:(this.dateFnsLocale=this.options.fallbackLocale,Zne(l).then(c=>{c||(this.dateFnsLocale=l,this.emit("localeChanged",l))}))},a=o=>{const l=typeof o=="string"?o:this.options.fallbackLocale;this.locale=l,i(l),this.emit("localeChanged",l),n.cache&&this.localeLookup.cacheUserLanguage(l)};let s=e;s||(s=this.localeLookup.detect()),a(s),r&&r(s)}formatDate(e,n="P",r=this.locale){return Xne(e,n,r)}formatDistanceToNow(e,n,r=this.locale){return Qne(e,n,r)}}const _v=new tre;Z.use($l);const RO=AO,MO={type:"postProcessor",name:"withCount",process:(t,e,n,r)=>{const{count:i}=n||{};return typeof i=="number"?`${i} ${t}`:t}},NO={type:"postProcessor",name:"capitalize",process:t=>typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)},LO=t=>({debug:!1,whitelist:LQ,resources:{sv:lne,en:dne},fallbackLng:"en",saveMissing:!0,missingKeyHandler(e,n,r,i){Ke.info(`i18next: Missing translation lng '${e}', ns '${n}', 'key: '${r}'`)},returnedObjectHandler(e,n,r){return r&&r.ns==="_common"?n:t.t(e,{ns:"_common"})||n},interpolation:{format(e,n,r){if(n==="uppercase")return e.toUpperCase();if(n==="lowercaseSpace")return e&&` ${e}`.toLowerCase();if(n==="inlineSpace")return e&&` ${e}`;if(n==="capitalize")return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1);if(n.startsWith("deepNested")){const i=n.substring(11),a=i?`${i}.${e}`:e;return t.exists(a,{lng:r})?t.t(a,{lng:r}):e}return e}}}),bv=wO.createInstance();bv.use(RO).use(NO).use(MO).init({...LO(bv),namespaces:["_common","views","components","errors","actions","resources","router","iso"],defaultNS:"_common",fallbackNS:"_common"}),_v.init({fallbackLocale:"en-US"});const nre=_v,te=new $l(bv,_v);function rre(t){return Number(t)===t&&t%1!==0}function De(t){if(t===void 0)return"undefined";if(t===null)return"null";if(Array.isArray(t))return"array";if(typeof t=="object"&&!(t instanceof Date))return"object";if(Number.isNaN(t))return"nan";if(t===1/0)return"infinity";if(Number.isInteger(t)||rre(t))return"number";if(typeof t=="string")return"string";if(typeof t=="boolean")return"boolean";if(typeof t=="function")return"function";if(t instanceof Date&&ci(t))return"date"}function ire(t,e){if(!["array","object"].includes(De(t)))throw Error("Arg.0 must be an array or object");if(typeof e!="string")throw Error("Arg.1, path must be a string");let n=e.replace(/\[(.*)\]/gi,(i,a)=>`.${a}`).split(".");return n[0]===""&&(n=n.splice(1)),n.reduce((i,a)=>i&&(typeof i[a]!="object",i[a]),t)}const are=(t={},e={})=>{if(typeof t!="object")throw Error("Query must be an object!");if(typeof e!="object")throw Error("Options must be an object!");const n={prefix:"_",convertFilter:!0,...e};let r="?";function i(a){let s="";function o(l){let c="";return Object.keys(l).forEach((u,d)=>{["or","and"].includes(u)?o(l[u])&&(c+=`${u}(${o(l[u])})`):Object.keys(l[u]).forEach((p,f)=>{let h="";l[u][p]===!0?h=`${u}=${p}`:l[u][p]===!1?h=`${u}!=${p}`:l[u][p]==="contains"&&(h=`${u}*=${p}`),h&&(!["(",","].includes(c[c.length-1])&&c.length&&(c=`${c},`),c+=h)})}),c}return s=`_where=and(${o(a)})`,s}return Object.keys(t).forEach((a,s)=>{if(typeof t[a]>"u")return;const o=n.prefix?n.prefix:"";let l=t[a];typeof l=="string"&&(l=encodeURIComponent(l));let c=`${o}${a}=${l}`;a==="filter"&&n.convertFilter&&(c=i(l)),r=`${r}${s?"&":""}${c}`}),r.length>1?r:""};function Vs(t,e=!1){if(typeof t!="object"||Array.isArray(t))throw Error("Arg.0 must be an object");return{...t,_uniqueId:t._uniqueId&&!e?t._uniqueId:Nn.exports()}}function Ev(t){if(!(typeof t!="object"||t===null))for(const e of Object.keys(t)){const n=t[e];if(!(!n||typeof n!="object")){if(!Array.isArray(n)){Ev(n);continue}for(let r=0;r<n.length;r++)typeof n[r]!="object"||Array.isArray(n[r])||(n[r]=Vs(n[r]));Ev(n)}}}function Tv(t){if(!!t)for(const e of Object.keys(t)){const n=t[e];if(e==="_uniqueId"){delete t[e];continue}if(!(!n||typeof n!="object")){if(!Array.isArray(n)){Tv(n);continue}for(let r=0;r<n.length;r++)typeof n[r]!="object"||Array.isArray(n[r])||Tv(n)}}}function sre(t,e){function n(r){r&&typeof r=="object"&&e.forEach(i=>{delete r[i]})}return NQ(t,n)}function ore(t){return Math.abs(t)%1===.5}function lre(t){return t%2===0}function FO(t){const e=Math.round(t);return ore(t)?lre(e)?e:e-1:e}function wv(t){if(!(!t||typeof t!="object"))for(const e of Object.keys(t)){const n=t[e];if(n&&typeof n=="number")t[e]=FO(n);else if(Array.isArray(n))for(let r=0;r<n.length;r++)wv(t[e][r]);else wv(t[e])}}function cre({price:t,discountType:e,discount:n,quantity:r=1}){if(typeof t>"u")throw Error("Missing param price");if(typeof e>"u")throw Error("Missing param discountType");if(typeof n>"u")throw Error("Missing param discount");if(typeof r>"u")throw Error("Missing param quantity");if(!r)return 0;let i=t*r;return e==="fixed"&&n?i-=n:e==="percentage"&&!!n&&(i*=(100-n/100)/100),FO(i)}function pa(t){if(typeof t!="object"&&!Array.isArray(t))throw Error("Missing valid parameter articles");let e=Array.isArray(t)?t:[t];return e=e.map(n=>{const{price:r,quantity:i,discountType:a,discount:s}=n;return{...n,totalAmount:cre({price:r,quantity:i,discountType:a,discount:s})}}),Array.isArray(t)?e:e[0]}function ure(t){if(typeof t!="object"||Array.isArray(t))throw Error("Arg.0 must be an object");let e={ArticleId:null,article_no:null,id:null,vat:null,isDeductable:!1,isRut:!1,greenRot15:!1,greenRot50:!1,name:"",description:"",type:"service",price:0,currency:"SEK",priceType:"fixed",quantity:1,showPrice:!0,unitType:"unit",position:null,discountType:"fixed",discount:null,houseWorkType:void 0,houseWorkDeductionAmount:null,houseWorkHoursToReport:null,houseWorkMaterialCostToReport:null,bookkeepingPurchaseAccount:null,bookkeepingSalesAccount:null,bookkeepingSalesEUAccount:null,bookkeepingSalesEUVatAccount:null,bookkeepingSalesNonEUAccount:null,invoicesModuleArticleId:null,invoicesDocumentArticleId:null,invoicedAmount:0,totalAmount:0,packageId:null,...t};return e=Vs(e),e=pa(e),e}const Sv=t=>["isDeductable","isRut","greenRot15","greenRot50"].some(e=>!!t[e]),jO=t=>{const{isDeductable:e,isRut:n,greenRot15:r,greenRot50:i}=t||{};return e?"rot":n?"rut":r?"greenRot15":i?"greenRot50":null};function dre(t,e){let n=De(t),r=De(e),i=t,a=e;if(i===null)return-1;if(a===null)return 1;if(n!==r||!["string","date","number"].includes(n))return 0;if(n!=="date"){if(!Number.isNaN(parseInt(i,10))&&!Number.isNaN(parseInt(a,10))&&/^(?:\d|\.)*$/i.test(i)&&/^(?:\d|\.)*$/i.test(a)&&(i=parseInt(i,10),a=parseInt(a,10),n="number",r="number"),n==="number")return i<a?-1:i>a?1:0;if(!ci(di(i))||!ci(di(a)))return i.localeCompare(a);i=di(i),a=di(a)}return dO(i,a)?1:dO(a,i)?-1:0}function Dr(t,e=[]){return!e||De(e)==="array"&&!e.length?t:Object.keys(t).filter(r=>e.includes(r)).reduce((r,i)=>({...r,[i]:t[i]}),{})}function hi(t,e=[]){return!e||De(e)==="array"&&!e.length?t:Object.keys(t).filter(r=>!e.includes(r)).reduce((r,i)=>({...r,[i]:t[i]}),{})}function pre(t={}){const{manageCompany:e,manageProjects:n,manageOwnProjects:r,showPrices:i,manageAtas:a,manageOwnAtas:s,attestTimeTracks:o,manageUsers:l,readInvoices:c,readOwnInvoices:u,modifyInvoices:d,modifyOwnInvoices:p,deleteInvoices:f,deleteOwnInvoices:h,attestInvoices:m,attestOwnInvoices:g,exportInvoices:v,modifyBookkeepingSettings:_}=t;return e&&n&&r&&i&&a&&s&&o&&l&&c&&u&&d&&p&&f&&h&&m&&g&&v&&_?"admin":r&&i&&a&&s&&o?"projectleader":c&&u&&d&&p&&v&&_?"accountant":"member"}function fre(t){return Math.floor(t)!==t&&t.toString().split(".")[1].length||0}function hre(t,{currency:e,locale:n,decimals:r=0,suffix:i=!0,showZero:a=!1,withVat:s=null,hideZeroDecimals:o=!1}={}){if(typeof e>"u"||!e)throw new Error("Missing param currency");let l=t;if(typeof l>"u"&&(l=0),!l&&!a)return"";l=Number(l)||0,l=Math.round(l);let c=IQ({amount:l,currency:e});n&&(c=c.setLocale(n)),s&&(c=c.multiply(100+s).divide(100));let u=i?"$0,0":"0,0",d=r;return o&&(d=fre(c.getAmount()/100)),r&&d&&(u=`${u}.${"0".repeat(d)}`),c.toFormat(u)}function mre(t,e){const{locale:n}=te;return hre(t,{...e,...!e.locale&&{locale:n}})}function gre(){const t=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))}function yd(t){return{deviceType:gre()?"mobile":"desktop",deviceMode:["app","extension"].includes(t)?t:null}}function vre(t,e,n){const r=t.slice();return r.splice(typeof n=="number"?n:t.length,0,e),r}function yre(t,e){const n=t.slice();return n.splice(e,1),n}function _re(t,e,n){return t.map((r,i)=>i!==n?r:{...r,...e})}const bre=t=>({add:(e,n)=>vre(t,e,n),remove:e=>yre(t,e),set:(e,n)=>_re(t,e,n)}),Ere=async(t,{defaultRegion:e}={})=>{if(!t)return null;const{data:n}=await lv.post(`${re.api.baseUrl}/public/validate/phone`,{phone:t,defaultRegion:e});return n};function fa(t){return Array.from(new Set(t))}const UO=(t,e="")=>{const n={};return Object.keys(t).forEach(r=>{const i=t[r],a=e?`${e}.${r}`:r;typeof i=="object"&&!Array.isArray(i)?Object.assign(n,UO(i,a)):n[a]=i}),n},Tre=t=>{const e=Object.keys(t);let n="";return e.forEach(r=>{const i=typeof t[r]=="object",a=i&&t[r].length>=0;i||(n+=`${r}=${t[r]}&`),i&&a&&t[r].forEach(s=>{n+=`${r}=${s}&`})}),n&&n.slice(0,-1)},VO=t=>{_d.push(t)},BO=t=>{_d.map(e=>e(t))};let Bs=!1,_d=[];const wre=(t,{renewToken:e})=>{t.interceptors.request.use(n=>{const r=n;if(r.url.includes("/auth")||r.url.startsWith("/public/"))return r;const i=r.headers["X-TOKEN"];if(!i)return r;const a=Ee.getItem("tokenExpires");if(i&&a){const s=new Date,o=new Date(a);if(s>o)return Bs||(Bs=!0,e().then(c=>{Bs=!1,BO(c),_d=[]})),new Promise(c=>{VO(u=>{r.headers["X-TOKEN"]=u,c(r)})})}return r},n=>Promise.reject(n))},Sre=(t,{renewToken:e})=>{t.interceptors.response.use(n=>n,n=>{if(!n||!n.response)return Promise.reject(n);const{config:r,response:i}=n,{status:a,data:s}=i,{errorCode:o}=s,l=r;if(l.url.startsWith("/public/"))return Promise.reject(n);if(a===401&&o===8001)return Bs||(Bs=!0,e().then(u=>{Bs=!1,BO(u),_d=[]})),new Promise(u=>{VO(d=>{l.headers["X-TOKEN"]=d,u(lv(l))})});if(a===401&&typeof o>"u"){if(l.url.includes("auth/companyUser")&&!l.headers["X-TOKEN"])return Promise.reject(n);if(l.url.includes("auth/actionlink")&&!l.headers["X-TOKEN"])return Promise.reject(n);console.error("User should be logged out!!"),Ee.removeItem("token"),Ee.removeItem("tokenExpires"),Ee.removeItem("refreshToken"),Sr.trigger("user:unauthorized",{error:n})}return Promise.reject(n)})},HO=t=>(Ev(t.data),t),kre=t=>{t.interceptors.response.use(HO,e=>{const{response:n,config:r}=e;if(!n)throw new dQ(e);if(Object.prototype.hasOwnProperty.call(r,"errorHandle")&&r.errorHandle===!1)return Promise.reject(e);const{status:i}=n;switch(i){case 404:throw new lQ(e);case 401:throw new cQ(e);case 412:throw new uQ(e);default:throw new ca(e)}})},Cre=t=>{t.interceptors.response.use(e=>{var n,r;if(((r=(n=e.config)==null?void 0:n.url)==null?void 0:r.includes("document"))&&e.config.method==="post"){const i=JSON.parse(e.config.data);i.__tempId&&(e.data.__tempId=i.__tempId)}return e},e=>Promise.reject(e))},Ore=t=>{t.interceptors.request.use(e=>{if(["post","put"].includes(e.method)&&e.data&&!(e.data instanceof FormData)){const n=oa(e.data);Tv(n),e.data=n}return e},e=>Promise.reject(e))},Are=({baseUrl:t,withCredentials:e,cache:n})=>{const r=lv.create({baseURL:t,timeout:2e4,adapter:n,withCredentials:e,paramsSerializer:d=>Tre(d)});r.defaults.headers["X-CLIENT"]="widget",r.defaults.headers["X-CLIENT-VERSION"]="0.5.1";const i=async(d,p,f=null,h={})=>{const m=p.startsWith("/public/"),g=Ee.getItem("token");switch(g&&!m&&(r.defaults.headers["X-TOKEN"]=g),d){case"get":return r.get(p,h);case"post":return r.post(p,f,h);case"put":return r.put(p,f,h);case"delete":return r.delete(p,h);case"patch":return r.patch(p,f,h);default:throw new Error(`SendRequest failed as method: '${d}' is not implemented`)}},a=(d,p={})=>i("get",d,null,p),s=(d,p={},f={})=>i("put",d,p,f),o=(d,p,f={})=>i("post",d,p,f),l=(d,p={})=>i("delete",d,null,p),c=(d,p={})=>i("patch",d,null,p),u=async()=>{const d=Ee.getItem("refreshToken"),p=await o("/auth/companyUser",{refreshToken:d});if(!p.data||!p.data.token)throw new Error("No token was defined in result");const{token:f,tokenExpires:h,companyUser:m,company:g}=p.data;return Ee.setItem("token",f),Ee.setItem("tokenExpires",h),f};return wre(r,{renewToken:u}),Sre(r,{renewToken:u}),HO(r),kre(r),Ore(r),Cre(r),{instance:r,get:a,put:s,post:o,del:l,patch:c,renewToken:u}},kv=new Map;function $re(t){if(typeof t>"u")throw new Error("Missing valid parameter url");if(typeof t!="string")throw new Error("Parameter url must be a string");const{data:e,cachedAt:n,expiresAt:r}=kv.get(t)||{};return Date.now()>n+6e4*30||r&&Date.now()>r?(kv.delete(t),null):e}const xre=async t=>{const{url:e,params:n={}}=t,r=Object.keys(n).map(s=>`${s}=${n[s]}`).join("&"),i=`${e}${r?`?${r}`:""}`;return $re(i),await Xg(t)},Cv={withCredentials:!0,baseUrl:re.api.baseUrl},{get:Me,post:Ue,put:un,patch:mi,del:lr,instance:fUe,renewToken:Ire}=Are({withCredentials:Cv.withCredentials,baseUrl:Cv.baseUrl,cache:xre});async function zO(t){const e=are(t);return Me(`/project${e}`,{saveCache:!0})}const Pre=async(t,e={})=>Me("/project",t,{params:e}),Dre=async(t,e={})=>Me(`/project/${t}`,{params:e,saveCache:!0}),Rre=async(t,e,n={})=>un(`/project/${t}`,e,{params:n,invalidateCache:{type:"project",id:t}}),Mre=async t=>mi(`/project/${t}`),Nre=async(t,e={})=>lr(`/project/${t}`,{params:e,invalidateCache:{type:"project",id:t}}),Lre=async()=>Me("/project/createDemo"),Fre=async(t,e={})=>Ue("/auth/actionlink",{token:t,...e}),jre=async t=>Ue("/register",t),Ure=async(t,e)=>Ue("/companyUser/forgottenPassword/new",{password:t,resetPasswordToken:e}),Vre=async t=>Ue("/public/consent",t),Bre=async t=>Me(`/projectFile/${t}`),Hre=async t=>Ue("/projectFile",t),zre=async(t,e)=>un(`/projectFile/${t}`,e),Wre=async t=>lr(`/projectFile/${t}`),Gre=async t=>mi(`/projectFile/${t}`),qre=async(t,e={})=>Me(`/projectNote/${t}`,{params:e}),Yre=async(t,e={})=>Ue("/projectNote",t,{params:e}),Kre=async(t,e,n={})=>un(`/projectNote/${t}`,e,{params:n}),Jre=async t=>Me(`/file/${t}`),WO=async t=>Ue("/file",t),Zre=async(t,e)=>un(`/file/${t}`,e),Xre=async t=>lr(`/file/${t}`),Qre=async t=>mi(`/file/${t}`),eie=async(t={})=>Me("/endCustomer",{params:t}),tie=async(t,e={})=>Me(`/endCustomer/${t}`,{params:e}),nie=async(t,e={})=>Ue("/endCustomer",t,{params:e}),rie=async(t,e,n={})=>un(`/endCustomer/${t}`,e,{params:n}),iie=async(t,e={})=>lr(`/endCustomer/${t}`,{params:e}),aie=async(t,e={})=>mi(`/endCustomer/${t}`,{params:e}),sie=async t=>Ue("/search",{type:"endCustomer",query:t}),oie=async(t={})=>Me("/companyUser",{params:t,saveCache:!0}),lie=async(t,e={})=>Me(`/companyUser/${t}`,{params:e,saveCache:!0}),cie=async(t,e={})=>Ue("/companyUser",t,{params:e}),uie=async(t,e,n={})=>un(`/companyUser/${t}`,e,{params:n,invalidateCache:{type:"companyUser",id:t}}),die=async(t,e={})=>lr(`/companyUser/${t}`,{params:e,invalidateCache:{type:"companyUser",id:t}}),pie=async(t,e={})=>mi(`/companyUser/${t}`,{params:e}),GO={getPublic:async(t,e={})=>Me(`/public/companyUser/${t}`,{params:e}),getConnectedUsers:async(t={})=>Me("/companyUser/self/connectedUsers",{params:t}),getConnectedUserAuth:async(t,e={})=>Me(`/companyUser/self/connectedUsers/${t}/auth`,{params:e}),setConnectedUserDefault:async(t,e={})=>un(`/companyUser/self/connectedUsers/${t}/setDefaultAuth`,{params:e}),verifyEmail:async(t,e={})=>Ue("/public/verifyEmail/companyUser",t,{params:e})},fie=async(t,e=null,n={})=>un(`/companyAccount/accountType/${t}`,e,{params:n}),hie=async(t,e)=>Ue(`/project/${t}/projectMember/${e}`,null,{invalidateCache:{type:"project",id:t}}),mie=async(t,e)=>lr(`/project/${t}/projectMember/${e}`,{invalidateCache:{type:"project",id:t}}),gie=async(t={})=>Me("/companyInvoiceSetting",{params:t}),vie=async(t,e={})=>un("/companyInvoiceSetting",t,{params:e}),yie={get:async(t={})=>Me("/companyKYC",{params:t}),post:async(t,e={})=>Ue("/companyKYC",t,{params:e}),sign:async(t,e={})=>Ue("/companyKYC/sign",t,{params:e})},dn={get:async(t,e={})=>Me(`/document/${t}`,{params:e,saveCache:!0}),getAll:async(t={})=>Me("/document",{params:t,saveCache:!0}),post:async(t,e={})=>Ue("/document",t,{params:e}),send:async(t,e={},n={})=>Ue(`/document/${t}/send`,e,{params:n,invalidateCache:{type:"document",id:t}}),clearAnswers:async(t,e={},n={})=>Ue(`/document/${t}/clearAnswers`,e,{params:n,invalidateCache:{type:"document",id:t}}),put:async(t,e,n={})=>un(`/document/${t}`,e,{params:n,invalidateCache:{type:"document",id:t}}),delete:async(t,e={})=>lr(`/document/${t}`,{params:e,invalidateCache:{type:"document",id:t}}),patch:async(t,e={})=>mi(`/document/${t}`,{params:e}),validate:async(t,e={})=>Ue("/documentValidate",t,{params:e})},ha={get:async(t,e={})=>Me(t?`/template/${t}`:"/template",{params:e}),post:async(t,e={})=>Ue("/template",t,{params:e}),put:async(t,e,n={})=>un(`/template/${t}`,e,{params:n}),delete:async(t,e={})=>lr(`/template/${t}`,{params:e}),patch:async(t,e={})=>mi(`/template/${t}`,{params:e})},qO={get:async(t,e={})=>Me(`/public/document/${t}`,{params:e}),put:async(t,e,n={})=>un(`/public/document/${t}`,e,{headers:n}),answer:async(t,e,n={},r={})=>Ue(`/public/document/${t}/answer`,e,{params:n,headers:r}),feedback:async(t,e,n={})=>Ue(`/public/document/${t}/feedback`,e,{params:n})},Ov={getAuthUrl:async(t,e={})=>Me("/extension/authUrl",{params:{...e,service:t}}),getPublicAuthUrl:async(t,e={})=>Me("/public/extension/authUrl",{params:{...e,service:t}}),install:async(t,e,n={})=>Ue("/extension/install",e,{params:{...n,service:t}}),uninstall:async(t,e={})=>lr("/extension/uninstall",{params:{...e,service:t}}),suggestClients:async(t,e={})=>Me("/extension/suggestClients",{params:{...e,service:t},saveCache:!0,cacheTtl:20}),signupWithCrm:async(t,e,n={})=>Ue("/public/extension/register",e,{params:{...n,service:t}}),search:async(t,e={})=>Me("/extension/search",{params:{...e,service:t},saveCache:!0,cacheTtl:10}),getFields:async(t,e={})=>Me("/extension/fields",{params:{...e,service:t},saveCache:!0,cacheTtl:60}),getExternalReferenceDetails:async(t,e={})=>Me("/extension/externalReferenceDetails",{params:{...e,service:t},saveCache:!0,cacheTtl:20}),settings:async(t,e={})=>Me("/extension/settings",{params:{...e,service:t}})},Ut={get:Me,post:Ue,put:un,del:lr,patch:mi,authData:Cv,getProjects:zO},ma="SET_AS_NORMALIZED_DATA",YO=Object.freeze(Object.defineProperty({__proto__:null,SET_AS_NORMALIZED_DATA:ma},Symbol.toStringTag,{value:"Module"})),KO={DO_LOAD_CURRENT_COMPANY:"DO_LOAD_CURRENT_COMPANY",DO_UPDATE_CURRENT_COMPANY:"DO_UPDATE_CURRENT_COMPANY",DO_NORMALIZE_COMPANIES:"DO_NORMALIZE_COMPANIES",FORM_EDIT_COMPANY:"FORM_EDIT_COMPANY",FORM_SUBMIT_COMPANY:"FORM_SUBMIT_COMPANY",FORM_NEW_COMPANY_BRANDING:"FORM_NEW_COMPANY_BRANDING",FORM_EDIT_COMPANY_BRANDING:"FORM_EDIT_COMPANY_BRANDING",FORM_SUBMIT_COMPANY_BRANDING:"FORM_SUBMIT_COMPANY_BRANDING",UPDATE_COMPANY_ACCOUNT_TYPE:"UPDATE_COMPANY_ACCOUNT_TYPE"},Av={SET_COMPANIES:"SET_COMPANIES",CLEAR_COMPANIES:"CLEAR_COMPANIES",SET_COMPANIES_FETCHING:"SET_COMPANIES_FETCHING",SET_COMPANIES_POSTING:"SET_COMPANIES_POSTING"},JO={LOAD_COMPANY_USERS:"LOAD_COMPANY_USERS",LOAD_COMPANY_USER:"LOAD_COMPANY_USER",DO_NORMALIZE_COMPANY_USERS:"DO_NORMALIZE_COMPANY_USERS",UPDATE_COMPANY_USER:"UPDATE_COMPANY_USER",CREATE_COMPANY_USER:"CREATE_COMPANY_USER",DELETE_COMPANY_USER:"DELETE_COMPANY_USER",PATCH_COMPANY_USER:"PATCH_COMPANY_USER",FORM_NEW_COMPANY_USER:"FORM_NEW_COMPANY_USER",FORM_EDIT_COMPANY_USER:"FORM_EDIT_COMPANY_USER",FORM_SUBMIT_COMPANY_USER:"FORM_SUBMIT_COMPANY_USER"},$v={SET_COMPANY_USERS:"SET_COMPANY_USERS",DELETE_COMPANY_USER:"DELETE_COMPANY_USER",SET_COMPANY_USERS_FETCHING:"SET_COMPANY_USERS_FETCHING",SET_COMPANY_USERS_POSTING:"SET_COMPANY_USERS_POSTING"},ZO={LOAD_PROJECT_FILE:"LOAD_PROJECT_FILE",CREATE_PROJECT_FILE:"CREATE_PROJECT_FILE",UPDATE_PROJECT_FILE:"UPDATE_PROJECT_FILE",DELETE_PROJECT_FILE:"DELETE_PROJECT_FILE",PATCH_PROJECT_FILE:"PATCH_PROJECT_FILE"},bd={SET_PROJECT_FILES:"SET_PROJECT_FILES",DELETE_PROJECT_FILE:"DELETE_PROJECT_FILE"},cr={...ZO,LOAD_PROJECTS:"LOAD_PROJECTS",LOAD_PROJECT:"LOAD_PROJECT",LOAD_PUBLIC_PROJECT:"LOAD_PUBLIC_PROJECT",CREATE_PROJECT:"CREATE_PROJECT",CREATE_DEMOPROJECT:"CREATE_DEMOPROJECT",UPDATE_PROJECT:"UPDATE_PROJECT",DELETE_PROJECT:"DELETE_PROJECT",PATCH_PROJECT:"PATCH_PROJECT",FORM_EDIT_PROJECT:"FORM_EDIT_PROJECT",DO_SUBMIT_PROJECT:"DO_SUBMIT_PROJECT",SUBMIT_PROJECT:"SUBMIT_PROJECT",DO_LOAD_PROJECT:"DO_LOAD_PROJECT",DO_LOAD_PROJECTS:"DO_LOAD_PROJECTS",DO_LOAD_PROJECTS_COUNT:"DO_LOAD_PROJECTS_COUNT",LOAD_PROJECTS_FOR_CLIENT:"LOAD_PROJECTS_FOR_CLIENT",LOAD_PROJECTS_FOR_USER:"LOAD_PROJECTS_FOR_USER",FORM_SUBMIT_PROJECT:"FORM_SUBMIT_PROJECT",DO_CREATE_PROJECT_NOTE:"DO_CREATE_PROJECT_NOTE",FORM_EDIT_PROJECT_NOTE:"FORM_EDIT_PROJECT_NOTE",FORM_NEW_PROJECT_NOTE:"FORM_NEW_PROJECT_NOTE",FORM_SUBMIT_PROJECT_NOTE:"FORM_SUBMIT_PROJECT_NOTE",LOAD_PROJECT_NOTE:"LOAD_PROJECT_NOTE",DO_UPDATE_PROJECT_NOTE:"DO_UPDATE_PROJECT_NOTE",LOAD_EVENTS_FOR_PROJECT:"LOAD_EVENTS_FOR_PROJECT",DELETE_PROJECT_MEMBER:"SUBMIT_PROJECT_MEMBER",SUBMIT_PROJECT_MEMBER:"DELETE_PROJECT_MEMBER",SET_PROJECT_FILTER:"SET_PROJECT_FILTER",SET_PROJECT_SORT:"SET_PROJECT_SORT",SET_QUICKVIEW_PROJECT:"SET_QUICKVIEW_PROJECT",SET_PROJECT_LEADER:"SET_PROJECT_LEADER",CLEAR_PROJECTS:"CLEAR_PROJECTS"},pn={...bd,SET_PROJECTS:"SET_PROJECTS",SET_PROJECTS_FETCHING:"SET_PROJECTS_FETCHING",SET_PROJECTS_POSTING:"SET_PROJECTS_POSTING",SET_PROJECTS_CAN_FETCH_MORE:"SET_PROJECTS_CAN_FETCH_MORE",SET_PROJECTS_COUNT:"SET_PROJECTS_COUNT",CLEAR_PROJECT_DATA:"CLEAR_PROJECT_DATA",SET_PROJECT_NOTES:"SET_PROJECT_NOTES",SET_PROJECT_NOTES_FETCHING:"SET_PROJECT_NOTES_FETCHING",SET_PROJECT_NOTES_POSTING:"SET_PROJECT_NOTES_POSTING",SET_EVENTS:"SET_EVENTS",DELETE_MANY_PROJECTS:"DELETE_MANY_PROJECTS",ADD_PROJECT_MEMBER:"ADD_PROJECT_MEMBER",DELETE_PROJECT_MEMBER:"DELETE_PROJECT_MEMBER"},XO={LOAD_INVOICE_FORM:"LOAD_INVOICE_FORM",LOAD_DOCUMENT2_INVOICE_FORM:"LOAD_DOCUMENT2_INVOICE_FORM",LOAD_CREDIT_INVOICE_FORM:"LOAD_CREDIT_INVOICE_FORM",SUBMIT_INVOICE_FORM:"SUBMIT_INVOICE_FORM",LOAD_CAMPAIGN_INVOICE_FORM:"LOAD_CAMPAIGN_INVOICE_FORM",SET_KYC_FORM:"SET_KYC_FORM",DO_SAVE_KYC_FORM:"DO_SAVE_KYC_FORM"},_ie={},bie={SET_FORM_ARTICLE:"SET_FORM_ARTICLE",REMOVE_FORM_ARTICLE:"REMOVE_FORM_ARTICLE"},QO={LOAD_DOCUMENT2_FORM:"LOAD_DOCUMENT2_FORM",LOAD_DOCUMENT2_PUBLIC_FORM:"LOAD_DOCUMENT2_PUBLIC_FORM",LOAD_DUPLICATE_DOCUMENT2_FORM:"LOAD_DUPLICATE_DOCUMENT2_FORM",SAVE_DYNDOC_FORM:"SAVE_DYNDOC_FORM",CLEAR_DYNDOC_FORM:"CLEAR_DYNDOC_FORM",DO_SAVE_DYNDOC:"DO_SAVE_DYNDOC",HANDLE_DOCUMENT2_EDIT:"HANDLE_DOCUMENT2_EDIT",SAVE_TEMPLATE_FORM:"SAVE_TEMPLATE_FORM",LOAD_EXTERNAL_FORM_FIELDS:"LOAD_EXTERNAL_FORM_FIELDS"},Eie={},ur={...XO,...bie,...QO,LOAD_DOCUMENT_FORM:"LOAD_DOCUMENT_FORM",LOAD_UPGRADE_DOCUMENT_FORM:"LOAD_UPGRADE_DOCUMENT_FORM",LOAD_ATA_DOCUMENT_FORM:"LOAD_ATA_DOCUMENT_FORM",LOAD_DUPLICATE_DOCUMENT_FORM:"LOAD_DUPLICATE_DOCUMENT_FORM",LOAD_DEMO_DOCUMENT_FORM:"LOAD_DEMO_DOCUMENT_FORM",SAVE_DOCUMENT_FORM:"SAVE_DOCUMENT_FORM",SAVE_DOCUMENT_FORM_AND_SEND:"SAVE_DOCUMENT_FORM_AND_SEND",DO_SAVE_DOCUMENT:"DO_SAVE_DOCUMENT",SUBMIT_DOCUMENT_AND_SEND:"SUBMIT_DOCUMENT_AND_SEND",FORM_DOCUMENT_SET_CLIENT:"FORM_DOCUMENT_SET_CLIENT",FORM_DOCUMENT_SUBMIT_CLIENT:"FORM_DOCUMENT_SUBMIT_CLIENT",FORM_RESET_OLD:"FORM_RESET_OLD",FORM_CLEAR_FORM:"FORM_CLEAR_FORM",SET_FORM:"SET_FORM",SET_FORM_VALUE:"SET_FORM_VALUE",REMOVE_FORM_VALUE:"REMOVE_FORM_VALUE",REMOVE_FORM_KEY_VALUE:"REMOVE_FORM_KEY_VALUE"},dr={..._ie,...Eie,SET_FORM:"SET_FORM",CLEAR_FORM:"CLEAR_FORM",SET_FORM_VALUE:"SET_FORM_VALUE",REMOVE_FORM_VALUE:"REMOVE_FORM_VALUE",REMOVE_FORM_KEY_VALUE:"REMOVE_FORM_KEY_VALUE"},eA={DELETE_DOCUMENT2:"DELETE_DOCUMENT2",DO_CREATE_DOCUMENT2:"DO_CREATE_DOCUMENT2",DO_LOAD_DOCUMENT2:"DO_LOAD_DOCUMENT2",DO_LOAD_DOCUMENTS2:"DO_LOAD_DOCUMENTS2",DO_UPDATE_DOCUMENT2:"DO_UPDATE_DOCUMENT2",LOAD_DOCUMENT2:"LOAD_DOCUMENT2",LOAD_DOCUMENTS2:"LOAD_DOCUMENTS2",LOAD_DOCUMENTS2_EXTERNAL:"LOAD_DOCUMENTS2_EXTERNAL",PATCH_DOCUMENT2:"PATCH_DOCUMENT2",UPDATE_DOCUMENT2:"UPDATE_DOCUMENT2",UPDATE_DOCUMENT2_STATUS:"UPDATE_DOCUMENT2_STATUS",DO_SEND_DOCUMENT2:"DO_SEND_DOCUMENT2",SEND_REMINDER_DOCUMENT2:"SEND_REMINDER_DOCUMENT2",REQUEST_PROPERTY_DOCUMENT2:"REQUEST_PROPERTY_DOCUMENT2",CLEAR_DOCUMENT2_ANSWERS:"CLEAR_DOCUMENT2_ANSWERS",ANSWER_OWN_DOCUMENT2:"ANSWER_OWN_DOCUMENT2"},xv={DELETE_MANY_DOCUMENTS2:"DELETE_MANY_DOCUMENTS2",SET_DOCUMENTS2:"SET_DOCUMENTS2",SET_DOCUMENT2_FETCHING:"SET_DOCUMENT2_FETCHING",SET_DOCUMENT2_POSTING:"SET_DOCUMENT2_POSTING"},Ed={LOAD_FILE:"LOAD_FILE",CREATE_FILE:"CREATE_FILE",UPDATE_FILE:"UPDATE_FILE",DELETE_FILE:"DELETE_FILE",PATCH_FILE:"PATCH_FILE",FORM_NEW_FILE:"FORM_NEW_FILE",FORM_EDIT_FILE:"FORM_EDIT_FILE",FORM_SUBMIT_FILE:"FORM_SUBMIT_FILE"},Iv={UPDATE_MANY_FILES:"UPDATE_MANY_FILES",DELETE_ONE_FILE:"DELETE_ONE_FILE",CLEAR_FILES:"CLEAR_FILES",SET_FILES_FETCHING:"SET_FILES_FETCHING",SET_FILES_POSTING:"SET_FILES_POSTING"},tA={DO_LOAD_INVOICE_SETTINGS:"DO_LOAD_INVOICE_SETTINGS",LOAD_INVOICE_SETTINGS:"LOAD_INVOICE_SETTINGS",DO_UPDATE_INVOICE_SETTINGS:"DO_UPDATE_INVOICE_SETTINGS",UPDATE_INVOICE_SETTINGS:"UPDATE_INVOICE_SETTINGS",FORM_EDIT_INVOICE_SETTINGS:"FORM_EDIT_INVOICE_SETTINGS",FORM_SUBMIT_INVOICE_SETTINGS:"FORM_SUBMIT_INVOICE_SETTINGS"},Pv={SET_INVOICE_SETTINGS_FETCHING:"SET_INVOICE_SETTINGS_FETCHING",SET_INVOICE_SETTINGS_POSTING:"SET_INVOICE_SETTINGS_POSTING"},nA={...tA,DO_LOAD_ALL_SETTINGS:"DO_LOAD_ALL_SETTINGS",LOAD_ALL_SETTINGS:"LOAD_ALL_SETTINGS",DO_LOAD_SETTINGS_COMPANY:"DO_LOAD_SETTINGS_COMPANY",DO_LOAD_SETTINGS_COMPANYUSER:"DO_LOAD_SETTINGS_COMPANYUSER",LOAD_SETTINGS_COMPANY:"LOAD_SETTINGS_COMPANY",LOAD_SETTINGS_COMPANYUSER:"LOAD_SETTINGS_COMPANYUSER",UPDATE_SETTINGS:"UPDATE_SETTINGS",DO_UPDATE_SETTINGS:"DO_UPDATE_SETTINGS",FORM_EDIT_COMPANY_SETTINGS:"FORM_EDIT_COMPANY_SETTINGS",FORM_SUBMIT_COMPANY_SETTINGS:"FORM_SUBMIT_COMPANY_SETTINGS",FORM_EDIT_COMPANY_USER_SETTINGS:"FORM_EDIT_COMPANY_USER_SETTINGS",FORM_SUBMIT_COMPANY_USER_SETTINGS:"FORM_SUBMIT_COMPANY_USER_SETTINGS"},rA={...Pv,SET_SETTINGS:"SET_SETTINGS",CLEAR_SETTINGS:"CLEAR_SETTINGS",SET_SETTINGS_FETCHING:"SET_SETTINGS_FETCHING",SET_SETTINGS_POSTING:"SET_SETTINGS_POSTING"},Tie={LOAD_ARTICLES:"LOAD_ARTICLES",LOAD_ARTICLE:"LOAD_ARTICLE",SET_ARTICLES:"SET_ARTICLES",UPDATE_ARTICLE:"UPDATE_ARTICLE",DO_CREATE_ARTICLE:"DO_CREATE_ARTICLE",DELETE_ARTICLE:"DELETE_ARTICLE",PATCH_ARTICLE:"PATCH_ARTICLE",SEARCH_ARTICLE:"SEARCH_ARTICLE",FORM_NEW_ARTICLE:"FORM_NEW_ARTICLE",FORM_EDIT_ARTICLE:"FORM_EDIT_ARTICLE",FORM_SUBMIT_ARTICLE:"FORM_SUBMIT_ARTICLE"},iA={LOAD_ENDCUSTOMERS:"LOAD_ENDCUSTOMERS",LOAD_ENDCUSTOMER:"LOAD_ENDCUSTOMER",UPDATE_ENDCUSTOMER:"UPDATE_ENDCUSTOMER",CREATE_ENDCUSTOMER:"CREATE_ENDCUSTOMER",DELETE_ENDCUSTOMER:"DELETE_ENDCUSTOMER",PATCH_ENDCUSTOMER:"PATCH_ENDCUSTOMER",FORM_NEW_ENDCUSTOMER:"FORM_NEW_ENDCUSTOMER",FORM_EDIT_ENDCUSTOMER:"FORM_EDIT_ENDCUSTOMER",FORM_SUBMIT_ENDCUSTOMER:"FORM_SUBMIT_ENDCUSTOMER"},Hs={CLEAR_END_CUSTOMER:"CLEAR_END_CUSTOMER",SET_ENDCUSTOMERS:"SET_ENDCUSTOMERS",DELETE_ENDCUSTOMER:"DELETE_ENDCUSTOMER",SET_ENDCUSTOMER_FETCHING:"SET_ENDCUSTOMER_FETCHING",SET_ENDCUSTOMER_POSTING:"SET_ENDCUSTOMER_POSTING"},wie={LOAD_CERTIFICATES:"LOAD_CERTIFICATES",DO_SET_COMPANY_CERTIFICATES:"DO_SET_COMPANY_CERTIFICATES",SUBMIT_CERTIFICATES:"SUBMIT_CERTIFICATES"},Sie={SET_CERTIFICATES:"SET_CERTIFICATES",CLEAR_CERTIFICATES:"CLEAR_CERTIFICATES",SET_CERTIFICATES_FETCHING:"SET_CERTIFICATES_FETCHING",SET_CERTIFICATES_POSTING:"SET_CERTIFICATES_POSTING"},kie={LOAD_COMPANY_REFERENCES:"LOAD_COMPANY_REFERENCES",LOAD_COMPANY_REFERENCE:"LOAD_COMPANY_REFERENCE",CREATE_COMPANY_REFERENCE:"CREATE_COMPANY_REFERENCE",UPDATE_COMPANY_REFERENCE:"UPDATE_COMPANY_REFERENCE",DELETE_COMPANY_REFERENCE:"DELETE_COMPANY_REFERENCE",PATCH_COMPANY_REFERENCE:"PATCH_COMPANY_REFERENCE",FORM_NEW_COMPANY_REFERENCE:"FORM_NEW_COMPANY_REFERENCE",FORM_EDIT_COMPANY_REFERENCE:"FORM_EDIT_COMPANY_REFERENCE",FORM_SUBMIT_COMPANY_REFERENCE:"FORM_SUBMIT_COMPANY_REFERENCE"},Cie={SET_COMPANY_REFERENCES:"SET_COMPANY_REFERENCES",DELETE_COMPANY_REFERENCE:"DELETE_COMPANY_REFERENCE",CLEAR_COMPANY_REFERENCES:"CLEAR_COMPANY_REFERENCES",SET_COMPANY_REFERENCE_FETCHING:"SET_COMPANY_REFERENCE_FETCHING",SET_COMPANY_REFERENCE_POSTING:"SET_COMPANY_REFERENCE_POSTING"},Oie={LOAD_COMPANY_REFERENCE_ITEMS:"LOAD_COMPANY_REFERENCE_ITEMS",LOAD_COMPANY_REFERENCE_ITEM:"LOAD_COMPANY_REFERENCE_ITEM",SET_COMPANY_REFERENCE_ITEMS:"SET_COMPANY_REFERENCE_ITEMS",CREATE_COMPANY_REFERENCE_ITEM:"CREATE_COMPANY_REFERENCE_ITEM",UPDATE_COMPANY_REFERENCE_ITEM:"UPDATE_COMPANY_REFERENCE_ITEM",DELETE_COMPANY_REFERENCE_ITEM:"DELETE_COMPANY_REFERENCE_ITEM",FORM_NEW_COMPANY_REFERENCE_ITEM:"FORM_NEW_COMPANY_REFERENCE_ITEM",FORM_SUBMIT_COMPANY_REFERENCE_ITEMS:"FORM_SUBMIT_COMPANY_REFERENCE_ITEMS"},Aie={SET_COMPANY_REFERENCE_ITEMS:"SET_COMPANY_REFERENCE_ITEMS",DELETE_COMPANY_REFERENCE_ITEM:"DELETE_COMPANY_REFERENCE_ITEM",CLEAR_COMPANY_REFERENCE_ITEMS:"CLEAR_COMPANY_REFERENCE_ITEMS"},$ie={LOAD_TEMPLATE_MESSAGES:"LOAD_TEMPLATE_MESSAGES",LOAD_TEMPLATE_MESSAGE:"LOAD_TEMPLATE_MESSAGE",CREATE_TEMPLATE_MESSAGE:"CREATE_TEMPLATE_MESSAGE",UPDATE_TEMPLATE_MESSAGE:"UPDATE_TEMPLATE_MESSAGE",DELETE_TEMPLATE_MESSAGE:"DELETE_TEMPLATE_MESSAGE",PATCH_TEMPLATE_MESSAGE:"PATCH_TEMPLATE_MESSAGE",FORM_NEW_TEMPLATE_MESSAGE:"FORM_NEW_TEMPLATE_MESSAGE",FORM_EDIT_TEMPLATE_MESSAGE:"FORM_EDIT_TEMPLATE_MESSAGE",FORM_SUBMIT_TEMPLATE_MESSAGE:"FORM_SUBMIT_TEMPLATE_MESSAGE"},xie={LOAD_NOTIFICATIONS:"LOAD_NOTIFICATIONS",LOAD_UNREAD_NOTIFICATIONS:"LOAD_UNREAD_NOTIFICATIONS",LOAD_NOTIFICATION:"LOAD_NOTIFICATION",SET_READ_FOR_PROJECT:"SET_READ_FOR_PROJECT",SET_READ_FOR_INVOICE:"SET_READ_FOR_INVOICE",SET_NOTIFICATION_READ:"SET_NOTIFICATION_READ",SET_ALL_NOTIFICATION_READ:"SET_ALL_NOTIFICATION_READ",DO_CREATE_NOTIFICATION:"DO_CREATE_NOTIFICATION"},Iie={SET_NOTIFICATIONS:"SET_NOTIFICATIONS",CLEAR_NOTIFICATIONS:"CLEAR_NOTIFICATIONS",DELETE_MANY_NOTIFICATIONS:"DELETE_MANY_NOTIFICATIONS",SET_NOTIFICATIONS_FETCHED_AT:"SET_NOTIFICATIONS_FETCHED_AT",SET_NOTIFICATIONS_FETCHING:"SET_NOTIFICATIONS_FETCHING",SET_NOTIFICATIONS_POSTING:"SET_NOTIFICATIONS_POSTING"},Pie={LOAD_BOOKKEEPING_EXPORTS:"LOAD_BOOKKEEPING_EXPORTS",CREATE_BOOKKEEPING_EXPORT:"CREATE_BOOKKEEPING_EXPORT",CREATE_ROT_RUT_XML:"CREATE_ROT_RUT_XML"},Die={},Rie={LOAD_INVOICE_NOTE:"LOAD_INVOICE_NOTE",DO_CREATE_INVOICE_NOTE:"DO_CREATE_INVOICE_NOTE",DO_UPDATE_INVOICE_NOTE:"DO_UPDATE_INVOICE_NOTE",FORM_NEW_INVOICE_NOTE:"FORM_NEW_INVOICE_NOTE",FORM_EDIT_INVOICE_NOTE:"FORM_EDIT_INVOICE_NOTE",FORM_SUBMIT_INVOICE_NOTE:"FORM_SUBMIT_INVOICE_NOTE"},Mie={SET_INVOICE_NOTES:"SET_INVOICE_NOTES",SET_INVOICE_NOTES_FETCHING:"SET_INVOICE_NOTES_FETCHING",SET_INVOICE_NOTES_POSTING:"SET_INVOICE_NOTES_POSTING"},Nie={...Pie,...Rie,DO_LOAD_INVOICE:"DO_LOAD_INVOICE",DELETE_INVOICE:"DELETE_INVOICE",DO_CREATE_INVOICE:"DO_CREATE_INVOICE",DO_LOAD_INVOICES:"DO_LOAD_INVOICES",LOAD_INVOICE:"LOAD_INVOICE",LOAD_INVOICES:"LOAD_INVOICES",UPDATE_INVOICE:"UPDATE_INVOICE",DO_UPDATE_INVOICE:"DO_UPDATE_INVOICE",ATTEST_INVOICE:"ATTEST_INVOICE",DO_ATTEST_INVOICE:"DO_ATTEST_INVOICE",START_INVOICE_DISPUTE:"START_INVOICE_DISPUTE",CANCEL_INVOICE_DISPUTE:"CANCEL_INVOICE_DISPUTE",REGISTER_INVOICE_PAYMENT:"REGISTER_INVOICE_PAYMENT",REGISTER_INVOICE_WRITEOFF:"REGISTER_INVOICE_WRITEOFF",SEND_INVOICE:"SEND_INVOICE",SEND_INVOICE_REMINDER:"SEND_INVOICE_REMINDER",UPDATE_INVOICE_ADDRESS:"UPDATE_INVOICE_ADDRESS",REGISTER_INVOICING:"REGISTER_INVOICING",LOAD_UNMATCHED_PAYMENTS:"LOAD_UNMATCHED_PAYMENTS",MATCH_PAYMENT:"MATCH_PAYMENT",DELETE_UNMATCHED_PAYMENT:"DELETE_UNMATCHED_PAYMENT",DO_SELL_INVOICE:"DO_SELL_INVOICE",SELL_INVOICE:"SELL_INVOICE",CANCEL_SELL_INVOICE:"CANCEL_SELL_INVOICE",GET_KYC_STATUS:"GET_KYC_STATUS",SIGN_KYC:"SIGN_KYC",CREATE_INVOICE_INTEREST:"CREATE_INVOICE_INTEREST",SET_INVOICE_REGION_SWEDEN_EXPORTED_HOUSEWORK:"SET_INVOICE_REGION_SWEDEN_EXPORTED_HOUSEWORK",SET_INVOICE_REGION_SWEDEN_PROCESSED_HOUSEWORK:"SET_INVOICE_REGION_SWEDEN_PROCESSED_HOUSEWORK",SET_INVOICE_FILTER:"SET_INVOICE_FILTER",SET_INVOICE_SORT:"SET_INVOICE_SORT"},Lie={...Die,...Mie,DELETE_MANY_INVOICES:"DELETE_MANY_INVOICES",SET_INVOICES:"SET_INVOICES",SET_INVOICES_STATUS_COUNT:"SET_INVOICES_STATUS_COUNT",SET_INVOICES_FETCHING:"SET_INVOICES_FETCHING",SET_INVOICES_POSTING:"SET_INVOICES_POSTING",SET_INVOICE_FILTER:"SET_INVOICE_FILTER",SET_INVOICE_SORT:"SET_INVOICE_SORT"},Fie={LOAD_TIME_TRACKS:"LOAD_TIME_TRACKS",LOAD_TIME_TRACK:"LOAD_TIME_TRACK",CREATE_TIME_TRACK:"CREATE_TIME_TRACK",UPDATE_TIME_TRACK:"UPDATE_TIME_TRACK",DELETE_TIME_TRACK:"DELETE_TIME_TRACK",PATCH_TIME_TRACK:"PATCH_TIME_TRACK",ATTEST_TIME_TRACK:"ATTEST_TIME_TRACK",TIME_TRACK_START_TIMER:"TIME_TRACK_START_TIMER",TIME_TRACK_STOP_TIMER:"TIME_TRACK_STOP_TIMER",TIME_TRACK_GET_TIMER:"TIME_TRACK_GET_TIMER",TIME_TRACK_CLEAR_TIMER:"TIME_TRACK_CLEAR_TIMER",FORM_NEW_TIME_TRACK:"FORM_NEW_TIME_TRACK",FORM_EDIT_TIME_TRACK:"FORM_EDIT_TIME_TRACK",FORM_SUBMIT_TIME_TRACK:"FORM_SUBMIT_TIME_TRACK"},jie={SET_TIME_TRACKS:"SET_TIME_TRACKS",DELETE_TIME_TRACK:"DELETE_TIME_TRACK",CLEAR_TIME_TRACKS:"CLEAR_TIME_TRACKS",SET_TIME_TRACK_TIMER:"SET_TIME_TRACK_TIMER",SET_TIME_TRACKS_FETCHING:"SET_TIME_TRACKS_FETCHING",SET_TIME_TRACKS_POSTING:"SET_TIME_TRACKS_POSTING"},aA={DO_CREATE_TEMPLATE:"DO_CREATE_TEMPLATE",DO_LOAD_TEMPLATE:"DO_LOAD_TEMPLATE",DO_LOAD_TEMPLATES:"DO_LOAD_TEMPLATES",DO_UPDATE_TEMPLATE:"DO_UPDATE_TEMPLATE",LOAD_TEMPLATE:"LOAD_TEMPLATE",LOAD_TEMPLATES:"LOAD_TEMPLATES",UPDATE_TEMPLATE:"UPDATE_TEMPLATE",DELETE_TEMPLATE:"DELETE_TEMPLATE",PATCH_TEMPLATE:"PATCH_TEMPLATE",HIDE_TEMPLATE:"HIDE_TEMPLATE",DUPLICATE_PROTECTED_TEMPLATE:"DUPLICATE_PROTECTED_TEMPLATE"},Dv={SET_TEMPLATES:"SET_TEMPLATES",SET_TEMPLATE_FETCHING:"SET_TEMPLATE_FETCHING",SET_TEMPLATE_POSTING:"SET_TEMPLATE_POSTING",DELETE_MANY_TEMPLATES:"DELETE_MANY_TEMPLATES"},Uie={DO_LOAD_PUBLIC_DOCUMENT:"DO_LOAD_PUBLIC_DOCUMENT",DO_LOAD_PUBLIC_DOCUMENTS:"DO_LOAD_PUBLIC_DOCUMENTS",PUT_PUBLIC_DOCUMENT:"PUT_PUBLIC_DOCUMENT",PUT_CURRENT_PUBLIC_DOCUMENT:"PUT_CURRENT_PUBLIC_DOCUMENT",LOAD_PUBLIC_DOCUMENT:"LOAD_PUBLIC_DOCUMENT",LOAD_PUBLIC_DOCUMENTS:"LOAD_PUBLIC_DOCUMENTS",ANSWER_PUBLIC_DOCUMENT:"ANSWER_PUBLIC_DOCUMENT",ANSWER_CURRENT_PUBLIC_DOCUMENT:"ANSWER_CURRENT_PUBLIC_DOCUMENT",DO_SET_CURRENT_DOCUMENT:"DO_SET_CURRENT_DOCUMENT",SET_CURRENT_PUBLIC_DOCUMENT_VALUE:"SET_CURRENT_PUBLIC_DOCUMENT_VALUE",RELOAD_CURRENT_DOCUMENT:"RELOAD_CURRENT_DOCUMENT",LOAD_PUBLIC_COMPANY:"LOAD_PUBLIC_COMPANY",LOAD_CLIENT_DOCUMENTS:"LOAD_CLIENT_DOCUMENTS",LOAD_CLIENT_INVOICES:"LOAD_CLIENT_INVOICES",REQUEST_MAGIC_LINK:"REQUEST_MAGIC_LINK"},Vie={SET_PUBLIC_DOCUMENTS:"SET_PUBLIC_DOCUMENTS",SET_PUBLIC_INVOICES:"SET_PUBLIC_INVOICES",SET_PUBLIC_DOCUMENTS_FETCHING:"SET_PUBLIC_DOCUMENTS_FETCHING",SET_PUBLIC_DOCUMENTS_POSTING:"SET_PUBLIC_DOCUMENTS_POSTING",SET_CURRENT_DOCUMENT:"SET_CURRENT_DOCUMENT",SET_CURRENT_DOCUMENT_VALUE:"SET_CURRENT_DOCUMENT_VALUE",SET_PUBLIC_COMPANIES:"SET_PUBLIC_COMPANIES",SET_VIEWER:"SET_VIEWER"},Bie={LOAD_DOCUMENT_TERMS:"LOAD_DOCUMENT_TERMS",LOAD_DOCUMENT_TERM:"LOAD_DOCUMENT_TERM",CREATE_DOCUMENT_TERM:"CREATE_DOCUMENT_TERM",UPDATE_DOCUMENT_TERM:"UPDATE_DOCUMENT_TERM",DELETE_DOCUMENT_TERM:"DELETE_DOCUMENT_TERM",PATCH_DOCUMENT_TERM:"PATCH_DOCUMENT_TERM",FORM_NEW_DOCUMENT_TERM:"FORM_NEW_DOCUMENT_TERM",FORM_EDIT_DOCUMENT_TERM:"FORM_EDIT_DOCUMENT_TERM",FORM_SUBMIT_DOCUMENT_TERM:"FORM_SUBMIT_DOCUMENT_TERM"},Hie={SET_DOCUMENT_TERMS:"SET_DOCUMENT_TERMS",DELETE_DOCUMENT_TERM:"DELETE_DOCUMENT_TERM",CLEAR_DOCUMENT_TERMS:"CLEAR_DOCUMENT_TERMS",SET_DOCUMENT_TERMS_FETCHING:"SET_DOCUMENT_TERMS_FETCHING",SET_DOCUMENT_TERMS_POSTING:"SET_DOCUMENT_TERMS_POSTING"},zie={LOAD_UNIT_TYPES:"LOAD_UNIT_TYPES",LOAD_UNIT_TYPE:"LOAD_UNIT_TYPE",CREATE_UNIT_TYPE:"CREATE_UNIT_TYPE",UPDATE_UNIT_TYPE:"UPDATE_UNIT_TYPE",DELETE_UNIT_TYPE:"DELETE_UNIT_TYPE"},Wie={SET_UNIT_TYPES:"SET_UNIT_TYPES",DELETE_UNIT_TYPE:"DELETE_UNIT_TYPE",SET_UNIT_TYPE_FETCHING:"SET_UNIT_TYPE_FETCHING",SET_UNIT_TYPE_POSTING:"SET_UNIT_TYPE_POSTING"},Rr={...YO,application:yl,projects:cr,forms:ur,documents2:eA,files:Ed,settings:nA,articles:Tie,endCustomers:iA,certificates:wie,companies:KO,companyUsers:JO,companyReferences:kie,companyReferenceItems:Oie,templateMessages:$ie,notifications:xie,invoices:Nie,timeTracks:Fie,templates:aA,publicDocuments:Uie,documentTerms:Bie,unitTypes:zie,stripe:{LOAD_PRICES:"LOAD_PRICES",RESET_STRIPE_FORM:"RESET_STRIPE_FORM",SET_STRIPE_FORM_VALUE:"SET_STRIPE_FORM_VALUE",SET_FORM_PROMOTION:"SET_FORM_PROMOTION",SUBMIT_PROMOTION_CODE:"SUBMIT_PROMOTION_CODE",SUBMIT_PAYMENT_METHOD:"SUBMIT_PAYMENT_METHOD",SUBMIT_FORM_PLAN:"SUBMIT_FORM_PLAN",CONFIRM_PAYMENT:"CONFIRM_PAYMENT",REMOVE_SUBSCRIPTION_ITEM:"REMOVE_SUBSCRIPTION_ITEM",SUBMIT_FORM_PAYMENT:"SUBMIT_STRIPE_FORM_PAYMENT",SUBMIT_FORM_PRODUCTS:"SUBMIT_STRIPE_FORM_PRODUCTS"},CREATE_ARTICLE:"CREATE_ARTICLE",CREATE_COMPANY_USER:"CREATE_COMPANY_USER",CREATE_ENDCUSTOMER:"CREATE_ENDCUSTOMER",CREATE_PROJECT:"CREATE_PROJECT",DELETE_ARTICLE:"DELETE_ARTICLE",DELETE_COMPANY_USER:"DELETE_COMPANY_USER",DELETE_ENDCUSTOMER:"DELETE_ENDCUSTOMER",DELETE_PROJECT:"DELETE_PROJECT",FORM_CLEAR_FORM:"FORM_CLEAR_FORM",FORM_EDIT_ARTICLE:"FORM_EDIT_ARTICLE",FORM_EDIT_COMPANY:"FORM_EDIT_COMPANY",FORM_EDIT_COMPANY_USER:"FORM_EDIT_COMPANY_USER",FORM_EDIT_COMPANY_BRANDING:"FORM_EDIT_COMPANY_BRANDING",FORM_EDIT_ENDCUSTOMER:"FORM_EDIT_ENDCUSTOMER",FORM_NEW_ARTICLE:"FORM_NEW_ARTICLE",FORM_NEW_COMPANY_USER:"FORM_NEW_COMPANY_USER",FORM_NEW_COMPANY_BRANDING:"FORM_NEW_COMPANY_BRANDING",FORM_NEW_ENDCUSTOMER:"FORM_NEW_ENDCUSTOMER",FORM_NEW_OFFER:"FORM_NEW_OFFER",FORM_SUBMIT_ARTICLE:"FORM_SUBMIT_ARTICLE",FORM_SUBMIT_COMPANY:"FORM_SUBMIT_COMPANY",FORM_SUBMIT_COMPANY_USER:"FORM_SUBMIT_COMPANY_USER",FORM_SUBMIT_COMPANY_BRANDING:"FORM_SUBMIT_COMPANY_BRANDING",FORM_SUBMIT_ENDCUSTOMER:"FORM_SUBMIT_ENDCUSTOMER",FORM_SUBMIT_OFFER:"FORM_SUBMIT_OFFER",LOAD_ARTICLE:"LOAD_ARTICLE",LOAD_ARTICLES:"LOAD_ARTICLES",LOAD_CERTIFICATES:"LOAD_CERTIFICATES",LOAD_COMPANY_USER:"LOAD_COMPANY_USER",LOAD_COMPANY_USERS:"LOAD_COMPANY_USERS",DO_LOAD_CURRENT_COMPANY:"DO_LOAD_CURRENT_COMPANY",LOAD_ENDCUSTOMER:"LOAD_ENDCUSTOMER",LOAD_ENDCUSTOMERS:"LOAD_ENDCUSTOMERS",LOAD_PROJECT:"LOAD_PROJECT",LOAD_PROJECTS:"LOAD_PROJECTS",LOAD_PUBLIC_PROJECT:"LOAD_PUBLIC_PROJECT",PATCH_ARTICLE:"PATCH_ARTICLE",PATCH_COMPANY_USER:"PATCH_COMPANY_USER",SEARCH_ARTICLE:"SEARCH_ARTICLE",SET_ARTICLES:"SET_ARTICLES",SET_FORM:"SET_FORM",SET_PROJECTS:"SET_PROJECTS",SET_READ_FOR_PROJECT:"SET_READ_FOR_PROJECT",SORT:"SORT",UPDATE_ARTICLE:"UPDATE_ARTICLE",UPDATE_COMPANY_USER:"UPDATE_COMPANY_USER",DO_UPDATE_CURRENT_COMPANY:"DO_UPDATE_CURRENT_COMPANY",UPDATE_ENDCUSTOMER:"UPDATE_ENDCUSTOMER",UPDATE_PROJECT:"UPDATE_PROJECT"},ce={};Object.keys(Rr).forEach(t=>{typeof Rr[t]=="object"&&Object.keys(Rr[t]).forEach(e=>{ce[e]&&console.warn(`Duplicate action constant warning!, ${Rr[t][e]}`),ce[e]=`${t}/${Rr[t][e]}`})}),Object.keys(YO).forEach(t=>{ce[t]&&console.warn(`Duplicate action constant warning!, ${Rr[t]}`),ce[t]=Rr[t]});var sA={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ne,function(){return function(n){var r={};function i(a){if(r[a])return r[a].exports;var s=r[a]={i:a,l:!1,exports:{}};return n[a].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=n,i.c=r,i.d=function(a,s,o){i.o(a,s)||Object.defineProperty(a,s,{enumerable:!0,get:o})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,s){if(1&s&&(a=i(a)),8&s||4&s&&typeof a=="object"&&a&&a.__esModule)return a;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:a}),2&s&&typeof a!="string")for(var l in a)i.d(o,l,function(c){return a[c]}.bind(null,l));return o},i.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(s,"a",s),s},i.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},i.p="",i(i.s=6)}([function(n,r,i){var a=i(12),s={};function o(y,T){return T===l(y)}function l(y){var T=typeof y;return T!=="object"?T:y?y instanceof Error?"error":{}.toString.call(y).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function c(y){return o(y,"function")}function u(y){var T=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),E=RegExp("^"+T+"$");return d(y)&&E.test(y)}function d(y){var T=typeof y;return y!=null&&(T=="object"||T=="function")}function p(){var y=w();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(T){var E=(y+16*Math.random())%16|0;return y=Math.floor(y/16),(T==="x"?E:7&E|8).toString(16)})}var f={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 h(y,T){var E,k;try{E=s.stringify(y)}catch($){if(T&&c(T))try{E=T(y)}catch(C){k=C}else k=$}return{error:k,value:E}}function m(y,T){return function(E,k){try{T(E,k)}catch($){y.error($)}}}var g=["log","network","dom","navigation","error","manual"],v=["critical","error","warning","info","debug"];function _(y,T){for(var E=0;E<y.length;++E)if(y[E]===T)return!0;return!1}function w(){return Date.now?+Date.now():+new Date}n.exports={addParamsAndAccessTokenToPath:function(y,T,E){(E=E||{}).access_token=y;var k,$=[];for(k in E)Object.prototype.hasOwnProperty.call(E,k)&&$.push([k,E[k]].join("="));var C="?"+$.sort().join("&");(T=T||{}).path=T.path||"";var I,M=T.path.indexOf("?"),O=T.path.indexOf("#");M!==-1&&(O===-1||O>M)?(I=T.path,T.path=I.substring(0,M)+C+"&"+I.substring(M+1)):O!==-1?(I=T.path,T.path=I.substring(0,O)+C+I.substring(O)):T.path=T.path+C},createItem:function(y,T,E,k,$){for(var C,I,M,O,A,P,L=[],F=[],j=0,S=y.length;j<S;++j){var b=l(P=y[j]);switch(F.push(b),b){case"undefined":break;case"string":C?L.push(P):C=P;break;case"function":O=m(T,P);break;case"date":L.push(P);break;case"error":case"domexception":case"exception":I?L.push(P):I=P;break;case"object":case"array":if(P instanceof Error||typeof DOMException<"u"&&P instanceof DOMException){I?L.push(P):I=P;break}if(k&&b==="object"&&!A){for(var D=0,N=k.length;D<N;++D)if(P[k[D]]!==void 0){A=P;break}if(A)break}M?L.push(P):M=P;break;default:if(P instanceof Error||typeof DOMException<"u"&&P instanceof DOMException){I?L.push(P):I=P;break}L.push(P)}}L.length>0&&((M=a(M)).extraArgs=L);var V={message:C,err:I,custom:M,timestamp:w(),callback:O,notifier:E,diagnostic:{},uuid:p()};return function(W,G){G&&G.level!==void 0&&(W.level=G.level,delete G.level),G&&G.skipFrames!==void 0&&(W.skipFrames=G.skipFrames,delete G.skipFrames)}(V,M),k&&A&&(V.request=A),$&&(V.lambdaContext=$),V._originalArgs=y,V.diagnostic.original_arg_types=F,V},addErrorContext:function(y,T){var E=y.data.custom||{},k=!1;try{for(var $=0;$<T.length;++$)T[$].hasOwnProperty("rollbarContext")&&(E=a(E,T[$].rollbarContext),k=!0);k&&(y.data.custom=E)}catch(C){y.diagnostic.error_context="Failed: "+C.message}},createTelemetryEvent:function(y){for(var T,E,k,$,C=0,I=y.length;C<I;++C)switch(l($=y[C])){case"string":!T&&_(g,$)?T=$:!k&&_(v,$)&&(k=$);break;case"object":E=$}return{type:T||"manual",metadata:E||{},level:k}},filterIp:function(y,T){if(y&&y.user_ip&&T!==!0){var E=y.user_ip;if(T)try{var k;if(E.indexOf(".")!==-1)(k=E.split(".")).pop(),k.push("0"),E=k.join(".");else if(E.indexOf(":")!==-1){if((k=E.split(":")).length>2){var $=k.slice(0,3),C=$[2].indexOf("/");C!==-1&&($[2]=$[2].substring(0,C)),E=$.concat("0000:0000:0000:0000:0000").join(":")}}else E=null}catch{E=null}else E=null;y.user_ip=E}},formatArgsAsString:function(y){var T,E,k,$=[];for(T=0,E=y.length;T<E;++T){switch(l(k=y[T])){case"object":(k=(k=h(k)).error||k.value).length>500&&(k=k.substr(0,497)+"...");break;case"null":k="null";break;case"undefined":k="undefined";break;case"symbol":k=k.toString()}$.push(k)}return $.join(" ")},formatUrl:function(y,T){if(!(T=T||y.protocol)&&y.port&&(y.port===80?T="http:":y.port===443&&(T="https:")),T=T||"https:",!y.hostname)return null;var E=T+"//"+y.hostname;return y.port&&(E=E+":"+y.port),y.path&&(E+=y.path),E},get:function(y,T){if(y){var E=T.split("."),k=y;try{for(var $=0,C=E.length;$<C;++$)k=k[E[$]]}catch{k=void 0}return k}},handleOptions:function(y,T,E,k){var $=a(y,T,E);return $=function(C,I){return C.hostWhiteList&&!C.hostSafeList&&(C.hostSafeList=C.hostWhiteList,C.hostWhiteList=void 0,I&&I.log("hostWhiteList is deprecated. Use hostSafeList.")),C.hostBlackList&&!C.hostBlockList&&(C.hostBlockList=C.hostBlackList,C.hostBlackList=void 0,I&&I.log("hostBlackList is deprecated. Use hostBlockList.")),C}($,k),!T||T.overwriteScrubFields||T.scrubFields&&($.scrubFields=(y.scrubFields||[]).concat(T.scrubFields)),$},isError:function(y){return o(y,"error")||o(y,"exception")},isFunction:c,isIterable:function(y){var T=l(y);return T==="object"||T==="array"},isNativeFunction:u,isType:o,isObject:d,isString:function(y){return typeof y=="string"||y instanceof String},jsonParse:function(y){var T,E;try{T=s.parse(y)}catch(k){E=k}return{error:E,value:T}},LEVELS:{debug:0,info:1,warning:2,error:3,critical:4},makeUnhandledStackInfo:function(y,T,E,k,$,C,I,M){var O={url:T||"",line:E,column:k};O.func=M.guessFunctionName(O.url,O.line),O.context=M.gatherContext(O.url,O.line);var A=typeof document<"u"&&document&&document.location&&document.location.href,P=typeof window<"u"&&window&&window.navigator&&window.navigator.userAgent;return{mode:C,message:$?String($):y||I,url:A,stack:[O],useragent:P}},merge:a,now:w,redact:function(){return"********"},RollbarJSON:s,sanitizeUrl:function(y){var T=function(E){if(!!o(E,"string")){for(var k=f,$=k.parser[k.strictMode?"strict":"loose"].exec(E),C={},I=0,M=k.key.length;I<M;++I)C[k.key[I]]=$[I]||"";return C[k.q.name]={},C[k.key[12]].replace(k.q.parser,function(O,A,P){A&&(C[k.q.name][A]=P)}),C}}(y);return T?(T.anchor===""&&(T.source=T.source.replace("#","")),y=T.source.replace("?"+T.query,"")):"(unknown)"},set:function(y,T,E){if(y){var k=T.split("."),$=k.length;if(!($<1))if($!==1)try{for(var C=y[k[0]]||{},I=C,M=1;M<$-1;++M)C[k[M]]=C[k[M]]||{},C=C[k[M]];C[k[$-1]]=E,y[k[0]]=I}catch{return}else y[k[0]]=E}},setupJSON:function(y){c(s.stringify)&&c(s.parse)||(o(JSON,"undefined")||(y?(u(JSON.stringify)&&(s.stringify=JSON.stringify),u(JSON.parse)&&(s.parse=JSON.parse)):(c(JSON.stringify)&&(s.stringify=JSON.stringify),c(JSON.parse)&&(s.parse=JSON.parse))),c(s.stringify)&&c(s.parse)||y&&y(s))},stringify:h,maxByteSize:function(y){for(var T=0,E=y.length,k=0;k<E;k++){var $=y.charCodeAt(k);$<128?T+=1:$<2048?T+=2:$<65536&&(T+=3)}return T},typeName:l,uuid4:p}},function(n,r,i){i(17);var a=i(18),s=i(0);n.exports={error:function(){var o=Array.prototype.slice.call(arguments,0);o.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(o)):console.error.apply(console,o)},info:function(){var o=Array.prototype.slice.call(arguments,0);o.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(o)):console.info.apply(console,o)},log:function(){var o=Array.prototype.slice.call(arguments,0);o.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(o)):console.log.apply(console,o)}}},function(n,r,i){n.exports={parse:function(a){var s,o,l={protocol:null,auth:null,host:null,path:null,hash:null,href:a,hostname:null,port:null,pathname:null,search:null,query:null};if((s=a.indexOf("//"))!==-1?(l.protocol=a.substring(0,s),o=s+2):o=0,(s=a.indexOf("@",o))!==-1&&(l.auth=a.substring(o,s),o=s+1),(s=a.indexOf("/",o))===-1){if((s=a.indexOf("?",o))===-1)return(s=a.indexOf("#",o))===-1?l.host=a.substring(o):(l.host=a.substring(o,s),l.hash=a.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=a.substring(o,s),l.hostname=l.host.split(":")[0],l.port=l.host.split(":")[1],l.port&&(l.port=parseInt(l.port,10)),o=s}else l.host=a.substring(o,s),l.hostname=l.host.split(":")[0],l.port=l.host.split(":")[1],l.port&&(l.port=parseInt(l.port,10)),o=s;if((s=a.indexOf("#",o))===-1?l.path=a.substring(o):(l.path=a.substring(o,s),l.hash=a.substring(s)),l.path){var c=l.path.split("?");l.pathname=c[0],l.query=c[1],l.search=l.query?"?"+l.query:null}return l}}},function(n,r,i){var a=i(22),s=new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ");function o(){return null}function l(d){var p={};return p._stackFrame=d,p.url=d.fileName,p.line=d.lineNumber,p.func=d.functionName,p.column=d.columnNumber,p.args=d.args,p.context=null,p}function c(d,p){return{stack:function(){var f=[];p=p||0;try{f=a.parse(d)}catch{f=[]}for(var h=[],m=p;m<f.length;m++)h.push(new l(f[m]));return h}(),message:d.message,name:u(d),rawStack:d.stack,rawException:d}}function u(d){var p=d.name&&d.name.length&&d.name,f=d.constructor.name&&d.constructor.name.length&&d.constructor.name;return p&&f?p==="Error"?f:p:p||f}n.exports={guessFunctionName:function(){return"?"},guessErrorClass:function(d){if(!d||!d.match)return["Unknown error. There was no error message to display.",""];var p=d.match(s),f="(unknown)";return p&&(f=p[p.length-1],d=(d=d.replace((p[p.length-2]||"")+f+":","")).replace(/(^[\s]+|[\s]+$)/g,"")),[f,d]},gatherContext:o,parse:function(d,p){var f=d;if(f.nested){for(var h=[];f;)h.push(new c(f,p)),f=f.nested,p=0;return h[0].traceChain=h,h[0]}return new c(f,p)},Stack:c,Frame:l}},function(n,r,i){var a=i(0),s=i(5);function o(l,c){var u=c.split("."),d=u.length-1;try{for(var p=0;p<=d;++p)p<d?l=l[u[p]]:l[u[p]]=a.redact()}catch{}}n.exports=function(l,c,u){if(c=c||[],u)for(var d=0;d<u.length;++d)o(l,u[d]);var p=function(m){for(var g,v=[],_=0;_<m.length;++_)g="^\\[?(%5[bB])?"+m[_]+"\\[?(%5[bB])?\\]?(%5[dD])?$",v.push(new RegExp(g,"i"));return v}(c),f=function(m){for(var g,v=[],_=0;_<m.length;++_)g="\\[?(%5[bB])?"+m[_]+"\\[?(%5[bB])?\\]?(%5[dD])?",v.push(new RegExp("("+g+"=)([^&\\n]+)","igm"));return v}(c);function h(m,g){return g+a.redact()}return s(l,function m(g,v,_){var w=function(y,T){var E;for(E=0;E<p.length;++E)if(p[E].test(y)){T=a.redact();break}return T}(g,v);return w===v?a.isType(v,"object")||a.isType(v,"array")?s(v,m,_):function(y){var T;if(a.isType(y,"string"))for(T=0;T<f.length;++T)y=y.replace(f[T],h);return y}(w):w})}},function(n,r,i){var a=i(0);n.exports=function(s,o,l){var c,u,d,p,f=a.isType(s,"object"),h=a.isType(s,"array"),m=[];if(l=l||{obj:[],mapped:[]},f){if(p=l.obj.indexOf(s),f&&p!==-1)return l.mapped[p]||l.obj[p];l.obj.push(s),p=l.obj.length-1}if(f)for(c in s)Object.prototype.hasOwnProperty.call(s,c)&&m.push(c);else if(h)for(d=0;d<s.length;++d)m.push(d);var g=f?{}:[],v=!0;for(d=0;d<m.length;++d)u=s[c=m[d]],g[c]=o(c,u,l),v=v&&g[c]===s[c];return f&&!v&&(l.mapped[p]=g),v?s:g}},function(n,r,i){n.exports=i(7)},function(n,r,i){var a=i(8),s=typeof window<"u"&&window._rollbarConfig,o=s&&s.globalAlias||"Rollbar",l=typeof window<"u"&&window[o]&&typeof window[o].shimId=="function"&&window[o].shimId()!==void 0;if(typeof window>"u"||window._rollbarStartTime||(window._rollbarStartTime=new Date().getTime()),!l&&s){var c=new a(s);window[o]=c}else typeof window<"u"?(window.rollbar=a,window._rollbarDidLoad=!0):typeof self<"u"&&(self.rollbar=a,self._rollbarDidLoad=!0);n.exports=a},function(n,r,i){var a=i(9),s=i(29),o=i(30),l=i(32),c=i(34),u=i(4),d=i(35);a.setComponents({telemeter:s,instrumenter:o,polyfillJSON:l,wrapGlobals:c,scrub:u,truncation:d}),n.exports=a},function(n,r,i){var a=i(10),s=i(0),o=i(15),l=i(1),c=i(19),u=i(20),d=i(2),p=i(21),f=i(24),h=i(25),m=i(26),g=i(3);function v(C,I){this.options=s.handleOptions($,C,null,l),this.options._configuredOptions=C;var M=this.components.telemeter,O=this.components.instrumenter,A=this.components.polyfillJSON;this.wrapGlobals=this.components.wrapGlobals,this.scrub=this.components.scrub;var P=this.components.truncation,L=new u(P),F=new o(this.options,L,d,P);M&&(this.telemeter=new M(this.options)),this.client=I||new a(this.options,F,l,this.telemeter,"browser");var j=T(),S=typeof document<"u"&&document;this.isChrome=j.chrome&&j.chrome.runtime,this.anonymousErrorsPending=0,function(b,D,N){b.addTransform(p.handleDomException).addTransform(p.handleItemWithError).addTransform(p.ensureItemHasSomethingToSay).addTransform(p.addBaseInfo).addTransform(p.addRequestInfo(N)).addTransform(p.addClientInfo(N)).addTransform(p.addPluginInfo(N)).addTransform(p.addBody).addTransform(f.addMessageWithError).addTransform(f.addTelemetryData).addTransform(f.addConfigToPayload).addTransform(p.addScrubber(D.scrub)).addTransform(f.userTransform(l)).addTransform(f.addConfiguredOptions).addTransform(f.addDiagnosticKeys).addTransform(f.itemToPayload)}(this.client.notifier,this,j),this.client.queue.addPredicate(m.checkLevel).addPredicate(h.checkIgnore).addPredicate(m.userCheckIgnore(l)).addPredicate(m.urlIsNotBlockListed(l)).addPredicate(m.urlIsSafeListed(l)).addPredicate(m.messageIsIgnored(l)),this.setupUnhandledCapture(),O&&(this.instrumenter=new O(this.options,this.client.telemeter,this,j,S),this.instrumenter.instrument()),s.setupJSON(A)}var _=null;function w(C){var I="Rollbar is not initialized";l.error(I),C&&C(new Error(I))}function y(C){for(var I=0,M=C.length;I<M;++I)if(s.isFunction(C[I]))return C[I]}function T(){return typeof window<"u"&&window||typeof self<"u"&&self}v.init=function(C,I){return _?_.global(C).configure(C):_=new v(C,I)},v.prototype.components={},v.setComponents=function(C){v.prototype.components=C},v.prototype.global=function(C){return this.client.global(C),this},v.global=function(C){if(_)return _.global(C);w()},v.prototype.configure=function(C,I){var M=this.options,O={};return I&&(O={payload:I}),this.options=s.handleOptions(M,C,O,l),this.options._configuredOptions=s.handleOptions(M._configuredOptions,C,O),this.client.configure(this.options,I),this.instrumenter&&this.instrumenter.configure(this.options),this.setupUnhandledCapture(),this},v.configure=function(C,I){if(_)return _.configure(C,I);w()},v.prototype.lastError=function(){return this.client.lastError},v.lastError=function(){if(_)return _.lastError();w()},v.prototype.log=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.log(C),{uuid:I}},v.log=function(){if(_)return _.log.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.debug=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.debug(C),{uuid:I}},v.debug=function(){if(_)return _.debug.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.info=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.info(C),{uuid:I}},v.info=function(){if(_)return _.info.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.warn=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.warn(C),{uuid:I}},v.warn=function(){if(_)return _.warn.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.warning=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.warning(C),{uuid:I}},v.warning=function(){if(_)return _.warning.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.error=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.error(C),{uuid:I}},v.error=function(){if(_)return _.error.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.critical=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.critical(C),{uuid:I}},v.critical=function(){if(_)return _.critical.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.buildJsonPayload=function(C){return this.client.buildJsonPayload(C)},v.buildJsonPayload=function(){if(_)return _.buildJsonPayload.apply(_,arguments);w()},v.prototype.sendJsonPayload=function(C){return this.client.sendJsonPayload(C)},v.sendJsonPayload=function(){if(_)return _.sendJsonPayload.apply(_,arguments);w()},v.prototype.setupUnhandledCapture=function(){var C=T();this.unhandledExceptionsInitialized||(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(c.captureUncaughtExceptions(C,this),this.wrapGlobals&&this.options.wrapGlobalEventHandlers&&this.wrapGlobals(C,this),this.unhandledExceptionsInitialized=!0),this.unhandledRejectionsInitialized||(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&(c.captureUnhandledRejections(C,this),this.unhandledRejectionsInitialized=!0)},v.prototype.handleUncaughtException=function(C,I,M,O,A,P){if(this.options.captureUncaught||this.options.handleUncaughtExceptions){if(this.options.inspectAnonymousErrors&&this.isChrome&&A===null&&I==="")return"anonymous";var L,F=s.makeUnhandledStackInfo(C,I,M,O,A,"onerror","uncaught exception",g);s.isError(A)?(L=this._createItem([C,A,P]))._unhandledStackInfo=F:s.isError(I)?(L=this._createItem([C,I,P]))._unhandledStackInfo=F:(L=this._createItem([C,P])).stackInfo=F,L.level=this.options.uncaughtErrorLevel,L._isUncaught=!0,this.client.log(L)}},v.prototype.handleAnonymousErrors=function(){if(this.options.inspectAnonymousErrors&&this.isChrome){var C=this;try{Error.prepareStackTrace=function(I,M){if(C.options.inspectAnonymousErrors&&C.anonymousErrorsPending){if(C.anonymousErrorsPending-=1,!I)return;I._isAnonymous=!0,C.handleUncaughtException(I.message,null,null,null,I)}return I.stack}}catch(I){this.options.inspectAnonymousErrors=!1,this.error("anonymous error handler failed",I)}}},v.prototype.handleUnhandledRejection=function(C,I){if(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections){var M="unhandled rejection was null or undefined!";if(C)if(C.message)M=C.message;else{var O=s.stringify(C);O.value&&(M=O.value)}var A,P=C&&C._rollbarContext||I&&I._rollbarContext;s.isError(C)?A=this._createItem([M,C,P]):(A=this._createItem([M,C,P])).stackInfo=s.makeUnhandledStackInfo(M,"",0,0,null,"unhandledrejection","",g),A.level=this.options.uncaughtErrorLevel,A._isUncaught=!0,A._originalArgs=A._originalArgs||[],A._originalArgs.push(I),this.client.log(A)}},v.prototype.wrap=function(C,I,M){try{var O;if(O=s.isFunction(I)?I:function(){return I||{}},!s.isFunction(C)||C._isWrap)return C;if(!C._rollbar_wrapped&&(C._rollbar_wrapped=function(){M&&s.isFunction(M)&&M.apply(this,arguments);try{return C.apply(this,arguments)}catch(L){var P=L;throw P&&window._rollbarWrappedError!==P&&(s.isType(P,"string")&&(P=new String(P)),P._rollbarContext=O()||{},P._rollbarContext._wrappedSource=C.toString(),window._rollbarWrappedError=P),P}},C._rollbar_wrapped._isWrap=!0,C.hasOwnProperty))for(var A in C)C.hasOwnProperty(A)&&A!=="_rollbar_wrapped"&&(C._rollbar_wrapped[A]=C[A]);return C._rollbar_wrapped}catch{return C}},v.wrap=function(C,I){if(_)return _.wrap(C,I);w()},v.prototype.captureEvent=function(){var C=s.createTelemetryEvent(arguments);return this.client.captureEvent(C.type,C.metadata,C.level)},v.captureEvent=function(){if(_)return _.captureEvent.apply(_,arguments);w()},v.prototype.captureDomContentLoaded=function(C,I){return I||(I=new Date),this.client.captureDomContentLoaded(I)},v.prototype.captureLoad=function(C,I){return I||(I=new Date),this.client.captureLoad(I)},v.prototype.loadFull=function(){l.info("Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.")},v.prototype._createItem=function(C){return s.createItem(C,l,this)};var E=i(27),k=i(28),$={version:E.version,scrubFields:k.scrubFields,logLevel:E.logLevel,reportLevel:E.reportLevel,uncaughtErrorLevel:E.uncaughtErrorLevel,endpoint:E.endpoint,verbose:!1,enabled:!0,transmit:!0,sendConfig:!1,includeItemsInTelemetry:!0,captureIp:!0,inspectAnonymousErrors:!0,ignoreDuplicateErrors:!0,wrapGlobalEventHandlers:!1};n.exports=v},function(n,r,i){var a=i(11),s=i(13),o=i(14),l=i(0);function c(p,f,h,m,g){this.options=l.merge(p),this.logger=h,c.rateLimiter.configureGlobal(this.options),c.rateLimiter.setPlatformOptions(g,this.options),this.api=f,this.queue=new s(c.rateLimiter,f,h,this.options);var v=this.options.tracer||null;d(v)?(this.tracer=v,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier=new o(this.queue,this.options),this.telemeter=m,u(p),this.lastError=null,this.lastErrorHash="none"}function u(p){p.stackTraceLimit&&(Error.stackTraceLimit=p.stackTraceLimit)}function d(p){if(!p||!p.scope||typeof p.scope!="function")return!1;var f=p.scope();return!(!f||!f.active||typeof f.active!="function")}c.rateLimiter=new a({maxItems:0,itemsPerMinute:60}),c.prototype.global=function(p){return c.rateLimiter.configureGlobal(p),this},c.prototype.configure=function(p,f){var h=this.options,m={};f&&(m={payload:f}),this.options=l.merge(h,p,m);var g=this.options.tracer||null;return d(g)?(this.tracer=g,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),u(p),this.global(this.options),d(p.tracer)&&(this.tracer=p.tracer),this},c.prototype.log=function(p){var f=this._defaultLogLevel();return this._log(f,p)},c.prototype.debug=function(p){this._log("debug",p)},c.prototype.info=function(p){this._log("info",p)},c.prototype.warn=function(p){this._log("warning",p)},c.prototype.warning=function(p){this._log("warning",p)},c.prototype.error=function(p){this._log("error",p)},c.prototype.critical=function(p){this._log("critical",p)},c.prototype.wait=function(p){this.queue.wait(p)},c.prototype.captureEvent=function(p,f,h){return this.telemeter&&this.telemeter.captureEvent(p,f,h)},c.prototype.captureDomContentLoaded=function(p){return this.telemeter&&this.telemeter.captureDomContentLoaded(p)},c.prototype.captureLoad=function(p){return this.telemeter&&this.telemeter.captureLoad(p)},c.prototype.buildJsonPayload=function(p){return this.api.buildJsonPayload(p)},c.prototype.sendJsonPayload=function(p){this.api.postJsonPayload(p)},c.prototype._log=function(p,f){var h;if(f.callback&&(h=f.callback,delete f.callback),this.options.ignoreDuplicateErrors&&this._sameAsLastError(f)){if(h){var m=new Error("ignored identical item");m.item=f,h(m)}}else try{this._addTracingInfo(f),f.level=f.level||p,this.telemeter&&this.telemeter._captureRollbarItem(f),f.telemetryEvents=this.telemeter&&this.telemeter.copyEvents()||[],this.notifier.log(f,h)}catch(g){h&&h(g),this.logger.error(g)}},c.prototype._defaultLogLevel=function(){return this.options.logLevel||"debug"},c.prototype._sameAsLastError=function(p){if(!p._isUncaught)return!1;var f=function(h){var m=h.message||"",g=(h.err||{}).stack||String(h.err);return m+"::"+g}(p);return this.lastErrorHash===f||(this.lastError=p.err,this.lastErrorHash=f,!1)},c.prototype._addTracingInfo=function(p){if(this.tracer){var f=this.tracer.scope().active();if(function(g){if(!g||!g.context||typeof g.context!="function")return!1;var v=g.context();return!(!v||!v.toSpanId||!v.toTraceId||typeof v.toSpanId!="function"||typeof v.toTraceId!="function")}(f)){f.setTag("rollbar.error_uuid",p.uuid),f.setTag("rollbar.has_error",!0),f.setTag("error",!0),f.setTag("rollbar.item_url","https://rollbar.com/item/uuid/?uuid="+p.uuid),f.setTag("rollbar.occurrence_url","https://rollbar.com/occurrence/uuid/?uuid="+p.uuid);var h=f.context().toSpanId(),m=f.context().toTraceId();p.custom?(p.custom.opentracing_span_id=h,p.custom.opentracing_trace_id=m):p.custom={opentracing_span_id:h,opentracing_trace_id:m}}}},n.exports=c},function(n,r,i){var a=i(0);function s(c){this.startTime=a.now(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(c)}function o(c,u,d){return!c.ignoreRateLimit&&u>=1&&d>u}function l(c,u,d,p,f,h,m){var g=null;return d&&(d=new Error(d)),d||p||(g=function(v,_,w,y,T){var E,k=_.environment||_.payload&&_.payload.environment;E=T?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var $={body:{message:{body:E,extra:{maxItems:w,itemsPerMinute:y}}},language:"javascript",environment:k,notifier:{version:_.notifier&&_.notifier.version||_.version}};return v==="browser"?($.platform="browser",$.framework="browser-js",$.notifier.name="rollbar-browser-js"):v==="server"?($.framework=_.framework||"node-js",$.notifier.name=_.notifier.name):v==="react-native"&&($.framework=_.framework||"react-native",$.notifier.name=_.notifier.name),$}(c,u,f,h,m)),{error:d,shouldSend:p,payload:g}}s.globalSettings={startTime:a.now(),maxItems:void 0,itemsPerMinute:void 0},s.prototype.configureGlobal=function(c){c.startTime!==void 0&&(s.globalSettings.startTime=c.startTime),c.maxItems!==void 0&&(s.globalSettings.maxItems=c.maxItems),c.itemsPerMinute!==void 0&&(s.globalSettings.itemsPerMinute=c.itemsPerMinute)},s.prototype.shouldSend=function(c,u){var d=(u=u||a.now())-this.startTime;(d<0||d>=6e4)&&(this.startTime=u,this.perMinCounter=0);var p=s.globalSettings.maxItems,f=s.globalSettings.itemsPerMinute;if(o(c,p,this.counter))return l(this.platform,this.platformOptions,p+" max items reached",!1);if(o(c,f,this.perMinCounter))return l(this.platform,this.platformOptions,f+" items per minute reached",!1);this.counter++,this.perMinCounter++;var h=!o(c,p,this.counter),m=h;return h=h&&!o(c,f,this.perMinCounter),l(this.platform,this.platformOptions,null,h,p,f,m)},s.prototype.setPlatformOptions=function(c,u){this.platform=c,this.platformOptions=u},n.exports=s},function(n,r,i){var a=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=function(l){if(!l||s.call(l)!=="[object Object]")return!1;var c,u=a.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&a.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!u&&!d)return!1;for(c in l);return c===void 0||a.call(l,c)};n.exports=function l(){var c,u,d,p,f,h={},m=null,g=arguments.length;for(c=0;c<g;c++)if((m=arguments[c])!=null)for(f in m)u=h[f],h!==(d=m[f])&&(d&&o(d)?(p=u&&o(u)?u:{},h[f]=l(p,d)):d!==void 0&&(h[f]=d));return h}},function(n,r,i){var a=i(0);function s(l,c,u,d){this.rateLimiter=l,this.api=c,this.logger=u,this.options=d,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 c=this.options;return this.options=a.merge(c,l),this},s.prototype.addPredicate=function(l){return a.isFunction(l)&&this.predicates.push(l),this},s.prototype.addPendingItem=function(l){this.pendingItems.push(l)},s.prototype.removePendingItem=function(l){var c=this.pendingItems.indexOf(l);c!==-1&&this.pendingItems.splice(c,1)},s.prototype.addItem=function(l,c,u,d){c&&a.isFunction(c)||(c=function(){});var p=this._applyPredicates(l);if(p.stop)return this.removePendingItem(d),void c(p.err);if(this._maybeLog(l,u),this.removePendingItem(d),this.options.transmit){this.pendingRequests.push(l);try{this._makeApiRequest(l,function(f,h){this._dequeuePendingRequest(l),c(f,h)}.bind(this))}catch(f){this._dequeuePendingRequest(l),c(f)}}else c(new Error("Transmit disabled"))},s.prototype.wait=function(l){a.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 c=null,u=0,d=this.predicates.length;u<d;u++)if(!(c=this.predicates[u](l,this.options))||c.err!==void 0)return{stop:!0,err:c.err};return{stop:!1,err:null}},s.prototype._makeApiRequest=function(l,c){var u=this.rateLimiter.shouldSend(l);u.shouldSend?this.api.postItem(l,function(d,p){d?this._maybeRetry(d,l,c):c(d,p)}.bind(this)):u.error?c(u.error):this.api.postItem(u.payload,c)};var o=["ECONNRESET","ENOTFOUND","ESOCKETTIMEDOUT","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH","EPIPE","EAI_AGAIN"];s.prototype._maybeRetry=function(l,c,u){var d=!1;if(this.options.retryInterval){for(var p=0,f=o.length;p<f;p++)if(l.code===o[p]){d=!0;break}}d?this._retryApiRequest(c,u):u(l)},s.prototype._retryApiRequest=function(l,c){this.retryQueue.push({item:l,callback:c}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var u=this.retryQueue.shift();this._makeApiRequest(u.item,u.callback)}}.bind(this),this.options.retryInterval))},s.prototype._dequeuePendingRequest=function(l){var c=this.pendingRequests.indexOf(l);c!==-1&&(this.pendingRequests.splice(c,1),this._maybeCallWait())},s.prototype._maybeLog=function(l,c){if(this.logger&&this.options.verbose){var u=c;if(u=(u=u||a.get(l,"body.trace.exception.message"))||a.get(l,"body.trace_chain.0.exception.message"))return void this.logger.error(u);(u=a.get(l,"body.message.body"))&&this.logger.log(u)}},s.prototype._maybeCallWait=function(){return!(!a.isFunction(this.waitCallback)||this.pendingItems.length!==0||this.pendingRequests.length!==0)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},n.exports=s},function(n,r,i){var a=i(0);function s(o,l){this.queue=o,this.options=l,this.transforms=[],this.diagnostic={}}s.prototype.configure=function(o){this.queue&&this.queue.configure(o);var l=this.options;return this.options=a.merge(l,o),this},s.prototype.addTransform=function(o){return a.isFunction(o)&&this.transforms.push(o),this},s.prototype.log=function(o,l){if(l&&a.isFunction(l)||(l=function(){}),!this.options.enabled)return l(new Error("Rollbar is not enabled"));this.queue.addPendingItem(o);var c=o.err;this._applyTransforms(o,function(u,d){if(u)return this.queue.removePendingItem(o),l(u,null);this.queue.addItem(d,l,c,o)}.bind(this))},s.prototype._applyTransforms=function(o,l){var c=-1,u=this.transforms.length,d=this.transforms,p=this.options,f=function(h,m){h?l(h,null):++c!==u?d[c](m,p,f):l(null,m)};f(null,o)},n.exports=s},function(n,r,i){var a=i(0),s=i(16),o={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function l(u,d,p,f,h){this.options=u,this.transport=d,this.url=p,this.truncation=f,this.jsonBackup=h,this.accessToken=u.accessToken,this.transportOptions=c(u,p)}function c(u,d){return s.getTransportFromOptions(u,o,d)}l.prototype.postItem=function(u,d){var p=s.transportOptions(this.transportOptions,"POST"),f=s.buildPayload(this.accessToken,u,this.jsonBackup);this.transport.post(this.accessToken,p,f,d)},l.prototype.buildJsonPayload=function(u,d){var p,f=s.buildPayload(this.accessToken,u,this.jsonBackup);return(p=this.truncation?this.truncation.truncate(f):a.stringify(f)).error?(d&&d(p.error),null):p.value},l.prototype.postJsonPayload=function(u,d){var p=s.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,p,u,d)},l.prototype.configure=function(u){var d=this.oldOptions;return this.options=a.merge(d,u),this.transportOptions=c(this.options,this.url),this.options.accessToken!==void 0&&(this.accessToken=this.options.accessToken),this},n.exports=l},function(n,r,i){var a=i(0);n.exports={buildPayload:function(s,o,l){if(!a.isType(o.context,"string")){var c=a.stringify(o.context,l);c.error?o.context="Error: could not serialize 'context'":o.context=c.value||"",o.context.length>255&&(o.context=o.context.substr(0,255))}return{access_token:s,data:o}},getTransportFromOptions:function(s,o,l){var c=o.hostname,u=o.protocol,d=o.port,p=o.path,f=o.search,h=s.proxy;if(s.endpoint){var m=l.parse(s.endpoint);c=m.hostname,u=m.protocol,d=m.port,p=m.pathname,f=m.search}return{hostname:c,protocol:u,port:d,path:p,search:f,proxy:h}},transportOptions:function(s,o){var l=s.protocol||"https:",c=s.port||(l==="http:"?80:l==="https:"?443:void 0),u=s.hostname,d=s.path;return s.search&&(d+=s.search),s.proxy&&(d=l+"//"+u+d,u=s.proxy.host||s.proxy.hostname,c=s.proxy.port,l=s.proxy.protocol||l),{protocol:l,hostname:u,path:d,port:c,method:o}},appendPathToPath:function(s,o){var l=/\/$/.test(s),c=/^\//.test(o);return l&&c?o=o.substring(1):l||c||(o="/"+o),s+o}}},function(n,r){(function(i){i.console||(i.console={});for(var a,s,o=i.console,l=function(){},c=["memory"],u="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(",");a=c.pop();)o[a]||(o[a]={});for(;s=u.pop();)o[s]||(o[s]=l)})(typeof window>"u"?this:window)},function(n,r,i){var a={ieVersion:function(){if(typeof document<"u"){for(var s=3,o=document.createElement("div"),l=o.getElementsByTagName("i");o.innerHTML="<!--[if gt IE "+ ++s+"]><i></i><![endif]-->",l[0];);return s>4?s:void 0}}};n.exports=a},function(n,r,i){function a(s,o,l,c){s._rollbarWrappedError&&(c[4]||(c[4]=s._rollbarWrappedError),c[5]||(c[5]=s._rollbarWrappedError._rollbarContext),s._rollbarWrappedError=null);var u=o.handleUncaughtException.apply(o,c);l&&l.apply(s,c),u==="anonymous"&&(o.anonymousErrorsPending+=1)}n.exports={captureUncaughtExceptions:function(s,o,l){if(s){var c;if(typeof o._rollbarOldOnError=="function")c=o._rollbarOldOnError;else if(s.onerror){for(c=s.onerror;c._rollbarOldOnError;)c=c._rollbarOldOnError;o._rollbarOldOnError=c}o.handleAnonymousErrors();var u=function(){var d=Array.prototype.slice.call(arguments,0);a(s,o,c,d)};l&&(u._rollbarOldOnError=c),s.onerror=u}},captureUnhandledRejections:function(s,o,l){if(s){typeof s._rollbarURH=="function"&&s._rollbarURH.belongsToShim&&s.removeEventListener("unhandledrejection",s._rollbarURH);var c=function(u){var d,p,f;try{d=u.reason}catch{d=void 0}try{p=u.promise}catch{p="[unhandledrejection] error getting `promise` from event"}try{f=u.detail,!d&&f&&(d=f.reason,p=f.promise)}catch{}d||(d="[unhandledrejection] error getting `reason` from event"),o&&o.handleUnhandledRejection&&o.handleUnhandledRejection(d,p)};c.belongsToShim=l,s._rollbarURH=c,s.addEventListener("unhandledrejection",c)}}}},function(n,r,i){var a=i(0),s=i(1);function o(d){this.truncation=d}function l(d,p,f,h,m,g){var v=typeof window<"u"&&window||typeof self<"u"&&self,_=v&&v.Zone&&v.Zone.current;_&&_._name==="angular"?_._parent.run(function(){c(d,p,f,h,m,g)}):c(d,p,f,h,m,g)}function c(d,p,f,h,m,g){if(typeof RollbarProxy<"u")return function(y,T){new RollbarProxy().sendJsonPayload(y,function(E){},function(E){T(new Error(E))})}(h,m);var v;if(!(v=g?g():function(){var y,T,E=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],k=E.length;for(T=0;T<k;T++)try{y=E[T]();break}catch{}return y}()))return m(new Error("No way to send a request"));try{try{var _=function(){try{if(_&&v.readyState===4){_=void 0;var y=a.jsonParse(v.responseText);if((k=v)&&k.status&&k.status===200)return void m(y.error,y.value);if(function($){return $&&a.isType($.status,"number")&&$.status>=400&&$.status<600}(v)){if(v.status===403){var T=y.value&&y.value.message;s.error(T)}m(new Error(String(v.status)))}else m(u("XHR response had no status code (likely connection failure)"))}}catch($){var E;E=$&&$.stack?$:new Error($),m(E)}var k};v.open(f,p,!0),v.setRequestHeader&&(v.setRequestHeader("Content-Type","application/json"),v.setRequestHeader("X-Rollbar-Access-Token",d)),v.onreadystatechange=_,v.send(h)}catch{if(typeof XDomainRequest<"u"){if(!window||!window.location)return m(new Error("No window available during request, unknown environment"));window.location.href.substring(0,5)==="http:"&&p.substring(0,5)==="https"&&(p="http"+p.substring(5));var w=new XDomainRequest;w.onprogress=function(){},w.ontimeout=function(){m(u("Request timed out","ETIMEDOUT"))},w.onerror=function(){m(new Error("Error during request"))},w.onload=function(){var T=a.jsonParse(w.responseText);m(T.error,T.value)},w.open(f,p,!0),w.send(h)}else m(new Error("Cannot find a method to transport a request"))}}catch(y){m(y)}}function u(d,p){var f=new Error(d);return f.code=p||"ENOTFOUND",f}o.prototype.get=function(d,p,f,h,m){h&&a.isFunction(h)||(h=function(){}),a.addParamsAndAccessTokenToPath(d,p,f),l(d,a.formatUrl(p),"GET",null,h,m)},o.prototype.post=function(d,p,f,h,m){if(h&&a.isFunction(h)||(h=function(){}),!f)return h(new Error("Cannot send empty request"));var g;if((g=this.truncation?this.truncation.truncate(f):a.stringify(f)).error)return h(g.error);var v=g.value;l(d,a.formatUrl(p),"POST",v,h,m)},o.prototype.postJsonPayload=function(d,p,f,h,m){h&&a.isFunction(h)||(h=function(){}),l(d,a.formatUrl(p),"POST",f,h,m)},n.exports=o},function(n,r,i){var a=i(0),s=i(3),o=i(1);function l(p,f,h){var m=p.message,g=p.custom;m||(m="Item sent with null or missing arguments.");var v={body:m};g&&(v.extra=a.merge(g)),a.set(p,"data.body",{message:v}),h(null,p)}function c(p){var f=p.stackInfo.stack;return f&&f.length===0&&p._unhandledStackInfo&&p._unhandledStackInfo.stack&&(f=p._unhandledStackInfo.stack),f}function u(p,f,h){var m=p&&p.data.description,g=p&&p.custom,v=c(p),_=s.guessErrorClass(f.message),w={exception:{class:d(f,_[0],h),message:_[1]}};if(m&&(w.exception.description=m),v){var y,T,E,k,$,C,I,M;for(v.length===0&&(w.exception.stack=f.rawStack,w.exception.raw=String(f.rawException)),w.frames=[],I=0;I<v.length;++I)T={filename:(y=v[I]).url?a.sanitizeUrl(y.url):"(unknown)",lineno:y.line||null,method:y.func&&y.func!=="?"?y.func:"[anonymous]",colno:y.column},h.sendFrameUrl&&(T.url=y.url),T.method&&T.method.endsWith&&T.method.endsWith("_rollbar_wrapped")||(E=k=$=null,(C=y.context?y.context.length:0)&&(M=Math.floor(C/2),k=y.context.slice(0,M),E=y.context[M],$=y.context.slice(M)),E&&(T.code=E),(k||$)&&(T.context={},k&&k.length&&(T.context.pre=k),$&&$.length&&(T.context.post=$)),y.args&&(T.args=y.args),w.frames.push(T));w.frames.reverse(),g&&(w.extra=a.merge(g))}return w}function d(p,f,h){return p.name?p.name:h.guessErrorClass?f:"(unknown)"}n.exports={handleDomException:function(p,f,h){if(p.err&&s.Stack(p.err).name==="DOMException"){var m=new Error;m.name=p.err.name,m.message=p.err.message,m.stack=p.err.stack,m.nested=p.err,p.err=m}h(null,p)},handleItemWithError:function(p,f,h){if(p.data=p.data||{},p.err)try{p.stackInfo=p.err._savedStackTrace||s.parse(p.err,p.skipFrames),f.addErrorContext&&function(m){var g=[],v=m.err;for(g.push(v);v.nested;)v=v.nested,g.push(v);a.addErrorContext(m,g)}(p)}catch(m){o.error("Error while parsing the error object.",m);try{p.message=p.err.message||p.err.description||p.message||String(p.err)}catch(g){p.message=String(p.err)||String(g)}delete p.err}h(null,p)},ensureItemHasSomethingToSay:function(p,f,h){p.message||p.stackInfo||p.custom||h(new Error("No message, stack info, or custom data"),null),h(null,p)},addBaseInfo:function(p,f,h){var m=f.payload&&f.payload.environment||f.environment;p.data=a.merge(p.data,{environment:m,level:p.level,endpoint:f.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:p.uuid,notifier:{name:"rollbar-browser-js",version:f.version},custom:p.custom}),h(null,p)},addRequestInfo:function(p){return function(f,h,m){if(!p||!p.location)return m(null,f);var g="$remote_ip";h.captureIp?h.captureIp!==!0&&(g+="_anonymize"):g=null,a.set(f,"data.request",{url:p.location.href,query_string:p.location.search,user_ip:g}),m(null,f)}},addClientInfo:function(p){return function(f,h,m){if(!p)return m(null,f);var g=p.navigator||{},v=p.screen||{};a.set(f,"data.client",{runtime_ms:f.timestamp-p._rollbarStartTime,timestamp:Math.round(f.timestamp/1e3),javascript:{browser:g.userAgent,language:g.language,cookie_enabled:g.cookieEnabled,screen:{width:v.width,height:v.height}}}),m(null,f)}},addPluginInfo:function(p){return function(f,h,m){if(!p||!p.navigator)return m(null,f);for(var g,v=[],_=p.navigator.plugins||[],w=0,y=_.length;w<y;++w)g=_[w],v.push({name:g.name,description:g.description});a.set(f,"data.client.javascript.plugins",v),m(null,f)}},addBody:function(p,f,h){p.stackInfo?p.stackInfo.traceChain?function(m,g,v){for(var _=m.stackInfo.traceChain,w=[],y=_.length,T=0;T<y;T++){var E=u(m,_[T],g);w.push(E)}a.set(m,"data.body",{trace_chain:w}),v(null,m)}(p,f,h):function(m,g,v){if(c(m)){var _=u(m,m.stackInfo,g);a.set(m,"data.body",{trace:_}),v(null,m)}else{var w=m.stackInfo,y=s.guessErrorClass(w.message),T=d(w,y[0],g),E=y[1];m.message=T+": "+E,l(m,g,v)}}(p,f,h):l(p,f,h)},addScrubber:function(p){return function(f,h,m){if(p){var g=h.scrubFields||[],v=h.scrubPaths||[];f.data=p(f.data,g,v)}m(null,f)}}}},function(n,r,i){var a,s,o;(function(l,c){s=[i(23)],(o=typeof(a=function(u){var d=/(^|@)\S+:\d+/,p=/^\s*at .*(\S+:\d+|\(native\))/m,f=/^(eval@)?(\[native code])?$/;return{parse:function(h){if(h.stacktrace!==void 0||h["opera#sourceloc"]!==void 0)return this.parseOpera(h);if(h.stack&&h.stack.match(p))return this.parseV8OrIE(h);if(h.stack)return this.parseFFOrSafari(h);throw new Error("Cannot parse given Error object")},extractLocation:function(h){if(h.indexOf(":")===-1)return[h];var m=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(h.replace(/[()]/g,""));return[m[1],m[2]||void 0,m[3]||void 0]},parseV8OrIE:function(h){return h.stack.split(`
|
|
337
|
+
{{docLink}}/fastighetsbeteckning`,actionUrl:"{{docLink}}/fastighetsbeteckning"}},updateDocumentDialog:{title:"Change status and remove answer",message:"Your clients' answers will be removed.",cancel:"Cancel",submit:"Yes, continue"},editDocumentDialog:{accepted:{title:"Edit an accepted document",message:"The document is accepted and locked for changes. Create a copy to make changes.",submit:"Create copy"},hasAnswers:{title:"Edit document with signatures",message:"The document is locked for changes. Existing signatures will be removed.",submit:"Yes, continue"}}},resources:{brand:{cling:{termsOfService:{version:"cling_serviceavtal_sv_1.8",url:"https://api.cling.se/legal/terms"},privacyPolicy:{version:"cling_integritetspolicy_sv_1.8",url:"https://api.cling.se/legal/privacy"},apiDoc:"https://documenter.getpostman.com/view/1358621/Tzm3nxVw"},docspo:{termsOfService:{version:"docspo_terms_en_1.2",url:"https://api.docspo.com/legal/terms"},privacyPolicy:{version:"docspo_privacy_en_1.2",url:"https://api.docspo.com/legal/privacy"},apiDoc:"https://developer.docspo.com"}}},router:{settings:{company:"Company",user:"My Profile",document:"Document",members:"Members",membersForm:"Member",notifications:"Notifications",integrations:"Integrations",billing:"Billing",language:"Language",sms:"SMS sender name",emailDomain:"E-mail domain",subdomain:"Subdomain",websitesSocialMedia:"Social profiles",certificates:"Certificates",theme:"Theme",companyPresentation:"Presentation",tabPhotos:"Settings - Photos",photosVideos:"My Photos",invoice:{documentTitle:"Settings - Bookkeeping",contact:"Invoice - Contact",invoice:"Invoice - Settings",reminders:"Invoice - Reminders",paymentAcc:"Invoice - Payment account",bookkeeping:"Bookkeeping"},templates:"Settings - Templates",templateEditor:"Snippets",termForm:"Edit - Terms",termList:"My Terms"}},iso:{language:{sv:"Swedish",en:"English",fi:"Finish",de:"German",fr:"French",es:"Spanish",nl:"Dutch"}}};var pne={lessThanXSeconds:{one:"mindre \xE4n en sekund",other:"mindre \xE4n {{count}} sekunder"},xSeconds:{one:"en sekund",other:"{{count}} sekunder"},halfAMinute:"en halv minut",lessThanXMinutes:{one:"mindre \xE4n en minut",other:"mindre \xE4n {{count}} minuter"},xMinutes:{one:"en minut",other:"{{count}} minuter"},aboutXHours:{one:"ungef\xE4r en timme",other:"ungef\xE4r {{count}} timmar"},xHours:{one:"en timme",other:"{{count}} timmar"},xDays:{one:"en dag",other:"{{count}} dagar"},aboutXWeeks:{one:"ungef\xE4r en vecka",other:"ungef\xE4r {{count}} vecka"},xWeeks:{one:"en vecka",other:"{{count}} vecka"},aboutXMonths:{one:"ungef\xE4r en m\xE5nad",other:"ungef\xE4r {{count}} m\xE5nader"},xMonths:{one:"en m\xE5nad",other:"{{count}} m\xE5nader"},aboutXYears:{one:"ungef\xE4r ett \xE5r",other:"ungef\xE4r {{count}} \xE5r"},xYears:{one:"ett \xE5r",other:"{{count}} \xE5r"},overXYears:{one:"\xF6ver ett \xE5r",other:"\xF6ver {{count}} \xE5r"},almostXYears:{one:"n\xE4stan ett \xE5r",other:"n\xE4stan {{count}} \xE5r"}},fne=["noll","en","tv\xE5","tre","fyra","fem","sex","sju","\xE5tta","nio","tio","elva","tolv"],hne=function(e,n,r){var i,a=pne[e];return typeof a=="string"?i=a:n===1?i=a.one:r&&r.onlyNumeric?i=a.other.replace("{{count}}",String(n)):i=a.other.replace("{{count}}",n<13?fne[n]:String(n)),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"om "+i:i+" sedan":i};const mne=hne;var gne={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"y-MM-dd"},vne={full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},yne={full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},_ne={date:Fs({formats:gne,defaultWidth:"full"}),time:Fs({formats:vne,defaultWidth:"full"}),dateTime:Fs({formats:yne,defaultWidth:"full"})};const bne=_ne;var Ene={lastWeek:"'i' EEEE's kl.' p",yesterday:"'ig\xE5r kl.' p",today:"'idag kl.' p",tomorrow:"'imorgon kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},Tne=function(e,n,r,i){return Ene[e]};const wne=Tne;var Sne={narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["f\xF6re Kristus","efter Kristus"]},kne={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"]},Cne={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]},One={narrow:["S","M","T","O","T","F","L"],short:["s\xF6","m\xE5","ti","on","to","fr","l\xF6"],abbreviated:["s\xF6n","m\xE5n","tis","ons","tors","fre","l\xF6r"],wide:["s\xF6ndag","m\xE5ndag","tisdag","onsdag","torsdag","fredag","l\xF6rdag"]},Ane={narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"morg.",afternoon:"efterm.",evening:"kv\xE4ll",night:"natt"},abbreviated:{am:"f.m.",pm:"e.m.",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"efterm.",evening:"kv\xE4ll",night:"natt"},wide:{am:"f\xF6rmiddag",pm:"eftermiddag",midnight:"midnatt",noon:"middag",morning:"morgon",afternoon:"eftermiddag",evening:"kv\xE4ll",night:"natt"}},$ne={narrow:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"p\xE5 morg.",afternoon:"p\xE5 efterm.",evening:"p\xE5 kv\xE4llen",night:"p\xE5 natten"},abbreviated:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"p\xE5 morg.",afternoon:"p\xE5 efterm.",evening:"p\xE5 kv\xE4llen",night:"p\xE5 natten"},wide:{am:"fm",pm:"em",midnight:"midnatt",noon:"middag",morning:"p\xE5 morgonen",afternoon:"p\xE5 eftermiddagen",evening:"p\xE5 kv\xE4llen",night:"p\xE5 natten"}},xne=function(e,n){var r=Number(e),i=r%100;if(i>20||i<10)switch(i%10){case 1:case 2:return r+":a"}return r+":e"},Ine={ordinalNumber:xne,era:ir({values:Sne,defaultWidth:"wide"}),quarter:ir({values:kne,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:ir({values:Cne,defaultWidth:"wide"}),day:ir({values:One,defaultWidth:"wide"}),dayPeriod:ir({values:Ane,defaultWidth:"wide",formattingValues:$ne,defaultFormattingWidth:"wide"})};const Pne=Ine;var Dne=/^(\d+)(:a|:e)?/i,Rne=/\d+/i,Mne={narrow:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,abbreviated:/^(f\.? ?Kr\.?|f\.? ?v\.? ?t\.?|e\.? ?Kr\.?|v\.? ?t\.?)/i,wide:/^(före Kristus|före vår tid|efter Kristus|vår tid)/i},Nne={any:[/^f/i,/^[ev]/i]},Lne={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](:a|:e)? kvartalet/i},Fne={any:[/1/i,/2/i,/3/i,/4/i]},jne={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar[s]?|apr|maj|jun[i]?|jul[i]?|aug|sep|okt|nov|dec)\.?/i,wide:/^(januari|februari|mars|april|maj|juni|juli|augusti|september|oktober|november|december)/i},Une={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vne={narrow:/^[smtofl]/i,short:/^(sö|må|ti|on|to|fr|lö)/i,abbreviated:/^(sön|mån|tis|ons|tors|fre|lör)/i,wide:/^(söndag|måndag|tisdag|onsdag|torsdag|fredag|lördag)/i},Bne={any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},Hne={any:/^([fe]\.?\s?m\.?|midn(att)?|midd(ag)?|(på) (morgonen|eftermiddagen|kvällen|natten))/i},zne={any:{am:/^f/i,pm:/^e/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgon/i,afternoon:/eftermiddag/i,evening:/kväll/i,night:/natt/i}},Wne={ordinalNumber:oO({matchPattern:Dne,parsePattern:Rne,valueCallback:function(e){return parseInt(e,10)}}),era:ar({matchPatterns:Mne,defaultMatchWidth:"wide",parsePatterns:Nne,defaultParseWidth:"any"}),quarter:ar({matchPatterns:Lne,defaultMatchWidth:"wide",parsePatterns:Fne,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:ar({matchPatterns:jne,defaultMatchWidth:"wide",parsePatterns:Une,defaultParseWidth:"any"}),day:ar({matchPatterns:Vne,defaultMatchWidth:"wide",parsePatterns:Bne,defaultParseWidth:"any"}),dayPeriod:ar({matchPatterns:Hne,defaultMatchWidth:"any",parsePatterns:zne,defaultParseWidth:"any"})},Gne={code:"sv",formatDistance:mne,formatLong:bne,formatRelative:wne,localize:Pne,match:Wne,options:{weekStartsOn:1,firstWeekContainsDate:4}};const qne=Gne,IO=["af","ar-DZ","ar-MA","ar-SA","az","be","bg","bn","ca","cs","cy","da","de","el","en-AU","en-CA","en-GB","en-US","eo","es","et","eu","fa-IR","fi","fr","fr-CA","gl","gu","he","hi","hr","hu","hy","id","is","it","ja","ka","kk","kn","ko","lt","lv","mk","ms","mt","nb","nl","nn","pl","pt","pt-BR","ro","ru","sk","sl","sr","sr-Latn","sv","ta","te","th","tr","ug","uk","uz","vi","zh-CN","zh-TW"];class PO{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(e,n){if(!!this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(r=>r!==n)}}emit(e,...n){this.observers[e]&&[].concat(this.observers[e]).forEach(i=>{i(...n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(i=>{i.apply(i,[e,...n])})}}const Yne=(t="")=>{if(typeof t!="string")return null;const[e]=t.split("-");return IO.includes(e)?e:null},Kne=()=>navigator&&navigator.languages&&Array.isArray(navigator.languages)&&navigator.languages[0]?navigator.languages[0]:navigator&&navigator.language?navigator.language:null,DO={lookup(t){let e=null;const n=Ee.getItem(t);return n&&(e=n),e},cacheUserLocale(t,e){Ee.setItem(t,e)}};class Jne{constructor(e={}){this.options={localStorageKey:"locale",...e}}detect(){const e=DO.lookup(this.options.localStorageKey)||Kne();return e&&typeof e=="string"?e:null}cacheUserLanguage(e){DO.cacheUserLocale(this.options.localStorageKey,e)}}const vd={sv:qne,"en-US":pv};async function Zne(t){try{const e=`https://cdn.jsdelivr.net/npm/date-fns@2.29.3/esm/locale/${t}/index.js`,{default:n}=await import(e);return n&&(vd[t]=n),null}catch(e){return e}}const Xne=(t,e="P",n)=>t?ite(new Date(t),e,{locale:vd[n]}):"",Qne=(t,e,n)=>t?ute(new Date(t),{...e,locale:vd[n]}):"",ere=typeof window<"u"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;class tre extends PO{constructor(e={}){super(),ere&&PO.call(this),this.options={fallbackLocale:"en-US",...e}}init(e={},n){this.options={...this.options,...e},this.localeLookup=new Jne(this.options);const r=()=>{this.changeLocale(this.options.locale,{cache:!1},i=>{this.isInitialized=!0,this.emit("initialized",this.options),n&&n(i)})};this.options.initImmediate?setTimeout(r,0):r()}changeLocale(e,n={cache:!0},r){this.isLocaleChangingTo=e,this.emit("localeChanging",e);const i=o=>{let l=o;IO.includes(l)||(l=Yne(l)||this.options.fallbackLocale),vd[l]?this.dateFnsLocale=l:(this.dateFnsLocale=this.options.fallbackLocale,Zne(l).then(c=>{c||(this.dateFnsLocale=l,this.emit("localeChanged",l))}))},a=o=>{const l=typeof o=="string"?o:this.options.fallbackLocale;this.locale=l,i(l),this.emit("localeChanged",l),n.cache&&this.localeLookup.cacheUserLanguage(l)};let s=e;s||(s=this.localeLookup.detect()),a(s),r&&r(s)}formatDate(e,n="P",r=this.locale){return Xne(e,n,r)}formatDistanceToNow(e,n,r=this.locale){return Qne(e,n,r)}}const _v=new tre;Z.use($l);const RO=AO,MO={type:"postProcessor",name:"withCount",process:(t,e,n,r)=>{const{count:i}=n||{};return typeof i=="number"?`${i} ${t}`:t}},NO={type:"postProcessor",name:"capitalize",process:t=>typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)},LO=t=>({debug:!1,whitelist:LQ,resources:{sv:lne,en:dne},fallbackLng:"en",saveMissing:!0,missingKeyHandler(e,n,r,i){Ke.info(`i18next: Missing translation lng '${e}', ns '${n}', 'key: '${r}'`)},returnedObjectHandler(e,n,r){return r&&r.ns==="_common"?n:t.t(e,{ns:"_common"})||n},interpolation:{format(e,n,r){if(n==="uppercase")return e.toUpperCase();if(n==="lowercaseSpace")return e&&` ${e}`.toLowerCase();if(n==="inlineSpace")return e&&` ${e}`;if(n==="capitalize")return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1);if(n.startsWith("deepNested")){const i=n.substring(11),a=i?`${i}.${e}`:e;return t.exists(a,{lng:r})?t.t(a,{lng:r}):e}return e}}}),bv=wO.createInstance();bv.use(RO).use(NO).use(MO).init({...LO(bv),namespaces:["_common","views","components","errors","actions","resources","router","iso"],defaultNS:"_common",fallbackNS:"_common"}),_v.init({fallbackLocale:"en-US"});const nre=_v,te=new $l(bv,_v);function rre(t){return Number(t)===t&&t%1!==0}function De(t){if(t===void 0)return"undefined";if(t===null)return"null";if(Array.isArray(t))return"array";if(typeof t=="object"&&!(t instanceof Date))return"object";if(Number.isNaN(t))return"nan";if(t===1/0)return"infinity";if(Number.isInteger(t)||rre(t))return"number";if(typeof t=="string")return"string";if(typeof t=="boolean")return"boolean";if(typeof t=="function")return"function";if(t instanceof Date&&ci(t))return"date"}function ire(t,e){if(!["array","object"].includes(De(t)))throw Error("Arg.0 must be an array or object");if(typeof e!="string")throw Error("Arg.1, path must be a string");let n=e.replace(/\[(.*)\]/gi,(i,a)=>`.${a}`).split(".");return n[0]===""&&(n=n.splice(1)),n.reduce((i,a)=>i&&(typeof i[a]!="object",i[a]),t)}const are=(t={},e={})=>{if(typeof t!="object")throw Error("Query must be an object!");if(typeof e!="object")throw Error("Options must be an object!");const n={prefix:"_",convertFilter:!0,...e};let r="?";function i(a){let s="";function o(l){let c="";return Object.keys(l).forEach((u,d)=>{["or","and"].includes(u)?o(l[u])&&(c+=`${u}(${o(l[u])})`):Object.keys(l[u]).forEach((p,f)=>{let h="";l[u][p]===!0?h=`${u}=${p}`:l[u][p]===!1?h=`${u}!=${p}`:l[u][p]==="contains"&&(h=`${u}*=${p}`),h&&(!["(",","].includes(c[c.length-1])&&c.length&&(c=`${c},`),c+=h)})}),c}return s=`_where=and(${o(a)})`,s}return Object.keys(t).forEach((a,s)=>{if(typeof t[a]>"u")return;const o=n.prefix?n.prefix:"";let l=t[a];typeof l=="string"&&(l=encodeURIComponent(l));let c=`${o}${a}=${l}`;a==="filter"&&n.convertFilter&&(c=i(l)),r=`${r}${s?"&":""}${c}`}),r.length>1?r:""};function Vs(t,e=!1){if(typeof t!="object"||Array.isArray(t))throw Error("Arg.0 must be an object");return{...t,_uniqueId:t._uniqueId&&!e?t._uniqueId:Nn.exports()}}function Ev(t){if(!(typeof t!="object"||t===null))for(const e of Object.keys(t)){const n=t[e];if(!(!n||typeof n!="object")){if(!Array.isArray(n)){Ev(n);continue}for(let r=0;r<n.length;r++)typeof n[r]!="object"||Array.isArray(n[r])||(n[r]=Vs(n[r]));Ev(n)}}}function Tv(t){if(!!t)for(const e of Object.keys(t)){const n=t[e];if(e==="_uniqueId"){delete t[e];continue}if(!(!n||typeof n!="object")){if(!Array.isArray(n)){Tv(n);continue}for(let r=0;r<n.length;r++)typeof n[r]!="object"||Array.isArray(n[r])||Tv(n)}}}function sre(t,e){function n(r){r&&typeof r=="object"&&e.forEach(i=>{delete r[i]})}return NQ(t,n)}function ore(t){return Math.abs(t)%1===.5}function lre(t){return t%2===0}function FO(t){const e=Math.round(t);return ore(t)?lre(e)?e:e-1:e}function wv(t){if(!(!t||typeof t!="object"))for(const e of Object.keys(t)){const n=t[e];if(n&&typeof n=="number")t[e]=FO(n);else if(Array.isArray(n))for(let r=0;r<n.length;r++)wv(t[e][r]);else wv(t[e])}}function cre({price:t,discountType:e,discount:n,quantity:r=1}){if(typeof t>"u")throw Error("Missing param price");if(typeof e>"u")throw Error("Missing param discountType");if(typeof n>"u")throw Error("Missing param discount");if(typeof r>"u")throw Error("Missing param quantity");if(!r)return 0;let i=t*r;return e==="fixed"&&n?i-=n:e==="percentage"&&!!n&&(i*=(100-n/100)/100),FO(i)}function pa(t){if(typeof t!="object"&&!Array.isArray(t))throw Error("Missing valid parameter articles");let e=Array.isArray(t)?t:[t];return e=e.map(n=>{const{price:r,quantity:i,discountType:a,discount:s}=n;return{...n,totalAmount:cre({price:r,quantity:i,discountType:a,discount:s})}}),Array.isArray(t)?e:e[0]}function ure(t){if(typeof t!="object"||Array.isArray(t))throw Error("Arg.0 must be an object");let e={ArticleId:null,article_no:null,id:null,vat:null,isDeductable:!1,isRut:!1,greenRot15:!1,greenRot50:!1,name:"",description:"",type:"service",price:0,currency:"SEK",priceType:"fixed",quantity:1,showPrice:!0,unitType:"unit",position:null,discountType:"fixed",discount:null,houseWorkType:void 0,houseWorkDeductionAmount:null,houseWorkHoursToReport:null,houseWorkMaterialCostToReport:null,bookkeepingPurchaseAccount:null,bookkeepingSalesAccount:null,bookkeepingSalesEUAccount:null,bookkeepingSalesEUVatAccount:null,bookkeepingSalesNonEUAccount:null,invoicesModuleArticleId:null,invoicesDocumentArticleId:null,invoicedAmount:0,totalAmount:0,packageId:null,...t};return e=Vs(e),e=pa(e),e}const Sv=t=>["isDeductable","isRut","greenRot15","greenRot50"].some(e=>!!t[e]),jO=t=>{const{isDeductable:e,isRut:n,greenRot15:r,greenRot50:i}=t||{};return e?"rot":n?"rut":r?"greenRot15":i?"greenRot50":null};function dre(t,e){let n=De(t),r=De(e),i=t,a=e;if(i===null)return-1;if(a===null)return 1;if(n!==r||!["string","date","number"].includes(n))return 0;if(n!=="date"){if(!Number.isNaN(parseInt(i,10))&&!Number.isNaN(parseInt(a,10))&&/^(?:\d|\.)*$/i.test(i)&&/^(?:\d|\.)*$/i.test(a)&&(i=parseInt(i,10),a=parseInt(a,10),n="number",r="number"),n==="number")return i<a?-1:i>a?1:0;if(!ci(di(i))||!ci(di(a)))return i.localeCompare(a);i=di(i),a=di(a)}return dO(i,a)?1:dO(a,i)?-1:0}function Dr(t,e=[]){return!e||De(e)==="array"&&!e.length?t:Object.keys(t).filter(r=>e.includes(r)).reduce((r,i)=>({...r,[i]:t[i]}),{})}function hi(t,e=[]){return!e||De(e)==="array"&&!e.length?t:Object.keys(t).filter(r=>!e.includes(r)).reduce((r,i)=>({...r,[i]:t[i]}),{})}function pre(t={}){const{manageCompany:e,manageProjects:n,manageOwnProjects:r,showPrices:i,manageAtas:a,manageOwnAtas:s,attestTimeTracks:o,manageUsers:l,readInvoices:c,readOwnInvoices:u,modifyInvoices:d,modifyOwnInvoices:p,deleteInvoices:f,deleteOwnInvoices:h,attestInvoices:m,attestOwnInvoices:g,exportInvoices:v,modifyBookkeepingSettings:_}=t;return e&&n&&r&&i&&a&&s&&o&&l&&c&&u&&d&&p&&f&&h&&m&&g&&v&&_?"admin":r&&i&&a&&s&&o?"projectleader":c&&u&&d&&p&&v&&_?"accountant":"member"}function fre(t){return Math.floor(t)!==t&&t.toString().split(".")[1].length||0}function hre(t,{currency:e,locale:n,decimals:r=0,suffix:i=!0,showZero:a=!1,withVat:s=null,hideZeroDecimals:o=!1}={}){if(typeof e>"u"||!e)throw new Error("Missing param currency");let l=t;if(typeof l>"u"&&(l=0),!l&&!a)return"";l=Number(l)||0,l=Math.round(l);let c=IQ({amount:l,currency:e});n&&(c=c.setLocale(n)),s&&(c=c.multiply(100+s).divide(100));let u=i?"$0,0":"0,0",d=r;return o&&(d=fre(c.getAmount()/100)),r&&d&&(u=`${u}.${"0".repeat(d)}`),c.toFormat(u)}function mre(t,e){const{locale:n}=te;return hre(t,{...e,...!e.locale&&{locale:n}})}function gre(){const t=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))}function yd(t){return{deviceType:gre()?"mobile":"desktop",deviceMode:["app","extension"].includes(t)?t:null}}function vre(t,e,n){const r=t.slice();return r.splice(typeof n=="number"?n:t.length,0,e),r}function yre(t,e){const n=t.slice();return n.splice(e,1),n}function _re(t,e,n){return t.map((r,i)=>i!==n?r:{...r,...e})}const bre=t=>({add:(e,n)=>vre(t,e,n),remove:e=>yre(t,e),set:(e,n)=>_re(t,e,n)}),Ere=async(t,{defaultRegion:e}={})=>{if(!t)return null;const{data:n}=await lv.post(`${re.api.baseUrl}/public/validate/phone`,{phone:t,defaultRegion:e});return n};function fa(t){return Array.from(new Set(t))}const UO=(t,e="")=>{const n={};return Object.keys(t).forEach(r=>{const i=t[r],a=e?`${e}.${r}`:r;typeof i=="object"&&!Array.isArray(i)?Object.assign(n,UO(i,a)):n[a]=i}),n},Tre=t=>{const e=Object.keys(t);let n="";return e.forEach(r=>{const i=typeof t[r]=="object",a=i&&t[r].length>=0;i||(n+=`${r}=${t[r]}&`),i&&a&&t[r].forEach(s=>{n+=`${r}=${s}&`})}),n&&n.slice(0,-1)},VO=t=>{_d.push(t)},BO=t=>{_d.map(e=>e(t))};let Bs=!1,_d=[];const wre=(t,{renewToken:e})=>{t.interceptors.request.use(n=>{const r=n;if(r.url.includes("/auth")||r.url.startsWith("/public/"))return r;const i=r.headers["X-TOKEN"];if(!i)return r;const a=Ee.getItem("tokenExpires");if(i&&a){const s=new Date,o=new Date(a);if(s>o)return Bs||(Bs=!0,e().then(c=>{Bs=!1,BO(c),_d=[]})),new Promise(c=>{VO(u=>{r.headers["X-TOKEN"]=u,c(r)})})}return r},n=>Promise.reject(n))},Sre=(t,{renewToken:e})=>{t.interceptors.response.use(n=>n,n=>{if(!n||!n.response)return Promise.reject(n);const{config:r,response:i}=n,{status:a,data:s}=i,{errorCode:o}=s,l=r;if(l.url.startsWith("/public/"))return Promise.reject(n);if(a===401&&o===8001)return Bs||(Bs=!0,e().then(u=>{Bs=!1,BO(u),_d=[]})),new Promise(u=>{VO(d=>{l.headers["X-TOKEN"]=d,u(lv(l))})});if(a===401&&typeof o>"u"){if(l.url.includes("auth/companyUser")&&!l.headers["X-TOKEN"])return Promise.reject(n);if(l.url.includes("auth/actionlink")&&!l.headers["X-TOKEN"])return Promise.reject(n);console.error("User should be logged out!!"),Ee.removeItem("token"),Ee.removeItem("tokenExpires"),Ee.removeItem("refreshToken"),Sr.trigger("user:unauthorized",{error:n})}return Promise.reject(n)})},HO=t=>(Ev(t.data),t),kre=t=>{t.interceptors.response.use(HO,e=>{const{response:n,config:r}=e;if(!n)throw new dQ(e);if(Object.prototype.hasOwnProperty.call(r,"errorHandle")&&r.errorHandle===!1)return Promise.reject(e);const{status:i}=n;switch(i){case 404:throw new lQ(e);case 401:throw new cQ(e);case 412:throw new uQ(e);default:throw new ca(e)}})},Cre=t=>{t.interceptors.response.use(e=>{var n,r;if(((r=(n=e.config)==null?void 0:n.url)==null?void 0:r.includes("document"))&&e.config.method==="post"){const i=JSON.parse(e.config.data);i.__tempId&&(e.data.__tempId=i.__tempId)}return e},e=>Promise.reject(e))},Ore=t=>{t.interceptors.request.use(e=>{if(["post","put"].includes(e.method)&&e.data&&!(e.data instanceof FormData)){const n=oa(e.data);Tv(n),e.data=n}return e},e=>Promise.reject(e))},Are=({baseUrl:t,withCredentials:e,cache:n})=>{const r=lv.create({baseURL:t,timeout:2e4,adapter:n,withCredentials:e,paramsSerializer:d=>Tre(d)});r.defaults.headers["X-CLIENT"]="widget",r.defaults.headers["X-CLIENT-VERSION"]="0.5.2";const i=async(d,p,f=null,h={})=>{const m=p.startsWith("/public/"),g=Ee.getItem("token");switch(g&&!m&&(r.defaults.headers["X-TOKEN"]=g),d){case"get":return r.get(p,h);case"post":return r.post(p,f,h);case"put":return r.put(p,f,h);case"delete":return r.delete(p,h);case"patch":return r.patch(p,f,h);default:throw new Error(`SendRequest failed as method: '${d}' is not implemented`)}},a=(d,p={})=>i("get",d,null,p),s=(d,p={},f={})=>i("put",d,p,f),o=(d,p,f={})=>i("post",d,p,f),l=(d,p={})=>i("delete",d,null,p),c=(d,p={})=>i("patch",d,null,p),u=async()=>{const d=Ee.getItem("refreshToken"),p=await o("/auth/companyUser",{refreshToken:d});if(!p.data||!p.data.token)throw new Error("No token was defined in result");const{token:f,tokenExpires:h,companyUser:m,company:g}=p.data;return Ee.setItem("token",f),Ee.setItem("tokenExpires",h),f};return wre(r,{renewToken:u}),Sre(r,{renewToken:u}),HO(r),kre(r),Ore(r),Cre(r),{instance:r,get:a,put:s,post:o,del:l,patch:c,renewToken:u}},kv=new Map;function $re(t){if(typeof t>"u")throw new Error("Missing valid parameter url");if(typeof t!="string")throw new Error("Parameter url must be a string");const{data:e,cachedAt:n,expiresAt:r}=kv.get(t)||{};return Date.now()>n+6e4*30||r&&Date.now()>r?(kv.delete(t),null):e}const xre=async t=>{const{url:e,params:n={}}=t,r=Object.keys(n).map(s=>`${s}=${n[s]}`).join("&"),i=`${e}${r?`?${r}`:""}`;return $re(i),await Xg(t)},Cv={withCredentials:!0,baseUrl:re.api.baseUrl},{get:Me,post:Ue,put:un,patch:mi,del:lr,instance:fUe,renewToken:Ire}=Are({withCredentials:Cv.withCredentials,baseUrl:Cv.baseUrl,cache:xre});async function zO(t){const e=are(t);return Me(`/project${e}`,{saveCache:!0})}const Pre=async(t,e={})=>Me("/project",t,{params:e}),Dre=async(t,e={})=>Me(`/project/${t}`,{params:e,saveCache:!0}),Rre=async(t,e,n={})=>un(`/project/${t}`,e,{params:n,invalidateCache:{type:"project",id:t}}),Mre=async t=>mi(`/project/${t}`),Nre=async(t,e={})=>lr(`/project/${t}`,{params:e,invalidateCache:{type:"project",id:t}}),Lre=async()=>Me("/project/createDemo"),Fre=async(t,e={})=>Ue("/auth/actionlink",{token:t,...e}),jre=async t=>Ue("/register",t),Ure=async(t,e)=>Ue("/companyUser/forgottenPassword/new",{password:t,resetPasswordToken:e}),Vre=async t=>Ue("/public/consent",t),Bre=async t=>Me(`/projectFile/${t}`),Hre=async t=>Ue("/projectFile",t),zre=async(t,e)=>un(`/projectFile/${t}`,e),Wre=async t=>lr(`/projectFile/${t}`),Gre=async t=>mi(`/projectFile/${t}`),qre=async(t,e={})=>Me(`/projectNote/${t}`,{params:e}),Yre=async(t,e={})=>Ue("/projectNote",t,{params:e}),Kre=async(t,e,n={})=>un(`/projectNote/${t}`,e,{params:n}),Jre=async t=>Me(`/file/${t}`),WO=async t=>Ue("/file",t),Zre=async(t,e)=>un(`/file/${t}`,e),Xre=async t=>lr(`/file/${t}`),Qre=async t=>mi(`/file/${t}`),eie=async(t={})=>Me("/endCustomer",{params:t}),tie=async(t,e={})=>Me(`/endCustomer/${t}`,{params:e}),nie=async(t,e={})=>Ue("/endCustomer",t,{params:e}),rie=async(t,e,n={})=>un(`/endCustomer/${t}`,e,{params:n}),iie=async(t,e={})=>lr(`/endCustomer/${t}`,{params:e}),aie=async(t,e={})=>mi(`/endCustomer/${t}`,{params:e}),sie=async t=>Ue("/search",{type:"endCustomer",query:t}),oie=async(t={})=>Me("/companyUser",{params:t,saveCache:!0}),lie=async(t,e={})=>Me(`/companyUser/${t}`,{params:e,saveCache:!0}),cie=async(t,e={})=>Ue("/companyUser",t,{params:e}),uie=async(t,e,n={})=>un(`/companyUser/${t}`,e,{params:n,invalidateCache:{type:"companyUser",id:t}}),die=async(t,e={})=>lr(`/companyUser/${t}`,{params:e,invalidateCache:{type:"companyUser",id:t}}),pie=async(t,e={})=>mi(`/companyUser/${t}`,{params:e}),GO={getPublic:async(t,e={})=>Me(`/public/companyUser/${t}`,{params:e}),getConnectedUsers:async(t={})=>Me("/companyUser/self/connectedUsers",{params:t}),getConnectedUserAuth:async(t,e={})=>Me(`/companyUser/self/connectedUsers/${t}/auth`,{params:e}),setConnectedUserDefault:async(t,e={})=>un(`/companyUser/self/connectedUsers/${t}/setDefaultAuth`,{params:e}),verifyEmail:async(t,e={})=>Ue("/public/verifyEmail/companyUser",t,{params:e})},fie=async(t,e=null,n={})=>un(`/companyAccount/accountType/${t}`,e,{params:n}),hie=async(t,e)=>Ue(`/project/${t}/projectMember/${e}`,null,{invalidateCache:{type:"project",id:t}}),mie=async(t,e)=>lr(`/project/${t}/projectMember/${e}`,{invalidateCache:{type:"project",id:t}}),gie=async(t={})=>Me("/companyInvoiceSetting",{params:t}),vie=async(t,e={})=>un("/companyInvoiceSetting",t,{params:e}),yie={get:async(t={})=>Me("/companyKYC",{params:t}),post:async(t,e={})=>Ue("/companyKYC",t,{params:e}),sign:async(t,e={})=>Ue("/companyKYC/sign",t,{params:e})},dn={get:async(t,e={})=>Me(`/document/${t}`,{params:e,saveCache:!0}),getAll:async(t={})=>Me("/document",{params:t,saveCache:!0}),post:async(t,e={})=>Ue("/document",t,{params:e}),send:async(t,e={},n={})=>Ue(`/document/${t}/send`,e,{params:n,invalidateCache:{type:"document",id:t}}),clearAnswers:async(t,e={},n={})=>Ue(`/document/${t}/clearAnswers`,e,{params:n,invalidateCache:{type:"document",id:t}}),put:async(t,e,n={})=>un(`/document/${t}`,e,{params:n,invalidateCache:{type:"document",id:t}}),delete:async(t,e={})=>lr(`/document/${t}`,{params:e,invalidateCache:{type:"document",id:t}}),patch:async(t,e={})=>mi(`/document/${t}`,{params:e}),validate:async(t,e={})=>Ue("/documentValidate",t,{params:e})},ha={get:async(t,e={})=>Me(t?`/template/${t}`:"/template",{params:e}),post:async(t,e={})=>Ue("/template",t,{params:e}),put:async(t,e,n={})=>un(`/template/${t}`,e,{params:n}),delete:async(t,e={})=>lr(`/template/${t}`,{params:e}),patch:async(t,e={})=>mi(`/template/${t}`,{params:e})},qO={get:async(t,e={})=>Me(`/public/document/${t}`,{params:e}),put:async(t,e,n={})=>un(`/public/document/${t}`,e,{headers:n}),answer:async(t,e,n={},r={})=>Ue(`/public/document/${t}/answer`,e,{params:n,headers:r}),feedback:async(t,e,n={})=>Ue(`/public/document/${t}/feedback`,e,{params:n})},Ov={getAuthUrl:async(t,e={})=>Me("/extension/authUrl",{params:{...e,service:t}}),getPublicAuthUrl:async(t,e={})=>Me("/public/extension/authUrl",{params:{...e,service:t}}),install:async(t,e,n={})=>Ue("/extension/install",e,{params:{...n,service:t}}),uninstall:async(t,e={})=>lr("/extension/uninstall",{params:{...e,service:t}}),suggestClients:async(t,e={})=>Me("/extension/suggestClients",{params:{...e,service:t},saveCache:!0,cacheTtl:20}),signupWithCrm:async(t,e,n={})=>Ue("/public/extension/register",e,{params:{...n,service:t}}),search:async(t,e={})=>Me("/extension/search",{params:{...e,service:t},saveCache:!0,cacheTtl:10}),getFields:async(t,e={})=>Me("/extension/fields",{params:{...e,service:t},saveCache:!0,cacheTtl:60}),getExternalReferenceDetails:async(t,e={})=>Me("/extension/externalReferenceDetails",{params:{...e,service:t},saveCache:!0,cacheTtl:20}),settings:async(t,e={})=>Me("/extension/settings",{params:{...e,service:t}})},Ut={get:Me,post:Ue,put:un,del:lr,patch:mi,authData:Cv,getProjects:zO},ma="SET_AS_NORMALIZED_DATA",YO=Object.freeze(Object.defineProperty({__proto__:null,SET_AS_NORMALIZED_DATA:ma},Symbol.toStringTag,{value:"Module"})),KO={DO_LOAD_CURRENT_COMPANY:"DO_LOAD_CURRENT_COMPANY",DO_UPDATE_CURRENT_COMPANY:"DO_UPDATE_CURRENT_COMPANY",DO_NORMALIZE_COMPANIES:"DO_NORMALIZE_COMPANIES",FORM_EDIT_COMPANY:"FORM_EDIT_COMPANY",FORM_SUBMIT_COMPANY:"FORM_SUBMIT_COMPANY",FORM_NEW_COMPANY_BRANDING:"FORM_NEW_COMPANY_BRANDING",FORM_EDIT_COMPANY_BRANDING:"FORM_EDIT_COMPANY_BRANDING",FORM_SUBMIT_COMPANY_BRANDING:"FORM_SUBMIT_COMPANY_BRANDING",UPDATE_COMPANY_ACCOUNT_TYPE:"UPDATE_COMPANY_ACCOUNT_TYPE"},Av={SET_COMPANIES:"SET_COMPANIES",CLEAR_COMPANIES:"CLEAR_COMPANIES",SET_COMPANIES_FETCHING:"SET_COMPANIES_FETCHING",SET_COMPANIES_POSTING:"SET_COMPANIES_POSTING"},JO={LOAD_COMPANY_USERS:"LOAD_COMPANY_USERS",LOAD_COMPANY_USER:"LOAD_COMPANY_USER",DO_NORMALIZE_COMPANY_USERS:"DO_NORMALIZE_COMPANY_USERS",UPDATE_COMPANY_USER:"UPDATE_COMPANY_USER",CREATE_COMPANY_USER:"CREATE_COMPANY_USER",DELETE_COMPANY_USER:"DELETE_COMPANY_USER",PATCH_COMPANY_USER:"PATCH_COMPANY_USER",FORM_NEW_COMPANY_USER:"FORM_NEW_COMPANY_USER",FORM_EDIT_COMPANY_USER:"FORM_EDIT_COMPANY_USER",FORM_SUBMIT_COMPANY_USER:"FORM_SUBMIT_COMPANY_USER"},$v={SET_COMPANY_USERS:"SET_COMPANY_USERS",DELETE_COMPANY_USER:"DELETE_COMPANY_USER",SET_COMPANY_USERS_FETCHING:"SET_COMPANY_USERS_FETCHING",SET_COMPANY_USERS_POSTING:"SET_COMPANY_USERS_POSTING"},ZO={LOAD_PROJECT_FILE:"LOAD_PROJECT_FILE",CREATE_PROJECT_FILE:"CREATE_PROJECT_FILE",UPDATE_PROJECT_FILE:"UPDATE_PROJECT_FILE",DELETE_PROJECT_FILE:"DELETE_PROJECT_FILE",PATCH_PROJECT_FILE:"PATCH_PROJECT_FILE"},bd={SET_PROJECT_FILES:"SET_PROJECT_FILES",DELETE_PROJECT_FILE:"DELETE_PROJECT_FILE"},cr={...ZO,LOAD_PROJECTS:"LOAD_PROJECTS",LOAD_PROJECT:"LOAD_PROJECT",LOAD_PUBLIC_PROJECT:"LOAD_PUBLIC_PROJECT",CREATE_PROJECT:"CREATE_PROJECT",CREATE_DEMOPROJECT:"CREATE_DEMOPROJECT",UPDATE_PROJECT:"UPDATE_PROJECT",DELETE_PROJECT:"DELETE_PROJECT",PATCH_PROJECT:"PATCH_PROJECT",FORM_EDIT_PROJECT:"FORM_EDIT_PROJECT",DO_SUBMIT_PROJECT:"DO_SUBMIT_PROJECT",SUBMIT_PROJECT:"SUBMIT_PROJECT",DO_LOAD_PROJECT:"DO_LOAD_PROJECT",DO_LOAD_PROJECTS:"DO_LOAD_PROJECTS",DO_LOAD_PROJECTS_COUNT:"DO_LOAD_PROJECTS_COUNT",LOAD_PROJECTS_FOR_CLIENT:"LOAD_PROJECTS_FOR_CLIENT",LOAD_PROJECTS_FOR_USER:"LOAD_PROJECTS_FOR_USER",FORM_SUBMIT_PROJECT:"FORM_SUBMIT_PROJECT",DO_CREATE_PROJECT_NOTE:"DO_CREATE_PROJECT_NOTE",FORM_EDIT_PROJECT_NOTE:"FORM_EDIT_PROJECT_NOTE",FORM_NEW_PROJECT_NOTE:"FORM_NEW_PROJECT_NOTE",FORM_SUBMIT_PROJECT_NOTE:"FORM_SUBMIT_PROJECT_NOTE",LOAD_PROJECT_NOTE:"LOAD_PROJECT_NOTE",DO_UPDATE_PROJECT_NOTE:"DO_UPDATE_PROJECT_NOTE",LOAD_EVENTS_FOR_PROJECT:"LOAD_EVENTS_FOR_PROJECT",DELETE_PROJECT_MEMBER:"SUBMIT_PROJECT_MEMBER",SUBMIT_PROJECT_MEMBER:"DELETE_PROJECT_MEMBER",SET_PROJECT_FILTER:"SET_PROJECT_FILTER",SET_PROJECT_SORT:"SET_PROJECT_SORT",SET_QUICKVIEW_PROJECT:"SET_QUICKVIEW_PROJECT",SET_PROJECT_LEADER:"SET_PROJECT_LEADER",CLEAR_PROJECTS:"CLEAR_PROJECTS"},pn={...bd,SET_PROJECTS:"SET_PROJECTS",SET_PROJECTS_FETCHING:"SET_PROJECTS_FETCHING",SET_PROJECTS_POSTING:"SET_PROJECTS_POSTING",SET_PROJECTS_CAN_FETCH_MORE:"SET_PROJECTS_CAN_FETCH_MORE",SET_PROJECTS_COUNT:"SET_PROJECTS_COUNT",CLEAR_PROJECT_DATA:"CLEAR_PROJECT_DATA",SET_PROJECT_NOTES:"SET_PROJECT_NOTES",SET_PROJECT_NOTES_FETCHING:"SET_PROJECT_NOTES_FETCHING",SET_PROJECT_NOTES_POSTING:"SET_PROJECT_NOTES_POSTING",SET_EVENTS:"SET_EVENTS",DELETE_MANY_PROJECTS:"DELETE_MANY_PROJECTS",ADD_PROJECT_MEMBER:"ADD_PROJECT_MEMBER",DELETE_PROJECT_MEMBER:"DELETE_PROJECT_MEMBER"},XO={LOAD_INVOICE_FORM:"LOAD_INVOICE_FORM",LOAD_DOCUMENT2_INVOICE_FORM:"LOAD_DOCUMENT2_INVOICE_FORM",LOAD_CREDIT_INVOICE_FORM:"LOAD_CREDIT_INVOICE_FORM",SUBMIT_INVOICE_FORM:"SUBMIT_INVOICE_FORM",LOAD_CAMPAIGN_INVOICE_FORM:"LOAD_CAMPAIGN_INVOICE_FORM",SET_KYC_FORM:"SET_KYC_FORM",DO_SAVE_KYC_FORM:"DO_SAVE_KYC_FORM"},_ie={},bie={SET_FORM_ARTICLE:"SET_FORM_ARTICLE",REMOVE_FORM_ARTICLE:"REMOVE_FORM_ARTICLE"},QO={LOAD_DOCUMENT2_FORM:"LOAD_DOCUMENT2_FORM",LOAD_DOCUMENT2_PUBLIC_FORM:"LOAD_DOCUMENT2_PUBLIC_FORM",LOAD_DUPLICATE_DOCUMENT2_FORM:"LOAD_DUPLICATE_DOCUMENT2_FORM",SAVE_DYNDOC_FORM:"SAVE_DYNDOC_FORM",CLEAR_DYNDOC_FORM:"CLEAR_DYNDOC_FORM",DO_SAVE_DYNDOC:"DO_SAVE_DYNDOC",HANDLE_DOCUMENT2_EDIT:"HANDLE_DOCUMENT2_EDIT",SAVE_TEMPLATE_FORM:"SAVE_TEMPLATE_FORM",LOAD_EXTERNAL_FORM_FIELDS:"LOAD_EXTERNAL_FORM_FIELDS"},Eie={},ur={...XO,...bie,...QO,LOAD_DOCUMENT_FORM:"LOAD_DOCUMENT_FORM",LOAD_UPGRADE_DOCUMENT_FORM:"LOAD_UPGRADE_DOCUMENT_FORM",LOAD_ATA_DOCUMENT_FORM:"LOAD_ATA_DOCUMENT_FORM",LOAD_DUPLICATE_DOCUMENT_FORM:"LOAD_DUPLICATE_DOCUMENT_FORM",LOAD_DEMO_DOCUMENT_FORM:"LOAD_DEMO_DOCUMENT_FORM",SAVE_DOCUMENT_FORM:"SAVE_DOCUMENT_FORM",SAVE_DOCUMENT_FORM_AND_SEND:"SAVE_DOCUMENT_FORM_AND_SEND",DO_SAVE_DOCUMENT:"DO_SAVE_DOCUMENT",SUBMIT_DOCUMENT_AND_SEND:"SUBMIT_DOCUMENT_AND_SEND",FORM_DOCUMENT_SET_CLIENT:"FORM_DOCUMENT_SET_CLIENT",FORM_DOCUMENT_SUBMIT_CLIENT:"FORM_DOCUMENT_SUBMIT_CLIENT",FORM_RESET_OLD:"FORM_RESET_OLD",FORM_CLEAR_FORM:"FORM_CLEAR_FORM",SET_FORM:"SET_FORM",SET_FORM_VALUE:"SET_FORM_VALUE",REMOVE_FORM_VALUE:"REMOVE_FORM_VALUE",REMOVE_FORM_KEY_VALUE:"REMOVE_FORM_KEY_VALUE"},dr={..._ie,...Eie,SET_FORM:"SET_FORM",CLEAR_FORM:"CLEAR_FORM",SET_FORM_VALUE:"SET_FORM_VALUE",REMOVE_FORM_VALUE:"REMOVE_FORM_VALUE",REMOVE_FORM_KEY_VALUE:"REMOVE_FORM_KEY_VALUE"},eA={DELETE_DOCUMENT2:"DELETE_DOCUMENT2",DO_CREATE_DOCUMENT2:"DO_CREATE_DOCUMENT2",DO_LOAD_DOCUMENT2:"DO_LOAD_DOCUMENT2",DO_LOAD_DOCUMENTS2:"DO_LOAD_DOCUMENTS2",DO_UPDATE_DOCUMENT2:"DO_UPDATE_DOCUMENT2",LOAD_DOCUMENT2:"LOAD_DOCUMENT2",LOAD_DOCUMENTS2:"LOAD_DOCUMENTS2",LOAD_DOCUMENTS2_EXTERNAL:"LOAD_DOCUMENTS2_EXTERNAL",PATCH_DOCUMENT2:"PATCH_DOCUMENT2",UPDATE_DOCUMENT2:"UPDATE_DOCUMENT2",UPDATE_DOCUMENT2_STATUS:"UPDATE_DOCUMENT2_STATUS",DO_SEND_DOCUMENT2:"DO_SEND_DOCUMENT2",SEND_REMINDER_DOCUMENT2:"SEND_REMINDER_DOCUMENT2",REQUEST_PROPERTY_DOCUMENT2:"REQUEST_PROPERTY_DOCUMENT2",CLEAR_DOCUMENT2_ANSWERS:"CLEAR_DOCUMENT2_ANSWERS",ANSWER_OWN_DOCUMENT2:"ANSWER_OWN_DOCUMENT2"},xv={DELETE_MANY_DOCUMENTS2:"DELETE_MANY_DOCUMENTS2",SET_DOCUMENTS2:"SET_DOCUMENTS2",SET_DOCUMENT2_FETCHING:"SET_DOCUMENT2_FETCHING",SET_DOCUMENT2_POSTING:"SET_DOCUMENT2_POSTING"},Ed={LOAD_FILE:"LOAD_FILE",CREATE_FILE:"CREATE_FILE",UPDATE_FILE:"UPDATE_FILE",DELETE_FILE:"DELETE_FILE",PATCH_FILE:"PATCH_FILE",FORM_NEW_FILE:"FORM_NEW_FILE",FORM_EDIT_FILE:"FORM_EDIT_FILE",FORM_SUBMIT_FILE:"FORM_SUBMIT_FILE"},Iv={UPDATE_MANY_FILES:"UPDATE_MANY_FILES",DELETE_ONE_FILE:"DELETE_ONE_FILE",CLEAR_FILES:"CLEAR_FILES",SET_FILES_FETCHING:"SET_FILES_FETCHING",SET_FILES_POSTING:"SET_FILES_POSTING"},tA={DO_LOAD_INVOICE_SETTINGS:"DO_LOAD_INVOICE_SETTINGS",LOAD_INVOICE_SETTINGS:"LOAD_INVOICE_SETTINGS",DO_UPDATE_INVOICE_SETTINGS:"DO_UPDATE_INVOICE_SETTINGS",UPDATE_INVOICE_SETTINGS:"UPDATE_INVOICE_SETTINGS",FORM_EDIT_INVOICE_SETTINGS:"FORM_EDIT_INVOICE_SETTINGS",FORM_SUBMIT_INVOICE_SETTINGS:"FORM_SUBMIT_INVOICE_SETTINGS"},Pv={SET_INVOICE_SETTINGS_FETCHING:"SET_INVOICE_SETTINGS_FETCHING",SET_INVOICE_SETTINGS_POSTING:"SET_INVOICE_SETTINGS_POSTING"},nA={...tA,DO_LOAD_ALL_SETTINGS:"DO_LOAD_ALL_SETTINGS",LOAD_ALL_SETTINGS:"LOAD_ALL_SETTINGS",DO_LOAD_SETTINGS_COMPANY:"DO_LOAD_SETTINGS_COMPANY",DO_LOAD_SETTINGS_COMPANYUSER:"DO_LOAD_SETTINGS_COMPANYUSER",LOAD_SETTINGS_COMPANY:"LOAD_SETTINGS_COMPANY",LOAD_SETTINGS_COMPANYUSER:"LOAD_SETTINGS_COMPANYUSER",UPDATE_SETTINGS:"UPDATE_SETTINGS",DO_UPDATE_SETTINGS:"DO_UPDATE_SETTINGS",FORM_EDIT_COMPANY_SETTINGS:"FORM_EDIT_COMPANY_SETTINGS",FORM_SUBMIT_COMPANY_SETTINGS:"FORM_SUBMIT_COMPANY_SETTINGS",FORM_EDIT_COMPANY_USER_SETTINGS:"FORM_EDIT_COMPANY_USER_SETTINGS",FORM_SUBMIT_COMPANY_USER_SETTINGS:"FORM_SUBMIT_COMPANY_USER_SETTINGS"},rA={...Pv,SET_SETTINGS:"SET_SETTINGS",CLEAR_SETTINGS:"CLEAR_SETTINGS",SET_SETTINGS_FETCHING:"SET_SETTINGS_FETCHING",SET_SETTINGS_POSTING:"SET_SETTINGS_POSTING"},Tie={LOAD_ARTICLES:"LOAD_ARTICLES",LOAD_ARTICLE:"LOAD_ARTICLE",SET_ARTICLES:"SET_ARTICLES",UPDATE_ARTICLE:"UPDATE_ARTICLE",DO_CREATE_ARTICLE:"DO_CREATE_ARTICLE",DELETE_ARTICLE:"DELETE_ARTICLE",PATCH_ARTICLE:"PATCH_ARTICLE",SEARCH_ARTICLE:"SEARCH_ARTICLE",FORM_NEW_ARTICLE:"FORM_NEW_ARTICLE",FORM_EDIT_ARTICLE:"FORM_EDIT_ARTICLE",FORM_SUBMIT_ARTICLE:"FORM_SUBMIT_ARTICLE"},iA={LOAD_ENDCUSTOMERS:"LOAD_ENDCUSTOMERS",LOAD_ENDCUSTOMER:"LOAD_ENDCUSTOMER",UPDATE_ENDCUSTOMER:"UPDATE_ENDCUSTOMER",CREATE_ENDCUSTOMER:"CREATE_ENDCUSTOMER",DELETE_ENDCUSTOMER:"DELETE_ENDCUSTOMER",PATCH_ENDCUSTOMER:"PATCH_ENDCUSTOMER",FORM_NEW_ENDCUSTOMER:"FORM_NEW_ENDCUSTOMER",FORM_EDIT_ENDCUSTOMER:"FORM_EDIT_ENDCUSTOMER",FORM_SUBMIT_ENDCUSTOMER:"FORM_SUBMIT_ENDCUSTOMER"},Hs={CLEAR_END_CUSTOMER:"CLEAR_END_CUSTOMER",SET_ENDCUSTOMERS:"SET_ENDCUSTOMERS",DELETE_ENDCUSTOMER:"DELETE_ENDCUSTOMER",SET_ENDCUSTOMER_FETCHING:"SET_ENDCUSTOMER_FETCHING",SET_ENDCUSTOMER_POSTING:"SET_ENDCUSTOMER_POSTING"},wie={LOAD_CERTIFICATES:"LOAD_CERTIFICATES",DO_SET_COMPANY_CERTIFICATES:"DO_SET_COMPANY_CERTIFICATES",SUBMIT_CERTIFICATES:"SUBMIT_CERTIFICATES"},Sie={SET_CERTIFICATES:"SET_CERTIFICATES",CLEAR_CERTIFICATES:"CLEAR_CERTIFICATES",SET_CERTIFICATES_FETCHING:"SET_CERTIFICATES_FETCHING",SET_CERTIFICATES_POSTING:"SET_CERTIFICATES_POSTING"},kie={LOAD_COMPANY_REFERENCES:"LOAD_COMPANY_REFERENCES",LOAD_COMPANY_REFERENCE:"LOAD_COMPANY_REFERENCE",CREATE_COMPANY_REFERENCE:"CREATE_COMPANY_REFERENCE",UPDATE_COMPANY_REFERENCE:"UPDATE_COMPANY_REFERENCE",DELETE_COMPANY_REFERENCE:"DELETE_COMPANY_REFERENCE",PATCH_COMPANY_REFERENCE:"PATCH_COMPANY_REFERENCE",FORM_NEW_COMPANY_REFERENCE:"FORM_NEW_COMPANY_REFERENCE",FORM_EDIT_COMPANY_REFERENCE:"FORM_EDIT_COMPANY_REFERENCE",FORM_SUBMIT_COMPANY_REFERENCE:"FORM_SUBMIT_COMPANY_REFERENCE"},Cie={SET_COMPANY_REFERENCES:"SET_COMPANY_REFERENCES",DELETE_COMPANY_REFERENCE:"DELETE_COMPANY_REFERENCE",CLEAR_COMPANY_REFERENCES:"CLEAR_COMPANY_REFERENCES",SET_COMPANY_REFERENCE_FETCHING:"SET_COMPANY_REFERENCE_FETCHING",SET_COMPANY_REFERENCE_POSTING:"SET_COMPANY_REFERENCE_POSTING"},Oie={LOAD_COMPANY_REFERENCE_ITEMS:"LOAD_COMPANY_REFERENCE_ITEMS",LOAD_COMPANY_REFERENCE_ITEM:"LOAD_COMPANY_REFERENCE_ITEM",SET_COMPANY_REFERENCE_ITEMS:"SET_COMPANY_REFERENCE_ITEMS",CREATE_COMPANY_REFERENCE_ITEM:"CREATE_COMPANY_REFERENCE_ITEM",UPDATE_COMPANY_REFERENCE_ITEM:"UPDATE_COMPANY_REFERENCE_ITEM",DELETE_COMPANY_REFERENCE_ITEM:"DELETE_COMPANY_REFERENCE_ITEM",FORM_NEW_COMPANY_REFERENCE_ITEM:"FORM_NEW_COMPANY_REFERENCE_ITEM",FORM_SUBMIT_COMPANY_REFERENCE_ITEMS:"FORM_SUBMIT_COMPANY_REFERENCE_ITEMS"},Aie={SET_COMPANY_REFERENCE_ITEMS:"SET_COMPANY_REFERENCE_ITEMS",DELETE_COMPANY_REFERENCE_ITEM:"DELETE_COMPANY_REFERENCE_ITEM",CLEAR_COMPANY_REFERENCE_ITEMS:"CLEAR_COMPANY_REFERENCE_ITEMS"},$ie={LOAD_TEMPLATE_MESSAGES:"LOAD_TEMPLATE_MESSAGES",LOAD_TEMPLATE_MESSAGE:"LOAD_TEMPLATE_MESSAGE",CREATE_TEMPLATE_MESSAGE:"CREATE_TEMPLATE_MESSAGE",UPDATE_TEMPLATE_MESSAGE:"UPDATE_TEMPLATE_MESSAGE",DELETE_TEMPLATE_MESSAGE:"DELETE_TEMPLATE_MESSAGE",PATCH_TEMPLATE_MESSAGE:"PATCH_TEMPLATE_MESSAGE",FORM_NEW_TEMPLATE_MESSAGE:"FORM_NEW_TEMPLATE_MESSAGE",FORM_EDIT_TEMPLATE_MESSAGE:"FORM_EDIT_TEMPLATE_MESSAGE",FORM_SUBMIT_TEMPLATE_MESSAGE:"FORM_SUBMIT_TEMPLATE_MESSAGE"},xie={LOAD_NOTIFICATIONS:"LOAD_NOTIFICATIONS",LOAD_UNREAD_NOTIFICATIONS:"LOAD_UNREAD_NOTIFICATIONS",LOAD_NOTIFICATION:"LOAD_NOTIFICATION",SET_READ_FOR_PROJECT:"SET_READ_FOR_PROJECT",SET_READ_FOR_INVOICE:"SET_READ_FOR_INVOICE",SET_NOTIFICATION_READ:"SET_NOTIFICATION_READ",SET_ALL_NOTIFICATION_READ:"SET_ALL_NOTIFICATION_READ",DO_CREATE_NOTIFICATION:"DO_CREATE_NOTIFICATION"},Iie={SET_NOTIFICATIONS:"SET_NOTIFICATIONS",CLEAR_NOTIFICATIONS:"CLEAR_NOTIFICATIONS",DELETE_MANY_NOTIFICATIONS:"DELETE_MANY_NOTIFICATIONS",SET_NOTIFICATIONS_FETCHED_AT:"SET_NOTIFICATIONS_FETCHED_AT",SET_NOTIFICATIONS_FETCHING:"SET_NOTIFICATIONS_FETCHING",SET_NOTIFICATIONS_POSTING:"SET_NOTIFICATIONS_POSTING"},Pie={LOAD_BOOKKEEPING_EXPORTS:"LOAD_BOOKKEEPING_EXPORTS",CREATE_BOOKKEEPING_EXPORT:"CREATE_BOOKKEEPING_EXPORT",CREATE_ROT_RUT_XML:"CREATE_ROT_RUT_XML"},Die={},Rie={LOAD_INVOICE_NOTE:"LOAD_INVOICE_NOTE",DO_CREATE_INVOICE_NOTE:"DO_CREATE_INVOICE_NOTE",DO_UPDATE_INVOICE_NOTE:"DO_UPDATE_INVOICE_NOTE",FORM_NEW_INVOICE_NOTE:"FORM_NEW_INVOICE_NOTE",FORM_EDIT_INVOICE_NOTE:"FORM_EDIT_INVOICE_NOTE",FORM_SUBMIT_INVOICE_NOTE:"FORM_SUBMIT_INVOICE_NOTE"},Mie={SET_INVOICE_NOTES:"SET_INVOICE_NOTES",SET_INVOICE_NOTES_FETCHING:"SET_INVOICE_NOTES_FETCHING",SET_INVOICE_NOTES_POSTING:"SET_INVOICE_NOTES_POSTING"},Nie={...Pie,...Rie,DO_LOAD_INVOICE:"DO_LOAD_INVOICE",DELETE_INVOICE:"DELETE_INVOICE",DO_CREATE_INVOICE:"DO_CREATE_INVOICE",DO_LOAD_INVOICES:"DO_LOAD_INVOICES",LOAD_INVOICE:"LOAD_INVOICE",LOAD_INVOICES:"LOAD_INVOICES",UPDATE_INVOICE:"UPDATE_INVOICE",DO_UPDATE_INVOICE:"DO_UPDATE_INVOICE",ATTEST_INVOICE:"ATTEST_INVOICE",DO_ATTEST_INVOICE:"DO_ATTEST_INVOICE",START_INVOICE_DISPUTE:"START_INVOICE_DISPUTE",CANCEL_INVOICE_DISPUTE:"CANCEL_INVOICE_DISPUTE",REGISTER_INVOICE_PAYMENT:"REGISTER_INVOICE_PAYMENT",REGISTER_INVOICE_WRITEOFF:"REGISTER_INVOICE_WRITEOFF",SEND_INVOICE:"SEND_INVOICE",SEND_INVOICE_REMINDER:"SEND_INVOICE_REMINDER",UPDATE_INVOICE_ADDRESS:"UPDATE_INVOICE_ADDRESS",REGISTER_INVOICING:"REGISTER_INVOICING",LOAD_UNMATCHED_PAYMENTS:"LOAD_UNMATCHED_PAYMENTS",MATCH_PAYMENT:"MATCH_PAYMENT",DELETE_UNMATCHED_PAYMENT:"DELETE_UNMATCHED_PAYMENT",DO_SELL_INVOICE:"DO_SELL_INVOICE",SELL_INVOICE:"SELL_INVOICE",CANCEL_SELL_INVOICE:"CANCEL_SELL_INVOICE",GET_KYC_STATUS:"GET_KYC_STATUS",SIGN_KYC:"SIGN_KYC",CREATE_INVOICE_INTEREST:"CREATE_INVOICE_INTEREST",SET_INVOICE_REGION_SWEDEN_EXPORTED_HOUSEWORK:"SET_INVOICE_REGION_SWEDEN_EXPORTED_HOUSEWORK",SET_INVOICE_REGION_SWEDEN_PROCESSED_HOUSEWORK:"SET_INVOICE_REGION_SWEDEN_PROCESSED_HOUSEWORK",SET_INVOICE_FILTER:"SET_INVOICE_FILTER",SET_INVOICE_SORT:"SET_INVOICE_SORT"},Lie={...Die,...Mie,DELETE_MANY_INVOICES:"DELETE_MANY_INVOICES",SET_INVOICES:"SET_INVOICES",SET_INVOICES_STATUS_COUNT:"SET_INVOICES_STATUS_COUNT",SET_INVOICES_FETCHING:"SET_INVOICES_FETCHING",SET_INVOICES_POSTING:"SET_INVOICES_POSTING",SET_INVOICE_FILTER:"SET_INVOICE_FILTER",SET_INVOICE_SORT:"SET_INVOICE_SORT"},Fie={LOAD_TIME_TRACKS:"LOAD_TIME_TRACKS",LOAD_TIME_TRACK:"LOAD_TIME_TRACK",CREATE_TIME_TRACK:"CREATE_TIME_TRACK",UPDATE_TIME_TRACK:"UPDATE_TIME_TRACK",DELETE_TIME_TRACK:"DELETE_TIME_TRACK",PATCH_TIME_TRACK:"PATCH_TIME_TRACK",ATTEST_TIME_TRACK:"ATTEST_TIME_TRACK",TIME_TRACK_START_TIMER:"TIME_TRACK_START_TIMER",TIME_TRACK_STOP_TIMER:"TIME_TRACK_STOP_TIMER",TIME_TRACK_GET_TIMER:"TIME_TRACK_GET_TIMER",TIME_TRACK_CLEAR_TIMER:"TIME_TRACK_CLEAR_TIMER",FORM_NEW_TIME_TRACK:"FORM_NEW_TIME_TRACK",FORM_EDIT_TIME_TRACK:"FORM_EDIT_TIME_TRACK",FORM_SUBMIT_TIME_TRACK:"FORM_SUBMIT_TIME_TRACK"},jie={SET_TIME_TRACKS:"SET_TIME_TRACKS",DELETE_TIME_TRACK:"DELETE_TIME_TRACK",CLEAR_TIME_TRACKS:"CLEAR_TIME_TRACKS",SET_TIME_TRACK_TIMER:"SET_TIME_TRACK_TIMER",SET_TIME_TRACKS_FETCHING:"SET_TIME_TRACKS_FETCHING",SET_TIME_TRACKS_POSTING:"SET_TIME_TRACKS_POSTING"},aA={DO_CREATE_TEMPLATE:"DO_CREATE_TEMPLATE",DO_LOAD_TEMPLATE:"DO_LOAD_TEMPLATE",DO_LOAD_TEMPLATES:"DO_LOAD_TEMPLATES",DO_UPDATE_TEMPLATE:"DO_UPDATE_TEMPLATE",LOAD_TEMPLATE:"LOAD_TEMPLATE",LOAD_TEMPLATES:"LOAD_TEMPLATES",UPDATE_TEMPLATE:"UPDATE_TEMPLATE",DELETE_TEMPLATE:"DELETE_TEMPLATE",PATCH_TEMPLATE:"PATCH_TEMPLATE",HIDE_TEMPLATE:"HIDE_TEMPLATE",DUPLICATE_PROTECTED_TEMPLATE:"DUPLICATE_PROTECTED_TEMPLATE"},Dv={SET_TEMPLATES:"SET_TEMPLATES",SET_TEMPLATE_FETCHING:"SET_TEMPLATE_FETCHING",SET_TEMPLATE_POSTING:"SET_TEMPLATE_POSTING",DELETE_MANY_TEMPLATES:"DELETE_MANY_TEMPLATES"},Uie={DO_LOAD_PUBLIC_DOCUMENT:"DO_LOAD_PUBLIC_DOCUMENT",DO_LOAD_PUBLIC_DOCUMENTS:"DO_LOAD_PUBLIC_DOCUMENTS",PUT_PUBLIC_DOCUMENT:"PUT_PUBLIC_DOCUMENT",PUT_CURRENT_PUBLIC_DOCUMENT:"PUT_CURRENT_PUBLIC_DOCUMENT",LOAD_PUBLIC_DOCUMENT:"LOAD_PUBLIC_DOCUMENT",LOAD_PUBLIC_DOCUMENTS:"LOAD_PUBLIC_DOCUMENTS",ANSWER_PUBLIC_DOCUMENT:"ANSWER_PUBLIC_DOCUMENT",ANSWER_CURRENT_PUBLIC_DOCUMENT:"ANSWER_CURRENT_PUBLIC_DOCUMENT",DO_SET_CURRENT_DOCUMENT:"DO_SET_CURRENT_DOCUMENT",SET_CURRENT_PUBLIC_DOCUMENT_VALUE:"SET_CURRENT_PUBLIC_DOCUMENT_VALUE",RELOAD_CURRENT_DOCUMENT:"RELOAD_CURRENT_DOCUMENT",LOAD_PUBLIC_COMPANY:"LOAD_PUBLIC_COMPANY",LOAD_CLIENT_DOCUMENTS:"LOAD_CLIENT_DOCUMENTS",LOAD_CLIENT_INVOICES:"LOAD_CLIENT_INVOICES",REQUEST_MAGIC_LINK:"REQUEST_MAGIC_LINK"},Vie={SET_PUBLIC_DOCUMENTS:"SET_PUBLIC_DOCUMENTS",SET_PUBLIC_INVOICES:"SET_PUBLIC_INVOICES",SET_PUBLIC_DOCUMENTS_FETCHING:"SET_PUBLIC_DOCUMENTS_FETCHING",SET_PUBLIC_DOCUMENTS_POSTING:"SET_PUBLIC_DOCUMENTS_POSTING",SET_CURRENT_DOCUMENT:"SET_CURRENT_DOCUMENT",SET_CURRENT_DOCUMENT_VALUE:"SET_CURRENT_DOCUMENT_VALUE",SET_PUBLIC_COMPANIES:"SET_PUBLIC_COMPANIES",SET_VIEWER:"SET_VIEWER"},Bie={LOAD_DOCUMENT_TERMS:"LOAD_DOCUMENT_TERMS",LOAD_DOCUMENT_TERM:"LOAD_DOCUMENT_TERM",CREATE_DOCUMENT_TERM:"CREATE_DOCUMENT_TERM",UPDATE_DOCUMENT_TERM:"UPDATE_DOCUMENT_TERM",DELETE_DOCUMENT_TERM:"DELETE_DOCUMENT_TERM",PATCH_DOCUMENT_TERM:"PATCH_DOCUMENT_TERM",FORM_NEW_DOCUMENT_TERM:"FORM_NEW_DOCUMENT_TERM",FORM_EDIT_DOCUMENT_TERM:"FORM_EDIT_DOCUMENT_TERM",FORM_SUBMIT_DOCUMENT_TERM:"FORM_SUBMIT_DOCUMENT_TERM"},Hie={SET_DOCUMENT_TERMS:"SET_DOCUMENT_TERMS",DELETE_DOCUMENT_TERM:"DELETE_DOCUMENT_TERM",CLEAR_DOCUMENT_TERMS:"CLEAR_DOCUMENT_TERMS",SET_DOCUMENT_TERMS_FETCHING:"SET_DOCUMENT_TERMS_FETCHING",SET_DOCUMENT_TERMS_POSTING:"SET_DOCUMENT_TERMS_POSTING"},zie={LOAD_UNIT_TYPES:"LOAD_UNIT_TYPES",LOAD_UNIT_TYPE:"LOAD_UNIT_TYPE",CREATE_UNIT_TYPE:"CREATE_UNIT_TYPE",UPDATE_UNIT_TYPE:"UPDATE_UNIT_TYPE",DELETE_UNIT_TYPE:"DELETE_UNIT_TYPE"},Wie={SET_UNIT_TYPES:"SET_UNIT_TYPES",DELETE_UNIT_TYPE:"DELETE_UNIT_TYPE",SET_UNIT_TYPE_FETCHING:"SET_UNIT_TYPE_FETCHING",SET_UNIT_TYPE_POSTING:"SET_UNIT_TYPE_POSTING"},Rr={...YO,application:yl,projects:cr,forms:ur,documents2:eA,files:Ed,settings:nA,articles:Tie,endCustomers:iA,certificates:wie,companies:KO,companyUsers:JO,companyReferences:kie,companyReferenceItems:Oie,templateMessages:$ie,notifications:xie,invoices:Nie,timeTracks:Fie,templates:aA,publicDocuments:Uie,documentTerms:Bie,unitTypes:zie,stripe:{LOAD_PRICES:"LOAD_PRICES",RESET_STRIPE_FORM:"RESET_STRIPE_FORM",SET_STRIPE_FORM_VALUE:"SET_STRIPE_FORM_VALUE",SET_FORM_PROMOTION:"SET_FORM_PROMOTION",SUBMIT_PROMOTION_CODE:"SUBMIT_PROMOTION_CODE",SUBMIT_PAYMENT_METHOD:"SUBMIT_PAYMENT_METHOD",SUBMIT_FORM_PLAN:"SUBMIT_FORM_PLAN",CONFIRM_PAYMENT:"CONFIRM_PAYMENT",REMOVE_SUBSCRIPTION_ITEM:"REMOVE_SUBSCRIPTION_ITEM",SUBMIT_FORM_PAYMENT:"SUBMIT_STRIPE_FORM_PAYMENT",SUBMIT_FORM_PRODUCTS:"SUBMIT_STRIPE_FORM_PRODUCTS"},CREATE_ARTICLE:"CREATE_ARTICLE",CREATE_COMPANY_USER:"CREATE_COMPANY_USER",CREATE_ENDCUSTOMER:"CREATE_ENDCUSTOMER",CREATE_PROJECT:"CREATE_PROJECT",DELETE_ARTICLE:"DELETE_ARTICLE",DELETE_COMPANY_USER:"DELETE_COMPANY_USER",DELETE_ENDCUSTOMER:"DELETE_ENDCUSTOMER",DELETE_PROJECT:"DELETE_PROJECT",FORM_CLEAR_FORM:"FORM_CLEAR_FORM",FORM_EDIT_ARTICLE:"FORM_EDIT_ARTICLE",FORM_EDIT_COMPANY:"FORM_EDIT_COMPANY",FORM_EDIT_COMPANY_USER:"FORM_EDIT_COMPANY_USER",FORM_EDIT_COMPANY_BRANDING:"FORM_EDIT_COMPANY_BRANDING",FORM_EDIT_ENDCUSTOMER:"FORM_EDIT_ENDCUSTOMER",FORM_NEW_ARTICLE:"FORM_NEW_ARTICLE",FORM_NEW_COMPANY_USER:"FORM_NEW_COMPANY_USER",FORM_NEW_COMPANY_BRANDING:"FORM_NEW_COMPANY_BRANDING",FORM_NEW_ENDCUSTOMER:"FORM_NEW_ENDCUSTOMER",FORM_NEW_OFFER:"FORM_NEW_OFFER",FORM_SUBMIT_ARTICLE:"FORM_SUBMIT_ARTICLE",FORM_SUBMIT_COMPANY:"FORM_SUBMIT_COMPANY",FORM_SUBMIT_COMPANY_USER:"FORM_SUBMIT_COMPANY_USER",FORM_SUBMIT_COMPANY_BRANDING:"FORM_SUBMIT_COMPANY_BRANDING",FORM_SUBMIT_ENDCUSTOMER:"FORM_SUBMIT_ENDCUSTOMER",FORM_SUBMIT_OFFER:"FORM_SUBMIT_OFFER",LOAD_ARTICLE:"LOAD_ARTICLE",LOAD_ARTICLES:"LOAD_ARTICLES",LOAD_CERTIFICATES:"LOAD_CERTIFICATES",LOAD_COMPANY_USER:"LOAD_COMPANY_USER",LOAD_COMPANY_USERS:"LOAD_COMPANY_USERS",DO_LOAD_CURRENT_COMPANY:"DO_LOAD_CURRENT_COMPANY",LOAD_ENDCUSTOMER:"LOAD_ENDCUSTOMER",LOAD_ENDCUSTOMERS:"LOAD_ENDCUSTOMERS",LOAD_PROJECT:"LOAD_PROJECT",LOAD_PROJECTS:"LOAD_PROJECTS",LOAD_PUBLIC_PROJECT:"LOAD_PUBLIC_PROJECT",PATCH_ARTICLE:"PATCH_ARTICLE",PATCH_COMPANY_USER:"PATCH_COMPANY_USER",SEARCH_ARTICLE:"SEARCH_ARTICLE",SET_ARTICLES:"SET_ARTICLES",SET_FORM:"SET_FORM",SET_PROJECTS:"SET_PROJECTS",SET_READ_FOR_PROJECT:"SET_READ_FOR_PROJECT",SORT:"SORT",UPDATE_ARTICLE:"UPDATE_ARTICLE",UPDATE_COMPANY_USER:"UPDATE_COMPANY_USER",DO_UPDATE_CURRENT_COMPANY:"DO_UPDATE_CURRENT_COMPANY",UPDATE_ENDCUSTOMER:"UPDATE_ENDCUSTOMER",UPDATE_PROJECT:"UPDATE_PROJECT"},ce={};Object.keys(Rr).forEach(t=>{typeof Rr[t]=="object"&&Object.keys(Rr[t]).forEach(e=>{ce[e]&&console.warn(`Duplicate action constant warning!, ${Rr[t][e]}`),ce[e]=`${t}/${Rr[t][e]}`})}),Object.keys(YO).forEach(t=>{ce[t]&&console.warn(`Duplicate action constant warning!, ${Rr[t]}`),ce[t]=Rr[t]});var sA={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ne,function(){return function(n){var r={};function i(a){if(r[a])return r[a].exports;var s=r[a]={i:a,l:!1,exports:{}};return n[a].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=n,i.c=r,i.d=function(a,s,o){i.o(a,s)||Object.defineProperty(a,s,{enumerable:!0,get:o})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,s){if(1&s&&(a=i(a)),8&s||4&s&&typeof a=="object"&&a&&a.__esModule)return a;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:a}),2&s&&typeof a!="string")for(var l in a)i.d(o,l,function(c){return a[c]}.bind(null,l));return o},i.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(s,"a",s),s},i.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},i.p="",i(i.s=6)}([function(n,r,i){var a=i(12),s={};function o(y,T){return T===l(y)}function l(y){var T=typeof y;return T!=="object"?T:y?y instanceof Error?"error":{}.toString.call(y).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function c(y){return o(y,"function")}function u(y){var T=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),E=RegExp("^"+T+"$");return d(y)&&E.test(y)}function d(y){var T=typeof y;return y!=null&&(T=="object"||T=="function")}function p(){var y=w();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(T){var E=(y+16*Math.random())%16|0;return y=Math.floor(y/16),(T==="x"?E:7&E|8).toString(16)})}var f={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 h(y,T){var E,k;try{E=s.stringify(y)}catch($){if(T&&c(T))try{E=T(y)}catch(C){k=C}else k=$}return{error:k,value:E}}function m(y,T){return function(E,k){try{T(E,k)}catch($){y.error($)}}}var g=["log","network","dom","navigation","error","manual"],v=["critical","error","warning","info","debug"];function _(y,T){for(var E=0;E<y.length;++E)if(y[E]===T)return!0;return!1}function w(){return Date.now?+Date.now():+new Date}n.exports={addParamsAndAccessTokenToPath:function(y,T,E){(E=E||{}).access_token=y;var k,$=[];for(k in E)Object.prototype.hasOwnProperty.call(E,k)&&$.push([k,E[k]].join("="));var C="?"+$.sort().join("&");(T=T||{}).path=T.path||"";var I,M=T.path.indexOf("?"),O=T.path.indexOf("#");M!==-1&&(O===-1||O>M)?(I=T.path,T.path=I.substring(0,M)+C+"&"+I.substring(M+1)):O!==-1?(I=T.path,T.path=I.substring(0,O)+C+I.substring(O)):T.path=T.path+C},createItem:function(y,T,E,k,$){for(var C,I,M,O,A,P,L=[],F=[],j=0,S=y.length;j<S;++j){var b=l(P=y[j]);switch(F.push(b),b){case"undefined":break;case"string":C?L.push(P):C=P;break;case"function":O=m(T,P);break;case"date":L.push(P);break;case"error":case"domexception":case"exception":I?L.push(P):I=P;break;case"object":case"array":if(P instanceof Error||typeof DOMException<"u"&&P instanceof DOMException){I?L.push(P):I=P;break}if(k&&b==="object"&&!A){for(var D=0,N=k.length;D<N;++D)if(P[k[D]]!==void 0){A=P;break}if(A)break}M?L.push(P):M=P;break;default:if(P instanceof Error||typeof DOMException<"u"&&P instanceof DOMException){I?L.push(P):I=P;break}L.push(P)}}L.length>0&&((M=a(M)).extraArgs=L);var V={message:C,err:I,custom:M,timestamp:w(),callback:O,notifier:E,diagnostic:{},uuid:p()};return function(W,G){G&&G.level!==void 0&&(W.level=G.level,delete G.level),G&&G.skipFrames!==void 0&&(W.skipFrames=G.skipFrames,delete G.skipFrames)}(V,M),k&&A&&(V.request=A),$&&(V.lambdaContext=$),V._originalArgs=y,V.diagnostic.original_arg_types=F,V},addErrorContext:function(y,T){var E=y.data.custom||{},k=!1;try{for(var $=0;$<T.length;++$)T[$].hasOwnProperty("rollbarContext")&&(E=a(E,T[$].rollbarContext),k=!0);k&&(y.data.custom=E)}catch(C){y.diagnostic.error_context="Failed: "+C.message}},createTelemetryEvent:function(y){for(var T,E,k,$,C=0,I=y.length;C<I;++C)switch(l($=y[C])){case"string":!T&&_(g,$)?T=$:!k&&_(v,$)&&(k=$);break;case"object":E=$}return{type:T||"manual",metadata:E||{},level:k}},filterIp:function(y,T){if(y&&y.user_ip&&T!==!0){var E=y.user_ip;if(T)try{var k;if(E.indexOf(".")!==-1)(k=E.split(".")).pop(),k.push("0"),E=k.join(".");else if(E.indexOf(":")!==-1){if((k=E.split(":")).length>2){var $=k.slice(0,3),C=$[2].indexOf("/");C!==-1&&($[2]=$[2].substring(0,C)),E=$.concat("0000:0000:0000:0000:0000").join(":")}}else E=null}catch{E=null}else E=null;y.user_ip=E}},formatArgsAsString:function(y){var T,E,k,$=[];for(T=0,E=y.length;T<E;++T){switch(l(k=y[T])){case"object":(k=(k=h(k)).error||k.value).length>500&&(k=k.substr(0,497)+"...");break;case"null":k="null";break;case"undefined":k="undefined";break;case"symbol":k=k.toString()}$.push(k)}return $.join(" ")},formatUrl:function(y,T){if(!(T=T||y.protocol)&&y.port&&(y.port===80?T="http:":y.port===443&&(T="https:")),T=T||"https:",!y.hostname)return null;var E=T+"//"+y.hostname;return y.port&&(E=E+":"+y.port),y.path&&(E+=y.path),E},get:function(y,T){if(y){var E=T.split("."),k=y;try{for(var $=0,C=E.length;$<C;++$)k=k[E[$]]}catch{k=void 0}return k}},handleOptions:function(y,T,E,k){var $=a(y,T,E);return $=function(C,I){return C.hostWhiteList&&!C.hostSafeList&&(C.hostSafeList=C.hostWhiteList,C.hostWhiteList=void 0,I&&I.log("hostWhiteList is deprecated. Use hostSafeList.")),C.hostBlackList&&!C.hostBlockList&&(C.hostBlockList=C.hostBlackList,C.hostBlackList=void 0,I&&I.log("hostBlackList is deprecated. Use hostBlockList.")),C}($,k),!T||T.overwriteScrubFields||T.scrubFields&&($.scrubFields=(y.scrubFields||[]).concat(T.scrubFields)),$},isError:function(y){return o(y,"error")||o(y,"exception")},isFunction:c,isIterable:function(y){var T=l(y);return T==="object"||T==="array"},isNativeFunction:u,isType:o,isObject:d,isString:function(y){return typeof y=="string"||y instanceof String},jsonParse:function(y){var T,E;try{T=s.parse(y)}catch(k){E=k}return{error:E,value:T}},LEVELS:{debug:0,info:1,warning:2,error:3,critical:4},makeUnhandledStackInfo:function(y,T,E,k,$,C,I,M){var O={url:T||"",line:E,column:k};O.func=M.guessFunctionName(O.url,O.line),O.context=M.gatherContext(O.url,O.line);var A=typeof document<"u"&&document&&document.location&&document.location.href,P=typeof window<"u"&&window&&window.navigator&&window.navigator.userAgent;return{mode:C,message:$?String($):y||I,url:A,stack:[O],useragent:P}},merge:a,now:w,redact:function(){return"********"},RollbarJSON:s,sanitizeUrl:function(y){var T=function(E){if(!!o(E,"string")){for(var k=f,$=k.parser[k.strictMode?"strict":"loose"].exec(E),C={},I=0,M=k.key.length;I<M;++I)C[k.key[I]]=$[I]||"";return C[k.q.name]={},C[k.key[12]].replace(k.q.parser,function(O,A,P){A&&(C[k.q.name][A]=P)}),C}}(y);return T?(T.anchor===""&&(T.source=T.source.replace("#","")),y=T.source.replace("?"+T.query,"")):"(unknown)"},set:function(y,T,E){if(y){var k=T.split("."),$=k.length;if(!($<1))if($!==1)try{for(var C=y[k[0]]||{},I=C,M=1;M<$-1;++M)C[k[M]]=C[k[M]]||{},C=C[k[M]];C[k[$-1]]=E,y[k[0]]=I}catch{return}else y[k[0]]=E}},setupJSON:function(y){c(s.stringify)&&c(s.parse)||(o(JSON,"undefined")||(y?(u(JSON.stringify)&&(s.stringify=JSON.stringify),u(JSON.parse)&&(s.parse=JSON.parse)):(c(JSON.stringify)&&(s.stringify=JSON.stringify),c(JSON.parse)&&(s.parse=JSON.parse))),c(s.stringify)&&c(s.parse)||y&&y(s))},stringify:h,maxByteSize:function(y){for(var T=0,E=y.length,k=0;k<E;k++){var $=y.charCodeAt(k);$<128?T+=1:$<2048?T+=2:$<65536&&(T+=3)}return T},typeName:l,uuid4:p}},function(n,r,i){i(17);var a=i(18),s=i(0);n.exports={error:function(){var o=Array.prototype.slice.call(arguments,0);o.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(o)):console.error.apply(console,o)},info:function(){var o=Array.prototype.slice.call(arguments,0);o.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(o)):console.info.apply(console,o)},log:function(){var o=Array.prototype.slice.call(arguments,0);o.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(o)):console.log.apply(console,o)}}},function(n,r,i){n.exports={parse:function(a){var s,o,l={protocol:null,auth:null,host:null,path:null,hash:null,href:a,hostname:null,port:null,pathname:null,search:null,query:null};if((s=a.indexOf("//"))!==-1?(l.protocol=a.substring(0,s),o=s+2):o=0,(s=a.indexOf("@",o))!==-1&&(l.auth=a.substring(o,s),o=s+1),(s=a.indexOf("/",o))===-1){if((s=a.indexOf("?",o))===-1)return(s=a.indexOf("#",o))===-1?l.host=a.substring(o):(l.host=a.substring(o,s),l.hash=a.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=a.substring(o,s),l.hostname=l.host.split(":")[0],l.port=l.host.split(":")[1],l.port&&(l.port=parseInt(l.port,10)),o=s}else l.host=a.substring(o,s),l.hostname=l.host.split(":")[0],l.port=l.host.split(":")[1],l.port&&(l.port=parseInt(l.port,10)),o=s;if((s=a.indexOf("#",o))===-1?l.path=a.substring(o):(l.path=a.substring(o,s),l.hash=a.substring(s)),l.path){var c=l.path.split("?");l.pathname=c[0],l.query=c[1],l.search=l.query?"?"+l.query:null}return l}}},function(n,r,i){var a=i(22),s=new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ");function o(){return null}function l(d){var p={};return p._stackFrame=d,p.url=d.fileName,p.line=d.lineNumber,p.func=d.functionName,p.column=d.columnNumber,p.args=d.args,p.context=null,p}function c(d,p){return{stack:function(){var f=[];p=p||0;try{f=a.parse(d)}catch{f=[]}for(var h=[],m=p;m<f.length;m++)h.push(new l(f[m]));return h}(),message:d.message,name:u(d),rawStack:d.stack,rawException:d}}function u(d){var p=d.name&&d.name.length&&d.name,f=d.constructor.name&&d.constructor.name.length&&d.constructor.name;return p&&f?p==="Error"?f:p:p||f}n.exports={guessFunctionName:function(){return"?"},guessErrorClass:function(d){if(!d||!d.match)return["Unknown error. There was no error message to display.",""];var p=d.match(s),f="(unknown)";return p&&(f=p[p.length-1],d=(d=d.replace((p[p.length-2]||"")+f+":","")).replace(/(^[\s]+|[\s]+$)/g,"")),[f,d]},gatherContext:o,parse:function(d,p){var f=d;if(f.nested){for(var h=[];f;)h.push(new c(f,p)),f=f.nested,p=0;return h[0].traceChain=h,h[0]}return new c(f,p)},Stack:c,Frame:l}},function(n,r,i){var a=i(0),s=i(5);function o(l,c){var u=c.split("."),d=u.length-1;try{for(var p=0;p<=d;++p)p<d?l=l[u[p]]:l[u[p]]=a.redact()}catch{}}n.exports=function(l,c,u){if(c=c||[],u)for(var d=0;d<u.length;++d)o(l,u[d]);var p=function(m){for(var g,v=[],_=0;_<m.length;++_)g="^\\[?(%5[bB])?"+m[_]+"\\[?(%5[bB])?\\]?(%5[dD])?$",v.push(new RegExp(g,"i"));return v}(c),f=function(m){for(var g,v=[],_=0;_<m.length;++_)g="\\[?(%5[bB])?"+m[_]+"\\[?(%5[bB])?\\]?(%5[dD])?",v.push(new RegExp("("+g+"=)([^&\\n]+)","igm"));return v}(c);function h(m,g){return g+a.redact()}return s(l,function m(g,v,_){var w=function(y,T){var E;for(E=0;E<p.length;++E)if(p[E].test(y)){T=a.redact();break}return T}(g,v);return w===v?a.isType(v,"object")||a.isType(v,"array")?s(v,m,_):function(y){var T;if(a.isType(y,"string"))for(T=0;T<f.length;++T)y=y.replace(f[T],h);return y}(w):w})}},function(n,r,i){var a=i(0);n.exports=function(s,o,l){var c,u,d,p,f=a.isType(s,"object"),h=a.isType(s,"array"),m=[];if(l=l||{obj:[],mapped:[]},f){if(p=l.obj.indexOf(s),f&&p!==-1)return l.mapped[p]||l.obj[p];l.obj.push(s),p=l.obj.length-1}if(f)for(c in s)Object.prototype.hasOwnProperty.call(s,c)&&m.push(c);else if(h)for(d=0;d<s.length;++d)m.push(d);var g=f?{}:[],v=!0;for(d=0;d<m.length;++d)u=s[c=m[d]],g[c]=o(c,u,l),v=v&&g[c]===s[c];return f&&!v&&(l.mapped[p]=g),v?s:g}},function(n,r,i){n.exports=i(7)},function(n,r,i){var a=i(8),s=typeof window<"u"&&window._rollbarConfig,o=s&&s.globalAlias||"Rollbar",l=typeof window<"u"&&window[o]&&typeof window[o].shimId=="function"&&window[o].shimId()!==void 0;if(typeof window>"u"||window._rollbarStartTime||(window._rollbarStartTime=new Date().getTime()),!l&&s){var c=new a(s);window[o]=c}else typeof window<"u"?(window.rollbar=a,window._rollbarDidLoad=!0):typeof self<"u"&&(self.rollbar=a,self._rollbarDidLoad=!0);n.exports=a},function(n,r,i){var a=i(9),s=i(29),o=i(30),l=i(32),c=i(34),u=i(4),d=i(35);a.setComponents({telemeter:s,instrumenter:o,polyfillJSON:l,wrapGlobals:c,scrub:u,truncation:d}),n.exports=a},function(n,r,i){var a=i(10),s=i(0),o=i(15),l=i(1),c=i(19),u=i(20),d=i(2),p=i(21),f=i(24),h=i(25),m=i(26),g=i(3);function v(C,I){this.options=s.handleOptions($,C,null,l),this.options._configuredOptions=C;var M=this.components.telemeter,O=this.components.instrumenter,A=this.components.polyfillJSON;this.wrapGlobals=this.components.wrapGlobals,this.scrub=this.components.scrub;var P=this.components.truncation,L=new u(P),F=new o(this.options,L,d,P);M&&(this.telemeter=new M(this.options)),this.client=I||new a(this.options,F,l,this.telemeter,"browser");var j=T(),S=typeof document<"u"&&document;this.isChrome=j.chrome&&j.chrome.runtime,this.anonymousErrorsPending=0,function(b,D,N){b.addTransform(p.handleDomException).addTransform(p.handleItemWithError).addTransform(p.ensureItemHasSomethingToSay).addTransform(p.addBaseInfo).addTransform(p.addRequestInfo(N)).addTransform(p.addClientInfo(N)).addTransform(p.addPluginInfo(N)).addTransform(p.addBody).addTransform(f.addMessageWithError).addTransform(f.addTelemetryData).addTransform(f.addConfigToPayload).addTransform(p.addScrubber(D.scrub)).addTransform(f.userTransform(l)).addTransform(f.addConfiguredOptions).addTransform(f.addDiagnosticKeys).addTransform(f.itemToPayload)}(this.client.notifier,this,j),this.client.queue.addPredicate(m.checkLevel).addPredicate(h.checkIgnore).addPredicate(m.userCheckIgnore(l)).addPredicate(m.urlIsNotBlockListed(l)).addPredicate(m.urlIsSafeListed(l)).addPredicate(m.messageIsIgnored(l)),this.setupUnhandledCapture(),O&&(this.instrumenter=new O(this.options,this.client.telemeter,this,j,S),this.instrumenter.instrument()),s.setupJSON(A)}var _=null;function w(C){var I="Rollbar is not initialized";l.error(I),C&&C(new Error(I))}function y(C){for(var I=0,M=C.length;I<M;++I)if(s.isFunction(C[I]))return C[I]}function T(){return typeof window<"u"&&window||typeof self<"u"&&self}v.init=function(C,I){return _?_.global(C).configure(C):_=new v(C,I)},v.prototype.components={},v.setComponents=function(C){v.prototype.components=C},v.prototype.global=function(C){return this.client.global(C),this},v.global=function(C){if(_)return _.global(C);w()},v.prototype.configure=function(C,I){var M=this.options,O={};return I&&(O={payload:I}),this.options=s.handleOptions(M,C,O,l),this.options._configuredOptions=s.handleOptions(M._configuredOptions,C,O),this.client.configure(this.options,I),this.instrumenter&&this.instrumenter.configure(this.options),this.setupUnhandledCapture(),this},v.configure=function(C,I){if(_)return _.configure(C,I);w()},v.prototype.lastError=function(){return this.client.lastError},v.lastError=function(){if(_)return _.lastError();w()},v.prototype.log=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.log(C),{uuid:I}},v.log=function(){if(_)return _.log.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.debug=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.debug(C),{uuid:I}},v.debug=function(){if(_)return _.debug.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.info=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.info(C),{uuid:I}},v.info=function(){if(_)return _.info.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.warn=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.warn(C),{uuid:I}},v.warn=function(){if(_)return _.warn.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.warning=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.warning(C),{uuid:I}},v.warning=function(){if(_)return _.warning.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.error=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.error(C),{uuid:I}},v.error=function(){if(_)return _.error.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.critical=function(){var C=this._createItem(arguments),I=C.uuid;return this.client.critical(C),{uuid:I}},v.critical=function(){if(_)return _.critical.apply(_,arguments);var C=y(arguments);w(C)},v.prototype.buildJsonPayload=function(C){return this.client.buildJsonPayload(C)},v.buildJsonPayload=function(){if(_)return _.buildJsonPayload.apply(_,arguments);w()},v.prototype.sendJsonPayload=function(C){return this.client.sendJsonPayload(C)},v.sendJsonPayload=function(){if(_)return _.sendJsonPayload.apply(_,arguments);w()},v.prototype.setupUnhandledCapture=function(){var C=T();this.unhandledExceptionsInitialized||(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(c.captureUncaughtExceptions(C,this),this.wrapGlobals&&this.options.wrapGlobalEventHandlers&&this.wrapGlobals(C,this),this.unhandledExceptionsInitialized=!0),this.unhandledRejectionsInitialized||(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&(c.captureUnhandledRejections(C,this),this.unhandledRejectionsInitialized=!0)},v.prototype.handleUncaughtException=function(C,I,M,O,A,P){if(this.options.captureUncaught||this.options.handleUncaughtExceptions){if(this.options.inspectAnonymousErrors&&this.isChrome&&A===null&&I==="")return"anonymous";var L,F=s.makeUnhandledStackInfo(C,I,M,O,A,"onerror","uncaught exception",g);s.isError(A)?(L=this._createItem([C,A,P]))._unhandledStackInfo=F:s.isError(I)?(L=this._createItem([C,I,P]))._unhandledStackInfo=F:(L=this._createItem([C,P])).stackInfo=F,L.level=this.options.uncaughtErrorLevel,L._isUncaught=!0,this.client.log(L)}},v.prototype.handleAnonymousErrors=function(){if(this.options.inspectAnonymousErrors&&this.isChrome){var C=this;try{Error.prepareStackTrace=function(I,M){if(C.options.inspectAnonymousErrors&&C.anonymousErrorsPending){if(C.anonymousErrorsPending-=1,!I)return;I._isAnonymous=!0,C.handleUncaughtException(I.message,null,null,null,I)}return I.stack}}catch(I){this.options.inspectAnonymousErrors=!1,this.error("anonymous error handler failed",I)}}},v.prototype.handleUnhandledRejection=function(C,I){if(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections){var M="unhandled rejection was null or undefined!";if(C)if(C.message)M=C.message;else{var O=s.stringify(C);O.value&&(M=O.value)}var A,P=C&&C._rollbarContext||I&&I._rollbarContext;s.isError(C)?A=this._createItem([M,C,P]):(A=this._createItem([M,C,P])).stackInfo=s.makeUnhandledStackInfo(M,"",0,0,null,"unhandledrejection","",g),A.level=this.options.uncaughtErrorLevel,A._isUncaught=!0,A._originalArgs=A._originalArgs||[],A._originalArgs.push(I),this.client.log(A)}},v.prototype.wrap=function(C,I,M){try{var O;if(O=s.isFunction(I)?I:function(){return I||{}},!s.isFunction(C)||C._isWrap)return C;if(!C._rollbar_wrapped&&(C._rollbar_wrapped=function(){M&&s.isFunction(M)&&M.apply(this,arguments);try{return C.apply(this,arguments)}catch(L){var P=L;throw P&&window._rollbarWrappedError!==P&&(s.isType(P,"string")&&(P=new String(P)),P._rollbarContext=O()||{},P._rollbarContext._wrappedSource=C.toString(),window._rollbarWrappedError=P),P}},C._rollbar_wrapped._isWrap=!0,C.hasOwnProperty))for(var A in C)C.hasOwnProperty(A)&&A!=="_rollbar_wrapped"&&(C._rollbar_wrapped[A]=C[A]);return C._rollbar_wrapped}catch{return C}},v.wrap=function(C,I){if(_)return _.wrap(C,I);w()},v.prototype.captureEvent=function(){var C=s.createTelemetryEvent(arguments);return this.client.captureEvent(C.type,C.metadata,C.level)},v.captureEvent=function(){if(_)return _.captureEvent.apply(_,arguments);w()},v.prototype.captureDomContentLoaded=function(C,I){return I||(I=new Date),this.client.captureDomContentLoaded(I)},v.prototype.captureLoad=function(C,I){return I||(I=new Date),this.client.captureLoad(I)},v.prototype.loadFull=function(){l.info("Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.")},v.prototype._createItem=function(C){return s.createItem(C,l,this)};var E=i(27),k=i(28),$={version:E.version,scrubFields:k.scrubFields,logLevel:E.logLevel,reportLevel:E.reportLevel,uncaughtErrorLevel:E.uncaughtErrorLevel,endpoint:E.endpoint,verbose:!1,enabled:!0,transmit:!0,sendConfig:!1,includeItemsInTelemetry:!0,captureIp:!0,inspectAnonymousErrors:!0,ignoreDuplicateErrors:!0,wrapGlobalEventHandlers:!1};n.exports=v},function(n,r,i){var a=i(11),s=i(13),o=i(14),l=i(0);function c(p,f,h,m,g){this.options=l.merge(p),this.logger=h,c.rateLimiter.configureGlobal(this.options),c.rateLimiter.setPlatformOptions(g,this.options),this.api=f,this.queue=new s(c.rateLimiter,f,h,this.options);var v=this.options.tracer||null;d(v)?(this.tracer=v,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier=new o(this.queue,this.options),this.telemeter=m,u(p),this.lastError=null,this.lastErrorHash="none"}function u(p){p.stackTraceLimit&&(Error.stackTraceLimit=p.stackTraceLimit)}function d(p){if(!p||!p.scope||typeof p.scope!="function")return!1;var f=p.scope();return!(!f||!f.active||typeof f.active!="function")}c.rateLimiter=new a({maxItems:0,itemsPerMinute:60}),c.prototype.global=function(p){return c.rateLimiter.configureGlobal(p),this},c.prototype.configure=function(p,f){var h=this.options,m={};f&&(m={payload:f}),this.options=l.merge(h,p,m);var g=this.options.tracer||null;return d(g)?(this.tracer=g,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),u(p),this.global(this.options),d(p.tracer)&&(this.tracer=p.tracer),this},c.prototype.log=function(p){var f=this._defaultLogLevel();return this._log(f,p)},c.prototype.debug=function(p){this._log("debug",p)},c.prototype.info=function(p){this._log("info",p)},c.prototype.warn=function(p){this._log("warning",p)},c.prototype.warning=function(p){this._log("warning",p)},c.prototype.error=function(p){this._log("error",p)},c.prototype.critical=function(p){this._log("critical",p)},c.prototype.wait=function(p){this.queue.wait(p)},c.prototype.captureEvent=function(p,f,h){return this.telemeter&&this.telemeter.captureEvent(p,f,h)},c.prototype.captureDomContentLoaded=function(p){return this.telemeter&&this.telemeter.captureDomContentLoaded(p)},c.prototype.captureLoad=function(p){return this.telemeter&&this.telemeter.captureLoad(p)},c.prototype.buildJsonPayload=function(p){return this.api.buildJsonPayload(p)},c.prototype.sendJsonPayload=function(p){this.api.postJsonPayload(p)},c.prototype._log=function(p,f){var h;if(f.callback&&(h=f.callback,delete f.callback),this.options.ignoreDuplicateErrors&&this._sameAsLastError(f)){if(h){var m=new Error("ignored identical item");m.item=f,h(m)}}else try{this._addTracingInfo(f),f.level=f.level||p,this.telemeter&&this.telemeter._captureRollbarItem(f),f.telemetryEvents=this.telemeter&&this.telemeter.copyEvents()||[],this.notifier.log(f,h)}catch(g){h&&h(g),this.logger.error(g)}},c.prototype._defaultLogLevel=function(){return this.options.logLevel||"debug"},c.prototype._sameAsLastError=function(p){if(!p._isUncaught)return!1;var f=function(h){var m=h.message||"",g=(h.err||{}).stack||String(h.err);return m+"::"+g}(p);return this.lastErrorHash===f||(this.lastError=p.err,this.lastErrorHash=f,!1)},c.prototype._addTracingInfo=function(p){if(this.tracer){var f=this.tracer.scope().active();if(function(g){if(!g||!g.context||typeof g.context!="function")return!1;var v=g.context();return!(!v||!v.toSpanId||!v.toTraceId||typeof v.toSpanId!="function"||typeof v.toTraceId!="function")}(f)){f.setTag("rollbar.error_uuid",p.uuid),f.setTag("rollbar.has_error",!0),f.setTag("error",!0),f.setTag("rollbar.item_url","https://rollbar.com/item/uuid/?uuid="+p.uuid),f.setTag("rollbar.occurrence_url","https://rollbar.com/occurrence/uuid/?uuid="+p.uuid);var h=f.context().toSpanId(),m=f.context().toTraceId();p.custom?(p.custom.opentracing_span_id=h,p.custom.opentracing_trace_id=m):p.custom={opentracing_span_id:h,opentracing_trace_id:m}}}},n.exports=c},function(n,r,i){var a=i(0);function s(c){this.startTime=a.now(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(c)}function o(c,u,d){return!c.ignoreRateLimit&&u>=1&&d>u}function l(c,u,d,p,f,h,m){var g=null;return d&&(d=new Error(d)),d||p||(g=function(v,_,w,y,T){var E,k=_.environment||_.payload&&_.payload.environment;E=T?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var $={body:{message:{body:E,extra:{maxItems:w,itemsPerMinute:y}}},language:"javascript",environment:k,notifier:{version:_.notifier&&_.notifier.version||_.version}};return v==="browser"?($.platform="browser",$.framework="browser-js",$.notifier.name="rollbar-browser-js"):v==="server"?($.framework=_.framework||"node-js",$.notifier.name=_.notifier.name):v==="react-native"&&($.framework=_.framework||"react-native",$.notifier.name=_.notifier.name),$}(c,u,f,h,m)),{error:d,shouldSend:p,payload:g}}s.globalSettings={startTime:a.now(),maxItems:void 0,itemsPerMinute:void 0},s.prototype.configureGlobal=function(c){c.startTime!==void 0&&(s.globalSettings.startTime=c.startTime),c.maxItems!==void 0&&(s.globalSettings.maxItems=c.maxItems),c.itemsPerMinute!==void 0&&(s.globalSettings.itemsPerMinute=c.itemsPerMinute)},s.prototype.shouldSend=function(c,u){var d=(u=u||a.now())-this.startTime;(d<0||d>=6e4)&&(this.startTime=u,this.perMinCounter=0);var p=s.globalSettings.maxItems,f=s.globalSettings.itemsPerMinute;if(o(c,p,this.counter))return l(this.platform,this.platformOptions,p+" max items reached",!1);if(o(c,f,this.perMinCounter))return l(this.platform,this.platformOptions,f+" items per minute reached",!1);this.counter++,this.perMinCounter++;var h=!o(c,p,this.counter),m=h;return h=h&&!o(c,f,this.perMinCounter),l(this.platform,this.platformOptions,null,h,p,f,m)},s.prototype.setPlatformOptions=function(c,u){this.platform=c,this.platformOptions=u},n.exports=s},function(n,r,i){var a=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=function(l){if(!l||s.call(l)!=="[object Object]")return!1;var c,u=a.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&a.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!u&&!d)return!1;for(c in l);return c===void 0||a.call(l,c)};n.exports=function l(){var c,u,d,p,f,h={},m=null,g=arguments.length;for(c=0;c<g;c++)if((m=arguments[c])!=null)for(f in m)u=h[f],h!==(d=m[f])&&(d&&o(d)?(p=u&&o(u)?u:{},h[f]=l(p,d)):d!==void 0&&(h[f]=d));return h}},function(n,r,i){var a=i(0);function s(l,c,u,d){this.rateLimiter=l,this.api=c,this.logger=u,this.options=d,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 c=this.options;return this.options=a.merge(c,l),this},s.prototype.addPredicate=function(l){return a.isFunction(l)&&this.predicates.push(l),this},s.prototype.addPendingItem=function(l){this.pendingItems.push(l)},s.prototype.removePendingItem=function(l){var c=this.pendingItems.indexOf(l);c!==-1&&this.pendingItems.splice(c,1)},s.prototype.addItem=function(l,c,u,d){c&&a.isFunction(c)||(c=function(){});var p=this._applyPredicates(l);if(p.stop)return this.removePendingItem(d),void c(p.err);if(this._maybeLog(l,u),this.removePendingItem(d),this.options.transmit){this.pendingRequests.push(l);try{this._makeApiRequest(l,function(f,h){this._dequeuePendingRequest(l),c(f,h)}.bind(this))}catch(f){this._dequeuePendingRequest(l),c(f)}}else c(new Error("Transmit disabled"))},s.prototype.wait=function(l){a.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 c=null,u=0,d=this.predicates.length;u<d;u++)if(!(c=this.predicates[u](l,this.options))||c.err!==void 0)return{stop:!0,err:c.err};return{stop:!1,err:null}},s.prototype._makeApiRequest=function(l,c){var u=this.rateLimiter.shouldSend(l);u.shouldSend?this.api.postItem(l,function(d,p){d?this._maybeRetry(d,l,c):c(d,p)}.bind(this)):u.error?c(u.error):this.api.postItem(u.payload,c)};var o=["ECONNRESET","ENOTFOUND","ESOCKETTIMEDOUT","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH","EPIPE","EAI_AGAIN"];s.prototype._maybeRetry=function(l,c,u){var d=!1;if(this.options.retryInterval){for(var p=0,f=o.length;p<f;p++)if(l.code===o[p]){d=!0;break}}d?this._retryApiRequest(c,u):u(l)},s.prototype._retryApiRequest=function(l,c){this.retryQueue.push({item:l,callback:c}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var u=this.retryQueue.shift();this._makeApiRequest(u.item,u.callback)}}.bind(this),this.options.retryInterval))},s.prototype._dequeuePendingRequest=function(l){var c=this.pendingRequests.indexOf(l);c!==-1&&(this.pendingRequests.splice(c,1),this._maybeCallWait())},s.prototype._maybeLog=function(l,c){if(this.logger&&this.options.verbose){var u=c;if(u=(u=u||a.get(l,"body.trace.exception.message"))||a.get(l,"body.trace_chain.0.exception.message"))return void this.logger.error(u);(u=a.get(l,"body.message.body"))&&this.logger.log(u)}},s.prototype._maybeCallWait=function(){return!(!a.isFunction(this.waitCallback)||this.pendingItems.length!==0||this.pendingRequests.length!==0)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},n.exports=s},function(n,r,i){var a=i(0);function s(o,l){this.queue=o,this.options=l,this.transforms=[],this.diagnostic={}}s.prototype.configure=function(o){this.queue&&this.queue.configure(o);var l=this.options;return this.options=a.merge(l,o),this},s.prototype.addTransform=function(o){return a.isFunction(o)&&this.transforms.push(o),this},s.prototype.log=function(o,l){if(l&&a.isFunction(l)||(l=function(){}),!this.options.enabled)return l(new Error("Rollbar is not enabled"));this.queue.addPendingItem(o);var c=o.err;this._applyTransforms(o,function(u,d){if(u)return this.queue.removePendingItem(o),l(u,null);this.queue.addItem(d,l,c,o)}.bind(this))},s.prototype._applyTransforms=function(o,l){var c=-1,u=this.transforms.length,d=this.transforms,p=this.options,f=function(h,m){h?l(h,null):++c!==u?d[c](m,p,f):l(null,m)};f(null,o)},n.exports=s},function(n,r,i){var a=i(0),s=i(16),o={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function l(u,d,p,f,h){this.options=u,this.transport=d,this.url=p,this.truncation=f,this.jsonBackup=h,this.accessToken=u.accessToken,this.transportOptions=c(u,p)}function c(u,d){return s.getTransportFromOptions(u,o,d)}l.prototype.postItem=function(u,d){var p=s.transportOptions(this.transportOptions,"POST"),f=s.buildPayload(this.accessToken,u,this.jsonBackup);this.transport.post(this.accessToken,p,f,d)},l.prototype.buildJsonPayload=function(u,d){var p,f=s.buildPayload(this.accessToken,u,this.jsonBackup);return(p=this.truncation?this.truncation.truncate(f):a.stringify(f)).error?(d&&d(p.error),null):p.value},l.prototype.postJsonPayload=function(u,d){var p=s.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,p,u,d)},l.prototype.configure=function(u){var d=this.oldOptions;return this.options=a.merge(d,u),this.transportOptions=c(this.options,this.url),this.options.accessToken!==void 0&&(this.accessToken=this.options.accessToken),this},n.exports=l},function(n,r,i){var a=i(0);n.exports={buildPayload:function(s,o,l){if(!a.isType(o.context,"string")){var c=a.stringify(o.context,l);c.error?o.context="Error: could not serialize 'context'":o.context=c.value||"",o.context.length>255&&(o.context=o.context.substr(0,255))}return{access_token:s,data:o}},getTransportFromOptions:function(s,o,l){var c=o.hostname,u=o.protocol,d=o.port,p=o.path,f=o.search,h=s.proxy;if(s.endpoint){var m=l.parse(s.endpoint);c=m.hostname,u=m.protocol,d=m.port,p=m.pathname,f=m.search}return{hostname:c,protocol:u,port:d,path:p,search:f,proxy:h}},transportOptions:function(s,o){var l=s.protocol||"https:",c=s.port||(l==="http:"?80:l==="https:"?443:void 0),u=s.hostname,d=s.path;return s.search&&(d+=s.search),s.proxy&&(d=l+"//"+u+d,u=s.proxy.host||s.proxy.hostname,c=s.proxy.port,l=s.proxy.protocol||l),{protocol:l,hostname:u,path:d,port:c,method:o}},appendPathToPath:function(s,o){var l=/\/$/.test(s),c=/^\//.test(o);return l&&c?o=o.substring(1):l||c||(o="/"+o),s+o}}},function(n,r){(function(i){i.console||(i.console={});for(var a,s,o=i.console,l=function(){},c=["memory"],u="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(",");a=c.pop();)o[a]||(o[a]={});for(;s=u.pop();)o[s]||(o[s]=l)})(typeof window>"u"?this:window)},function(n,r,i){var a={ieVersion:function(){if(typeof document<"u"){for(var s=3,o=document.createElement("div"),l=o.getElementsByTagName("i");o.innerHTML="<!--[if gt IE "+ ++s+"]><i></i><![endif]-->",l[0];);return s>4?s:void 0}}};n.exports=a},function(n,r,i){function a(s,o,l,c){s._rollbarWrappedError&&(c[4]||(c[4]=s._rollbarWrappedError),c[5]||(c[5]=s._rollbarWrappedError._rollbarContext),s._rollbarWrappedError=null);var u=o.handleUncaughtException.apply(o,c);l&&l.apply(s,c),u==="anonymous"&&(o.anonymousErrorsPending+=1)}n.exports={captureUncaughtExceptions:function(s,o,l){if(s){var c;if(typeof o._rollbarOldOnError=="function")c=o._rollbarOldOnError;else if(s.onerror){for(c=s.onerror;c._rollbarOldOnError;)c=c._rollbarOldOnError;o._rollbarOldOnError=c}o.handleAnonymousErrors();var u=function(){var d=Array.prototype.slice.call(arguments,0);a(s,o,c,d)};l&&(u._rollbarOldOnError=c),s.onerror=u}},captureUnhandledRejections:function(s,o,l){if(s){typeof s._rollbarURH=="function"&&s._rollbarURH.belongsToShim&&s.removeEventListener("unhandledrejection",s._rollbarURH);var c=function(u){var d,p,f;try{d=u.reason}catch{d=void 0}try{p=u.promise}catch{p="[unhandledrejection] error getting `promise` from event"}try{f=u.detail,!d&&f&&(d=f.reason,p=f.promise)}catch{}d||(d="[unhandledrejection] error getting `reason` from event"),o&&o.handleUnhandledRejection&&o.handleUnhandledRejection(d,p)};c.belongsToShim=l,s._rollbarURH=c,s.addEventListener("unhandledrejection",c)}}}},function(n,r,i){var a=i(0),s=i(1);function o(d){this.truncation=d}function l(d,p,f,h,m,g){var v=typeof window<"u"&&window||typeof self<"u"&&self,_=v&&v.Zone&&v.Zone.current;_&&_._name==="angular"?_._parent.run(function(){c(d,p,f,h,m,g)}):c(d,p,f,h,m,g)}function c(d,p,f,h,m,g){if(typeof RollbarProxy<"u")return function(y,T){new RollbarProxy().sendJsonPayload(y,function(E){},function(E){T(new Error(E))})}(h,m);var v;if(!(v=g?g():function(){var y,T,E=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],k=E.length;for(T=0;T<k;T++)try{y=E[T]();break}catch{}return y}()))return m(new Error("No way to send a request"));try{try{var _=function(){try{if(_&&v.readyState===4){_=void 0;var y=a.jsonParse(v.responseText);if((k=v)&&k.status&&k.status===200)return void m(y.error,y.value);if(function($){return $&&a.isType($.status,"number")&&$.status>=400&&$.status<600}(v)){if(v.status===403){var T=y.value&&y.value.message;s.error(T)}m(new Error(String(v.status)))}else m(u("XHR response had no status code (likely connection failure)"))}}catch($){var E;E=$&&$.stack?$:new Error($),m(E)}var k};v.open(f,p,!0),v.setRequestHeader&&(v.setRequestHeader("Content-Type","application/json"),v.setRequestHeader("X-Rollbar-Access-Token",d)),v.onreadystatechange=_,v.send(h)}catch{if(typeof XDomainRequest<"u"){if(!window||!window.location)return m(new Error("No window available during request, unknown environment"));window.location.href.substring(0,5)==="http:"&&p.substring(0,5)==="https"&&(p="http"+p.substring(5));var w=new XDomainRequest;w.onprogress=function(){},w.ontimeout=function(){m(u("Request timed out","ETIMEDOUT"))},w.onerror=function(){m(new Error("Error during request"))},w.onload=function(){var T=a.jsonParse(w.responseText);m(T.error,T.value)},w.open(f,p,!0),w.send(h)}else m(new Error("Cannot find a method to transport a request"))}}catch(y){m(y)}}function u(d,p){var f=new Error(d);return f.code=p||"ENOTFOUND",f}o.prototype.get=function(d,p,f,h,m){h&&a.isFunction(h)||(h=function(){}),a.addParamsAndAccessTokenToPath(d,p,f),l(d,a.formatUrl(p),"GET",null,h,m)},o.prototype.post=function(d,p,f,h,m){if(h&&a.isFunction(h)||(h=function(){}),!f)return h(new Error("Cannot send empty request"));var g;if((g=this.truncation?this.truncation.truncate(f):a.stringify(f)).error)return h(g.error);var v=g.value;l(d,a.formatUrl(p),"POST",v,h,m)},o.prototype.postJsonPayload=function(d,p,f,h,m){h&&a.isFunction(h)||(h=function(){}),l(d,a.formatUrl(p),"POST",f,h,m)},n.exports=o},function(n,r,i){var a=i(0),s=i(3),o=i(1);function l(p,f,h){var m=p.message,g=p.custom;m||(m="Item sent with null or missing arguments.");var v={body:m};g&&(v.extra=a.merge(g)),a.set(p,"data.body",{message:v}),h(null,p)}function c(p){var f=p.stackInfo.stack;return f&&f.length===0&&p._unhandledStackInfo&&p._unhandledStackInfo.stack&&(f=p._unhandledStackInfo.stack),f}function u(p,f,h){var m=p&&p.data.description,g=p&&p.custom,v=c(p),_=s.guessErrorClass(f.message),w={exception:{class:d(f,_[0],h),message:_[1]}};if(m&&(w.exception.description=m),v){var y,T,E,k,$,C,I,M;for(v.length===0&&(w.exception.stack=f.rawStack,w.exception.raw=String(f.rawException)),w.frames=[],I=0;I<v.length;++I)T={filename:(y=v[I]).url?a.sanitizeUrl(y.url):"(unknown)",lineno:y.line||null,method:y.func&&y.func!=="?"?y.func:"[anonymous]",colno:y.column},h.sendFrameUrl&&(T.url=y.url),T.method&&T.method.endsWith&&T.method.endsWith("_rollbar_wrapped")||(E=k=$=null,(C=y.context?y.context.length:0)&&(M=Math.floor(C/2),k=y.context.slice(0,M),E=y.context[M],$=y.context.slice(M)),E&&(T.code=E),(k||$)&&(T.context={},k&&k.length&&(T.context.pre=k),$&&$.length&&(T.context.post=$)),y.args&&(T.args=y.args),w.frames.push(T));w.frames.reverse(),g&&(w.extra=a.merge(g))}return w}function d(p,f,h){return p.name?p.name:h.guessErrorClass?f:"(unknown)"}n.exports={handleDomException:function(p,f,h){if(p.err&&s.Stack(p.err).name==="DOMException"){var m=new Error;m.name=p.err.name,m.message=p.err.message,m.stack=p.err.stack,m.nested=p.err,p.err=m}h(null,p)},handleItemWithError:function(p,f,h){if(p.data=p.data||{},p.err)try{p.stackInfo=p.err._savedStackTrace||s.parse(p.err,p.skipFrames),f.addErrorContext&&function(m){var g=[],v=m.err;for(g.push(v);v.nested;)v=v.nested,g.push(v);a.addErrorContext(m,g)}(p)}catch(m){o.error("Error while parsing the error object.",m);try{p.message=p.err.message||p.err.description||p.message||String(p.err)}catch(g){p.message=String(p.err)||String(g)}delete p.err}h(null,p)},ensureItemHasSomethingToSay:function(p,f,h){p.message||p.stackInfo||p.custom||h(new Error("No message, stack info, or custom data"),null),h(null,p)},addBaseInfo:function(p,f,h){var m=f.payload&&f.payload.environment||f.environment;p.data=a.merge(p.data,{environment:m,level:p.level,endpoint:f.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:p.uuid,notifier:{name:"rollbar-browser-js",version:f.version},custom:p.custom}),h(null,p)},addRequestInfo:function(p){return function(f,h,m){if(!p||!p.location)return m(null,f);var g="$remote_ip";h.captureIp?h.captureIp!==!0&&(g+="_anonymize"):g=null,a.set(f,"data.request",{url:p.location.href,query_string:p.location.search,user_ip:g}),m(null,f)}},addClientInfo:function(p){return function(f,h,m){if(!p)return m(null,f);var g=p.navigator||{},v=p.screen||{};a.set(f,"data.client",{runtime_ms:f.timestamp-p._rollbarStartTime,timestamp:Math.round(f.timestamp/1e3),javascript:{browser:g.userAgent,language:g.language,cookie_enabled:g.cookieEnabled,screen:{width:v.width,height:v.height}}}),m(null,f)}},addPluginInfo:function(p){return function(f,h,m){if(!p||!p.navigator)return m(null,f);for(var g,v=[],_=p.navigator.plugins||[],w=0,y=_.length;w<y;++w)g=_[w],v.push({name:g.name,description:g.description});a.set(f,"data.client.javascript.plugins",v),m(null,f)}},addBody:function(p,f,h){p.stackInfo?p.stackInfo.traceChain?function(m,g,v){for(var _=m.stackInfo.traceChain,w=[],y=_.length,T=0;T<y;T++){var E=u(m,_[T],g);w.push(E)}a.set(m,"data.body",{trace_chain:w}),v(null,m)}(p,f,h):function(m,g,v){if(c(m)){var _=u(m,m.stackInfo,g);a.set(m,"data.body",{trace:_}),v(null,m)}else{var w=m.stackInfo,y=s.guessErrorClass(w.message),T=d(w,y[0],g),E=y[1];m.message=T+": "+E,l(m,g,v)}}(p,f,h):l(p,f,h)},addScrubber:function(p){return function(f,h,m){if(p){var g=h.scrubFields||[],v=h.scrubPaths||[];f.data=p(f.data,g,v)}m(null,f)}}}},function(n,r,i){var a,s,o;(function(l,c){s=[i(23)],(o=typeof(a=function(u){var d=/(^|@)\S+:\d+/,p=/^\s*at .*(\S+:\d+|\(native\))/m,f=/^(eval@)?(\[native code])?$/;return{parse:function(h){if(h.stacktrace!==void 0||h["opera#sourceloc"]!==void 0)return this.parseOpera(h);if(h.stack&&h.stack.match(p))return this.parseV8OrIE(h);if(h.stack)return this.parseFFOrSafari(h);throw new Error("Cannot parse given Error object")},extractLocation:function(h){if(h.indexOf(":")===-1)return[h];var m=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(h.replace(/[()]/g,""));return[m[1],m[2]||void 0,m[3]||void 0]},parseV8OrIE:function(h){return h.stack.split(`
|
|
338
338
|
`).filter(function(m){return!!m.match(p)},this).map(function(m){m.indexOf("(eval ")>-1&&(m=m.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var g=m.replace(/^\s+/,"").replace(/\(eval code/g,"("),v=g.match(/ (\((.+):(\d+):(\d+)\)$)/),_=(g=v?g.replace(v[0],""):g).split(/\s+/).slice(1),w=this.extractLocation(v?v[1]:_.pop()),y=_.join(" ")||void 0,T=["eval","<anonymous>"].indexOf(w[0])>-1?void 0:w[0];return new u({functionName:y,fileName:T,lineNumber:w[1],columnNumber:w[2],source:m})},this)},parseFFOrSafari:function(h){return h.stack.split(`
|
|
339
339
|
`).filter(function(m){return!m.match(f)},this).map(function(m){if(m.indexOf(" > eval")>-1&&(m=m.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),m.indexOf("@")===-1&&m.indexOf(":")===-1)return new u({functionName:m});var g=/((.*".+"[^@]*)?[^@]*)(?:@)/,v=m.match(g),_=v&&v[1]?v[1]:void 0,w=this.extractLocation(m.replace(g,""));return new u({functionName:_,fileName:w[0],lineNumber:w[1],columnNumber:w[2],source:m})},this)},parseOpera:function(h){return!h.stacktrace||h.message.indexOf(`
|
|
340
340
|
`)>-1&&h.message.split(`
|
|
@@ -349,7 +349,7 @@ In order to facilitate your application for deduction, {{company.name}} needs yo
|
|
|
349
349
|
`+a+j.join(`,
|
|
350
350
|
`+a)+`
|
|
351
351
|
`+S+"}":"{"+j.join(",")+"}",a=S,L}}("",{"":E})}),typeof i.parse!="function"&&(i.parse=(h={"\\":"\\",'"':'"',"/":"/",t:" ",n:`
|
|
352
|
-
`,r:"\r",f:"\f",b:"\b"},m={go:function(){c="ok"},firstokey:function(){p=f,c="colon"},okey:function(){p=f,c="colon"},ovalue:function(){c="ocomma"},firstavalue:function(){c="acomma"},avalue:function(){c="acomma"}},g={go:function(){c="ok"},ovalue:function(){c="ocomma"},firstavalue:function(){c="acomma"},avalue:function(){c="acomma"}},v={"{":{go:function(){u.push({state:"ok"}),d={},c="firstokey"},ovalue:function(){u.push({container:d,state:"ocomma",key:p}),d={},c="firstokey"},firstavalue:function(){u.push({container:d,state:"acomma"}),d={},c="firstokey"},avalue:function(){u.push({container:d,state:"acomma"}),d={},c="firstokey"}},"}":{firstokey:function(){var E=u.pop();f=d,d=E.container,p=E.key,c=E.state},ocomma:function(){var E=u.pop();d[p]=f,f=d,d=E.container,p=E.key,c=E.state}},"[":{go:function(){u.push({state:"ok"}),d=[],c="firstavalue"},ovalue:function(){u.push({container:d,state:"ocomma",key:p}),d=[],c="firstavalue"},firstavalue:function(){u.push({container:d,state:"acomma"}),d=[],c="firstavalue"},avalue:function(){u.push({container:d,state:"acomma"}),d=[],c="firstavalue"}},"]":{firstavalue:function(){var E=u.pop();f=d,d=E.container,p=E.key,c=E.state},acomma:function(){var E=u.pop();d.push(f),f=d,d=E.container,p=E.key,c=E.state}},":":{colon:function(){if(Object.hasOwnProperty.call(d,p))throw new SyntaxError("Duplicate key '"+p+'"');c="ovalue"}},",":{ocomma:function(){d[p]=f,c="okey"},acomma:function(){d.push(f),c="avalue"}},true:{go:function(){f=!0,c="ok"},ovalue:function(){f=!0,c="ocomma"},firstavalue:function(){f=!0,c="acomma"},avalue:function(){f=!0,c="acomma"}},false:{go:function(){f=!1,c="ok"},ovalue:function(){f=!1,c="ocomma"},firstavalue:function(){f=!1,c="acomma"},avalue:function(){f=!1,c="acomma"}},null:{go:function(){f=null,c="ok"},ovalue:function(){f=null,c="ocomma"},firstavalue:function(){f=null,c="acomma"},avalue:function(){f=null,c="acomma"}}},function(E,k){var $,C,I=/^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;c="go",u=[];try{for(;$=I.exec(E);)$[1]?v[$[1]][c]():$[2]?(f=+$[2],g[c]()):(C=$[3],f=C.replace(/\\(?:u(.{4})|([^u]))/g,function(M,O,A){return O?String.fromCharCode(parseInt(O,16)):h[A]}),m[c]()),E=E.slice($[0].length)}catch(M){c=M}if(c!=="ok"||/[^\u0020\t\n\r]/.test(E))throw c instanceof SyntaxError?c:new SyntaxError("JSON");return typeof k=="function"?function M(O,A){var P,L,F=O[A];if(F&&typeof F=="object")for(P in f)Object.prototype.hasOwnProperty.call(F,P)&&((L=M(F,P))!==void 0?F[P]=L:delete F[P]);return k.call(O,A,F)}({"":f},""):f}))}},function(n,r,i){function a(s,o,l){if(o.hasOwnProperty&&o.hasOwnProperty("addEventListener")){for(var c=o.addEventListener;c._rollbarOldAdd&&c.belongsToShim;)c=c._rollbarOldAdd;var u=function(f,h,m){c.call(this,f,s.wrap(h),m)};u._rollbarOldAdd=c,u.belongsToShim=l,o.addEventListener=u;for(var d=o.removeEventListener;d._rollbarOldRemove&&d.belongsToShim;)d=d._rollbarOldRemove;var p=function(f,h,m){d.call(this,f,h&&h._rollbar_wrapped||h,m)};p._rollbarOldRemove=d,p.belongsToShim=l,o.removeEventListener=p}}n.exports=function(s,o,l){if(s){var c,u,d="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(c=0;c<d.length;++c)s[u=d[c]]&&s[u].prototype&&a(o,s[u].prototype,l)}}},function(n,r,i){var a=i(0),s=i(5);function o(m,g){return[m,a.stringify(m,g)]}function l(m,g){var v=m.length;return v>2*g?m.slice(0,g).concat(m.slice(v-g)):m}function c(m,g,v){v=v===void 0?30:v;var _,w=m.data.body;if(w.trace_chain)for(var y=w.trace_chain,T=0;T<y.length;T++)_=l(_=y[T].frames,v),y[T].frames=_;else w.trace&&(_=l(_=w.trace.frames,v),w.trace.frames=_);return[m,a.stringify(m,g)]}function u(m,g){return g&&g.length>m?g.slice(0,m-3).concat("..."):g}function d(m,g,v){return[g=s(g,function _(w,y,T){switch(a.typeName(y)){case"string":return u(m,y);case"object":case"array":return s(y,_,T);default:return y}}),a.stringify(g,v)]}function p(m){return m.exception&&(delete m.exception.description,m.exception.message=u(255,m.exception.message)),m.frames=l(m.frames,1),m}function f(m,g){var v=m.data.body;if(v.trace_chain)for(var _=v.trace_chain,w=0;w<_.length;w++)_[w]=p(_[w]);else v.trace&&(v.trace=p(v.trace));return[m,a.stringify(m,g)]}function h(m,g){return a.maxByteSize(m)>g}n.exports={truncate:function(m,g,v){v=v===void 0?524288:v;for(var _,w,y,T=[o,c,d.bind(null,1024),d.bind(null,512),d.bind(null,256),f];_=T.shift();)if(m=(w=_(m,g))[0],(y=w[1]).error||!h(y.value,v))return y;return y},raw:o,truncateFrames:c,truncateStrings:d,maybeTruncateValue:u}}])})})(sA);const Gie=is(sA.exports),qie=re.rollbar.clientToken,Yie=new Gie({accessToken:qie,captureUncaught:!0,captureUnhandledRejections:!0,source_map_enabled:!0,environment:re.rollbar.environment||re.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.5.1",source_map_enabled:!0,guess_uncaught_frames:!0}}},transform:t=>{const{trace:e}=t.body;if(e&&e.frames)for(let n=0;n<e.frames.length;n++){const{filename:r}=e.frames[n];r&&(e.frames[n].filename=e.frames[n].filename.replace(re.baseUrl,"https://dynamichost"))}}}),{UPDATE_VIEW_SETTINGS:zs,LOAD_USER_POSITION:Kie,LOAD_USER:Ws,LOGIN_USER:Td,LOGIN_AUTH_TOKEN:oA,AUTH_3RD_PARTY_USER:lA,SWITCH_CONNECTED_USER:cA,LOGOUT_USER:wd,REGISTER_USER:uA,RESET_USER_PASSWORD:dA}=yl,{DO_LOAD_CURRENT_COMPANY:Jie,DO_LOAD_ALL_SETTINGS:Zie,DO_NORMALIZE_COMPANY_USERS:Xie,LOAD_UNREAD_NOTIFICATIONS:Qie}=ce,{SET_USER_LOCATION:eae,SET_USER:Et}=ot,pA=t=>te.te(`errors:${t}`)&&te.t(`errors:${t}`),tae={async[Ws]({commit:t,getters:e,dispatch:n}){var r,i;try{if(!Ee.getItem("token")){Ee.removeItem("tokenExpire"),Ee.removeItem("refreshToken"),t(Et,{userId:null,companyId:null,crispUserHash:null}),this.$router.push({name:"Login"});return}const[{data:a},{data:s=[]}]=await Promise.all([Ut.get("/companyUser/self"),GO.getConnectedUsers()]),{id:o,CompanyId:l,crispUserHash:c,language:u,locale:d}=a;u&&te.i18next.changeLanguage(u),d&&te.l10n.changeLocale(d),await this.dispatch(Xie,{companyUsers:[{...a,connectedUsers:s}]}),t(Et,{userId:o,companyId:l,crispUserHash:c}),await this.dispatch(Jie),await this.dispatch(Zie),this._vm.$cookiePreference!=="all"&&(this._vm.$cookiePreference="all"),this.hasModule("notifications")&&!this.getters["notifications/isFetching"]&&this.dispatch(Qie,{throttleTime:5});const{user:p,company:f,isQualified:h}=e;if(p){let m="";(p.firstname||p.lastname)&&(m=p.fullName),Yie.configure({payload:{person:{id:p.id,username:m||null,email:p.email||null}}}),(r=this.$supportChat)==null||r.syncData(),(i=this.$trackEvent)==null||i.call(this,"loadUser",{companyUserId:p.id})}}catch(a){this.handleError(a,{action:Ws,actionPayload:null}),n(wd)}},async[Td]({commit:t,dispatch:e},{email:n,password:r,doRedirect:i=!0,doLoadUser:a=!0,superUserId:s=null,responseType:o=null,code:l=null}){try{t(Et,{isLoggingIn:!0}),e(zs,{view:"login",settings:{error:null}});let c;if(s?({data:c}=await Ut.post("/auth/employee",{email:n,password:r,CompanyUserId:s}),Ee.setItem("isClingEmployee",!0)):l?({data:c}=await Ut.post("/oauth2/token",{code:l,client_id:re.clientId,grant_type:"authorization_code",brand:this._vm.$brand,...yd(this._vm.$view)}),c={token:c.access_token,tokenExpires:c.expires_in,refreshToken:c.refresh_token}):{data:c}=await Ut.post("/auth/companyUser",{email:n,password:r,response_type:o,...yd(this._vm.$view)}),o==="code"&&c.code)return t(Et,{isLoggingIn:!1}),c;const{token:u,tokenExpires:d,refreshToken:p}=c;if(Ee.setItem("token",u),Ee.setItem("tokenExpires",d),Ee.setItem("refreshToken",p),t(Et,{isLoggingIn:!1}),a&&await e(Ws),!i)return!0;const{redirect:f}=this.state.route.query||{};return f?(this.$router.push(f),!0):(this.$router.push({name:"account"}),!0)}catch(c){let u=te.t("errors:fallback"),d=!1;if(c&&typeof c.getPayload=="function"){const p=c.getPayload();p&&p.axios&&p.axios.status===401&&(d=!0)}return d&&(u=te.t("actions:loginUser.wrongCredentials")),e(zs,{view:"login",settings:{error:u}}),t(Et,{isLoggingIn:!1}),d||this.handleError(c,{action:Td,actionPayload:null}),!1}},async[oA]({commit:t,dispatch:e},{authToken:n,to:r,doRedirect:i=!0}){let a={};try{if(!n)throw new Error("Missing param authToken");if(!r&&i)throw new Error("Missing param to");t(Et,{isLoggingIn:!0}),r&&(a=Object.assign({},r.query),delete a.authtoken);const{data:s}=await Fre(n,{...yd(this._vm.$view)}),{token:o,tokenExpires:l,refreshToken:c}=s;if(Ee.setItem("token",o),Ee.setItem("tokenExpires",l),Ee.setItem("refreshToken",c),await e(Ws),!i)return!0;this.$router.push({path:r.path,query:a})}catch(s){r!=null&&r.path&&(a.redirect=r==null?void 0:r.path),await e(wd,{next:{name:"Login",query:a}}),this.handleError(s,{action:oA,actionPayload:null})}finally{t(Et,{isLoggingIn:!1})}},async[lA]({commit:t,dispatch:e},{service:n,code:r}){t(Et,{isLoggingIn:!0});const i={isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:null};try{const{data:a}=await Ov.signupWithCrm(n,{code:r,doLogin:!0,...yd(this._vm.$view),brand:this._vm.$brand}),{addedToExistingCompanyId:s,authenticate:o}=a,{token:l,tokenExpires:c,refreshToken:u,company:d,companyUser:p}=o;return Ee.setItem("token",l),Ee.setItem("tokenExpires",c),Ee.setItem("refreshToken",u),p&&p.isSlave&&!p.verifiedEmailAt?(i.companyUser=p,i.isVerify=!0,i):(await e(Ws),s&&(i.addedToExistingCompanyId=s),i.company=d,i.isAuth=!0,i)}catch(a){return this.handleError(a,{action:lA,actionPayload:null}),{isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:a.message}}finally{t(Et,{isLoggingIn:!1})}},async[cA]({commit:t,dispatch:e},{companyUserId:n,doRedirect:r=!0}){var i;try{if(typeof n>"u")throw new Error("Missing param companyUserId");t(Et,{isLoggingIn:!0});const{data:a}=await GO.getConnectedUserAuth(n),{token:s,tokenExpires:o,refreshToken:l}=a;Ee.setItem("token",s),Ee.setItem("tokenExpires",o),Ee.setItem("refreshToken",l),this.commit("reset"),await e(Ws),r?this.$router.push({name:"account"}):(i=window.reloadApp)==null||i.call(window,!0)}catch(a){this.handleError(a,{action:cA,actionPayload:null})}finally{t(Et,{isLoggingIn:!1})}},async[uA]({commit:t,dispatch:e},{company:n,companyUser:r,termsVersion:i,voucherCode:a=null,source:s=null,region:o,language:l,currency:c,throwIfSlaveUser:u}){var d;try{const p={isAuth:!1,isVerify:!1,didNavigate:!1};if(e(zs,{view:"register",settings:{error:null}}),t(Et,{isRegistering:!0}),!n)throw new Error("Missing param company");if(!r)throw new Error("Missing param companyUser");if(!i)throw new Error("Missing param termsVersion");const{data:f}=await jre({Company:n,CompanyUser:r,voucherCode:a,source:s,region:o,language:l,currency:c,throwIfSlaveUser:u}),{CompanyUser:h}=f,m={type:"terms",version:i,identifier:h.email,object:"CompanyUser",objectId:h.id};if(await Vre(m),h.isSlave)return p.isVerify=!0,p;const g=await e(Td,{email:r.email,password:r.password,doRedirect:!1});return p.isAuth=g,g&&((d=this.$trackEvent)==null||d.call(this,"register")),p}catch(p){if(Y(p,"payload.code")===4008&&u)throw p;if(p&&p.code){const f=pA(p.code);f&&e(zs,{view:"register",settings:{error:f}})}return this.handleError(p,{action:uA,actionPayload:null}),{isAuth:!1,isVerify:!1,didNavigate:!1}}finally{t(Et,{isRegistering:!1})}},async[dA]({commit:t,dispatch:e},{password:n,token:r,doRedirect:i=!0}){try{if(e(zs,{view:"register",settings:{error:null}}),t(Et,{isResettingPassword:!0}),!n)throw new Error("Missing param password");if(!r)throw new Error("Missing param token");const{data:a}=await Ure(n,r),{email:s}=a;return await e(Td,{email:s,password:n,doRedirect:i}),!0}catch(a){if(a&&a.code){const s=pA(a.code);s&&e(zs,{view:"register",settings:{error:s}})}return this.handleError(a,{action:dA,actionPayload:null}),!1}finally{t(Et,{isResettingPassword:!1})}},[wd]({commit:t},{next:e}={}){try{Ee.removeItem("token"),Ee.removeItem("tokenExpires"),Ee.removeItem("refreshToken"),this.commit("reset")}finally{t(Et,{isLoggingIn:!1,userId:null,companyId:null,crispUserHash:null})}if(e)try{return this.$router.replace(e)}catch(n){this.handleError(n,{action:wd,actionPayload:null})}return this.$router.replace({name:"Login"})},[Kie]({commit:t}){navigator.geolocation.getCurrentPosition(({coords:e})=>{t(eae,[e.longitude,e.latitude])})}},Rv=new Map,{PUSH_MODAL:nae,POP_MODAL:rae,SET_CAN_CLOSE_MODAL:iae,SHOW_MESSAGE:aae,CLEAR_MESSAGE:sae,CLEAR_MESSAGE_BY_ID:oae,MESSAGE_ACTION:fA,UPDATE_VIEW_SETTINGS:lae,RESET_VIEW_SETTINGS:cae,SHOW_ERROR:uae,RESET_ERROR:dae}=yl,pae={...tae,[nae]({commit:t,state:e},n){const r={...n,_uniqueId:Nn.exports()};t(ot.SET_MODALS,[...e.modals,r])},[rae]({commit:t,state:e}){t(ot.SET_MODALS,e.modals.slice(0,-1))},[iae]({commit:t},e){t(ot.SET_CAN_CLOSE_MODAL,e)},[aae]({commit:t,state:e},n){const{type:r,displayType:i="notification",time:a=5e3,title:s,message:o,closeButton:l,omit:c=""}=n,u={},d={};if((h=>h.split(",").some(m=>{const[g="foo",v="bar"]=m.split(":");return this._vm[g]===v}))(c))return;n.actions&&Object.keys(n.actions).forEach(h=>{const m=n.actions[h];if(typeof m=="object"&&!Array.isArray(m)){if(!m.fn&&!m.callback)throw Error(`No callback function provided for action ${h}`);u[h]=m.fn||m.callback,delete m.fn,delete m.callback,d[h]=m}else if(typeof m=="string")u[h]=m,d[h]={};else if(typeof m=="function")u[h]=m,d[h]={};else throw Error(`Action, ${h} , must be one of: object|string|function`)}),t(ot.ADD_MESSAGE,{actions:d,title:s,message:o,type:r,displayType:i,time:a,closeButton:l});const f=e.messages.slice(-1)[0];return Rv.set(f._uniqueId,u),f._uniqueId},[sae]({commit:t,state:e},n){const r=e.messages[n]||{};t(ot.REMOVE_MESSAGE,n),Rv.delete(r._uniqueId)},[oae]({dispatch:t,state:e},n){const r=e.messages.findIndex(i=>i._uniqueId===n);t(yl.CLEAR_MESSAGE,r)},[fA]({state:t,dispatch:e},{index:n,type:r}){try{const i={cancel:()=>e(yl.CLEAR_MESSAGE,n)},a=t.messages[n]||{};if(!a||!a._uniqueId)throw Error("message not found, failed to trigger action");const s=Rv.get(a._uniqueId);if(!s)throw Error("message has no actions, failed to trigger action");const o=s[r];if(!o)throw Error(`message has no action of type ${r}`);let l=o;if(typeof o=="string"&&(l=i[o],!l))throw Error(`No predefined action of type ${o}`);if(typeof l!="function")throw Error("Unable to extract function from message action");return l(a)}catch(i){return this.handleError(i,{action:fA,actionPayload:arguments[1],retries:0})}},[lae]({commit:t},{view:e,settings:n}){t(ot.SET_VIEW_SETTINGS,{view:e,settings:n})},[cae]({commit:t}){t(ot.RESET_VIEW_SETTINGS)},[uae]({commit:t},e){t(ot.SET_ERROR,e)},[dae]({commit:t}){t(ot.RESET_ERROR)}};function Sd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fae(t,e){return hae(t)||mae(t,e)||gae(t,e)||vae()}function hae(t){if(Array.isArray(t))return t}function mae(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var n=[],r=!0,i=!1,a=void 0;try{for(var s=t[Symbol.iterator](),o;!(r=(o=s.next()).done)&&(n.push(o.value),!(e&&n.length===e));r=!0);}catch(l){i=!0,a=l}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw a}}return n}}function gae(t,e){if(!!t){if(typeof t=="string")return hA(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hA(t,e)}}function hA(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function vae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
352
|
+
`,r:"\r",f:"\f",b:"\b"},m={go:function(){c="ok"},firstokey:function(){p=f,c="colon"},okey:function(){p=f,c="colon"},ovalue:function(){c="ocomma"},firstavalue:function(){c="acomma"},avalue:function(){c="acomma"}},g={go:function(){c="ok"},ovalue:function(){c="ocomma"},firstavalue:function(){c="acomma"},avalue:function(){c="acomma"}},v={"{":{go:function(){u.push({state:"ok"}),d={},c="firstokey"},ovalue:function(){u.push({container:d,state:"ocomma",key:p}),d={},c="firstokey"},firstavalue:function(){u.push({container:d,state:"acomma"}),d={},c="firstokey"},avalue:function(){u.push({container:d,state:"acomma"}),d={},c="firstokey"}},"}":{firstokey:function(){var E=u.pop();f=d,d=E.container,p=E.key,c=E.state},ocomma:function(){var E=u.pop();d[p]=f,f=d,d=E.container,p=E.key,c=E.state}},"[":{go:function(){u.push({state:"ok"}),d=[],c="firstavalue"},ovalue:function(){u.push({container:d,state:"ocomma",key:p}),d=[],c="firstavalue"},firstavalue:function(){u.push({container:d,state:"acomma"}),d=[],c="firstavalue"},avalue:function(){u.push({container:d,state:"acomma"}),d=[],c="firstavalue"}},"]":{firstavalue:function(){var E=u.pop();f=d,d=E.container,p=E.key,c=E.state},acomma:function(){var E=u.pop();d.push(f),f=d,d=E.container,p=E.key,c=E.state}},":":{colon:function(){if(Object.hasOwnProperty.call(d,p))throw new SyntaxError("Duplicate key '"+p+'"');c="ovalue"}},",":{ocomma:function(){d[p]=f,c="okey"},acomma:function(){d.push(f),c="avalue"}},true:{go:function(){f=!0,c="ok"},ovalue:function(){f=!0,c="ocomma"},firstavalue:function(){f=!0,c="acomma"},avalue:function(){f=!0,c="acomma"}},false:{go:function(){f=!1,c="ok"},ovalue:function(){f=!1,c="ocomma"},firstavalue:function(){f=!1,c="acomma"},avalue:function(){f=!1,c="acomma"}},null:{go:function(){f=null,c="ok"},ovalue:function(){f=null,c="ocomma"},firstavalue:function(){f=null,c="acomma"},avalue:function(){f=null,c="acomma"}}},function(E,k){var $,C,I=/^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;c="go",u=[];try{for(;$=I.exec(E);)$[1]?v[$[1]][c]():$[2]?(f=+$[2],g[c]()):(C=$[3],f=C.replace(/\\(?:u(.{4})|([^u]))/g,function(M,O,A){return O?String.fromCharCode(parseInt(O,16)):h[A]}),m[c]()),E=E.slice($[0].length)}catch(M){c=M}if(c!=="ok"||/[^\u0020\t\n\r]/.test(E))throw c instanceof SyntaxError?c:new SyntaxError("JSON");return typeof k=="function"?function M(O,A){var P,L,F=O[A];if(F&&typeof F=="object")for(P in f)Object.prototype.hasOwnProperty.call(F,P)&&((L=M(F,P))!==void 0?F[P]=L:delete F[P]);return k.call(O,A,F)}({"":f},""):f}))}},function(n,r,i){function a(s,o,l){if(o.hasOwnProperty&&o.hasOwnProperty("addEventListener")){for(var c=o.addEventListener;c._rollbarOldAdd&&c.belongsToShim;)c=c._rollbarOldAdd;var u=function(f,h,m){c.call(this,f,s.wrap(h),m)};u._rollbarOldAdd=c,u.belongsToShim=l,o.addEventListener=u;for(var d=o.removeEventListener;d._rollbarOldRemove&&d.belongsToShim;)d=d._rollbarOldRemove;var p=function(f,h,m){d.call(this,f,h&&h._rollbar_wrapped||h,m)};p._rollbarOldRemove=d,p.belongsToShim=l,o.removeEventListener=p}}n.exports=function(s,o,l){if(s){var c,u,d="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(c=0;c<d.length;++c)s[u=d[c]]&&s[u].prototype&&a(o,s[u].prototype,l)}}},function(n,r,i){var a=i(0),s=i(5);function o(m,g){return[m,a.stringify(m,g)]}function l(m,g){var v=m.length;return v>2*g?m.slice(0,g).concat(m.slice(v-g)):m}function c(m,g,v){v=v===void 0?30:v;var _,w=m.data.body;if(w.trace_chain)for(var y=w.trace_chain,T=0;T<y.length;T++)_=l(_=y[T].frames,v),y[T].frames=_;else w.trace&&(_=l(_=w.trace.frames,v),w.trace.frames=_);return[m,a.stringify(m,g)]}function u(m,g){return g&&g.length>m?g.slice(0,m-3).concat("..."):g}function d(m,g,v){return[g=s(g,function _(w,y,T){switch(a.typeName(y)){case"string":return u(m,y);case"object":case"array":return s(y,_,T);default:return y}}),a.stringify(g,v)]}function p(m){return m.exception&&(delete m.exception.description,m.exception.message=u(255,m.exception.message)),m.frames=l(m.frames,1),m}function f(m,g){var v=m.data.body;if(v.trace_chain)for(var _=v.trace_chain,w=0;w<_.length;w++)_[w]=p(_[w]);else v.trace&&(v.trace=p(v.trace));return[m,a.stringify(m,g)]}function h(m,g){return a.maxByteSize(m)>g}n.exports={truncate:function(m,g,v){v=v===void 0?524288:v;for(var _,w,y,T=[o,c,d.bind(null,1024),d.bind(null,512),d.bind(null,256),f];_=T.shift();)if(m=(w=_(m,g))[0],(y=w[1]).error||!h(y.value,v))return y;return y},raw:o,truncateFrames:c,truncateStrings:d,maybeTruncateValue:u}}])})})(sA);const Gie=is(sA.exports),qie=re.rollbar.clientToken,Yie=new Gie({accessToken:qie,captureUncaught:!0,captureUnhandledRejections:!0,source_map_enabled:!0,environment:re.rollbar.environment||re.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.5.2",source_map_enabled:!0,guess_uncaught_frames:!0}}},transform:t=>{const{trace:e}=t.body;if(e&&e.frames)for(let n=0;n<e.frames.length;n++){const{filename:r}=e.frames[n];r&&(e.frames[n].filename=e.frames[n].filename.replace(re.baseUrl,"https://dynamichost"))}}}),{UPDATE_VIEW_SETTINGS:zs,LOAD_USER_POSITION:Kie,LOAD_USER:Ws,LOGIN_USER:Td,LOGIN_AUTH_TOKEN:oA,AUTH_3RD_PARTY_USER:lA,SWITCH_CONNECTED_USER:cA,LOGOUT_USER:wd,REGISTER_USER:uA,RESET_USER_PASSWORD:dA}=yl,{DO_LOAD_CURRENT_COMPANY:Jie,DO_LOAD_ALL_SETTINGS:Zie,DO_NORMALIZE_COMPANY_USERS:Xie,LOAD_UNREAD_NOTIFICATIONS:Qie}=ce,{SET_USER_LOCATION:eae,SET_USER:Et}=ot,pA=t=>te.te(`errors:${t}`)&&te.t(`errors:${t}`),tae={async[Ws]({commit:t,getters:e,dispatch:n}){var r,i;try{if(!Ee.getItem("token")){Ee.removeItem("tokenExpire"),Ee.removeItem("refreshToken"),t(Et,{userId:null,companyId:null,crispUserHash:null}),this.$router.push({name:"Login"});return}const[{data:a},{data:s=[]}]=await Promise.all([Ut.get("/companyUser/self"),GO.getConnectedUsers()]),{id:o,CompanyId:l,crispUserHash:c,language:u,locale:d}=a;u&&te.i18next.changeLanguage(u),d&&te.l10n.changeLocale(d),await this.dispatch(Xie,{companyUsers:[{...a,connectedUsers:s}]}),t(Et,{userId:o,companyId:l,crispUserHash:c}),await this.dispatch(Jie),await this.dispatch(Zie),this._vm.$cookiePreference!=="all"&&(this._vm.$cookiePreference="all"),this.hasModule("notifications")&&!this.getters["notifications/isFetching"]&&this.dispatch(Qie,{throttleTime:5});const{user:p,company:f,isQualified:h}=e;if(p){let m="";(p.firstname||p.lastname)&&(m=p.fullName),Yie.configure({payload:{person:{id:p.id,username:m||null,email:p.email||null}}}),(r=this.$supportChat)==null||r.syncData(),(i=this.$trackEvent)==null||i.call(this,"loadUser",{companyUserId:p.id})}}catch(a){this.handleError(a,{action:Ws,actionPayload:null}),n(wd)}},async[Td]({commit:t,dispatch:e},{email:n,password:r,doRedirect:i=!0,doLoadUser:a=!0,superUserId:s=null,responseType:o=null,code:l=null}){try{t(Et,{isLoggingIn:!0}),e(zs,{view:"login",settings:{error:null}});let c;if(s?({data:c}=await Ut.post("/auth/employee",{email:n,password:r,CompanyUserId:s}),Ee.setItem("isClingEmployee",!0)):l?({data:c}=await Ut.post("/oauth2/token",{code:l,client_id:re.clientId,grant_type:"authorization_code",brand:this._vm.$brand,...yd(this._vm.$view)}),c={token:c.access_token,tokenExpires:c.expires_in,refreshToken:c.refresh_token}):{data:c}=await Ut.post("/auth/companyUser",{email:n,password:r,response_type:o,...yd(this._vm.$view)}),o==="code"&&c.code)return t(Et,{isLoggingIn:!1}),c;const{token:u,tokenExpires:d,refreshToken:p}=c;if(Ee.setItem("token",u),Ee.setItem("tokenExpires",d),Ee.setItem("refreshToken",p),t(Et,{isLoggingIn:!1}),a&&await e(Ws),!i)return!0;const{redirect:f}=this.state.route.query||{};return f?(this.$router.push(f),!0):(this.$router.push({name:"account"}),!0)}catch(c){let u=te.t("errors:fallback"),d=!1;if(c&&typeof c.getPayload=="function"){const p=c.getPayload();p&&p.axios&&p.axios.status===401&&(d=!0)}return d&&(u=te.t("actions:loginUser.wrongCredentials")),e(zs,{view:"login",settings:{error:u}}),t(Et,{isLoggingIn:!1}),d||this.handleError(c,{action:Td,actionPayload:null}),!1}},async[oA]({commit:t,dispatch:e},{authToken:n,to:r,doRedirect:i=!0}){let a={};try{if(!n)throw new Error("Missing param authToken");if(!r&&i)throw new Error("Missing param to");t(Et,{isLoggingIn:!0}),r&&(a=Object.assign({},r.query),delete a.authtoken);const{data:s}=await Fre(n,{...yd(this._vm.$view)}),{token:o,tokenExpires:l,refreshToken:c}=s;if(Ee.setItem("token",o),Ee.setItem("tokenExpires",l),Ee.setItem("refreshToken",c),await e(Ws),!i)return!0;this.$router.push({path:r.path,query:a})}catch(s){r!=null&&r.path&&(a.redirect=r==null?void 0:r.path),await e(wd,{next:{name:"Login",query:a}}),this.handleError(s,{action:oA,actionPayload:null})}finally{t(Et,{isLoggingIn:!1})}},async[lA]({commit:t,dispatch:e},{service:n,code:r}){t(Et,{isLoggingIn:!0});const i={isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:null};try{const{data:a}=await Ov.signupWithCrm(n,{code:r,doLogin:!0,...yd(this._vm.$view),brand:this._vm.$brand}),{addedToExistingCompanyId:s,authenticate:o}=a,{token:l,tokenExpires:c,refreshToken:u,company:d,companyUser:p}=o;return Ee.setItem("token",l),Ee.setItem("tokenExpires",c),Ee.setItem("refreshToken",u),p&&p.isSlave&&!p.verifiedEmailAt?(i.companyUser=p,i.isVerify=!0,i):(await e(Ws),s&&(i.addedToExistingCompanyId=s),i.company=d,i.isAuth=!0,i)}catch(a){return this.handleError(a,{action:lA,actionPayload:null}),{isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:a.message}}finally{t(Et,{isLoggingIn:!1})}},async[cA]({commit:t,dispatch:e},{companyUserId:n,doRedirect:r=!0}){var i;try{if(typeof n>"u")throw new Error("Missing param companyUserId");t(Et,{isLoggingIn:!0});const{data:a}=await GO.getConnectedUserAuth(n),{token:s,tokenExpires:o,refreshToken:l}=a;Ee.setItem("token",s),Ee.setItem("tokenExpires",o),Ee.setItem("refreshToken",l),this.commit("reset"),await e(Ws),r?this.$router.push({name:"account"}):(i=window.reloadApp)==null||i.call(window,!0)}catch(a){this.handleError(a,{action:cA,actionPayload:null})}finally{t(Et,{isLoggingIn:!1})}},async[uA]({commit:t,dispatch:e},{company:n,companyUser:r,termsVersion:i,voucherCode:a=null,source:s=null,region:o,language:l,currency:c,throwIfSlaveUser:u}){var d;try{const p={isAuth:!1,isVerify:!1,didNavigate:!1};if(e(zs,{view:"register",settings:{error:null}}),t(Et,{isRegistering:!0}),!n)throw new Error("Missing param company");if(!r)throw new Error("Missing param companyUser");if(!i)throw new Error("Missing param termsVersion");const{data:f}=await jre({Company:n,CompanyUser:r,voucherCode:a,source:s,region:o,language:l,currency:c,throwIfSlaveUser:u}),{CompanyUser:h}=f,m={type:"terms",version:i,identifier:h.email,object:"CompanyUser",objectId:h.id};if(await Vre(m),h.isSlave)return p.isVerify=!0,p;const g=await e(Td,{email:r.email,password:r.password,doRedirect:!1});return p.isAuth=g,g&&((d=this.$trackEvent)==null||d.call(this,"register")),p}catch(p){if(Y(p,"payload.code")===4008&&u)throw p;if(p&&p.code){const f=pA(p.code);f&&e(zs,{view:"register",settings:{error:f}})}return this.handleError(p,{action:uA,actionPayload:null}),{isAuth:!1,isVerify:!1,didNavigate:!1}}finally{t(Et,{isRegistering:!1})}},async[dA]({commit:t,dispatch:e},{password:n,token:r,doRedirect:i=!0}){try{if(e(zs,{view:"register",settings:{error:null}}),t(Et,{isResettingPassword:!0}),!n)throw new Error("Missing param password");if(!r)throw new Error("Missing param token");const{data:a}=await Ure(n,r),{email:s}=a;return await e(Td,{email:s,password:n,doRedirect:i}),!0}catch(a){if(a&&a.code){const s=pA(a.code);s&&e(zs,{view:"register",settings:{error:s}})}return this.handleError(a,{action:dA,actionPayload:null}),!1}finally{t(Et,{isResettingPassword:!1})}},[wd]({commit:t},{next:e}={}){try{Ee.removeItem("token"),Ee.removeItem("tokenExpires"),Ee.removeItem("refreshToken"),this.commit("reset")}finally{t(Et,{isLoggingIn:!1,userId:null,companyId:null,crispUserHash:null})}if(e)try{return this.$router.replace(e)}catch(n){this.handleError(n,{action:wd,actionPayload:null})}return this.$router.replace({name:"Login"})},[Kie]({commit:t}){navigator.geolocation.getCurrentPosition(({coords:e})=>{t(eae,[e.longitude,e.latitude])})}},Rv=new Map,{PUSH_MODAL:nae,POP_MODAL:rae,SET_CAN_CLOSE_MODAL:iae,SHOW_MESSAGE:aae,CLEAR_MESSAGE:sae,CLEAR_MESSAGE_BY_ID:oae,MESSAGE_ACTION:fA,UPDATE_VIEW_SETTINGS:lae,RESET_VIEW_SETTINGS:cae,SHOW_ERROR:uae,RESET_ERROR:dae}=yl,pae={...tae,[nae]({commit:t,state:e},n){const r={...n,_uniqueId:Nn.exports()};t(ot.SET_MODALS,[...e.modals,r])},[rae]({commit:t,state:e}){t(ot.SET_MODALS,e.modals.slice(0,-1))},[iae]({commit:t},e){t(ot.SET_CAN_CLOSE_MODAL,e)},[aae]({commit:t,state:e},n){const{type:r,displayType:i="notification",time:a=5e3,title:s,message:o,closeButton:l,omit:c=""}=n,u={},d={};if((h=>h.split(",").some(m=>{const[g="foo",v="bar"]=m.split(":");return this._vm[g]===v}))(c))return;n.actions&&Object.keys(n.actions).forEach(h=>{const m=n.actions[h];if(typeof m=="object"&&!Array.isArray(m)){if(!m.fn&&!m.callback)throw Error(`No callback function provided for action ${h}`);u[h]=m.fn||m.callback,delete m.fn,delete m.callback,d[h]=m}else if(typeof m=="string")u[h]=m,d[h]={};else if(typeof m=="function")u[h]=m,d[h]={};else throw Error(`Action, ${h} , must be one of: object|string|function`)}),t(ot.ADD_MESSAGE,{actions:d,title:s,message:o,type:r,displayType:i,time:a,closeButton:l});const f=e.messages.slice(-1)[0];return Rv.set(f._uniqueId,u),f._uniqueId},[sae]({commit:t,state:e},n){const r=e.messages[n]||{};t(ot.REMOVE_MESSAGE,n),Rv.delete(r._uniqueId)},[oae]({dispatch:t,state:e},n){const r=e.messages.findIndex(i=>i._uniqueId===n);t(yl.CLEAR_MESSAGE,r)},[fA]({state:t,dispatch:e},{index:n,type:r}){try{const i={cancel:()=>e(yl.CLEAR_MESSAGE,n)},a=t.messages[n]||{};if(!a||!a._uniqueId)throw Error("message not found, failed to trigger action");const s=Rv.get(a._uniqueId);if(!s)throw Error("message has no actions, failed to trigger action");const o=s[r];if(!o)throw Error(`message has no action of type ${r}`);let l=o;if(typeof o=="string"&&(l=i[o],!l))throw Error(`No predefined action of type ${o}`);if(typeof l!="function")throw Error("Unable to extract function from message action");return l(a)}catch(i){return this.handleError(i,{action:fA,actionPayload:arguments[1],retries:0})}},[lae]({commit:t},{view:e,settings:n}){t(ot.SET_VIEW_SETTINGS,{view:e,settings:n})},[cae]({commit:t}){t(ot.RESET_VIEW_SETTINGS)},[uae]({commit:t},e){t(ot.SET_ERROR,e)},[dae]({commit:t}){t(ot.RESET_ERROR)}};function Sd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fae(t,e){return hae(t)||mae(t,e)||gae(t,e)||vae()}function hae(t){if(Array.isArray(t))return t}function mae(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var n=[],r=!0,i=!1,a=void 0;try{for(var s=t[Symbol.iterator](),o;!(r=(o=s.next()).done)&&(n.push(o.value),!(e&&n.length===e));r=!0);}catch(l){i=!0,a=l}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw a}}return n}}function gae(t,e){if(!!t){if(typeof t=="string")return hA(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hA(t,e)}}function hA(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function vae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
353
353
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mA(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.reduce(function(e,n){var r=n.split(".").slice(-1)[0];if(e[r])throw new Error("The key `".concat(r,"` is already in use."));return e[r]=n,e},{})}function yae(t){return Object.keys(t).map(function(e){return[e,t[e]]})}function kd(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=typeof n[0]=="string"?[].concat(n):[""].concat(n),a=fae(i,4),s=a[0],o=a[1],l=a[2],c=a[3];return s.length&&s.charAt(s.length-1)!=="/"&&(s+="/"),l="".concat(s).concat(l||"getField"),c="".concat(s).concat(c||"updateField"),t(s,o,l,c)}}function Cd(t){return function(e){return e.split(/[.[\]]+/).reduce(function(n,r){return n[r]},t)}}function Pl(t,e){var n=e.path,r=e.value;n.split(/[.[\]]+/).reduce(function(i,a,s,o){return o.length===s+1&&(i[a]=r),i[a]},t)}var _ae=kd(function(t,e,n,r){var i=Array.isArray(e)?mA(e):e;return Object.keys(i).reduce(function(a,s){var o=i[s],l={get:function(){return this.$store.getters[n](o)},set:function(u){this.$store.commit(r,{path:o,value:u})}};return a[s]=l,a},{})}),bae=kd(function(t,e,n,r){var i=Array.isArray(e)?mA(e):e;return Object.keys(i).reduce(function(a,s){var o=i[s];return a[s]={get:function(){var c=this.$store,u=yae(c.getters[n](o));return u.map(function(d){return Object.keys(d[1]).reduce(function(p,f){var h="".concat(o,"[").concat(d[0],"].").concat(f);return Object.defineProperty(p,f,{get:function(){return c.getters[n](h)},set:function(g){c.commit(r,{path:h,value:g})}})},{})})}},a},{})}),gA=function(e){var n,r=e.getterType,i=e.mutationType;return n={},Sd(n,r,Cd),Sd(n,i,Pl),Sd(n,"mapFields",kd(function(a,s){return _ae(a,s,r,i)})),Sd(n,"mapMultiRowFields",kd(function(a,s){return bae(a,s,r,i)})),n};const{SET_USER_LOCATION:Eae,SET_USER:Tae}=ot,wae={...{[Eae](t,e){t.user.position=e},[Tae](t,e){Object.keys(e).forEach(n=>{t.user[n]=e[n]})}},updateField:Pl,[ot.SET_MODALS](t,e){Z.set(t,"modals",e)},[ot.SET_CAN_CLOSE_MODAL](t,e){Z.set(t,"canCloseModal",e)},[ot.ADD_MESSAGE](t,e){t.messages.push(Vs(e))},[ot.REMOVE_MESSAGE](t,e){Z.delete(t.messages,e)},[ot.SET_VIEW_SETTINGS](t,{view:e,settings:n}){Object.keys(n).forEach(r=>{Z.set(t.viewSettings[e],r,n[r])})},[ot.RESET_VIEW_SETTINGS](t,e){Z.set(t.viewSettings,e,JSON.parse(lC.viewSettings[e]))},[ot.SET_ERROR](t,e){t.error=e},[ot.RESET_ERROR](t){t.error=null},[ot.SET_SOCKET_CONNECTED](t,e){t.isSocketConnected=e}};var Mv={exports:{}},Sae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Nv(t){this.message=t}Nv.prototype=new Error,Nv.prototype.name="InvalidCharacterError";function kae(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new Nv("'atob' failed: The string to be decoded is not correctly encoded.");for(var n=0,r,i,a=0,s="";i=e.charAt(a++);~i&&(r=n%4?r*64+i:i,n++%4)?s+=String.fromCharCode(255&r>>(-2*n&6)):0)i=Sae.indexOf(i);return s}var Cae=typeof window<"u"&&window.atob&&window.atob.bind(window)||kae,vA=Cae;function Oae(t){return decodeURIComponent(vA(t).replace(/(.)/g,function(e,n){var r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}var Aae=function(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return Oae(e)}catch{return vA(e)}},$ae=Aae;function Dl(t){this.message=t}Dl.prototype=new Error,Dl.prototype.name="InvalidTokenError",Mv.exports=function(t,e){if(typeof t!="string")throw new Dl("Invalid token specified");e=e||{};var n=e.header===!0?0:1;try{return JSON.parse($ae(t.split(".")[n]))}catch(r){throw new Dl("Invalid token specified: "+r.message)}},Mv.exports.InvalidTokenError=Dl;const _h=class{init({store:e}){this.store=e}getValidFeatures(){return Object.keys(_h.schema)}_isValidAccountType(e){if(!e||De(e)!=="array")throw new Error("Invalid param accountTypes");const{accountType:n}=this.store.getters["application/companyAccount"]||{};return e.includes(n)}_isValidFeatureKey(e){if(!e||De(e)!=="string")throw new Error("Invalid param featureKey");const{CompanyFeatures:n}=this.store.getters["application/company"]||{};return n?n[e]:!1}_isValidCompanySetting(e){if(!e||De(e)!=="string")throw new Error("Invalid param settingKey");return e.split("||").some(r=>{const i=this.store.getters["settings/getCompanySetting"](r);return typeof i=="boolean"&&i})}_isValidCompanyUserSettingFn({name:e,fn:n}){if(!e||De(e)!=="string")throw new Error("Invalid param name");if(!n||De(n)!=="function")throw new Error("Invalid param fn");const r=this.store.getters["settings/getCompanyUserSetting"](e);return!!n(r)}_isValidRegion(e){if(!e||De(e)!=="string")throw new Error("Invalid param requiredRegion");const{region:n}=this.store.getters["application/company"]||{};return n?e===n:!1}_isValidBrand(e){if(!e||De(e)!=="string")throw new Error("Invalid param requiredBrand");const n=this.store.$brand;return n?e===n:!1}_isCreatedBefore(e){if(!e||De(e)!=="string")throw new Error("Invalid param feature dateString");const{createdAt:n}=this.store.getters["application/company"]||{};return n?Ate(n,e):!1}_evaluateFeature(e,{returnType:n="boolean"}={}){const r=_h.schema[e];if(!r||De(r)!=="object")throw Error(`No rules for feature '${e}' has been defined!`);if(!["boolean","array"].includes(n))throw Error("Invalid param returnType");const i=[];return r.accountTypes&&!this._isValidAccountType(r.accountTypes)&&(i.push("accountTypes"),n==="boolean")||r.featureKey&&!this._isValidFeatureKey(r.featureKey)&&(i.push("featureKey"),n==="boolean")||r.companySetting&&!this._isValidCompanySetting(r.companySetting)&&(i.push("companySetting"),n==="boolean")||r.companyUserSettingFn&&!this._isValidCompanyUserSettingFn(r.companyUserSettingFn)&&(i.push("companyUserSettingFn"),n==="boolean")||r.region&&!this._isValidRegion(r.region)&&(i.push("region"),n==="boolean")||r.brand&&!this._isValidBrand(r.brand)&&(i.push("brand"),n==="boolean")||r.createdBefore&&!this._isCreatedBefore(r.createdBefore)&&(i.push("preDynDoc2"),n==="boolean")?!1:n==="array"?i:!0}checkFeature(e){return this._evaluateFeature(e)}checkFeatureUpgrade(e){const n=this._evaluateFeature(e,{returnType:"array"});return n.length===1&&n.includes("accountTypes")}};let Od=_h;at(Od,"schema",{personalMessage:{},unlimitedCertificates:{},companyAboutUs:{},winProfile:{},templates:{},invoice:{featureKey:"invoice"},sellInvoice:{featureKey:"sellInvoice"},timeTrack:{featureKey:"timeTrack"},task:{featureKey:"task"},reverseVat:{featureKey:"reverseVat"},ataSetting:{featureKey:"ataSetting"},propertyDesignation:{companySetting:"showRot||showGreenRot"},openAccConstruction:{featureKey:"openAccConstruction"},docChapterIsBinding:{companySetting:"showIsBinding"},projectSettingHideAllArticles:{companySetting:"allowHideAllArticles"},docAtaDateDelay:{companySetting:"docAtaShowDateDelay"},docAtaNotIncluded:{companySetting:"docAtaShowNotIncluded"},docAtaPayment:{companySetting:"docAtaShowPayment"},sms:{featureKey:"sms"},smsSenderName:{featureKey:"smsSenderName"},regionSE:{region:"SE"},bankId:{region:"SE",companySetting:"enableBankId"},templateGallery:{companyUserSettingFn:{name:"defaultLanguage",fn:e=>e==="sv"}},clientReview:{brand:"cling"},upgradeSignatureBankId:{companySetting:"upgradeSignatureBankId"},preDynDoc2:{createdBefore:"2020-11-05T00:00:00.000Z"},emailDomain:{featureKey:"emailDomain"},subdomain:{featureKey:"subdomain"},stats:{featureKey:"stats"},api:{featureKey:"api"},fortnox:{featureKey:"fortnox"},inviteCreators:{accountTypes:["base","pro"]}});const pr=new Od,Kr=class{init({store:e}){this.store=e}_getObjectById(e,n){const r=(Kr.schema[n]||{}).$module,{data:i}=this.store.state[r]||{};if(!i)throw Error(`No module for ${n} has been defined!`);return i[e]}_getIdPath(e){return(Kr.schema[e]||{}).$id}_getAllowNullOwner(e){return!!(Kr.schema[e]||{}).$allowNullOwner}_getScopeKey(e){return(Kr.schema[e]||{}).$scopeKey}_getUserId(){const{user:e={}}=this.store.state.application;return e.userId}getValidScopes(){return Object.keys(Kr.schema)}getRequiredCompanyUserPermission(e,n){const r=Kr.schema[e];return!r||!r[n]?[]:Array.isArray(r[n])?r[n]:[r[n]]}hasFeature(e){const n=Kr.featureSchema[e];return n?pr.checkFeature(n):!0}checkPermission(e,n,r=void 0){const{getters:i}=this.store,{CompanyUserPermission:a}=i["application/user"]||{};if(!a||!this.hasFeature(e))return!1;let o=this.getRequiredCompanyUserPermission(e,n);if(!o||o.length===0)return console.warn(`Permission ${n} in scope ${e} has not been implemented`),!1;let l=o.some(u=>a[u]===!0);if(l)return!0;if(!r)return!1;const c=this._getScopeKey(e);if(o=o.map(u=>u.includes("Own")?u:u.replace(`${c[0].toUpperCase()}${c.slice(1)}`,`Own${c[0].toUpperCase()}${c.slice(1)}`)),l=o.some(u=>a[u]===!0),l){const u=this._getObjectById(r,e);if(!u)return!1;if(e==="documents")return this.checkPermission("projects",n,u.projectId);const d=ire(u,this._getIdPath(e)),p=this._getAllowNullOwner(e);return d===this._getUserId()||p&&d===null}return!1}getScope(e={}){return this.getValidScopes().find(i=>e[i])}};let Rl=Kr;at(Rl,"schema",{projects:{read:"manageProjects",modify:"manageProjects",create:["manageProjects","manageOwnProjects"],delete:"manageProjects",readPrice:["manageProjects","showPrices"],$scopeKey:"projects",$module:"projects",$id:"CompanyUserId"},users:{modify:"manageUsers",create:"manageUsers",$scopeKey:"users",$module:"companyUsers",$id:"id"},documents:{create:["manageProjects","manageOwnProjects"],read:"manageProjects",modify:"manageProjects",delete:"manageProjects",readPrice:["manageProjects","showPrices"],$scopeKey:"projects",$module:"documents2",$id:"companyUserId"},atas:{create:["manageAtas","manageOwnAtas"],read:"manageAtas",modify:"manageAtas",delete:"manageAtas",readPrice:["manageAtas","showPrices"],$scopeKey:"atas",$module:"documents",$id:"data.CompanyUserId"},company:{create:"manageCompany",read:"manageCompany",modify:"manageCompany",$scopeKey:"company",$module:"companies",$id:"id"},articles:{create:["manageProjects","manageOwnProjects"],modify:["manageProjects","manageOwnProjects"],delete:["manageProjects","manageOwnProjects"],readPrice:["manageOwnAtas","manageAtas","manageProjects","manageOwnProjects","showPrices"],$scopeKey:"projects",$module:"articles",$id:"id"},invoices:{read:["readInvoices","readOwnInvoices"],modify:"modifyInvoices",create:"createInvoices",delete:"deleteInvoices",attest:"attestInvoices",$scopeKey:"invoices",$module:"invoices",$id:"CompanyUserId"},bookkeeping:{modify:"modifyBookkeepingSettings",export:"exportInvoices"},prices:{read:"showPrices"},timeTracks:{read:["readTimeTracks","readOwnTimeTracks"],modify:"modifyTimeTracks",create:"createTimeTracks",delete:["deleteTimeTracks","deleteOwnTimeTracks"],attest:"attestTimeTracks",$scopeKey:"timeTracks",$module:"timeTracks",$id:"CompanyUserId"},templates:{create:"createTemplates",read:"readTemplates",modify:"modifyTemplates",delete:"deleteTemplates"},endCustomers:{read:["readEndCustomers","readOwnEndCustomers"],modify:"modifyEndCustomers",create:"createEndCustomers",delete:"deleteEndCustomers",$scopeKey:"endCustomers",$module:"endCustomers",$id:"CompanyUserId",$allowNullOwner:!0},fortnox:{export:"modifyBookkeepingSettings"}}),at(Rl,"featureSchema",{invoices:"invoice",bookkeeping:"invoice",timeTracks:"timeTrack"});const ga=new Rl,xae={...{userPosition:t=>t.user.position,isLoggingIn:t=>t.user.isLoggingIn,isSuperUser:()=>()=>{const t=Ee.getItem("token");if(!t)return!1;const{employee:e}=Mv.exports(t);return!!e},isRegistering:t=>t.user.isRegistering,isResettingPassword:t=>t.user.isResettingPassword,crispUserHash:t=>t.user.crispUserHash,isUserLoaded:({user:t})=>t.userId&&t.companyId&&!0||!1,company:({user:t},e,n,r)=>r["companies/companyById"](t.companyId),companyAccount:({user:t},e,n,r)=>(r["companies/companyById"](t.companyId)||{}).CompanyAccount||null,companyAccountType:(t,e)=>(e.companyAccount||{}).accountType||null,companyRegion:(t,e)=>(e.company||{}).region||(re.brand==="docspo"?"US":"SE"),subscription:(t,e)=>{const{companyAccount:n={}}=e;if(!n)return{};const{freePremiumDays:r=null,accountType:i=null,maxProjectManagers:a=null,freeDocumentsLeft:s=null,paymentMethod:o,billingCycleInterval:l,billingCycleCount:c,showCalloutConvertStripe:u,hasExceededQuota:d,StripeSubscriptions:p,mrr:f,hasFailedPayments:h,allowFailedPaymentToConvertStripe:m}=n,g=[...new Set([...p.map(y=>y.status)])],v=p.some(y=>(y.stripeItems||[]).some(T=>T.stripePriceStripeId.startsWith("plan_"))),_=uv.includes(i)&&u&&o==="invoice"&&Y(n,"documentQuota.newCount")===1e3&&!Y(n,"premiumEndAt");return{type:i,trialDaysLeft:r,maxProjectManagers:a,freeDocumentsLeft:s,paymentMethod:o,billingCycleInterval:l,billingCycleCount:c,showCalloutConvertStripe:uv.includes(i)&&u&&o==="invoice",stripeStatuses:g,isPaying:uv.includes(i),hasExceededQuota:d,isStripeLegacy:v,isInvoiceLegacy:_,mrr:f,hasFailedPayments:h,allowFailedPaymentToConvertStripe:m}},user:({user:t},e,n,r)=>r["companyUsers/referenceById"](t.userId),isQualified:(t,{user:e,companyAccount:n})=>!n||!e||typeof e.isQualified!="boolean"?!0:e.isQualified||!["free","trial","premiumTrial"].includes(n.accountType),feature:()=>pr.checkFeature.bind(pr),can:()=>ga.checkPermission.bind(ga)},getField:Cd,modals:t=>t.modals,messages:t=>t.messages,isIncVat:t=>t.priceInputVat==="incVat",viewSettings:t=>e=>t.viewSettings[e],showSearch:t=>t.viewSettings.search.show,error:t=>t.error,isSocketConnected:t=>t.isSocketConnected},Iae={namespaced:!0,state:lC,getters:xae,actions:pae,mutations:wae},Pae={data:{},ids:[],isFetching:!1,isPosting:!1},pe={application:ot,projects:pn,forms:dr,files:Iv,settings:rA,certificates:Sie,companies:Av,companyReferences:Cie,companyReferenceItems:Aie,documents2:xv,invoices:Lie,timeTracks:jie,templates:Dv,publicDocuments:Vie,documentTerms:Hie,notifications:Iie,unitTypes:Wie,CLEAR_FORM:"CLEAR_FORM",DELETE_ARTICLE:"DELETE_ARTICLE",DELETE_COMPANY_USER:"DELETE_COMPANY_USER",DELETE_CONTRACT:"DELETE_CONTRACT",DELETE_ENDCUSTOMER:"DELETE_ENDCUSTOMER",DELETE_PROJECT:"DELETE_PROJECT",DELETE_PROJECT_FILE:"DELETE_PROJECT_FILE",DELETE_TEMPLATE_MESSAGE:"DELETE_TEMPLATE_MESSAGE",SET_ARTICLES:"SET_ARTICLES",SET_ATAS:"SET_ATAS",SET_COMPANY_USERS:"SET_COMPANY_USERS",SET_CONTRACTS:"SET_CONTRACTS",SET_ENDCUSTOMERS:"SET_ENDCUSTOMERS",SET_FORM:"SET_FORM",SET_NOTIFICATIONS:"SET_NOTIFICATIONS",SET_OFFERS:"SET_OFFERS",SET_PROJECTS:"SET_PROJECTS",SET_PROJECT_FILES:"SET_PROJECT_FILES",UPDATE_COMPANY:"UPDATE_COMPANY"};function yA(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _A(t,e,n){return e&&yA(t.prototype,e),n&&yA(t,n),t}function fr(){return fr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},fr.apply(this,arguments)}function Lv(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Ml(t){return!!(t&&typeof t.hasOwnProperty=="function"&&(t.hasOwnProperty("__ownerID")||t._map&&t._map.hasOwnProperty("__ownerID")))}function bA(t,e,n){return Object.keys(t).reduce(function(r,i){var a=""+i;return r.has(a)?r.set(a,n(r.get(a),t[a])):r},e)}var Dae=function(e){return function(n){return Ml(n)?n.get(e):n[e]}},Rae=function(){function t(n,r,i){if(r===void 0&&(r={}),i===void 0&&(i={}),!n||typeof n!="string")throw new Error("Expected a string key for Entity, but found "+n+".");var a=i,s=a.idAttribute,o=s===void 0?"id":s,l=a.mergeStrategy,c=l===void 0?function(h,m){return fr({},h,m)}:l,u=a.processStrategy,d=u===void 0?function(h){return fr({},h)}:u,p=a.fallbackStrategy,f=p===void 0?function(h,m){}:p;this._key=n,this._getId=typeof o=="function"?o:Dae(o),this._idAttribute=o,this._mergeStrategy=c,this._processStrategy=d,this._fallbackStrategy=f,this.define(r)}var e=t.prototype;return e.define=function(r){this.schema=Object.keys(r).reduce(function(i,a){var s,o=r[a];return fr({},i,(s={},s[a]=o,s))},this.schema||{})},e.getId=function(r,i,a){return this._getId(r,i,a)},e.merge=function(r,i){return this._mergeStrategy(r,i)},e.fallback=function(r,i){return this._fallbackStrategy(r,i)},e.normalize=function(r,i,a,s,o,l){var c=this,u=this.getId(r,i,a),d=this.key;if(d in l||(l[d]={}),u in l[d]||(l[d][u]=[]),l[d][u].some(function(f){return f===r}))return u;l[d][u].push(r);var p=this._processStrategy(r,i,a);return Object.keys(this.schema).forEach(function(f){if(p.hasOwnProperty(f)&&typeof p[f]=="object"){var h=c.schema[f],m=typeof h=="function"?h(r):h;p[f]=s(p[f],p,f,m,o,l)}}),o(this,p,r,i,a),u},e.denormalize=function(r,i){var a=this;return Ml(r)?bA(this.schema,r,i):(Object.keys(this.schema).forEach(function(s){if(r.hasOwnProperty(s)){var o=a.schema[s];r[s]=i(r[s],o)}}),r)},_A(t,[{key:"key",get:function(){return this._key}},{key:"idAttribute",get:function(){return this._idAttribute}}]),t}(),Fv=function(){function t(n,r){r&&(this._schemaAttribute=typeof r=="string"?function(i){return i[r]}:r),this.define(n)}var e=t.prototype;return e.define=function(r){this.schema=r},e.getSchemaAttribute=function(r,i,a){return!this.isSingleSchema&&this._schemaAttribute(r,i,a)},e.inferSchema=function(r,i,a){if(this.isSingleSchema)return this.schema;var s=this.getSchemaAttribute(r,i,a);return this.schema[s]},e.normalizeValue=function(r,i,a,s,o,l){var c=this.inferSchema(r,i,a);if(!c)return r;var u=s(r,i,a,c,o,l);return this.isSingleSchema||u===void 0||u===null?u:{id:u,schema:this.getSchemaAttribute(r,i,a)}},e.denormalizeValue=function(r,i){var a=Ml(r)?r.get("schema"):r.schema;if(!this.isSingleSchema&&!a)return r;var s=this.isSingleSchema?void 0:Ml(r)?r.get("id"):r.id,o=this.isSingleSchema?this.schema:this.schema[a];return i(s||r,o)},_A(t,[{key:"isSingleSchema",get:function(){return!this._schemaAttribute}}]),t}(),Mae=function(t){Lv(e,t);function e(r,i){if(!i)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');return t.call(this,r,i)||this}var n=e.prototype;return n.normalize=function(i,a,s,o,l,c){return this.normalizeValue(i,a,s,o,l,c)},n.denormalize=function(i,a){return this.denormalizeValue(i,a)},e}(Fv),Nae=function(t){Lv(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.normalize=function(i,a,s,o,l,c){var u=this;return Object.keys(i).reduce(function(d,p,f){var h,m=i[p];return m!=null?fr({},d,(h={},h[p]=u.normalizeValue(m,i,p,o,l,c),h)):d},{})},n.denormalize=function(i,a){var s=this;return Object.keys(i).reduce(function(o,l){var c,u=i[l];return fr({},o,(c={},c[l]=s.denormalizeValue(u,a),c))},{})},e}(Fv),Lae=function(e){var n=Array.isArray(e);if(n&&e.length>1)throw new Error("Expected schema definition to be a single schema, but found "+e.length+".");return e[0]},EA=function(e){return Array.isArray(e)?e:Object.keys(e).map(function(n){return e[n]})},Fae=function(e,n,r,i,a,s,o){e=Lae(e);var l=EA(n);return l.map(function(c,u){return a(c,r,i,e,s,o)})},jae=function(t){Lv(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.normalize=function(i,a,s,o,l,c){var u=this,d=EA(i);return d.map(function(p,f){return u.normalizeValue(p,a,s,o,l,c)}).filter(function(p){return p!=null})},n.denormalize=function(i,a){var s=this;return i&&i.map?i.map(function(o){return s.denormalizeValue(o,a)}):i},e}(Fv),TA=function(e,n,r,i,a,s,o){var l=fr({},n);return Object.keys(e).forEach(function(c){var u=e[c],d=typeof u=="function"?u(n):u,p=a(n[c],n,c,d,s,o);p==null?delete l[c]:l[c]=p}),l},Uae=function(e,n,r){if(Ml(n))return bA(e,n,r);var i=fr({},n);return Object.keys(e).forEach(function(a){i[a]!=null&&(i[a]=r(i[a],e[a]))}),i},Vae=function(){function t(n){this.define(n)}var e=t.prototype;return e.define=function(r){this.schema=Object.keys(r).reduce(function(i,a){var s,o=r[a];return fr({},i,(s={},s[a]=o,s))},this.schema||{})},e.normalize=function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return TA.apply(void 0,[this.schema].concat(i))},e.denormalize=function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Uae.apply(void 0,[this.schema].concat(i))},t}(),Bae=function t(e,n,r,i,a,s){if(typeof e!="object"||!e)return e;if(typeof i=="object"&&(!i.normalize||typeof i.normalize!="function")){var o=Array.isArray(i)?Fae:TA;return o(i,e,n,r,t,a,s)}return i.normalize(e,n,r,t,a,s)},Hae=function(e){return function(n,r,i,a,s){var o=n.key,l=n.getId(i,a,s);o in e||(e[o]={});var c=e[o][l];c?e[o][l]=n.merge(c,r):e[o][l]=r}},le={Array:jae,Entity:Rae,Object:Vae,Union:Mae,Values:Nae},wA=function(e,n){if(!e||typeof e!="object")throw new Error('Unexpected input given to normalize. Expected type to be "object", found "'+(e===null?"null":typeof e)+'".');var r={},i=Hae(r),a={},s=Bae(e,e,null,n,i,a);return{entities:r,result:s}};const Gs=new le.Entity("files");new le.Array(Gs);const SA=new le.Entity("projectFiles",{File:Gs});new le.Array(SA);const jv=new le.Entity("companyUsers");new le.Array(jv);const Uv=new le.Entity("offers",{Files:[Gs]});new le.Array(Uv);const kA=new le.Entity("atas",{Files:[Gs]});new le.Array(kA);const Vv=new le.Entity("projects",{CompanyUser:jv,ProjectMembers:[jv],ProjectFiles:[SA]});kA.define({Project:Vv});const zae=new le.Array(Vv),Wae=new le.Entity("articles");new le.Array(Wae);const CA=new le.Entity("certificates");new le.Array(CA);const Gae=new le.Entity("companies",{CompanyCertificates:[CA]}),qae=new le.Array(Gae),OA=new le.Entity("companyReferenceItems",{Image:Gs,Thumbnail:Gs});new le.Array(OA);const Yae=new le.Entity("companyReferences",{CompanyReferenceItems:[OA]});new le.Array(Yae);const AA=new le.Entity("contracts",{Offer:Uv});new le.Array(AA),Uv.define({Contract:AA}),new le.Entity("endCustomers");const Kae=new le.Entity("notifications",{Project:Vv});new le.Array(Kae);const Jae=new le.Entity("propertyDesignations");new le.Array(Jae);const Zae=new le.Entity("templateMessages");new le.Array(Zae);const Nl="companies",{LOAD_FILE:vUe,FORM_RESET_OLD:$A}=ce,{SET_FORM:Bv}=pe.forms,{DO_LOAD_CURRENT_COMPANY:Ad,DO_NORMALIZE_COMPANIES:xA,DO_UPDATE_CURRENT_COMPANY:IA,FORM_EDIT_COMPANY:Xae,FORM_SUBMIT_COMPANY:PA,FORM_NEW_COMPANY_BRANDING:DA,FORM_EDIT_COMPANY_BRANDING:Hv,FORM_SUBMIT_COMPANY_BRANDING:RA,UPDATE_COMPANY_ACCOUNT_TYPE:MA}=KO,{SET_COMPANIES_FETCHING:zv,SET_COMPANIES_POSTING:Mr}=Av,Qae={async[xA](t,{companies:e=[]}){if(!e||!Array.isArray(e)||!e.length)throw new Error("Missing param companies");await this.dispatch(ma,{data:e,schema:qae})},async[Ad]({commit:t,dispatch:e}){var n;try{t(zv,!0);const{data:r}=await Ut.get("/company");return await e(xA,{companies:[r]}),await((n=this.$supportChat)==null?void 0:n.syncData()),t(zv,!1),r}catch(r){throw t(zv,!1),r}},async[IA]({dispatch:t,commit:e},{body:n}){try{e(Mr,!0),await Ut.put("/company",n);const r=await t(Ad);return e(Mr,!1),r}catch(r){throw e(Mr,!1),r}},async[MA]({dispatch:t,commit:e},{accountType:n,billingCycleCost:r,billingCycleInterval:i,billingCycleCount:a,premiumSource:s=null,quantity:o}){try{if(e(Mr,!0),!n)throw new Error("Missing parameter accountType");if(i&&!a)throw new Error("Param billingCycleCount is required if billingCycleInterval is used");if(!i&&a)throw new Error("Param billingCycleInterval is required if billingCycleCount is used");if((i||a)&&typeof r>"u")throw new Error("Param billingCycleCost is missing");const l={premiumSource:s};return i&&a&&r&&(l.billingCycleInterval=i,l.billingCycleCount=a,l.billingCycleCost=r),typeof o<"u"&&(l.quantity=o),await fie(n,l),await t(Ad),e(Mr,!1),!0}catch(l){return this.handleError(l,{object:"companyAccount",action:`${Nl}/${MA}`}),!1}finally{e(Mr,!1)}},async[Xae]({rootGetters:t},{props:e=[]}={}){try{const n=Dr(t["application/company"],e);return this.commit(`forms/${Bv}`,{key:"company",formData:n}),!0}catch(n){return this.handleError(n),!1}},async[PA]({rootGetters:t,dispatch:e}){try{const n=t["forms/getFormByKey"]("company");return await e(IA,{body:n}),await this.dispatch($A,"company"),!0}catch(n){return this.handleError(n,{object:"companies",fallbackCode:"companies.submit",action:`${Nl}/${PA}`}),!1}},async[DA]({rootGetters:t,dispatch:e}){try{const{CompanyBranding:n}=t["application/company"];if(n&&n.id)return e(Hv);const r={about:""};return this.commit(`forms/${Bv}`,{key:"companyBranding",formData:r}),!0}catch(n){return this.handleError(n,{object:"companies",action:`${Nl}/${DA}`}),!1}},async[Hv]({rootGetters:t}){try{const{CompanyBranding:e}=t["application/company"],n=e;return this.commit(`forms/${Bv}`,{key:"companyBranding",formData:n}),!0}catch(e){return this.handleError(e,{object:"companies",action:`${Nl}/${Hv}`}),!1}},async[RA]({rootGetters:t,dispatch:e,commit:n}){try{n(Mr,!0);const r=t["forms/getFormByKey"]("companyBranding");let{id:i}=r;return i?await Ut.put("/companyBranding",r):{id:i}=await Ut.post("/companyBranding",r),e(Ad),n(Mr,!1),await this.dispatch($A,"companyBranding"),i}catch(r){return n(Mr,!1),this.handleError(r,{object:"companies",fallbackCode:"companies.submit",action:`${Nl}/${RA}`}),!1}}},gi=new le.Entity("files"),ese=new le.Array(gi),$d=new le.Entity("companyUsers"),NA=new le.Array($d),LA=new le.Entity("companies"),tse=new le.Array(LA),va=new le.Entity("invoices");va.define({InvoiceFiles:[{File:gi,Thumbnail:gi}],creditInvoices:[va],creditsInvoice:va,interestInvoices:[va],interestForInvoice:va});const Wv=new le.Array(va),nse=new le.Entity("documents",{data:{Files:ese,Invoices:Wv}}),rse=new le.Array(nse),FA=new le.Entity("projectFiles",{File:gi}),ise=new le.Array(FA),Gv=new le.Entity("projects",{ProjectMembers:NA,ProjectFiles:[{File:gi}],Invoices:Wv,CompanyUser:$d}),ase=new le.Array(Gv),sse=new le.Entity("timeTracks",{CompanyUser:$d,Project:Gv}),ose=new le.Array(sse),jA=new le.Entity("companyReference",{CompanyReferenceItem:{Image:gi,Thumbnail:gi}}),lse=new le.Array(jA),UA=new le.Entity("documentTerms",{File:gi}),cse=new le.Array(UA),use={project:Gv,projects:ase,invoice:va,invoices:Wv,companyReference:jA,companyReferences:lse,projectFile:FA,projectFiles:ise,documents:rse,companyUser:$d,companyUsers:NA,company:LA,companies:tse,timeTracks:ose,documentTerm:UA,documentTerms:cse},dse=(t,e)=>{const n=use[e];return n||console.warn(`No schema found for type: '${e}'`),wA(t,n)};function vi(t,e,n=!1){let r=e.replace(/\[(\d*)\]/ig,(s,o)=>`.${o}`);r=r.split(".");let i=t;const a=r.pop();return r.length>0&&(i=r.reduce((s,o)=>{let l=s[o];return n&&(De(l)==="undefined"||De(l)==="null")&&(Z.set(s,o,{}),l=s[o]),l},t)),{root:i,prop:a}}function qs(t,e){function n(r,i){Object.keys(i).forEach(a=>{const s=r[a]instanceof Object&&!Array.isArray(r[a]),o=i[a]instanceof Object&&!Array.isArray(i[a]);if(s&&o){qs(r[a],i[a]);return}Z.set(r,a,i[a])})}n(t,e)}function Ll(t,{keyId:e="id"}={}){const n=[],r={};return t.forEach(i=>{r[i[e]]=i,n.push(i[e])}),{ids:n,values:r}}function VA({schema:t,getters:e,data:n,scope:r=null,instance:i=null}){let a=r;typeof a=="string"&&(a=[a]);const s={};return t&&Object.keys(t).map(o=>(t[o].$virtual&&t[o].$virtual.map(l=>{const{name:c,set:u}=l;let d={};if(n&&typeof n[o]<"u"?d=n[o]:typeof t[o].$default<"u"&&(d=t[o].$default),typeof d>"u")return!1;const p=i||this;return s[c]=u.call(p,d,{getters:e}),!0}),!0)),t&&a&&Array.isArray(a)&&Object.keys(t).map(o=>t[o].$scope?(a.some(c=>t[o].$scope.indexOf(c)>=0)||delete s[o],!0):(delete s[o],!0)),JSON.parse(JSON.stringify(s))}function pse({schema:t,data:e,getters:n,scope:r=null,includeVirtual:i=!1,instance:a=null}){let s=r;if(typeof s=="string"&&(s=[s]),!t)throw new Error("Missing parameter schema");const o={};Object.keys(t).map(c=>(t[c].$default!=="undefined"&&(o[c]=t[c].$default),!0));let l=Object.assign({},o,e);return i&&(l={...l,...VA({schema:t,getters:n,data:e,scope:r,instance:a})}),t&&s&&Array.isArray(s)&&Object.keys(t).map(c=>t[c].$scope?(s.some(d=>t[c].$scope.indexOf(d)>=0)||delete l[c],!0):(delete l[c],!0)),JSON.parse(JSON.stringify(l))}function BA({next:t=null,projectId:e,docType:n,docId:r,invoiceId:i}={},a,s=void 0){if(!t||!a)return!1;switch(t){case"project":{if(!e)throw new ca(`Cannot redirect user on next: '${t}' as no projectId is defined`);a.push({name:"project",params:{id:e,modal:!1}},s);break}case"invoice":{if(!i)throw new ca(`Cannot redirect user on next: '${t}' as no invoiceId is defined`);a.push({name:"invoice",params:{id:i,modal:!1}},s);break}case"preview":{if(i){a.push({name:"previewInvoice",params:{id:i}},s);break}if(!e)throw new ca(`Cannot redirect user on next: '${t}' as no projectId is defined`);if(!n)throw new ca(`Cannot redirect user on next: '${t}' as no docType is defined`);if(!r)throw new ca(`Cannot redirect user on next: '${t}' as no docId is defined`);a.push({name:"Preview",params:{projectId:e,docType:n,docId:r}},s);break}default:throw new ca(`Cannot redirect user on next: '${t}' as it is not implemented`)}return!0}const{SET_COMPANIES:fse,CLEAR_COMPANIES:hse,SET_COMPANIES_FETCHING:mse,SET_COMPANIES_POSTING:gse}=Av,vse={[fse](t,{data:e}){if(typeof e!="object")throw Error("Data must be a company or an array of companies!");const n=Array.isArray(e)?e:[e],{ids:r,values:i}=Ll(n);qs(t.data,i),t.ids=fa([...r,...t.ids])},[hse](t){Z.set(t,"data",{}),Z.set(t,"ids",[])},[mse](t,e){t.isFetching=e},[gse](t,e){t.isPosting=e}},yse={namespaced:!0,state:Pae,getters:{companyById:t=>e=>t.data[e],certificateIdListForCurrentCompany:(t,e,n)=>()=>e.certificateIdListForCompany(n.application.user.companyId),certificateIdListForCompany:t=>e=>{const n=t.data[e].CompanyCertificates;return n||[]},isFetching:t=>t.isFetching,isPosting:t=>t.isPosting},actions:Qae,mutations:vse},_se={data:{},ids:[],isFetching:!1,isPosting:!1},yi="companyUsers",{LOAD_COMPANY_USERS:HA,LOAD_COMPANY_USER:xd,DO_NORMALIZE_COMPANY_USERS:Id,UPDATE_COMPANY_USER:qv,CREATE_COMPANY_USER:Yv,DELETE_COMPANY_USER:zA,PATCH_COMPANY_USER:Kv,FORM_NEW_COMPANY_USER:bse,FORM_EDIT_COMPANY_USER:Ese,FORM_SUBMIT_COMPANY_USER:WA}=JO,{SET_AS_NORMALIZED_DATA:Tse,FORM_RESET_OLD:wse,DELETE_FILE:Sse}=ce,{SET_COMPANY_USERS_FETCHING:Pd,SET_COMPANY_USERS_POSTING:_i}=$v,kse={async[Id](t,{companyUsers:e=[]}){if(!e||!Array.isArray(e)||!e.length)throw new Error("Missing param companyUsers");await this.dispatch(Tse,{data:e,schema:"companyUsers"})},async[HA]({dispatch:t,commit:e}){try{e(Pd,!0);const{data:n}=await oie();await t(Id,{companyUsers:n})}catch(n){this.handleError(n,{object:"companyUser",fallbackCode:"companyUser.getAll",action:`${yi}/${HA}`})}finally{e(Pd,!1)}},async[xd]({commit:t,dispatch:e,rootGetters:n},{id:r}){try{t(Pd,!0);const{data:i}=await lie(r);await e(Id,{companyUsers:[i]});const{id:a}=n["application/user"]||{};return r===a&&(te.locale!==i.locale&&te.l10n.changeLocale(i.locale),te.lang!==i.language&&(te.i18next.changeLanguage(i.language),location&&location.reload())),r}catch(i){return this.handleError(i,{object:"companyUser",objectId:r,fallbackCode:"companyUser.get",action:`${yi}/${xd}`,actionPayload:arguments[1]}),null}finally{t(Pd,!1)}},async[Yv]({commit:t,dispatch:e,rootGetters:n},{body:r}){try{const{language:i,locale:a}=n["application/user"]||{},s={language:i||"en",locale:a||"en-US",...r};t(_i,!0);const{data:o}=await cie(s);return await e(Id,{companyUsers:[o]}),this.dispatch("application/SHOW_MESSAGE",{type:"success",message:te.t("sentThingTo",{thing:te.t("invitation"),recipient:o.email})}),o.id}catch(i){return this.handleError(i,{object:"companyUser",fallbackCode:"companyUser.post",action:`${yi}/${Yv}`,actionPayload:arguments[1]}),null}finally{t(_i,!1)}},async[qv]({dispatch:t,commit:e,getters:n},{id:r,body:i}){var a;try{e(_i,!0);const{AvatarPublicId:s}=i,{AvatarPublicId:o}=n.byId(r);return s&&s!==o&&this.dispatch(Sse,{id:o}),await uie(r,i),await t(xd,{id:r}),(a=this.$supportChat)==null||a.syncData(),this.dispatch("application/SHOW_MESSAGE",{type:"success",message:te.t("updatedThing",{thing:te.t("user")})}),r}catch(s){return this.handleError(s,{object:"companyUser",objectId:r,fallbackCode:"companyUser.put",action:`${yi}/${qv}`,actionPayload:arguments[1]}),null}finally{e(_i,!1)}},async[zA]({commit:t},{id:e}){try{return t(_i,!0),await die(e),t($v.DELETE_COMPANY_USER,e),this.dispatch("application/SHOW_MESSAGE",{type:"success",message:te.t("removedThing",{thing:te.t("user")}),actions:{undo:()=>{this.dispatch(`${yi}/${Kv}`,{id:e})}}}),e}catch(n){return this.handleError(n,{object:"companyUser",objectId:e,fallbackCode:"companyUser.delete",action:`${yi}/${zA}`,actionPayload:arguments[1]}),null}finally{t(_i,!1)}},async[Kv]({dispatch:t,commit:e},{id:n}){try{return e(_i,!0),await pie(n),await t(xd,{id:n}),n}catch(r){return this.handleError(r,{object:"companyUser",objectId:n,fallbackCode:"companyUser.patch",action:`${yi}/${Kv}`,actionPayload:arguments[1]}),null}finally{e(_i,!1)}},[bse]({commit:t,rootGetters:e}){let n="en";const r=e["application/user"];r.language&&({language:n}=r);const i={AvatarPublicId:null,CompanyId:null,CompanyUserPermission:{manageCompany:!1,manageUsers:!1,manageProjects:!1,manageOwnProjects:!1,showPrices:!1,manageAtas:!1,manageOwnAtas:!1,createTimeTracks:!0,readTimeTracks:!1,readOwnTimeTracks:!0,modifyTimeTracks:!1,modifyOwnTimeTracks:!0,deleteTimeTracks:!1,deleteOwnTimeTracks:!0,attestTimeTracks:!1,createInvoices:!1,readInvoices:!1,readOwnInvoices:!1,modifyInvoices:!1,modifyOwnInvoices:!1,deleteInvoices:!1,deleteOwnInvoices:!1,attestInvoices:!1,attestOwnInvoices:!1,exportInvoices:!1,modifyBookkeepingSettings:!1},cellphone:null,email:null,finishedGuide:!1,firstname:null,id:null,language:n,lastActive:null,lastname:null,resetPasswordExpires:null,resetPasswordToken:null};return t(`forms/${pe.SET_FORM}`,{key:"companyUser",formData:i},{root:!0})},[Ese]({commit:t,getters:e},{id:n,props:r=[]}){const i=Dr(e.byId(n),r);return t(`forms/${pe.SET_FORM}`,{key:"companyUser",formData:i},{root:!0})},async[WA]({rootGetters:t,dispatch:e}){try{const n=t["forms/getFormByKey"]("companyUser");let{id:r}=n;return r?await e(qv,{id:n.id,body:n}):r=await e(Yv,{body:n}),await this.dispatch(wse,"companyUser"),!0}catch(n){return this.handleError(n,{object:"companyUser",action:`${yi}/${WA}`,actionPayload:arguments[1]}),!1}}},{SET_COMPANY_USERS:Cse,DELETE_COMPANY_USER:Ose,CLEAR_COMPANY_USERS:Ase,SET_COMPANY_USERS_FETCHING:$se,SET_COMPANY_USERS_POSTING:xse}=$v,Ise={[Cse](t,{data:e=[]}){if(typeof e!="object")throw Error("Data must be a company user or an array of company users!");const n=Array.isArray(e)?e:[e],{ids:r,values:i}=Ll(n);qs(t.data,i),t.ids=fa([...r,...t.ids])},[Ose](t,e){Z.delete(t.data,e);const n=t.ids.indexOf(e);n!==-1&&t.ids.splice(n,1)},[Ase](t){Z.set(t,"data",{}),Z.set(t,"ids",[])},[$se](t,e){t.isFetching=e},[xse](t,e){t.isPosting=e}},Pse={namespaced:!0,state:_se,getters:{referenceById:t=>e=>t.data[e],byId:t=>e=>{const n=t.data[e];if(!n)return null;const{firstname:r,lastname:i}=n;return{...n,fullName:`${r||""} ${i||""}`.trim(),role:pre(n.CompanyUserPermission),avatarUrl:`${re.api.baseUrl}/file/${n.AvatarPublicId}/download`}},all:(t,e)=>{const n={};return t.ids.forEach(r=>{n[r]=e.byId(r)}),n},isPosting:t=>t.isPosting,isFetching:t=>t.isFetching},actions:kse,mutations:Ise},Dse={...{invoice:{},isFetchingInvoice:!1,isPostingInvoice:!1},companyUser:{},company:{},isFetching:!1,isPosting:!1},Dd="settings",{FORM_RESET_OLD:Rse}=ce,{DO_LOAD_INVOICE_SETTINGS:Jv,LOAD_INVOICE_SETTINGS:GA,DO_UPDATE_INVOICE_SETTINGS:Zv,UPDATE_INVOICE_SETTINGS:qA,FORM_EDIT_INVOICE_SETTINGS:YA,FORM_SUBMIT_INVOICE_SETTINGS:KA}=tA,{SET_INVOICE_SETTINGS_FETCHING:JA,SET_INVOICE_SETTINGS_POSTING:ZA}=Pv,{SET_SETTINGS:Mse}=pe.settings,{SET_FORM:Nse}=pe.forms,Lse={async[Jv]({commit:t}){try{t(JA,!0);const{data:e}=await gie();t(Mse,{key:"invoice",settings:e})}catch(e){throw e}finally{t(JA,!1)}},async[GA]({dispatch:t}){try{await t(Jv)}catch(e){this.handleError(e,{object:"companySettings",fallbackCode:"settings.get",action:`${Dd}/${GA}`})}},async[Zv]({dispatch:t,commit:e},{data:n}){try{e(ZA,!0),await vie(n),t(Jv)}catch(r){throw r}finally{e(ZA,!1)}},async[qA]({dispatch:t},{data:e}){try{return await t(Zv,{data:e}),!0}catch(n){return this.handleError(n,{object:"setting",fallbackCode:"settings.put",action:`${Dd}/${qA}`,actionPayload:arguments[1]}),!1}},async[YA]({commit:t,state:e},{props:n=[]}={}){try{const r=Dr(e.invoice,n);return t(`forms/${Nse}`,{key:"companyInvoiceSettings",formData:r},{root:!0}),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"setting.editInvoice",action:`${Dd}/${YA}`,actionPayload:arguments[1]}),!1}},async[KA]({rootGetters:t,dispatch:e}){try{const n=t["forms/getFormByKey"]("companyInvoiceSettings"),{invoicePaymentAccountType:r}=n;return r==="bankgiro"?(n.invoicePaymentDomesticClearingNo=null,n.invoicePaymentDomesticAccountNo=null):r==="domesticBankAcc"&&(n.invoicePaymentBankGiro=null),await e(Zv,{data:n}),await this.dispatch(Rse,"companyInvoiceSettings"),!0}catch(n){return this.handleError(n,{object:"setting",fallbackCode:"setting.submitInvoice",action:`${Dd}/${KA}`}),!1}}},bi="settings",{FORM_RESET_OLD:XA,DO_LOAD_INVOICE_SETTINGS:Fse}=ce,{DO_LOAD_ALL_SETTINGS:QA,LOAD_ALL_SETTINGS:e$,DO_LOAD_SETTINGS_COMPANY:Rd,LOAD_SETTINGS_COMPANY:t$,LOAD_SETTINGS_COMPANYUSER:n$,UPDATE_SETTINGS:r$,DO_UPDATE_SETTINGS:Fl,FORM_EDIT_COMPANY_SETTINGS:i$,DO_LOAD_SETTINGS_COMPANYUSER:Md,FORM_SUBMIT_COMPANY_SETTINGS:a$,FORM_EDIT_COMPANY_USER_SETTINGS:s$,FORM_SUBMIT_COMPANY_USER_SETTINGS:o$}=nA,{SET_SETTINGS:Xv,SET_SETTINGS_FETCHING:Nd,SET_SETTINGS_POSTING:l$}=pe.settings,{SET_FORM:c$}=pe.forms,u$=["ataTravel"],jse=["extraWorkPrice","extraWorkManagementPrice","extraEntrepreneurPercentage","extraOtherPercentage"],d$=t=>{const e=t;return Object.keys(e).forEach(n=>{u$.includes(n)&&e[n]==="0"?e[n]="":e[n]==="true"?e[n]=!0:e[n]==="false"?e[n]=!1:e[n]==="null"?e[n]=null:typeof e[n]!="boolean"&&!Number.isNaN(Number(e[n]))&&e[n]!==""&&(e[n]=Number(e[n]))}),e},Ld=t=>{const e=[];return Object.keys(t).forEach(n=>{let r=t[n];t[n]===!0?r="true":t[n]===!1&&(r="false"),jse.includes(n)&&(r=Number(r)),u$.includes(n)&&(t[n]===!1||t[n]==="")?e.push({name:n,value:!1,type:"string"}):e.push({name:n,value:r})}),e},Use={...Lse,async[QA]({dispatch:t}){await t(Rd),await t(Md),await this.dispatch(Fse)},async[e$]({dispatch:t}){try{await t(QA)}catch(e){this.handleError(e,{object:"settings",fallbackCode:"settings.get",action:`${bi}/${e$}`})}},async[Rd]({commit:t}){try{t(Nd,!0);const{data:e}=await Ut.get("/companySetting"),n=d$(e);t(Xv,{key:"company",settings:n});const{ataTitleKey:r}=e;r&&r!=="ata"&&te.i18next.addResources(te.i18next.language,"_common",{ata:`$t(${r})`,ataThe:`$t(${r}The)`})}catch(e){throw e}finally{t(Nd,!1)}},async[t$]({dispatch:t}){try{await t(Rd)}catch(e){this.handleError(e,{object:"companySettings",fallbackCode:"settings.get",action:`${bi}/${t$}`})}},async[Md]({dispatch:t,commit:e}){var n;try{e(Nd,!0);const{data:r}=await Ut.get("/companyUserSetting"),i=d$(r);e(Xv,{key:"companyUser",settings:i});const{autoTriggerPurchaseEvent:a}=i;if(a){const{currency:s,amount:o,accountType:l}=a||{};(n=this.$trackEvent)==null||n.call(this,"purchase",{currency:s,amount:o,accountType:l}),await t(Fl,{key:"companyUser",settings:Ld({autoTriggerPurchaseEvent:null})})}}catch(r){throw r}finally{e(Nd,!1)}},async[n$]({dispatch:t}){try{await t(Md)}catch(e){this.handleError(e,{object:"companyUserSettings",fallbackCode:"settings.get",action:`${bi}/${n$}`})}},async[r$]({dispatch:t,commit:e},{key:n,settings:r}){try{if(!n)throw new Error("Missing valid parameter key");const i=Ld(r);return e(Xv,{key:n,settings:r}),await t(Fl,{key:n,settings:i}),!0}catch(i){return this.handleError(i,{object:"setting",fallbackCode:"settings.put",action:`${bi}/${r$}`,actionPayload:arguments[1]}),!1}},async[Fl]({dispatch:t,commit:e},{key:n,settings:r}){try{if(e(l$,!0),n==="company")await Ut.post("/companySetting",r),t(Rd);else if(n==="companyUser")await Ut.post("/companyUserSetting",r),t(Md);else throw new Error(`Setting key: '${n}' is not valid, cannot update settings.`)}catch(i){throw i}finally{e(l$,!1)}},async[i$]({commit:t,state:e},{props:n=[]}={}){try{const r=Dr(e.company,n);return t(`forms/${c$}`,{key:"companySettings",formData:r},{root:!0}),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"setting.editCompany",action:`${bi}/${i$}`,actionPayload:arguments[1]}),!1}},async[a$]({rootGetters:t,dispatch:e}){try{const n=t["forms/getFormByKey"]("companySettings"),r=Ld(n);return await e(Fl,{key:"company",settings:r}),await this.dispatch(XA,"companySettings"),!0}catch(n){return this.handleError(n,{object:"setting",fallbackCode:"setting.submitCompany",action:`${bi}/${a$}`}),!1}},async[s$]({commit:t,state:e},{props:n=[]}={}){try{const r=Dr(e.companyUser,n);return t(`forms/${c$}`,{key:"companyUserSettings",formData:r},{root:!0}),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"setting.editCompanyUser",action:`${bi}/${s$}`,actionPayload:arguments[1]}),!1}},async[o$]({rootGetters:t,dispatch:e}){try{const n=t["forms/getFormByKey"]("companyUserSettings"),r=Ld(n);return await e(Fl,{key:"companyUser",settings:r}),await this.dispatch(XA,"companyUserSettings"),!0}catch(n){return this.handleError(n,{object:"setting",fallbackCode:"setting.submitCompanyUser",action:`${bi}/${o$}`}),!1}}},{SET_INVOICE_SETTINGS_FETCHING:Vse,SET_INVOICE_SETTINGS_POSTING:Bse}=Pv,Hse={[Vse](t,e){t.isFetchingInvoice=e},[Bse](t,e){t.isPostingInvoice=e}},{SET_SETTINGS:zse,CLEAR_SETTINGS:Wse,SET_SETTINGS_FETCHING:Gse,SET_SETTINGS_POSTING:qse}=rA,Yse={...Hse,[zse](t,{key:e,settings:n={}}){if(!t[e])throw Error(`${e} is not a valid key/type`);Object.keys(n).forEach(r=>{const i=n[r];Z.set(t[e],r,i)})},[Wse](t,{key:e,name:n=null}){n?Z.delete(t[e],n):Z.set(t,e,{})},[Gse](t,e){t.isFetching=e},[qse](t,e){t.isPosting=e}},Kse={...{allInvoiceSettings:t=>t.invoice,getInvoiceSetting:t=>e=>{const n=t.invoice[e];return typeof n<"u"?n:null},isFetchingInvoice:t=>t.isFetchingInvoice,isPostingInvoice:t=>t.isPostingInvoice,isRegisteredForInvoicing:(t,e)=>e.getInvoiceSetting("isRegisteredForInvoicing")},allCompanySettings:t=>t.company,getCompanySetting:t=>e=>{const n=t.company[e];return typeof n<"u"?n:null},getCompanyUserSetting:t=>e=>{const n=t.companyUser[e];return typeof n<"u"?n:null},isPosting:t=>t.isPosting,isFetching:t=>t.isFetching,allowHidePrice:(t,e)=>e.getCompanySetting("work_allowHidePrice"),hidePriceOnNewlyAddedArticles:(t,e)=>e.allowHidePrice&&e.getCompanySetting("work_default_hidePrice"),allowDocumentCustomSender:(t,e)=>e.getCompanySetting("allowProjectCustomSender"),allowHideDocArticlePriceInput:(t,e)=>e.getCompanySetting("allowHideDocArticlePriceInput"),defaultHideDocArticlePriceInput:(t,e)=>e.getCompanySetting("hideDocArticlePriceInput"),defaultVatRate:(t,e)=>e.getCompanySetting("defaultVatRate"),defaultCurrency:(t,e)=>e.getCompanyUserSetting("defaultCurrency"),documentSenderSign:(t,e)=>e.getCompanyUserSetting("documentSenderSign"),showOverviewOnboardingOverlay:(t,e)=>e.getCompanyUserSetting("showOverviewOnboardingOverlay"),reminderSettings:t=>{const e=t.company||{};return{notAnswered:e.defaultReminderRemindDays,notViewed:e.defaultReminderViewedDays,expires:e.defaultReminderExpireDays}},defaultDocumentTheme:t=>{const{documentThemeBackgroundFilter:e,documentThemePriceBackground:n,documentThemePrimaryColor:r,offerBrandingBackgroundUrl:i}=t.company||{};return{...e&&e!=="hsla(239,71%,89%,0)"&&{backgroundFilter:e},...n&&n!=="hsla(249,60%,34%,1)"&&{priceSummaryBackground:n},...r&&r!=="hsla(271,100%,38%,1)"&&{headingColor:r},...r&&r!=="hsla(271,100%,38%,1)"&&{headingColor:r},...i&&{background:i}}},isAuthenticatedCRM:(t,e)=>(n,r=null)=>({hubspot:[{key:"hubspotNativeTokens",type:"getCompanyUserSetting",appType:"native"},{key:"hubspotTokens",type:"getCompanyUserSetting",appType:"extension"}],upsales:[{key:"upsalesApiKey",type:"getCompanySetting"}],salesforce:[{key:"salesforceTokens",type:"getCompanyUserSetting"}],pipedrive:[{key:"pipedriveTokens",type:"getCompanyUserSetting"}]}[n]||[]).filter(a=>!r||a.appType===r).some(({key:a,type:s})=>{var o;return!!((o=e[s])!=null&&o.call(e,a))}),allAuthenticatedCRMs:(t,e)=>["hubspot","salesforce","pipedrive"].filter(n=>!!e.isAuthenticatedCRM(n)),isFortnoxInstalled:(t,e)=>!!e.getCompanySetting("fortnoxTokens")&&pr.checkFeature("fortnox")},Jse={namespaced:!0,state:Dse,getters:Kse,actions:Use,mutations:Yse},Zse={...(()=>({isUploading:!1,article:{},document:{},document2:{},projectNote:{},company:{},companyBranding:{},companyUser:{},companyInvoiceSettings:{},companySettings:{},companyUserSettings:{},moduleArticles:[],modulePrices:{},file:{},invoice:{},invoiceNote:{},companyReference:{},companyReferenceItems:[],endCustomer:{},timeline:{},timeTrack:{TimeTrackSlots:[]},documentTerm:{},kycForm:{}}))()},{FORM_DOCUMENT_SET_CLIENT:p$,FORM_DOCUMENT_SUBMIT_CLIENT:Xse}=ur,{SET_FORM_VALUE:ya,REMOVE_FORM_VALUE:f$}=dr,Qse={async[p$]({commit:t,getters:e,rootGetters:n},{formData:r}){if(!r)return t(ya,{key:"document.ModuleEndCustomer",value:null}),t(f$,"document.ModuleExtraCustomers"),!0;const i=Object.assign({},r);i.id=null,i.EndCustomerId=r.id,t(ya,{key:"document.ModuleEndCustomer",value:i});const a=e.documentField("ModuleExtraCustomers");i.customerType==="company"&&i.reference&&a&&a.length===0&&t(ya,{key:"document.ModuleExtraCustomers",value:{name:i.reference}});const s=n["settings/getCompanySetting"]("priceInputCompany"),o=n["settings/getCompanySetting"]("priceInputDefault");return i.customerType==="company"&&s?t("application/updateField",{path:"priceInputVat",value:s},{root:!0}):i.customerType==="individual"&&o&&t("application/updateField",{path:"priceInputVat",value:o},{root:!0}),!0},async[Xse]({commit:t,dispatch:e,rootGetters:n},{mode:r="create"}={}){let i=null;if(r==="edit"){const a=n["forms/documentField"]("ModuleEndCustomer"),s=n["forms/getFormByKey"]("endCustomer");if(!a)throw new Error("Could not find the old client");if(!s)throw new Error("Could not find the new client");if(a.customerType==="individual"&&s.customerType==="company")t(f$,"document.ModuleExtraCustomers"),t(ya,{key:"document.ModuleExtraCustomers",value:{name:s.reference}});else if(s.customerType==="company"){const o=n["forms/documentField"]("ModuleExtraCustomers");o&&o[0]?t(ya,{key:"document.ModuleExtraCustomers[0]",value:{name:s.reference}}):t(ya,{key:"document.ModuleExtraCustomers",value:{name:s.reference}})}i=Object.assign({},s,{id:s.EndCustomerId}),s.doUpdateEndCustomer&&(t(ya,{key:"endCustomer",value:i}),await e(`endCustomers/${Rr.FORM_SUBMIT_ENDCUSTOMER}`,{},{root:!0}))}else{const a=await e(`endCustomers/${Rr.FORM_SUBMIT_ENDCUSTOMER}`,{},{root:!0}),s=n["endCustomers/endCustomerById"](a);if(!s)throw new Error("Could not find the endCustomer");i=Object.assign({},s)}return await e(p$,{formData:i}),!0}};var h$={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ne,function(){Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"});function n(a){for(var s=[],o=0,l=a.length;o<l;o++)s.indexOf(a[o])===-1&&s.push(a[o]);return s}var r={},i={"==":function(a,s){return a==s},"===":function(a,s){return a===s},"!=":function(a,s){return a!=s},"!==":function(a,s){return a!==s},">":function(a,s){return a>s},">=":function(a,s){return a>=s},"<":function(a,s,o){return o===void 0?a<s:a<s&&s<o},"<=":function(a,s,o){return o===void 0?a<=s:a<=s&&s<=o},"!!":function(a){return r.truthy(a)},"!":function(a){return!r.truthy(a)},"%":function(a,s){return a%s},log:function(a){return console.log(a),a},in:function(a,s){return!s||typeof s.indexOf>"u"?!1:s.indexOf(a)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(a,s,o){if(o<0){var l=String(a).substr(s);return l.substr(0,l.length+o)}return String(a).substr(s,o)},"+":function(){return Array.prototype.reduce.call(arguments,function(a,s){return parseFloat(a,10)+parseFloat(s,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(a,s){return parseFloat(a,10)*parseFloat(s,10)})},"-":function(a,s){return s===void 0?-a:a-s},"/":function(a,s){return a/s},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(a,s){return a.concat(s)},[])},var:function(a,s){var o=s===void 0?null:s,l=this;if(typeof a>"u"||a===""||a===null)return l;for(var c=String(a).split("."),u=0;u<c.length;u++)if(l==null||(l=l[c[u]],l===void 0))return o;return l},missing:function(){for(var a=[],s=Array.isArray(arguments[0])?arguments[0]:arguments,o=0;o<s.length;o++){var l=s[o],c=r.apply({var:l},this);(c===null||c==="")&&a.push(l)}return a},missing_some:function(a,s){var o=r.apply({missing:s},this);return s.length-o.length>=a?[]:o}};return r.is_logic=function(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&Object.keys(a).length===1},r.truthy=function(a){return Array.isArray(a)&&a.length===0?!1:!!a},r.get_operator=function(a){return Object.keys(a)[0]},r.get_values=function(a){return a[r.get_operator(a)]},r.apply=function(a,s){if(Array.isArray(a))return a.map(function(g){return r.apply(g,s)});if(!r.is_logic(a))return a;var o=r.get_operator(a),l=a[o],c,u,d,p,f;if(Array.isArray(l)||(l=[l]),o==="if"||o=="?:"){for(c=0;c<l.length-1;c+=2)if(r.truthy(r.apply(l[c],s)))return r.apply(l[c+1],s);return l.length===c+1?r.apply(l[c],s):null}else if(o==="and"){for(c=0;c<l.length;c+=1)if(u=r.apply(l[c],s),!r.truthy(u))return u;return u}else if(o==="or"){for(c=0;c<l.length;c+=1)if(u=r.apply(l[c],s),r.truthy(u))return u;return u}else{if(o==="filter")return p=r.apply(l[0],s),d=l[1],Array.isArray(p)?p.filter(function(g){return r.truthy(r.apply(d,g))}):[];if(o==="map")return p=r.apply(l[0],s),d=l[1],Array.isArray(p)?p.map(function(g){return r.apply(d,g)}):[];if(o==="reduce")return p=r.apply(l[0],s),d=l[1],f=typeof l[2]<"u"?l[2]:null,Array.isArray(p)?p.reduce(function(g,v){return r.apply(d,{current:v,accumulator:g})},f):f;if(o==="all"){if(p=r.apply(l[0],s),d=l[1],!Array.isArray(p)||!p.length)return!1;for(c=0;c<p.length;c+=1)if(!r.truthy(r.apply(d,p[c])))return!1;return!0}else if(o==="none"){if(p=r.apply(l[0],s),d=l[1],!Array.isArray(p)||!p.length)return!0;for(c=0;c<p.length;c+=1)if(r.truthy(r.apply(d,p[c])))return!1;return!0}else if(o==="some"){if(p=r.apply(l[0],s),d=l[1],!Array.isArray(p)||!p.length)return!1;for(c=0;c<p.length;c+=1)if(r.truthy(r.apply(d,p[c])))return!0;return!1}}if(l=l.map(function(g){return r.apply(g,s)}),i.hasOwnProperty(o)&&typeof i[o]=="function")return i[o].apply(s,l);if(o.indexOf(".")>0){var h=String(o).split("."),m=i;for(c=0;c<h.length;c++){if(!m.hasOwnProperty(h[c]))throw new Error("Unrecognized operation "+o+" (failed at "+h.slice(0,c+1).join(".")+")");m=m[h[c]]}return m.apply(s,l)}throw new Error("Unrecognized operation "+o)},r.uses_data=function(a){var s=[];if(r.is_logic(a)){var o=r.get_operator(a),l=a[o];Array.isArray(l)||(l=[l]),o==="var"?s.push(l[0]):l.forEach(function(c){s.push.apply(s,r.uses_data(c))})}return n(s)},r.add_operation=function(a,s){i[a]=s},r.rm_operation=function(a){delete i[a]},r.rule_like=function(a,s){if(s===a||s==="@")return!0;if(s==="number")return typeof a=="number";if(s==="string")return typeof a=="string";if(s==="array")return Array.isArray(a)&&!r.is_logic(a);if(r.is_logic(s)){if(r.is_logic(a)){var o=r.get_operator(s),l=r.get_operator(a);if(o==="@"||o===l)return r.rule_like(r.get_values(a,!1),r.get_values(s,!1))}return!1}if(Array.isArray(s))if(Array.isArray(a)){if(s.length!==a.length)return!1;for(var c=0;c<s.length;c+=1)if(!r.rule_like(a[c],s[c]))return!1;return!0}else return!1;return!1},r})})(h$);function eoe(t,e){let n=0;const r=[];for(const[i,a]of t.entries()){const{code:s,data:o}=a;if(s===e){const l=r.slice(n).find(({code:c,data:u})=>{if(c!==s)return!1;const d=Y(u,"client.id"),p=Y(o,"client.id"),f=Y(u,"email"),h=Y(o,"email");return d===p&&p!==void 0||f===h&&h!==void 0});l?(l.children=[...l.children,a],l.createdAt=a.createdAt):r.push({...a,children:[]})}else s==="sent"&&(n=i?i-1:0),r.push(a)}return r}const m$=({nodes:t,data:e})=>{const n=[];return t.forEach(r=>{const i=r.isVisible?sre(r.isVisible,["_uniqueId"]):!1;(!i||h$.exports.apply(i,e))&&n.push(r),r&&Array.isArray(r.children)&&r.children.length&&(r.children=m$({nodes:r.children,data:e}))}),n},g$={rot:{max:5e4*100,ratio:.3},rut:{max:75e3*100,ratio:.5},greenRot15:{max:5e4*100,ratio:.15},greenRot50:{max:5e4*100,ratio:.5}},v$=(t,e,n)=>{if(!g$[t])throw new Error("Missing param type");const{max:r,ratio:i}=g$[t];return Math.min(n*r,e*i)},Fd=({type:t="fixed",currency:e,maxTotal:n=null,articles:r=[],clients:i=[],region:a={},useVat:s,rounding:o})=>{if(typeof s>"u")throw new Error("Missing param useVat");if(typeof s!="boolean")throw new Error("Param useVat must be a boolean");if(typeof o!="object"||o===null)throw new Error("Param rounding must be a object");if(typeof o.enabled>"u")throw new Error("Missing param rounding.enabled");if(typeof o.enabled!="boolean")throw new Error("Param rounding.enabled must be a boolean");if(typeof o.interval>"u")throw new Error("Missing param rounding.interval");if(typeof o.interval!="number")throw new Error("Param rounding.interval must be a number");if(typeof o.show>"u")throw new Error("Missing param rounding.show");if(typeof o.show!="boolean")throw new Error("Param rounding.show must be a boolean");const l={type:t,subTotal:0,taxAmount:0,roundingAmount:0,total:0,currency:e,maxTotal:t==="openAccMaxPrice"?n||0:null,region:{country:"sweden",houseWorkType:null,reverseVat:!!i.find(d=>Y(d,"region.reverseVat")),houseWorkManualAmount:a.houseWorkManualAmount||null,houseWorkWork:0,houseWorkAmount:a.houseWorkManualAmount||a.houseWorkAmount||null},helpers:{discount:0,isIndivid:!i.find(d=>d.type==="company"),noOfClients:i.length||1},useVat:s,rounding:{enabled:o.enabled,interval:o.interval,show:o.show}},c=d=>d/100;if(l.helpers.isIndivid&&!l.region.reverseVat){const d=[...r].sort((p,f)=>new Date(f.updatedAt).getTime()-new Date(p.updatedAt).getTime()).find(Sv);d&&!l.region.houseWorkType&&(l.region.houseWorkType=jO(d))}for(let d of r){d=pa(d);const{totalAmount:p,currency:f,priceType:h,discount:m,discountType:g}=d;let{vat:v}=d;s||(v=0),["fixed","approx"].includes(h)&&(l.currency=f,l.subTotal+=p,l.taxAmount+=p*c(v),l.helpers.discount+=g==="percentage"?p/((100-m/100)/100)-p:m,l.region.houseWorkType&&Sv(d)&&(l.region.houseWorkWork+=p*((100+v)/100)))}!l.helpers.isIndivid&&l.region.reverseVat&&(l.taxAmount=0),l.region.houseWorkType&&l.region.houseWorkAmount===null&&(l.region.houseWorkAmount=v$(l.region.houseWorkType,l.region.houseWorkWork,l.helpers.noOfClients));const u=l.subTotal+l.taxAmount-l.region.houseWorkAmount;return l.roundingAmount=o.enabled&&o.interval?Math.round(u/o.interval)*o.interval-u:0,l.total=u+l.roundingAmount,wv(l),l},toe=t=>{if(!t)return null;const{currency:e,clients:n=[],articles:r=[]}=t,i=Y(t,"data.packageGroups",{}),a=Y(t,"data.formSettings.useVat",!0),s={enabled:Y(t,"data.formSettings.rounding.enabled",!1),interval:Y(t,"data.formSettings.rounding.interval",1),show:Y(t,"data.formSettings.rounding.show",!0)},o=[],l=[];let c=null,u=null,d=null;if(Object.keys(i).forEach(m=>{const g=i[m].packages.filter(({isSelected:_})=>_);l.push(...g.map(({packageId:_})=>_));const v=Y(g,"[0].data.prices.type","fixed");o.push(...Array.isArray(v)?v:[v]),g.forEach(_=>{const{maxTotal:w=null,region:y}=Y(_,"data.prices")||{};v==="openAccMaxPrice"&&!Number.isNaN(Number.parseInt(w,10))&&(c+=w),y&&!Number.isNaN(Number.parseInt(y.houseWorkManualAmount,10))&&(u+=y.houseWorkManualAmount)})}),!o.length){const m=Y(t,"data.prices.type","fixed");o.push(...Array.isArray(m)?m:[m])}const p=r.filter(({packageId:m})=>!m||l.includes(m)),f=p.filter(Sv),h={};for(let m of f){m=pa(m);const g=jO(m),v=a?m.vat:0;h[g]||(h[g]=null),h[g]+=m.totalAmount*((100+v)/100)}for(const[m,g]of Object.entries(h))g&&(d+=v$(m,g,n.length||1));return{...Fd({currency:e,articles:p,clients:n,region:{country:"sweden",houseWorkManualAmount:u,houseWorkAmount:d},useVat:a,rounding:s}),type:o,maxTotal:c}},noe=t=>{const e=i=>te.t(`_common:documentMentions.${i}`),n=!!Y(t,"clients.0"),r={clientName:{key:"clients.0.name",meta:{inputDisabled:!n,virtual:!0}},clientEmail:{key:"clients.0.email",meta:{inputDisabled:!n,virtual:!0}},clientPhone:{key:"clients.0.cellphone",meta:{inputDisabled:!n,virtual:!0}},clientCompany:{key:"clients.0.companyName",meta:{inputDisabled:!n,virtual:!0}},clientAddress:{key:"clients.0.addresses.standard.street",meta:{inputDisabled:!n,virtual:!0}},clientZip:{key:"clients.0.addresses.standard.zip",meta:{inputDisabled:!n,virtual:!0}},clientCity:{key:"clients.0.addresses.standard.city",meta:{inputDisabled:!n,virtual:!0}},clientSocialNo:{key:"clients.0.socialNo",meta:{inputDisabled:!0,virtual:!0}},clientOrgNo:{key:"clients.0.orgNo",meta:{inputDisabled:!0,virtual:!0}},senderName:{key:"companyUser.fullName",meta:{inputDisabled:!0,virtual:!0}},senderEmail:{key:"companyUser.email",meta:{inputDisabled:!0,virtual:!0}},senderPhone:{key:"companyUser.cellphone",meta:{inputDisabled:!0,virtual:!0}},senderCompany:{key:"company.name",meta:{inputDisabled:!0,virtual:!0}},senderAddress:{key:"company.street",meta:{inputDisabled:!0,virtual:!0}},senderZip:{key:"company.zip",meta:{inputDisabled:!0,virtual:!0}},senderCity:{key:"company.city",meta:{inputDisabled:!0,virtual:!0}},documentName:{key:"data.name",meta:{inputDisabled:!1,virtual:!0}}};for(const i of Object.keys(r))r[i].label=e(i),r[i].value=Y(t,r[i].key)||"";return r},jl=t=>t?Object.keys(t).reduce((e,n)=>t[n]||t[n]===!1?{...e,[n]:t[n]}:e,{}):{},roe=t=>{if(!t)return null;let e=(t||"").replace(/^SE|[-]/g,"").trim();return e.length===12&&(e=e.substring(2)),`SE${e}01`},Qv=()=>{const t=["email"];return pr.checkFeature("sms")&&pr._isValidCompanySetting("deliveryDefaultSms")&&t.push("sms"),{region:{country:"sweden"},permissions:{write:["clients[*].socialNo","clients[0].region.propertyDesignation","data.rejectReasons","data.packageGroups[*].packages[*].isSelected"]},answer:null,deliveryTypes:t,documentRole:"signee",answerMethod:{accept:"signature",deny:"button"},signOrder:0,_uniqueId:Nn.exports()}},ey=(t,e)=>{const n={endCustomerId:t.id,type:t.customerType,name:t.customerType==="individual"?t.name:t.reference,socialNo:t.customerType==="individual"?t.org_no:null,companyName:t.customerType==="company"?t.name:null,orgNo:t.customerType==="company"?t.org_no:null,email:t.email,cellphone:t.cellphone,cellphoneRegion:t.cellphoneRegion,addresses:{...t.street||t.zip||t.city?{standard:{street:t.street,zip:`${t.zip||""}`,city:t.city,country:t.country,latitude:t.latitude?`${t.latitude}`:null,longitude:t.longitude?`${t.longitude}`:null}}:{},...t.workStreet||t.workZip||t.workCity?{work:{street:t.workStreet,zip:`${t.workZip||""}`,city:t.workCity,country:t.country,latitude:t.latitude?`${t.latitude}`:null,longitude:t.longitude?`${t.longitude}`:null}}:{}},vatNumber:t.vatNumber,region:{...e&&e.region,reverseVat:t.reverseVat&&t.customerType==="company"},documentRole:Y(e,"documentRole","signee"),signOrder:Y(e,"signOrder",0)};return{...Qv(),...e,...n}},ty=(t={})=>{const e=t,n=Y(e,"addresses.standard",{}),r=Y(e,"addresses.work",{});return{id:e.endCustomerId,EndCustomerId:e.endCustomerId,customerType:e.type||"individual",name:e.type==="individual"?e.name:e.companyName,email:e.email,cellphone:e.cellphone,cellphoneRegion:e.cellphoneRegion,org_no:e.type==="individual"?e.socialNo:e.orgNo,street:n.street,zip:n.zip,city:n.city,workStreet:r.street,workZip:r.zip,workCity:r.city,vatNumber:e.vatNumber||roe(e.orgNo)||"",separateWorkAddress:!!Object.keys(r).length,reverseVat:Y(e,"region.reverseVat",!1),longitude:Y(e,"addresses[0].longitude",null),latitude:Y(e,"addresses[0].latitude",null),reference:e.type==="company"?e.name:null}},ioe=({background:t,backgroundFilter:e,priceSummaryBackground:n,showPriceSummary:r})=>({resourceUrl:t,overlayColor:e,backgroundColor:n,showPriceSummary:r}),aoe=({header:t={},theme:e={}})=>{const{resourceUrl:n="",title:r="",backgroundColor:i="",overlayColor:a="",showPriceSummary:s}={...ioe(e),...t};return{layout:"price",baseStyle:{textColor:"",textAlign:"left"},items:[{type:"content",size:50,media:{type:"color",backgroundColor:i},value:{preText:"",documentName:r?`<h1>${r}</h1>`:"",postText:"",showLogo:!0,logotype:""}},{type:"media",size:50,media:{type:"image",resourceUrl:n,overlay:!0,overlayColor:a}}],...typeof s=="boolean"&&{showPriceSummary:s}}},soe=(t,e={})=>(!t||!t.data||Y(t,"template.views.read.nodes",[]).filter(r=>r.itemType==="header"&&!!r.value.header).map(r=>r.value.header.substring(5)).forEach(r=>{if(t.data[r]&&t.data[r].layout==="legacy"){const i={...e,...jl(t.data.theme)};t.data[r]=aoe({header:{...t.data[r],title:Y(t,"data.name","")},theme:i})}}),t),ooe={isHouseWorkAuto:!0,rotAmount:null,rutAmount:null,persons:[],propertyType:null,realEstateId:null,condominiumId:null,condominiumOrgNo:null,isExported:!1,isProcessed:!1},Ul={id:{$default:null,$type:Number,$scope:["invoice"]},publicId:{$default:null,$type:String},status:{$default:"draft",$type:String,$scope:["invoice"]},subStatus:{$default:null,$type:String},type:{$default:"invoice",$type:String,$scope:["invoice"]},invoiceNumber:{$default:null,$type:String,$scope:["invoice"]},ocr:{$default:null,$type:Number},ourReference:{$default:null,$type:String,$scope:["invoice"]},yourReference:{$default:null,$type:String,$scope:["invoice"]},invoiceDate:{$default:fO(new Date).toISOString(),$type:Date,$scope:["invoice"]},dueDays:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"dueDays",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceDueDays")||null}}]},dueDate:{$default:null,$type:Date,$scope:["invoice"],$virtual:[{name:"dueDate",set(t,{getters:e}){if(t!==null)return t;const n=e["settings/getInvoiceSetting"]("invoiceDueDays")||1;return ud($te(di(Ul.invoiceDate.$default),n)).toISOString()}}]},deliveryDate:{$default:null,$type:Date,$scope:["invoice"]},sentAt:{$default:null,$type:Date},attestedAt:{$default:null,$type:Date},disputedAt:{$default:null,$type:Date},salesRequestedAt:{$default:null,$type:Date},pausedAt:{$default:null,$type:Date},interestType:{$default:"noInterest",$type:String,$scope:["invoice"],$virtual:[{name:"interestType",set(t,{getters:e}){return e["settings/getInvoiceSetting"]("invoiceInterestPercentage")?"fixed":"noInterest"}}]},interestPercentage:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"interestPercentage",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceInterestPercentage")||null}}]},interestStartInDaysAfterDueDate:{$default:0,$type:Number,$scope:["invoice"]},invoiceFee:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"invoiceFee",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceFee")||null}}]},reminderFee:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"reminderFee",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceReminderFee")||null}}]},deliveryTypes:{$default:["email"],$type:Array,$scope:["invoice"]},totalAmount:{$default:0,$type:Number},remainingAmount:{$default:0,$type:Number},paidAmount:{$default:0,$type:Number},creditedAmount:{$default:0,$type:Number},writeOffAmount:{$default:0,$type:Number},reminderAmount:{$default:0,$type:Number},totalVatAmount:{$default:0,$type:Number},centRoundingAmount:{$default:0,$type:Number},transferAmount:{$default:0,$type:Number},currency:{$default:"SEK",$type:String},partnerPdfId:{$default:null,$type:String},ModuleArticles:{$default:[],$type:Array,$scope:["invoice"]},ModuleEndCustomer:{$default:null,$type:Object,$scope:["invoice"]},ModuleBranding:{$scope:["invoice"],$type:Object,$default:{message:null,useMessageEmail:!0}},InvoiceFiles:{$scope:["invoice"],$type:Array,$default:[]},InvoiceRegionSweden:{$default:ooe,$type:Object,$scope:["invoice"]},ModuleScheduledDeliveries:{$scope:["invoice"],$type:Array,$default:[{type:"viewed",sendDays:null,sendType:"email",sendAt:null,status:"new"}],$virtual:[{name:"ModuleScheduledDeliveries",set(t,{getters:e}){return this.type==="credit"?[]:e["settings/getCompanySetting"]("invoiceReminderActive")?t.map(i=>{const a=i;if(a.sendDays!==null)return a;let s=null;return a.type==="viewed"&&(s=e["settings/getCompanySetting"]("invoiceReminderDefaultViewedDays")),s!==null&&(a.sendDays=s),a}):[]}}]},CompanyId:{$default:null,$type:"ref",$ref:"companies",$scope:["invoice"]},CompanyUserId:{$default:null,$type:"ref",$ref:"companyUsers",$scope:["invoice"]},creditsInvoiceId:{$default:null,$type:"ref",$ref:"invoices",$scope:["invoice"]},object:{$default:null,$type:String,$scope:["invoice"]},objectId:{$default:null,$type:Number,$scope:["invoice"]},documentId:{$default:null,$type:String,$scope:["invoice"]},projectId:{$default:null,$type:Number,$scope:["invoice"]},createdAt:{$default:null,$type:Date},updatedAt:{$default:null,$type:Date},deletedAt:{$default:null,$type:Date}};class ny{constructor(e,n){if(!e)throw Error("Missing argument invoice");if(!n)throw Error("Missing argument getters");this._getters=n,this._invoice=e}get id(){return this.getProperty("id")||null}get publicId(){return this.getProperty("publicId")||null}get pdfPath(){if(this.status==="draft"||this.isSale)return null;const e=this.latestReminder;if(e){const{id:n}=e;return`${re.api.baseUrl}/public/invoice/${this.publicId}/pdf/reminder/${n}`}return`${re.api.baseUrl}/public/invoice/${this.publicId}/pdf`}getCompany(){const{_getters:e}=this,n=this.getProperty("CompanyId")||{};return e["companies/companyById"](n)}getCompanyUser(){const{_getters:e}=this,n=this.getProperty("CompanyUserId")||{};return e["companyUsers/byId"](n)}get status(){return this.getProperty("status")}get visualStatus(){return this.getProperty("transferAmount")?"paying":this.status}get subStatus(){return this.getProperty("subStatus")}get type(){return this.getProperty("type")}get projectId(){return this.getProperty("projectId")||null}get document(){return this.documentId?this._getters["documents2/byId"](this.documentId):null}get documentId(){return this.getProperty("documentId")}get client(){return this.getProperty("ModuleEndCustomer")||null}get files(){return this.getProperty("InvoiceFiles")}get totalAmount(){return this.getProperty("totalAmount")}get totalVatAmount(){return this.getProperty("totalVatAmount")}get totalExVat(){return this.totalAmount-this.totalVatAmount}get paidAmount(){return this.getProperty("paidAmount")}get sentAt(){return this.getProperty("sentAt")}get dueDate(){const e=this.latestReminder;return e?e.dueDate:this.getProperty("dueDate")}get invoiceDate(){const e=this.latestReminder;return e?e.invoiceDate:this.getProperty("invoiceDate")}get invoiceNumber(){return this.getProperty("invoiceNumber")}get reminders(){return this.getProperty("InvoiceReminders")||[]}get latestReminder(){const e=this.reminders;return e.length?e[e.length-1]:null}get canDispute(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)&&!this.isDisputed}get canRegisterPayment(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)}get canRegisterWriteOff(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)}get canSendReminder(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)}get canCredit(){const e=this.getProperty("id"),n=this.getProperty("type")==="credit";return e&&this.isAttested&&!n&&!["draft","salesRequest"].includes(this.status)}get canSell(){return this.id&&!this.isAttested&&!["salesRequest"].includes(this.status)}get canCancelSell(){return this.id&&this.isAttested&&["salesRequest"].includes(this.status)}get creditsInvoice(){const{_getters:e}=this,n=this.getProperty("creditsInvoice")||null;return e["invoices/byId"](n)}get creditInvoices(){const{_getters:e}=this;return(this.getProperty("creditInvoices")||[]).map(i=>e["invoices/byId"](i))}get interestInvoiceTo(){const{_getters:e}=this,n=this.getProperty("interestForInvoiceId")||null;return e["invoices/byId"](n)}get interestInvoices(){const{_getters:e}=this;return(this.getProperty("interestInvoices")||[]).map(i=>e["invoices/byId"](i))}get isDisputed(){return!!this.getProperty("disputedAt")}get isAttested(){return!!this.getProperty("attestedAt")}get isReverseVat(){const e=this.getProperty("ModuleEndCustomer")||null;return e?e.reverseVat:!1}get events(){const e=this.getProperty("Events")||[],n=[];return e.forEach(r=>{const i={type:r.type};r.EventData.forEach(a=>{i[a.name]=a.value}),n.push({name:r.code==="sentSms"?"sent":r.code,timestamp:r.createdAt,data:i,counter:r.counter})}),n}get articles(){return pa(this.getProperty("ModuleArticles")||[])}get totalNetAmount(){const{articles:e}=this;return e.reduce((r,i)=>r+i.totalAmount,0)}get currency(){return"SEK"}get invoiceRegionSweden(){return this.getProperty("InvoiceRegionSweden")||{}}get rotAmount(){const e=this.getProperty("InvoiceRegionSweden")||{},{rotAmount:n}=e;return n||0}get rutAmount(){const e=this.getProperty("InvoiceRegionSweden")||{},{rutAmount:n}=e;return n||0}get invoiceFee(){return this.getProperty("invoiceFee")||0}get isSale(){return!!(["salesRequest","sold"].includes(this.status)||this.getProperty("salesRequestAcceptedAt"))}getScheduledDeliveries({type:e,status:n}={}){let r=this.getProperty("ModuleScheduledDeliveries")||null;return!r||!r.length?[]:(e&&(r=r.filter(i=>i.type===e)),n&&(r=r.filter(i=>i.status===n)),r)}getProperty(e=""){return e.replace(/\[(.*)\]/ig,(i,a)=>`.${a}`).split(".").reduce((i,a)=>i&&(typeof i[a]!="object",i[a]),this._invoice)}getProperties({scope:e=null,includeVirtual:n=!1}={}){const r=Ul,{_getters:i}=this;return pse({schema:r,getters:i,data:this._invoice,scope:e,includeVirtual:n,instance:this})}getVirtualProperties({scope:e=null}={}){const n=Ul,{_getters:r}=this;return VA({schema:n,getters:r,data:this._invoice,scope:e,instance:this})}}at(ny,"schema",Ul);const{DO_LOAD_INVOICE:y$,DO_UPDATE_INVOICE:loe,DO_CREATE_INVOICE:coe,DO_ATTEST_INVOICE:uoe,DO_SELL_INVOICE:doe,LOAD_FILE:poe,FORM_CLEAR_FORM:foe,FORM_RESET_OLD:hoe,DO_LOAD_DOCUMENT2:_$,UPDATE_VIEW_SETTINGS:moe,LOAD_INVOICE_SETTINGS:goe}=ce,{SET_FORM:Vl,SET_FORM_VALUE:voe}=pe.forms,{DELETE_MANY_INVOICES:yoe}=pe.invoices,{LOAD_INVOICE_FORM:_oe,LOAD_CREDIT_INVOICE_FORM:boe,LOAD_DOCUMENT2_INVOICE_FORM:Eoe,LOAD_CAMPAIGN_INVOICE_FORM:Toe,SUBMIT_INVOICE_FORM:woe,SET_KYC_FORM:Soe,DO_SAVE_KYC_FORM:koe}=XO,Ei=(t,e)=>{t(moe,{view:"newInvoice",settings:{isLoading:e}})};async function ry({id:t=null,rootState:e,state:n,rootGetters:r,dispatch:i,projectId:a=null,documentId:s=null}){if(!e)throw new Error("Missing parameter rootState");if(!n)throw new Error("Missing parameter state");if(!r)throw new Error("Missing parameter rootGetters");if(!i)throw new Error("Missing parameter dispatch");let o=!1;const l=n.document;if(Object.keys(l).length!==0){const{name:c,params:u}=e.route||{};let{id:d}=u||{};d=Number.parseInt(d,10);const p=r["forms/documentField"]("id"),f=r["forms/documentField"]("documentType"),h=r["forms/documentField"]("type"),m=r["forms/documentField"]("projectId"),g=r["forms/documentField"]("documentId");if(f||(c==="invoiceNew"?!p&&!t&&h!=="credit"&&a===m&&(Ke.debug("INVOICE_FORM: Using existing store data as no ids was found"),o=!0):c==="invoiceEdit"?p&&p===d&&p===t&&h!=="credit"&&(Ke.debug("INVOICE_FORM: Using existing store data existing id match route"),o=!0):c==="invoiceCredit"?h==="credit"&&!t&&!p&&(Ke.debug("INVOICE_FORM: Using existing store data existing id match route"),o=!0):c==="invoiceDocument"&&g&&g===s&&(Ke.debug("INVOICE_FORM: Using existing store data as existing documentId match"),o=!0)),o){Ke.debug("INVOICE_FORM: Dont reload as forms/document is already defined");const v=r["forms/documentField"]("InvoiceFiles");v&&De(v)==="array"&&v.forEach(_=>i(poe,{id:_.FileId},{root:!0}))}}return o}function Bl({rootState:t,rootGetters:e},n={}){const r=new ny(n,e).getProperties({includeVirtual:!0}),i={ModuleArticles:[e["articles/getNewArticle"]({name:"",price:0})]};return{...r,...i,CompanyId:t.application.user.companyId,CompanyUserId:t.application.user.userId}}const Coe={async[boe]({state:t,rootGetters:e,rootState:n,dispatch:r},{creditsInvoiceId:i}){try{if(Ei(this.dispatch,!0),await ry({id:null,rootState:n,state:t,rootGetters:e,dispatch:r}))return;let s=Bl({rootState:this.state,rootGetters:e},{type:"credit"});if(!i)throw new Error("Missing parameter creditsInvoiceId");await this.dispatch(y$,{id:i});const o=this.getters["invoices/byId"](i);if(!o)throw Ke.event({type:"invoiceCredit",status:"failed",data:{id:i},error:"Tried to load invoice to credit that does not exist!"}),new Error(`Could not find original invoice by id: '${i}'`);o.documentId&&!this.getters["documents2/byId"](o.documentId)&&await this.dispatch(_$,{id:o.documentId});const l=Dr(o.getProperties({scope:"invoice",includeVirtual:!0}),["ModuleArticles","ModuleBranding","ourReference","yourReference","invoiceFee","deliveryTypes","ModuleEndCustomer","InvoiceRegionSweden","object","objectId","documentId","projectId"]);s={...s,...l,type:"credit",creditsInvoiceId:i,invoiceDate:ud(new Date).toISOString(),dueDate:ud(new Date).toISOString()},s.invoiceFee&&(s.invoiceFee=-s.invoiceFee),s.ModuleArticles&&(s.ModuleArticles=s.ModuleArticles.map(c=>{const u=hi(c,["id","createdAt","updatedAt","deletedAt","object","ObjectId"]);return u.price=-u.price,u.houseWorkHoursToReport&&(u.houseWorkHoursToReport*=-1),u})),s.ModuleBranding&&(s.ModuleBranding=hi(s.ModuleBranding,["id","createdAt","updatedAt","deletedAt","object","ObjectId"])),s.ModuleEndCustomer&&(s.ModuleEndCustomer=hi(s.ModuleEndCustomer,["id","createdAt","updatedAt","deletedAt","object","ObjectId"])),s.InvoiceRegionSweden&&(s.InvoiceRegionSweden=Dr(s.InvoiceRegionSweden,["condominiumId","condominiumOrgNo","isHouseWorkAuto","persons","propertyType","realEstateId"]),s.InvoiceRegionSweden&&!s.InvoiceRegionSweden.isHouseWorkAuto&&(s.InvoiceRegionSweden.persons=(s.InvoiceRegionSweden.persons||[]).map(c=>({...c,amount:-c.amount})))),this.commit(`forms/${Vl}`,{key:"document",formData:s}),Ke.event({type:"invoiceCredit",status:"success",data:{id:i}}),Ke.debug("Credit invoice form loaded")}catch(a){this.handleError(a)}finally{Ei(this.dispatch,!1)}},async[Eoe]({state:t,rootGetters:e,rootState:n,dispatch:r},{docId:i}){try{if(!i)throw new Error("Missing parameter docId");Ei(this.dispatch,!0);let a=Bl({rootState:this.state,rootGetters:e});await this.dispatch(_$,{id:i});const s=this.getters["documents2/byId"](i);if(!s)throw new Error("Missing document");const{projectId:o}=s;if(await ry({id:null,rootState:n,state:t,rootGetters:e,dispatch:r,documentId:i,projectId:o}))return;a={...a,documentId:s.id,...o&&{projectId:o}},s.clients&&s.clients.length&&(a.ModuleEndCustomer=ty(hi(s.clients[0],["id","createdAt","updatedAt","deletedAt","object","ObjectId"]))),this.commit(`forms/${Vl}`,{key:"document",formData:a})}catch(a){this.handleError(a)}finally{Ei(this.dispatch,!1)}},async[_oe]({state:t,rootState:e,dispatch:n,rootGetters:r},{id:i=null,projectId:a=null}={}){try{if(Ei(this.dispatch,!0),await ry({id:i,rootState:e,state:t,rootGetters:r,dispatch:n,projectId:a}))return;let o={},l;if(i){if(await this.dispatch(y$,{id:i}),l=this.getters["invoices/byId"](i),!l)throw Ke.event({type:"editInvoice",status:"failed",data:{id:i},error:"Tried to edit invoice that does not exist!"}),new Error(`Could not find invoice by id: '${i}'`);o={...o,...l.getProperties({scope:"invoice"})}}else if(o={...Bl({rootState:this.state,rootGetters:r})},a){o.projectId=a;const d=r["projects/byId"](a);d&&d.clients[0]&&(o.ModuleEndCustomer=ty(hi(d.clients[0],["id","createdAt","updatedAt","deletedAt","object","ObjectId"])))}const{object:c,objectId:u}=o;this.commit(`forms/${Vl}`,{key:"document",formData:o}),Ke.event({type:i?"editInvoice":"newInvoice",status:"success",data:{id:i}}),Ke.debug("Invoice form loaded")}catch(s){Ke.event({type:i?"editInvoice":"newInvoice",status:"failed",data:{id:i},error:s})}finally{Ei(this.dispatch,!1)}},async[woe]({getters:t,commit:e},{next:n=null,doAttest:r=!1,doSell:i=!1}={}){let a=!1;try{let s=!1,o;const{invoice:l,hasChanged:c}=t,u=t.getInvoicePrices;let{id:d}=l;n==="invoice"&&(o={...l.getProperties(),ModuleArticles:l.articles,...u,id:0},this.dispatch(ma,{data:[o],schema:"invoices"}),a=!0,this.$router.push({name:"invoice",params:{id:o.id,modal:!1}}));const p={...l.getProperties(),...u};return c("document")&&(d?await this.dispatch(loe,{id:d,body:p}):(s=!0,d=await this.dispatch(coe,{body:p}),e(voe,{key:"document.id",value:d}))),a&&this.$router.replace({name:"invoice",params:{id:d,modal:!1}}),i?await this.dispatch(doe,{id:d}):r&&await this.dispatch(uoe,{id:d}),await this.dispatch(hoe,"document"),a||BA({next:n,invoiceId:d},this.$router),await this.dispatch(foe,{key:"document"}),a&&this.commit(`invoices/${yoe}`,o.id),{id:d,isNew:s}}catch(s){return this.handleError(s),a&&this.$router.currentRoute.name!=="invoiceNew"&&this.$router.go(-1),null}},async[Toe]({state:t,rootGetters:e},{name:n=null}){if(!["100kr"].includes(n))throw Error("Missing valid param name");try{Ei(this.dispatch,!0);let i={...Bl({rootState:this.state,rootGetters:e})};if(n==="100kr"){let a;const{data:s}=await sie("info@cling.se");s[0]?([a]=s,a.EndCustomerId=a.id):(await this.dispatch(ce.FORM_NEW_ENDCUSTOMER),a=Object.assign(t.endCustomer,{name:"Cling Group AB",org_no:"559070-0273",email:"info@cling.se",customerType:"company",cellphone:"0850119885",street:"Kund-id WIN3890, FE nr 160",zip:"10569",city:"Stockholm"}),this.commit(ce.SET_FORM_VALUE,{key:"endCustomer",value:a}),a.EndCustomerId=await this.dispatch(ce.FORM_SUBMIT_ENDCUSTOMER,{showNotification:!1})),a.id=null,i={...Bl({rootState:this.state,rootGetters:e}),ModuleEndCustomer:{...a},ModuleArticles:[ure({name:"\u{1F4B0} Ge mig 100kr! \u{1F4B0}",price:1e4})]}}this.commit(`forms/${Vl}`,{key:"document",formData:i}),Ke.event({type:"campaignInvoice",status:"success",data:{name:n}}),Ke.debug("Invoice form loaded")}catch(i){Ke.event({type:"campaignInvoice",status:"failed",data:{name:n},error:i})}finally{Ei(this.dispatch,!1)}},async[Soe]({rootGetters:t},{formData:e={}}={}){await this.dispatch(goe),t["application/company"],t["settings/allInvoiceSettings"];let n={};n={...n,...e,company:{...n.company,...e.company},contact:{...n.contact,...e.contact}},this.commit(`forms/${Vl}`,{key:"kycForm",formData:n})},async[koe]({getters:t}){const{kycForm:e}=t||{};if(!e)throw Error("Kyc Form missing in store");return["ownersWithMoreThan25Percent","beneficialOwners"].forEach(r=>{e[r]=(e[r]||[]).map(i=>({...i,address:i.address||"Sverige",country:i.country||"Sverige"}))}),await yie.post({form:e})}},{SET_FORM_VALUE:Ooe,REMOVE_FORM_VALUE:Aoe}=pe.forms,$oe={async[ur.SET_FORM_ARTICLE]({commit:t},{index:e=null,data:n}){let r="document.ModuleArticles";e!==null&&(r=`document.ModuleArticles[${e}]`);const i=pa(n);return t(Ooe,{key:r,value:i})},async[ur.REMOVE_FORM_ARTICLE]({commit:t},e){return t(Aoe,e)}},Hl=t=>typeof t=="object"&&t!==null&&t.toString()==={}.toString(),jd=t=>JSON.parse(JSON.stringify(t)),iy=(t,e)=>{t=jd(t);for(const n in e)e.hasOwnProperty(n)&&(Hl(t[n])&&Hl(e[n])?t[n]=iy(t[n],e[n]):t[n]=e[n]);return t},b$=(t,e)=>{t=t.replace(/^#\/definitions\//,"").split("/");const n=(i,a)=>{const s=i.shift();if(a[s]){if(!i.length)return a[s]}else return{};return n(t,a[s])},r=n(t,e);return Hl(r)?jd(r):r},xoe=(t,e)=>{const{length:n}=t;let r=-1,i={};for(;++r<n;){let a=t[r];a=typeof a.$ref<"u"?b$(a.$ref,e):a,i=iy(i,a)}return i},Ys=(t,e)=>{if(typeof t.default<"u")return t.default;if(typeof t.allOf<"u"){const n=xoe(t.allOf,e);return Ys(n,e)}else if(typeof t.$ref<"u"){const n=b$(t.$ref,e);return Ys(n,e)}else if(t.type==="object"){if(!t.properties)return{};for(const n in t.properties)t.properties.hasOwnProperty(n)&&(t.properties[n]=Ys(t.properties[n],e),(typeof t.properties[n]>"u"||Hl(t.properties[n])&&!Array.isArray(t.properties[n])&&!Object.keys(t.properties[n]).length)&&delete t.properties[n]);return t.properties}else if(t.type==="array"){if(!t.items)return[];const n=t.minItems||0;if(t.items.constructor===Array){const a=t.items.map(s=>Ys(s,e));for(let s=a.length-1;s>=0&&!(typeof a[s]<"u");s--)s+1>n&&a.pop();return a}const r=Ys(t.items,e);if(typeof r>"u")return[];const i=[];for(let a=0;a<Math.max(1,n);a++)i.push(jd(r));return i}},Ioe=(t,e)=>(typeof e>"u"?e=t.definitions||{}:Hl(t.definitions)&&(e=iy(e,t.definitions)),Ys(jd(t),e));class Ti{constructor(e){if(!e)throw new Error("Missing param data");const{validationSchema:n,views:r}=e;if(!n)throw new Error("Missing param validationSchema in template data");if(!r)throw new Error("Missing param views in template data");this._data=e}get data(){return this._data}get id(){return this.data.id||null}get companyId(){return this.data.companyId||null}get name(){return this.data.name||null}get isNew(){return!this.id}get validationSchema(){return this.data.validationSchema}get views(){return this.data.views||{}}get language(){return this.data.language}get theme(){return Y(this,"_data.validationSchema.properties.data.properties.theme.default",{})||{}}get thumbnailUrl(){return this.data.thumbnailUrl}get defaultMedia(){if(this.thumbnailUrl)return{type:"image",resourceUrl:this.thumbnailUrl};const{defaultData:e}=this,n=(Y(this,"_data.views.read.nodes")||[]).filter(i=>["header","coverBlock"].includes(i.itemType));let r=null;for(const i of n)if(i){if(r)break;let a=i.value[i.itemType];if(!a)continue;if(i.itemType==="header"){a+=".items";const s=(Y(e,a)||[]).find(({type:o})=>o==="media");s&&s.media&&({media:r}=s)}else if(i.itemType==="coverBlock"){const{type:s,cover:o}=Y(e,a)||{};o&&(r={...s&&{type:s},...o})}}if(!r){const i=Y(this,"theme.background");i&&(r={type:"image",resourceUrl:i})}return r}get reminders(){const e=this.getDefaultData({path:"properties.data.properties.reminders"});return e&&Array.isArray(e)?e:[]}get defaultData(){return this.getDefaultData()}get categoryTags(){return Y(this.defaultData,"tags",[]).reduce((e,n)=>[...e,n.name],[])}get type(){return this.categoryTags[0]}getDefaultData({path:e=""}={}){let n=this.validationSchema;return e&&(n=e.split(".").reduce((r,i)=>r[i],n)),Ioe(n)||{}}}const Poe=re.brand.charAt(0).toUpperCase()+re.brand.slice(1),Doe={accept:"acceptera",address:"adress",and:"and",answerFeedback:{intermediate:{title:"Tack f\xF6r att du delar dina tankar."},no:{start:{action:"Skicka in",placeholder:"Vad b\xF6r vi f\xF6rb\xE4ttra?",text:"Finns det n\xE5got specifikt du \xF6nskar vi b\xF6r f\xF6rb\xE4ttra?",title:"Tack f\xF6r att du delar med dig av dina tankar."},success:{action:"L\xE4s mer om $t(appBrand)",secondary:"Tillbaka till dokumentet",text:"Din feedback togs emot helt perfekt. V\xE5rt team kommer att ta del av din feedback med stor lyh\xF6rdhet.",title:"Tack."}},start:{no:"Nej",title:"Tyckte du om att anv\xE4nda $t(appBrand) f\xF6r att visa det h\xE4r dokumentet?",yes:"Ja"},yes:{action:"S\xE4tt ig\xE5ng gratis",secondary:"L\xE4s mer om $t(appBrand)",text:"Skapa och skicka snygga dokument med $t(appBrand). Uppt\xE4ck alla f\xF6rdelar med att skicka webbaserade dokument med e-signering.",title:"B\xF6rja anv\xE4nda $t(appBrand) du med."}},answerModal:{answerSuccess:"Ditt svar togs emot helt perfekt.",bankId:{component:{defaultError:"N\xE5got gick fel. Se till att du har matat in r\xE4tt personnummer och f\xF6rs\xF6k igen.",signingInterrupted:"Signeringen avbr\xF6ts, f\xF6rs\xF6k igen...",validations:{socialNo:{personalNumber:"Personnumret \xE4r inte giltigt",required:"Skriv in ditt personnummer"}},viewText:{canceled:{text:"Signeringen avbr\xF6ts. Var god och f\xF6rs\xF6k igen.",title:"Signeringen avbr\xF6ts"},error:{text:"Ett fel intr\xE4ffa. Var god och f\xF6rs\xF6k igen.",title:"Ett fel intr\xE4ffa"},form:{text:"Skriv in ditt personnummer f\xF6r att p\xE5b\xF6rja signeringen.",title:"Signera dokumentet med BankID"},new:{spinnerText:"\xD6ppna BankID p\xE5 din enhet.",text:"\xD6ppna BankID p\xE5 din enhet f\xF6r att signera dokumentet.",title:"Signera dokument"},signing:{spinnerText:"Var god signera dokumentet.",text:"\xD6ppna BankID p\xE5 din enhet f\xF6r att signera dokumentet.",title:"Signering p\xE5g\xE5r"},waiting:{spinnerText:"V\xE4ntar p\xE5 att du ska \xF6ppna BankID.",text:"\xD6ppna BankID p\xE5 din enhet f\xF6r att signera dokumentet.",title:"Signera dokument"}}},start:{action:"Signera med BankID",text:"Acceptera och signera dokumentet med BankID.",title:"Signera med BankID"},success:{text:"$t(answerModal.successText)",textFallback:"$t(answerModal.successTextFallback)",title:"$t(answerModal.successTitle)"}},decline:{component:{inputPlaceholder:"Frivilligt. L\xE4mna en kommentar om varf\xF6r du v\xE4ljer att neka."},start:{action:"Neka",text:"F\xF6r att neka dokumentet var god och bekr\xE4fta genom att klicka p\xE5 knappen nedanf\xF6r.",title:"Neka dokumentet"},success:{text:"Tack f\xF6r att du l\xE4mna ett svar.",title:"Du har nekat dokumentet."}},signature:{component:{draw:{canvasLabel:"Rita signatur",tab:"Rita"},subTitle:"Hur vill du signera?",terms:"Genom att signera dokumentet godk\xE4nner jag att den elektroniska signaturen \xE4r en representation av min handskrivna signatur och att den \xE4r lika giltig.",text:{canvasLabel:"F\xF6rhandsgranskning",nameLabel:"Signerad av",namePlaceholder:"Skriv ditt namn",tab:"Skriv"}},start:{action:"Signera & acceptera",text:"",title:"Acceptera dokumentet"},success:{text:"$t(answerModal.successText)",textFallback:"$t(answerModal.successTextFallback)",title:"$t(answerModal.successTitle)"}},versionError:{accept:{title:"Gick inte att signera dokumentet"},decline:{title:"Gick inte att neka dokumentet"},text:"Dokumentet har modifierats medan du har l\xE4st den. V\xE4nligen ladda om och ta del av det nya dokumentet f\xF6r att l\xE4mna svar.",btn:"Ladda om"},successText:"N\xE4r dokumentet har blivit signerat av alla parter kommer du f\xE5 en kopia skickat till din e-post {{email}} med en l\xE5st version av dokumentet.",successTextFallback:"N\xE4r dokumentet har blivit signerat av alla parter kommer du p\xE5 den h\xE4r webbsidan kunna ladda ner en l\xE5st version av dokumentet.",successTextFallbackSingle:"Dokumentet \xE4r nu signerat och komplett.",successTextSingle:"En bekr\xE4ftelse har skickats till e-posten {{email}} med en l\xE5st version av dokumentet.",successTitle:"Du har signerat dokumentet."},appBrand:Poe,approved:"godk\xE4nt",approx:"ca",cancel:"Avbryt",chapters:{answerButtons:{approveDescription:"Vi har meddelat {{- sender}} att dokumentet \xE4r godk\xE4nt.",approveTitle:"Dokumentet \xE4r godk\xE4nt!",denyDescription:"Vi har meddelat {{- sender}} att du inte \xE4r intresserad.",denyTitle:"Dokumentet \xE4r nekat",editPropDes:"Redigera fastighetsbeteckning",enterPropDes:"Ange fastighetsbeteckning",inPersonSignatureHint:"Du har blivit markerad f\xF6r att skriva under en fysisk kopia av detta dokument. Om du ist\xE4llet vill skriva under digitalt, kontakta",waitingDescription:"V\xE4ntar p\xE5 {{remaining}} st fler ska l\xE4mna svar.",youHave:"Du har "},articleItem:{eligibleForDeduction:"Ber\xE4ttigad f\xF6r {{type,deepNested:deduction}}-avdrag"},articleList:{changeShowVatTooltip:"\xC4ndra till att visa {{type}}",title:"Arbetsmoment / varor"},packageGroup:{errorCallout:"V\xE4lj minst ett alternativ",selectableOptions:"Valbara alternativ"},packageItem:{add:"L\xE4gg till paket",select:"V\xE4lj paket",selected:"Valt paket"},parties:{allRiskAndLiability:"Har allrisk- och ansvarsf\xF6rs\xE4kring",fTax:"Har F-skatt"},pricingSummary:{blocks:{approx:"Ungef\xE4rligt pris",deductionSubValue:"Totalpris utan avdrag {{price}}",maxPrice:"Maxpris",maxPriceVat:"Maxpris {{vat}}",net:"Netto",price:"Pris",rounding:"\xD6resavrundning",subTitleArticles:"Varav varor / moment med fast pris",summary:"Sammanst\xE4llning",total:"Total",typeDeduction:"Efter {{type,deepNested:deduction}}-avdrag"},placeholder:{description:"V\xE4lj vilket paket som passar dig b\xE4st genom att klicka p\xE5 ",descriptionBold:"V\xE4lj-knappen",title:"V\xE4lj ett paket"},terms:{houseWork:"Totalpriset efter skattereduktion f\xF6ruts\xE4tter att arbetet kvalificerar f\xF6r skattereduktion, att best\xE4llaren har det angivna utrymmet f\xF6r skattereduktion samt att det inte redan har utnyttjats f\xF6r annat arbete. Best\xE4llaren ansvarar sj\xE4lv f\xF6r att kontrollera dess uppgifter.",houseWorkApprox:"Priset f\xF6r arbetet \xE4r ungef\xE4rligt. T\xE4nk p\xE5 att priset kan skilja sig med 15%. Om det g\xE4ller markarbeten rivningsarbeten eller lik. kan priset skilja sig med 25%. L\xE4s mer om detta i de allm\xE4nna best\xE4mmelserna.",reverseVat:"Notera att omv\xE4nd skattskyldighet g\xE4ller."}},termsDisclaimer:{description:"Genom att godk\xE4nna dokumentet accepterar du de ",termsAndConditions:"allm\xE4nna villkoren",title:"Villkor"}},close:"St\xE4ng",company:"f\xF6retag",deduction:xl.deduction,denied:"nekat",deny:"Neka",denyModal:{denyButton:"Neka dokument",helpfulInformation:"Vi meddelar {{- senderName}} p\xE5 {{- senderCompany}} att du har valt att neka dokumentet.",otherPlaceholder:"Frivilligt. L\xE4mna en kommentar om varf\xF6r du v\xE4ljer att neka dokumentet.",subTitle:"Bekr\xE4fta ditt svar genom att klicka p\xE5 Neka.",successTitle:"Du har nekat dokumentet",thanksAnswer:"Tack f\xF6r ditt svar!",title:"Neka dokument"},detail_plural:"detaljer",document:"Dokument",document_plural:"Dokument",documentDetails:{subTitle:"Information om dokumentet."},documentTemplateView:{emailTemplate:{expires:{content:"$t(documentTemplateView.reminder) $t(documentTemplateView.emailTemplate.first.content)",subject:"$t(documentTemplateView.reminder) $t(documentTemplateView.sharedSubject)",text:`$t(documentTemplateView.emailTemplate.expires.title) $t(documentTemplateView.emailTemplate.expires.subject). $t(documentTemplateView.readMoreAndReply)
|
|
354
354
|
|
|
355
355
|
{{docLink}}`,title:"$t(documentTemplateView.emailTemplate.first.title)"},first:{content:"Du har f\xE5tt ett dokument fr\xE5n {{company.name}}. Klicka p\xE5 knappen f\xF6r att l\xE4sa mer och l\xE4mna ett svar.",subject:"$t(documentTemplateView.sharedSubject)",text:`$t(documentTemplateView.emailTemplate.first.title) $t(documentTemplateView.emailTemplate.first.subject). $t(documentTemplateView.readMoreAndReply)
|