@qualityunit/liveagent-ticket-grid 0.0.48 → 0.0.52

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.
@@ -1,10 +1,10 @@
1
- var zn=Object.defineProperty;var Gn=(t,e,i)=>e in t?zn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ge=(t,e,i)=>(Gn(t,typeof e!="symbol"?e+"":e,i),i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();function Z(){}function Xe(t,e){for(const i in e)t[i]=e[i];return t}function on(t){return t()}function At(){return Object.create(null)}function Te(t){t.forEach(on)}function Tt(t){return typeof t=="function"}function q(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let st;function vt(t,e){return t===e?!0:(st||(st=document.createElement("a")),st.href=e,t===st.href)}function En(t){return Object.keys(t).length===0}function an(t,...e){if(t==null){for(const n of e)n(void 0);return Z}const i=t.subscribe(...e);return i.unsubscribe?()=>i.unsubscribe():i}function he(t){let e;return an(t,i=>e=i)(),e}function re(t,e,i){t.$$.on_destroy.push(an(e,i))}function Me(t,e,i,n){if(t){const r=ln(t,e,i,n);return t[0](r)}}function ln(t,e,i,n){return t[1]&&n?Xe(i.ctx.slice(),t[1](n(e))):i.ctx}function Ie(t,e,i,n){if(t[2]&&n){const r=t[2](n(i));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(e.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=e.dirty[a]|r[a];return s}return e.dirty|r}return e.dirty}function Be(t,e,i,n,r,s){if(r){const o=ln(e,i,n,s);t.p(o,r)}}function Ke(t){if(t.ctx.length>32){const e=[],i=t.ctx.length/32;for(let n=0;n<i;n++)e[n]=-1;return e}return-1}function Mn(t){const e={};for(const i in t)i[0]!=="$"&&(e[i]=t[i]);return e}function zt(t,e){const i={};e=new Set(e);for(const n in t)!e.has(n)&&n[0]!=="$"&&(i[n]=t[n]);return i}function ce(t){return t??""}function un(t,e,i){return t.set(i),e}const In=["",!0,1,"true","contenteditable"];function b(t,e){t.appendChild(e)}function oe(t,e,i){const n=Bn(t);if(!n.getElementById(e)){const r=k("style");r.id=e,r.textContent=i,Kn(n,r)}}function Bn(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Kn(t,e){return b(t.head||t,e),e.sheet}function x(t,e,i){t.insertBefore(e,i||null)}function D(t){t.parentNode&&t.parentNode.removeChild(t)}function Lt(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function k(t){return document.createElement(t)}function se(t){return document.createTextNode(t)}function W(){return se(" ")}function nt(){return se("")}function ae(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function yt(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function _(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}const Jn=["width","height"];function Gt(t,e){const i=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:i[n]&&i[n].set&&Jn.indexOf(n)===-1?t[n]=e[n]:_(t,n,e[n])}function Un(t){return Array.from(t.childNodes)}function le(t,e){e=""+e,t.data!==e&&(t.data=e)}function Wn(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Hn(t,e,i){~In.indexOf(i)?Wn(t,e):le(t,e)}function Et(t,e){t.value=e??""}function mt(t,e,i,n){i==null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"")}function Mt(t,e,i){t.classList.toggle(e,!!i)}function Yn(t,e,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:i,cancelable:n})}function Pn(t){const e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}let qe;function Pe(t){qe=t}function cn(){if(!qe)throw new Error("Function called outside component initialization");return qe}function ct(t){cn().$$.on_mount.push(t)}function dn(){const t=cn();return(e,i,{cancelable:n=!1}={})=>{const r=t.$$.callbacks[e];if(r){const s=Yn(e,i,{cancelable:n});return r.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}const Fe=[],Ge=[];let Ae=[];const It=[],Vn=Promise.resolve();let bt=!1;function Qn(){bt||(bt=!0,Vn.then(Se))}function wt(t){Ae.push(t)}const pt=new Set;let xe=0;function Se(){if(xe!==0)return;const t=qe;do{try{for(;xe<Fe.length;){const e=Fe[xe];xe++,Pe(e),Zn(e.$$)}}catch(e){throw Fe.length=0,xe=0,e}for(Pe(null),Fe.length=0,xe=0;Ge.length;)Ge.pop()();for(let e=0;e<Ae.length;e+=1){const i=Ae[e];pt.has(i)||(pt.add(i),i())}Ae.length=0}while(Fe.length);for(;It.length;)It.pop()();bt=!1,pt.clear(),Pe(t)}function Zn(t){if(t.fragment!==null){t.update(),Te(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(wt)}}function Xn(t){const e=[],i=[];Ae.forEach(n=>t.indexOf(n)===-1?e.push(n):i.push(n)),i.forEach(n=>n()),Ae=e}const ot=new Set;let Ne;function ve(){Ne={r:0,c:[],p:Ne}}function ye(){Ne.r||Te(Ne.c),Ne=Ne.p}function w(t,e){t&&t.i&&(ot.delete(t),t.i(e))}function $(t,e,i,n){if(t&&t.o){if(ot.has(t))return;ot.add(t),Ne.c.push(()=>{ot.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}function Ee(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function fn(t,e){const i={},n={},r={$$scope:1};let s=t.length;for(;s--;){const o=t[s],a=e[s];if(a){for(const u in o)u in a||(n[u]=1);for(const u in a)r[u]||(i[u]=a[u],r[u]=1);t[s]=a}else for(const u in o)r[u]=1}for(const o in n)o in i||(i[o]=void 0);return i}function qn(t){return typeof t=="object"&&t!==null?t:{}}function K(t){t&&t.c()}function M(t,e,i){const{fragment:n,after_update:r}=t.$$;n&&n.m(e,i),wt(()=>{const s=t.$$.on_mount.map(on).filter(Tt);t.$$.on_destroy?t.$$.on_destroy.push(...s):Te(s),t.$$.on_mount=[]}),r.forEach(wt)}function I(t,e){const i=t.$$;i.fragment!==null&&(Xn(i.after_update),Te(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function jn(t,e){t.$$.dirty[0]===-1&&(Fe.push(t),Qn(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ee(t,e,i,n,r,s,o=null,a=[-1]){const u=qe;Pe(t);const l=t.$$={fragment:null,ctx:[],props:s,update:Z,not_equal:r,bound:At(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:At(),dirty:a,skip_bound:!1,root:e.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(t,e.props||{},(d,f,...h)=>{const m=h.length?h[0]:f;return l.ctx&&r(l.ctx[d],l.ctx[d]=m)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](m),c&&jn(t,d)),f}):[],l.update(),c=!0,Te(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){const d=Un(e.target);l.fragment&&l.fragment.l(d),d.forEach(D)}else l.fragment&&l.fragment.c();e.intro&&w(t.$$.fragment),M(t,e.target,e.anchor),Se()}Pe(u)}let gn;typeof HTMLElement=="function"&&(gn=class extends HTMLElement{constructor(e,i,n){super();ge(this,"$$ctor");ge(this,"$$s");ge(this,"$$c");ge(this,"$$cn",!1);ge(this,"$$d",{});ge(this,"$$r",!1);ge(this,"$$p_d",{});ge(this,"$$l",{});ge(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=i,n&&this.attachShadow({mode:"open"})}addEventListener(e,i,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){const r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,n)}removeEventListener(e,i,n){if(super.removeEventListener(e,i,n),this.$$c){const r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(o){return()=>{let a;return{c:function(){a=k("slot"),o!=="default"&&_(a,"name",o)},m:function(c,d){x(c,a,d)},d:function(c){c&&D(a)}}}};var e=i;if(await Promise.resolve(),!this.$$cn)return;const n={},r=Pn(this);for(const o of this.$$s)o in r&&(n[o]=[i(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=at(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=at(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const a of this.$$l[o]){const u=this.$$c.$on(o,a);this.$$l_u.set(a,u)}this.$$l={}}}attributeChangedCallback(e,i,n){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=at(e,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function at(t,e,i,n){var s;const r=(s=i[t])==null?void 0:s.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!i[t])return e;if(n==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function ei(t,e,i,n,r,s){let o=class extends gn{constructor(){super(t,i,r),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Object.keys(e).forEach(a=>{Object.defineProperty(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){var l;u=at(a,u,e),this.$$d[a]=u,(l=this.$$c)==null||l.$set({[a]:u})}})}),n.forEach(a=>{Object.defineProperty(o.prototype,a,{get(){var u;return(u=this.$$c)==null?void 0:u[a]}})}),s&&(o=s(o)),t.element=o,o}class te{constructor(){ge(this,"$$");ge(this,"$$set")}$destroy(){I(this,1),this.$destroy=Z}$on(e,i){if(!Tt(i))return Z;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!En(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const ti="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ti);function ni(t){oe(t,"svelte-uqg1eo",".Icon.svelte-uqg1eo:before{font-family:'la-icon-font';display:inline-block;margin:0;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1em}")}function ii(t){let e,i;return{c(){e=k("span"),_(e,"class",i=ce(`Icon ${t[0]} ${t[1]}`)+" svelte-uqg1eo")},m(n,r){x(n,e,r)},p(n,[r]){r&3&&i!==(i=ce(`Icon ${n[0]} ${n[1]}`)+" svelte-uqg1eo")&&_(e,"class",i)},i:Z,o:Z,d(n){n&&D(e)}}}function ri(t,e,i){let{className:n=""}=e,{iconLaClassName:r}=e;return t.$$set=s=>{"className"in s&&i(0,n=s.className),"iconLaClassName"in s&&i(1,r=s.iconLaClassName)},[n,r]}class $e extends te{constructor(e){super(),ee(this,e,ri,ii,q,{className:0,iconLaClassName:1},ni)}}const Oe=[];function de(t,e=Z){let i;const n=new Set;function r(a){if(q(t,a)&&(t=a,i)){const u=!Oe.length;for(const l of n)l[1](),Oe.push(l,t);if(u){for(let l=0;l<Oe.length;l+=2)Oe[l][0](Oe[l+1]);Oe.length=0}}}function s(a){r(a(t))}function o(a,u=Z){const l=[a,u];return n.add(l),n.size===1&&(i=e(r,s)||Z),a(t),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}var Re=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};const si="https://localhost/api/v3".replace(/\/+$/,"");class St{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:si}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||hn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:()=>Re(this,void 0,void 0,function*(){return e})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const oi=new St;class dt{constructor(e=oi){this.configuration=e,this.fetchApi=(i,n)=>Re(this,void 0,void 0,function*(){let r={url:i,init:n};for(const o of this.middleware)o.pre&&(r=(yield o.pre(Object.assign({fetch:this.fetchApi},r)))||r);let s;try{s=yield(this.configuration.fetchApi||fetch)(r.url,r.init)}catch(o){for(const a of this.middleware)a.onError&&(s=(yield a.onError({fetch:this.fetchApi,url:r.url,init:r.init,error:o,response:s?s.clone():void 0}))||s);if(s===void 0)throw o instanceof Error?new ci(o,"The request failed and the interceptors did not return an alternative response"):o}for(const o of this.middleware)o.post&&(s=(yield o.post({fetch:this.fetchApi,url:r.url,init:r.init,response:s.clone()}))||s);return s}),this.middleware=e.middleware}withMiddleware(...e){const i=this.clone();return i.middleware=i.middleware.concat(...e),i}withPreMiddleware(...e){const i=e.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...e){const i=e.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(e){return e?dt.jsonRegex.test(e):!1}request(e,i){return Re(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(e,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new ui(s,"Response returned an error code")})}createFetchParams(e,i){return Re(this,void 0,void 0,function*(){let n=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(e.query));const r=Object.assign({},this.configuration.headers,e.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof i=="function"?i:()=>Re(this,void 0,void 0,function*(){return i}),o={method:e.method,headers:r,body:e.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:e})),u=Object.assign(Object.assign({},a),{body:li(a.body)||a.body instanceof URLSearchParams||ai(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const e=this.constructor,i=new e(this.configuration);return i.middleware=this.middleware.slice(),i}}dt.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function ai(t){return typeof Blob<"u"&&t instanceof Blob}function li(t){return typeof FormData<"u"&&t instanceof FormData}class ui extends Error{constructor(e,i){super(i),this.response=e,this.name="ResponseError"}}class ci extends Error{constructor(e,i){super(i),this.cause=e,this.name="FetchError"}}class Bt extends Error{constructor(e,i){super(i),this.field=e,this.name="RequiredError"}}function g(t,e){const i=t[e];return i!=null}function hn(t,e=""){return Object.keys(t).map(i=>mn(i,t[i],e)).filter(i=>i.length>0).join("&")}function mn(t,e,i=""){const n=i+(i.length?`[${t}]`:t);if(e instanceof Array){const r=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(e instanceof Set){const r=Array.from(e);return mn(t,r,i)}return e instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?hn(e,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(e))}`}class j{constructor(e,i=n=>n){this.raw=e,this.transformer=i}value(){return Re(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function di(t){return fi(t)}function fi(t,e){return t==null?t:{departmentid:g(t,"departmentid")?t.departmentid:void 0,onlineStatus:g(t,"online_status")?t.online_status:void 0,presetStatus:g(t,"preset_status")?t.preset_status:void 0}}function gi(t){return hi(t)}function hi(t,e){return t==null?t:{agentid:g(t,"agentid")?t.agentid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,username:g(t,"username")?t.username:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,roleid:g(t,"roleid")?t.roleid:void 0,departmentsStatuses:g(t,"departments_statuses")?t.departments_statuses.map(di):void 0,twofa:g(t,"twofa")?t.twofa:void 0,lastPswdChange:g(t,"last_pswd_change")?new Date(t.last_pswd_change):void 0,userstatus:g(t,"userstatus")?t.userstatus:void 0}}function mi(t){return pi(t)}function pi(t,e){return t==null?t:{conversationid:g(t,"conversationid")?t.conversationid:void 0,datechanged:g(t,"datechanged")?new Date(t.datechanged):void 0,status:g(t,"status")?t.status:void 0,preview:g(t,"preview")?t.preview:void 0,subject:g(t,"subject")?t.subject:void 0,departmentname:g(t,"departmentname")?t.departmentname:void 0,agentname:g(t,"agentname")?t.agentname:void 0,tags:g(t,"tags")?t.tags:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,emails:g(t,"emails")?t.emails:void 0,city:g(t,"city")?t.city:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,rstatus:g(t,"rstatus")?t.rstatus:void 0,statusdatestarted:g(t,"statusdatestarted")?new Date(t.statusdatestarted):void 0,chatOrder:g(t,"chat_order")?t.chat_order:void 0}}function _i(t){return vi(t)}function vi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,name:g(t,"name")?t.name:void 0,type:g(t,"type")?t.type:void 0,onlineCode:g(t,"online_code")?t.online_code:void 0,offlineCode:g(t,"offline_code")?t.offline_code:void 0,onlineCodeCss:g(t,"online_code_css")?t.online_code_css:void 0,offlineCodeCss:g(t,"offline_code_css")?t.offline_code_css:void 0,provide:g(t,"provide")?t.provide:void 0,impressions:g(t,"impressions")?t.impressions:void 0,tickets:g(t,"tickets")?t.tickets:void 0,status:g(t,"status")?t.status:void 0,lastDisplayTime:g(t,"last_display_time")?t.last_display_time:void 0,lastDisplayUrl:g(t,"last_display_url")?t.last_display_url:void 0}}function pe(t){return yi(t)}function yi(t,e){return t==null?t:{count:g(t,"count")?t.count:void 0}}function bi(t){return wi(t)}function wi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,name:g(t,"name")?t.name:void 0,agentCount:g(t,"agent_count")?t.agent_count:void 0}}function ki(t){return $i(t)}function $i(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,logid:g(t,"logid")?t.logid:void 0,line:g(t,"line")?t.line:void 0,filename:g(t,"filename")?t.filename:void 0,created:g(t,"created")?t.created:void 0,level:g(t,"level")?t.level:void 0,type:g(t,"type")?t.type:void 0,message:g(t,"message")?t.message:void 0,ip:g(t,"ip")?t.ip:void 0,groupid:g(t,"groupid")?t.groupid:void 0}}function Ci(t){return Ti(t)}function Ti(t,e){return t==null?t:{agentid:g(t,"agentid")?t.agentid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,chats:g(t,"chats")?t.chats:void 0}}function Li(t){return Si(t)}function Si(t,e){return t==null?t:{name:g(t,"name")?t.name:void 0,code:g(t,"code")?t.code:void 0,engName:g(t,"eng_name")?t.eng_name:void 0,translated:g(t,"translated")?t.translated:void 0,isDefault:g(t,"is_default")?t.is_default:void 0,active:g(t,"active")?t.active:void 0,isCustom:g(t,"is_custom")?t.is_custom:void 0,isBuiltIn:g(t,"is_builtIn")?t.is_builtIn:void 0}}function Ni(t){return Di(t)}function Di(t,e){return t==null?t:{codeName:g(t,"code_name")?t.code_name:void 0,name:g(t,"name")?t.name:void 0,description:g(t,"description")?t.description:void 0,active:g(t,"active")?t.active:void 0,help:g(t,"help")?t.help:void 0,multiple:g(t,"multiple")?t.multiple:void 0,configFile:g(t,"config_file")?t.config_file:void 0,price:g(t,"price")?t.price:void 0,legacyIntegration:g(t,"legacy_integration")?t.legacy_integration:void 0}}function _t(t){return xi(t)}function xi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,conversationid:g(t,"conversationid")?t.conversationid:void 0,code:g(t,"code")?t.code:void 0,slaTicketId:g(t,"sla_ticket_id")?t.sla_ticket_id:void 0,departmentid:g(t,"departmentid")?t.departmentid:void 0,departmentName:g(t,"department_name")?t.department_name:void 0,levelid:g(t,"levelid")?t.levelid:void 0,slaLevelName:g(t,"sla_level_name")?t.sla_level_name:void 0,sla:g(t,"sla")?t.sla:void 0,dateCreated:g(t,"date_created")?t.date_created:void 0,dateClosed:g(t,"date_closed")?t.date_closed:void 0,dateDue:g(t,"date_due")?t.date_due:void 0,slaLevelId:g(t,"sla_level_id")?t.sla_level_id:void 0,slaType:g(t,"sla_type")?new Date(t.sla_type):void 0,agentid:g(t,"agentid")?t.agentid:void 0,agentFirstname:g(t,"agent_firstname")?t.agent_firstname:void 0,agentLastname:g(t,"agent_lastname")?t.agent_lastname:void 0,agentAvatarUrl:g(t,"agent_avatar_url")?t.agent_avatar_url:void 0,reqContactid:g(t,"req_contactid")?t.req_contactid:void 0,reqFirstname:g(t,"req_firstname")?t.req_firstname:void 0,reqLastname:g(t,"req_lastname")?t.req_lastname:void 0,reqSystemname:g(t,"req_systemname")?t.req_systemname:void 0,reqContactName:g(t,"req_contactName")?t.req_contactName:void 0,reqAvatarUrl:g(t,"req_avatar_url")?t.req_avatar_url:void 0}}function Kt(t){return Oi(t)}function Oi(t,e){return t==null?t:{tagid:g(t,"tagid")?t.tagid:void 0,name:g(t,"name")?t.name:void 0,type:g(t,"type")?t.type:void 0,color:g(t,"color")?t.color:void 0,backgroundcolor:g(t,"backgroundcolor")?t.backgroundcolor:void 0,isPublic:g(t,"is_public")?t.is_public:void 0}}function pn(t){return Fi(t)}function Fi(t,e){return t==null?t:{conversationid:g(t,"conversationid")?t.conversationid:void 0,code:g(t,"code")?t.code:void 0,datecreated:g(t,"datecreated")?new Date(t.datecreated):void 0,datechanged:g(t,"datechanged")?new Date(t.datechanged):void 0,dateresolved:g(t,"dateresolved")?new Date(t.dateresolved):void 0,statuschanged:g(t,"statuschanged")?new Date(t.statuschanged):void 0,rorder:g(t,"rorder")?t.rorder:void 0,datedue:g(t,"datedue")?new Date(t.datedue):void 0,datereopen:g(t,"datereopen")?new Date(t.datereopen):void 0,status:g(t,"status")?t.status:void 0,channelType:g(t,"channel_type")?t.channel_type:void 0,departmentid:g(t,"departmentid")?t.departmentid:void 0,agentid:g(t,"agentid")?t.agentid:void 0,preview:g(t,"preview")?t.preview:void 0,subject:g(t,"subject")?t.subject:void 0,departmentname:g(t,"departmentname")?t.departmentname:void 0,agentname:g(t,"agentname")?t.agentname:void 0,tags:g(t,"tags")?t.tags:void 0,messagegroupsIn:g(t,"messagegroups_in")?t.messagegroups_in:void 0,messagegroupsOut:g(t,"messagegroups_out")?t.messagegroups_out:void 0,contactid:g(t,"contactid")?t.contactid:void 0,parentContactid:g(t,"parent_contactid")?t.parent_contactid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,emails:g(t,"emails")?t.emails:void 0,phones:g(t,"phones")?t.phones:void 0,jobPosition:g(t,"job_position")?t.job_position:void 0,contactType:g(t,"contact_type")?t.contact_type:void 0,city:g(t,"city")?t.city:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,timeOffset:g(t,"time_offset")?t.time_offset:void 0,gender:g(t,"gender")?t.gender:void 0,levelid:g(t,"levelid")?t.levelid:void 0,groups:g(t,"groups")?t.groups:void 0,contactStatus:g(t,"contact_status")?t.contact_status:void 0,company:g(t,"company")?t.company:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,userid:g(t,"userid")?t.userid:void 0,roleid:g(t,"roleid")?t.roleid:void 0,userstatus:g(t,"userstatus")?t.userstatus:void 0,accountuserstatus:g(t,"accountuserstatus")?t.accountuserstatus:void 0,description:g(t,"description")?t.description:void 0,note:g(t,"note")?t.note:void 0,lastActivity:g(t,"last_activity")?new Date(t.last_activity):void 0,tagnames:g(t,"tagnames")?t.tagnames:void 0,groupnames:g(t,"groupnames")?t.groupnames:void 0}}function Ri(t){return Ai(t)}function Ai(t,e){return t==null?t:{cursor:g(t,"cursor")?t.cursor:void 0,rows:g(t,"rows")?t.rows.map(pn):void 0}}function zi(t){return Gi(t)}function Gi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,agentid:g(t,"agentid")?t.agentid:void 0,agent:g(t,"agent")?t.agent:void 0,conversationid:g(t,"conversationid")?t.conversationid:void 0,ticket:g(t,"ticket")?t.ticket:void 0,parentContactid:g(t,"parent_contactid")?t.parent_contactid:void 0,company:g(t,"company")?t.company:void 0,contactid:g(t,"contactid")?t.contactid:void 0,customer:g(t,"customer")?t.customer:void 0,customerFirstname:g(t,"customer_firstname")?t.customer_firstname:void 0,customerLastname:g(t,"customer_lastname")?t.customer_lastname:void 0,customerSystemname:g(t,"customer_systemname")?t.customer_systemname:void 0,agentTicket:g(t,"agent_ticket")?t.agent_ticket:void 0,reportdate:g(t,"reportdate")?t.reportdate:void 0,reportedtime:g(t,"reportedtime")?t.reportedtime:void 0,reportedtimeHhmmss:g(t,"reportedtime_hhmmss")?t.reportedtime_hhmmss:void 0,spenttime:g(t,"spenttime")?t.spenttime:void 0,dateinvoiced:g(t,"dateinvoiced")?t.dateinvoiced:void 0,note:g(t,"note")?t.note:void 0,type:g(t,"type")?t.type:void 0}}var F=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};class _n extends dt{getAgentsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(gi))})}getAgentsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(e,i)).value()})}getAgentsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getAgentsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(e,i)).value()})}getCallsSlaLogGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(_t))})}getCallsSlaLogGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(e,i)).value()})}getCallsSlaLogGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getCallsSlaLogGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(e,i)).value()})}getChatsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(mi))})}getChatsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(e,i)).value()})}getChatsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getChatsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(e,i)).value()})}getChatsSlaLogGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(_t))})}getChatsSlaLogGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(e,i)).value()})}getChatsSlaLogGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getChatsSlaLogGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(e,i)).value()})}getContactWidgetsCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getContactWidgetsCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(e,i)).value()})}getContactWidgetsListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(_i))})}getContactWidgetsList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(e,i)).value()})}getCustomerGroupsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/customer_groups",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Kt))})}getCustomerGroupsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(e,i)).value()})}getDepartmensGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getDepartmensGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(e,i)).value()})}getDepartmentsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(bi))})}getDepartmentsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(e,i)).value()})}getEventLogsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(ki))})}getEventLogsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(e,i)).value()})}getEventLogsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getEventLogsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(e,i)).value()})}getInviteAgentsGridListRaw(e,i){return F(this,void 0,void 0,function*(){if(e.departmentId===null||e.departmentId===void 0)throw new Bt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/{departmentId}/invite/agents".replace("{departmentId}",encodeURIComponent(String(e.departmentId))),method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Ci))})}getInviteAgentsGridList(e,i){return F(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(e,i)).value()})}getLanguagesGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Li))})}getLanguagesGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(e,i)).value()})}getLanguagesGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getLanguagesGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(e,i)).value()})}getPlugindGridListRaw(e,i){return F(this,void 0,void 0,function*(){if(e.pluginPurpose===null||e.pluginPurpose===void 0)throw new Bt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.pluginPurpose!==void 0&&(n.pluginPurpose=e.pluginPurpose);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["plugin_settings.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/plugins",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Ni))})}getPlugindGridList(e,i){return F(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(e,i)).value()})}getTagsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tags",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Kt))})}getTagsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(e,i)).value()})}getTicketsGridDatasetRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets_new",method:"GET",headers:r,query:n},i);return new j(s,o=>Ri(o))})}getTicketsGridDataset(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(e,i)).value()})}getTicketsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(pn))})}getTicketsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(e,i)).value()})}getTicketsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTicketsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(e,i)).value()})}getTicketsSlaLogGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(_t))})}getTicketsSlaLogGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(e,i)).value()})}getTicketsSlaLogGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTicketsSlaLogGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(e,i)).value()})}getTimeReportsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.sortField!==void 0&&(n._sortField=e.sortField),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(zi))})}getTimeReportsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(e,i)).value()})}getTimeReportsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTimeReportsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(e,i)).value()})}}const Jt={Asc:"ASC",Desc:"DESC"},We={Conversationid:"conversationid",Code:"code",Datecreated:"datecreated",Datechanged:"datechanged",Dateresolved:"dateresolved",Statuschanged:"statuschanged",Rorder:"rorder",Datedue:"datedue",Datereopen:"datereopen",Status:"status",ChannelType:"channel_type",Departmentid:"departmentid",Agentid:"agentid",Subject:"subject",Departmentname:"departmentname",Agentname:"agentname",Tags:"tags",MessagegroupsIn:"messagegroups_in",MessagegroupsOut:"messagegroups_out",Rstatus:"rstatus",LastActivity:"last_activity"},Ei={Conversationid:"conversationid",Code:"code",Datecreated:"datecreated",Datechanged:"datechanged",Dateresolved:"dateresolved",Statuschanged:"statuschanged",Rorder:"rorder",Datedue:"datedue",Datereopen:"datereopen",Status:"status",ChannelType:"channel_type",Departmentid:"departmentid",Agentid:"agentid",Subject:"subject",Departmentname:"departmentname",Agentname:"agentname",Tags:"tags",MessagegroupsIn:"messagegroups_in",MessagegroupsOut:"messagegroups_out",Rstatus:"rstatus",LastActivity:"last_activity"},Ve=de(!1),vn=de([]),lt=de(null),je=de(null),ze=de(!1),Qe=de(!1),yn=de({}),_e=de([]),bn=de(null),De=de(null),et=de(!0),Nt=de(Ei.Rorder),wn=de([]);function A(t){return he(wn)[t]||t}function Mi(t){oe(t,"svelte-864uvw","span.svelte-864uvw{margin-right:5px}.Selection.svelte-864uvw{color:var(--ticket-status-chat-background);background-color:var(--menu-selected-bg);padding:6px 10px;border-radius:4px;font-size:12px;font-style:normal;font-weight:700;line-height:20px}.text.svelte-864uvw{font-family:'Roboto', sans-serif;font-size:12px;line-height:20px}.many.svelte-864uvw{color:var(--main-textcolor);padding:2px 12px;border:1px solid var(--menu-hover-bg);border-radius:4px;font-weight:700;font-size:13px;font-family:'Roboto', sans-serif;line-height:20px;cursor:pointer}.many.loading.svelte-864uvw{border:none;padding:2px 0}")}function Ii(t){let e,i=A("Displaying ")+t[6].length+" "+A("of"),n,r,s,o=(t[1]?A("Loading.."):t[0]??A("many"))+"",a,u,l,c;return{c(){e=k("span"),n=se(i),r=W(),s=k("span"),a=se(o),_(e,"class","text svelte-864uvw"),_(s,"class",u=ce(t[2])+" svelte-864uvw")},m(d,f){x(d,e,f),b(e,n),x(d,r,f),x(d,s,f),b(s,a),l||(c=ae(s,"click",t[7]),l=!0)},p(d,f){f&64&&i!==(i=A("Displaying ")+d[6].length+" "+A("of"))&&le(n,i),f&3&&o!==(o=(d[1]?A("Loading.."):d[0]??A("many"))+"")&&le(a,o),f&4&&u!==(u=ce(d[2])+" svelte-864uvw")&&_(s,"class",u)},d(d){d&&(D(e),D(r),D(s)),l=!1,c()}}}function Bi(t){let e;return{c(){e=k("span"),e.textContent=`${A("Loading...")}`,_(e,"class","text svelte-864uvw")},m(i,n){x(i,e,n)},p:Z,d(i){i&&D(e)}}}function Ki(t){let e;function i(s,o){return s[3]?Wi:s[4].length===1?Ui:Ji}let n=i(t),r=n(t);return{c(){r.c(),e=nt()},m(s,o){r.m(s,o),x(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Ji(t){let e,i=t[4].length+" rows selected",n;return{c(){e=k("span"),n=se(i),_(e,"class","Selection svelte-864uvw")},m(r,s){x(r,e,s),b(e,n)},p(r,s){s&16&&i!==(i=r[4].length+" rows selected")&&le(n,i)},d(r){r&&D(e)}}}function Ui(t){let e,i=t[4].length+" row selected",n;return{c(){e=k("span"),n=se(i),_(e,"class","Selection svelte-864uvw")},m(r,s){x(r,e,s),b(e,n)},p(r,s){s&16&&i!==(i=r[4].length+" row selected")&&le(n,i)},d(r){r&&D(e)}}}function Wi(t){let e;function i(s,o){return s[4].length>0?Yi:Hi}let n=i(t),r=n(t);return{c(){r.c(),e=nt()},m(s,o){r.m(s,o),x(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Hi(t){let e;return{c(){e=k("span"),e.textContent=`${A("all rows selected")}`,_(e,"class","Selection svelte-864uvw")},m(i,n){x(i,e,n)},p:Z,d(i){i&&D(e)}}}function Yi(t){let e;function i(s,o){return s[4].length===1?Vi:Pi}let n=i(t),r=n(t);return{c(){r.c(),e=nt()},m(s,o){r.m(s,o),x(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Pi(t){let e,i=A("all rows selected except")+" "+t[4].length+" "+A("rows"),n;return{c(){e=k("span"),n=se(i),_(e,"class","Selection svelte-864uvw")},m(r,s){x(r,e,s),b(e,n)},p(r,s){s&16&&i!==(i=A("all rows selected except")+" "+r[4].length+" "+A("rows"))&&le(n,i)},d(r){r&&D(e)}}}function Vi(t){let e,i=A("all rows selected except")+" "+t[4].length+" "+A("row"),n;return{c(){e=k("span"),n=se(i),_(e,"class","Selection svelte-864uvw")},m(r,s){x(r,e,s),b(e,n)},p(r,s){s&16&&i!==(i=A("all rows selected except")+" "+r[4].length+" "+A("row"))&&le(n,i)},d(r){r&&D(e)}}}function Qi(t){let e;function i(s,o){return s[3]||s[4].length>0?Ki:s[5]?Bi:Ii}let n=i(t),r=n(t);return{c(){r.c(),e=nt()},m(s,o){r.m(s,o),x(s,e,o)},p(s,[o]){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},i:Z,o:Z,d(s){s&&D(e),r.d(s)}}}function Zi(t,e,i){let n,r,s,o,a,u;re(t,je,m=>i(8,n=m)),re(t,lt,m=>i(9,r=m)),re(t,Ve,m=>i(3,s=m)),re(t,vn,m=>i(4,o=m)),re(t,ze,m=>i(5,a=m)),re(t,_e,m=>i(6,u=m));let l=null,c=!1,d="many";function f(){i(0,l=null)}async function h(){i(2,d="many loading"),i(1,c=!0);let m=await r.getTicketsGridListCount({filters:n,timezoneOffset:new Date().getTimezoneOffset()});i(0,l=m.count),i(1,c=!1)}return t.$$.update=()=>{t.$$.dirty&256&&n&&f()},[l,c,d,s,o,a,u,h,n]}class Xi extends te{constructor(e){super(),ee(this,e,Zi,Qi,q,{},Mi)}}async function tt(t=!1){if(!(he(ze)||!he(lt))&&(t&&(De.set(null),Qe.set(!1)),!(!he(De)&&he(Qe)))){ze.set(!0);try{const i=await(await he(lt).getTicketsGridDatasetRaw(qi())).value();t&&_e.set([]),_e.set([...he(_e),...i.rows]),De.set(i.cursor),Qe.set(!0)}catch(e){bn.set(e.toString())}ze.set(!1)}}function qi(){return{perPage:20,sortDir:he(et)?Jt.Asc:Jt.Desc,filters:he(je),sortField:he(Nt),cursor:he(De)?he(De):""}}function ji(t){oe(t,"svelte-44l4of",".Head.svelte-44l4of.svelte-44l4of{display:none}.headCheckbox.svelte-44l4of.svelte-44l4of{width:20px}button.svelte-44l4of.svelte-44l4of{border:none;background:none;font-size:13px;font-weight:400;color:var(--main-lighter-textcolor)}.spinner.svelte-44l4of.svelte-44l4of{font-size:16px;cursor:pointer}.rightPanel.svelte-44l4of.svelte-44l4of{margin-inline-start:auto}.Sorting.svelte-44l4of.svelte-44l4of{cursor:pointer;text-align:left;font-weight:bold}.sortButton.svelte-44l4of.svelte-44l4of{cursor:pointer;text-align:left;font-weight:bold}.loading.svelte-44l4of.svelte-44l4of{animation-name:svelte-44l4of-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-44l4of-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@media screen and (min-width: 768px){.Head.svelte-44l4of.svelte-44l4of{display:flex;position:sticky;top:0;color:var(--panel_text_color);margin:6px 23px;align-items:center;font-size:14px;font-family:'Roboto', sans-serif}.headCheckbox.svelte-44l4of input[type=checkbox].svelte-44l4of{vertical-align:middle;cursor:pointer}}")}function er(t){let e,i;return e=new $e({props:{iconLaClassName:"la-move-down"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function tr(t){let e,i;return e=new $e({props:{iconLaClassName:"la-move-up"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function nr(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,m,v,S,p,L,H;const R=[tr,er],P=[];function z(B,U){return B[2]?0:1}return l=z(t),c=P[l]=R[l](t),h=new Xi({}),S=new $e({props:{iconLaClassName:"la-refresh"}}),{c(){e=k("div"),i=k("div"),n=k("input"),r=W(),s=k("button"),o=se(t[0]),a=W(),u=k("button"),c.c(),d=W(),f=k("div"),K(h.$$.fragment),m=W(),v=k("button"),K(S.$$.fragment),_(n,"type","checkbox"),_(n,"class","svelte-44l4of"),_(i,"class","headCheckbox svelte-44l4of"),_(s,"class","Sorting svelte-44l4of"),_(u,"class","sortButton svelte-44l4of"),_(v,"class","spinner svelte-44l4of"),_(v,"title",A("Reload")),Mt(v,"loading",t[4]),_(f,"class","rightPanel svelte-44l4of"),_(e,"class","Head svelte-44l4of")},m(B,U){x(B,e,U),b(e,i),b(i,n),n.checked=t[3],b(e,r),b(e,s),b(s,o),t[9](s),b(e,a),b(e,u),P[l].m(u,null),b(e,d),b(e,f),M(h,f,null),b(f,m),b(f,v),M(S,v,null),p=!0,L||(H=[ae(n,"change",t[8]),ae(n,"click",t[5]),ae(s,"click",t[7]),ae(u,"click",t[10]),ae(v,"click",t[11])],L=!0)},p(B,[U]){U&8&&(n.checked=B[3]),(!p||U&1)&&le(o,B[0]);let ne=l;l=z(B),l!==ne&&(ve(),$(P[ne],1,1,()=>{P[ne]=null}),ye(),c=P[l],c||(c=P[l]=R[l](B),c.c()),w(c,1),c.m(u,null)),(!p||U&16)&&Mt(v,"loading",B[4])},i(B){p||(w(c),w(h.$$.fragment,B),w(S.$$.fragment,B),p=!0)},o(B){$(c),$(h.$$.fragment,B),$(S.$$.fragment,B),p=!1},d(B){B&&D(e),t[9](null),P[l].d(),I(h),I(S),L=!1,Te(H)}}}function ir(t,e,i){let n,r,s;re(t,et,L=>i(2,n=L)),re(t,Ve,L=>i(3,r=L)),re(t,ze,L=>i(4,s=L));let{currentFilter:o}=e;const a=dn();let u,l,c;function d(){Ve.set(!r),_e.update(L=>L.map(H=>({...H,__selected:r})))}const f=()=>{un(et,n=!n,n)};function h(){u=l.getBoundingClientRect(),c=`position: absolute; top: ${u.bottom-58}px; left: ${u.left-265}px;`,a("openModal",{dialogStyles:c})}function m(){r=this.checked,Ve.set(r)}function v(L){Ge[L?"unshift":"push"](()=>{l=L,i(1,l)})}const S=()=>f(),p=()=>tt(!0);return t.$$set=L=>{"currentFilter"in L&&i(0,o=L.currentFilter)},[o,l,n,r,s,d,f,h,m,v,S,p]}class rr extends te{constructor(e){super(),ee(this,e,ir,nr,q,{currentFilter:0},ji)}}function ut(t){switch(t){case"A":return"var(--ticket-status-answered-background)";case"T":return"var(--ticket-status-chat-background)";case"P":return"var(--ticket-status-phone-background)";case"X":return"var(--ticket-status-deleted-background)";case"B":return"";case"I":return"var(--ticket-status-deleted-background)";case"R":return"var(--ticket-status-resolved-background)";case"N":return"var(--ticket-status-new-background)";case"C":return"var(--ticket-status-open-background)";case"W":return"var(--ticket-status-postponed-background)"}}const sr=()=>{const t=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#FFEB3B","#FFC107","#FF5722","#795548"],e=Math.floor(Math.random()*t.length);return t[e]},or=t=>{let e=t.split(" ");return e.length>1?e=e.shift().charAt(0)+e.pop().charAt(0):e=t.substring(0,2),e.toUpperCase()};function ar(t){oe(t,"svelte-hbozhk",".wrapper.svelte-hbozhk{position:relative;width:var(--size);height:var(--size)}.innerImage.svelte-hbozhk,.innerInitials.svelte-hbozhk,.imageLoading.svelte-hbozhk{display:block;width:100%;height:100%;border-radius:var(--borderRadius)}.innerInitials.svelte-hbozhk{line-height:var(--size);background-color:var(--bgColor);color:var(--textColor);text-align:center;font-size:calc(var(--size) / (var(--abbrLength) + 0.5))}.imageLoading.svelte-hbozhk{background-color:var(--bgColor)}.imageLoading.svelte-hbozhk::before{content:'';display:block;height:100%;width:100%;background:linear-gradient(90deg, transparent, #ffffff38, transparent);position:absolute;top:0;left:0;animation:svelte-hbozhk-skeleton-animation 1.2s linear infinite}@keyframes svelte-hbozhk-skeleton-animation{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}")}function lr(t){let e;return{c(){e=k("div"),e.textContent=`${t[10]}`,_(e,"class","innerInitials svelte-hbozhk")},m(i,n){x(i,e,n)},p:Z,d(i){i&&D(e)}}}function ur(t){let e,i,n,r,s,o;return{c(){e=k("div"),i=k("img"),_(i,"alt",""),_(i,"class",ce("innerImage")+" svelte-hbozhk"),vt(i.src,n=t[2])||_(i,"src",n),_(e,"class",r=ce(t[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){x(a,e,u),b(e,i),s||(o=[ae(i,"error",t[15]),ae(i,"load",t[16])],s=!0)},p(a,u){u&4&&!vt(i.src,n=a[2])&&_(i,"src",n),u&256&&r!==(r=ce(a[8]?"imageLoading":"")+" svelte-hbozhk")&&_(e,"class",r)},d(a){a&&D(e),s=!1,Te(o)}}}function cr(t){let e,i;function n(o,a){return o[2]&&!o[7]?ur:lr}let r=n(t),s=r(t);return{c(){e=k("div"),s.c(),_(e,"aria-label",t[1]),_(e,"class","wrapper svelte-hbozhk"),_(e,"style",i=t[0]+"--borderRadius:"+(t[6]?0:t[5])+"; --size:"+t[4]+"; --bgColor:"+t[9]+"; --src:"+t[2]+"; --textColor:"+t[3]+"; --abbrLength:"+t[11])},m(o,a){x(o,e,a),s.m(e,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(e,null))),a&2&&_(e,"aria-label",o[1]),a&125&&i!==(i=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&_(e,"style",i)},i:Z,o:Z,d(o){o&&D(e),s.d()}}}function dr(t,e,i){let{style:n=""}=e,{name:r="Avatar"}=e,{initials:s}=e,{src:o}=e,{bgColor:a="lightGrey"}=e,{textColor:u="white"}=e,{size:l="50px"}=e,{borderRadius:c="50%"}=e,{square:d=!1}=e,{randomBgColor:f=!1}=e;const h=f?sr():a,m=s||or(r),v=m.length;let S=!1,p=!0;const L=()=>i(7,S=!0),H=()=>i(8,p=!1);return t.$$set=R=>{"style"in R&&i(0,n=R.style),"name"in R&&i(1,r=R.name),"initials"in R&&i(12,s=R.initials),"src"in R&&i(2,o=R.src),"bgColor"in R&&i(13,a=R.bgColor),"textColor"in R&&i(3,u=R.textColor),"size"in R&&i(4,l=R.size),"borderRadius"in R&&i(5,c=R.borderRadius),"square"in R&&i(6,d=R.square),"randomBgColor"in R&&i(14,f=R.randomBgColor)},[n,r,o,u,l,c,d,S,p,h,m,v,s,a,f,L,H]}class fr extends te{constructor(e){super(),ee(this,e,dr,cr,q,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},ar)}}function gr(t){let e,i;return e=new fr({props:{bgColor:t[0],name:t[1],src:t[2],initials:t[3]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.bgColor=n[0]),r&2&&(s.name=n[1]),r&4&&(s.src=n[2]),r&8&&(s.initials=n[3]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function hr(t,e,i){let{bgColor:n}=e,{name:r}=e,{src:s}=e,{initials:o}=e;return t.$$set=a=>{"bgColor"in a&&i(0,n=a.bgColor),"name"in a&&i(1,r=a.name),"src"in a&&i(2,s=a.src),"initials"in a&&i(3,o=a.initials)},[n,r,s,o]}class mr extends te{constructor(e){super(),ee(this,e,hr,gr,q,{bgColor:0,name:1,src:2,initials:3})}}var kn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $n={exports:{}},Cn={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(i,n){return i<<n|i>>>32-n},rotr:function(i,n){return i<<32-n|i>>>n},endian:function(i){if(i.constructor==Number)return e.rotl(i,8)&16711935|e.rotl(i,24)&4278255360;for(var n=0;n<i.length;n++)i[n]=e.endian(i[n]);return i},randomBytes:function(i){for(var n=[];i>0;i--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(i){for(var n=[],r=0,s=0;r<i.length;r++,s+=8)n[s>>>5]|=i[r]<<24-s%32;return n},wordsToBytes:function(i){for(var n=[],r=0;r<i.length*32;r+=8)n.push(i[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(i){for(var n=[],r=0;r<i.length;r++)n.push((i[r]>>>4).toString(16)),n.push((i[r]&15).toString(16));return n.join("")},hexToBytes:function(i){for(var n=[],r=0;r<i.length;r+=2)n.push(parseInt(i.substr(r,2),16));return n},bytesToBase64:function(i){for(var n=[],r=0;r<i.length;r+=3)for(var s=i[r]<<16|i[r+1]<<8|i[r+2],o=0;o<4;o++)r*8+o*6<=i.length*8?n.push(t.charAt(s>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<i.length;s=++r%4)s!=0&&n.push((t.indexOf(i.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(i.charAt(r))>>>6-s*2);return n}};Cn.exports=e})();var pr=Cn.exports,kt={utf8:{stringToBytes:function(t){return kt.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(kt.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],i=0;i<t.length;i++)e.push(t.charCodeAt(i)&255);return e},bytesToString:function(t){for(var e=[],i=0;i<t.length;i++)e.push(String.fromCharCode(t[i]));return e.join("")}}},Ut=kt;/*!
1
+ var zn=Object.defineProperty;var An=(t,e,i)=>e in t?zn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ge=(t,e,i)=>(An(t,typeof e!="symbol"?e+"":e,i),i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();function q(){}function Xe(t,e){for(const i in e)t[i]=e[i];return t}function on(t){return t()}function zt(){return Object.create(null)}function Le(t){t.forEach(on)}function Tt(t){return typeof t=="function"}function Z(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let st;function _t(t,e){return t===e?!0:(st||(st=document.createElement("a")),st.href=e,t===st.href)}function Gn(t){return Object.keys(t).length===0}function an(t,...e){if(t==null){for(const n of e)n(void 0);return q}const i=t.subscribe(...e);return i.unsubscribe?()=>i.unsubscribe():i}function he(t){let e;return an(t,i=>e=i)(),e}function ie(t,e,i){t.$$.on_destroy.push(an(e,i))}function Ie(t,e,i,n){if(t){const r=ln(t,e,i,n);return t[0](r)}}function ln(t,e,i,n){return t[1]&&n?Xe(i.ctx.slice(),t[1](n(e))):i.ctx}function Be(t,e,i,n){if(t[2]&&n){const r=t[2](n(i));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(e.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=e.dirty[a]|r[a];return s}return e.dirty|r}return e.dirty}function Ke(t,e,i,n,r,s){if(r){const o=ln(e,i,n,s);t.p(o,r)}}function Je(t){if(t.ctx.length>32){const e=[],i=t.ctx.length/32;for(let n=0;n<i;n++)e[n]=-1;return e}return-1}function En(t){const e={};for(const i in t)i[0]!=="$"&&(e[i]=t[i]);return e}function At(t,e){const i={};e=new Set(e);for(const n in t)!e.has(n)&&n[0]!=="$"&&(i[n]=t[n]);return i}function ae(t){return t??""}function Mn(t,e,i){return t.set(i),e}const In=["",!0,1,"true","contenteditable"];function b(t,e){t.appendChild(e)}function oe(t,e,i){const n=Bn(t);if(!n.getElementById(e)){const r=$("style");r.id=e,r.textContent=i,Kn(n,r)}}function Bn(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Kn(t,e){return b(t.head||t,e),e.sheet}function D(t,e,i){t.insertBefore(e,i||null)}function N(t){t.parentNode&&t.parentNode.removeChild(t)}function Lt(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function $(t){return document.createElement(t)}function se(t){return document.createTextNode(t)}function U(){return se(" ")}function nt(){return se("")}function ce(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function yt(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function v(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}const Jn=["width","height"];function Gt(t,e){const i=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:i[n]&&i[n].set&&Jn.indexOf(n)===-1?t[n]=e[n]:v(t,n,e[n])}function Un(t){return Array.from(t.childNodes)}function le(t,e){e=""+e,t.data!==e&&(t.data=e)}function Wn(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Hn(t,e,i){~In.indexOf(i)?Wn(t,e):le(t,e)}function Et(t,e){t.value=e??""}function mt(t,e,i,n){i==null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"")}function Mt(t,e,i){t.classList.toggle(e,!!i)}function Yn(t,e,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:i,cancelable:n})}function Pn(t){const e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}let je;function Ve(t){je=t}function un(){if(!je)throw new Error("Function called outside component initialization");return je}function ut(t){un().$$.on_mount.push(t)}function cn(){const t=un();return(e,i,{cancelable:n=!1}={})=>{const r=t.$$.callbacks[e];if(r){const s=Yn(e,i,{cancelable:n});return r.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}const Re=[],Ee=[];let Ae=[];const It=[],Vn=Promise.resolve();let bt=!1;function qn(){bt||(bt=!0,Vn.then(xe))}function wt(t){Ae.push(t)}const pt=new Set;let Oe=0;function xe(){if(Oe!==0)return;const t=je;do{try{for(;Oe<Re.length;){const e=Re[Oe];Oe++,Ve(e),Qn(e.$$)}}catch(e){throw Re.length=0,Oe=0,e}for(Ve(null),Re.length=0,Oe=0;Ee.length;)Ee.pop()();for(let e=0;e<Ae.length;e+=1){const i=Ae[e];pt.has(i)||(pt.add(i),i())}Ae.length=0}while(Re.length);for(;It.length;)It.pop()();bt=!1,pt.clear(),Ve(t)}function Qn(t){if(t.fragment!==null){t.update(),Le(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(wt)}}function Zn(t){const e=[],i=[];Ae.forEach(n=>t.indexOf(n)===-1?e.push(n):i.push(n)),i.forEach(n=>n()),Ae=e}const ot=new Set;let Ne;function we(){Ne={r:0,c:[],p:Ne}}function ke(){Ne.r||Le(Ne.c),Ne=Ne.p}function w(t,e){t&&t.i&&(ot.delete(t),t.i(e))}function T(t,e,i,n){if(t&&t.o){if(ot.has(t))return;ot.add(t),Ne.c.push(()=>{ot.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}function Me(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function dn(t,e){const i={},n={},r={$$scope:1};let s=t.length;for(;s--;){const o=t[s],a=e[s];if(a){for(const u in o)u in a||(n[u]=1);for(const u in a)r[u]||(i[u]=a[u],r[u]=1);t[s]=a}else for(const u in o)r[u]=1}for(const o in n)o in i||(i[o]=void 0);return i}function Xn(t){return typeof t=="object"&&t!==null?t:{}}function B(t){t&&t.c()}function M(t,e,i){const{fragment:n,after_update:r}=t.$$;n&&n.m(e,i),wt(()=>{const s=t.$$.on_mount.map(on).filter(Tt);t.$$.on_destroy?t.$$.on_destroy.push(...s):Le(s),t.$$.on_mount=[]}),r.forEach(wt)}function I(t,e){const i=t.$$;i.fragment!==null&&(Zn(i.after_update),Le(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function jn(t,e){t.$$.dirty[0]===-1&&(Re.push(t),qn(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ee(t,e,i,n,r,s,o=null,a=[-1]){const u=je;Ve(t);const l=t.$$={fragment:null,ctx:[],props:s,update:q,not_equal:r,bound:zt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:zt(),dirty:a,skip_bound:!1,root:e.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(t,e.props||{},(d,f,...h)=>{const m=h.length?h[0]:f;return l.ctx&&r(l.ctx[d],l.ctx[d]=m)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](m),c&&jn(t,d)),f}):[],l.update(),c=!0,Le(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){const d=Un(e.target);l.fragment&&l.fragment.l(d),d.forEach(N)}else l.fragment&&l.fragment.c();e.intro&&w(t.$$.fragment),M(t,e.target,e.anchor),xe()}Ve(u)}let fn;typeof HTMLElement=="function"&&(fn=class extends HTMLElement{constructor(e,i,n){super();ge(this,"$$ctor");ge(this,"$$s");ge(this,"$$c");ge(this,"$$cn",!1);ge(this,"$$d",{});ge(this,"$$r",!1);ge(this,"$$p_d",{});ge(this,"$$l",{});ge(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=i,n&&this.attachShadow({mode:"open"})}addEventListener(e,i,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){const r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,n)}removeEventListener(e,i,n){if(super.removeEventListener(e,i,n),this.$$c){const r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(o){return()=>{let a;return{c:function(){a=$("slot"),o!=="default"&&v(a,"name",o)},m:function(c,d){D(c,a,d)},d:function(c){c&&N(a)}}}};var e=i;if(await Promise.resolve(),!this.$$cn)return;const n={},r=Pn(this);for(const o of this.$$s)o in r&&(n[o]=[i(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=at(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=at(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const a of this.$$l[o]){const u=this.$$c.$on(o,a);this.$$l_u.set(a,u)}this.$$l={}}}attributeChangedCallback(e,i,n){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=at(e,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function at(t,e,i,n){var s;const r=(s=i[t])==null?void 0:s.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!i[t])return e;if(n==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function ei(t,e,i,n,r,s){let o=class extends fn{constructor(){super(t,i,r),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Object.keys(e).forEach(a=>{Object.defineProperty(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){var l;u=at(a,u,e),this.$$d[a]=u,(l=this.$$c)==null||l.$set({[a]:u})}})}),n.forEach(a=>{Object.defineProperty(o.prototype,a,{get(){var u;return(u=this.$$c)==null?void 0:u[a]}})}),s&&(o=s(o)),t.element=o,o}class te{constructor(){ge(this,"$$");ge(this,"$$set")}$destroy(){I(this,1),this.$destroy=q}$on(e,i){if(!Tt(i))return q;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!Gn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const ti="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ti);function ni(t){oe(t,"svelte-uqg1eo",".Icon.svelte-uqg1eo:before{font-family:'la-icon-font';display:inline-block;margin:0;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1em}")}function ii(t){let e,i;return{c(){e=$("span"),v(e,"class",i=ae(`Icon ${t[0]} ${t[1]}`)+" svelte-uqg1eo")},m(n,r){D(n,e,r)},p(n,[r]){r&3&&i!==(i=ae(`Icon ${n[0]} ${n[1]}`)+" svelte-uqg1eo")&&v(e,"class",i)},i:q,o:q,d(n){n&&N(e)}}}function ri(t,e,i){let{className:n=""}=e,{iconLaClassName:r}=e;return t.$$set=s=>{"className"in s&&i(0,n=s.className),"iconLaClassName"in s&&i(1,r=s.iconLaClassName)},[n,r]}class $e extends te{constructor(e){super(),ee(this,e,ri,ii,Z,{className:0,iconLaClassName:1},ni)}}const Fe=[];function de(t,e=q){let i;const n=new Set;function r(a){if(Z(t,a)&&(t=a,i)){const u=!Fe.length;for(const l of n)l[1](),Fe.push(l,t);if(u){for(let l=0;l<Fe.length;l+=2)Fe[l][0](Fe[l+1]);Fe.length=0}}}function s(a){r(a(t))}function o(a,u=q){const l=[a,u];return n.add(l),n.size===1&&(i=e(r,s)||q),a(t),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}var ze=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};const si="https://localhost/api/v3".replace(/\/+$/,"");class St{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:si}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||gn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:()=>ze(this,void 0,void 0,function*(){return e})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const oi=new St;class ct{constructor(e=oi){this.configuration=e,this.fetchApi=(i,n)=>ze(this,void 0,void 0,function*(){let r={url:i,init:n};for(const o of this.middleware)o.pre&&(r=(yield o.pre(Object.assign({fetch:this.fetchApi},r)))||r);let s;try{s=yield(this.configuration.fetchApi||fetch)(r.url,r.init)}catch(o){for(const a of this.middleware)a.onError&&(s=(yield a.onError({fetch:this.fetchApi,url:r.url,init:r.init,error:o,response:s?s.clone():void 0}))||s);if(s===void 0)throw o instanceof Error?new ci(o,"The request failed and the interceptors did not return an alternative response"):o}for(const o of this.middleware)o.post&&(s=(yield o.post({fetch:this.fetchApi,url:r.url,init:r.init,response:s.clone()}))||s);return s}),this.middleware=e.middleware}withMiddleware(...e){const i=this.clone();return i.middleware=i.middleware.concat(...e),i}withPreMiddleware(...e){const i=e.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...e){const i=e.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(e){return e?ct.jsonRegex.test(e):!1}request(e,i){return ze(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(e,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new ui(s,"Response returned an error code")})}createFetchParams(e,i){return ze(this,void 0,void 0,function*(){let n=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(e.query));const r=Object.assign({},this.configuration.headers,e.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof i=="function"?i:()=>ze(this,void 0,void 0,function*(){return i}),o={method:e.method,headers:r,body:e.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:e})),u=Object.assign(Object.assign({},a),{body:li(a.body)||a.body instanceof URLSearchParams||ai(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const e=this.constructor,i=new e(this.configuration);return i.middleware=this.middleware.slice(),i}}ct.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function ai(t){return typeof Blob<"u"&&t instanceof Blob}function li(t){return typeof FormData<"u"&&t instanceof FormData}class ui extends Error{constructor(e,i){super(i),this.response=e,this.name="ResponseError"}}class ci extends Error{constructor(e,i){super(i),this.cause=e,this.name="FetchError"}}class Bt extends Error{constructor(e,i){super(i),this.field=e,this.name="RequiredError"}}function g(t,e){const i=t[e];return i!=null}function gn(t,e=""){return Object.keys(t).map(i=>hn(i,t[i],e)).filter(i=>i.length>0).join("&")}function hn(t,e,i=""){const n=i+(i.length?`[${t}]`:t);if(e instanceof Array){const r=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(e instanceof Set){const r=Array.from(e);return hn(t,r,i)}return e instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?gn(e,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(e))}`}class j{constructor(e,i=n=>n){this.raw=e,this.transformer=i}value(){return ze(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function di(t){return fi(t)}function fi(t,e){return t==null?t:{departmentid:g(t,"departmentid")?t.departmentid:void 0,onlineStatus:g(t,"online_status")?t.online_status:void 0,presetStatus:g(t,"preset_status")?t.preset_status:void 0}}function gi(t){return hi(t)}function hi(t,e){return t==null?t:{agentid:g(t,"agentid")?t.agentid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,username:g(t,"username")?t.username:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,roleid:g(t,"roleid")?t.roleid:void 0,departmentsStatuses:g(t,"departments_statuses")?t.departments_statuses.map(di):void 0,twofa:g(t,"twofa")?t.twofa:void 0,lastPswdChange:g(t,"last_pswd_change")?new Date(t.last_pswd_change):void 0,userstatus:g(t,"userstatus")?t.userstatus:void 0}}function mi(t){return pi(t)}function pi(t,e){return t==null?t:{conversationid:g(t,"conversationid")?t.conversationid:void 0,datechanged:g(t,"datechanged")?new Date(t.datechanged):void 0,status:g(t,"status")?t.status:void 0,preview:g(t,"preview")?t.preview:void 0,subject:g(t,"subject")?t.subject:void 0,departmentname:g(t,"departmentname")?t.departmentname:void 0,agentname:g(t,"agentname")?t.agentname:void 0,tags:g(t,"tags")?t.tags:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,emails:g(t,"emails")?t.emails:void 0,city:g(t,"city")?t.city:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,rstatus:g(t,"rstatus")?t.rstatus:void 0,statusdatestarted:g(t,"statusdatestarted")?new Date(t.statusdatestarted):void 0,chatOrder:g(t,"chat_order")?t.chat_order:void 0}}function vi(t){return _i(t)}function _i(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,name:g(t,"name")?t.name:void 0,type:g(t,"type")?t.type:void 0,onlineCode:g(t,"online_code")?t.online_code:void 0,offlineCode:g(t,"offline_code")?t.offline_code:void 0,onlineCodeCss:g(t,"online_code_css")?t.online_code_css:void 0,offlineCodeCss:g(t,"offline_code_css")?t.offline_code_css:void 0,provide:g(t,"provide")?t.provide:void 0,impressions:g(t,"impressions")?t.impressions:void 0,tickets:g(t,"tickets")?t.tickets:void 0,status:g(t,"status")?t.status:void 0,lastDisplayTime:g(t,"last_display_time")?t.last_display_time:void 0,lastDisplayUrl:g(t,"last_display_url")?t.last_display_url:void 0}}function pe(t){return yi(t)}function yi(t,e){return t==null?t:{count:g(t,"count")?t.count:void 0}}function bi(t){return wi(t)}function wi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,name:g(t,"name")?t.name:void 0,agentCount:g(t,"agent_count")?t.agent_count:void 0}}function ki(t){return $i(t)}function $i(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,logid:g(t,"logid")?t.logid:void 0,line:g(t,"line")?t.line:void 0,filename:g(t,"filename")?t.filename:void 0,created:g(t,"created")?t.created:void 0,level:g(t,"level")?t.level:void 0,type:g(t,"type")?t.type:void 0,message:g(t,"message")?t.message:void 0,ip:g(t,"ip")?t.ip:void 0,groupid:g(t,"groupid")?t.groupid:void 0}}function Ci(t){return Ti(t)}function Ti(t,e){return t==null?t:{agentid:g(t,"agentid")?t.agentid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,chats:g(t,"chats")?t.chats:void 0}}function Li(t){return Si(t)}function Si(t,e){return t==null?t:{name:g(t,"name")?t.name:void 0,code:g(t,"code")?t.code:void 0,engName:g(t,"eng_name")?t.eng_name:void 0,translated:g(t,"translated")?t.translated:void 0,isDefault:g(t,"is_default")?t.is_default:void 0,active:g(t,"active")?t.active:void 0,isCustom:g(t,"is_custom")?t.is_custom:void 0,isBuiltIn:g(t,"is_builtIn")?t.is_builtIn:void 0}}function xi(t){return Ni(t)}function Ni(t,e){return t==null?t:{codeName:g(t,"code_name")?t.code_name:void 0,name:g(t,"name")?t.name:void 0,description:g(t,"description")?t.description:void 0,active:g(t,"active")?t.active:void 0,help:g(t,"help")?t.help:void 0,multiple:g(t,"multiple")?t.multiple:void 0,configFile:g(t,"config_file")?t.config_file:void 0,price:g(t,"price")?t.price:void 0,legacyIntegration:g(t,"legacy_integration")?t.legacy_integration:void 0}}function vt(t){return Di(t)}function Di(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,conversationid:g(t,"conversationid")?t.conversationid:void 0,code:g(t,"code")?t.code:void 0,slaTicketId:g(t,"sla_ticket_id")?t.sla_ticket_id:void 0,departmentid:g(t,"departmentid")?t.departmentid:void 0,departmentName:g(t,"department_name")?t.department_name:void 0,levelid:g(t,"levelid")?t.levelid:void 0,slaLevelName:g(t,"sla_level_name")?t.sla_level_name:void 0,sla:g(t,"sla")?t.sla:void 0,dateCreated:g(t,"date_created")?t.date_created:void 0,dateClosed:g(t,"date_closed")?t.date_closed:void 0,dateDue:g(t,"date_due")?t.date_due:void 0,slaLevelId:g(t,"sla_level_id")?t.sla_level_id:void 0,slaType:g(t,"sla_type")?new Date(t.sla_type):void 0,agentid:g(t,"agentid")?t.agentid:void 0,agentFirstname:g(t,"agent_firstname")?t.agent_firstname:void 0,agentLastname:g(t,"agent_lastname")?t.agent_lastname:void 0,agentAvatarUrl:g(t,"agent_avatar_url")?t.agent_avatar_url:void 0,reqContactid:g(t,"req_contactid")?t.req_contactid:void 0,reqFirstname:g(t,"req_firstname")?t.req_firstname:void 0,reqLastname:g(t,"req_lastname")?t.req_lastname:void 0,reqSystemname:g(t,"req_systemname")?t.req_systemname:void 0,reqContactName:g(t,"req_contactName")?t.req_contactName:void 0,reqAvatarUrl:g(t,"req_avatar_url")?t.req_avatar_url:void 0}}function Kt(t){return Oi(t)}function Oi(t,e){return t==null?t:{tagid:g(t,"tagid")?t.tagid:void 0,name:g(t,"name")?t.name:void 0,type:g(t,"type")?t.type:void 0,color:g(t,"color")?t.color:void 0,backgroundcolor:g(t,"backgroundcolor")?t.backgroundcolor:void 0,isPublic:g(t,"is_public")?t.is_public:void 0}}function mn(t){return Fi(t)}function Fi(t,e){return t==null?t:{conversationid:g(t,"conversationid")?t.conversationid:void 0,code:g(t,"code")?t.code:void 0,datecreated:g(t,"datecreated")?new Date(t.datecreated):void 0,datechanged:g(t,"datechanged")?new Date(t.datechanged):void 0,dateresolved:g(t,"dateresolved")?new Date(t.dateresolved):void 0,statuschanged:g(t,"statuschanged")?new Date(t.statuschanged):void 0,rorder:g(t,"rorder")?t.rorder:void 0,datedue:g(t,"datedue")?new Date(t.datedue):void 0,datereopen:g(t,"datereopen")?new Date(t.datereopen):void 0,status:g(t,"status")?t.status:void 0,channelType:g(t,"channel_type")?t.channel_type:void 0,departmentid:g(t,"departmentid")?t.departmentid:void 0,agentid:g(t,"agentid")?t.agentid:void 0,preview:g(t,"preview")?t.preview:void 0,subject:g(t,"subject")?t.subject:void 0,departmentname:g(t,"departmentname")?t.departmentname:void 0,agentname:g(t,"agentname")?t.agentname:void 0,tags:g(t,"tags")?t.tags:void 0,messagegroupsIn:g(t,"messagegroups_in")?t.messagegroups_in:void 0,messagegroupsOut:g(t,"messagegroups_out")?t.messagegroups_out:void 0,contactid:g(t,"contactid")?t.contactid:void 0,parentContactid:g(t,"parent_contactid")?t.parent_contactid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,emails:g(t,"emails")?t.emails:void 0,phones:g(t,"phones")?t.phones:void 0,jobPosition:g(t,"job_position")?t.job_position:void 0,contactType:g(t,"contact_type")?t.contact_type:void 0,city:g(t,"city")?t.city:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,timeOffset:g(t,"time_offset")?t.time_offset:void 0,gender:g(t,"gender")?t.gender:void 0,levelid:g(t,"levelid")?t.levelid:void 0,groups:g(t,"groups")?t.groups:void 0,contactStatus:g(t,"contact_status")?t.contact_status:void 0,company:g(t,"company")?t.company:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,userid:g(t,"userid")?t.userid:void 0,roleid:g(t,"roleid")?t.roleid:void 0,userstatus:g(t,"userstatus")?t.userstatus:void 0,accountuserstatus:g(t,"accountuserstatus")?t.accountuserstatus:void 0,description:g(t,"description")?t.description:void 0,note:g(t,"note")?t.note:void 0,lastActivity:g(t,"last_activity")?new Date(t.last_activity):void 0,tagnames:g(t,"tagnames")?t.tagnames:void 0,groupnames:g(t,"groupnames")?t.groupnames:void 0}}function Ri(t){return zi(t)}function zi(t,e){return t==null?t:{cursor:g(t,"cursor")?t.cursor:void 0,rows:g(t,"rows")?t.rows.map(mn):void 0}}function Ai(t){return Gi(t)}function Gi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,agentid:g(t,"agentid")?t.agentid:void 0,agent:g(t,"agent")?t.agent:void 0,conversationid:g(t,"conversationid")?t.conversationid:void 0,ticket:g(t,"ticket")?t.ticket:void 0,parentContactid:g(t,"parent_contactid")?t.parent_contactid:void 0,company:g(t,"company")?t.company:void 0,contactid:g(t,"contactid")?t.contactid:void 0,customer:g(t,"customer")?t.customer:void 0,customerFirstname:g(t,"customer_firstname")?t.customer_firstname:void 0,customerLastname:g(t,"customer_lastname")?t.customer_lastname:void 0,customerSystemname:g(t,"customer_systemname")?t.customer_systemname:void 0,agentTicket:g(t,"agent_ticket")?t.agent_ticket:void 0,reportdate:g(t,"reportdate")?t.reportdate:void 0,reportedtime:g(t,"reportedtime")?t.reportedtime:void 0,reportedtimeHhmmss:g(t,"reportedtime_hhmmss")?t.reportedtime_hhmmss:void 0,spenttime:g(t,"spenttime")?t.spenttime:void 0,dateinvoiced:g(t,"dateinvoiced")?t.dateinvoiced:void 0,note:g(t,"note")?t.note:void 0,type:g(t,"type")?t.type:void 0}}var R=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};class pn extends ct{getAgentsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(gi))})}getAgentsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(e,i)).value()})}getAgentsGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getAgentsGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(e,i)).value()})}getCallsSlaLogGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vt))})}getCallsSlaLogGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(e,i)).value()})}getCallsSlaLogGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getCallsSlaLogGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(e,i)).value()})}getChatsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(mi))})}getChatsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(e,i)).value()})}getChatsGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getChatsGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(e,i)).value()})}getChatsSlaLogGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vt))})}getChatsSlaLogGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(e,i)).value()})}getChatsSlaLogGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getChatsSlaLogGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(e,i)).value()})}getContactWidgetsCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getContactWidgetsCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(e,i)).value()})}getContactWidgetsListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vi))})}getContactWidgetsList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(e,i)).value()})}getCustomerGroupsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/customer_groups",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Kt))})}getCustomerGroupsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(e,i)).value()})}getDepartmensGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getDepartmensGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(e,i)).value()})}getDepartmentsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(bi))})}getDepartmentsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(e,i)).value()})}getEventLogsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(ki))})}getEventLogsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(e,i)).value()})}getEventLogsGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getEventLogsGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(e,i)).value()})}getInviteAgentsGridListRaw(e,i){return R(this,void 0,void 0,function*(){if(e.departmentId===null||e.departmentId===void 0)throw new Bt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/{departmentId}/invite/agents".replace("{departmentId}",encodeURIComponent(String(e.departmentId))),method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Ci))})}getInviteAgentsGridList(e,i){return R(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(e,i)).value()})}getLanguagesGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Li))})}getLanguagesGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(e,i)).value()})}getLanguagesGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getLanguagesGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(e,i)).value()})}getPlugindGridListRaw(e,i){return R(this,void 0,void 0,function*(){if(e.pluginPurpose===null||e.pluginPurpose===void 0)throw new Bt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.pluginPurpose!==void 0&&(n.pluginPurpose=e.pluginPurpose);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["plugin_settings.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/plugins",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(xi))})}getPlugindGridList(e,i){return R(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(e,i)).value()})}getTagsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tags",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Kt))})}getTagsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(e,i)).value()})}getTicketsGridDatasetRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets_new",method:"GET",headers:r,query:n},i);return new j(s,o=>Ri(o))})}getTicketsGridDataset(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(e,i)).value()})}getTicketsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(mn))})}getTicketsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(e,i)).value()})}getTicketsGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTicketsGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(e,i)).value()})}getTicketsSlaLogGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vt))})}getTicketsSlaLogGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(e,i)).value()})}getTicketsSlaLogGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTicketsSlaLogGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(e,i)).value()})}getTimeReportsGridListRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.sortField!==void 0&&(n._sortField=e.sortField),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Ai))})}getTimeReportsGridList(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(e,i)).value()})}getTimeReportsGridListCountRaw(e,i){return R(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTimeReportsGridListCount(e={},i){return R(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(e,i)).value()})}}const Jt={Asc:"ASC",Desc:"DESC"},He={Conversationid:"conversationid",Code:"code",Datecreated:"datecreated",Datechanged:"datechanged",Dateresolved:"dateresolved",Statuschanged:"statuschanged",Rorder:"rorder",Datedue:"datedue",Datereopen:"datereopen",Status:"status",ChannelType:"channel_type",Departmentid:"departmentid",Agentid:"agentid",Subject:"subject",Departmentname:"departmentname",Agentname:"agentname",Tags:"tags",MessagegroupsIn:"messagegroups_in",MessagegroupsOut:"messagegroups_out",Rstatus:"rstatus",LastActivity:"last_activity"},Ei={Conversationid:"conversationid",Code:"code",Datecreated:"datecreated",Datechanged:"datechanged",Dateresolved:"dateresolved",Statuschanged:"statuschanged",Rorder:"rorder",Datedue:"datedue",Datereopen:"datereopen",Status:"status",ChannelType:"channel_type",Departmentid:"departmentid",Agentid:"agentid",Subject:"subject",Departmentname:"departmentname",Agentname:"agentname",Tags:"tags",MessagegroupsIn:"messagegroups_in",MessagegroupsOut:"messagegroups_out",Rstatus:"rstatus",LastActivity:"last_activity"},qe=de(!1),vn=de([]),lt=de(null),et=de(null),Ge=de(!1),Qe=de(!1),_n=de({}),ve=de([]),yn=de(null),De=de(null),dt=de(!0),xt=de(Ei.Rorder),bn=de([]);function O(t){return he(bn)[t]||t}function Mi(t){oe(t,"svelte-117v9fk","span.svelte-117v9fk{margin-right:5px}.Selection.svelte-117v9fk{color:var(--ticket-selected-textcolor);background-color:var(--ticket-selected-bg);padding:6px 10px;border-radius:4px;font-size:12px;font-style:normal;font-weight:700;line-height:20px}.text.svelte-117v9fk{font-family:'Roboto', sans-serif;font-size:12px;line-height:20px}.many.svelte-117v9fk{color:var(--main-textcolor);padding:2px 12px;border:1px solid var(--menu-hover-bg);border-radius:4px;font-weight:500;font-size:12px;font-family:'Roboto', sans-serif;line-height:20px;cursor:pointer}.many.loading.svelte-117v9fk{border:none;padding:2px 0}")}function Ii(t){let e,i=O("Displaying ")+t[6].length+" "+O("of"),n,r,s,o=(t[1]?O("Loading.."):t[0]??O("many"))+"",a,u,l,c;return{c(){e=$("span"),n=se(i),r=U(),s=$("span"),a=se(o),v(e,"class","text svelte-117v9fk"),v(s,"class",u=ae(t[2])+" svelte-117v9fk")},m(d,f){D(d,e,f),b(e,n),D(d,r,f),D(d,s,f),b(s,a),l||(c=ce(s,"click",t[7]),l=!0)},p(d,f){f&64&&i!==(i=O("Displaying ")+d[6].length+" "+O("of"))&&le(n,i),f&3&&o!==(o=(d[1]?O("Loading.."):d[0]??O("many"))+"")&&le(a,o),f&4&&u!==(u=ae(d[2])+" svelte-117v9fk")&&v(s,"class",u)},d(d){d&&(N(e),N(r),N(s)),l=!1,c()}}}function Bi(t){let e;return{c(){e=$("span"),e.textContent=`${O("Loading...")}`,v(e,"class","text svelte-117v9fk")},m(i,n){D(i,e,n)},p:q,d(i){i&&N(e)}}}function Ki(t){let e;function i(s,o){return s[3]?Wi:s[4].length===1?Ui:Ji}let n=i(t),r=n(t);return{c(){r.c(),e=nt()},m(s,o){r.m(s,o),D(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&N(e),r.d(s)}}}function Ji(t){let e,i=t[4].length+" rows selected",n;return{c(){e=$("span"),n=se(i),v(e,"class","Selection svelte-117v9fk")},m(r,s){D(r,e,s),b(e,n)},p(r,s){s&16&&i!==(i=r[4].length+" rows selected")&&le(n,i)},d(r){r&&N(e)}}}function Ui(t){let e,i=t[4].length+" row selected",n;return{c(){e=$("span"),n=se(i),v(e,"class","Selection svelte-117v9fk")},m(r,s){D(r,e,s),b(e,n)},p(r,s){s&16&&i!==(i=r[4].length+" row selected")&&le(n,i)},d(r){r&&N(e)}}}function Wi(t){let e;function i(s,o){return s[4].length>0?Yi:Hi}let n=i(t),r=n(t);return{c(){r.c(),e=nt()},m(s,o){r.m(s,o),D(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&N(e),r.d(s)}}}function Hi(t){let e;return{c(){e=$("span"),e.textContent=`${O("all rows selected")}`,v(e,"class","Selection svelte-117v9fk")},m(i,n){D(i,e,n)},p:q,d(i){i&&N(e)}}}function Yi(t){let e;function i(s,o){return s[4].length===1?Vi:Pi}let n=i(t),r=n(t);return{c(){r.c(),e=nt()},m(s,o){r.m(s,o),D(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&N(e),r.d(s)}}}function Pi(t){let e,i=O("all rows selected except")+" "+t[4].length+" "+O("rows"),n;return{c(){e=$("span"),n=se(i),v(e,"class","Selection svelte-117v9fk")},m(r,s){D(r,e,s),b(e,n)},p(r,s){s&16&&i!==(i=O("all rows selected except")+" "+r[4].length+" "+O("rows"))&&le(n,i)},d(r){r&&N(e)}}}function Vi(t){let e,i=O("all rows selected except")+" "+t[4].length+" "+O("row"),n;return{c(){e=$("span"),n=se(i),v(e,"class","Selection svelte-117v9fk")},m(r,s){D(r,e,s),b(e,n)},p(r,s){s&16&&i!==(i=O("all rows selected except")+" "+r[4].length+" "+O("row"))&&le(n,i)},d(r){r&&N(e)}}}function qi(t){let e;function i(s,o){return s[3]||s[4].length>0?Ki:s[5]?Bi:Ii}let n=i(t),r=n(t);return{c(){r.c(),e=nt()},m(s,o){r.m(s,o),D(s,e,o)},p(s,[o]){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},i:q,o:q,d(s){s&&N(e),r.d(s)}}}function Qi(t,e,i){let n,r,s,o,a,u;ie(t,et,m=>i(8,n=m)),ie(t,lt,m=>i(9,r=m)),ie(t,qe,m=>i(3,s=m)),ie(t,vn,m=>i(4,o=m)),ie(t,Ge,m=>i(5,a=m)),ie(t,ve,m=>i(6,u=m));let l=null,c=!1,d="many";function f(){i(0,l=null)}async function h(){i(2,d="many loading"),i(1,c=!0);let m=await r.getTicketsGridListCount({filters:n,timezoneOffset:new Date().getTimezoneOffset()});i(0,l=m.count),i(1,c=!1)}return t.$$.update=()=>{t.$$.dirty&256&&n&&f()},[l,c,d,s,o,a,u,h,n]}class Zi extends te{constructor(e){super(),ee(this,e,Qi,qi,Z,{},Mi)}}async function tt(t=!1){if(!(he(Ge)||!he(lt))&&(t&&(De.set(null),Qe.set(!1)),!(!he(De)&&he(Qe)))){Ge.set(!0);try{const i=await(await he(lt).getTicketsGridDatasetRaw(Xi())).value();t&&ve.set([]),ve.set([...he(ve),...i.rows]),De.set(i.cursor),Qe.set(!0)}catch(e){yn.set(e.toString())}Ge.set(!1)}}function Xi(){return{perPage:20,sortDir:he(dt)?Jt.Asc:Jt.Desc,filters:he(et),sortField:he(xt),cursor:he(De)?he(De):""}}function ji(t){oe(t,"svelte-pooz0s",".Head.svelte-pooz0s.svelte-pooz0s{display:none}.headCheckbox.svelte-pooz0s.svelte-pooz0s{width:20px}button.svelte-pooz0s.svelte-pooz0s{border:none;background:none;font-size:13px;font-weight:400;color:var(--main-lighter-textcolor)}.spinner.svelte-pooz0s.svelte-pooz0s{font-size:16px;cursor:pointer}.rightPanel.svelte-pooz0s.svelte-pooz0s{margin-inline-start:auto}.Sorting.svelte-pooz0s.svelte-pooz0s{cursor:pointer;text-align:left;font-weight:bold}.loading.svelte-pooz0s.svelte-pooz0s{animation-name:svelte-pooz0s-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-pooz0s-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@media screen and (min-width: 768px){.Head.svelte-pooz0s.svelte-pooz0s{display:flex;position:sticky;top:0;color:var(--panel_text_color);margin-bottom:20px;align-items:center;font-size:14px;font-family:'Roboto', sans-serif;border-bottom:1px solid var(--main-lighter-textcolor);padding:0 23px 6px 23px}.headCheckbox.svelte-pooz0s input[type=checkbox].svelte-pooz0s{vertical-align:middle;cursor:pointer}.headCheckbox.svelte-pooz0s.svelte-pooz0s{margin-right:20px}}")}function er(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,m,p,S,_,K,G;return s=new $e({props:{iconLaClassName:"la-filter",className:"FilterIcon"}}),c=new $e({props:{iconLaClassName:"la-show"}}),h=new Zi({}),S=new $e({props:{iconLaClassName:"la-refresh"}}),{c(){e=$("div"),i=$("div"),n=$("input"),r=U(),B(s.$$.fragment),o=U(),a=$("button"),u=se(t[0]),l=U(),B(c.$$.fragment),d=U(),f=$("div"),B(h.$$.fragment),m=U(),p=$("button"),B(S.$$.fragment),v(n,"type","checkbox"),v(n,"class","svelte-pooz0s"),v(i,"class","headCheckbox svelte-pooz0s"),v(a,"class","Sorting svelte-pooz0s"),v(p,"class","spinner svelte-pooz0s"),v(p,"title",O("Reload")),Mt(p,"loading",t[3]),v(f,"class","rightPanel svelte-pooz0s"),v(e,"class","Head svelte-pooz0s")},m(k,W){D(k,e,W),b(e,i),b(i,n),n.checked=t[2],b(e,r),M(s,e,null),b(e,o),b(e,a),b(a,u),t[7](a),b(e,l),M(c,e,null),b(e,d),b(e,f),M(h,f,null),b(f,m),b(f,p),M(S,p,null),_=!0,K||(G=[ce(n,"change",t[6]),ce(n,"click",t[4]),ce(a,"click",t[5]),ce(p,"click",t[8])],K=!0)},p(k,[W]){W&4&&(n.checked=k[2]),(!_||W&1)&&le(u,k[0]),(!_||W&8)&&Mt(p,"loading",k[3])},i(k){_||(w(s.$$.fragment,k),w(c.$$.fragment,k),w(h.$$.fragment,k),w(S.$$.fragment,k),_=!0)},o(k){T(s.$$.fragment,k),T(c.$$.fragment,k),T(h.$$.fragment,k),T(S.$$.fragment,k),_=!1},d(k){k&&N(e),I(s),t[7](null),I(c),I(h),I(S),K=!1,Le(G)}}}function tr(t,e,i){let n,r;ie(t,dt,p=>i(11,p)),ie(t,qe,p=>i(2,n=p)),ie(t,Ge,p=>i(3,r=p));let{currentFilter:s}=e;const o=cn();let a,u,l;function c(){qe.set(!n),ve.update(p=>p.map(S=>({...S,__selected:n})))}function d(){a=u.getBoundingClientRect(),l=`position: absolute; top: ${a.bottom-58}px; left: ${a.left-265}px;`,o("openModal",{dialogStyles:l})}function f(){n=this.checked,qe.set(n)}function h(p){Ee[p?"unshift":"push"](()=>{u=p,i(1,u)})}const m=()=>tt(!0);return t.$$set=p=>{"currentFilter"in p&&i(0,s=p.currentFilter)},[s,u,n,r,c,d,f,h,m]}class nr extends te{constructor(e){super(),ee(this,e,tr,er,Z,{currentFilter:0},ji)}}function Te(t){switch(t){case"A":return{bg:"var(--ticket-status-answered-background)",text:"var(--ticket-status-answered-text)",border:"var(--ticket-status-answered-border)"};case"T":return{bg:"var(--ticket-status-chat-background)",text:"var(--ticket-status-chat-text)",border:"var(--ticket-status-chat-border)"};case"P":return{bg:"var(--ticket-status-phone-background)",text:"var(--ticket-status-phone-text)",border:"var(--ticket-status-phone-border)"};case"X":return{bg:"var(--ticket-status-deleted-background)",text:"var(--ticket-status-deleted-text)",border:"var(--ticket-status-deleted-border)"};case"B":return{bg:"var(--ticket-status-new-background)",text:"var(--ticket-status-new-text)",border:"var(--ticket-status-new-border)"};case"I":return{bg:"var(--ticket-status-deleted-background)",text:"var(--ticket-status-deleted-text)",border:"var(--ticket-status-deleted-border)"};case"R":return{bg:"var(--ticket-status-resolved-background)",text:"var(--ticket-status-resolved-text)",border:"var(--ticket-status-resolved-border)"};case"N":return{bg:"var(--ticket-status-new-background)",text:"var(--ticket-status-new-text)",border:"var(--ticket-status-new-border)"};case"C":return{bg:"var(--ticket-status-open-background)",text:"var(--ticket-status-open-text)",border:"var(--ticket-status-open-border)"};case"W":return{bg:"var(--ticket-status-postponed-background)",text:"var(--ticket-status-postponed-text)",border:"var(--ticket-status-postponed-border)"};default:return{bg:"",text:"",border:""}}}const ir=()=>{const t=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#FFEB3B","#FFC107","#FF5722","#795548"],e=Math.floor(Math.random()*t.length);return t[e]},rr=t=>{let e=t.split(" ");return e.length>1?e=e.shift().charAt(0)+e.pop().charAt(0):e=t.substring(0,2),e.toUpperCase()};function sr(t){oe(t,"svelte-hbozhk",".wrapper.svelte-hbozhk{position:relative;width:var(--size);height:var(--size)}.innerImage.svelte-hbozhk,.innerInitials.svelte-hbozhk,.imageLoading.svelte-hbozhk{display:block;width:100%;height:100%;border-radius:var(--borderRadius)}.innerInitials.svelte-hbozhk{line-height:var(--size);background-color:var(--bgColor);color:var(--textColor);text-align:center;font-size:calc(var(--size) / (var(--abbrLength) + 0.5))}.imageLoading.svelte-hbozhk{background-color:var(--bgColor)}.imageLoading.svelte-hbozhk::before{content:'';display:block;height:100%;width:100%;background:linear-gradient(90deg, transparent, #ffffff38, transparent);position:absolute;top:0;left:0;animation:svelte-hbozhk-skeleton-animation 1.2s linear infinite}@keyframes svelte-hbozhk-skeleton-animation{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}")}function or(t){let e;return{c(){e=$("div"),e.textContent=`${t[10]}`,v(e,"class","innerInitials svelte-hbozhk")},m(i,n){D(i,e,n)},p:q,d(i){i&&N(e)}}}function ar(t){let e,i,n,r,s,o;return{c(){e=$("div"),i=$("img"),v(i,"alt",""),v(i,"class",ae("innerImage")+" svelte-hbozhk"),_t(i.src,n=t[2])||v(i,"src",n),v(e,"class",r=ae(t[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){D(a,e,u),b(e,i),s||(o=[ce(i,"error",t[15]),ce(i,"load",t[16])],s=!0)},p(a,u){u&4&&!_t(i.src,n=a[2])&&v(i,"src",n),u&256&&r!==(r=ae(a[8]?"imageLoading":"")+" svelte-hbozhk")&&v(e,"class",r)},d(a){a&&N(e),s=!1,Le(o)}}}function lr(t){let e,i;function n(o,a){return o[2]&&!o[7]?ar:or}let r=n(t),s=r(t);return{c(){e=$("div"),s.c(),v(e,"aria-label",t[1]),v(e,"class","wrapper svelte-hbozhk"),v(e,"style",i=t[0]+"--borderRadius:"+(t[6]?0:t[5])+"; --size:"+t[4]+"; --bgColor:"+t[9]+"; --src:"+t[2]+"; --textColor:"+t[3]+"; --abbrLength:"+t[11])},m(o,a){D(o,e,a),s.m(e,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(e,null))),a&2&&v(e,"aria-label",o[1]),a&125&&i!==(i=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&v(e,"style",i)},i:q,o:q,d(o){o&&N(e),s.d()}}}function ur(t,e,i){let{style:n=""}=e,{name:r="Avatar"}=e,{initials:s}=e,{src:o}=e,{bgColor:a="lightGrey"}=e,{textColor:u="white"}=e,{size:l="50px"}=e,{borderRadius:c="50%"}=e,{square:d=!1}=e,{randomBgColor:f=!1}=e;const h=f?ir():a,m=s||rr(r),p=m.length;let S=!1,_=!0;const K=()=>i(7,S=!0),G=()=>i(8,_=!1);return t.$$set=k=>{"style"in k&&i(0,n=k.style),"name"in k&&i(1,r=k.name),"initials"in k&&i(12,s=k.initials),"src"in k&&i(2,o=k.src),"bgColor"in k&&i(13,a=k.bgColor),"textColor"in k&&i(3,u=k.textColor),"size"in k&&i(4,l=k.size),"borderRadius"in k&&i(5,c=k.borderRadius),"square"in k&&i(6,d=k.square),"randomBgColor"in k&&i(14,f=k.randomBgColor)},[n,r,o,u,l,c,d,S,_,h,m,p,s,a,f,K,G]}class cr extends te{constructor(e){super(),ee(this,e,ur,lr,Z,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},sr)}}function dr(t){let e,i;return e=new cr({props:{bgColor:t[0],name:t[1],src:t[2],initials:t[3],size:"40px"}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.bgColor=n[0]),r&2&&(s.name=n[1]),r&4&&(s.src=n[2]),r&8&&(s.initials=n[3]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function fr(t,e,i){let{bgColor:n}=e,{name:r}=e,{src:s}=e,{initials:o}=e;return t.$$set=a=>{"bgColor"in a&&i(0,n=a.bgColor),"name"in a&&i(1,r=a.name),"src"in a&&i(2,s=a.src),"initials"in a&&i(3,o=a.initials)},[n,r,s,o]}class gr extends te{constructor(e){super(),ee(this,e,fr,dr,Z,{bgColor:0,name:1,src:2,initials:3})}}var wn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var kn={exports:{}},$n={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(i,n){return i<<n|i>>>32-n},rotr:function(i,n){return i<<32-n|i>>>n},endian:function(i){if(i.constructor==Number)return e.rotl(i,8)&16711935|e.rotl(i,24)&4278255360;for(var n=0;n<i.length;n++)i[n]=e.endian(i[n]);return i},randomBytes:function(i){for(var n=[];i>0;i--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(i){for(var n=[],r=0,s=0;r<i.length;r++,s+=8)n[s>>>5]|=i[r]<<24-s%32;return n},wordsToBytes:function(i){for(var n=[],r=0;r<i.length*32;r+=8)n.push(i[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(i){for(var n=[],r=0;r<i.length;r++)n.push((i[r]>>>4).toString(16)),n.push((i[r]&15).toString(16));return n.join("")},hexToBytes:function(i){for(var n=[],r=0;r<i.length;r+=2)n.push(parseInt(i.substr(r,2),16));return n},bytesToBase64:function(i){for(var n=[],r=0;r<i.length;r+=3)for(var s=i[r]<<16|i[r+1]<<8|i[r+2],o=0;o<4;o++)r*8+o*6<=i.length*8?n.push(t.charAt(s>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<i.length;s=++r%4)s!=0&&n.push((t.indexOf(i.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(i.charAt(r))>>>6-s*2);return n}};$n.exports=e})();var hr=$n.exports,kt={utf8:{stringToBytes:function(t){return kt.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(kt.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],i=0;i<t.length;i++)e.push(t.charCodeAt(i)&255);return e},bytesToString:function(t){for(var e=[],i=0;i<t.length;i++)e.push(String.fromCharCode(t[i]));return e.join("")}}},Ut=kt;/*!
2
2
  * Determine if an object is a Buffer
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
5
5
  * @license MIT
6
- */var _r=function(t){return t!=null&&(Tn(t)||vr(t)||!!t._isBuffer)};function Tn(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function vr(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Tn(t.slice(0,0))}(function(){var t=pr,e=Ut.utf8,i=_r,n=Ut.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=e.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=t.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,d=-1732584194,f=271733878,h=0;h<a.length;h++)a[h]=(a[h]<<8|a[h]>>>24)&16711935|(a[h]<<24|a[h]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var m=r._ff,v=r._gg,S=r._hh,p=r._ii,h=0;h<a.length;h+=16){var L=l,H=c,R=d,P=f;l=m(l,c,d,f,a[h+0],7,-680876936),f=m(f,l,c,d,a[h+1],12,-389564586),d=m(d,f,l,c,a[h+2],17,606105819),c=m(c,d,f,l,a[h+3],22,-1044525330),l=m(l,c,d,f,a[h+4],7,-176418897),f=m(f,l,c,d,a[h+5],12,1200080426),d=m(d,f,l,c,a[h+6],17,-1473231341),c=m(c,d,f,l,a[h+7],22,-45705983),l=m(l,c,d,f,a[h+8],7,1770035416),f=m(f,l,c,d,a[h+9],12,-1958414417),d=m(d,f,l,c,a[h+10],17,-42063),c=m(c,d,f,l,a[h+11],22,-1990404162),l=m(l,c,d,f,a[h+12],7,1804603682),f=m(f,l,c,d,a[h+13],12,-40341101),d=m(d,f,l,c,a[h+14],17,-1502002290),c=m(c,d,f,l,a[h+15],22,1236535329),l=v(l,c,d,f,a[h+1],5,-165796510),f=v(f,l,c,d,a[h+6],9,-1069501632),d=v(d,f,l,c,a[h+11],14,643717713),c=v(c,d,f,l,a[h+0],20,-373897302),l=v(l,c,d,f,a[h+5],5,-701558691),f=v(f,l,c,d,a[h+10],9,38016083),d=v(d,f,l,c,a[h+15],14,-660478335),c=v(c,d,f,l,a[h+4],20,-405537848),l=v(l,c,d,f,a[h+9],5,568446438),f=v(f,l,c,d,a[h+14],9,-1019803690),d=v(d,f,l,c,a[h+3],14,-187363961),c=v(c,d,f,l,a[h+8],20,1163531501),l=v(l,c,d,f,a[h+13],5,-1444681467),f=v(f,l,c,d,a[h+2],9,-51403784),d=v(d,f,l,c,a[h+7],14,1735328473),c=v(c,d,f,l,a[h+12],20,-1926607734),l=S(l,c,d,f,a[h+5],4,-378558),f=S(f,l,c,d,a[h+8],11,-2022574463),d=S(d,f,l,c,a[h+11],16,1839030562),c=S(c,d,f,l,a[h+14],23,-35309556),l=S(l,c,d,f,a[h+1],4,-1530992060),f=S(f,l,c,d,a[h+4],11,1272893353),d=S(d,f,l,c,a[h+7],16,-155497632),c=S(c,d,f,l,a[h+10],23,-1094730640),l=S(l,c,d,f,a[h+13],4,681279174),f=S(f,l,c,d,a[h+0],11,-358537222),d=S(d,f,l,c,a[h+3],16,-722521979),c=S(c,d,f,l,a[h+6],23,76029189),l=S(l,c,d,f,a[h+9],4,-640364487),f=S(f,l,c,d,a[h+12],11,-421815835),d=S(d,f,l,c,a[h+15],16,530742520),c=S(c,d,f,l,a[h+2],23,-995338651),l=p(l,c,d,f,a[h+0],6,-198630844),f=p(f,l,c,d,a[h+7],10,1126891415),d=p(d,f,l,c,a[h+14],15,-1416354905),c=p(c,d,f,l,a[h+5],21,-57434055),l=p(l,c,d,f,a[h+12],6,1700485571),f=p(f,l,c,d,a[h+3],10,-1894986606),d=p(d,f,l,c,a[h+10],15,-1051523),c=p(c,d,f,l,a[h+1],21,-2054922799),l=p(l,c,d,f,a[h+8],6,1873313359),f=p(f,l,c,d,a[h+15],10,-30611744),d=p(d,f,l,c,a[h+6],15,-1560198380),c=p(c,d,f,l,a[h+13],21,1309151649),l=p(l,c,d,f,a[h+4],6,-145523070),f=p(f,l,c,d,a[h+11],10,-1120210379),d=p(d,f,l,c,a[h+2],15,718787259),c=p(c,d,f,l,a[h+9],21,-343485551),l=l+L>>>0,c=c+H>>>0,d=d+R>>>0,f=f+P>>>0}return t.endian([l,c,d,f])};r._ff=function(s,o,a,u,l,c,d){var f=s+(o&a|~o&u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._gg=function(s,o,a,u,l,c,d){var f=s+(o&u|a&~u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._hh=function(s,o,a,u,l,c,d){var f=s+(o^a^u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._ii=function(s,o,a,u,l,c,d){var f=s+(a^(o|~u))+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._blocksize=16,r._digestsize=16,$n.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=t.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):t.bytesToHex(a)}})();var yr=$n.exports;const br=Dt(yr);function wr(t){return[...t].reduce((e,i)=>Math.imul(31,e)+i.charCodeAt(0)|0,0)}function kr(t){oe(t,"svelte-1rap1nb",".Column.svelte-1rap1nb{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(min-width: 768px){.Column.importanceColumn.svelte-1rap1nb{display:flex;flex-direction:column;justify-content:space-around;align-items:flex-start}.Column.statusColumn.svelte-1rap1nb{display:flex;flex-direction:column;justify-content:space-around;align-items:flex-start}}")}function $r(t){let e,i,n;const r=t[2].default,s=Me(r,t,t[1],null);return{c(){e=k("div"),s&&s.c(),_(e,"class",i="Column "+t[0]+" svelte-1rap1nb")},m(o,a){x(o,e,a),s&&s.m(e,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&Be(s,r,o,o[1],n?Ie(r,o[1],a,null):Ke(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-1rap1nb"))&&_(e,"class",i)},i(o){n||(w(s,o),n=!0)},o(o){$(s,o),n=!1},d(o){o&&D(e),s&&s.d(o)}}}function Cr(t,e,i){let{$$slots:n={},$$scope:r}=e,{className:s=""}=e;return t.$$set=o=>{"className"in o&&i(0,s=o.className),"$$scope"in o&&i(1,r=o.$$scope)},[s,r,n]}class xt extends te{constructor(e){super(),ee(this,e,Cr,$r,q,{className:0},kr)}}function Tr(t){oe(t,"svelte-1ujeu71",`.Tag.svelte-1ujeu71{display:inline-block;color:var(--main-textcolor);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-1ujeu71:before{font-family:"la-icon-font"}.SLA.svelte-1ujeu71{border:1px solid var(--main-lighter-textcolor);border-radius:4px;color:var(--main-lighter-textcolor)
7
- }`)}function Lr(t){let e,i,n,r,s,o;const a=t[4].default,u=Me(a,t,t[3],null);return{c(){e=k("div"),u&&u.c(),i=W(),n=k("span"),r=se(t[0]),_(n,"class","text"),_(e,"class",s="Tag "+t[1]+" svelte-1ujeu71"),_(e,"style",t[2])},m(l,c){x(l,e,c),u&&u.m(e,null),b(e,i),b(e,n),b(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Be(u,a,l,l[3],o?Ie(a,l[3],c,null):Ke(l[3]),null),(!o||c&1)&&le(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1ujeu71"))&&_(e,"class",s),(!o||c&4)&&_(e,"style",l[2])},i(l){o||(w(u,l),o=!0)},o(l){$(u,l),o=!1},d(l){l&&D(e),u&&u.d(l)}}}function Sr(t,e,i){let{$$slots:n={},$$scope:r}=e,{text:s}=e,{className:o=""}=e,{style:a=""}=e;return t.$$set=u=>{"text"in u&&i(0,s=u.text),"className"in u&&i(1,o=u.className),"style"in u&&i(2,a=u.style),"$$scope"in u&&i(3,r=u.$$scope)},[s,o,a,r,n]}class ft extends te{constructor(e){super(),ee(this,e,Sr,Lr,q,{text:0,className:1,style:2},Tr)}}function Nr(t){oe(t,"svelte-1ify73x","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}.IconTag .Icon{display:flex;align-items:center;justify-content:center;font-size:16px;width:16px;height:16px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function Dr(t){let e,i;return e=new $e({props:{iconLaClassName:t[2]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function xr(t){let e,i;return e=new ft({props:{text:t[0],className:t[3],style:t[1],$$slots:{default:[Dr]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.text=n[0]),r&2&&(s.style=n[1]),r&36&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Or(t,e,i){let{text:n}=e,{className:r=""}=e,{style:s=""}=e,{iconLaClassName:o}=e,a=`IconTag ${r}`;return t.$$set=u=>{"text"in u&&i(0,n=u.text),"className"in u&&i(4,r=u.className),"style"in u&&i(1,s=u.style),"iconLaClassName"in u&&i(2,o=u.iconLaClassName)},[n,s,o,a,r]}class gt extends te{constructor(e){super(),ee(this,e,Or,xr,q,{text:0,className:4,style:1,iconLaClassName:2},Nr)}}function Fr(t){oe(t,"svelte-z82bt4",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}div.Tag.NoCompanyTag{color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-z82bt4{display:none}.companyTag.svelte-z82bt4{display:none}.name.svelte-z82bt4{font-size:13px;line-height:20px;font-weight:bold;padding-right:8px;margin-right:6px;position:relative}.name.svelte-z82bt4::after{content:'';display:block;height:14px;width:1px;background-color:var(--main-textcolor);position:absolute;right:0;top:15%}.no.name.svelte-z82bt4{font-weight:400;color:var(--main-lighter-textcolor)}.email.svelte-z82bt4{font-size:13px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.texts.svelte-z82bt4{display:flex;flex-direction:row;justify-content:flex-start;overflow:hidden}@media(min-width: 900px){.avatar.svelte-z82bt4{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-z82bt4{padding:0;border:none}.name.svelte-z82bt4::after{display:none}.email.svelte-z82bt4{padding:0}.companyTag.svelte-z82bt4{display:flex}.texts.svelte-z82bt4{display:flex;flex-direction:column;justify-content:space-around}}")}function Wt(t){let e,i;const n=[t[2]];let r={};for(let s=0;s<n.length;s+=1)r=Xe(r,n[s]);return e=new mr({props:r}),{c(){K(e.$$.fragment)},m(s,o){M(e,s,o),i=!0},p(s,o){const a=o&4?fn(n,[qn(s[2])]):{};e.$set(a)},i(s){i||(w(e.$$.fragment,s),i=!0)},o(s){$(e.$$.fragment,s),i=!1},d(s){I(e,s)}}}function Rr(t){let e,i=t[2].name,n,r,s,o=(t[3]!==void 0?t[3]:"No name")+"",a,u,l,c,d=t[0].emails+"",f,h,m,v,S,p=Wt(t);return v=new gt({props:{text:t[0].company==="Y"?"Company":A("No Company"),className:(t[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){e=k("div"),p.c(),n=W(),r=k("div"),s=k("div"),a=se(o),l=W(),c=k("div"),f=se(d),h=W(),m=k("div"),K(v.$$.fragment),_(e,"class","avatar svelte-z82bt4"),_(s,"class",u=ce(t[3]?"name":"no name")+" svelte-z82bt4"),_(c,"class","email svelte-z82bt4"),_(m,"class","companyTag svelte-z82bt4"),_(r,"class","texts svelte-z82bt4")},m(L,H){x(L,e,H),p.m(e,null),x(L,n,H),x(L,r,H),b(r,s),b(s,a),b(r,l),b(r,c),b(c,f),b(r,h),b(r,m),M(v,m,null),S=!0},p(L,H){H&4&&q(i,i=L[2].name)?(ve(),$(p,1,1,Z),ye(),p=Wt(L),p.c(),w(p,1),p.m(e,null)):p.p(L,H),(!S||H&8)&&o!==(o=(L[3]!==void 0?L[3]:"No name")+"")&&le(a,o),(!S||H&8&&u!==(u=ce(L[3]?"name":"no name")+" svelte-z82bt4"))&&_(s,"class",u),(!S||H&1)&&d!==(d=L[0].emails+"")&&le(f,d);const R={};H&1&&(R.text=L[0].company==="Y"?"Company":A("No Company")),H&1&&(R.className=(L[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),v.$set(R)},i(L){S||(w(p),w(v.$$.fragment,L),S=!0)},o(L){$(p),$(v.$$.fragment,L),S=!1},d(L){L&&(D(e),D(n),D(r)),p.d(L),I(v)}}}function Ar(t){let e,i;return e=new xt({props:{className:t[1],$$slots:{default:[Rr]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&141&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function zr(t,e,i){if(!t)return(i[0]+i[1]).toUpperCase();let n=t[0];return e&&(n+=e[0]),n}function Gr(t,e,i){let n,r,{row:s}=e,{className:o="userColumn"}=e;function a(c,d,f){if(!c)return"";let h=c+" "+d;return h.trim()||(h=f),h}function u(c,d){let f=c;return f||(f="https://www.gravatar.com/avatar/"+br(d[0]??"")+"?s=200&d=404"),f}function l(c,d,f,h){let m;h?m=wr(a(c,d,h)+f):m=Math.floor(Math.random()*16777215);let v=(m&16711680)>>16,S=(m&65280)>>8,p=m&255;return v+S+p<150&&(v=150),v+S+p>400&&(v=0),`rgb(${v},${S},${p})`}return t.$$set=c=>{"row"in c&&i(0,s=c.row),"className"in c&&i(1,o=c.className)},t.$$.update=()=>{t.$$.dirty&1&&i(3,n=s.name),t.$$.dirty&1&&i(2,r={bgColor:l(s.firstname,s.lastname,s.emails,s.systemName),name:a(s.firstname,s.lastname,s.systemName),src:u(s.avatarUrl,s.emails),initials:zr(s.firstname,s.lastname,s.systemName)})},[s,o,r,n]}class Er extends te{constructor(e){super(),ee(this,e,Gr,Ar,q,{row:0,className:1},Fr)}}var Ln={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(kn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",d="month",f="quarter",h="year",m="date",v="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,L={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var T=["th","st","nd","rd"],y=E%100;return"["+E+(T[(y-20)%10]||T[y]||T[0])+"]"}},H=function(E,T,y){var N=String(E);return!N||N.length>=T?E:""+Array(T+1-N.length).join(y)+E},R={s:H,z:function(E){var T=-E.utcOffset(),y=Math.abs(T),N=Math.floor(y/60),C=y%60;return(T<=0?"+":"-")+H(N,2,"0")+":"+H(C,2,"0")},m:function E(T,y){if(T.date()<y.date())return-E(y,T);var N=12*(y.year()-T.year())+(y.month()-T.month()),C=T.clone().add(N,d),G=y-C<0,J=T.clone().add(N+(G?-1:1),d);return+(-(N+(y-C)/(G?C-J:J-C))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:d,y:h,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:f}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},P="en",z={};z[P]=L;var B="$isDayjsObject",U=function(E){return E instanceof be||!(!E||!E[B])},ne=function E(T,y,N){var C;if(!T)return P;if(typeof T=="string"){var G=T.toLowerCase();z[G]&&(C=G),y&&(z[G]=y,C=G);var J=T.split("-");if(!C&&J.length>1)return E(J[0])}else{var Q=T.name;z[Q]=T,C=Q}return!N&&C&&(P=C),C||!N&&P},X=function(E,T){if(U(E))return E.clone();var y=typeof T=="object"?T:{};return y.date=E,y.args=arguments,new be(y)},V=R;V.l=ne,V.i=U,V.w=function(E,T){return X(E,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var be=function(){function E(y){this.$L=ne(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[B]=!0}var T=E.prototype;return T.parse=function(y){this.$d=function(N){var C=N.date,G=N.utc;if(C===null)return new Date(NaN);if(V.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var J=C.match(S);if(J){var Q=J[2]-1||0,ie=(J[7]||"0").substring(0,3);return G?new Date(Date.UTC(J[1],Q,J[3]||1,J[4]||0,J[5]||0,J[6]||0,ie)):new Date(J[1],Q,J[3]||1,J[4]||0,J[5]||0,J[6]||0,ie)}}return new Date(C)}(y),this.init()},T.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},T.$utils=function(){return V},T.isValid=function(){return this.$d.toString()!==v},T.isSame=function(y,N){var C=X(y);return this.startOf(N)<=C&&C<=this.endOf(N)},T.isAfter=function(y,N){return X(y)<this.startOf(N)},T.isBefore=function(y,N){return this.endOf(N)<X(y)},T.$g=function(y,N,C){return V.u(y)?this[N]:this.set(C,y)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(y,N){var C=this,G=!!V.u(N)||N,J=V.p(y),Q=function(Le,fe){var Ce=V.w(C.$u?Date.UTC(C.$y,fe,Le):new Date(C.$y,fe,Le),C);return G?Ce:Ce.endOf(l)},ie=function(Le,fe){return V.w(C.toDate()[Le].apply(C.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(fe)),C)},O=this.$W,Y=this.$M,ue=this.$D,ke="set"+(this.$u?"UTC":"");switch(J){case h:return G?Q(1,0):Q(31,11);case d:return G?Q(1,Y):Q(0,Y+1);case c:var me=this.$locale().weekStart||0,Je=(O<me?O+7:O)-me;return Q(G?ue-Je:ue+(6-Je),Y);case l:case m:return ie(ke+"Hours",0);case u:return ie(ke+"Minutes",1);case a:return ie(ke+"Seconds",2);case o:return ie(ke+"Milliseconds",3);default:return this.clone()}},T.endOf=function(y){return this.startOf(y,!1)},T.$set=function(y,N){var C,G=V.p(y),J="set"+(this.$u?"UTC":""),Q=(C={},C[l]=J+"Date",C[m]=J+"Date",C[d]=J+"Month",C[h]=J+"FullYear",C[u]=J+"Hours",C[a]=J+"Minutes",C[o]=J+"Seconds",C[s]=J+"Milliseconds",C)[G],ie=G===l?this.$D+(N-this.$W):N;if(G===d||G===h){var O=this.clone().set(m,1);O.$d[Q](ie),O.init(),this.$d=O.set(m,Math.min(this.$D,O.daysInMonth())).$d}else Q&&this.$d[Q](ie);return this.init(),this},T.set=function(y,N){return this.clone().$set(y,N)},T.get=function(y){return this[V.p(y)]()},T.add=function(y,N){var C,G=this;y=Number(y);var J=V.p(N),Q=function(Y){var ue=X(G);return V.w(ue.date(ue.date()+Math.round(Y*y)),G)};if(J===d)return this.set(d,this.$M+y);if(J===h)return this.set(h,this.$y+y);if(J===l)return Q(1);if(J===c)return Q(7);var ie=(C={},C[a]=n,C[u]=r,C[o]=i,C)[J]||1,O=this.$d.getTime()+y*ie;return V.w(O,this)},T.subtract=function(y,N){return this.add(-1*y,N)},T.format=function(y){var N=this,C=this.$locale();if(!this.isValid())return C.invalidDate||v;var G=y||"YYYY-MM-DDTHH:mm:ssZ",J=V.z(this),Q=this.$H,ie=this.$m,O=this.$M,Y=C.weekdays,ue=C.months,ke=C.meridiem,me=function(fe,Ce,Ue,rt){return fe&&(fe[Ce]||fe(N,G))||Ue[Ce].slice(0,rt)},Je=function(fe){return V.s(Q%12||12,fe,"0")},Le=ke||function(fe,Ce,Ue){var rt=fe<12?"AM":"PM";return Ue?rt.toLowerCase():rt};return G.replace(p,function(fe,Ce){return Ce||function(Ue){switch(Ue){case"YY":return String(N.$y).slice(-2);case"YYYY":return V.s(N.$y,4,"0");case"M":return O+1;case"MM":return V.s(O+1,2,"0");case"MMM":return me(C.monthsShort,O,ue,3);case"MMMM":return me(ue,O);case"D":return N.$D;case"DD":return V.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return me(C.weekdaysMin,N.$W,Y,2);case"ddd":return me(C.weekdaysShort,N.$W,Y,3);case"dddd":return Y[N.$W];case"H":return String(Q);case"HH":return V.s(Q,2,"0");case"h":return Je(1);case"hh":return Je(2);case"a":return Le(Q,ie,!0);case"A":return Le(Q,ie,!1);case"m":return String(ie);case"mm":return V.s(ie,2,"0");case"s":return String(N.$s);case"ss":return V.s(N.$s,2,"0");case"SSS":return V.s(N.$ms,3,"0");case"Z":return J}return null}(fe)||J.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(y,N,C){var G,J=this,Q=V.p(N),ie=X(y),O=(ie.utcOffset()-this.utcOffset())*n,Y=this-ie,ue=function(){return V.m(J,ie)};switch(Q){case h:G=ue()/12;break;case d:G=ue();break;case f:G=ue()/3;break;case c:G=(Y-O)/6048e5;break;case l:G=(Y-O)/864e5;break;case u:G=Y/r;break;case a:G=Y/n;break;case o:G=Y/i;break;default:G=Y}return C?G:V.a(G)},T.daysInMonth=function(){return this.endOf(d).$D},T.$locale=function(){return z[this.$L]},T.locale=function(y,N){if(!y)return this.$L;var C=this.clone(),G=ne(y,N,!0);return G&&(C.$L=G),C},T.clone=function(){return V.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},E}(),we=be.prototype;return X.prototype=we,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",h],["$D",m]].forEach(function(E){we[E[1]]=function(T){return this.$g(T,E[0],E[1])}}),X.extend=function(E,T){return E.$i||(E(T,be,X),E.$i=!0),X},X.locale=ne,X.isDayjs=U,X.unix=function(E){return X(1e3*E)},X.en=z[P],X.Ls=z,X.p={},X})})(Ln);var Mr=Ln.exports;const Ye=Dt(Mr);var Sn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(kn,function(){return function(i,n,r){i=i||{};var s=n.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,c,d,f){return s.fromToBase(l,c,d,f)}r.en.relativeTime=o,s.fromToBase=function(l,c,d,f,h){for(var m,v,S,p=d.$locale().relativeTime||o,L=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],H=L.length,R=0;R<H;R+=1){var P=L[R];P.d&&(m=f?r(l).diff(d,P.d,!0):d.diff(l,P.d,!0));var z=(i.rounding||Math.round)(Math.abs(m));if(S=m>0,z<=P.r||!P.r){z<=1&&R>0&&(P=L[R-1]);var B=p[P.l];h&&(z=h(""+z)),v=typeof B=="string"?B.replace("%d",z):B(z,c,P.l,S);break}}if(c)return v;var U=S?p.future:p.past;return typeof U=="function"?U(v):U.replace("%s",v)},s.to=function(l,c){return a(l,c,this,!0)},s.from=function(l,c){return a(l,c,this)};var u=function(l){return l.$u?r.utc():r()};s.toNow=function(l){return this.to(u(this),l)},s.fromNow=function(l){return this.from(u(this),l)}}})})(Sn);var Ir=Sn.exports;const Br=Dt(Ir);Ye.extend(Br);function Kr(t){let e,i,n=[t[3],{title:t[2]},{datetime:t[1]}],r={};for(let s=0;s<n.length;s+=1)r=Xe(r,n[s]);return{c(){e=k("time"),i=se(t[0]),Gt(e,r)},m(s,o){x(s,e,o),b(e,i)},p(s,[o]){o&1&&Hn(i,s[0],r.contenteditable),Gt(e,r=fn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:Z,o:Z,d(s){s&&D(e)}}}function Jr(t,e,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=zt(e,r),{timestamp:o=new Date().toISOString()}=e,{format:a="MMM DD, YYYY"}=e,{relative:u=!1}=e,{live:l=!1}=e,{formatted:c=""}=e,d;const f=60*1e3;return ct(()=>()=>clearInterval(d)),t.$$set=h=>{e=Xe(Xe({},e),Mn(h)),i(3,s=zt(e,r)),"timestamp"in h&&i(1,o=h.timestamp),"format"in h&&i(4,a=h.format),"relative"in h&&i(5,u=h.relative),"live"in h&&i(6,l=h.live),"formatted"in h&&i(0,c=h.formatted)},t.$$.update=()=>{t.$$.dirty&98&&u&&l!==!1&&(d=setInterval(()=>{i(0,c=Ye(o).from())},Math.abs(typeof l=="number"?l:f))),t.$$.dirty&50&&i(0,c=u?Ye(o).from():Ye(o).format(a)),t.$$.dirty&50&&i(2,n=u?Ye(o).format(a):void 0)},[c,o,n,s,a,u,l]}class Ur extends te{constructor(e){super(),ee(this,e,Jr,Kr,q,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Wr(t){oe(t,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Hr(t){let e;return{c(){e=k("span"),e.textContent=`${A("Invalid data")}`,_(e,"class","invalid svelte-1o3wy2t")},m(i,n){x(i,e,n)},p:Z,i:Z,o:Z,d(i){i&&D(e)}}}function Yr(t){let e,i;return e=new Ur({props:{style:t[2],timestamp:t[0],format:t[1],relative:t[3]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.style=n[2]),r&1&&(s.timestamp=n[0]),r&2&&(s.format=n[1]),r&8&&(s.relative=n[3]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Pr(t){let e,i,n,r,s;const o=[Yr,Hr],a=[];function u(l,c){return c&1&&(i=null),i==null&&(i=l[0]instanceof Date&&!isNaN(l[0].getTime())),i?0:1}return n=u(t,-1),r=a[n]=o[n](t),{c(){e=k("div"),r.c(),_(e,"class","Date svelte-1o3wy2t")},m(l,c){x(l,e,c),a[n].m(e,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(ve(),$(a[d],1,1,()=>{a[d]=null}),ye(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),w(r,1),r.m(e,null))},i(l){s||(w(r),s=!0)},o(l){$(r),s=!1},d(l){l&&D(e),a[n].d()}}}function Vr(t,e,i){let{data:n}=e,{format:r=""}=e,{style:s=""}=e,{relative:o=!1}=e;return t.$$set=a=>{"data"in a&&i(0,n=a.data),"format"in a&&i(1,r=a.format),"style"in a&&i(2,s=a.style),"relative"in a&&i(3,o=a.relative)},[n,r,s,o]}class $t extends te{constructor(e){super(),ee(this,e,Vr,Pr,q,{data:0,format:1,style:2,relative:3},Wr)}}function Qr(t){oe(t,"svelte-1wdh20c",".IconWrapper.svelte-1wdh20c{display:flex;justify-content:center;align-items:center;margin:4px 6px}.CombinedTag.svelte-1wdh20c{display:inline-flex;flex-direction:row;border-radius:4px;margin-top:2px;margin-right:6px;padding-right:0}.Department.svelte-1wdh20c{display:flex;background-color:var(--department-bg-color)}.Pending.svelte-1wdh20c{background-color:var(--ok-color)}.Overdue.svelte-1wdh20c{background-color:var(--notif-error-color)}")}function Zr(t){let e,i,n,r;i=new $e({props:{iconLaClassName:t[2]}});const s=t[8].default,o=Me(s,t,t[7],null);return{c(){e=k("div"),K(i.$$.fragment),n=W(),o&&o.c(),_(e,"class","IconWrapper svelte-1wdh20c")},m(a,u){x(a,e,u),M(i,e,null),x(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconLaClassName=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&Be(o,s,a,a[7],r?Ie(s,a[7],u,null):Ke(a[7]),null)},i(a){r||(w(i.$$.fragment,a),w(o,a),r=!0)},o(a){$(i.$$.fragment,a),$(o,a),r=!1},d(a){a&&(D(e),D(n)),I(i),o&&o.d(a)}}}function Xr(t){let e,i;return e=new gt({props:{style:t[3],text:t[0],iconLaClassName:t[2],className:"Combined"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&8&&(s.style=n[3]),r&1&&(s.text=n[0]),r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function qr(t){let e,i,n,r,s,o;const a=[Xr,Zr],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(t),n=u[i]=a[i](t),s=new ft({props:{style:t[4],text:t[1]}}),{c(){e=k("div"),n.c(),r=W(),K(s.$$.fragment),_(e,"class",ce(t[5])+" svelte-1wdh20c")},m(c,d){x(c,e,d),u[i].m(e,null),b(e,r),M(s,e,null),o=!0},p(c,[d]){let f=i;i=l(c),i===f?u[i].p(c,d):(ve(),$(u[f],1,1,()=>{u[f]=null}),ye(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),w(n,1),n.m(e,r));const h={};d&16&&(h.style=c[4]),d&2&&(h.text=c[1]),s.$set(h)},i(c){o||(w(n),w(s.$$.fragment,c),o=!0)},o(c){$(n),$(s.$$.fragment,c),o=!1},d(c){c&&D(e),u[i].d(),I(s)}}}function jr(t,e,i){let{$$slots:n={},$$scope:r}=e,{iconText:s=""}=e,{tagText:o}=e,{iconLaClassName:a}=e,{className:u}=e,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let d=`CombinedTag ${u}`;return t.$$set=f=>{"iconText"in f&&i(0,s=f.iconText),"tagText"in f&&i(1,o=f.tagText),"iconLaClassName"in f&&i(2,a=f.iconLaClassName),"className"in f&&i(6,u=f.className),"$$scope"in f&&i(7,r=f.$$scope)},[s,o,a,l,c,d,u,r,n]}class Nn extends te{constructor(e){super(),ee(this,e,jr,qr,q,{iconText:0,tagText:1,iconLaClassName:2,className:6},Qr)}}function es(t){let e,i;return e=new $t({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:t[1],relative:!0}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ts(t){let e,i;return e=new Nn({props:{iconLaClassName:t[3],tagText:t[0],className:t[2],$$slots:{default:[es]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconLaClassName=n[3]),r&1&&(s.tagText=n[0]),r&4&&(s.className=n[2]),r&34&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ns(t,e,i){let n,{tagText:r}=e,{due:s}=e,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return t.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},t.$$.update=()=>{t.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class is extends te{constructor(e){super(),ee(this,e,ns,ts,q,{tagText:0,due:1})}}function rs(t){oe(t,"svelte-1xhpy1i",".TicketId.svelte-1xhpy1i{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-1xhpy1i{font-size:13px;line-height:20px}.Communication.svelte-1xhpy1i{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}.ticketDetails.svelte-1xhpy1i{display:flex;align-items:center}@media(min-width: 900px){.Changed.svelte-1xhpy1i{display:none}}")}function ss(t){let e,i;return e=new ft({props:{text:A("No SLA"),className:"SLA"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p:Z,i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function os(t){let e,i;return e=new is({props:{tagText:"First answer",due:t[1].datedue}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function as(t){let e,i,n=t[1].code+"",r,s,o,a,u,l,c,d=t[1].messagegroupsIn+"",f,h,m,v,S,p,L=t[1].messagegroupsOut+"",H,R,P,z,B,U,ne,X,V,be,we,E,T,y,N,C,G;u=new $e({props:{iconLaClassName:"la-incoming"}}),v=new $e({props:{iconLaClassName:"la-outgoing"}}),U=new $t({props:{data:t[1].datecreated,format:t[2]}}),we=new $t({props:{data:t[1].datechanged,format:t[2]}});const J=[os,ss],Q=[];function ie(O,Y){return Y&2&&(T=null),T==null&&(T=O[1].datedue instanceof Date&&!isNaN(O[1].datedue)),T?0:1}return y=ie(t,-1),N=Q[y]=J[y](t),{c(){e=k("div"),i=k("span"),r=se(n),s=W(),o=k("div"),a=k("div"),K(u.$$.fragment),l=W(),c=k("span"),f=se(d),h=W(),m=k("div"),K(v.$$.fragment),S=W(),p=k("span"),H=se(L),R=W(),P=k("div"),z=k("span"),z.textContent=`${A("Created")}:`,B=W(),K(U.$$.fragment),ne=W(),X=k("div"),V=k("span"),V.textContent=`${A("Changed")}:`,be=W(),K(we.$$.fragment),E=W(),N.c(),C=nt(),_(i,"class","TicketId svelte-1xhpy1i"),_(a,"class","Communication incomingMessages svelte-1xhpy1i"),_(m,"class","Communication outgoingMessages svelte-1xhpy1i"),_(o,"class","arrows"),_(e,"class","ticketDetails svelte-1xhpy1i"),_(P,"class","Created svelte-1xhpy1i"),_(X,"class","Changed svelte-1xhpy1i")},m(O,Y){x(O,e,Y),b(e,i),b(i,r),b(e,s),b(e,o),b(o,a),M(u,a,null),b(a,l),b(a,c),b(c,f),b(o,h),b(o,m),M(v,m,null),b(m,S),b(m,p),b(p,H),x(O,R,Y),x(O,P,Y),b(P,z),b(P,B),M(U,P,null),x(O,ne,Y),x(O,X,Y),b(X,V),b(X,be),M(we,X,null),x(O,E,Y),Q[y].m(O,Y),x(O,C,Y),G=!0},p(O,Y){(!G||Y&2)&&n!==(n=O[1].code+"")&&le(r,n),(!G||Y&2)&&d!==(d=O[1].messagegroupsIn+"")&&le(f,d),(!G||Y&2)&&L!==(L=O[1].messagegroupsOut+"")&&le(H,L);const ue={};Y&2&&(ue.data=O[1].datecreated),Y&4&&(ue.format=O[2]),U.$set(ue);const ke={};Y&2&&(ke.data=O[1].datechanged),Y&4&&(ke.format=O[2]),we.$set(ke);let me=y;y=ie(O,Y),y===me?Q[y].p(O,Y):(ve(),$(Q[me],1,1,()=>{Q[me]=null}),ye(),N=Q[y],N?N.p(O,Y):(N=Q[y]=J[y](O),N.c()),w(N,1),N.m(C.parentNode,C))},i(O){G||(w(u.$$.fragment,O),w(v.$$.fragment,O),w(U.$$.fragment,O),w(we.$$.fragment,O),w(N),G=!0)},o(O){$(u.$$.fragment,O),$(v.$$.fragment,O),$(U.$$.fragment,O),$(we.$$.fragment,O),$(N),G=!1},d(O){O&&(D(e),D(R),D(P),D(ne),D(X),D(E),D(C)),I(u),I(v),I(U),I(we),Q[y].d(O)}}}function ls(t){let e,i;return e=new xt({props:{className:t[0],$$slots:{default:[as]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&14&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function us(t,e,i){let{className:n="importanceColumn"}=e,{row:r}=e,{format:s="YYYY-MM-DD HH:mm:ss"}=e;return t.$$set=o=>{"className"in o&&i(0,n=o.className),"row"in o&&i(1,r=o.row),"format"in o&&i(2,s=o.format)},[n,r,s]}class cs extends te{constructor(e){super(),ee(this,e,us,ls,q,{className:0,row:1,format:2},rs)}}function ds(t){oe(t,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function fs(t){let e,i;return e=new ft({props:{style:"color: #"+t[2]+"; background: #"+t[1],text:t[0],className:"TicketTag"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&6&&(s.style="color: #"+n[2]+"; background: #"+n[1]),r&1&&(s.text=n[0]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function gs(t,e,i){let n,r,s,o;re(t,yn,u=>i(4,o=u));let{tagId:a}=e;return t.$$set=u=>{"tagId"in u&&i(3,a=u.tagId)},t.$$.update=()=>{var u,l,c;t.$$.dirty&24&&i(2,n=((u=o[a])==null?void 0:u.color)??0),t.$$.dirty&24&&i(1,r=((l=o[a])==null?void 0:l.backgroundcolor)??0),t.$$.dirty&24&&i(0,s=((c=o[a])==null?void 0:c.name)??"")},[s,r,n,a,o]}class hs extends te{constructor(e){super(),ee(this,e,gs,fs,q,{tagId:3},ds)}}function Ht(t,e,i){const n=t.slice();return n[1]=e[i],n}function Yt(t){let e,i;return e=new hs({props:{tagId:t[1]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ms(t){let e,i,n=Ee(t[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Yt(Ht(t,n,o));const s=o=>$(r[o],1,1,()=>{r[o]=null});return{c(){e=k("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){x(o,e,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);i=!0},p(o,[a]){if(a&1){n=Ee(o[0]);let u;for(u=0;u<n.length;u+=1){const l=Ht(o,n,u);r[u]?(r[u].p(l,a),w(r[u],1)):(r[u]=Yt(l),r[u].c(),w(r[u],1),r[u].m(e,null))}for(ve(),u=n.length;u<r.length;u+=1)s(u);ye()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)w(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)$(r[a]);i=!1},d(o){o&&D(e),Lt(r,o)}}}function ps(t,e,i){let{tags:n}=e;return t.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class _s extends te{constructor(e){super(),ee(this,e,ps,ms,q,{tags:0})}}function vs(t){oe(t,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function ys(t){let e,i;return e=new gt({props:{className:t[1][t[0]].text,style:"color: white; background-color: "+ut(t[0]),text:t[1][t[0]].text,iconLaClassName:t[1][t[0]].icon}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[1][n[0]].text),r&1&&(s.style="color: white; background-color: "+ut(n[0])),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function bs(t,e,i){let{status:n}=e;const r={A:{text:A("Answered"),icon:"la-ticket-answered"},T:{text:A("Chatting"),icon:"la-chatting"},P:{text:A("Calling"),icon:"la-call"},X:{text:A("Deleted"),icon:"la-ticket-deleted"},B:{text:A("Spam"),icon:"la-spam"},I:{text:A("Init"),icon:""},R:{text:A("Resolved"),icon:"la-ticket-resolved"},N:{text:A("New"),icon:"la-ticket-new"},C:{text:A("Open"),icon:"la-ticket-open"},W:{text:A("Postponed"),icon:"la-ticket-postponed"}};return t.$$set=s=>{"status"in s&&i(0,n=s.status)},[n,r]}class ws extends te{constructor(e){super(),ee(this,e,bs,ys,q,{status:0},vs)}}function ks(t){oe(t,"svelte-6lvx50",".subject.svelte-6lvx50{font-size:13px;font-weight:bold;line-height:20px;margin:0}.preview.svelte-6lvx50{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:5px;margin:0;line-height:20px;font-size:13px}.no-text.svelte-6lvx50{color:var(--main-lighter-textcolor)}.additional.svelte-6lvx50{display:flex}")}function $s(t){let e,i;return e=new gt({props:{className:"Department",text:t[0].departmentname,iconLaClassName:"la-department"}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Cs(t){let e,i;return e=new Nn({props:{className:"Department",tagText:t[0].agentname,iconLaClassName:"la-department",iconText:t[0].departmentname}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Ts(t){let e,i=t[0].subject+"",n,r,s,o=(t[0].preview?t[0].preview:A("No text for preview"))+"",a,u,l,c,d,f,h,m,v,S,p,L;d=new ws({props:{status:t[0].status}});const H=[Cs,$s],R=[];function P(z,B){return B&1&&(h=null),h==null&&(h=z[0].agentname.trim()!==""),h?0:1}return m=P(t,-1),v=R[m]=H[m](t),p=new _s({props:{tags:t[0].tags}}),{c(){e=k("h1"),n=se(i),r=W(),s=k("p"),a=se(o),l=W(),c=k("div"),K(d.$$.fragment),f=W(),v.c(),S=W(),K(p.$$.fragment),_(e,"class","subject svelte-6lvx50"),_(s,"class",u=ce(t[0].preview?"preview":"preview no-text")+" svelte-6lvx50"),_(c,"class","additional svelte-6lvx50")},m(z,B){x(z,e,B),b(e,n),x(z,r,B),x(z,s,B),b(s,a),x(z,l,B),x(z,c,B),M(d,c,null),b(c,f),R[m].m(c,null),b(c,S),M(p,c,null),L=!0},p(z,B){(!L||B&1)&&i!==(i=z[0].subject+"")&&le(n,i),(!L||B&1)&&o!==(o=(z[0].preview?z[0].preview:A("No text for preview"))+"")&&le(a,o),(!L||B&1&&u!==(u=ce(z[0].preview?"preview":"preview no-text")+" svelte-6lvx50"))&&_(s,"class",u);const U={};B&1&&(U.status=z[0].status),d.$set(U);let ne=m;m=P(z,B),m===ne?R[m].p(z,B):(ve(),$(R[ne],1,1,()=>{R[ne]=null}),ye(),v=R[m],v?v.p(z,B):(v=R[m]=H[m](z),v.c()),w(v,1),v.m(c,S));const X={};B&1&&(X.tags=z[0].tags),p.$set(X)},i(z){L||(w(d.$$.fragment,z),w(v),w(p.$$.fragment,z),L=!0)},o(z){$(d.$$.fragment,z),$(v),$(p.$$.fragment,z),L=!1},d(z){z&&(D(e),D(r),D(s),D(l),D(c)),I(d),R[m].d(),I(p)}}}function Ls(t){let e,i;return e=new xt({props:{className:t[1],$$slots:{default:[Ts]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Ss(t,e,i){let{row:n}=e,{className:r="statusColumn"}=e;return t.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class Ns extends te{constructor(e){super(),ee(this,e,Ss,Ls,q,{row:0,className:1},ks)}}function Ds(t){oe(t,"svelte-hfkbdu",`.Row.svelte-hfkbdu.svelte-hfkbdu{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
6
+ */var mr=function(t){return t!=null&&(Cn(t)||pr(t)||!!t._isBuffer)};function Cn(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function pr(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Cn(t.slice(0,0))}(function(){var t=hr,e=Ut.utf8,i=mr,n=Ut.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=e.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=t.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,d=-1732584194,f=271733878,h=0;h<a.length;h++)a[h]=(a[h]<<8|a[h]>>>24)&16711935|(a[h]<<24|a[h]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var m=r._ff,p=r._gg,S=r._hh,_=r._ii,h=0;h<a.length;h+=16){var K=l,G=c,k=d,W=f;l=m(l,c,d,f,a[h+0],7,-680876936),f=m(f,l,c,d,a[h+1],12,-389564586),d=m(d,f,l,c,a[h+2],17,606105819),c=m(c,d,f,l,a[h+3],22,-1044525330),l=m(l,c,d,f,a[h+4],7,-176418897),f=m(f,l,c,d,a[h+5],12,1200080426),d=m(d,f,l,c,a[h+6],17,-1473231341),c=m(c,d,f,l,a[h+7],22,-45705983),l=m(l,c,d,f,a[h+8],7,1770035416),f=m(f,l,c,d,a[h+9],12,-1958414417),d=m(d,f,l,c,a[h+10],17,-42063),c=m(c,d,f,l,a[h+11],22,-1990404162),l=m(l,c,d,f,a[h+12],7,1804603682),f=m(f,l,c,d,a[h+13],12,-40341101),d=m(d,f,l,c,a[h+14],17,-1502002290),c=m(c,d,f,l,a[h+15],22,1236535329),l=p(l,c,d,f,a[h+1],5,-165796510),f=p(f,l,c,d,a[h+6],9,-1069501632),d=p(d,f,l,c,a[h+11],14,643717713),c=p(c,d,f,l,a[h+0],20,-373897302),l=p(l,c,d,f,a[h+5],5,-701558691),f=p(f,l,c,d,a[h+10],9,38016083),d=p(d,f,l,c,a[h+15],14,-660478335),c=p(c,d,f,l,a[h+4],20,-405537848),l=p(l,c,d,f,a[h+9],5,568446438),f=p(f,l,c,d,a[h+14],9,-1019803690),d=p(d,f,l,c,a[h+3],14,-187363961),c=p(c,d,f,l,a[h+8],20,1163531501),l=p(l,c,d,f,a[h+13],5,-1444681467),f=p(f,l,c,d,a[h+2],9,-51403784),d=p(d,f,l,c,a[h+7],14,1735328473),c=p(c,d,f,l,a[h+12],20,-1926607734),l=S(l,c,d,f,a[h+5],4,-378558),f=S(f,l,c,d,a[h+8],11,-2022574463),d=S(d,f,l,c,a[h+11],16,1839030562),c=S(c,d,f,l,a[h+14],23,-35309556),l=S(l,c,d,f,a[h+1],4,-1530992060),f=S(f,l,c,d,a[h+4],11,1272893353),d=S(d,f,l,c,a[h+7],16,-155497632),c=S(c,d,f,l,a[h+10],23,-1094730640),l=S(l,c,d,f,a[h+13],4,681279174),f=S(f,l,c,d,a[h+0],11,-358537222),d=S(d,f,l,c,a[h+3],16,-722521979),c=S(c,d,f,l,a[h+6],23,76029189),l=S(l,c,d,f,a[h+9],4,-640364487),f=S(f,l,c,d,a[h+12],11,-421815835),d=S(d,f,l,c,a[h+15],16,530742520),c=S(c,d,f,l,a[h+2],23,-995338651),l=_(l,c,d,f,a[h+0],6,-198630844),f=_(f,l,c,d,a[h+7],10,1126891415),d=_(d,f,l,c,a[h+14],15,-1416354905),c=_(c,d,f,l,a[h+5],21,-57434055),l=_(l,c,d,f,a[h+12],6,1700485571),f=_(f,l,c,d,a[h+3],10,-1894986606),d=_(d,f,l,c,a[h+10],15,-1051523),c=_(c,d,f,l,a[h+1],21,-2054922799),l=_(l,c,d,f,a[h+8],6,1873313359),f=_(f,l,c,d,a[h+15],10,-30611744),d=_(d,f,l,c,a[h+6],15,-1560198380),c=_(c,d,f,l,a[h+13],21,1309151649),l=_(l,c,d,f,a[h+4],6,-145523070),f=_(f,l,c,d,a[h+11],10,-1120210379),d=_(d,f,l,c,a[h+2],15,718787259),c=_(c,d,f,l,a[h+9],21,-343485551),l=l+K>>>0,c=c+G>>>0,d=d+k>>>0,f=f+W>>>0}return t.endian([l,c,d,f])};r._ff=function(s,o,a,u,l,c,d){var f=s+(o&a|~o&u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._gg=function(s,o,a,u,l,c,d){var f=s+(o&u|a&~u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._hh=function(s,o,a,u,l,c,d){var f=s+(o^a^u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._ii=function(s,o,a,u,l,c,d){var f=s+(a^(o|~u))+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._blocksize=16,r._digestsize=16,kn.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=t.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):t.bytesToHex(a)}})();var vr=kn.exports;const _r=Nt(vr);function yr(t){return[...t].reduce((e,i)=>Math.imul(31,e)+i.charCodeAt(0)|0,0)}function br(t){oe(t,"svelte-1rap1nb",".Column.svelte-1rap1nb{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(min-width: 768px){.Column.importanceColumn.svelte-1rap1nb{display:flex;flex-direction:column;justify-content:space-around;align-items:flex-start}.Column.statusColumn.svelte-1rap1nb{display:flex;flex-direction:column;justify-content:space-around;align-items:flex-start}}")}function wr(t){let e,i,n;const r=t[2].default,s=Ie(r,t,t[1],null);return{c(){e=$("div"),s&&s.c(),v(e,"class",i="Column "+t[0]+" svelte-1rap1nb")},m(o,a){D(o,e,a),s&&s.m(e,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&Ke(s,r,o,o[1],n?Be(r,o[1],a,null):Je(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-1rap1nb"))&&v(e,"class",i)},i(o){n||(w(s,o),n=!0)},o(o){T(s,o),n=!1},d(o){o&&N(e),s&&s.d(o)}}}function kr(t,e,i){let{$$slots:n={},$$scope:r}=e,{className:s=""}=e;return t.$$set=o=>{"className"in o&&i(0,s=o.className),"$$scope"in o&&i(1,r=o.$$scope)},[s,r,n]}class Dt extends te{constructor(e){super(),ee(this,e,kr,wr,Z,{className:0},br)}}function $r(t){oe(t,"svelte-31tdqe",`.Tag.svelte-31tdqe{box-sizing:border-box;display:inline-block;color:var(--main-textcolor);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-31tdqe:before{font-family:"la-icon-font"}.SLA.svelte-31tdqe{border:1px solid var(--main-lighter-textcolor);border-radius:4px;color:var(--main-lighter-textcolor)
7
+ }`)}function Cr(t){let e,i,n,r,s,o;const a=t[4].default,u=Ie(a,t,t[3],null);return{c(){e=$("div"),u&&u.c(),i=U(),n=$("span"),r=se(t[0]),v(n,"class","text"),v(e,"class",s="Tag "+t[1]+" svelte-31tdqe"),v(e,"style",t[2])},m(l,c){D(l,e,c),u&&u.m(e,null),b(e,i),b(e,n),b(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Ke(u,a,l,l[3],o?Be(a,l[3],c,null):Je(l[3]),null),(!o||c&1)&&le(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-31tdqe"))&&v(e,"class",s),(!o||c&4)&&v(e,"style",l[2])},i(l){o||(w(u,l),o=!0)},o(l){T(u,l),o=!1},d(l){l&&N(e),u&&u.d(l)}}}function Tr(t,e,i){let{$$slots:n={},$$scope:r}=e,{text:s}=e,{className:o=""}=e,{style:a=""}=e;return t.$$set=u=>{"text"in u&&i(0,s=u.text),"className"in u&&i(1,o=u.className),"style"in u&&i(2,a=u.style),"$$scope"in u&&i(3,r=u.$$scope)},[s,o,a,r,n]}class ft extends te{constructor(e){super(),ee(this,e,Tr,Cr,Z,{text:0,className:1,style:2},$r)}}function Lr(t){oe(t,"svelte-1ify73x","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}.IconTag .Icon{display:flex;align-items:center;justify-content:center;font-size:16px;width:16px;height:16px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function Sr(t){let e,i;return e=new $e({props:{iconLaClassName:t[2]}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function xr(t){let e,i;return e=new ft({props:{text:t[0],className:t[3],style:t[1],$$slots:{default:[Sr]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.text=n[0]),r&2&&(s.style=n[1]),r&36&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Nr(t,e,i){let{text:n}=e,{className:r=""}=e,{style:s=""}=e,{iconLaClassName:o}=e,a=`IconTag ${r}`;return t.$$set=u=>{"text"in u&&i(0,n=u.text),"className"in u&&i(4,r=u.className),"style"in u&&i(1,s=u.style),"iconLaClassName"in u&&i(2,o=u.iconLaClassName)},[n,s,o,a,r]}class gt extends te{constructor(e){super(),ee(this,e,Nr,xr,Z,{text:0,className:4,style:1,iconLaClassName:2},Lr)}}function Dr(t){oe(t,"svelte-2le156",".Column.userColumn{display:flex;align-items:center}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}div.Tag.NoCompanyTag{color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-2le156{display:none}.companyTag.svelte-2le156{display:none}.name.svelte-2le156{font-size:13px;line-height:20px;font-weight:bold;padding-right:8px;margin-right:6px;position:relative}.name.svelte-2le156::after{content:'';display:block;height:14px;width:1px;background-color:var(--main-textcolor);position:absolute;right:0;top:15%}.no.svelte-2le156{font-weight:400;color:var(--main-lighter-textcolor)}.email.svelte-2le156{font-size:13px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.texts.svelte-2le156{display:flex;flex-direction:row;justify-content:flex-start;overflow:hidden}@media(min-width: 900px){.avatar.svelte-2le156{display:flex;align-items:center;justify-content:center;margin:0 10px;width:40px;height:40px}.name.svelte-2le156{padding:0;border:none}.name.svelte-2le156::after{display:none}.email.svelte-2le156{padding:0}.companyTag.svelte-2le156{display:flex}.texts.svelte-2le156{display:flex;flex-direction:column;justify-content:space-around}}")}function Wt(t){let e,i;const n=[t[2]];let r={};for(let s=0;s<n.length;s+=1)r=Xe(r,n[s]);return e=new gr({props:r}),{c(){B(e.$$.fragment)},m(s,o){M(e,s,o),i=!0},p(s,o){const a=o&4?dn(n,[Xn(s[2])]):{};e.$set(a)},i(s){i||(w(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){I(e,s)}}}function Or(t){let e,i=t[2].name,n,r,s,o=(t[3]!==void 0?t[3]:O("No name"))+"",a,u,l,c,d=(t[0].emails.length!==0?t[0].emails[0]:O("No email"))+"",f,h,m,p,S,_,K=Wt(t);return S=new gt({props:{text:t[0].company==="Y"?"Company":O("No Company"),className:(t[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){e=$("div"),K.c(),n=U(),r=$("div"),s=$("div"),a=se(o),l=U(),c=$("div"),f=se(d),m=U(),p=$("div"),B(S.$$.fragment),v(e,"class","avatar svelte-2le156"),v(s,"class",u=ae(t[3]?"name":"no name")+" svelte-2le156"),v(c,"class",h=ae(t[0].emails.length===0?"no email":"email")+" svelte-2le156"),v(p,"class","companyTag svelte-2le156"),v(r,"class","texts svelte-2le156")},m(G,k){D(G,e,k),K.m(e,null),D(G,n,k),D(G,r,k),b(r,s),b(s,a),b(r,l),b(r,c),b(c,f),b(r,m),b(r,p),M(S,p,null),_=!0},p(G,k){k&4&&Z(i,i=G[2].name)?(we(),T(K,1,1,q),ke(),K=Wt(G),K.c(),w(K,1),K.m(e,null)):K.p(G,k),(!_||k&8)&&o!==(o=(G[3]!==void 0?G[3]:O("No name"))+"")&&le(a,o),(!_||k&8&&u!==(u=ae(G[3]?"name":"no name")+" svelte-2le156"))&&v(s,"class",u),(!_||k&1)&&d!==(d=(G[0].emails.length!==0?G[0].emails[0]:O("No email"))+"")&&le(f,d),(!_||k&1&&h!==(h=ae(G[0].emails.length===0?"no email":"email")+" svelte-2le156"))&&v(c,"class",h);const W={};k&1&&(W.text=G[0].company==="Y"?"Company":O("No Company")),k&1&&(W.className=(G[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),S.$set(W)},i(G){_||(w(K),w(S.$$.fragment,G),_=!0)},o(G){T(K),T(S.$$.fragment,G),_=!1},d(G){G&&(N(e),N(n),N(r)),K.d(G),I(S)}}}function Fr(t){let e,i;return e=new Dt({props:{className:t[1],$$slots:{default:[Or]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&141&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Rr(t,e,i){if(!t)return(i[0]+i[1]).toUpperCase();let n=t[0];return e&&(n+=e[0]),n}function zr(t,e,i){let n,r,{row:s}=e,{className:o="userColumn"}=e;function a(c,d,f){if(!c)return"";let h=c+" "+d;return h.trim()||(h=f),h}function u(c,d){let f=c;return f||(f="https://www.gravatar.com/avatar/"+_r(d[0]??"")+"?s=200&d=404"),f}function l(c,d,f,h){let m;h?m=yr(a(c,d,h)+f):m=Math.floor(Math.random()*16777215);let p=(m&16711680)>>16,S=(m&65280)>>8,_=m&255;return p+S+_<150&&(p=150),p+S+_>400&&(p=0),`rgb(${p},${S},${_})`}return t.$$set=c=>{"row"in c&&i(0,s=c.row),"className"in c&&i(1,o=c.className)},t.$$.update=()=>{t.$$.dirty&1&&i(3,n=s.name),t.$$.dirty&1&&i(2,r={bgColor:l(s.firstname,s.lastname,s.emails,s.systemName),name:a(s.firstname,s.lastname,s.systemName),src:u(s.avatarUrl,s.emails),initials:Rr(s.firstname,s.lastname,s.systemName)})},[s,o,r,n]}class Ar extends te{constructor(e){super(),ee(this,e,zr,Fr,Z,{row:0,className:1},Dr)}}var Tn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(wn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",d="month",f="quarter",h="year",m="date",p="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,K={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var L=["th","st","nd","rd"],y=A%100;return"["+A+(L[(y-20)%10]||L[y]||L[0])+"]"}},G=function(A,L,y){var x=String(A);return!x||x.length>=L?A:""+Array(L+1-x.length).join(y)+A},k={s:G,z:function(A){var L=-A.utcOffset(),y=Math.abs(L),x=Math.floor(y/60),C=y%60;return(L<=0?"+":"-")+G(x,2,"0")+":"+G(C,2,"0")},m:function A(L,y){if(L.date()<y.date())return-A(y,L);var x=12*(y.year()-L.year())+(y.month()-L.month()),C=L.clone().add(x,d),z=y-C<0,J=L.clone().add(x+(z?-1:1),d);return+(-(x+(y-C)/(z?C-J:J-C))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:d,y:h,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:f}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},W="en",E={};E[W]=K;var X="$isDayjsObject",Y=function(A){return A instanceof _e||!(!A||!A[X])},re=function A(L,y,x){var C;if(!L)return W;if(typeof L=="string"){var z=L.toLowerCase();E[z]&&(C=z),y&&(E[z]=y,C=z);var J=L.split("-");if(!C&&J.length>1)return A(J[0])}else{var V=L.name;E[V]=L,C=V}return!x&&C&&(W=C),C||!x&&W},Q=function(A,L){if(Y(A))return A.clone();var y=typeof L=="object"?L:{};return y.date=A,y.args=arguments,new _e(y)},P=k;P.l=re,P.i=Y,P.w=function(A,L){return Q(A,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var _e=function(){function A(y){this.$L=re(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[X]=!0}var L=A.prototype;return L.parse=function(y){this.$d=function(x){var C=x.date,z=x.utc;if(C===null)return new Date(NaN);if(P.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var J=C.match(S);if(J){var V=J[2]-1||0,ne=(J[7]||"0").substring(0,3);return z?new Date(Date.UTC(J[1],V,J[3]||1,J[4]||0,J[5]||0,J[6]||0,ne)):new Date(J[1],V,J[3]||1,J[4]||0,J[5]||0,J[6]||0,ne)}}return new Date(C)}(y),this.init()},L.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},L.$utils=function(){return P},L.isValid=function(){return this.$d.toString()!==p},L.isSame=function(y,x){var C=Q(y);return this.startOf(x)<=C&&C<=this.endOf(x)},L.isAfter=function(y,x){return Q(y)<this.startOf(x)},L.isBefore=function(y,x){return this.endOf(x)<Q(y)},L.$g=function(y,x,C){return P.u(y)?this[x]:this.set(C,y)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(y,x){var C=this,z=!!P.u(x)||x,J=P.p(y),V=function(Se,fe){var Ce=P.w(C.$u?Date.UTC(C.$y,fe,Se):new Date(C.$y,fe,Se),C);return z?Ce:Ce.endOf(l)},ne=function(Se,fe){return P.w(C.toDate()[Se].apply(C.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(fe)),C)},F=this.$W,H=this.$M,ue=this.$D,be="set"+(this.$u?"UTC":"");switch(J){case h:return z?V(1,0):V(31,11);case d:return z?V(1,H):V(0,H+1);case c:var me=this.$locale().weekStart||0,Ue=(F<me?F+7:F)-me;return V(z?ue-Ue:ue+(6-Ue),H);case l:case m:return ne(be+"Hours",0);case u:return ne(be+"Minutes",1);case a:return ne(be+"Seconds",2);case o:return ne(be+"Milliseconds",3);default:return this.clone()}},L.endOf=function(y){return this.startOf(y,!1)},L.$set=function(y,x){var C,z=P.p(y),J="set"+(this.$u?"UTC":""),V=(C={},C[l]=J+"Date",C[m]=J+"Date",C[d]=J+"Month",C[h]=J+"FullYear",C[u]=J+"Hours",C[a]=J+"Minutes",C[o]=J+"Seconds",C[s]=J+"Milliseconds",C)[z],ne=z===l?this.$D+(x-this.$W):x;if(z===d||z===h){var F=this.clone().set(m,1);F.$d[V](ne),F.init(),this.$d=F.set(m,Math.min(this.$D,F.daysInMonth())).$d}else V&&this.$d[V](ne);return this.init(),this},L.set=function(y,x){return this.clone().$set(y,x)},L.get=function(y){return this[P.p(y)]()},L.add=function(y,x){var C,z=this;y=Number(y);var J=P.p(x),V=function(H){var ue=Q(z);return P.w(ue.date(ue.date()+Math.round(H*y)),z)};if(J===d)return this.set(d,this.$M+y);if(J===h)return this.set(h,this.$y+y);if(J===l)return V(1);if(J===c)return V(7);var ne=(C={},C[a]=n,C[u]=r,C[o]=i,C)[J]||1,F=this.$d.getTime()+y*ne;return P.w(F,this)},L.subtract=function(y,x){return this.add(-1*y,x)},L.format=function(y){var x=this,C=this.$locale();if(!this.isValid())return C.invalidDate||p;var z=y||"YYYY-MM-DDTHH:mm:ssZ",J=P.z(this),V=this.$H,ne=this.$m,F=this.$M,H=C.weekdays,ue=C.months,be=C.meridiem,me=function(fe,Ce,We,rt){return fe&&(fe[Ce]||fe(x,z))||We[Ce].slice(0,rt)},Ue=function(fe){return P.s(V%12||12,fe,"0")},Se=be||function(fe,Ce,We){var rt=fe<12?"AM":"PM";return We?rt.toLowerCase():rt};return z.replace(_,function(fe,Ce){return Ce||function(We){switch(We){case"YY":return String(x.$y).slice(-2);case"YYYY":return P.s(x.$y,4,"0");case"M":return F+1;case"MM":return P.s(F+1,2,"0");case"MMM":return me(C.monthsShort,F,ue,3);case"MMMM":return me(ue,F);case"D":return x.$D;case"DD":return P.s(x.$D,2,"0");case"d":return String(x.$W);case"dd":return me(C.weekdaysMin,x.$W,H,2);case"ddd":return me(C.weekdaysShort,x.$W,H,3);case"dddd":return H[x.$W];case"H":return String(V);case"HH":return P.s(V,2,"0");case"h":return Ue(1);case"hh":return Ue(2);case"a":return Se(V,ne,!0);case"A":return Se(V,ne,!1);case"m":return String(ne);case"mm":return P.s(ne,2,"0");case"s":return String(x.$s);case"ss":return P.s(x.$s,2,"0");case"SSS":return P.s(x.$ms,3,"0");case"Z":return J}return null}(fe)||J.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(y,x,C){var z,J=this,V=P.p(x),ne=Q(y),F=(ne.utcOffset()-this.utcOffset())*n,H=this-ne,ue=function(){return P.m(J,ne)};switch(V){case h:z=ue()/12;break;case d:z=ue();break;case f:z=ue()/3;break;case c:z=(H-F)/6048e5;break;case l:z=(H-F)/864e5;break;case u:z=H/r;break;case a:z=H/n;break;case o:z=H/i;break;default:z=H}return C?z:P.a(z)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return E[this.$L]},L.locale=function(y,x){if(!y)return this.$L;var C=this.clone(),z=re(y,x,!0);return z&&(C.$L=z),C},L.clone=function(){return P.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},A}(),ye=_e.prototype;return Q.prototype=ye,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",h],["$D",m]].forEach(function(A){ye[A[1]]=function(L){return this.$g(L,A[0],A[1])}}),Q.extend=function(A,L){return A.$i||(A(L,_e,Q),A.$i=!0),Q},Q.locale=re,Q.isDayjs=Y,Q.unix=function(A){return Q(1e3*A)},Q.en=E[W],Q.Ls=E,Q.p={},Q})})(Tn);var Gr=Tn.exports;const Pe=Nt(Gr);var Ln={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(wn,function(){return function(i,n,r){i=i||{};var s=n.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,c,d,f){return s.fromToBase(l,c,d,f)}r.en.relativeTime=o,s.fromToBase=function(l,c,d,f,h){for(var m,p,S,_=d.$locale().relativeTime||o,K=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],G=K.length,k=0;k<G;k+=1){var W=K[k];W.d&&(m=f?r(l).diff(d,W.d,!0):d.diff(l,W.d,!0));var E=(i.rounding||Math.round)(Math.abs(m));if(S=m>0,E<=W.r||!W.r){E<=1&&k>0&&(W=K[k-1]);var X=_[W.l];h&&(E=h(""+E)),p=typeof X=="string"?X.replace("%d",E):X(E,c,W.l,S);break}}if(c)return p;var Y=S?_.future:_.past;return typeof Y=="function"?Y(p):Y.replace("%s",p)},s.to=function(l,c){return a(l,c,this,!0)},s.from=function(l,c){return a(l,c,this)};var u=function(l){return l.$u?r.utc():r()};s.toNow=function(l){return this.to(u(this),l)},s.fromNow=function(l){return this.from(u(this),l)}}})})(Ln);var Er=Ln.exports;const Mr=Nt(Er);Pe.extend(Mr);function Ir(t){let e,i,n=[t[3],{title:t[2]},{datetime:t[1]}],r={};for(let s=0;s<n.length;s+=1)r=Xe(r,n[s]);return{c(){e=$("time"),i=se(t[0]),Gt(e,r)},m(s,o){D(s,e,o),b(e,i)},p(s,[o]){o&1&&Hn(i,s[0],r.contenteditable),Gt(e,r=dn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:q,o:q,d(s){s&&N(e)}}}function Br(t,e,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=At(e,r),{timestamp:o=new Date().toISOString()}=e,{format:a="MMM DD, YYYY"}=e,{relative:u=!1}=e,{live:l=!1}=e,{formatted:c=""}=e,d;const f=60*1e3;return ut(()=>()=>clearInterval(d)),t.$$set=h=>{e=Xe(Xe({},e),En(h)),i(3,s=At(e,r)),"timestamp"in h&&i(1,o=h.timestamp),"format"in h&&i(4,a=h.format),"relative"in h&&i(5,u=h.relative),"live"in h&&i(6,l=h.live),"formatted"in h&&i(0,c=h.formatted)},t.$$.update=()=>{t.$$.dirty&98&&u&&l!==!1&&(d=setInterval(()=>{i(0,c=Pe(o).from())},Math.abs(typeof l=="number"?l:f))),t.$$.dirty&50&&i(0,c=u?Pe(o).from():Pe(o).format(a)),t.$$.dirty&50&&i(2,n=u?Pe(o).format(a):void 0)},[c,o,n,s,a,u,l]}class Kr extends te{constructor(e){super(),ee(this,e,Br,Ir,Z,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Jr(t){oe(t,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Ur(t){let e;return{c(){e=$("span"),e.textContent=`${O("Invalid data")}`,v(e,"class","invalid svelte-1o3wy2t")},m(i,n){D(i,e,n)},p:q,i:q,o:q,d(i){i&&N(e)}}}function Wr(t){let e,i;return e=new Kr({props:{style:t[2],timestamp:t[0],format:t[1],relative:t[3]}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.style=n[2]),r&1&&(s.timestamp=n[0]),r&2&&(s.format=n[1]),r&8&&(s.relative=n[3]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Hr(t){let e,i,n,r,s;const o=[Wr,Ur],a=[];function u(l,c){return c&1&&(i=null),i==null&&(i=l[0]instanceof Date&&!isNaN(l[0].getTime())),i?0:1}return n=u(t,-1),r=a[n]=o[n](t),{c(){e=$("div"),r.c(),v(e,"class","Date svelte-1o3wy2t")},m(l,c){D(l,e,c),a[n].m(e,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(we(),T(a[d],1,1,()=>{a[d]=null}),ke(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),w(r,1),r.m(e,null))},i(l){s||(w(r),s=!0)},o(l){T(r),s=!1},d(l){l&&N(e),a[n].d()}}}function Yr(t,e,i){let{data:n}=e,{format:r=""}=e,{style:s=""}=e,{relative:o=!1}=e;return t.$$set=a=>{"data"in a&&i(0,n=a.data),"format"in a&&i(1,r=a.format),"style"in a&&i(2,s=a.style),"relative"in a&&i(3,o=a.relative)},[n,r,s,o]}class $t extends te{constructor(e){super(),ee(this,e,Yr,Hr,Z,{data:0,format:1,style:2,relative:3},Jr)}}function Pr(t){oe(t,"svelte-1wdh20c",".IconWrapper.svelte-1wdh20c{display:flex;justify-content:center;align-items:center;margin:4px 6px}.CombinedTag.svelte-1wdh20c{display:inline-flex;flex-direction:row;border-radius:4px;margin-top:2px;margin-right:6px;padding-right:0}.Department.svelte-1wdh20c{display:flex;background-color:var(--department-bg-color)}.Pending.svelte-1wdh20c{background-color:var(--ok-color)}.Overdue.svelte-1wdh20c{background-color:var(--notif-error-color)}")}function Vr(t){let e,i,n,r;i=new $e({props:{iconLaClassName:t[2]}});const s=t[8].default,o=Ie(s,t,t[7],null);return{c(){e=$("div"),B(i.$$.fragment),n=U(),o&&o.c(),v(e,"class","IconWrapper svelte-1wdh20c")},m(a,u){D(a,e,u),M(i,e,null),D(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconLaClassName=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&Ke(o,s,a,a[7],r?Be(s,a[7],u,null):Je(a[7]),null)},i(a){r||(w(i.$$.fragment,a),w(o,a),r=!0)},o(a){T(i.$$.fragment,a),T(o,a),r=!1},d(a){a&&(N(e),N(n)),I(i),o&&o.d(a)}}}function qr(t){let e,i;return e=new gt({props:{style:t[3],text:t[0],iconLaClassName:t[2],className:"Combined"}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&8&&(s.style=n[3]),r&1&&(s.text=n[0]),r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Qr(t){let e,i,n,r,s,o;const a=[qr,Vr],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(t),n=u[i]=a[i](t),s=new ft({props:{style:t[4],text:t[1]}}),{c(){e=$("div"),n.c(),r=U(),B(s.$$.fragment),v(e,"class",ae(t[5])+" svelte-1wdh20c")},m(c,d){D(c,e,d),u[i].m(e,null),b(e,r),M(s,e,null),o=!0},p(c,[d]){let f=i;i=l(c),i===f?u[i].p(c,d):(we(),T(u[f],1,1,()=>{u[f]=null}),ke(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),w(n,1),n.m(e,r));const h={};d&16&&(h.style=c[4]),d&2&&(h.text=c[1]),s.$set(h)},i(c){o||(w(n),w(s.$$.fragment,c),o=!0)},o(c){T(n),T(s.$$.fragment,c),o=!1},d(c){c&&N(e),u[i].d(),I(s)}}}function Zr(t,e,i){let{$$slots:n={},$$scope:r}=e,{iconText:s=""}=e,{tagText:o}=e,{iconLaClassName:a}=e,{className:u}=e,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let d=`CombinedTag ${u}`;return t.$$set=f=>{"iconText"in f&&i(0,s=f.iconText),"tagText"in f&&i(1,o=f.tagText),"iconLaClassName"in f&&i(2,a=f.iconLaClassName),"className"in f&&i(6,u=f.className),"$$scope"in f&&i(7,r=f.$$scope)},[s,o,a,l,c,d,u,r,n]}class Sn extends te{constructor(e){super(),ee(this,e,Zr,Qr,Z,{iconText:0,tagText:1,iconLaClassName:2,className:6},Pr)}}function Xr(t){let e,i;return e=new $t({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:t[1],relative:!0}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function jr(t){let e,i;return e=new Sn({props:{iconLaClassName:t[3],tagText:t[0],className:t[2],$$slots:{default:[Xr]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconLaClassName=n[3]),r&1&&(s.tagText=n[0]),r&4&&(s.className=n[2]),r&34&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function es(t,e,i){let n,{tagText:r}=e,{due:s}=e,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return t.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},t.$$.update=()=>{t.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class ts extends te{constructor(e){super(),ee(this,e,es,jr,Z,{tagText:0,due:1})}}function ns(t){oe(t,"svelte-1xhpy1i",".TicketId.svelte-1xhpy1i{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-1xhpy1i{font-size:13px;line-height:20px}.Communication.svelte-1xhpy1i{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}.ticketDetails.svelte-1xhpy1i{display:flex;align-items:center}@media(min-width: 900px){.Changed.svelte-1xhpy1i{display:none}}")}function is(t){let e,i;return e=new ft({props:{text:O("No SLA"),className:"SLA"}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p:q,i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function rs(t){let e,i;return e=new ts({props:{tagText:"First answer",due:t[1].datedue}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ss(t){let e,i,n=t[1].code+"",r,s,o,a,u,l,c,d=t[1].messagegroupsIn+"",f,h,m,p,S,_,K=t[1].messagegroupsOut+"",G,k,W,E,X,Y,re,Q,P,_e,ye,A,L,y,x,C,z;u=new $e({props:{iconLaClassName:"la-incoming"}}),p=new $e({props:{iconLaClassName:"la-outgoing"}}),Y=new $t({props:{data:t[1].datecreated,format:t[2]}}),ye=new $t({props:{data:t[1].datechanged,format:t[2]}});const J=[rs,is],V=[];function ne(F,H){return H&2&&(L=null),L==null&&(L=F[1].datedue instanceof Date&&!isNaN(F[1].datedue)),L?0:1}return y=ne(t,-1),x=V[y]=J[y](t),{c(){e=$("div"),i=$("span"),r=se(n),s=U(),o=$("div"),a=$("div"),B(u.$$.fragment),l=U(),c=$("span"),f=se(d),h=U(),m=$("div"),B(p.$$.fragment),S=U(),_=$("span"),G=se(K),k=U(),W=$("div"),E=$("span"),E.textContent=`${O("Created")}:`,X=U(),B(Y.$$.fragment),re=U(),Q=$("div"),P=$("span"),P.textContent=`${O("Changed")}:`,_e=U(),B(ye.$$.fragment),A=U(),x.c(),C=nt(),v(i,"class","TicketId svelte-1xhpy1i"),v(a,"class","Communication incomingMessages svelte-1xhpy1i"),v(m,"class","Communication outgoingMessages svelte-1xhpy1i"),v(o,"class","arrows"),v(e,"class","ticketDetails svelte-1xhpy1i"),v(W,"class","Created svelte-1xhpy1i"),v(Q,"class","Changed svelte-1xhpy1i")},m(F,H){D(F,e,H),b(e,i),b(i,r),b(e,s),b(e,o),b(o,a),M(u,a,null),b(a,l),b(a,c),b(c,f),b(o,h),b(o,m),M(p,m,null),b(m,S),b(m,_),b(_,G),D(F,k,H),D(F,W,H),b(W,E),b(W,X),M(Y,W,null),D(F,re,H),D(F,Q,H),b(Q,P),b(Q,_e),M(ye,Q,null),D(F,A,H),V[y].m(F,H),D(F,C,H),z=!0},p(F,H){(!z||H&2)&&n!==(n=F[1].code+"")&&le(r,n),(!z||H&2)&&d!==(d=F[1].messagegroupsIn+"")&&le(f,d),(!z||H&2)&&K!==(K=F[1].messagegroupsOut+"")&&le(G,K);const ue={};H&2&&(ue.data=F[1].datecreated),H&4&&(ue.format=F[2]),Y.$set(ue);const be={};H&2&&(be.data=F[1].datechanged),H&4&&(be.format=F[2]),ye.$set(be);let me=y;y=ne(F,H),y===me?V[y].p(F,H):(we(),T(V[me],1,1,()=>{V[me]=null}),ke(),x=V[y],x?x.p(F,H):(x=V[y]=J[y](F),x.c()),w(x,1),x.m(C.parentNode,C))},i(F){z||(w(u.$$.fragment,F),w(p.$$.fragment,F),w(Y.$$.fragment,F),w(ye.$$.fragment,F),w(x),z=!0)},o(F){T(u.$$.fragment,F),T(p.$$.fragment,F),T(Y.$$.fragment,F),T(ye.$$.fragment,F),T(x),z=!1},d(F){F&&(N(e),N(k),N(W),N(re),N(Q),N(A),N(C)),I(u),I(p),I(Y),I(ye),V[y].d(F)}}}function os(t){let e,i;return e=new Dt({props:{className:t[0],$$slots:{default:[ss]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&14&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function as(t,e,i){let{className:n="importanceColumn"}=e,{row:r}=e,{format:s="YYYY-MM-DD HH:mm:ss"}=e;return t.$$set=o=>{"className"in o&&i(0,n=o.className),"row"in o&&i(1,r=o.row),"format"in o&&i(2,s=o.format)},[n,r,s]}class ls extends te{constructor(e){super(),ee(this,e,as,os,Z,{className:0,row:1,format:2},ns)}}function us(t){oe(t,"svelte-ruax7e",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px !important}")}function cs(t){let e,i;return e=new ft({props:{style:"color: #"+t[2]+"; background: #"+t[1]+"99; border: 1px solid #"+t[1],text:t[0],className:"TicketTag"}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&6&&(s.style="color: #"+n[2]+"; background: #"+n[1]+"99; border: 1px solid #"+n[1]),r&1&&(s.text=n[0]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ds(t,e,i){let n,r,s,o;ie(t,_n,u=>i(4,o=u));let{tagId:a}=e;return console.log(o[a]),t.$$set=u=>{"tagId"in u&&i(3,a=u.tagId)},t.$$.update=()=>{var u,l,c;t.$$.dirty&24&&i(2,n=((u=o[a])==null?void 0:u.color)??0),t.$$.dirty&24&&i(1,r=((l=o[a])==null?void 0:l.backgroundcolor)??0),t.$$.dirty&24&&i(0,s=((c=o[a])==null?void 0:c.name)??"")},[s,r,n,a,o]}class fs extends te{constructor(e){super(),ee(this,e,ds,cs,Z,{tagId:3},us)}}function Ht(t,e,i){const n=t.slice();return n[1]=e[i],n}function Yt(t){let e,i;return e=new fs({props:{tagId:t[1]}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function gs(t){let e,i,n=Me(t[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Yt(Ht(t,n,o));const s=o=>T(r[o],1,1,()=>{r[o]=null});return{c(){e=$("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){D(o,e,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);i=!0},p(o,[a]){if(a&1){n=Me(o[0]);let u;for(u=0;u<n.length;u+=1){const l=Ht(o,n,u);r[u]?(r[u].p(l,a),w(r[u],1)):(r[u]=Yt(l),r[u].c(),w(r[u],1),r[u].m(e,null))}for(we(),u=n.length;u<r.length;u+=1)s(u);ke()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)w(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)T(r[a]);i=!1},d(o){o&&N(e),Lt(r,o)}}}function hs(t,e,i){let{tags:n}=e;return t.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class ms extends te{constructor(e){super(),ee(this,e,hs,gs,Z,{tags:0})}}function ps(t){oe(t,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function vs(t){let e,i;return e=new gt({props:{className:"StatusTag "+t[1][t[0]].text,style:"color: "+Te(t[0]).text+"; background-color: "+Te(t[0]).bg+"; border-color: "+Te(t[0]).border,text:t[1][t[0]].text,iconLaClassName:t[1][t[0]].icon}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className="StatusTag "+n[1][n[0]].text),r&1&&(s.style="color: "+Te(n[0]).text+"; background-color: "+Te(n[0]).bg+"; border-color: "+Te(n[0]).border),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function _s(t,e,i){let{status:n}=e;const r={A:{text:O("Answered"),icon:"la-ticket-answered"},T:{text:O("Chatting"),icon:"la-chatting"},P:{text:O("Calling"),icon:"la-call"},X:{text:O("Deleted"),icon:"la-ticket-deleted"},B:{text:O("Spam"),icon:"la-spam"},I:{text:O("Init"),icon:""},R:{text:O("Resolved"),icon:"la-ticket-resolved"},N:{text:O("New"),icon:"la-ticket-new"},C:{text:O("Open"),icon:"la-ticket-open"},W:{text:O("Postponed"),icon:"la-ticket-postponed"}};return t.$$set=s=>{"status"in s&&i(0,n=s.status)},[n,r]}class ys extends te{constructor(e){super(),ee(this,e,_s,vs,Z,{status:0},ps)}}function bs(t){oe(t,"svelte-6lvx50",".subject.svelte-6lvx50{font-size:13px;font-weight:bold;line-height:20px;margin:0}.preview.svelte-6lvx50{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:5px;margin:0;line-height:20px;font-size:13px}.no-text.svelte-6lvx50{color:var(--main-lighter-textcolor)}.additional.svelte-6lvx50{display:flex}")}function ws(t){let e,i;return e=new gt({props:{className:"Department",text:t[0].departmentname,iconLaClassName:"la-department"}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function ks(t){let e,i;return e=new Sn({props:{className:"Department",tagText:t[0].agentname,iconLaClassName:"la-department",iconText:t[0].departmentname}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function $s(t){let e,i=t[0].subject+"",n,r,s,o=(t[0].preview?t[0].preview:O("No text for preview"))+"",a,u,l,c,d,f,h,m,p,S,_,K;d=new ys({props:{status:t[0].status}});const G=[ks,ws],k=[];function W(E,X){return X&1&&(h=null),h==null&&(h=E[0].agentname.trim()!==""),h?0:1}return m=W(t,-1),p=k[m]=G[m](t),_=new ms({props:{tags:t[0].tags}}),{c(){e=$("h1"),n=se(i),r=U(),s=$("p"),a=se(o),l=U(),c=$("div"),B(d.$$.fragment),f=U(),p.c(),S=U(),B(_.$$.fragment),v(e,"class","subject svelte-6lvx50"),v(s,"class",u=ae(t[0].preview?"preview":"preview no-text")+" svelte-6lvx50"),v(c,"class","additional svelte-6lvx50")},m(E,X){D(E,e,X),b(e,n),D(E,r,X),D(E,s,X),b(s,a),D(E,l,X),D(E,c,X),M(d,c,null),b(c,f),k[m].m(c,null),b(c,S),M(_,c,null),K=!0},p(E,X){(!K||X&1)&&i!==(i=E[0].subject+"")&&le(n,i),(!K||X&1)&&o!==(o=(E[0].preview?E[0].preview:O("No text for preview"))+"")&&le(a,o),(!K||X&1&&u!==(u=ae(E[0].preview?"preview":"preview no-text")+" svelte-6lvx50"))&&v(s,"class",u);const Y={};X&1&&(Y.status=E[0].status),d.$set(Y);let re=m;m=W(E,X),m===re?k[m].p(E,X):(we(),T(k[re],1,1,()=>{k[re]=null}),ke(),p=k[m],p?p.p(E,X):(p=k[m]=G[m](E),p.c()),w(p,1),p.m(c,S));const Q={};X&1&&(Q.tags=E[0].tags),_.$set(Q)},i(E){K||(w(d.$$.fragment,E),w(p),w(_.$$.fragment,E),K=!0)},o(E){T(d.$$.fragment,E),T(p),T(_.$$.fragment,E),K=!1},d(E){E&&(N(e),N(r),N(s),N(l),N(c)),I(d),k[m].d(),I(_)}}}function Cs(t){let e,i;return e=new Dt({props:{className:t[1],$$slots:{default:[$s]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Ts(t,e,i){let{row:n}=e,{className:r="statusColumn"}=e;return t.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class Ls extends te{constructor(e){super(),ee(this,e,Ts,Cs,Z,{row:0,className:1},bs)}}function Ss(t){oe(t,"svelte-5aj4fj",`.Row.svelte-5aj4fj.svelte-5aj4fj{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
8
8
  "checkbox status"
9
- "checkbox importance";border-radius:12px;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.10);border-bottom:1px solid var(--menu-selected-bg);padding-top:6px;padding-bottom:6px;margin-bottom:6px;background-color:var(--main-background)}.Row.svelte-hfkbdu.svelte-hfkbdu:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-hfkbdu.svelte-hfkbdu{background-color:var(--menu-selected-bg) !important}.UserColumn.svelte-hfkbdu.svelte-hfkbdu{grid-area:user}.StatusColumn.svelte-hfkbdu.svelte-hfkbdu{grid-area:status;display:flex;flex-direction:column;justify-content:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ImportanceColumn.svelte-hfkbdu.svelte-hfkbdu{grid-area:importance}.Checkbox.svelte-hfkbdu.svelte-hfkbdu{grid-area:checkbox;position:relative}.StatusBar.svelte-hfkbdu.svelte-hfkbdu{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px;transition:width 0.1s ease}.Row.svelte-hfkbdu:hover .StatusBar.svelte-hfkbdu{width:10px}input.svelte-hfkbdu.svelte-hfkbdu{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(min-width: 768px){.Row.svelte-hfkbdu.svelte-hfkbdu{display:grid;grid-template-areas:"checkbox user importance"
10
- "checkbox status importance";grid-template-columns:60px 3fr 1fr;height:110px;padding-bottom:5px;padding-top:5px;column-gap:6px}}@media(min-width: 900px){.Row.svelte-hfkbdu.svelte-hfkbdu{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 180px auto 190px;height:72px}}@media(min-width: 1300px){.Row.svelte-hfkbdu.svelte-hfkbdu{grid-template-columns:60px 260px auto 230px}}`)}function Pt(t,e,i){const n=t.slice();return n[9]=e[i],n[10]=e,n[11]=i,n}function Vt(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,m,v,S,p,L,H;function R(){t[5].call(s,t[11])}function P(...U){return t[6](t[11],...U)}l=new Er({props:{row:t[9]}}),f=new Ns({props:{row:t[9]}}),v=new cs({props:{row:t[9]}});function z(){return t[7](t[9])}function B(...U){return t[8](t[9],...U)}return{c(){e=k("div"),i=k("div"),n=k("div"),r=W(),s=k("input"),a=W(),u=k("div"),K(l.$$.fragment),c=W(),d=k("div"),K(f.$$.fragment),h=W(),m=k("div"),K(v.$$.fragment),_(n,"class","StatusBar svelte-hfkbdu"),mt(n,"background-color",ut(t[9].status)),_(s,"type","checkbox"),s.__value=o=t[9].conversationid,Et(s,s.__value),_(s,"class","svelte-hfkbdu"),_(i,"class","Checkbox svelte-hfkbdu"),mt(i,"position","relative"),_(u,"class","UserColumn svelte-hfkbdu"),_(d,"class","StatusColumn svelte-hfkbdu"),_(m,"class","ImportanceColumn svelte-hfkbdu"),_(e,"class",S="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-hfkbdu")},m(U,ne){x(U,e,ne),b(e,i),b(i,n),b(i,r),b(i,s),s.checked=t[1][t[11]].__selected,b(e,a),b(e,u),M(l,u,null),b(e,c),b(e,d),M(f,d,null),b(e,h),b(e,m),M(v,m,null),p=!0,L||(H=[ae(s,"change",R),ae(s,"click",yt(P)),ae(i,"click",yt(Os)),ae(e,"click",z),ae(e,"mousedown",B)],L=!0)},p(U,ne){t=U,(!p||ne&2)&&mt(n,"background-color",ut(t[9].status)),(!p||ne&2&&o!==(o=t[9].conversationid))&&(s.__value=o,Et(s,s.__value)),ne&2&&(s.checked=t[1][t[11]].__selected);const X={};ne&2&&(X.row=t[9]),l.$set(X);const V={};ne&2&&(V.row=t[9]),f.$set(V);const be={};ne&2&&(be.row=t[9]),v.$set(be),(!p||ne&2&&S!==(S="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-hfkbdu"))&&_(e,"class",S)},i(U){p||(w(l.$$.fragment,U),w(f.$$.fragment,U),w(v.$$.fragment,U),p=!0)},o(U){$(l.$$.fragment,U),$(f.$$.fragment,U),$(v.$$.fragment,U),p=!1},d(U){U&&D(e),I(l),I(f),I(v),L=!1,Te(H)}}}function xs(t){let e,i,n,r=Ee(t[1]),s=[];for(let l=0;l<r.length;l+=1)s[l]=Vt(Pt(t,r,l));const o=l=>$(s[l],1,1,()=>{s[l]=null}),a=t[4].default,u=Me(a,t,t[3],null);return{c(){e=k("div");for(let l=0;l<s.length;l+=1)s[l].c();i=W(),u&&u.c(),_(e,"class","Body")},m(l,c){x(l,e,c);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(e,null);b(e,i),u&&u.m(e,null),n=!0},p(l,[c]){if(c&7){r=Ee(l[1]);let d;for(d=0;d<r.length;d+=1){const f=Pt(l,r,d);s[d]?(s[d].p(f,c),w(s[d],1)):(s[d]=Vt(f),s[d].c(),w(s[d],1),s[d].m(e,i))}for(ve(),d=r.length;d<s.length;d+=1)o(d);ye()}u&&u.p&&(!n||c&8)&&Be(u,a,l,l[3],n?Ie(a,l[3],c,null):Ke(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)w(s[c]);w(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)$(s[c]);$(u,l),n=!1},d(l){l&&D(e),Lt(s,l),u&&u.d(l)}}}const Os=()=>{};function Fs(t,e,i){let n;re(t,_e,f=>i(1,n=f));let{$$slots:r={},$$scope:s}=e,{middleclickhandler:o}=e;function a(f,h){if(f.shiftKey){let m=n.findIndex(v=>v.__selected);if(m!==-1){let v=Math.min(m,h),S=Math.max(m,h);for(let p=v;p<=S;p++)un(_e,n[p].__selected=!0,n)}}}function u(f){n[f].__selected=this.checked,_e.set(n)}const l=(f,h)=>a(h,f),c=f=>location.assign("#Conversation;id="+f.conversationid),d=(f,h)=>{h.button===1&&o&&(o(f.conversationid),h.preventDefault(),h.stopPropagation())};return t.$$set=f=>{"middleclickhandler"in f&&i(0,o=f.middleclickhandler),"$$scope"in f&&i(3,s=f.$$scope)},[o,n,a,s,r,u,l,c,d]}class Rs extends te{constructor(e){super(),ee(this,e,Fs,xs,q,{middleclickhandler:0},Ds)}}function As(t){oe(t,"svelte-1nok758","div.svelte-1nok758{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function zs(t){let e,i,n;return{c(){e=k("div"),i=k("p"),n=se(t[0]),_(e,"class","svelte-1nok758")},m(r,s){x(r,e,s),b(e,i),b(i,n)},p(r,[s]){s&1&&le(n,r[0])},i:Z,o:Z,d(r){r&&D(e)}}}function Gs(t,e,i){let n,r,s,o,a;return re(t,De,u=>i(1,r=u)),re(t,_e,u=>i(2,s=u)),re(t,bn,u=>i(3,o=u)),re(t,ze,u=>i(4,a=u)),t.$$.update=()=>{t.$$.dirty&30&&i(0,n=a?A("Loading..."):o?A("Loading failed. Please try again later."):!s||s.length===0?A("No results match your filter. Try broadening the search criteria."):r==null?A("All data loaded"):A("Load more data"))},[n,r,s,o,a]}class Es extends te{constructor(e){super(),ee(this,e,Gs,zs,q,{},As)}}function Ms(t){oe(t,"svelte-1srt8g7",`button.SortingButton{width:calc(100% - 8px);text-align:left;font-weight:normal;margin:0 0 0 30px}button.SortingButton.Selected{width:100%;text-align:left;font-weight:bold}.radio-option.svelte-1srt8g7 input[type="radio"].svelte-1srt8g7{display:none}.radio-option.svelte-1srt8g7.svelte-1srt8g7{display:flex;align-items:center;position:relative;width:calc(100% - 8px);padding:6px 10px;color:var(--main-textcolor);cursor:pointer}.radio-option.svelte-1srt8g7.svelte-1srt8g7::before{content:'';display:inline-block;width:16px;height:16px;margin-right:10px;border-radius:50%;border:2px solid var(--menu-selected-bg);background-color:white}.selected.svelte-1srt8g7.svelte-1srt8g7{font-weight:700}.selected.svelte-1srt8g7.svelte-1srt8g7::before{width:10px;height:10px;border:5px solid var(--ticket-status-chat-background)}.radio-option.svelte-1srt8g7.svelte-1srt8g7:hover{background:var(--menu-hover-bg)}.Title.svelte-1srt8g7.svelte-1srt8g7{width:100%;margin:4px 0 12px 10px;color:var(--main-textcolor);font-size:13px;font-style:normal;font-weight:700;line-height:20px;font-family:'Roboto', sans-serif}.Title.svelte-1srt8g7.svelte-1srt8g7::after{content:'';position:absolute;left:10px;right:10px;bottom:calc(100% - 37px);height:1px;background-color:var(--menu-selected-bg)}.modal.svelte-1srt8g7.svelte-1srt8g7{min-width:200px;display:flex;flex-direction:column;align-items:flex-start;margin:0;padding:4px;background-color:var(--main-background);border:none;border-radius:6px;overflow:hidden;z-index:99999;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.12), 0px 8px 24px 0px rgba(30, 34, 39, 0.10)}`)}function Qt(t,e,i){const n=t.slice();return n[8]=e[i],n}function Zt(t){let e,i,n,r,s=t[8].label+"",o,a,u,l,c;return{c(){e=k("label"),i=k("input"),r=W(),o=se(s),a=W(),_(i,"type","radio"),_(i,"name","sorting"),i.value=t[8].value,i.checked=n=t[0]&&t[0].value===t[8].value,_(i,"class","svelte-1srt8g7"),_(e,"class",u=ce(t[0].value===t[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")},m(d,f){x(d,e,f),b(e,i),b(e,r),b(e,o),b(e,a),l||(c=ae(i,"click",t[4]),l=!0)},p(d,f){f&1&&n!==(n=d[0]&&d[0].value===d[8].value)&&(i.checked=n),f&1&&u!==(u=ce(d[0].value===d[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")&&_(e,"class",u)},d(d){d&&D(e),l=!1,c()}}}function Is(t){let e,i,n,r=Ee(t[3]),s=[];for(let o=0;o<r.length;o+=1)s[o]=Zt(Qt(t,r,o));return{c(){e=k("dialog"),i=k("span"),i.textContent=`${A("Sort by")}`,n=W();for(let o=0;o<s.length;o+=1)s[o].c();_(i,"class","Title svelte-1srt8g7"),_(e,"class","modal svelte-1srt8g7"),_(e,"style",t[1])},m(o,a){x(o,e,a),b(e,i),b(e,n);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(e,null);t[6](e)},p(o,[a]){if(a&25){r=Ee(o[3]);let u;for(u=0;u<r.length;u+=1){const l=Qt(o,r,u);s[u]?s[u].p(l,a):(s[u]=Zt(l),s[u].c(),s[u].m(e,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=r.length}a&2&&_(e,"style",o[1])},i:Z,o:Z,d(o){o&&D(e),Lt(s,o),t[6](null)}}}function Bs(t,e,i){let{currentFilter:n}=e,{closeModal:r=()=>u.close()}=e,{style:s=""}=e;const o=dn(),a=[{value:"Datedue",label:A("Importance"),sort:We.Datedue,dir:!1},{value:"Created-newest",label:A("Date created - Newest"),sort:We.Datecreated,dir:!1},{value:"Created-oldest",label:A("Date created - Oldest"),sort:We.Datecreated,dir:!0},{value:"Changed-newest",label:A("Date changed - Newest"),sort:We.Datechanged,dir:!1},{value:"Changed-oldest",label:A("Date changed - Oldest"),sort:We.Datechanged,dir:!0}];let u;function l(d){const f=a.find(h=>h.value===d.target.value);i(0,n=f),o("filterChange",{option:f}),r()}function c(d){Ge[d?"unshift":"push"](()=>{u=d,i(2,u)})}return t.$$set=d=>{"currentFilter"in d&&i(0,n=d.currentFilter),"closeModal"in d&&i(5,r=d.closeModal),"style"in d&&i(1,s=d.style)},[n,s,u,a,l,r,c]}class Ks extends te{constructor(e){super(),ee(this,e,Bs,Is,q,{currentFilter:0,closeModal:5,style:1},Ms)}}function Js(t){oe(t,"svelte-657q9o",".backdrop.svelte-657q9o{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:100}")}function Us(t){let e,i,n;return{c(){e=k("div"),_(e,"class","backdrop svelte-657q9o")},m(r,s){x(r,e,s),i||(n=ae(e,"click",yt(function(){Tt(t[0])&&t[0].apply(this,arguments)})),i=!0)},p(r,[s]){t=r},i:Z,o:Z,d(r){r&&D(e),i=!1,n()}}}function Ws(t,e,i){let{onClick:n}=e;return t.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class Hs extends te{constructor(e){super(),ee(this,e,Ws,Us,q,{onClick:0},Js)}}function Ys(t){oe(t,"svelte-1fwehqj",".load.svelte-1fwehqj{display:block}.container.svelte-1fwehqj{width:calc(100% - 16px);flex-grow:1;flex-basis:0;padding:8px;overflow-y:scroll;overflow-x:hidden;border-spacing:4px 5px;border:none}@media screen and (min-width: 768px){.load.svelte-1fwehqj{width:100%}}")}function Ps(t){let e,i,n,r,s,o;return n=new Es({}),{c(){e=k("div"),i=k("div"),K(n.$$.fragment),_(i,"class","load svelte-1fwehqj"),_(e,"class","load svelte-1fwehqj")},m(a,u){x(a,e,u),b(e,i),M(n,i,null),t[11](i),r=!0,s||(o=ae(i,"click",t[12]),s=!0)},p:Z,i(a){r||(w(n.$$.fragment,a),r=!0)},o(a){$(n.$$.fragment,a),r=!1},d(a){a&&D(e),I(n),t[11](null),s=!1,o()}}}function Xt(t){let e,i,n,r;return e=new Ks({props:{closeModal:t[8],currentFilter:t[5],style:t[4]}}),e.$on("filterChange",t[10]),n=new Hs({props:{onClick:t[8]}}),{c(){K(e.$$.fragment),i=W(),K(n.$$.fragment)},m(s,o){M(e,s,o),x(s,i,o),M(n,s,o),r=!0},p(s,o){const a={};o&32&&(a.currentFilter=s[5]),o&16&&(a.style=s[4]),e.$set(a)},i(s){r||(w(e.$$.fragment,s),w(n.$$.fragment,s),r=!0)},o(s){$(e.$$.fragment,s),$(n.$$.fragment,s),r=!1},d(s){s&&D(i),I(e,s),I(n,s)}}}function Vs(t){let e,i,n,r,s,o;i=new rr({props:{currentFilter:t[5].label}}),i.$on("openModal",t[9]),r=new Rs({props:{middleclickhandler:t[0],$$slots:{default:[Ps]},$$scope:{ctx:t}}});let a=t[3]&&Xt(t);return{c(){e=k("div"),K(i.$$.fragment),n=W(),K(r.$$.fragment),s=W(),a&&a.c(),_(e,"class","container svelte-1fwehqj")},m(u,l){x(u,e,l),M(i,e,null),b(e,n),M(r,e,null),b(e,s),a&&a.m(e,null),t[13](e),o=!0},p(u,[l]){const c={};l&32&&(c.currentFilter=u[5].label),i.$set(c);const d={};l&1&&(d.middleclickhandler=u[0]),l&16578&&(d.$$scope={dirty:l,ctx:u}),r.$set(d),u[3]?a?(a.p(u,l),l&8&&w(a,1)):(a=Xt(u),a.c(),w(a,1),a.m(e,null)):a&&(ve(),$(a,1,1,()=>{a=null}),ye())},i(u){o||(w(i.$$.fragment,u),w(r.$$.fragment,u),w(a),o=!0)},o(u){$(i.$$.fragment,u),$(r.$$.fragment,u),$(a),o=!1},d(u){u&&D(e),I(i),I(r),a&&a.d(),t[13](null)}}}function Qs(t,e,i){let n,r,s;re(t,Qe,p=>i(6,r=p)),re(t,De,p=>i(7,s=p));let{middleclickhandler:o}=e,a,u,l=!1,c="";ct(()=>{const p=localStorage.getItem("TicketGridCurrentFilter");p&&i(5,n=JSON.parse(p));const L=new IntersectionObserver(H=>{H[0].isIntersecting&&tt()},{root:u,threshold:.5});return L.observe(a),()=>L.unobserve(a)});function d(){i(3,l=!1)}function f(p){i(3,l=!0),i(4,c=p.detail.dialogStyles)}function h(p){d(),console.log("filter changed: "+p.detail.option.sort+" "+p.detail.option.dir),p.detail.option.value!==n.value&&(i(5,n=p.detail.option),localStorage.setItem("TicketGridCurrentFilter",JSON.stringify(n)),et.set(n.dir),Nt.set(n.sort))}function m(p){Ge[p?"unshift":"push"](()=>{a=p,i(1,a)})}const v=()=>tt(r&&!s);function S(p){Ge[p?"unshift":"push"](()=>{u=p,i(2,u)})}return t.$$set=p=>{"middleclickhandler"in p&&i(0,o=p.middleclickhandler)},i(5,n={value:"Datedue",label:"Importance"}),[o,a,u,l,c,n,r,s,d,f,h,m,v,S]}class Zs extends te{constructor(e){super(),ee(this,e,Qs,Vs,q,{middleclickhandler:0},Ys)}}class Xs{constructor(e,i){const n=new St({apiKey:e,basePath:i+"/api/v3"});this.api=new _n(n)}async load(){let e=await this.api.getTagsGridList();e=e.reduce((i,n)=>(i[n.tagid]=n,i),{}),yn.set(e)}}function qs(t){oe(t,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function js(t){let e,i,n,r,s;const o=t[4].default,a=Me(o,t,t[3],null);return{c(){e=k("button"),a&&a.c(),_(e,"class",i=ce(t[0])+" svelte-10fvxzv")},m(u,l){x(u,e,l),a&&a.m(e,null),n=!0,r||(s=ae(e,"click",t[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&Be(a,o,u,u[3],n?Ie(o,u[3],l,null):Ke(u[3]),null),(!n||l&1&&i!==(i=ce(u[0])+" svelte-10fvxzv"))&&_(e,"class",i)},i(u){n||(w(a,u),n=!0)},o(u){$(a,u),n=!1},d(u){u&&D(e),a&&a.d(u),r=!1,s()}}}function eo(t,e,i){let{$$slots:n={},$$scope:r}=e,{onAction:s=u=>{}}=e,{className:o=""}=e;function a(u){s(u)}return t.$$set=u=>{"onAction"in u&&i(2,s=u.onAction),"className"in u&&i(0,o=u.className),"$$scope"in u&&i(3,r=u.$$scope)},[o,a,s,r,n]}class qt extends te{constructor(e){super(),ee(this,e,eo,js,q,{onAction:2,className:0},qs)}}function to(t){oe(t,"svelte-19qi61t",".NoTickets.svelte-19qi61t{width:100%;height:100%;display:flex;flex-direction:column;align-items:center}p.svelte-19qi61t{max-width:450px;font-size:13px;font-weight:400;text-align:center}h1.svelte-19qi61t{font-size:20px;font-weight:600;margin:50px auto 0 auto}img.svelte-19qi61t{max-width:300px}")}function no(t){let e,i,n=A("Change filter")+"",r,s;return e=new $e({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){K(e.$$.fragment),i=W(),r=se(n)},m(o,a){M(e,o,a),x(o,i,a),x(o,r,a),s=!0},p:Z,i(o){s||(w(e.$$.fragment,o),s=!0)},o(o){$(e.$$.fragment,o),s=!1},d(o){o&&(D(i),D(r)),I(e,o)}}}function io(t){let e,i,n=A("Configure chat button")+"",r,s;return e=new $e({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){K(e.$$.fragment),i=W(),r=se(n)},m(o,a){M(e,o,a),x(o,i,a),x(o,r,a),s=!0},p:Z,i(o){s||(w(e.$$.fragment,o),s=!0)},o(o){$(e.$$.fragment,o),s=!1},d(o){o&&(D(i),D(r)),I(e,o)}}}function ro(t){let e,i,n,r,s,o,a,u,l,c,d,f,h;return c=new qt({props:{className:"Filter",onAction:t[0],$$slots:{default:[no]},$$scope:{ctx:t}}}),f=new qt({props:{className:"Configure",onAction:t[1],$$slots:{default:[io]},$$scope:{ctx:t}}}),{c(){e=k("div"),i=k("img"),r=W(),s=k("h1"),s.textContent=`${A("No tickets found")}`,o=W(),a=k("p"),a.textContent=`${A("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")}`,u=W(),l=k("div"),K(c.$$.fragment),d=W(),K(f.$$.fragment),_(i,"alt","No results placeholder"),vt(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||_(i,"src",n),_(i,"class","svelte-19qi61t"),_(s,"class","svelte-19qi61t"),_(a,"class","svelte-19qi61t"),_(l,"class","Buttons"),_(e,"class","NoTickets svelte-19qi61t")},m(m,v){x(m,e,v),b(e,i),b(e,r),b(e,s),b(e,o),b(e,a),b(e,u),b(e,l),M(c,l,null),b(l,d),M(f,l,null),h=!0},p(m,[v]){const S={};v&4&&(S.$$scope={dirty:v,ctx:m}),c.$set(S);const p={};v&4&&(p.$$scope={dirty:v,ctx:m}),f.$set(p)},i(m){h||(w(c.$$.fragment,m),w(f.$$.fragment,m),h=!0)},o(m){$(c.$$.fragment,m),$(f.$$.fragment,m),h=!1},d(m){m&&D(e),I(c),I(f)}}}function so(){window.showCustomFilter?window.showCustomFilter():console.error("GWT function 'showCustomFilter' is not defined or exposed.")}function oo(t){return[()=>so(),()=>window.location.hash="Chat-Buttons"]}class ao extends te{constructor(e){super(),ee(this,e,oo,ro,q,{},to)}}function lo(t){oe(t,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function uo(t){let e,i;return e=new Zs({props:{middleclickhandler:t[0]}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.middleclickhandler=n[0]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function co(t){let e,i;return e=new ao({}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p:Z,i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function fo(t){let e,i,n,r;const s=[co,uo],o=[];function a(u,l){return!u[1].length&&u[2]?0:1}return i=a(t),n=o[i]=s[i](t),{c(){e=k("main"),n.c(),_(e,"class","svelte-14f2ism")},m(u,l){x(u,e,l),o[i].m(e,null),r=!0},p(u,[l]){let c=i;i=a(u),i===c?o[i].p(u,l):(ve(),$(o[c],1,1,()=>{o[c]=null}),ye(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),w(n,1),n.m(e,null))},i(u){r||(w(n),r=!0)},o(u){$(n),r=!1},d(u){u&&D(e),o[i].d()}}}function go(t,e,i){let n,r,s,o,a,u;re(t,Ve,f=>i(8,n=f)),re(t,je,f=>i(5,r=f)),re(t,Nt,f=>i(6,s=f)),re(t,et,f=>i(7,o=f)),re(t,_e,f=>i(1,a=f)),re(t,Qe,f=>i(2,u=f));let{apikey:l}=e,{middleclickhandler:c}=e,{basePath:d}=e;return ct(async()=>{await new Xs(l,d).load();const f=new _n(new St({apiKey:l,basePath:d+"/api/v3"}));lt.set(f),await tt(!0)}),_e.subscribe(f=>{vn.set(n?f.filter(h=>!h.__selected).map(h=>h.conversationid):f.filter(h=>h.__selected).map(h=>h.conversationid))}),t.$$set=f=>{"apikey"in f&&i(3,l=f.apikey),"middleclickhandler"in f&&i(0,c=f.middleclickhandler),"basePath"in f&&i(4,d=f.basePath)},t.$$.update=()=>{t.$$.dirty&224&&(o||s||r)&&tt(!0)},[c,a,u,l,d,r,s,o]}class ho extends te{constructor(e){super(),ee(this,e,go,fo,q,{apikey:3,middleclickhandler:0,basePath:4},lo)}}const mo={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},po={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:mo,warnOnMissingMessages:!0},_o=po;let Dn;function xn(){return Dn}function vo(t){return Dn=t}function ht(){return _o}function jt(t){return t.split("-").map((e,i,n)=>n.slice(0,i+1).join("-")).reverse()}function Ot(t,e=ht().fallbackLocale){const i=jt(t);return e?[...new Set([...i,...jt(e)])]:i}let On;const Ft=de({});function Fn(t){return t in On}function yo(t){if(t==null)return null;const e=Ot(t);for(let i=0;i<e.length;i++){const n=e[i];if(Fn(n))return n}return null}function bo(t,...e){Ft.update(i=>(i[t]=Object.assign(i[t]||{},...e),i))}Ft.subscribe(t=>On=t);const en=de(!1),Rt={};function wo(t){Rt[t]=new Set}function ko(t){delete Rt[t]}function Ze(t){return Rt[t]}function $o(t){return Ot(t).reverse().map(e=>{const i=Ze(e);return[e,i?[...i]:[]]}).filter(([,e])=>e.length>0)}function Rn(t){return Ot(t).reverse().some(Ze)}const He={};function An(t){if(!Rn(t))return Promise.resolve();if(t in He)return He[t];const e=$o(t);if(e.length===0)return Promise.resolve();const i=setTimeout(()=>en.set(!0),ht().loadingDelay);return He[t]=Promise.all(e.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{ko(n),s=s.map(o=>o.default||o),bo(n,...s)}))).then(()=>{clearTimeout(i),en.set(!1),delete He[t]}),He[t]}function tn(t,e){Ze(t)||wo(t);const i=Ze(t);Ze(t).has(e)||(Fn(t)||Ft.update(n=>(n[t]={},n)),i.add(e))}const it=de("");it.subscribe(t=>{vo(t),typeof window<"u"&&t!==""&&document.documentElement.setAttribute("lang",t)});const Ct=it.set;it.set=t=>yo(t)&&Rn(t)?An(t).then(()=>Ct(t)):Ct(t);it.update=t=>{let e=xn();t(e),Ct(e)};function Co(t){const{formats:e,...i}=t,n=t.initialLocale||t.fallbackLocale,r=ht();return Object.assign(r,i,{initialLocale:n}),e&&("number"in e&&Object.assign(r.formats.number,e.number),"date"in e&&Object.assign(r.formats.date,e.date),"time"in e&&Object.assign(r.formats.time,e.time)),it.set(n)}function To(t){return An(t||xn()||ht().initialLocale)}const Lo="modulepreload",So=function(t){return"/"+t},nn={},rn=function(e,i,n){if(!i||i.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=So(s),s in nn)return;nn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const d=r[c];if(d.href===s&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":Lo,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,d)=>{l.addEventListener("load",c),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function No(){tn("en",()=>rn(()=>import("./en.js"),[])),tn("sk",()=>rn(()=>import("./sk.js"),[]))}function sn(t){let e,i;return e=new ho({props:{apikey:t[0],basePath:t[3],filters:t[1],middleclickhandler:t[2],$$slots:{default:[Do]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.apikey=n[0]),r&8&&(s.basePath=n[3]),r&2&&(s.filters=n[1]),r&4&&(s.middleclickhandler=n[2]),r&64&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function Do(t){let e;const i=t[5].default,n=Me(i,t,t[6],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&64)&&Be(n,i,r,r[6],e?Ie(i,r[6],s,null):Ke(r[6]),null)},i(r){e||(w(n,r),e=!0)},o(r){$(n,r),e=!1},d(r){n&&n.d(r)}}}function xo(t){let e,i,n,r,s=t[0]&&sn(t);return{c(){s&&s.c(),e=W(),i=k("link"),_(i,"rel","stylesheet"),_(i,"href",n=t[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),x(o,e,a),x(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&w(s,1)):(s=sn(o),s.c(),w(s,1),s.m(e.parentNode,e)):s&&(ve(),$(s,1,1,()=>{s=null}),ye()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&_(i,"href",n)},i(o){r||(w(s),r=!0)},o(o){$(s),r=!1},d(o){o&&(D(e),D(i)),s&&s.d(o)}}}function Oo(t){const e={};return t.forEach(i=>{if(i.length===2){const[n,r]=i;e[n]=r}}),e}function Fo(t,e,i){let{$$slots:n={},$$scope:r}=e;No();let{lang:s="sk"}=e,{apikey:o}=e,{filters:a='[["rstatus","IN","A,P,T,N,C,R,W"],["channel_type","IN","B,M,E,F,A,I,Q,S,C,W,T,V"]]'}=e,{middleclickhandler:u}=e,{basepath:l}=e;return ct(()=>{je.set(a);const c=localStorage.getItem("la-dictionary-a");if(c)try{const d=JSON.parse(c);wn.set(Oo(d[3][1]))}catch(d){console.error("Error parsing translation data:",d)}}),Co({initialLocale:s,fallbackLocale:"en"}),To(),t.$$set=c=>{"lang"in c&&i(4,s=c.lang),"apikey"in c&&i(0,o=c.apikey),"filters"in c&&i(1,a=c.filters),"middleclickhandler"in c&&i(2,u=c.middleclickhandler),"basepath"in c&&i(3,l=c.basepath),"$$scope"in c&&i(6,r=c.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&a&&je.set(a)},[o,a,u,l,s,n,r]}class Ro extends te{constructor(e){super(),ee(this,e,Fo,xo,q,{lang:4,apikey:0,filters:1,middleclickhandler:2,basepath:3})}get lang(){return this.$$.ctx[4]}set lang(e){this.$$set({lang:e}),Se()}get apikey(){return this.$$.ctx[0]}set apikey(e){this.$$set({apikey:e}),Se()}get filters(){return this.$$.ctx[1]}set filters(e){this.$$set({filters:e}),Se()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(e){this.$$set({middleclickhandler:e}),Se()}get basepath(){return this.$$.ctx[3]}set basepath(e){this.$$set({basepath:e}),Se()}}customElements.define("tickets-table",ei(Ro,{lang:{},apikey:{},filters:{},middleclickhandler:{},basepath:{}},["default"],[],!0));
9
+ "checkbox importance";border-radius:12px;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.10);border-bottom:1px solid var(--menu-selected-bg);padding-top:6px;padding-bottom:6px;margin-bottom:6px;background-color:var(--main-background);cursor:pointer}.Row.svelte-5aj4fj.svelte-5aj4fj:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-5aj4fj.svelte-5aj4fj{background-color:var(--ticket-selected-bg) !important}.UserColumn.svelte-5aj4fj.svelte-5aj4fj{grid-area:user}.StatusColumn.svelte-5aj4fj.svelte-5aj4fj{grid-area:status;display:flex;flex-direction:column;justify-content:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ImportanceColumn.svelte-5aj4fj.svelte-5aj4fj{grid-area:importance}.Checkbox.svelte-5aj4fj.svelte-5aj4fj{grid-area:checkbox;position:relative}.StatusBar.svelte-5aj4fj.svelte-5aj4fj{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px;transition:width 0.1s ease}.Row.svelte-5aj4fj:hover .StatusBar.svelte-5aj4fj{width:10px}input.svelte-5aj4fj.svelte-5aj4fj{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(min-width: 768px){.Row.svelte-5aj4fj.svelte-5aj4fj{display:grid;grid-template-areas:"checkbox user importance"
10
+ "checkbox status importance";grid-template-columns:60px 3fr 1fr;height:110px;padding-bottom:5px;padding-top:5px;column-gap:6px}}@media(min-width: 900px){.Row.svelte-5aj4fj.svelte-5aj4fj{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 180px auto 190px;height:72px}}@media(min-width: 1300px){.Row.svelte-5aj4fj.svelte-5aj4fj{grid-template-columns:60px 260px auto 230px}}`)}function Pt(t,e,i){const n=t.slice();return n[9]=e[i],n[10]=e,n[11]=i,n}function Vt(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,m,p,S,_,K,G;function k(){t[5].call(s,t[11])}function W(...Y){return t[6](t[11],...Y)}l=new Ar({props:{row:t[9]}}),f=new Ls({props:{row:t[9]}}),p=new ls({props:{row:t[9]}});function E(){return t[7](t[9])}function X(...Y){return t[8](t[9],...Y)}return{c(){e=$("div"),i=$("div"),n=$("div"),r=U(),s=$("input"),a=U(),u=$("div"),B(l.$$.fragment),c=U(),d=$("div"),B(f.$$.fragment),h=U(),m=$("div"),B(p.$$.fragment),v(n,"class","StatusBar svelte-5aj4fj"),mt(n,"background-color",Te(t[9].status).border),v(s,"type","checkbox"),s.__value=o=t[9].conversationid,Et(s,s.__value),v(s,"class","svelte-5aj4fj"),v(i,"class","Checkbox svelte-5aj4fj"),mt(i,"position","relative"),v(u,"class","UserColumn svelte-5aj4fj"),v(d,"class","StatusColumn svelte-5aj4fj"),v(m,"class","ImportanceColumn svelte-5aj4fj"),v(e,"class",S="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-5aj4fj")},m(Y,re){D(Y,e,re),b(e,i),b(i,n),b(i,r),b(i,s),s.checked=t[1][t[11]].__selected,b(e,a),b(e,u),M(l,u,null),b(e,c),b(e,d),M(f,d,null),b(e,h),b(e,m),M(p,m,null),_=!0,K||(G=[ce(s,"change",k),ce(s,"click",yt(W)),ce(i,"click",yt(Ns)),ce(e,"click",E),ce(e,"mousedown",X)],K=!0)},p(Y,re){t=Y,(!_||re&2)&&mt(n,"background-color",Te(t[9].status).border),(!_||re&2&&o!==(o=t[9].conversationid))&&(s.__value=o,Et(s,s.__value)),re&2&&(s.checked=t[1][t[11]].__selected);const Q={};re&2&&(Q.row=t[9]),l.$set(Q);const P={};re&2&&(P.row=t[9]),f.$set(P);const _e={};re&2&&(_e.row=t[9]),p.$set(_e),(!_||re&2&&S!==(S="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-5aj4fj"))&&v(e,"class",S)},i(Y){_||(w(l.$$.fragment,Y),w(f.$$.fragment,Y),w(p.$$.fragment,Y),_=!0)},o(Y){T(l.$$.fragment,Y),T(f.$$.fragment,Y),T(p.$$.fragment,Y),_=!1},d(Y){Y&&N(e),I(l),I(f),I(p),K=!1,Le(G)}}}function xs(t){let e,i,n,r=Me(t[1]),s=[];for(let l=0;l<r.length;l+=1)s[l]=Vt(Pt(t,r,l));const o=l=>T(s[l],1,1,()=>{s[l]=null}),a=t[4].default,u=Ie(a,t,t[3],null);return{c(){e=$("div");for(let l=0;l<s.length;l+=1)s[l].c();i=U(),u&&u.c(),v(e,"class","Body")},m(l,c){D(l,e,c);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(e,null);b(e,i),u&&u.m(e,null),n=!0},p(l,[c]){if(c&7){r=Me(l[1]);let d;for(d=0;d<r.length;d+=1){const f=Pt(l,r,d);s[d]?(s[d].p(f,c),w(s[d],1)):(s[d]=Vt(f),s[d].c(),w(s[d],1),s[d].m(e,i))}for(we(),d=r.length;d<s.length;d+=1)o(d);ke()}u&&u.p&&(!n||c&8)&&Ke(u,a,l,l[3],n?Be(a,l[3],c,null):Je(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)w(s[c]);w(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)T(s[c]);T(u,l),n=!1},d(l){l&&N(e),Lt(s,l),u&&u.d(l)}}}const Ns=()=>{};function Ds(t,e,i){let n;ie(t,ve,f=>i(1,n=f));let{$$slots:r={},$$scope:s}=e,{middleclickhandler:o}=e;function a(f,h){if(f.shiftKey){let m=n.findIndex(p=>p.__selected);if(m!==-1){let p=Math.min(m,h),S=Math.max(m,h);for(let _=p;_<=S;_++)Mn(ve,n[_].__selected=!0,n)}}}console.log(n);function u(f){n[f].__selected=this.checked,ve.set(n)}const l=(f,h)=>a(h,f),c=f=>location.assign("#Conversation;id="+f.conversationid),d=(f,h)=>{h.button===1&&o&&(o(f.conversationid),h.preventDefault(),h.stopPropagation())};return t.$$set=f=>{"middleclickhandler"in f&&i(0,o=f.middleclickhandler),"$$scope"in f&&i(3,s=f.$$scope)},[o,n,a,s,r,u,l,c,d]}class Os extends te{constructor(e){super(),ee(this,e,Ds,xs,Z,{middleclickhandler:0},Ss)}}function Fs(t){oe(t,"svelte-1nok758","div.svelte-1nok758{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Rs(t){let e,i,n;return{c(){e=$("div"),i=$("p"),n=se(t[0]),v(e,"class","svelte-1nok758")},m(r,s){D(r,e,s),b(e,i),b(i,n)},p(r,[s]){s&1&&le(n,r[0])},i:q,o:q,d(r){r&&N(e)}}}function zs(t,e,i){let n,r,s,o,a;return ie(t,De,u=>i(1,r=u)),ie(t,ve,u=>i(2,s=u)),ie(t,yn,u=>i(3,o=u)),ie(t,Ge,u=>i(4,a=u)),t.$$.update=()=>{t.$$.dirty&30&&i(0,n=a?O("Loading..."):o?O("Loading failed. Please try again later."):!s||s.length===0?O("No results match your filter. Try broadening the search criteria."):r==null?O("All data loaded"):O("Load more data"))},[n,r,s,o,a]}class As extends te{constructor(e){super(),ee(this,e,zs,Rs,Z,{},Fs)}}function Gs(t){oe(t,"svelte-1srt8g7",`button.SortingButton{width:calc(100% - 8px);text-align:left;font-weight:normal;margin:0 0 0 30px}button.SortingButton.Selected{width:100%;text-align:left;font-weight:bold}.radio-option.svelte-1srt8g7 input[type="radio"].svelte-1srt8g7{display:none}.radio-option.svelte-1srt8g7.svelte-1srt8g7{display:flex;align-items:center;position:relative;width:calc(100% - 8px);padding:6px 10px;color:var(--main-textcolor);cursor:pointer}.radio-option.svelte-1srt8g7.svelte-1srt8g7::before{content:'';display:inline-block;width:16px;height:16px;margin-right:10px;border-radius:50%;border:2px solid var(--menu-selected-bg);background-color:white}.selected.svelte-1srt8g7.svelte-1srt8g7{font-weight:700}.selected.svelte-1srt8g7.svelte-1srt8g7::before{width:10px;height:10px;border:5px solid var(--ticket-status-chat-background)}.radio-option.svelte-1srt8g7.svelte-1srt8g7:hover{background:var(--menu-hover-bg)}.Title.svelte-1srt8g7.svelte-1srt8g7{width:100%;margin:4px 0 12px 10px;color:var(--main-textcolor);font-size:13px;font-style:normal;font-weight:700;line-height:20px;font-family:'Roboto', sans-serif}.Title.svelte-1srt8g7.svelte-1srt8g7::after{content:'';position:absolute;left:10px;right:10px;bottom:calc(100% - 37px);height:1px;background-color:var(--menu-selected-bg)}.modal.svelte-1srt8g7.svelte-1srt8g7{min-width:200px;display:flex;flex-direction:column;align-items:flex-start;margin:0;padding:4px;background-color:var(--main-background);border:none;border-radius:6px;overflow:hidden;z-index:99999;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.12), 0px 8px 24px 0px rgba(30, 34, 39, 0.10)}`)}function qt(t,e,i){const n=t.slice();return n[8]=e[i],n}function Qt(t){let e,i,n,r,s=t[8].label+"",o,a,u,l,c;return{c(){e=$("label"),i=$("input"),r=U(),o=se(s),a=U(),v(i,"type","radio"),v(i,"name","sorting"),i.value=t[8].value,i.checked=n=t[0]&&t[0].value===t[8].value,v(i,"class","svelte-1srt8g7"),v(e,"class",u=ae(t[0].value===t[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")},m(d,f){D(d,e,f),b(e,i),b(e,r),b(e,o),b(e,a),l||(c=ce(i,"click",t[4]),l=!0)},p(d,f){f&1&&n!==(n=d[0]&&d[0].value===d[8].value)&&(i.checked=n),f&1&&u!==(u=ae(d[0].value===d[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")&&v(e,"class",u)},d(d){d&&N(e),l=!1,c()}}}function Es(t){let e,i,n,r=Me(t[3]),s=[];for(let o=0;o<r.length;o+=1)s[o]=Qt(qt(t,r,o));return{c(){e=$("dialog"),i=$("span"),i.textContent=`${O("Sort by")}`,n=U();for(let o=0;o<s.length;o+=1)s[o].c();v(i,"class","Title svelte-1srt8g7"),v(e,"class","modal svelte-1srt8g7"),v(e,"style",t[1])},m(o,a){D(o,e,a),b(e,i),b(e,n);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(e,null);t[6](e)},p(o,[a]){if(a&25){r=Me(o[3]);let u;for(u=0;u<r.length;u+=1){const l=qt(o,r,u);s[u]?s[u].p(l,a):(s[u]=Qt(l),s[u].c(),s[u].m(e,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=r.length}a&2&&v(e,"style",o[1])},i:q,o:q,d(o){o&&N(e),Lt(s,o),t[6](null)}}}function Ms(t,e,i){let{currentFilter:n}=e,{closeModal:r=()=>u.close()}=e,{style:s=""}=e;const o=cn(),a=[{value:"Datedue",label:O("Importance"),sort:He.Datedue,dir:!1},{value:"Created-newest",label:O("Date created - Newest"),sort:He.Datecreated,dir:!1},{value:"Created-oldest",label:O("Date created - Oldest"),sort:He.Datecreated,dir:!0},{value:"Changed-newest",label:O("Date changed - Newest"),sort:He.Datechanged,dir:!1},{value:"Changed-oldest",label:O("Date changed - Oldest"),sort:He.Datechanged,dir:!0}];let u;function l(d){const f=a.find(h=>h.value===d.target.value);i(0,n=f),o("filterChange",{option:f}),r()}function c(d){Ee[d?"unshift":"push"](()=>{u=d,i(2,u)})}return t.$$set=d=>{"currentFilter"in d&&i(0,n=d.currentFilter),"closeModal"in d&&i(5,r=d.closeModal),"style"in d&&i(1,s=d.style)},[n,s,u,a,l,r,c]}class Is extends te{constructor(e){super(),ee(this,e,Ms,Es,Z,{currentFilter:0,closeModal:5,style:1},Gs)}}function Bs(t){oe(t,"svelte-657q9o",".backdrop.svelte-657q9o{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:100}")}function Ks(t){let e,i,n;return{c(){e=$("div"),v(e,"class","backdrop svelte-657q9o")},m(r,s){D(r,e,s),i||(n=ce(e,"click",yt(function(){Tt(t[0])&&t[0].apply(this,arguments)})),i=!0)},p(r,[s]){t=r},i:q,o:q,d(r){r&&N(e),i=!1,n()}}}function Js(t,e,i){let{onClick:n}=e;return t.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class Us extends te{constructor(e){super(),ee(this,e,Js,Ks,Z,{onClick:0},Bs)}}function Ws(t){oe(t,"svelte-1fwehqj",".load.svelte-1fwehqj{display:block}.container.svelte-1fwehqj{width:calc(100% - 16px);flex-grow:1;flex-basis:0;padding:8px;overflow-y:scroll;overflow-x:hidden;border-spacing:4px 5px;border:none}@media screen and (min-width: 768px){.load.svelte-1fwehqj{width:100%}}")}function Hs(t){let e,i,n,r,s,o;return n=new As({}),{c(){e=$("div"),i=$("div"),B(n.$$.fragment),v(i,"class","load svelte-1fwehqj"),v(e,"class","load svelte-1fwehqj")},m(a,u){D(a,e,u),b(e,i),M(n,i,null),t[11](i),r=!0,s||(o=ce(i,"click",t[12]),s=!0)},p:q,i(a){r||(w(n.$$.fragment,a),r=!0)},o(a){T(n.$$.fragment,a),r=!1},d(a){a&&N(e),I(n),t[11](null),s=!1,o()}}}function Zt(t){let e,i,n,r;return e=new Is({props:{closeModal:t[8],currentFilter:t[5],style:t[4]}}),e.$on("filterChange",t[10]),n=new Us({props:{onClick:t[8]}}),{c(){B(e.$$.fragment),i=U(),B(n.$$.fragment)},m(s,o){M(e,s,o),D(s,i,o),M(n,s,o),r=!0},p(s,o){const a={};o&32&&(a.currentFilter=s[5]),o&16&&(a.style=s[4]),e.$set(a)},i(s){r||(w(e.$$.fragment,s),w(n.$$.fragment,s),r=!0)},o(s){T(e.$$.fragment,s),T(n.$$.fragment,s),r=!1},d(s){s&&N(i),I(e,s),I(n,s)}}}function Ys(t){let e,i,n,r,s,o;i=new nr({props:{currentFilter:t[5].label}}),i.$on("openModal",t[9]),r=new Os({props:{middleclickhandler:t[0],$$slots:{default:[Hs]},$$scope:{ctx:t}}});let a=t[3]&&Zt(t);return{c(){e=$("div"),B(i.$$.fragment),n=U(),B(r.$$.fragment),s=U(),a&&a.c(),v(e,"class","container svelte-1fwehqj")},m(u,l){D(u,e,l),M(i,e,null),b(e,n),M(r,e,null),b(e,s),a&&a.m(e,null),t[13](e),o=!0},p(u,[l]){const c={};l&32&&(c.currentFilter=u[5].label),i.$set(c);const d={};l&1&&(d.middleclickhandler=u[0]),l&16578&&(d.$$scope={dirty:l,ctx:u}),r.$set(d),u[3]?a?(a.p(u,l),l&8&&w(a,1)):(a=Zt(u),a.c(),w(a,1),a.m(e,null)):a&&(we(),T(a,1,1,()=>{a=null}),ke())},i(u){o||(w(i.$$.fragment,u),w(r.$$.fragment,u),w(a),o=!0)},o(u){T(i.$$.fragment,u),T(r.$$.fragment,u),T(a),o=!1},d(u){u&&N(e),I(i),I(r),a&&a.d(),t[13](null)}}}function Ps(t,e,i){let n,r,s;ie(t,Qe,_=>i(6,r=_)),ie(t,De,_=>i(7,s=_));let{middleclickhandler:o}=e,a,u,l=!1,c="";ut(()=>{const _=localStorage.getItem("TicketGridCurrentFilter");_&&i(5,n=JSON.parse(_));const K=new IntersectionObserver(G=>{G[0].isIntersecting&&tt()},{root:u,threshold:.5});return K.observe(a),()=>K.unobserve(a)});function d(){i(3,l=!1)}function f(_){i(3,l=!0),i(4,c=_.detail.dialogStyles)}function h(_){d(),console.log("filter changed: "+_.detail.option.sort+" "+_.detail.option.dir),_.detail.option.value!==n.value&&(i(5,n=_.detail.option),localStorage.setItem("TicketGridCurrentFilter",JSON.stringify(n)),dt.set(n.dir),xt.set(n.sort))}function m(_){Ee[_?"unshift":"push"](()=>{a=_,i(1,a)})}const p=()=>tt(r&&!s);function S(_){Ee[_?"unshift":"push"](()=>{u=_,i(2,u)})}return t.$$set=_=>{"middleclickhandler"in _&&i(0,o=_.middleclickhandler)},i(5,n={value:"Datedue",label:"Importance"}),[o,a,u,l,c,n,r,s,d,f,h,m,p,S]}class Vs extends te{constructor(e){super(),ee(this,e,Ps,Ys,Z,{middleclickhandler:0},Ws)}}class qs{constructor(e,i){const n=new St({apiKey:e,basePath:i+"/api/v3"});this.api=new pn(n)}async load(){let e=await this.api.getTagsGridList();e=e.reduce((i,n)=>(i[n.tagid]=n,i),{}),_n.set(e)}}function Qs(t){oe(t,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function Zs(t){let e,i,n,r,s;const o=t[4].default,a=Ie(o,t,t[3],null);return{c(){e=$("button"),a&&a.c(),v(e,"class",i=ae(t[0])+" svelte-10fvxzv")},m(u,l){D(u,e,l),a&&a.m(e,null),n=!0,r||(s=ce(e,"click",t[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&Ke(a,o,u,u[3],n?Be(o,u[3],l,null):Je(u[3]),null),(!n||l&1&&i!==(i=ae(u[0])+" svelte-10fvxzv"))&&v(e,"class",i)},i(u){n||(w(a,u),n=!0)},o(u){T(a,u),n=!1},d(u){u&&N(e),a&&a.d(u),r=!1,s()}}}function Xs(t,e,i){let{$$slots:n={},$$scope:r}=e,{onAction:s=u=>{}}=e,{className:o=""}=e;function a(u){s(u)}return t.$$set=u=>{"onAction"in u&&i(2,s=u.onAction),"className"in u&&i(0,o=u.className),"$$scope"in u&&i(3,r=u.$$scope)},[o,a,s,r,n]}class Xt extends te{constructor(e){super(),ee(this,e,Xs,Zs,Z,{onAction:2,className:0},Qs)}}function js(t){oe(t,"svelte-19qi61t",".NoTickets.svelte-19qi61t{width:100%;height:100%;display:flex;flex-direction:column;align-items:center}p.svelte-19qi61t{max-width:450px;font-size:13px;font-weight:400;text-align:center}h1.svelte-19qi61t{font-size:20px;font-weight:600;margin:50px auto 0 auto}img.svelte-19qi61t{max-width:300px}")}function eo(t){let e,i,n=O("Change filter")+"",r,s;return e=new $e({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){B(e.$$.fragment),i=U(),r=se(n)},m(o,a){M(e,o,a),D(o,i,a),D(o,r,a),s=!0},p:q,i(o){s||(w(e.$$.fragment,o),s=!0)},o(o){T(e.$$.fragment,o),s=!1},d(o){o&&(N(i),N(r)),I(e,o)}}}function to(t){let e,i,n=O("Configure chat button")+"",r,s;return e=new $e({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){B(e.$$.fragment),i=U(),r=se(n)},m(o,a){M(e,o,a),D(o,i,a),D(o,r,a),s=!0},p:q,i(o){s||(w(e.$$.fragment,o),s=!0)},o(o){T(e.$$.fragment,o),s=!1},d(o){o&&(N(i),N(r)),I(e,o)}}}function no(t){let e,i,n,r,s,o,a,u,l,c,d,f,h;return c=new Xt({props:{className:"Filter",onAction:t[0],$$slots:{default:[eo]},$$scope:{ctx:t}}}),f=new Xt({props:{className:"Configure",onAction:t[1],$$slots:{default:[to]},$$scope:{ctx:t}}}),{c(){e=$("div"),i=$("img"),r=U(),s=$("h1"),s.textContent=`${O("No tickets found")}`,o=U(),a=$("p"),a.textContent=`${O("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")}`,u=U(),l=$("div"),B(c.$$.fragment),d=U(),B(f.$$.fragment),v(i,"alt","No results placeholder"),_t(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||v(i,"src",n),v(i,"class","svelte-19qi61t"),v(s,"class","svelte-19qi61t"),v(a,"class","svelte-19qi61t"),v(l,"class","Buttons"),v(e,"class","NoTickets svelte-19qi61t")},m(m,p){D(m,e,p),b(e,i),b(e,r),b(e,s),b(e,o),b(e,a),b(e,u),b(e,l),M(c,l,null),b(l,d),M(f,l,null),h=!0},p(m,[p]){const S={};p&4&&(S.$$scope={dirty:p,ctx:m}),c.$set(S);const _={};p&4&&(_.$$scope={dirty:p,ctx:m}),f.$set(_)},i(m){h||(w(c.$$.fragment,m),w(f.$$.fragment,m),h=!0)},o(m){T(c.$$.fragment,m),T(f.$$.fragment,m),h=!1},d(m){m&&N(e),I(c),I(f)}}}function io(){window.showCustomFilter?window.showCustomFilter():console.error("GWT function 'showCustomFilter' is not defined or exposed.")}function ro(t){return[()=>io(),()=>window.location.hash="Chat-Buttons"]}class so extends te{constructor(e){super(),ee(this,e,ro,no,Z,{},js)}}function oo(t){oe(t,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function ao(t){let e,i;return e=new Vs({props:{middleclickhandler:t[0]}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.middleclickhandler=n[0]),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function lo(t){let e,i;return e=new so({}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p:q,i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function uo(t){let e,i,n,r;const s=[lo,ao],o=[];function a(u,l){return!u[1].length&&u[2]?0:1}return i=a(t),n=o[i]=s[i](t),{c(){e=$("main"),n.c(),v(e,"class","svelte-14f2ism")},m(u,l){D(u,e,l),o[i].m(e,null),r=!0},p(u,[l]){let c=i;i=a(u),i===c?o[i].p(u,l):(we(),T(o[c],1,1,()=>{o[c]=null}),ke(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),w(n,1),n.m(e,null))},i(u){r||(w(n),r=!0)},o(u){T(n),r=!1},d(u){u&&N(e),o[i].d()}}}function co(t,e,i){let n,r,s,o,a,u;ie(t,qe,f=>i(8,n=f)),ie(t,et,f=>i(5,r=f)),ie(t,xt,f=>i(6,s=f)),ie(t,dt,f=>i(7,o=f)),ie(t,ve,f=>i(1,a=f)),ie(t,Qe,f=>i(2,u=f));let{apikey:l}=e,{middleclickhandler:c}=e,{basePath:d}=e;return ut(async()=>{await new qs(l,d).load();const f=new pn(new St({apiKey:l,basePath:d+"/api/v3"}));lt.set(f),await tt(!0)}),ve.subscribe(f=>{vn.set(n?f.filter(h=>!h.__selected).map(h=>h.conversationid):f.filter(h=>h.__selected).map(h=>h.conversationid))}),t.$$set=f=>{"apikey"in f&&i(3,l=f.apikey),"middleclickhandler"in f&&i(0,c=f.middleclickhandler),"basePath"in f&&i(4,d=f.basePath)},t.$$.update=()=>{t.$$.dirty&224&&(o||s||r)&&tt(!0)},[c,a,u,l,d,r,s,o]}class fo extends te{constructor(e){super(),ee(this,e,co,uo,Z,{apikey:3,middleclickhandler:0,basePath:4},oo)}}const go={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},ho={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:go,warnOnMissingMessages:!0},mo=ho;let xn;function Nn(){return xn}function po(t){return xn=t}function ht(){return mo}function jt(t){return t.split("-").map((e,i,n)=>n.slice(0,i+1).join("-")).reverse()}function Ot(t,e=ht().fallbackLocale){const i=jt(t);return e?[...new Set([...i,...jt(e)])]:i}let Dn;const Ft=de({});function On(t){return t in Dn}function vo(t){if(t==null)return null;const e=Ot(t);for(let i=0;i<e.length;i++){const n=e[i];if(On(n))return n}return null}function _o(t,...e){Ft.update(i=>(i[t]=Object.assign(i[t]||{},...e),i))}Ft.subscribe(t=>Dn=t);const en=de(!1),Rt={};function yo(t){Rt[t]=new Set}function bo(t){delete Rt[t]}function Ze(t){return Rt[t]}function wo(t){return Ot(t).reverse().map(e=>{const i=Ze(e);return[e,i?[...i]:[]]}).filter(([,e])=>e.length>0)}function Fn(t){return Ot(t).reverse().some(Ze)}const Ye={};function Rn(t){if(!Fn(t))return Promise.resolve();if(t in Ye)return Ye[t];const e=wo(t);if(e.length===0)return Promise.resolve();const i=setTimeout(()=>en.set(!0),ht().loadingDelay);return Ye[t]=Promise.all(e.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{bo(n),s=s.map(o=>o.default||o),_o(n,...s)}))).then(()=>{clearTimeout(i),en.set(!1),delete Ye[t]}),Ye[t]}function tn(t,e){Ze(t)||yo(t);const i=Ze(t);Ze(t).has(e)||(On(t)||Ft.update(n=>(n[t]={},n)),i.add(e))}const it=de("");it.subscribe(t=>{po(t),typeof window<"u"&&t!==""&&document.documentElement.setAttribute("lang",t)});const Ct=it.set;it.set=t=>vo(t)&&Fn(t)?Rn(t).then(()=>Ct(t)):Ct(t);it.update=t=>{let e=Nn();t(e),Ct(e)};function ko(t){const{formats:e,...i}=t,n=t.initialLocale||t.fallbackLocale,r=ht();return Object.assign(r,i,{initialLocale:n}),e&&("number"in e&&Object.assign(r.formats.number,e.number),"date"in e&&Object.assign(r.formats.date,e.date),"time"in e&&Object.assign(r.formats.time,e.time)),it.set(n)}function $o(t){return Rn(t||Nn()||ht().initialLocale)}const Co="modulepreload",To=function(t){return"/"+t},nn={},rn=function(e,i,n){if(!i||i.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=To(s),s in nn)return;nn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const d=r[c];if(d.href===s&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":Co,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,d)=>{l.addEventListener("load",c),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function Lo(){tn("en",()=>rn(()=>import("./en.js"),[])),tn("sk",()=>rn(()=>import("./sk.js"),[]))}function sn(t){let e,i;return e=new fo({props:{apikey:t[0],basePath:t[3],filters:t[1],middleclickhandler:t[2],$$slots:{default:[So]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,r){M(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.apikey=n[0]),r&8&&(s.basePath=n[3]),r&2&&(s.filters=n[1]),r&4&&(s.middleclickhandler=n[2]),r&64&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(w(e.$$.fragment,n),i=!0)},o(n){T(e.$$.fragment,n),i=!1},d(n){I(e,n)}}}function So(t){let e;const i=t[5].default,n=Ie(i,t,t[6],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&64)&&Ke(n,i,r,r[6],e?Be(i,r[6],s,null):Je(r[6]),null)},i(r){e||(w(n,r),e=!0)},o(r){T(n,r),e=!1},d(r){n&&n.d(r)}}}function xo(t){let e,i,n,r,s=t[0]&&sn(t);return{c(){s&&s.c(),e=U(),i=$("link"),v(i,"rel","stylesheet"),v(i,"href",n=t[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),D(o,e,a),D(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&w(s,1)):(s=sn(o),s.c(),w(s,1),s.m(e.parentNode,e)):s&&(we(),T(s,1,1,()=>{s=null}),ke()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&v(i,"href",n)},i(o){r||(w(s),r=!0)},o(o){T(s),r=!1},d(o){o&&(N(e),N(i)),s&&s.d(o)}}}function No(t){const e={};return t.forEach(i=>{if(i.length===2){const[n,r]=i;e[n]=r}}),e}function Do(t,e,i){let{$$slots:n={},$$scope:r}=e;Lo();let{lang:s="sk"}=e,{apikey:o}=e,{filters:a='[["rstatus","IN","A,P,T,N,C,R,W"],["channel_type","IN","B,M,E,F,A,I,Q,S,C,W,T,V"]]'}=e,{middleclickhandler:u}=e,{basepath:l}=e;return ut(()=>{et.set(a);const c=localStorage.getItem("la-dictionary-a");if(c)try{const d=JSON.parse(c);bn.set(No(d[3][1]))}catch(d){console.error("Error parsing translation data:",d)}}),ko({initialLocale:s,fallbackLocale:"en"}),$o(),t.$$set=c=>{"lang"in c&&i(4,s=c.lang),"apikey"in c&&i(0,o=c.apikey),"filters"in c&&i(1,a=c.filters),"middleclickhandler"in c&&i(2,u=c.middleclickhandler),"basepath"in c&&i(3,l=c.basepath),"$$scope"in c&&i(6,r=c.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&a&&et.set(a)},[o,a,u,l,s,n,r]}class Oo extends te{constructor(e){super(),ee(this,e,Do,xo,Z,{lang:4,apikey:0,filters:1,middleclickhandler:2,basepath:3})}get lang(){return this.$$.ctx[4]}set lang(e){this.$$set({lang:e}),xe()}get apikey(){return this.$$.ctx[0]}set apikey(e){this.$$set({apikey:e}),xe()}get filters(){return this.$$.ctx[1]}set filters(e){this.$$set({filters:e}),xe()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(e){this.$$set({middleclickhandler:e}),xe()}get basepath(){return this.$$.ctx[3]}set basepath(e){this.$$set({basepath:e}),xe()}}customElements.define("tickets-table",ei(Oo,{lang:{},apikey:{},filters:{},middleclickhandler:{},basepath:{}},["default"],[],!0));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qualityunit/liveagent-ticket-grid",
3
3
  "private": false,
4
- "version": "0.0.48",
4
+ "version": "0.0.52",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",