@qualityunit/liveagent-ticket-grid 0.0.28 → 0.0.32

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,11 +1,11 @@
1
- var Tn=Object.defineProperty;var Cn=(e,t,i)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var de=(e,t,i)=>(Cn(e,typeof t!="symbol"?t+"":t,i),i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 V(){}function at(e,t){for(const i in t)e[i]=t[i];return e}function sn(e){return e()}function Gt(){return Object.create(null)}function be(e){e.forEach(sn)}function ct(e){return typeof e=="function"}function Z(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let rt;function yt(e,t){return e===t?!0:(rt||(rt=document.createElement("a")),rt.href=t,e===rt.href)}function Ln(e){return Object.keys(e).length===0}function Oe(e,...t){if(e==null){for(const n of t)n(void 0);return V}const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function j(e,t,i){e.$$.on_destroy.push(Oe(t,i))}function Ie(e,t,i,n){if(e){const r=on(e,t,i,n);return e[0](r)}}function on(e,t,i,n){return e[1]&&n?at(i.ctx.slice(),e[1](n(t))):i.ctx}function xe(e,t,i,n){if(e[2]&&n){const r=e[2](n(i));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=t.dirty[a]|r[a];return s}return t.dirty|r}return t.dirty}function Be(e,t,i,n,r,s){if(r){const o=on(t,i,n,s);e.p(o,r)}}function Ke(e){if(e.ctx.length>32){const t=[],i=e.ctx.length/32;for(let n=0;n<i;n++)t[n]=-1;return t}return-1}function Sn(e){const t={};for(const i in e)i[0]!=="$"&&(t[i]=e[i]);return t}function zt(e,t){const i={};t=new Set(t);for(const n in e)!t.has(n)&&n[0]!=="$"&&(i[n]=e[n]);return i}function Te(e){return e??""}function _e(e,t,i){return e.set(i),t}const Nn=["",!0,1,"true","contenteditable"];function C(e,t){e.appendChild(t)}function re(e,t,i){const n=Dn(e);if(!n.getElementById(t)){const r=S("style");r.id=t,r.textContent=i,On(n,r)}}function Dn(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function On(e,t){return C(e.head||e,t),t.sheet}function R(e,t,i){e.insertBefore(t,i||null)}function O(e){e.parentNode&&e.parentNode.removeChild(e)}function St(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function S(e){return document.createElement(e)}function ee(e){return document.createTextNode(e)}function P(){return ee(" ")}function et(){return ee("")}function le(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function bt(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function y(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}const Rn=["width","height"];function Et(e,t){const i=Object.getOwnPropertyDescriptors(e.__proto__);for(const n in t)t[n]==null?e.removeAttribute(n):n==="style"?e.style.cssText=t[n]:n==="__value"?e.value=e[n]=t[n]:i[n]&&i[n].set&&Rn.indexOf(n)===-1?e[n]=t[n]:y(e,n,t[n])}function An(e){return Array.from(e.childNodes)}function ie(e,t){t=""+t,e.data!==t&&(e.data=t)}function Fn(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function Mn(e,t,i){~Nn.indexOf(i)?Fn(e,t):ie(e,t)}function It(e,t){e.value=t??""}function pt(e,t,i,n){i==null?e.style.removeProperty(t):e.style.setProperty(t,i,n?"important":"")}function xt(e,t,i){e.classList.toggle(t,!!i)}function Gn(e,t,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:n})}function zn(e){const t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}let Xe;function Ve(e){Xe=e}function ft(){if(!Xe)throw new Error("Function called outside component initialization");return Xe}function an(e){ft().$$.on_mount.push(e)}function ln(){const e=ft();return(t,i,{cancelable:n=!1}={})=>{const r=e.$$.callbacks[t];if(r){const s=Gn(t,i,{cancelable:n});return r.slice().forEach(o=>{o.call(e,s)}),!s.defaultPrevented}return!0}}function Se(e,t){return ft().$$.context.set(e,t),t}function ve(e){return ft().$$.context.get(e)}const Me=[],qe=[];let ze=[];const kt=[],En=Promise.resolve();let wt=!1;function In(){wt||(wt=!0,En.then($e))}function $t(e){ze.push(e)}function xn(e){kt.push(e)}const _t=new Set;let Ae=0;function $e(){if(Ae!==0)return;const e=Xe;do{try{for(;Ae<Me.length;){const t=Me[Ae];Ae++,Ve(t),Bn(t.$$)}}catch(t){throw Me.length=0,Ae=0,t}for(Ve(null),Me.length=0,Ae=0;qe.length;)qe.pop()();for(let t=0;t<ze.length;t+=1){const i=ze[t];_t.has(i)||(_t.add(i),i())}ze.length=0}while(Me.length);for(;kt.length;)kt.pop()();wt=!1,_t.clear(),Ve(e)}function Bn(e){if(e.fragment!==null){e.update(),be(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach($t)}}function Kn(e){const t=[],i=[];ze.forEach(n=>e.indexOf(n)===-1?t.push(n):i.push(n)),i.forEach(n=>n()),ze=t}const st=new Set;let Ne;function ge(){Ne={r:0,c:[],p:Ne}}function he(){Ne.r||be(Ne.c),Ne=Ne.p}function k(e,t){e&&e.i&&(st.delete(e),e.i(t))}function $(e,t,i,n){if(e&&e.o){if(st.has(e))return;st.add(e),Ne.c.push(()=>{st.delete(e),n&&(i&&e.d(1),n())}),e.o(t)}else n&&n()}function Ee(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Jn(e,t){const i={},n={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],a=t[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);e[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 Un(e,t,i){const n=e.$$.props[t];n!==void 0&&(e.$$.bound[n]=i,i(e.$$.ctx[n]))}function H(e){e&&e.c()}function K(e,t,i){const{fragment:n,after_update:r}=e.$$;n&&n.m(t,i),$t(()=>{const s=e.$$.on_mount.map(sn).filter(ct);e.$$.on_destroy?e.$$.on_destroy.push(...s):be(s),e.$$.on_mount=[]}),r.forEach($t)}function J(e,t){const i=e.$$;i.fragment!==null&&(Kn(i.after_update),be(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function Wn(e,t){e.$$.dirty[0]===-1&&(Me.push(e),In(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function te(e,t,i,n,r,s,o=null,a=[-1]){const u=Xe;Ve(e);const l=e.$$={fragment:null,ctx:[],props:s,update:V,not_equal:r,bound:Gt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Gt(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(e,t.props||{},(f,d,...g)=>{const m=g.length?g[0]:d;return l.ctx&&r(l.ctx[f],l.ctx[f]=m)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](m),c&&Wn(e,f)),d}):[],l.update(),c=!0,be(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=An(t.target);l.fragment&&l.fragment.l(f),f.forEach(O)}else l.fragment&&l.fragment.c();t.intro&&k(e.$$.fragment),K(e,t.target,t.anchor),$e()}Ve(u)}let un;typeof HTMLElement=="function"&&(un=class extends HTMLElement{constructor(t,i,n){super();de(this,"$$ctor");de(this,"$$s");de(this,"$$c");de(this,"$$cn",!1);de(this,"$$d",{});de(this,"$$r",!1);de(this,"$$p_d",{});de(this,"$$l",{});de(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=i,n&&this.attachShadow({mode:"open"})}addEventListener(t,i,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(i),this.$$c){const r=this.$$c.$on(t,i);this.$$l_u.set(i,r)}super.addEventListener(t,i,n)}removeEventListener(t,i,n){if(super.removeEventListener(t,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=S("slot"),o!=="default"&&y(a,"name",o)},m:function(c,f){R(c,a,f)},d:function(c){c&&O(a)}}}};var t=i;if(await Promise.resolve(),!this.$$cn)return;const n={},r=zn(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]=ot(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=ot(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(t,i,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=ot(t,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(i=>this.$$p_d[i].attribute===t||!this.$$p_d[i].attribute&&i.toLowerCase()===t)||t}});function ot(e,t,i,n){var s;const r=(s=i[e])==null?void 0:s.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!i[e])return t;if(n==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Hn(e,t,i,n,r,s){let o=class extends un{constructor(){super(e,i,r),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Object.keys(t).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=ot(a,u,t),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)),e.element=o,o}class ne{constructor(){de(this,"$$");de(this,"$$set")}$destroy(){J(this,1),this.$destroy=V}$on(t,i){if(!ct(i))return V;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(t){this.$$set&&!Ln(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Yn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Yn);function Pn(e){re(e,"svelte-yh1nwn",".Icon.svelte-yh1nwn:before{font-family:'la-icon-font';display:inline-block;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1em}")}function Vn(e){let t,i;return{c(){t=S("span"),y(t,"class",i=Te(`Icon ${e[0]} ${e[1]}`)+" svelte-yh1nwn")},m(n,r){R(n,t,r)},p(n,[r]){r&3&&i!==(i=Te(`Icon ${n[0]} ${n[1]}`)+" svelte-yh1nwn")&&y(t,"class",i)},i:V,o:V,d(n){n&&O(t)}}}function Qn(e,t,i){let{className:n=""}=t,{iconLaClassName:r}=t;return e.$$set=s=>{"className"in s&&i(0,n=s.className),"iconLaClassName"in s&&i(1,r=s.iconLaClassName)},[n,r]}class ye extends ne{constructor(t){super(),te(this,t,Qn,Vn,Z,{className:0,iconLaClassName:1},Pn)}}const Fe=[];function Zn(e,t){return{subscribe:ce(e,t).subscribe}}function ce(e,t=V){let i;const n=new Set;function r(a){if(Z(e,a)&&(e=a,i)){const u=!Fe.length;for(const l of n)l[1](),Fe.push(l,e);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(e))}function o(a,u=V){const l=[a,u];return n.add(l),n.size===1&&(i=t(r,s)||V),a(e),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}function Xn(e,t,i){const n=!Array.isArray(e),r=n?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return Zn(i,(o,a)=>{let u=!1;const l=[];let c=0,f=V;const d=()=>{if(c)return;f();const m=t(n?l[0]:l,o,a);s?o(m):f=ct(m)?m:V},g=r.map((m,_)=>Oe(m,v=>{l[_]=v,c&=~(1<<_),u&&d()},()=>{c|=1<<_}));return u=!0,d(),function(){be(g),f(),u=!1}})}const qn={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"}}},jn={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:qn,warnOnMissingMessages:!0},ei=jn;let cn;function lt(){return cn}function ti(e){return cn=e}function tt(){return ei}function Bt(e){return e.split("-").map((t,i,n)=>n.slice(0,i+1).join("-")).reverse()}function nt(e,t=tt().fallbackLocale){const i=Bt(e);return t?[...new Set([...i,...Bt(t)])]:i}let Nt;const dt=ce({});function ni(e){return Nt[e]||null}function Dt(e){return e in Nt}function ii(e,t){if(Dt(e)){const i=ni(e);if(t in i)return i[t];const n=t.split(".");let r=i;for(let s=0;s<n.length;s++){if(typeof r[n[s]]!="object")return r[n[s]]||null;r=r[n[s]]}return r}return null}function ri(e){if(e==null)return null;const t=nt(e);for(let i=0;i<t.length;i++){const n=t[i];if(Dt(n))return n}return null}function si(e,...t){dt.update(i=>(i[e]=Object.assign(i[e]||{},...t),i))}dt.subscribe(e=>Nt=e);const Kt=ce(!1),Ot={};function oi(e){Ot[e]=new Set}function ai(e){delete Ot[e]}function Qe(e){return Ot[e]}function li(e){return nt(e).reverse().map(t=>{const i=Qe(t);return[t,i?[...i]:[]]}).filter(([,t])=>t.length>0)}function Rt(e){return nt(e).reverse().some(Qe)}const He={};function fn(e){if(!Rt(e))return Promise.resolve();if(e in He)return He[e];const t=li(e);if(t.length===0)return Promise.resolve();const i=setTimeout(()=>Kt.set(!0),tt().loadingDelay);return He[e]=Promise.all(t.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{ai(n),s=s.map(o=>o.default||o),si(n,...s)}))).then(()=>{clearTimeout(i),Kt.set(!1),delete He[e]}),He[e]}function Jt(e,t){Qe(e)||oi(e);const i=Qe(e);Qe(e).has(t)||(Dt(e)||dt.update(n=>(n[e]={},n)),i.add(t))}const Je=ce("");Je.subscribe(e=>{ti(e),typeof window<"u"&&e!==""&&document.documentElement.setAttribute("lang",e)});const Tt=Je.set;Je.set=e=>ri(e)&&Rt(e)?fn(e).then(()=>Tt(e)):Tt(e);Je.update=e=>{let t=lt();e(t),Tt(t)};function ui(e){const{formats:t,...i}=e,n=e.initialLocale||e.fallbackLocale,r=tt();return Object.assign(r,i,{initialLocale:n}),t&&("number"in t&&Object.assign(r.formats.number,t.number),"date"in t&&Object.assign(r.formats.date,t.date),"time"in t&&Object.assign(r.formats.time,t.time)),Je.set(n)}const De={},ci=(e,t,i)=>i&&(t in De||(De[t]={}),e in De[t]||(De[t][e]=i),i),fi=(e,t)=>{if(t==null)return;if(t in De&&e in De[t])return De[t][e];const i=nt(t);for(let n=0;n<i.length;n++){const r=i[n],s=ii(r,e);if(s)return ci(e,t,s)}},di=(e,t,i={})=>{const n=typeof t=="string"?t:t.id,r=typeof t=="string"?i:t,{values:s,locale:o=e||lt(),default:a}=r;if(o==null)throw new Error("[svelte-intl-precompile] Cannot format a message without first setting the initial locale.");let u=fi(n,o);return typeof u=="string"?u:typeof u=="function"?u(...Object.keys(r.values||{}).sort().map(l=>(r.values||{})[l])):(tt().warnOnMissingMessages&&console.warn(`[svelte-intl-precompile] The message "${n}" was not found in "${nt(o).join('", "')}".${Rt(lt())?`
1
+ var Gn=Object.defineProperty;var zn=(e,t,i)=>t in e?Gn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var me=(e,t,i)=>(zn(e,typeof t!="symbol"?t+"":t,i),i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 ct(e,t){for(const i in t)e[i]=t[i];return e}function fn(e){return e()}function Bt(){return Object.create(null)}function Le(e){e.forEach(fn)}function ht(e){return typeof e=="function"}function te(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let at;function $t(e,t){return e===t?!0:(at||(at=document.createElement("a")),at.href=t,e===at.href)}function En(e){return Object.keys(e).length===0}function Ot(e,...t){if(e==null){for(const n of t)n(void 0);return q}const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function ve(e){let t;return Ot(e,i=>t=i)(),t}function V(e,t,i){e.$$.on_destroy.push(Ot(t,i))}function Ue(e,t,i,n){if(e){const r=gn(e,t,i,n);return e[0](r)}}function gn(e,t,i,n){return e[1]&&n?ct(i.ctx.slice(),e[1](n(t))):i.ctx}function We(e,t,i,n){if(e[2]&&n){const r=e[2](n(i));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=t.dirty[a]|r[a];return s}return t.dirty|r}return t.dirty}function He(e,t,i,n,r,s){if(r){const o=gn(t,i,n,s);e.p(o,r)}}function Ye(e){if(e.ctx.length>32){const t=[],i=e.ctx.length/32;for(let n=0;n<i;n++)t[n]=-1;return t}return-1}function xn(e){const t={};for(const i in e)i[0]!=="$"&&(t[i]=e[i]);return t}function Kt(e,t){const i={};t=new Set(t);for(const n in e)!t.has(n)&&n[0]!=="$"&&(i[n]=e[n]);return i}function ge(e){return e??""}function hn(e,t,i){return e.set(i),t}const Mn=["",!0,1,"true","contenteditable"];function y(e,t){e.appendChild(t)}function le(e,t,i){const n=In(e);if(!n.getElementById(t)){const r=k("style");r.id=t,r.textContent=i,Bn(n,r)}}function In(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Bn(e,t){return y(e.head||e,t),t.sheet}function N(e,t,i){e.insertBefore(t,i||null)}function S(e){e.parentNode&&e.parentNode.removeChild(e)}function Rt(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function k(e){return document.createElement(e)}function Q(e){return document.createTextNode(e)}function W(){return Q(" ")}function rt(){return Q("")}function ce(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function Tt(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function _(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}const Kn=["width","height"];function Jt(e,t){const i=Object.getOwnPropertyDescriptors(e.__proto__);for(const n in t)t[n]==null?e.removeAttribute(n):n==="style"?e.style.cssText=t[n]:n==="__value"?e.value=e[n]=t[n]:i[n]&&i[n].set&&Kn.indexOf(n)===-1?e[n]=t[n]:_(e,n,t[n])}function Jn(e){return Array.from(e.childNodes)}function ie(e,t){t=""+t,e.data!==t&&(e.data=t)}function Un(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function Wn(e,t,i){~Mn.indexOf(i)?Un(e,t):ie(e,t)}function Ut(e,t){e.value=t??""}function bt(e,t,i,n){i==null?e.style.removeProperty(t):e.style.setProperty(t,i,n?"important":"")}function Wt(e,t,i){e.classList.toggle(t,!!i)}function Hn(e,t,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:n})}function Yn(e){const t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}let tt;function Xe(e){tt=e}function mn(){if(!tt)throw new Error("Function called outside component initialization");return tt}function mt(e){mn().$$.on_mount.push(e)}function pn(){const e=mn();return(t,i,{cancelable:n=!1}={})=>{const r=e.$$.callbacks[t];if(r){const s=Hn(t,i,{cancelable:n});return r.slice().forEach(o=>{o.call(e,s)}),!s.defaultPrevented}return!0}}const Ee=[],Be=[];let Me=[];const Ht=[],Pn=Promise.resolve();let Ct=!1;function Vn(){Ct||(Ct=!0,Pn.then(Oe))}function Lt(e){Me.push(e)}const wt=new Set;let Ge=0;function Oe(){if(Ge!==0)return;const e=tt;do{try{for(;Ge<Ee.length;){const t=Ee[Ge];Ge++,Xe(t),Qn(t.$$)}}catch(t){throw Ee.length=0,Ge=0,t}for(Xe(null),Ee.length=0,Ge=0;Be.length;)Be.pop()();for(let t=0;t<Me.length;t+=1){const i=Me[t];wt.has(i)||(wt.add(i),i())}Me.length=0}while(Ee.length);for(;Ht.length;)Ht.pop()();Ct=!1,wt.clear(),Xe(e)}function Qn(e){if(e.fragment!==null){e.update(),Le(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Lt)}}function Zn(e){const t=[],i=[];Me.forEach(n=>e.indexOf(n)===-1?t.push(n):i.push(n)),i.forEach(n=>n()),Me=t}const lt=new Set;let Re;function be(){Re={r:0,c:[],p:Re}}function we(){Re.r||Le(Re.c),Re=Re.p}function b(e,t){e&&e.i&&(lt.delete(e),e.i(t))}function T(e,t,i,n){if(e&&e.o){if(lt.has(e))return;lt.add(e),Re.c.push(()=>{lt.delete(e),n&&(i&&e.d(1),n())}),e.o(t)}else n&&n()}function Ke(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Xn(e,t){const i={},n={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],a=t[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);e[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 U(e){e&&e.c()}function I(e,t,i){const{fragment:n,after_update:r}=e.$$;n&&n.m(t,i),Lt(()=>{const s=e.$$.on_mount.map(fn).filter(ht);e.$$.on_destroy?e.$$.on_destroy.push(...s):Le(s),e.$$.on_mount=[]}),r.forEach(Lt)}function B(e,t){const i=e.$$;i.fragment!==null&&(Zn(i.after_update),Le(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function qn(e,t){e.$$.dirty[0]===-1&&(Ee.push(e),Vn(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function re(e,t,i,n,r,s,o=null,a=[-1]){const u=tt;Xe(e);const l=e.$$={fragment:null,ctx:[],props:s,update:q,not_equal:r,bound:Bt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Bt(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(e,t.props||{},(d,f,...h)=>{const p=h.length?h[0]:f;return l.ctx&&r(l.ctx[d],l.ctx[d]=p)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](p),c&&qn(e,d)),f}):[],l.update(),c=!0,Le(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const d=Jn(t.target);l.fragment&&l.fragment.l(d),d.forEach(S)}else l.fragment&&l.fragment.c();t.intro&&b(e.$$.fragment),I(e,t.target,t.anchor),Oe()}Xe(u)}let _n;typeof HTMLElement=="function"&&(_n=class extends HTMLElement{constructor(t,i,n){super();me(this,"$$ctor");me(this,"$$s");me(this,"$$c");me(this,"$$cn",!1);me(this,"$$d",{});me(this,"$$r",!1);me(this,"$$p_d",{});me(this,"$$l",{});me(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=i,n&&this.attachShadow({mode:"open"})}addEventListener(t,i,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(i),this.$$c){const r=this.$$c.$on(t,i);this.$$l_u.set(i,r)}super.addEventListener(t,i,n)}removeEventListener(t,i,n){if(super.removeEventListener(t,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){N(c,a,d)},d:function(c){c&&S(a)}}}};var t=i;if(await Promise.resolve(),!this.$$cn)return;const n={},r=Yn(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]=ut(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=ut(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(t,i,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=ut(t,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(i=>this.$$p_d[i].attribute===t||!this.$$p_d[i].attribute&&i.toLowerCase()===t)||t}});function ut(e,t,i,n){var s;const r=(s=i[e])==null?void 0:s.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!i[e])return t;if(n==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function jn(e,t,i,n,r,s){let o=class extends _n{constructor(){super(e,i,r),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Object.keys(t).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=ut(a,u,t),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)),e.element=o,o}class se{constructor(){me(this,"$$");me(this,"$$set")}$destroy(){B(this,1),this.$destroy=q}$on(t,i){if(!ht(i))return q;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(t){this.$$set&&!En(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ei="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ei);function ti(e){le(e,"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 ni(e){let t,i;return{c(){t=k("span"),_(t,"class",i=ge(`Icon ${e[0]} ${e[1]}`)+" svelte-uqg1eo")},m(n,r){N(n,t,r)},p(n,[r]){r&3&&i!==(i=ge(`Icon ${n[0]} ${n[1]}`)+" svelte-uqg1eo")&&_(t,"class",i)},i:q,o:q,d(n){n&&S(t)}}}function ii(e,t,i){let{className:n=""}=t,{iconLaClassName:r}=t;return e.$$set=s=>{"className"in s&&i(0,n=s.className),"iconLaClassName"in s&&i(1,r=s.iconLaClassName)},[n,r]}class Ce extends se{constructor(t){super(),re(this,t,ii,ni,te,{className:0,iconLaClassName:1},ti)}}const ze=[];function ri(e,t){return{subscribe:fe(e,t).subscribe}}function fe(e,t=q){let i;const n=new Set;function r(a){if(te(e,a)&&(e=a,i)){const u=!ze.length;for(const l of n)l[1](),ze.push(l,e);if(u){for(let l=0;l<ze.length;l+=2)ze[l][0](ze[l+1]);ze.length=0}}}function s(a){r(a(e))}function o(a,u=q){const l=[a,u];return n.add(l),n.size===1&&(i=t(r,s)||q),a(e),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}function si(e,t,i){const n=!Array.isArray(e),r=n?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return ri(i,(o,a)=>{let u=!1;const l=[];let c=0,d=q;const f=()=>{if(c)return;d();const p=t(n?l[0]:l,o,a);s?o(p):d=ht(p)?p:q},h=r.map((p,v)=>Ot(p,w=>{l[v]=w,c&=~(1<<v),u&&f()},()=>{c|=1<<v}));return u=!0,f(),function(){Le(h),d(),u=!1}})}const oi={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"}}},ai={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:oi,warnOnMissingMessages:!0},li=ai;let vn;function dt(){return vn}function ui(e){return vn=e}function st(){return li}function Yt(e){return e.split("-").map((t,i,n)=>n.slice(0,i+1).join("-")).reverse()}function ot(e,t=st().fallbackLocale){const i=Yt(e);return t?[...new Set([...i,...Yt(t)])]:i}let Ft;const pt=fe({});function ci(e){return Ft[e]||null}function At(e){return e in Ft}function di(e,t){if(At(e)){const i=ci(e);if(t in i)return i[t];const n=t.split(".");let r=i;for(let s=0;s<n.length;s++){if(typeof r[n[s]]!="object")return r[n[s]]||null;r=r[n[s]]}return r}return null}function fi(e){if(e==null)return null;const t=ot(e);for(let i=0;i<t.length;i++){const n=t[i];if(At(n))return n}return null}function gi(e,...t){pt.update(i=>(i[e]=Object.assign(i[e]||{},...t),i))}pt.subscribe(e=>Ft=e);const Pt=fe(!1),Gt={};function hi(e){Gt[e]=new Set}function mi(e){delete Gt[e]}function qe(e){return Gt[e]}function pi(e){return ot(e).reverse().map(t=>{const i=qe(t);return[t,i?[...i]:[]]}).filter(([,t])=>t.length>0)}function zt(e){return ot(e).reverse().some(qe)}const Ve={};function yn(e){if(!zt(e))return Promise.resolve();if(e in Ve)return Ve[e];const t=pi(e);if(t.length===0)return Promise.resolve();const i=setTimeout(()=>Pt.set(!0),st().loadingDelay);return Ve[e]=Promise.all(t.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{mi(n),s=s.map(o=>o.default||o),gi(n,...s)}))).then(()=>{clearTimeout(i),Pt.set(!1),delete Ve[e]}),Ve[e]}function Vt(e,t){qe(e)||hi(e);const i=qe(e);qe(e).has(t)||(At(e)||pt.update(n=>(n[e]={},n)),i.add(t))}const Pe=fe("");Pe.subscribe(e=>{ui(e),typeof window<"u"&&e!==""&&document.documentElement.setAttribute("lang",e)});const St=Pe.set;Pe.set=e=>fi(e)&&zt(e)?yn(e).then(()=>St(e)):St(e);Pe.update=e=>{let t=dt();e(t),St(t)};function _i(e){const{formats:t,...i}=e,n=e.initialLocale||e.fallbackLocale,r=st();return Object.assign(r,i,{initialLocale:n}),t&&("number"in t&&Object.assign(r.formats.number,t.number),"date"in t&&Object.assign(r.formats.date,t.date),"time"in t&&Object.assign(r.formats.time,t.time)),Pe.set(n)}const Fe={},vi=(e,t,i)=>i&&(t in Fe||(Fe[t]={}),e in Fe[t]||(Fe[t][e]=i),i),yi=(e,t)=>{if(t==null)return;if(t in Fe&&e in Fe[t])return Fe[t][e];const i=ot(t);for(let n=0;n<i.length;n++){const r=i[n],s=di(r,e);if(s)return vi(e,t,s)}},bi=(e,t,i={})=>{const n=typeof t=="string"?t:t.id,r=typeof t=="string"?i:t,{values:s,locale:o=e||dt(),default:a}=r;if(o==null)throw new Error("[svelte-intl-precompile] Cannot format a message without first setting the initial locale.");let u=yi(n,o);return typeof u=="string"?u:typeof u=="function"?u(...Object.keys(r.values||{}).sort().map(l=>(r.values||{})[l])):(st().warnOnMissingMessages&&console.warn(`[svelte-intl-precompile] The message "${n}" was not found in "${ot(o).join('", "')}".${zt(dt())?`
2
2
 
3
- Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`),a||n)},ke=Xn([Je,dt],([e])=>di.bind(null,e));function gi(e){return fn(e||lt()||tt().initialLocale)}const Ze=ce(!1),Ye=ce([]);function hi(e){re(e,"svelte-12rp7nl","span.svelte-12rp7nl{margin-right:10px}.Selection.svelte-12rp7nl{color:var(--ticket-status-chat-background);font-size:12px;font-style:normal;font-weight:700;line-height:20px}.many.svelte-12rp7nl{color:var(--main-textcolor);font-weight:700}")}function mi(e){let t,i=e[4]("Displaying ")+e[5].length+" "+e[4]("of"),n,r,s,o=(e[1]??e[4]("many"))+"",a,u,l;return{c(){t=S("span"),n=ee(i),r=P(),s=S("span"),a=ee(o),y(t,"class","svelte-12rp7nl"),y(s,"class","many svelte-12rp7nl")},m(c,f){R(c,t,f),C(t,n),R(c,r,f),R(c,s,f),C(s,a),u||(l=le(s,"click",e[6]),u=!0)},p(c,f){f&48&&i!==(i=c[4]("Displaying ")+c[5].length+" "+c[4]("of"))&&ie(n,i),f&18&&o!==(o=(c[1]??c[4]("many"))+"")&&ie(a,o)},d(c){c&&(O(t),O(r),O(s)),u=!1,l()}}}function pi(e){let t;function i(s,o){return s[2]?yi:s[3].length===1?vi:_i}let n=i(e),r=n(e);return{c(){r.c(),t=et()},m(s,o){r.m(s,o),R(s,t,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&O(t),r.d(s)}}}function _i(e){let t,i=e[3].length+" rows selected",n;return{c(){t=S("span"),n=ee(i),y(t,"class","Selection svelte-12rp7nl")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&8&&i!==(i=r[3].length+" rows selected")&&ie(n,i)},d(r){r&&O(t)}}}function vi(e){let t,i=e[3].length+" row selected",n;return{c(){t=S("span"),n=ee(i),y(t,"class","Selection svelte-12rp7nl")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&8&&i!==(i=r[3].length+" row selected")&&ie(n,i)},d(r){r&&O(t)}}}function yi(e){let t;function i(s,o){return s[3].length>0?ki:bi}let n=i(e),r=n(e);return{c(){r.c(),t=et()},m(s,o){r.m(s,o),R(s,t,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&O(t),r.d(s)}}}function bi(e){let t,i=e[4]("all rows selected")+"",n;return{c(){t=S("span"),n=ee(i),y(t,"class","Selection svelte-12rp7nl")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&16&&i!==(i=r[4]("all rows selected")+"")&&ie(n,i)},d(r){r&&O(t)}}}function ki(e){let t;function i(s,o){return s[3].length===1?$i:wi}let n=i(e),r=n(e);return{c(){r.c(),t=et()},m(s,o){r.m(s,o),R(s,t,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&O(t),r.d(s)}}}function wi(e){let t,i=e[4]("all rows selected except")+" "+e[3].length+" "+e[4]("rows"),n;return{c(){t=S("span"),n=ee(i),y(t,"class","Selection svelte-12rp7nl")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&24&&i!==(i=r[4]("all rows selected except")+" "+r[3].length+" "+r[4]("rows"))&&ie(n,i)},d(r){r&&O(t)}}}function $i(e){let t,i=e[4]("all rows selected except")+" "+e[3].length+" "+e[4]("row"),n;return{c(){t=S("span"),n=ee(i),y(t,"class","Selection svelte-12rp7nl")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&24&&i!==(i=r[4]("all rows selected except")+" "+r[3].length+" "+r[4]("row"))&&ie(n,i)},d(r){r&&O(t)}}}function Ti(e){let t;function i(s,o){return s[2]||s[3].length>0?pi:mi}let n=i(e),r=n(e);return{c(){r.c(),t=et()},m(s,o){r.m(s,o),R(s,t,o)},p(s,[o]){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},i:V,o:V,d(s){s&&O(t),r.d(s)}}}function Ci(e,t,i){let n,r,s,o,a=V,u=()=>(a(),a=Oe(l,_=>i(5,o=_)),l);j(e,Ze,_=>i(2,n=_)),j(e,Ye,_=>i(3,r=_)),j(e,ke,_=>i(4,s=_)),e.$$.on_destroy.push(()=>a());let{data:l}=t;u();let{filter:c}=t,f=null,d=ve("loading");function g(){i(1,f=null)}async function m(){if(d)return;let v=await ve("api").getTicketsGridListCount({filters:c,timezoneOffset:new Date().getTimezoneOffset()});i(1,f=v.count)}return e.$$set=_=>{"data"in _&&u(i(0,l=_.data)),"filter"in _&&i(7,c=_.filter)},e.$$.update=()=>{e.$$.dirty&128&&c&&g()},[l,f,n,r,s,o,m,c]}class Li extends ne{constructor(t){super(),te(this,t,Ci,Ti,Z,{data:0,filter:7},hi)}}function Si(e){re(e,"svelte-7v4n24",".Head.svelte-7v4n24.svelte-7v4n24{display:none}.headCheckbox.svelte-7v4n24.svelte-7v4n24{width:20px}button.svelte-7v4n24.svelte-7v4n24{border:none;background:none;font-size:13px;font-weight:400;color:var(--main-lighter-textcolor)}.spinner.svelte-7v4n24.svelte-7v4n24{font-size:16px;cursor:pointer}.rightPanel.svelte-7v4n24.svelte-7v4n24{margin-left:auto}.Sorting.svelte-7v4n24.svelte-7v4n24{cursor:pointer;text-align:left;font-weight:bold}.sortButton.svelte-7v4n24.svelte-7v4n24{cursor:pointer;text-align:left;font-weight:bold}.loading.svelte-7v4n24.svelte-7v4n24{animation-name:svelte-7v4n24-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-7v4n24-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@media screen and (min-width: 768px){.Head.svelte-7v4n24.svelte-7v4n24{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-7v4n24 input[type=checkbox].svelte-7v4n24{vertical-align:middle;cursor:pointer}}")}function Ni(e){let t,i;return t=new ye({props:{iconLaClassName:"la-move-down"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Di(e){let t,i;return t=new ye({props:{iconLaClassName:"la-move-up"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Oi(e){let t,i,n,r,s,o=e[5]("Importance")+"",a,u,l,c,f,d,g,m,_,v,N,x,A,F,b;const z=[Di,Ni],U=[];function M(B,I){return B[3]?0:1}return c=M(e),f=U[c]=z[c](e),m=new Li({props:{data:e[1],filter:e[2]}}),N=new ye({props:{iconLaClassName:"la-refresh"}}),{c(){t=S("div"),i=S("div"),n=S("input"),r=P(),s=S("button"),a=ee(o),u=P(),l=S("button"),f.c(),d=P(),g=S("div"),H(m.$$.fragment),_=P(),v=S("button"),H(N.$$.fragment),y(n,"type","checkbox"),y(n,"class","svelte-7v4n24"),y(i,"class","headCheckbox svelte-7v4n24"),y(s,"class","Sorting svelte-7v4n24"),y(l,"class","sortButton svelte-7v4n24"),y(v,"class","spinner svelte-7v4n24"),y(v,"title",x=e[5]("Reload")),xt(v,"loading",e[6]),y(g,"class","rightPanel svelte-7v4n24"),y(t,"class","Head svelte-7v4n24")},m(B,I){R(B,t,I),C(t,i),C(i,n),n.checked=e[4],C(t,r),C(t,s),C(s,a),C(t,u),C(t,l),U[c].m(l,null),C(t,d),C(t,g),K(m,g,null),C(g,_),C(g,v),K(N,v,null),A=!0,F||(b=[le(n,"change",e[12]),le(n,"click",e[9]),le(s,"click",e[10]),le(l,"click",e[13]),le(v,"click",e[14])],F=!0)},p(B,[I]){I&16&&(n.checked=B[4]),(!A||I&32)&&o!==(o=B[5]("Importance")+"")&&ie(a,o);let T=c;c=M(B),c!==T&&(ge(),$(U[T],1,1,()=>{U[T]=null}),he(),f=U[c],f||(f=U[c]=z[c](B),f.c()),k(f,1),f.m(l,null));const Q={};I&2&&(Q.data=B[1]),I&4&&(Q.filter=B[2]),m.$set(Q),(!A||I&32&&x!==(x=B[5]("Reload")))&&y(v,"title",x),(!A||I&64)&&xt(v,"loading",B[6])},i(B){A||(k(f),k(m.$$.fragment,B),k(N.$$.fragment,B),A=!0)},o(B){$(f),$(m.$$.fragment,B),$(N.$$.fragment,B),A=!1},d(B){B&&O(t),U[c].d(),J(m),J(N),F=!1,be(b)}}}function Ri(e,t,i){let n,r=V,s=()=>(r(),r=Oe(d,M=>i(3,n=M)),d),o,a,u=V,l=()=>(u(),u=Oe(g,M=>i(15,a=M)),g),c,f;j(e,Ze,M=>i(4,o=M)),j(e,ke,M=>i(5,c=M)),e.$$.on_destroy.push(()=>r()),e.$$.on_destroy.push(()=>u());let{direction:d}=t;s();let{data:g}=t;l();let{filters:m}=t;const _=ve("loadMoreFunction"),v=ve("loading");j(e,v,M=>i(6,f=M));const N=ln();function x(){Ze.set(!o),_e(g,a=a.map(M=>(M.__selected=o,M)),a)}function A(){N("openModal")}const F=()=>{_e(d,n=!n,n)};function b(){o=this.checked,Ze.set(o)}const z=()=>F(),U=()=>_(!0);return e.$$set=M=>{"direction"in M&&s(i(0,d=M.direction)),"data"in M&&l(i(1,g=M.data)),"filters"in M&&i(2,m=M.filters)},[d,g,m,n,o,c,f,_,v,x,A,F,b,z,U]}class Ai extends ne{constructor(t){super(),te(this,t,Ri,Oi,Z,{direction:0,data:1,filters:2},Si)}}function ut(e){switch(e){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 Fi=()=>{const e=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#FFEB3B","#FFC107","#FF5722","#795548"],t=Math.floor(Math.random()*e.length);return e[t]},Mi=e=>{let t=e.split(" ");return t.length>1?t=t.shift().charAt(0)+t.pop().charAt(0):t=e.substring(0,2),t.toUpperCase()};function Gi(e){re(e,"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 zi(e){let t;return{c(){t=S("div"),t.textContent=`${e[10]}`,y(t,"class","innerInitials svelte-hbozhk")},m(i,n){R(i,t,n)},p:V,d(i){i&&O(t)}}}function Ei(e){let t,i,n,r,s,o;return{c(){t=S("div"),i=S("img"),y(i,"alt",""),y(i,"class",Te("innerImage")+" svelte-hbozhk"),yt(i.src,n=e[2])||y(i,"src",n),y(t,"class",r=Te(e[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){R(a,t,u),C(t,i),s||(o=[le(i,"error",e[15]),le(i,"load",e[16])],s=!0)},p(a,u){u&4&&!yt(i.src,n=a[2])&&y(i,"src",n),u&256&&r!==(r=Te(a[8]?"imageLoading":"")+" svelte-hbozhk")&&y(t,"class",r)},d(a){a&&O(t),s=!1,be(o)}}}function Ii(e){let t,i;function n(o,a){return o[2]&&!o[7]?Ei:zi}let r=n(e),s=r(e);return{c(){t=S("div"),s.c(),y(t,"aria-label",e[1]),y(t,"class","wrapper svelte-hbozhk"),y(t,"style",i=e[0]+"--borderRadius:"+(e[6]?0:e[5])+"; --size:"+e[4]+"; --bgColor:"+e[9]+"; --src:"+e[2]+"; --textColor:"+e[3]+"; --abbrLength:"+e[11])},m(o,a){R(o,t,a),s.m(t,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(t,null))),a&2&&y(t,"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])&&y(t,"style",i)},i:V,o:V,d(o){o&&O(t),s.d()}}}function xi(e,t,i){let{style:n=""}=t,{name:r="Avatar"}=t,{initials:s}=t,{src:o}=t,{bgColor:a="lightGrey"}=t,{textColor:u="white"}=t,{size:l="50px"}=t,{borderRadius:c="50%"}=t,{square:f=!1}=t,{randomBgColor:d=!1}=t;const g=d?Fi():a,m=s||Mi(r),_=m.length;let v=!1,N=!0;const x=()=>i(7,v=!0),A=()=>i(8,N=!1);return e.$$set=F=>{"style"in F&&i(0,n=F.style),"name"in F&&i(1,r=F.name),"initials"in F&&i(12,s=F.initials),"src"in F&&i(2,o=F.src),"bgColor"in F&&i(13,a=F.bgColor),"textColor"in F&&i(3,u=F.textColor),"size"in F&&i(4,l=F.size),"borderRadius"in F&&i(5,c=F.borderRadius),"square"in F&&i(6,f=F.square),"randomBgColor"in F&&i(14,d=F.randomBgColor)},[n,r,o,u,l,c,f,v,N,g,m,_,s,a,d,x,A]}class Bi extends ne{constructor(t){super(),te(this,t,xi,Ii,Z,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},Gi)}}var dn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function At(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gn={exports:{}},hn={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={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 t.rotl(i,8)&16711935|t.rotl(i,24)&4278255360;for(var n=0;n<i.length;n++)i[n]=t.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(e.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((e.indexOf(i.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|e.indexOf(i.charAt(r))>>>6-s*2);return n}};hn.exports=t})();var Ki=hn.exports,Ct={utf8:{stringToBytes:function(e){return Ct.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Ct.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i)&255);return t},bytesToString:function(e){for(var t=[],i=0;i<e.length;i++)t.push(String.fromCharCode(e[i]));return t.join("")}}},Ut=Ct;/*!
3
+ Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`),a||n)},Se=si([Pe,pt],([e])=>bi.bind(null,e));function wi(e){return yn(e||dt()||st().initialLocale)}var xe=globalThis&&globalThis.__awaiter||function(e,t,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(e,t||[])).next())})};const ki="https://localhost/api/v3".replace(/\/+$/,"");class Et{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:ki}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||bn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:()=>xe(this,void 0,void 0,function*(){return t})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const $i=new Et;class _t{constructor(t=$i){this.configuration=t,this.fetchApi=(i,n)=>xe(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 Si(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=t.middleware}withMiddleware(...t){const i=this.clone();return i.middleware=i.middleware.concat(...t),i}withPreMiddleware(...t){const i=t.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...t){const i=t.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(t){return t?_t.jsonRegex.test(t):!1}request(t,i){return xe(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(t,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new Li(s,"Response returned an error code")})}createFetchParams(t,i){return xe(this,void 0,void 0,function*(){let n=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(t.query));const r=Object.assign({},this.configuration.headers,t.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof i=="function"?i:()=>xe(this,void 0,void 0,function*(){return i}),o={method:t.method,headers:r,body:t.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:t})),u=Object.assign(Object.assign({},a),{body:Ci(a.body)||a.body instanceof URLSearchParams||Ti(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const t=this.constructor,i=new t(this.configuration);return i.middleware=this.middleware.slice(),i}}_t.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function Ti(e){return typeof Blob<"u"&&e instanceof Blob}function Ci(e){return typeof FormData<"u"&&e instanceof FormData}class Li extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class Si extends Error{constructor(t,i){super(i),this.cause=t,this.name="FetchError"}}class Qt extends Error{constructor(t,i){super(i),this.field=t,this.name="RequiredError"}}function g(e,t){const i=e[t];return i!=null}function bn(e,t=""){return Object.keys(e).map(i=>wn(i,e[i],t)).filter(i=>i.length>0).join("&")}function wn(e,t,i=""){const n=i+(i.length?`[${e}]`:e);if(t instanceof Array){const r=t.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(t instanceof Set){const r=Array.from(t);return wn(e,r,i)}return t instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?bn(t,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(t))}`}class ne{constructor(t,i=n=>n){this.raw=t,this.transformer=i}value(){return xe(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function Di(e){return Ni(e)}function Ni(e,t){return e==null?e:{departmentid:g(e,"departmentid")?e.departmentid:void 0,onlineStatus:g(e,"online_status")?e.online_status:void 0,presetStatus:g(e,"preset_status")?e.preset_status:void 0}}function Oi(e){return Ri(e)}function Ri(e,t){return e==null?e:{agentid:g(e,"agentid")?e.agentid:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,username:g(e,"username")?e.username:void 0,countrycode:g(e,"countrycode")?e.countrycode:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,roleid:g(e,"roleid")?e.roleid:void 0,departmentsStatuses:g(e,"departments_statuses")?e.departments_statuses.map(Di):void 0,twofa:g(e,"twofa")?e.twofa:void 0,lastPswdChange:g(e,"last_pswd_change")?new Date(e.last_pswd_change):void 0,userstatus:g(e,"userstatus")?e.userstatus:void 0}}function Fi(e){return Ai(e)}function Ai(e,t){return e==null?e:{conversationid:g(e,"conversationid")?e.conversationid:void 0,datechanged:g(e,"datechanged")?new Date(e.datechanged):void 0,status:g(e,"status")?e.status:void 0,preview:g(e,"preview")?e.preview:void 0,subject:g(e,"subject")?e.subject:void 0,departmentname:g(e,"departmentname")?e.departmentname:void 0,agentname:g(e,"agentname")?e.agentname:void 0,tags:g(e,"tags")?e.tags:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,emails:g(e,"emails")?e.emails:void 0,city:g(e,"city")?e.city:void 0,countrycode:g(e,"countrycode")?e.countrycode:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,rstatus:g(e,"rstatus")?e.rstatus:void 0,statusdatestarted:g(e,"statusdatestarted")?new Date(e.statusdatestarted):void 0,chatOrder:g(e,"chat_order")?e.chat_order:void 0}}function Gi(e){return zi(e)}function zi(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,name:g(e,"name")?e.name:void 0,type:g(e,"type")?e.type:void 0,onlineCode:g(e,"online_code")?e.online_code:void 0,offlineCode:g(e,"offline_code")?e.offline_code:void 0,onlineCodeCss:g(e,"online_code_css")?e.online_code_css:void 0,offlineCodeCss:g(e,"offline_code_css")?e.offline_code_css:void 0,provide:g(e,"provide")?e.provide:void 0,impressions:g(e,"impressions")?e.impressions:void 0,tickets:g(e,"tickets")?e.tickets:void 0,status:g(e,"status")?e.status:void 0,lastDisplayTime:g(e,"last_display_time")?e.last_display_time:void 0,lastDisplayUrl:g(e,"last_display_url")?e.last_display_url:void 0}}function _e(e){return Ei(e)}function Ei(e,t){return e==null?e:{count:g(e,"count")?e.count:void 0}}function xi(e){return Mi(e)}function Mi(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,name:g(e,"name")?e.name:void 0,agentCount:g(e,"agent_count")?e.agent_count:void 0}}function Ii(e){return Bi(e)}function Bi(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,logid:g(e,"logid")?e.logid:void 0,line:g(e,"line")?e.line:void 0,filename:g(e,"filename")?e.filename:void 0,created:g(e,"created")?e.created:void 0,level:g(e,"level")?e.level:void 0,type:g(e,"type")?e.type:void 0,message:g(e,"message")?e.message:void 0,ip:g(e,"ip")?e.ip:void 0,groupid:g(e,"groupid")?e.groupid:void 0}}function Ki(e){return Ji(e)}function Ji(e,t){return e==null?e:{agentid:g(e,"agentid")?e.agentid:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,chats:g(e,"chats")?e.chats:void 0}}function Ui(e){return Wi(e)}function Wi(e,t){return e==null?e:{name:g(e,"name")?e.name:void 0,code:g(e,"code")?e.code:void 0,engName:g(e,"eng_name")?e.eng_name:void 0,translated:g(e,"translated")?e.translated:void 0,isDefault:g(e,"is_default")?e.is_default:void 0,active:g(e,"active")?e.active:void 0,isCustom:g(e,"is_custom")?e.is_custom:void 0,isBuiltIn:g(e,"is_builtIn")?e.is_builtIn:void 0}}function Hi(e){return Yi(e)}function Yi(e,t){return e==null?e:{codeName:g(e,"code_name")?e.code_name:void 0,name:g(e,"name")?e.name:void 0,description:g(e,"description")?e.description:void 0,active:g(e,"active")?e.active:void 0,help:g(e,"help")?e.help:void 0,multiple:g(e,"multiple")?e.multiple:void 0,configFile:g(e,"config_file")?e.config_file:void 0,price:g(e,"price")?e.price:void 0,legacyIntegration:g(e,"legacy_integration")?e.legacy_integration:void 0}}function kt(e){return Pi(e)}function Pi(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,conversationid:g(e,"conversationid")?e.conversationid:void 0,code:g(e,"code")?e.code:void 0,slaTicketId:g(e,"sla_ticket_id")?e.sla_ticket_id:void 0,departmentid:g(e,"departmentid")?e.departmentid:void 0,departmentName:g(e,"department_name")?e.department_name:void 0,levelid:g(e,"levelid")?e.levelid:void 0,slaLevelName:g(e,"sla_level_name")?e.sla_level_name:void 0,sla:g(e,"sla")?e.sla:void 0,dateCreated:g(e,"date_created")?e.date_created:void 0,dateClosed:g(e,"date_closed")?e.date_closed:void 0,dateDue:g(e,"date_due")?e.date_due:void 0,slaLevelId:g(e,"sla_level_id")?e.sla_level_id:void 0,slaType:g(e,"sla_type")?new Date(e.sla_type):void 0,agentid:g(e,"agentid")?e.agentid:void 0,agentFirstname:g(e,"agent_firstname")?e.agent_firstname:void 0,agentLastname:g(e,"agent_lastname")?e.agent_lastname:void 0,agentAvatarUrl:g(e,"agent_avatar_url")?e.agent_avatar_url:void 0,reqContactid:g(e,"req_contactid")?e.req_contactid:void 0,reqFirstname:g(e,"req_firstname")?e.req_firstname:void 0,reqLastname:g(e,"req_lastname")?e.req_lastname:void 0,reqSystemname:g(e,"req_systemname")?e.req_systemname:void 0,reqContactName:g(e,"req_contactName")?e.req_contactName:void 0,reqAvatarUrl:g(e,"req_avatar_url")?e.req_avatar_url:void 0}}function Zt(e){return Vi(e)}function Vi(e,t){return e==null?e:{tagid:g(e,"tagid")?e.tagid:void 0,name:g(e,"name")?e.name:void 0,type:g(e,"type")?e.type:void 0,color:g(e,"color")?e.color:void 0,backgroundcolor:g(e,"backgroundcolor")?e.backgroundcolor:void 0,isPublic:g(e,"is_public")?e.is_public:void 0}}function kn(e){return Qi(e)}function Qi(e,t){return e==null?e:{conversationid:g(e,"conversationid")?e.conversationid:void 0,code:g(e,"code")?e.code:void 0,datecreated:g(e,"datecreated")?new Date(e.datecreated):void 0,datechanged:g(e,"datechanged")?new Date(e.datechanged):void 0,dateresolved:g(e,"dateresolved")?new Date(e.dateresolved):void 0,statuschanged:g(e,"statuschanged")?new Date(e.statuschanged):void 0,rorder:g(e,"rorder")?e.rorder:void 0,datedue:g(e,"datedue")?new Date(e.datedue):void 0,datereopen:g(e,"datereopen")?new Date(e.datereopen):void 0,status:g(e,"status")?e.status:void 0,channelType:g(e,"channel_type")?e.channel_type:void 0,departmentid:g(e,"departmentid")?e.departmentid:void 0,agentid:g(e,"agentid")?e.agentid:void 0,preview:g(e,"preview")?e.preview:void 0,subject:g(e,"subject")?e.subject:void 0,departmentname:g(e,"departmentname")?e.departmentname:void 0,agentname:g(e,"agentname")?e.agentname:void 0,tags:g(e,"tags")?e.tags:void 0,messagegroupsIn:g(e,"messagegroups_in")?e.messagegroups_in:void 0,messagegroupsOut:g(e,"messagegroups_out")?e.messagegroups_out:void 0,contactid:g(e,"contactid")?e.contactid:void 0,parentContactid:g(e,"parent_contactid")?e.parent_contactid:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,emails:g(e,"emails")?e.emails:void 0,phones:g(e,"phones")?e.phones:void 0,jobPosition:g(e,"job_position")?e.job_position:void 0,contactType:g(e,"contact_type")?e.contact_type:void 0,city:g(e,"city")?e.city:void 0,countrycode:g(e,"countrycode")?e.countrycode:void 0,timeOffset:g(e,"time_offset")?e.time_offset:void 0,gender:g(e,"gender")?e.gender:void 0,levelid:g(e,"levelid")?e.levelid:void 0,groups:g(e,"groups")?e.groups:void 0,contactStatus:g(e,"contact_status")?e.contact_status:void 0,company:g(e,"company")?e.company:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,userid:g(e,"userid")?e.userid:void 0,roleid:g(e,"roleid")?e.roleid:void 0,userstatus:g(e,"userstatus")?e.userstatus:void 0,accountuserstatus:g(e,"accountuserstatus")?e.accountuserstatus:void 0,description:g(e,"description")?e.description:void 0,note:g(e,"note")?e.note:void 0,lastActivity:g(e,"last_activity")?new Date(e.last_activity):void 0,tagnames:g(e,"tagnames")?e.tagnames:void 0,groupnames:g(e,"groupnames")?e.groupnames:void 0}}function Zi(e){return Xi(e)}function Xi(e,t){return e==null?e:{cursor:g(e,"cursor")?e.cursor:void 0,rows:g(e,"rows")?e.rows.map(kn):void 0}}function qi(e){return ji(e)}function ji(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,agentid:g(e,"agentid")?e.agentid:void 0,agent:g(e,"agent")?e.agent:void 0,conversationid:g(e,"conversationid")?e.conversationid:void 0,ticket:g(e,"ticket")?e.ticket:void 0,parentContactid:g(e,"parent_contactid")?e.parent_contactid:void 0,company:g(e,"company")?e.company:void 0,contactid:g(e,"contactid")?e.contactid:void 0,customer:g(e,"customer")?e.customer:void 0,customerFirstname:g(e,"customer_firstname")?e.customer_firstname:void 0,customerLastname:g(e,"customer_lastname")?e.customer_lastname:void 0,customerSystemname:g(e,"customer_systemname")?e.customer_systemname:void 0,agentTicket:g(e,"agent_ticket")?e.agent_ticket:void 0,reportdate:g(e,"reportdate")?e.reportdate:void 0,reportedtime:g(e,"reportedtime")?e.reportedtime:void 0,reportedtimeHhmmss:g(e,"reportedtime_hhmmss")?e.reportedtime_hhmmss:void 0,spenttime:g(e,"spenttime")?e.spenttime:void 0,dateinvoiced:g(e,"dateinvoiced")?e.dateinvoiced:void 0,note:g(e,"note")?e.note:void 0,type:g(e,"type")?e.type:void 0}}var A=globalThis&&globalThis.__awaiter||function(e,t,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(e,t||[])).next())})};class $n extends _t{getAgentsGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 ne(s,o=>o.map(Oi))})}getAgentsGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(t,i)).value()})}getAgentsGridListCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 ne(s,o=>_e(o))})}getAgentsGridListCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(t,i)).value()})}getCallsSlaLogGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 ne(s,o=>o.map(kt))})}getCallsSlaLogGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(t,i)).value()})}getCallsSlaLogGridListCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 ne(s,o=>_e(o))})}getCallsSlaLogGridListCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(t,i)).value()})}getChatsGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 ne(s,o=>o.map(Fi))})}getChatsGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(t,i)).value()})}getChatsGridListCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 ne(s,o=>_e(o))})}getChatsGridListCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(t,i)).value()})}getChatsSlaLogGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 ne(s,o=>o.map(kt))})}getChatsSlaLogGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(t,i)).value()})}getChatsSlaLogGridListCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 ne(s,o=>_e(o))})}getChatsSlaLogGridListCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(t,i)).value()})}getContactWidgetsCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 ne(s,o=>_e(o))})}getContactWidgetsCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(t,i)).value()})}getContactWidgetsListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.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 ne(s,o=>o.map(Gi))})}getContactWidgetsList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(t,i)).value()})}getCustomerGroupsGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.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 ne(s,o=>o.map(Zt))})}getCustomerGroupsGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(t,i)).value()})}getDepartmensGridListCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 ne(s,o=>_e(o))})}getDepartmensGridListCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(t,i)).value()})}getDepartmentsGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 ne(s,o=>o.map(xi))})}getDepartmentsGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(t,i)).value()})}getEventLogsGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 ne(s,o=>o.map(Ii))})}getEventLogsGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(t,i)).value()})}getEventLogsGridListCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 ne(s,o=>_e(o))})}getEventLogsGridListCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(t,i)).value()})}getInviteAgentsGridListRaw(t,i){return A(this,void 0,void 0,function*(){if(t.departmentId===null||t.departmentId===void 0)throw new Qt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.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(t.departmentId))),method:"GET",headers:r,query:n},i);return new ne(s,o=>o.map(Ki))})}getInviteAgentsGridList(t,i){return A(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(t,i)).value()})}getLanguagesGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 ne(s,o=>o.map(Ui))})}getLanguagesGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(t,i)).value()})}getLanguagesGridListCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 ne(s,o=>_e(o))})}getLanguagesGridListCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(t,i)).value()})}getPlugindGridListRaw(t,i){return A(this,void 0,void 0,function*(){if(t.pluginPurpose===null||t.pluginPurpose===void 0)throw new Qt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.pluginPurpose!==void 0&&(n.pluginPurpose=t.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 ne(s,o=>o.map(Hi))})}getPlugindGridList(t,i){return A(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(t,i)).value()})}getTagsGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.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 ne(s,o=>o.map(Zt))})}getTagsGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(t,i)).value()})}getTicketsGridDatasetRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 ne(s,o=>Zi(o))})}getTicketsGridDataset(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(t,i)).value()})}getTicketsGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 ne(s,o=>o.map(kn))})}getTicketsGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(t,i)).value()})}getTicketsGridListCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 ne(s,o=>_e(o))})}getTicketsGridListCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(t,i)).value()})}getTicketsSlaLogGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 ne(s,o=>o.map(kt))})}getTicketsSlaLogGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(t,i)).value()})}getTicketsSlaLogGridListCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 ne(s,o=>_e(o))})}getTicketsSlaLogGridListCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(t,i)).value()})}getTimeReportsGridListRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.sortField!==void 0&&(n._sortField=t.sortField),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.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 ne(s,o=>o.map(qi))})}getTimeReportsGridList(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(t,i)).value()})}getTimeReportsGridListCountRaw(t,i){return A(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 ne(s,o=>_e(o))})}getTimeReportsGridListCount(t={},i){return A(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(t,i)).value()})}}const Xt={Asc:"ASC",Desc:"DESC"},Qe={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"},er={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"},je=fe(!1),Tn=fe([]),ft=fe(null),nt=fe(null),Ie=fe(!1),et=fe(!1),Cn=fe({}),ye=fe([]),Ln=fe(null),Ae=fe(null),it=fe(!0),xt=fe(er.Rorder);function tr(e){le(e,"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 nr(e){let t,i=e[5]("Displaying ")+e[7].length+" "+e[5]("of"),n,r,s,o=(e[1]?e[5]("Loading.."):e[0]??e[5]("many"))+"",a,u,l,c;return{c(){t=k("span"),n=Q(i),r=W(),s=k("span"),a=Q(o),_(t,"class","text svelte-864uvw"),_(s,"class",u=ge(e[2])+" svelte-864uvw")},m(d,f){N(d,t,f),y(t,n),N(d,r,f),N(d,s,f),y(s,a),l||(c=ce(s,"click",e[8]),l=!0)},p(d,f){f&160&&i!==(i=d[5]("Displaying ")+d[7].length+" "+d[5]("of"))&&ie(n,i),f&35&&o!==(o=(d[1]?d[5]("Loading.."):d[0]??d[5]("many"))+"")&&ie(a,o),f&4&&u!==(u=ge(d[2])+" svelte-864uvw")&&_(s,"class",u)},d(d){d&&(S(t),S(r),S(s)),l=!1,c()}}}function ir(e){let t,i=e[5]("Loading...")+"",n;return{c(){t=k("span"),n=Q(i),_(t,"class","text svelte-864uvw")},m(r,s){N(r,t,s),y(t,n)},p(r,s){s&32&&i!==(i=r[5]("Loading...")+"")&&ie(n,i)},d(r){r&&S(t)}}}function rr(e){let t;function i(s,o){return s[3]?ar:s[4].length===1?or:sr}let n=i(e),r=n(e);return{c(){r.c(),t=rt()},m(s,o){r.m(s,o),N(s,t,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&S(t),r.d(s)}}}function sr(e){let t,i=e[4].length+" rows selected",n;return{c(){t=k("span"),n=Q(i),_(t,"class","Selection svelte-864uvw")},m(r,s){N(r,t,s),y(t,n)},p(r,s){s&16&&i!==(i=r[4].length+" rows selected")&&ie(n,i)},d(r){r&&S(t)}}}function or(e){let t,i=e[4].length+" row selected",n;return{c(){t=k("span"),n=Q(i),_(t,"class","Selection svelte-864uvw")},m(r,s){N(r,t,s),y(t,n)},p(r,s){s&16&&i!==(i=r[4].length+" row selected")&&ie(n,i)},d(r){r&&S(t)}}}function ar(e){let t;function i(s,o){return s[4].length>0?ur:lr}let n=i(e),r=n(e);return{c(){r.c(),t=rt()},m(s,o){r.m(s,o),N(s,t,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&S(t),r.d(s)}}}function lr(e){let t,i=e[5]("all rows selected")+"",n;return{c(){t=k("span"),n=Q(i),_(t,"class","Selection svelte-864uvw")},m(r,s){N(r,t,s),y(t,n)},p(r,s){s&32&&i!==(i=r[5]("all rows selected")+"")&&ie(n,i)},d(r){r&&S(t)}}}function ur(e){let t;function i(s,o){return s[4].length===1?dr:cr}let n=i(e),r=n(e);return{c(){r.c(),t=rt()},m(s,o){r.m(s,o),N(s,t,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&S(t),r.d(s)}}}function cr(e){let t,i=e[5]("all rows selected except")+" "+e[4].length+" "+e[5]("rows"),n;return{c(){t=k("span"),n=Q(i),_(t,"class","Selection svelte-864uvw")},m(r,s){N(r,t,s),y(t,n)},p(r,s){s&48&&i!==(i=r[5]("all rows selected except")+" "+r[4].length+" "+r[5]("rows"))&&ie(n,i)},d(r){r&&S(t)}}}function dr(e){let t,i=e[5]("all rows selected except")+" "+e[4].length+" "+e[5]("row"),n;return{c(){t=k("span"),n=Q(i),_(t,"class","Selection svelte-864uvw")},m(r,s){N(r,t,s),y(t,n)},p(r,s){s&48&&i!==(i=r[5]("all rows selected except")+" "+r[4].length+" "+r[5]("row"))&&ie(n,i)},d(r){r&&S(t)}}}function fr(e){let t;function i(s,o){return s[3]||s[4].length>0?rr:s[6]?ir:nr}let n=i(e),r=n(e);return{c(){r.c(),t=rt()},m(s,o){r.m(s,o),N(s,t,o)},p(s,[o]){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},i:q,o:q,d(s){s&&S(t),r.d(s)}}}function gr(e,t,i){let n,r,s,o,a,u,l;V(e,nt,v=>i(9,n=v)),V(e,ft,v=>i(10,r=v)),V(e,je,v=>i(3,s=v)),V(e,Tn,v=>i(4,o=v)),V(e,Se,v=>i(5,a=v)),V(e,Ie,v=>i(6,u=v)),V(e,ye,v=>i(7,l=v));let c=null,d=!1,f="many";function h(){i(0,c=null)}async function p(){i(2,f="many loading"),i(1,d=!0);let v=await r.getTicketsGridListCount({filters:n,timezoneOffset:new Date().getTimezoneOffset()});i(0,c=v.count),i(1,d=!1)}return e.$$.update=()=>{e.$$.dirty&512&&n&&h()},[c,d,f,s,o,a,u,l,p,n]}class hr extends se{constructor(t){super(),re(this,t,gr,fr,te,{},tr)}}async function Je(e=!1){if(!(ve(Ie)||!ve(ft))&&(e&&(Ae.set(null),et.set(!1)),!(!ve(Ae)&&ve(et)))){Ie.set(!0);try{const i=await(await ve(ft).getTicketsGridDatasetRaw(mr())).value();e&&ye.set([]),ye.set([...ve(ye),...i.rows]),Ae.set(i.cursor),et.set(!0)}catch(t){Ln.set(t.toString())}Ie.set(!1)}}function mr(){return{perPage:20,sortDir:ve(it)?Xt.Asc:Xt.Desc,filters:ve(nt),sortField:ve(xt),cursor:ve(Ae)?ve(Ae):""}}function pr(e){le(e,"svelte-7v4n24",".Head.svelte-7v4n24.svelte-7v4n24{display:none}.headCheckbox.svelte-7v4n24.svelte-7v4n24{width:20px}button.svelte-7v4n24.svelte-7v4n24{border:none;background:none;font-size:13px;font-weight:400;color:var(--main-lighter-textcolor)}.spinner.svelte-7v4n24.svelte-7v4n24{font-size:16px;cursor:pointer}.rightPanel.svelte-7v4n24.svelte-7v4n24{margin-left:auto}.Sorting.svelte-7v4n24.svelte-7v4n24{cursor:pointer;text-align:left;font-weight:bold}.sortButton.svelte-7v4n24.svelte-7v4n24{cursor:pointer;text-align:left;font-weight:bold}.loading.svelte-7v4n24.svelte-7v4n24{animation-name:svelte-7v4n24-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-7v4n24-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@media screen and (min-width: 768px){.Head.svelte-7v4n24.svelte-7v4n24{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-7v4n24 input[type=checkbox].svelte-7v4n24{vertical-align:middle;cursor:pointer}}")}function _r(e){let t,i;return t=new Ce({props:{iconLaClassName:"la-move-down"}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function vr(e){let t,i;return t=new Ce({props:{iconLaClassName:"la-move-up"}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function yr(e){let t,i,n,r,s,o,a,u,l,c,d,f,h,p,v,w,m,D,O,x;const R=[vr,_r],K=[];function ue(G,j){return G[2]?0:1}return l=ue(e),c=K[l]=R[l](e),h=new hr({}),w=new Ce({props:{iconLaClassName:"la-refresh"}}),{c(){t=k("div"),i=k("div"),n=k("input"),r=W(),s=k("button"),o=Q(e[0]),a=W(),u=k("button"),c.c(),d=W(),f=k("div"),U(h.$$.fragment),p=W(),v=k("button"),U(w.$$.fragment),_(n,"type","checkbox"),_(n,"class","svelte-7v4n24"),_(i,"class","headCheckbox svelte-7v4n24"),_(s,"class","Sorting svelte-7v4n24"),_(u,"class","sortButton svelte-7v4n24"),_(v,"class","spinner svelte-7v4n24"),_(v,"title",m=e[5]("Reload")),Wt(v,"loading",e[4]),_(f,"class","rightPanel svelte-7v4n24"),_(t,"class","Head svelte-7v4n24")},m(G,j){N(G,t,j),y(t,i),y(i,n),n.checked=e[3],y(t,r),y(t,s),y(s,o),e[10](s),y(t,a),y(t,u),K[l].m(u,null),y(t,d),y(t,f),I(h,f,null),y(f,p),y(f,v),I(w,v,null),D=!0,O||(x=[ce(n,"change",e[9]),ce(n,"click",e[6]),ce(s,"click",e[8]),ce(u,"click",e[11]),ce(v,"click",e[12])],O=!0)},p(G,[j]){j&8&&(n.checked=G[3]),(!D||j&1)&&ie(o,G[0]);let ee=l;l=ue(G),l!==ee&&(be(),T(K[ee],1,1,()=>{K[ee]=null}),we(),c=K[l],c||(c=K[l]=R[l](G),c.c()),b(c,1),c.m(u,null)),(!D||j&32&&m!==(m=G[5]("Reload")))&&_(v,"title",m),(!D||j&16)&&Wt(v,"loading",G[4])},i(G){D||(b(c),b(h.$$.fragment,G),b(w.$$.fragment,G),D=!0)},o(G){T(c),T(h.$$.fragment,G),T(w.$$.fragment,G),D=!1},d(G){G&&S(t),e[10](null),K[l].d(),B(h),B(w),O=!1,Le(x)}}}function br(e,t,i){let n,r,s,o;V(e,it,O=>i(2,n=O)),V(e,je,O=>i(3,r=O)),V(e,Ie,O=>i(4,s=O)),V(e,Se,O=>i(5,o=O));let{currentFilter:a}=t;const u=pn();let l,c,d;function f(){je.set(!r),ye.update(O=>O.map(x=>({...x,__selected:r})))}const h=()=>{hn(it,n=!n,n)};function p(){l=c.getBoundingClientRect(),d=`position: absolute; top: ${l.bottom-58}px; left: ${l.left-265}px;`,u("openModal",{dialogStyles:d})}function v(){r=this.checked,je.set(r)}function w(O){Be[O?"unshift":"push"](()=>{c=O,i(1,c)})}const m=()=>h(),D=()=>Je(!0);return e.$$set=O=>{"currentFilter"in O&&i(0,a=O.currentFilter)},[a,c,n,r,s,o,f,h,p,v,w,m,D]}class wr extends se{constructor(t){super(),re(this,t,br,yr,te,{currentFilter:0},pr)}}function gt(e){switch(e){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 kr=()=>{const e=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#FFEB3B","#FFC107","#FF5722","#795548"],t=Math.floor(Math.random()*e.length);return e[t]},$r=e=>{let t=e.split(" ");return t.length>1?t=t.shift().charAt(0)+t.pop().charAt(0):t=e.substring(0,2),t.toUpperCase()};function Tr(e){le(e,"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 Cr(e){let t;return{c(){t=k("div"),t.textContent=`${e[10]}`,_(t,"class","innerInitials svelte-hbozhk")},m(i,n){N(i,t,n)},p:q,d(i){i&&S(t)}}}function Lr(e){let t,i,n,r,s,o;return{c(){t=k("div"),i=k("img"),_(i,"alt",""),_(i,"class",ge("innerImage")+" svelte-hbozhk"),$t(i.src,n=e[2])||_(i,"src",n),_(t,"class",r=ge(e[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){N(a,t,u),y(t,i),s||(o=[ce(i,"error",e[15]),ce(i,"load",e[16])],s=!0)},p(a,u){u&4&&!$t(i.src,n=a[2])&&_(i,"src",n),u&256&&r!==(r=ge(a[8]?"imageLoading":"")+" svelte-hbozhk")&&_(t,"class",r)},d(a){a&&S(t),s=!1,Le(o)}}}function Sr(e){let t,i;function n(o,a){return o[2]&&!o[7]?Lr:Cr}let r=n(e),s=r(e);return{c(){t=k("div"),s.c(),_(t,"aria-label",e[1]),_(t,"class","wrapper svelte-hbozhk"),_(t,"style",i=e[0]+"--borderRadius:"+(e[6]?0:e[5])+"; --size:"+e[4]+"; --bgColor:"+e[9]+"; --src:"+e[2]+"; --textColor:"+e[3]+"; --abbrLength:"+e[11])},m(o,a){N(o,t,a),s.m(t,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(t,null))),a&2&&_(t,"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])&&_(t,"style",i)},i:q,o:q,d(o){o&&S(t),s.d()}}}function Dr(e,t,i){let{style:n=""}=t,{name:r="Avatar"}=t,{initials:s}=t,{src:o}=t,{bgColor:a="lightGrey"}=t,{textColor:u="white"}=t,{size:l="50px"}=t,{borderRadius:c="50%"}=t,{square:d=!1}=t,{randomBgColor:f=!1}=t;const h=f?kr():a,p=s||$r(r),v=p.length;let w=!1,m=!0;const D=()=>i(7,w=!0),O=()=>i(8,m=!1);return e.$$set=x=>{"style"in x&&i(0,n=x.style),"name"in x&&i(1,r=x.name),"initials"in x&&i(12,s=x.initials),"src"in x&&i(2,o=x.src),"bgColor"in x&&i(13,a=x.bgColor),"textColor"in x&&i(3,u=x.textColor),"size"in x&&i(4,l=x.size),"borderRadius"in x&&i(5,c=x.borderRadius),"square"in x&&i(6,d=x.square),"randomBgColor"in x&&i(14,f=x.randomBgColor)},[n,r,o,u,l,c,d,w,m,h,p,v,s,a,f,D,O]}class Nr extends se{constructor(t){super(),re(this,t,Dr,Sr,te,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},Tr)}}var Sn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dn={exports:{}},Nn={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={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 t.rotl(i,8)&16711935|t.rotl(i,24)&4278255360;for(var n=0;n<i.length;n++)i[n]=t.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(e.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((e.indexOf(i.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|e.indexOf(i.charAt(r))>>>6-s*2);return n}};Nn.exports=t})();var Or=Nn.exports,Dt={utf8:{stringToBytes:function(e){return Dt.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Dt.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i)&255);return t},bytesToString:function(e){for(var t=[],i=0;i<e.length;i++)t.push(String.fromCharCode(e[i]));return t.join("")}}},qt=Dt;/*!
4
4
  * Determine if an object is a Buffer
5
5
  *
6
6
  * @author Feross Aboukhadijeh <https://feross.org>
7
7
  * @license MIT
8
- */var Ji=function(e){return e!=null&&(mn(e)||Ui(e)||!!e._isBuffer)};function mn(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Ui(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&mn(e.slice(0,0))}(function(){var e=Ki,t=Ut.utf8,i=Ji,n=Ut.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=t.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=e.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,f=-1732584194,d=271733878,g=0;g<a.length;g++)a[g]=(a[g]<<8|a[g]>>>24)&16711935|(a[g]<<24|a[g]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var m=r._ff,_=r._gg,v=r._hh,N=r._ii,g=0;g<a.length;g+=16){var x=l,A=c,F=f,b=d;l=m(l,c,f,d,a[g+0],7,-680876936),d=m(d,l,c,f,a[g+1],12,-389564586),f=m(f,d,l,c,a[g+2],17,606105819),c=m(c,f,d,l,a[g+3],22,-1044525330),l=m(l,c,f,d,a[g+4],7,-176418897),d=m(d,l,c,f,a[g+5],12,1200080426),f=m(f,d,l,c,a[g+6],17,-1473231341),c=m(c,f,d,l,a[g+7],22,-45705983),l=m(l,c,f,d,a[g+8],7,1770035416),d=m(d,l,c,f,a[g+9],12,-1958414417),f=m(f,d,l,c,a[g+10],17,-42063),c=m(c,f,d,l,a[g+11],22,-1990404162),l=m(l,c,f,d,a[g+12],7,1804603682),d=m(d,l,c,f,a[g+13],12,-40341101),f=m(f,d,l,c,a[g+14],17,-1502002290),c=m(c,f,d,l,a[g+15],22,1236535329),l=_(l,c,f,d,a[g+1],5,-165796510),d=_(d,l,c,f,a[g+6],9,-1069501632),f=_(f,d,l,c,a[g+11],14,643717713),c=_(c,f,d,l,a[g+0],20,-373897302),l=_(l,c,f,d,a[g+5],5,-701558691),d=_(d,l,c,f,a[g+10],9,38016083),f=_(f,d,l,c,a[g+15],14,-660478335),c=_(c,f,d,l,a[g+4],20,-405537848),l=_(l,c,f,d,a[g+9],5,568446438),d=_(d,l,c,f,a[g+14],9,-1019803690),f=_(f,d,l,c,a[g+3],14,-187363961),c=_(c,f,d,l,a[g+8],20,1163531501),l=_(l,c,f,d,a[g+13],5,-1444681467),d=_(d,l,c,f,a[g+2],9,-51403784),f=_(f,d,l,c,a[g+7],14,1735328473),c=_(c,f,d,l,a[g+12],20,-1926607734),l=v(l,c,f,d,a[g+5],4,-378558),d=v(d,l,c,f,a[g+8],11,-2022574463),f=v(f,d,l,c,a[g+11],16,1839030562),c=v(c,f,d,l,a[g+14],23,-35309556),l=v(l,c,f,d,a[g+1],4,-1530992060),d=v(d,l,c,f,a[g+4],11,1272893353),f=v(f,d,l,c,a[g+7],16,-155497632),c=v(c,f,d,l,a[g+10],23,-1094730640),l=v(l,c,f,d,a[g+13],4,681279174),d=v(d,l,c,f,a[g+0],11,-358537222),f=v(f,d,l,c,a[g+3],16,-722521979),c=v(c,f,d,l,a[g+6],23,76029189),l=v(l,c,f,d,a[g+9],4,-640364487),d=v(d,l,c,f,a[g+12],11,-421815835),f=v(f,d,l,c,a[g+15],16,530742520),c=v(c,f,d,l,a[g+2],23,-995338651),l=N(l,c,f,d,a[g+0],6,-198630844),d=N(d,l,c,f,a[g+7],10,1126891415),f=N(f,d,l,c,a[g+14],15,-1416354905),c=N(c,f,d,l,a[g+5],21,-57434055),l=N(l,c,f,d,a[g+12],6,1700485571),d=N(d,l,c,f,a[g+3],10,-1894986606),f=N(f,d,l,c,a[g+10],15,-1051523),c=N(c,f,d,l,a[g+1],21,-2054922799),l=N(l,c,f,d,a[g+8],6,1873313359),d=N(d,l,c,f,a[g+15],10,-30611744),f=N(f,d,l,c,a[g+6],15,-1560198380),c=N(c,f,d,l,a[g+13],21,1309151649),l=N(l,c,f,d,a[g+4],6,-145523070),d=N(d,l,c,f,a[g+11],10,-1120210379),f=N(f,d,l,c,a[g+2],15,718787259),c=N(c,f,d,l,a[g+9],21,-343485551),l=l+x>>>0,c=c+A>>>0,f=f+F>>>0,d=d+b>>>0}return e.endian([l,c,f,d])};r._ff=function(s,o,a,u,l,c,f){var d=s+(o&a|~o&u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._gg=function(s,o,a,u,l,c,f){var d=s+(o&u|a&~u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._hh=function(s,o,a,u,l,c,f){var d=s+(o^a^u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._ii=function(s,o,a,u,l,c,f){var d=s+(a^(o|~u))+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._blocksize=16,r._digestsize=16,gn.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):e.bytesToHex(a)}})();var Wi=gn.exports;const Hi=At(Wi);function Yi(e){return[...e].reduce((t,i)=>Math.imul(31,t)+i.charCodeAt(0)|0,0)}function Pi(e){re(e,"svelte-1p23x6g",".Column.svelte-1p23x6g{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}function Vi(e){let t,i,n;const r=e[2].default,s=Ie(r,e,e[1],null);return{c(){t=S("div"),s&&s.c(),y(t,"class",i="Column "+e[0]+" svelte-1p23x6g")},m(o,a){R(o,t,a),s&&s.m(t,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&Be(s,r,o,o[1],n?xe(r,o[1],a,null):Ke(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-1p23x6g"))&&y(t,"class",i)},i(o){n||(k(s,o),n=!0)},o(o){$(s,o),n=!1},d(o){o&&O(t),s&&s.d(o)}}}function Qi(e,t,i){let{$$slots:n={},$$scope:r}=t,{className:s=""}=t;return e.$$set=o=>{"className"in o&&i(0,s=o.className),"$$scope"in o&&i(1,r=o.$$scope)},[s,r,n]}class Ft extends ne{constructor(t){super(),te(this,t,Qi,Vi,Z,{className:0},Pi)}}function Zi(e){re(e,"svelte-1d2a8s6",'.Tag.svelte-1d2a8s6{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-1d2a8s6:before{font-family:"la-icon-font"}.SLA.svelte-1d2a8s6{border:1px solid #CFD6DD;border-radius:4px}')}function Xi(e){let t,i,n,r,s,o;const a=e[4].default,u=Ie(a,e,e[3],null);return{c(){t=S("div"),u&&u.c(),i=P(),n=S("span"),r=ee(e[0]),y(n,"class","text"),y(t,"class",s="Tag "+e[1]+" svelte-1d2a8s6"),y(t,"style",e[2])},m(l,c){R(l,t,c),u&&u.m(t,null),C(t,i),C(t,n),C(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Be(u,a,l,l[3],o?xe(a,l[3],c,null):Ke(l[3]),null),(!o||c&1)&&ie(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1d2a8s6"))&&y(t,"class",s),(!o||c&4)&&y(t,"style",l[2])},i(l){o||(k(u,l),o=!0)},o(l){$(u,l),o=!1},d(l){l&&O(t),u&&u.d(l)}}}function qi(e,t,i){let{$$slots:n={},$$scope:r}=t,{text:s}=t,{className:o=""}=t,{style:a=""}=t;return e.$$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 gt extends ne{constructor(t){super(),te(this,t,qi,Xi,Z,{text:0,className:1,style:2},Zi)}}function ji(e){re(e,"svelte-xnu6kx","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function er(e){let t,i;return t=new ye({props:{iconLaClassName:e[2]}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function tr(e){let t,i;return t=new gt({props:{text:e[0],className:e[3],style:e[1],$$slots:{default:[er]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){K(t,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}),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function nr(e,t,i){let{text:n}=t,{className:r=""}=t,{style:s=""}=t,{iconLaClassName:o}=t,a=`IconTag ${r}`;return e.$$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 ht extends ne{constructor(t){super(),te(this,t,nr,tr,Z,{text:0,className:4,style:1,iconLaClassName:2},ji)}}function ir(e){re(e,"svelte-d2fkh2",".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-d2fkh2{display:none}.companyTag.svelte-d2fkh2{display:none}.name.svelte-d2fkh2{font-size:13px;line-height:20px;font-weight:bold;padding-right:6px;border-right:1px solid var(--main-textcolor)}.email.svelte-d2fkh2{font-size:13px;line-height:20px;padding-left:6px}.texts.svelte-d2fkh2{display:flex;flex-direction:row;justify-content:flex-start}@media(min-width: 900px){.avatar.svelte-d2fkh2{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-d2fkh2{padding:0;border:none}.email.svelte-d2fkh2{padding:0}.companyTag.svelte-d2fkh2{display:flex}.texts.svelte-d2fkh2{display:flex;flex-direction:column;justify-content:center}}")}function Wt(e){let t,i;return t=new Bi({props:{bgColor:e[4](e[0]),name:je(e[0]),src:e[3](e[0])}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.bgColor=n[4](n[0])),r&1&&(s.name=je(n[0])),r&1&&(s.src=n[3](n[0])),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function rr(e){let t,i=[e[4](e[0]),je(e[0]),e[3](e[0])],n,r,s,o,a,u=e[0].emails+"",l,c,f,d,g,m=Wt(e);return d=new ht({props:{text:e[0].company==="Y"?"Company":e[2]("No Company"),className:(e[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){t=S("div"),m.c(),n=P(),r=S("div"),s=S("div"),s.textContent=`${name}`,o=P(),a=S("div"),l=ee(u),c=P(),f=S("div"),H(d.$$.fragment),y(t,"class","avatar svelte-d2fkh2"),y(s,"class","name svelte-d2fkh2"),y(a,"class","email svelte-d2fkh2"),y(f,"class","companyTag svelte-d2fkh2"),y(r,"class","texts svelte-d2fkh2")},m(_,v){R(_,t,v),m.m(t,null),R(_,n,v),R(_,r,v),C(r,s),C(r,o),C(r,a),C(a,l),C(r,c),C(r,f),K(d,f,null),g=!0},p(_,v){v&1&&Z(i,i=[_[4](_[0]),je(_[0]),_[3](_[0])])?(ge(),$(m,1,1,V),he(),m=Wt(_),m.c(),k(m,1),m.m(t,null)):m.p(_,v),(!g||v&1)&&u!==(u=_[0].emails+"")&&ie(l,u);const N={};v&5&&(N.text=_[0].company==="Y"?"Company":_[2]("No Company")),v&1&&(N.className=(_[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),d.$set(N)},i(_){g||(k(m),k(d.$$.fragment,_),g=!0)},o(_){$(m),$(d.$$.fragment,_),g=!1},d(_){_&&(O(t),O(n),O(r)),m.d(_),J(d)}}}function sr(e){let t,i;return t=new Ft({props:{className:e[1],$$slots:{default:[rr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&37&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function je(e){if(!e)return"";let t=e.firstname+" "+e.lastname;return t.trim()||(t=e.systemName),t}function or(e,t,i){let n;j(e,ke,u=>i(2,n=u));let{row:r}=t,{className:s="userColumn"}=t;function o(u){let l=u.avatarUrl;return l||(l="https://www.gravatar.com/avatar/"+Hi(u.emails[0]??"")+"?s=200&d=404"),l}function a(u){let l;u?l=Yi(je(u)+u.emails):l=Math.floor(Math.random()*16777215);let c=(l&16711680)>>16,f=(l&65280)>>8,d=l&255;return c+f+d<150&&(c=150),c+f+d>400&&(c=0),`rgb(${c},${f},${d})`}return e.$$set=u=>{"row"in u&&i(0,r=u.row),"className"in u&&i(1,s=u.className)},[r,s,n,o,a]}class ar extends ne{constructor(t){super(),te(this,t,or,sr,Z,{row:0,className:1},ir)}}var pn={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(dn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",f="month",d="quarter",g="year",m="date",_="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,N=/\[([^\]]+)]|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,x={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 D=["th","st","nd","rd"],p=E%100;return"["+E+(D[(p-20)%10]||D[p]||D[0])+"]"}},A=function(E,D,p){var w=String(E);return!w||w.length>=D?E:""+Array(D+1-w.length).join(p)+E},F={s:A,z:function(E){var D=-E.utcOffset(),p=Math.abs(D),w=Math.floor(p/60),L=p%60;return(D<=0?"+":"-")+A(w,2,"0")+":"+A(L,2,"0")},m:function E(D,p){if(D.date()<p.date())return-E(p,D);var w=12*(p.year()-D.year())+(p.month()-D.month()),L=D.clone().add(w,f),W=p-L<0,Y=D.clone().add(w+(W?-1:1),f);return+(-(w+(p-L)/(W?L-Y:Y-L))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:f,y:g,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:d}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},b="en",z={};z[b]=x;var U="$isDayjsObject",M=function(E){return E instanceof Q||!(!E||!E[U])},B=function E(D,p,w){var L;if(!D)return b;if(typeof D=="string"){var W=D.toLowerCase();z[W]&&(L=W),p&&(z[W]=p,L=W);var Y=D.split("-");if(!L&&Y.length>1)return E(Y[0])}else{var q=D.name;z[q]=D,L=q}return!w&&L&&(b=L),L||!w&&b},I=function(E,D){if(M(E))return E.clone();var p=typeof D=="object"?D:{};return p.date=E,p.args=arguments,new Q(p)},T=F;T.l=B,T.i=M,T.w=function(E,D){return I(E,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var Q=function(){function E(p){this.$L=B(p.locale,null,!0),this.parse(p),this.$x=this.$x||p.x||{},this[U]=!0}var D=E.prototype;return D.parse=function(p){this.$d=function(w){var L=w.date,W=w.utc;if(L===null)return new Date(NaN);if(T.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var Y=L.match(v);if(Y){var q=Y[2]-1||0,se=(Y[7]||"0").substring(0,3);return W?new Date(Date.UTC(Y[1],q,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,se)):new Date(Y[1],q,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,se)}}return new Date(L)}(p),this.init()},D.init=function(){var p=this.$d;this.$y=p.getFullYear(),this.$M=p.getMonth(),this.$D=p.getDate(),this.$W=p.getDay(),this.$H=p.getHours(),this.$m=p.getMinutes(),this.$s=p.getSeconds(),this.$ms=p.getMilliseconds()},D.$utils=function(){return T},D.isValid=function(){return this.$d.toString()!==_},D.isSame=function(p,w){var L=I(p);return this.startOf(w)<=L&&L<=this.endOf(w)},D.isAfter=function(p,w){return I(p)<this.startOf(w)},D.isBefore=function(p,w){return this.endOf(w)<I(p)},D.$g=function(p,w,L){return T.u(p)?this[w]:this.set(L,p)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(p,w){var L=this,W=!!T.u(w)||w,Y=T.p(p),q=function(Le,ue){var we=T.w(L.$u?Date.UTC(L.$y,ue,Le):new Date(L.$y,ue,Le),L);return W?we:we.endOf(l)},se=function(Le,ue){return T.w(L.toDate()[Le].apply(L.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(ue)),L)},oe=this.$W,ae=this.$M,fe=this.$D,Re="set"+(this.$u?"UTC":"");switch(Y){case g:return W?q(1,0):q(31,11);case f:return W?q(1,ae):q(0,ae+1);case c:var Ce=this.$locale().weekStart||0,Ue=(oe<Ce?oe+7:oe)-Ce;return q(W?fe-Ue:fe+(6-Ue),ae);case l:case m:return se(Re+"Hours",0);case u:return se(Re+"Minutes",1);case a:return se(Re+"Seconds",2);case o:return se(Re+"Milliseconds",3);default:return this.clone()}},D.endOf=function(p){return this.startOf(p,!1)},D.$set=function(p,w){var L,W=T.p(p),Y="set"+(this.$u?"UTC":""),q=(L={},L[l]=Y+"Date",L[m]=Y+"Date",L[f]=Y+"Month",L[g]=Y+"FullYear",L[u]=Y+"Hours",L[a]=Y+"Minutes",L[o]=Y+"Seconds",L[s]=Y+"Milliseconds",L)[W],se=W===l?this.$D+(w-this.$W):w;if(W===f||W===g){var oe=this.clone().set(m,1);oe.$d[q](se),oe.init(),this.$d=oe.set(m,Math.min(this.$D,oe.daysInMonth())).$d}else q&&this.$d[q](se);return this.init(),this},D.set=function(p,w){return this.clone().$set(p,w)},D.get=function(p){return this[T.p(p)]()},D.add=function(p,w){var L,W=this;p=Number(p);var Y=T.p(w),q=function(ae){var fe=I(W);return T.w(fe.date(fe.date()+Math.round(ae*p)),W)};if(Y===f)return this.set(f,this.$M+p);if(Y===g)return this.set(g,this.$y+p);if(Y===l)return q(1);if(Y===c)return q(7);var se=(L={},L[a]=n,L[u]=r,L[o]=i,L)[Y]||1,oe=this.$d.getTime()+p*se;return T.w(oe,this)},D.subtract=function(p,w){return this.add(-1*p,w)},D.format=function(p){var w=this,L=this.$locale();if(!this.isValid())return L.invalidDate||_;var W=p||"YYYY-MM-DDTHH:mm:ssZ",Y=T.z(this),q=this.$H,se=this.$m,oe=this.$M,ae=L.weekdays,fe=L.months,Re=L.meridiem,Ce=function(ue,we,We,it){return ue&&(ue[we]||ue(w,W))||We[we].slice(0,it)},Ue=function(ue){return T.s(q%12||12,ue,"0")},Le=Re||function(ue,we,We){var it=ue<12?"AM":"PM";return We?it.toLowerCase():it};return W.replace(N,function(ue,we){return we||function(We){switch(We){case"YY":return String(w.$y).slice(-2);case"YYYY":return T.s(w.$y,4,"0");case"M":return oe+1;case"MM":return T.s(oe+1,2,"0");case"MMM":return Ce(L.monthsShort,oe,fe,3);case"MMMM":return Ce(fe,oe);case"D":return w.$D;case"DD":return T.s(w.$D,2,"0");case"d":return String(w.$W);case"dd":return Ce(L.weekdaysMin,w.$W,ae,2);case"ddd":return Ce(L.weekdaysShort,w.$W,ae,3);case"dddd":return ae[w.$W];case"H":return String(q);case"HH":return T.s(q,2,"0");case"h":return Ue(1);case"hh":return Ue(2);case"a":return Le(q,se,!0);case"A":return Le(q,se,!1);case"m":return String(se);case"mm":return T.s(se,2,"0");case"s":return String(w.$s);case"ss":return T.s(w.$s,2,"0");case"SSS":return T.s(w.$ms,3,"0");case"Z":return Y}return null}(ue)||Y.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(p,w,L){var W,Y=this,q=T.p(w),se=I(p),oe=(se.utcOffset()-this.utcOffset())*n,ae=this-se,fe=function(){return T.m(Y,se)};switch(q){case g:W=fe()/12;break;case f:W=fe();break;case d:W=fe()/3;break;case c:W=(ae-oe)/6048e5;break;case l:W=(ae-oe)/864e5;break;case u:W=ae/r;break;case a:W=ae/n;break;case o:W=ae/i;break;default:W=ae}return L?W:T.a(W)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return z[this.$L]},D.locale=function(p,w){if(!p)return this.$L;var L=this.clone(),W=B(p,w,!0);return W&&(L.$L=W),L},D.clone=function(){return T.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},E}(),me=Q.prototype;return I.prototype=me,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",f],["$y",g],["$D",m]].forEach(function(E){me[E[1]]=function(D){return this.$g(D,E[0],E[1])}}),I.extend=function(E,D){return E.$i||(E(D,Q,I),E.$i=!0),I},I.locale=B,I.isDayjs=M,I.unix=function(E){return I(1e3*E)},I.en=z[b],I.Ls=z,I.p={},I})})(pn);var lr=pn.exports;const Pe=At(lr);var _n={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(dn,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,f,d){return s.fromToBase(l,c,f,d)}r.en.relativeTime=o,s.fromToBase=function(l,c,f,d,g){for(var m,_,v,N=f.$locale().relativeTime||o,x=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"}],A=x.length,F=0;F<A;F+=1){var b=x[F];b.d&&(m=d?r(l).diff(f,b.d,!0):f.diff(l,b.d,!0));var z=(i.rounding||Math.round)(Math.abs(m));if(v=m>0,z<=b.r||!b.r){z<=1&&F>0&&(b=x[F-1]);var U=N[b.l];g&&(z=g(""+z)),_=typeof U=="string"?U.replace("%d",z):U(z,c,b.l,v);break}}if(c)return _;var M=v?N.future:N.past;return typeof M=="function"?M(_):M.replace("%s",_)},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)}}})})(_n);var ur=_n.exports;const cr=At(ur);Pe.extend(cr);function fr(e){let t,i,n=[e[3],{title:e[2]},{datetime:e[1]}],r={};for(let s=0;s<n.length;s+=1)r=at(r,n[s]);return{c(){t=S("time"),i=ee(e[0]),Et(t,r)},m(s,o){R(s,t,o),C(t,i)},p(s,[o]){o&1&&Mn(i,s[0],r.contenteditable),Et(t,r=Jn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:V,o:V,d(s){s&&O(t)}}}function dr(e,t,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=zt(t,r),{timestamp:o=new Date().toISOString()}=t,{format:a="MMM DD, YYYY"}=t,{relative:u=!1}=t,{live:l=!1}=t,{formatted:c=""}=t,f;const d=60*1e3;return an(()=>()=>clearInterval(f)),e.$$set=g=>{t=at(at({},t),Sn(g)),i(3,s=zt(t,r)),"timestamp"in g&&i(1,o=g.timestamp),"format"in g&&i(4,a=g.format),"relative"in g&&i(5,u=g.relative),"live"in g&&i(6,l=g.live),"formatted"in g&&i(0,c=g.formatted)},e.$$.update=()=>{e.$$.dirty&98&&u&&l!==!1&&(f=setInterval(()=>{i(0,c=Pe(o).from())},Math.abs(typeof l=="number"?l:d))),e.$$.dirty&50&&i(0,c=u?Pe(o).from():Pe(o).format(a)),e.$$.dirty&50&&i(2,n=u?Pe(o).format(a):void 0)},[c,o,n,s,a,u,l]}class gr extends ne{constructor(t){super(),te(this,t,dr,fr,Z,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function hr(e){re(e,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function mr(e){let t,i=e[4]("Invalid data")+"",n;return{c(){t=S("span"),n=ee(i),y(t,"class","invalid svelte-1o3wy2t")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&16&&i!==(i=r[4]("Invalid data")+"")&&ie(n,i)},i:V,o:V,d(r){r&&O(t)}}}function pr(e){let t,i;return t=new gr({props:{style:e[2],timestamp:e[0],format:e[1],relative:e[3]}}),{c(){H(t.$$.fragment)},m(n,r){K(t,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]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function _r(e){let t,i,n,r,s;const o=[pr,mr],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(e,-1),r=a[n]=o[n](e),{c(){t=S("div"),r.c(),y(t,"class","Date svelte-1o3wy2t")},m(l,c){R(l,t,c),a[n].m(t,null),s=!0},p(l,[c]){let f=n;n=u(l,c),n===f?a[n].p(l,c):(ge(),$(a[f],1,1,()=>{a[f]=null}),he(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),k(r,1),r.m(t,null))},i(l){s||(k(r),s=!0)},o(l){$(r),s=!1},d(l){l&&O(t),a[n].d()}}}function vr(e,t,i){let n;j(e,ke,u=>i(4,n=u));let{data:r}=t,{format:s=""}=t,{style:o=""}=t,{relative:a=!1}=t;return e.$$set=u=>{"data"in u&&i(0,r=u.data),"format"in u&&i(1,s=u.format),"style"in u&&i(2,o=u.style),"relative"in u&&i(3,a=u.relative)},[r,s,o,a,n]}class vn extends ne{constructor(t){super(),te(this,t,vr,_r,Z,{data:0,format:1,style:2,relative:3},hr)}}function yr(e){re(e,"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 br(e){let t,i,n,r;i=new ye({props:{iconLaClassName:e[2]}});const s=e[8].default,o=Ie(s,e,e[7],null);return{c(){t=S("div"),H(i.$$.fragment),n=P(),o&&o.c(),y(t,"class","IconWrapper svelte-1wdh20c")},m(a,u){R(a,t,u),K(i,t,null),R(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?xe(s,a[7],u,null):Ke(a[7]),null)},i(a){r||(k(i.$$.fragment,a),k(o,a),r=!0)},o(a){$(i.$$.fragment,a),$(o,a),r=!1},d(a){a&&(O(t),O(n)),J(i),o&&o.d(a)}}}function kr(e){let t,i;return t=new ht({props:{style:e[3],text:e[0],iconLaClassName:e[2],className:"Combined"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,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]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function wr(e){let t,i,n,r,s,o;const a=[kr,br],u=[];function l(c,f){return c[0]!==""?0:1}return i=l(e),n=u[i]=a[i](e),s=new gt({props:{style:e[4],text:e[1]}}),{c(){t=S("div"),n.c(),r=P(),H(s.$$.fragment),y(t,"class",Te(e[5])+" svelte-1wdh20c")},m(c,f){R(c,t,f),u[i].m(t,null),C(t,r),K(s,t,null),o=!0},p(c,[f]){let d=i;i=l(c),i===d?u[i].p(c,f):(ge(),$(u[d],1,1,()=>{u[d]=null}),he(),n=u[i],n?n.p(c,f):(n=u[i]=a[i](c),n.c()),k(n,1),n.m(t,r));const g={};f&16&&(g.style=c[4]),f&2&&(g.text=c[1]),s.$set(g)},i(c){o||(k(n),k(s.$$.fragment,c),o=!0)},o(c){$(n),$(s.$$.fragment,c),o=!1},d(c){c&&O(t),u[i].d(),J(s)}}}function $r(e,t,i){let{$$slots:n={},$$scope:r}=t,{iconText:s=""}=t,{tagText:o}=t,{iconLaClassName:a}=t,{className:u}=t,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 f=`CombinedTag ${u}`;return e.$$set=d=>{"iconText"in d&&i(0,s=d.iconText),"tagText"in d&&i(1,o=d.tagText),"iconLaClassName"in d&&i(2,a=d.iconLaClassName),"className"in d&&i(6,u=d.className),"$$scope"in d&&i(7,r=d.$$scope)},[s,o,a,l,c,f,u,r,n]}class yn extends ne{constructor(t){super(),te(this,t,$r,wr,Z,{iconText:0,tagText:1,iconLaClassName:2,className:6},yr)}}function Tr(e){let t,i;return t=new vn({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:e[1],relative:!0}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Cr(e){let t,i;return t=new yn({props:{iconLaClassName:e[3],tagText:e[0],className:e[2],$$slots:{default:[Tr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){K(t,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}),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Lr(e,t,i){let n,{tagText:r}=t,{due:s}=t,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return e.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},e.$$.update=()=>{e.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class Sr extends ne{constructor(t){super(),te(this,t,Lr,Cr,Z,{tagText:0,due:1})}}function Nr(e){re(e,"svelte-rl80em",".TicketId.svelte-rl80em{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-rl80em{font-size:13px;line-height:20px}.Communication.svelte-rl80em{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}")}function Dr(e){let t,i;return t=new gt({props:{text:e[3]("No SLA"),className:"SLA"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.text=n[3]("No SLA")),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Or(e){let t,i;return t=new Sr({props:{tagText:"First answer",due:e[1].datedue}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Rr(e){let t,i=e[1].code+"",n,r,s,o,a,u,l=e[1].messagegroupsIn+"",c,f,d,g,m,_,v=e[1].messagegroupsOut+"",N,x,A,F,b,z,U,M,B,I,T,Q;o=new ye({props:{iconLaClassName:"la-incoming"}}),g=new ye({props:{iconLaClassName:"la-outgoing"}}),z=new vn({props:{data:e[1].datecreated,format:e[2]}});const me=[Or,Dr],E=[];function D(p,w){return w&2&&(M=null),M==null&&(M=p[1].datedue instanceof Date&&!isNaN(p[1].datedue)),M?0:1}return B=D(e,-1),I=E[B]=me[B](e),{c(){t=S("span"),n=ee(i),r=P(),s=S("div"),H(o.$$.fragment),a=P(),u=S("span"),c=ee(l),f=P(),d=S("div"),H(g.$$.fragment),m=P(),_=S("span"),N=ee(v),x=P(),A=S("div"),F=S("span"),F.textContent=`${e[4]}:`,b=P(),H(z.$$.fragment),U=P(),I.c(),T=et(),y(t,"class","TicketId svelte-rl80em"),y(s,"class","Communication incomingMessages svelte-rl80em"),y(d,"class","Communication outgoingMessages svelte-rl80em"),y(A,"class","Created svelte-rl80em")},m(p,w){R(p,t,w),C(t,n),R(p,r,w),R(p,s,w),K(o,s,null),C(s,a),C(s,u),C(u,c),R(p,f,w),R(p,d,w),K(g,d,null),C(d,m),C(d,_),C(_,N),R(p,x,w),R(p,A,w),C(A,F),C(A,b),K(z,A,null),R(p,U,w),E[B].m(p,w),R(p,T,w),Q=!0},p(p,w){(!Q||w&2)&&i!==(i=p[1].code+"")&&ie(n,i),(!Q||w&2)&&l!==(l=p[1].messagegroupsIn+"")&&ie(c,l),(!Q||w&2)&&v!==(v=p[1].messagegroupsOut+"")&&ie(N,v);const L={};w&2&&(L.data=p[1].datecreated),w&4&&(L.format=p[2]),z.$set(L);let W=B;B=D(p,w),B===W?E[B].p(p,w):(ge(),$(E[W],1,1,()=>{E[W]=null}),he(),I=E[B],I?I.p(p,w):(I=E[B]=me[B](p),I.c()),k(I,1),I.m(T.parentNode,T))},i(p){Q||(k(o.$$.fragment,p),k(g.$$.fragment,p),k(z.$$.fragment,p),k(I),Q=!0)},o(p){$(o.$$.fragment,p),$(g.$$.fragment,p),$(z.$$.fragment,p),$(I),Q=!1},d(p){p&&(O(t),O(r),O(s),O(f),O(d),O(x),O(A),O(U),O(T)),J(o),J(g),J(z),E[B].d(p)}}}function Ar(e){let t,i;return t=new Ft({props:{className:e[0],$$slots:{default:[Rr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&46&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Fr(e,t,i){let n;j(e,ke,u=>i(3,n=u));let{className:r="importanceColumn"}=t,{row:s}=t,{format:o="YYYY-MM-DD HH:mm:ss"}=t;const a=n("Created");return e.$$set=u=>{"className"in u&&i(0,r=u.className),"row"in u&&i(1,s=u.row),"format"in u&&i(2,o=u.format)},[r,s,o,n,a]}class Mr extends ne{constructor(t){super(),te(this,t,Fr,Ar,Z,{className:0,row:1,format:2},Nr)}}function Gr(e){re(e,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function zr(e){let t,i;return t=new gt({props:{style:"color: #"+e[2]+"; background: #"+e[1],text:e[0],className:"TicketTag"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,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]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Er(e,t,i){let n,r,s,o,{tagId:a}=t,u=ve("tagsMap");return j(e,u,l=>i(5,o=l)),e.$$set=l=>{"tagId"in l&&i(4,a=l.tagId)},e.$$.update=()=>{var l,c,f;e.$$.dirty&48&&i(2,n=((l=o[a])==null?void 0:l.color)??0),e.$$.dirty&48&&i(1,r=((c=o[a])==null?void 0:c.backgroundcolor)??0),e.$$.dirty&48&&i(0,s=((f=o[a])==null?void 0:f.name)??"")},[s,r,n,u,a,o]}class Ir extends ne{constructor(t){super(),te(this,t,Er,zr,Z,{tagId:4},Gr)}}function Ht(e,t,i){const n=e.slice();return n[1]=t[i],n}function Yt(e){let t,i;return t=new Ir({props:{tagId:e[1]}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function xr(e){let t,i,n=Ee(e[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Yt(Ht(e,n,o));const s=o=>$(r[o],1,1,()=>{r[o]=null});return{c(){t=S("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){R(o,t,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(t,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),k(r[u],1)):(r[u]=Yt(l),r[u].c(),k(r[u],1),r[u].m(t,null))}for(ge(),u=n.length;u<r.length;u+=1)s(u);he()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)k(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&&O(t),St(r,o)}}}function Br(e,t,i){let{tags:n}=t;return e.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class Kr extends ne{constructor(t){super(),te(this,t,Br,xr,Z,{tags:0})}}function Jr(e){re(e,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function Ur(e){let t,i;return t=new ht({props:{className:e[1][e[0]].text,style:"color: white; background-color: "+ut(e[0]),text:e[1][e[0]].text,iconLaClassName:e[1][e[0]].icon}}),{c(){H(t.$$.fragment)},m(n,r){K(t,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),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Wr(e,t,i){let n;j(e,ke,o=>i(2,n=o));let{status:r}=t;const s={A:{text:n("Answered"),icon:"la-ticket-answered"},T:{text:n("Chatting"),icon:"la-chatting"},P:{text:n("Calling"),icon:"la-call"},X:{text:n("Deleted"),icon:"la-ticket-deleted"},B:{text:n("Spam"),icon:"la-spam"},I:{text:n("Init"),icon:""},R:{text:n("Resolved"),icon:"la-ticket-resolved"},N:{text:n("New"),icon:"la-ticket-new"},C:{text:n("Open"),icon:"la-ticket-open"},W:{text:n("Postponed"),icon:"la-ticket-postponed"}};return e.$$set=o=>{"status"in o&&i(0,r=o.status)},[r,s]}class Hr extends ne{constructor(t){super(),te(this,t,Wr,Ur,Z,{status:0},Jr)}}function Yr(e){re(e,"svelte-nfaksv",".subject.svelte-nfaksv{font-size:13px;font-weight:bold;line-height:20px;margin:0}.preview.svelte-nfaksv{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:5px;margin:0;line-height:20px;font-size:13px}.additional.svelte-nfaksv{display:flex}")}function Pr(e){let t,i;return t=new ht({props:{className:"Department",text:e[0].departmentname,iconLaClassName:"la-department"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Vr(e){let t,i;return t=new yn({props:{className:"Department",tagText:e[0].agentname,iconLaClassName:"la-department",iconText:e[0].departmentname}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Qr(e){let t,i=e[0].subject+"",n,r,s,o=e[0].preview+"",a,u,l,c,f,d,g,m,_,v,N;c=new Hr({props:{status:e[0].status}});const x=[Vr,Pr],A=[];function F(b,z){return z&1&&(d=null),d==null&&(d=b[0].agentname.trim()!==""),d?0:1}return g=F(e,-1),m=A[g]=x[g](e),v=new Kr({props:{tags:e[0].tags}}),{c(){t=S("h1"),n=ee(i),r=P(),s=S("p"),a=ee(o),u=P(),l=S("div"),H(c.$$.fragment),f=P(),m.c(),_=P(),H(v.$$.fragment),y(t,"class","subject svelte-nfaksv"),y(s,"class","preview svelte-nfaksv"),y(l,"class","additional svelte-nfaksv")},m(b,z){R(b,t,z),C(t,n),R(b,r,z),R(b,s,z),C(s,a),R(b,u,z),R(b,l,z),K(c,l,null),C(l,f),A[g].m(l,null),C(l,_),K(v,l,null),N=!0},p(b,z){(!N||z&1)&&i!==(i=b[0].subject+"")&&ie(n,i),(!N||z&1)&&o!==(o=b[0].preview+"")&&ie(a,o);const U={};z&1&&(U.status=b[0].status),c.$set(U);let M=g;g=F(b,z),g===M?A[g].p(b,z):(ge(),$(A[M],1,1,()=>{A[M]=null}),he(),m=A[g],m?m.p(b,z):(m=A[g]=x[g](b),m.c()),k(m,1),m.m(l,_));const B={};z&1&&(B.tags=b[0].tags),v.$set(B)},i(b){N||(k(c.$$.fragment,b),k(m),k(v.$$.fragment,b),N=!0)},o(b){$(c.$$.fragment,b),$(m),$(v.$$.fragment,b),N=!1},d(b){b&&(O(t),O(r),O(s),O(u),O(l)),J(c),A[g].d(),J(v)}}}function Zr(e){let t,i;return t=new Ft({props:{className:e[1],$$slots:{default:[Qr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Xr(e,t,i){let{row:n}=t,{className:r="statusColumn"}=t;return e.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class qr extends ne{constructor(t){super(),te(this,t,Xr,Zr,Z,{row:0,className:1},Yr)}}function jr(e){re(e,"svelte-8pmpj5",`.Row.svelte-8pmpj5{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
8
+ */var Rr=function(e){return e!=null&&(On(e)||Fr(e)||!!e._isBuffer)};function On(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Fr(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&On(e.slice(0,0))}(function(){var e=Or,t=qt.utf8,i=Rr,n=qt.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=t.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=e.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 p=r._ff,v=r._gg,w=r._hh,m=r._ii,h=0;h<a.length;h+=16){var D=l,O=c,x=d,R=f;l=p(l,c,d,f,a[h+0],7,-680876936),f=p(f,l,c,d,a[h+1],12,-389564586),d=p(d,f,l,c,a[h+2],17,606105819),c=p(c,d,f,l,a[h+3],22,-1044525330),l=p(l,c,d,f,a[h+4],7,-176418897),f=p(f,l,c,d,a[h+5],12,1200080426),d=p(d,f,l,c,a[h+6],17,-1473231341),c=p(c,d,f,l,a[h+7],22,-45705983),l=p(l,c,d,f,a[h+8],7,1770035416),f=p(f,l,c,d,a[h+9],12,-1958414417),d=p(d,f,l,c,a[h+10],17,-42063),c=p(c,d,f,l,a[h+11],22,-1990404162),l=p(l,c,d,f,a[h+12],7,1804603682),f=p(f,l,c,d,a[h+13],12,-40341101),d=p(d,f,l,c,a[h+14],17,-1502002290),c=p(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=w(l,c,d,f,a[h+5],4,-378558),f=w(f,l,c,d,a[h+8],11,-2022574463),d=w(d,f,l,c,a[h+11],16,1839030562),c=w(c,d,f,l,a[h+14],23,-35309556),l=w(l,c,d,f,a[h+1],4,-1530992060),f=w(f,l,c,d,a[h+4],11,1272893353),d=w(d,f,l,c,a[h+7],16,-155497632),c=w(c,d,f,l,a[h+10],23,-1094730640),l=w(l,c,d,f,a[h+13],4,681279174),f=w(f,l,c,d,a[h+0],11,-358537222),d=w(d,f,l,c,a[h+3],16,-722521979),c=w(c,d,f,l,a[h+6],23,76029189),l=w(l,c,d,f,a[h+9],4,-640364487),f=w(f,l,c,d,a[h+12],11,-421815835),d=w(d,f,l,c,a[h+15],16,530742520),c=w(c,d,f,l,a[h+2],23,-995338651),l=m(l,c,d,f,a[h+0],6,-198630844),f=m(f,l,c,d,a[h+7],10,1126891415),d=m(d,f,l,c,a[h+14],15,-1416354905),c=m(c,d,f,l,a[h+5],21,-57434055),l=m(l,c,d,f,a[h+12],6,1700485571),f=m(f,l,c,d,a[h+3],10,-1894986606),d=m(d,f,l,c,a[h+10],15,-1051523),c=m(c,d,f,l,a[h+1],21,-2054922799),l=m(l,c,d,f,a[h+8],6,1873313359),f=m(f,l,c,d,a[h+15],10,-30611744),d=m(d,f,l,c,a[h+6],15,-1560198380),c=m(c,d,f,l,a[h+13],21,1309151649),l=m(l,c,d,f,a[h+4],6,-145523070),f=m(f,l,c,d,a[h+11],10,-1120210379),d=m(d,f,l,c,a[h+2],15,718787259),c=m(c,d,f,l,a[h+9],21,-343485551),l=l+D>>>0,c=c+O>>>0,d=d+x>>>0,f=f+R>>>0}return e.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,Dn.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):e.bytesToHex(a)}})();var Ar=Dn.exports;const Gr=Mt(Ar);function zr(e){return[...e].reduce((t,i)=>Math.imul(31,t)+i.charCodeAt(0)|0,0)}function Er(e){le(e,"svelte-in3p8g",".Column.svelte-in3p8g{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(min-width: 768px){.Column.importanceColumn.svelte-in3p8g{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}}")}function xr(e){let t,i,n;const r=e[2].default,s=Ue(r,e,e[1],null);return{c(){t=k("div"),s&&s.c(),_(t,"class",i="Column "+e[0]+" svelte-in3p8g")},m(o,a){N(o,t,a),s&&s.m(t,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&He(s,r,o,o[1],n?We(r,o[1],a,null):Ye(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-in3p8g"))&&_(t,"class",i)},i(o){n||(b(s,o),n=!0)},o(o){T(s,o),n=!1},d(o){o&&S(t),s&&s.d(o)}}}function Mr(e,t,i){let{$$slots:n={},$$scope:r}=t,{className:s=""}=t;return e.$$set=o=>{"className"in o&&i(0,s=o.className),"$$scope"in o&&i(1,r=o.$$scope)},[s,r,n]}class It extends se{constructor(t){super(),re(this,t,Mr,xr,te,{className:0},Er)}}function Ir(e){le(e,"svelte-1d2a8s6",'.Tag.svelte-1d2a8s6{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-1d2a8s6:before{font-family:"la-icon-font"}.SLA.svelte-1d2a8s6{border:1px solid #CFD6DD;border-radius:4px}')}function Br(e){let t,i,n,r,s,o;const a=e[4].default,u=Ue(a,e,e[3],null);return{c(){t=k("div"),u&&u.c(),i=W(),n=k("span"),r=Q(e[0]),_(n,"class","text"),_(t,"class",s="Tag "+e[1]+" svelte-1d2a8s6"),_(t,"style",e[2])},m(l,c){N(l,t,c),u&&u.m(t,null),y(t,i),y(t,n),y(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&He(u,a,l,l[3],o?We(a,l[3],c,null):Ye(l[3]),null),(!o||c&1)&&ie(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1d2a8s6"))&&_(t,"class",s),(!o||c&4)&&_(t,"style",l[2])},i(l){o||(b(u,l),o=!0)},o(l){T(u,l),o=!1},d(l){l&&S(t),u&&u.d(l)}}}function Kr(e,t,i){let{$$slots:n={},$$scope:r}=t,{text:s}=t,{className:o=""}=t,{style:a=""}=t;return e.$$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 vt extends se{constructor(t){super(),re(this,t,Kr,Br,te,{text:0,className:1,style:2},Ir)}}function Jr(e){le(e,"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 Ur(e){let t,i;return t=new Ce({props:{iconLaClassName:e[2]}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function Wr(e){let t,i;return t=new vt({props:{text:e[0],className:e[3],style:e[1],$$slots:{default:[Ur]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(n,r){I(t,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}),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function Hr(e,t,i){let{text:n}=t,{className:r=""}=t,{style:s=""}=t,{iconLaClassName:o}=t,a=`IconTag ${r}`;return e.$$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 yt extends se{constructor(t){super(),re(this,t,Hr,Wr,te,{text:0,className:4,style:1,iconLaClassName:2},Jr)}}function Yr(e){le(e,"svelte-416m4x",".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-416m4x{display:none}.companyTag.svelte-416m4x{display:none}.name.svelte-416m4x{font-size:13px;line-height:20px;font-weight:bold;padding-right:6px;margin-right:6px;border-right:1px solid var(--main-textcolor)}.no.name.svelte-416m4x{display:none;border-right:none}.email.svelte-416m4x{font-size:13px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.texts.svelte-416m4x{display:flex;flex-direction:row;justify-content:flex-start;overflow:hidden}@media(min-width: 900px){.avatar.svelte-416m4x{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-416m4x{padding:0;border:none}.email.svelte-416m4x{padding:0}.companyTag.svelte-416m4x{display:flex}.texts.svelte-416m4x{display:flex;flex-direction:column;justify-content:center}}")}function jt(e){let t,i;return t=new Nr({props:{bgColor:e[6](e[0]),name:e[4](e[0]),src:e[5](e[0])}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.bgColor=n[6](n[0])),r&1&&(s.name=n[4](n[0])),r&1&&(s.src=n[5](n[0])),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function Pr(e){let t,i=[e[6](e[0]),e[4](e[0]),e[5](e[0])],n,r,s,o,a,u,l,c=e[0].emails+"",d,f,h,p,v,w=jt(e);return p=new yt({props:{text:e[0].company==="Y"?"Company":e[3]("No Company"),className:(e[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){t=k("div"),w.c(),n=W(),r=k("div"),s=k("div"),o=Q(e[2]),u=W(),l=k("div"),d=Q(c),f=W(),h=k("div"),U(p.$$.fragment),_(t,"class","avatar svelte-416m4x"),_(s,"class",a=ge(e[2]?"name":"no name")+" svelte-416m4x"),_(l,"class","email svelte-416m4x"),_(h,"class","companyTag svelte-416m4x"),_(r,"class","texts svelte-416m4x")},m(m,D){N(m,t,D),w.m(t,null),N(m,n,D),N(m,r,D),y(r,s),y(s,o),y(r,u),y(r,l),y(l,d),y(r,f),y(r,h),I(p,h,null),v=!0},p(m,D){D&1&&te(i,i=[m[6](m[0]),m[4](m[0]),m[5](m[0])])?(be(),T(w,1,1,q),we(),w=jt(m),w.c(),b(w,1),w.m(t,null)):w.p(m,D),(!v||D&4)&&ie(o,m[2]),(!v||D&4&&a!==(a=ge(m[2]?"name":"no name")+" svelte-416m4x"))&&_(s,"class",a),(!v||D&1)&&c!==(c=m[0].emails+"")&&ie(d,c);const O={};D&9&&(O.text=m[0].company==="Y"?"Company":m[3]("No Company")),D&1&&(O.className=(m[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),p.$set(O)},i(m){v||(b(w),b(p.$$.fragment,m),v=!0)},o(m){T(w),T(p.$$.fragment,m),v=!1},d(m){m&&(S(t),S(n),S(r)),w.d(m),B(p)}}}function Vr(e){let t,i;return t=new It({props:{className:e[1],$$slots:{default:[Pr]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&141&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function Qr(e,t,i){let n,r;V(e,Se,c=>i(3,r=c));let{row:s}=t,{className:o="userColumn"}=t;function a(c){if(!c)return"";let d=c.firstname+" "+c.lastname;return d.trim()||(d=c.systemName),d}function u(c){let d=c.avatarUrl;return d||(d="https://www.gravatar.com/avatar/"+Gr(c.emails[0]??"")+"?s=200&d=404"),d}function l(c){let d;c?d=zr(a(c)+c.emails):d=Math.floor(Math.random()*16777215);let f=(d&16711680)>>16,h=(d&65280)>>8,p=d&255;return f+h+p<150&&(f=150),f+h+p>400&&(f=0),`rgb(${f},${h},${p})`}return e.$$set=c=>{"row"in c&&i(0,s=c.row),"className"in c&&i(1,o=c.className)},e.$$.update=()=>{e.$$.dirty&1&&i(2,n=s.name)},[s,o,n,r,a,u,l]}class Zr extends se{constructor(t){super(),re(this,t,Qr,Vr,te,{row:0,className:1},Yr)}}var Rn={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Sn,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",p="date",v="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,D={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(z){var C=["th","st","nd","rd"],$=z%100;return"["+z+(C[($-20)%10]||C[$]||C[0])+"]"}},O=function(z,C,$){var F=String(z);return!F||F.length>=C?z:""+Array(C+1-F.length).join($)+z},x={s:O,z:function(z){var C=-z.utcOffset(),$=Math.abs(C),F=Math.floor($/60),L=$%60;return(C<=0?"+":"-")+O(F,2,"0")+":"+O(L,2,"0")},m:function z(C,$){if(C.date()<$.date())return-z($,C);var F=12*($.year()-C.year())+($.month()-C.month()),L=C.clone().add(F,d),E=$-L<0,J=C.clone().add(F+(E?-1:1),d);return+(-(F+($-L)/(E?L-J:J-L))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:d,y:h,w:c,d:l,D:p,h:u,m:a,s:o,ms:s,Q:f}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},R="en",K={};K[R]=D;var ue="$isDayjsObject",G=function(z){return z instanceof pe||!(!z||!z[ue])},j=function z(C,$,F){var L;if(!C)return R;if(typeof C=="string"){var E=C.toLowerCase();K[E]&&(L=E),$&&(K[E]=$,L=E);var J=C.split("-");if(!L&&J.length>1)return z(J[0])}else{var Z=C.name;K[Z]=C,L=Z}return!F&&L&&(R=L),L||!F&&R},ee=function(z,C){if(G(z))return z.clone();var $=typeof C=="object"?C:{};return $.date=z,$.args=arguments,new pe($)},H=x;H.l=j,H.i=G,H.w=function(z,C){return ee(z,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var pe=function(){function z($){this.$L=j($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[ue]=!0}var C=z.prototype;return C.parse=function($){this.$d=function(F){var L=F.date,E=F.utc;if(L===null)return new Date(NaN);if(H.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var J=L.match(w);if(J){var Z=J[2]-1||0,P=(J[7]||"0").substring(0,3);return E?new Date(Date.UTC(J[1],Z,J[3]||1,J[4]||0,J[5]||0,J[6]||0,P)):new Date(J[1],Z,J[3]||1,J[4]||0,J[5]||0,J[6]||0,P)}}return new Date(L)}($),this.init()},C.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},C.$utils=function(){return H},C.isValid=function(){return this.$d.toString()!==v},C.isSame=function($,F){var L=ee($);return this.startOf(F)<=L&&L<=this.endOf(F)},C.isAfter=function($,F){return ee($)<this.startOf(F)},C.isBefore=function($,F){return this.endOf(F)<ee($)},C.$g=function($,F,L){return H.u($)?this[F]:this.set(L,$)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function($,F){var L=this,E=!!H.u(F)||F,J=H.p($),Z=function(M,Y){var he=H.w(L.$u?Date.UTC(L.$y,Y,M):new Date(L.$y,Y,M),L);return E?he:he.endOf(l)},P=function(M,Y){return H.w(L.toDate()[M].apply(L.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(Y)),L)},X=this.$W,oe=this.$M,ae=this.$D,$e="set"+(this.$u?"UTC":"");switch(J){case h:return E?Z(1,0):Z(31,11);case d:return E?Z(1,oe):Z(0,oe+1);case c:var de=this.$locale().weekStart||0,De=(X<de?X+7:X)-de;return Z(E?ae-De:ae+(6-De),oe);case l:case p:return P($e+"Hours",0);case u:return P($e+"Minutes",1);case a:return P($e+"Seconds",2);case o:return P($e+"Milliseconds",3);default:return this.clone()}},C.endOf=function($){return this.startOf($,!1)},C.$set=function($,F){var L,E=H.p($),J="set"+(this.$u?"UTC":""),Z=(L={},L[l]=J+"Date",L[p]=J+"Date",L[d]=J+"Month",L[h]=J+"FullYear",L[u]=J+"Hours",L[a]=J+"Minutes",L[o]=J+"Seconds",L[s]=J+"Milliseconds",L)[E],P=E===l?this.$D+(F-this.$W):F;if(E===d||E===h){var X=this.clone().set(p,1);X.$d[Z](P),X.init(),this.$d=X.set(p,Math.min(this.$D,X.daysInMonth())).$d}else Z&&this.$d[Z](P);return this.init(),this},C.set=function($,F){return this.clone().$set($,F)},C.get=function($){return this[H.p($)]()},C.add=function($,F){var L,E=this;$=Number($);var J=H.p(F),Z=function(oe){var ae=ee(E);return H.w(ae.date(ae.date()+Math.round(oe*$)),E)};if(J===d)return this.set(d,this.$M+$);if(J===h)return this.set(h,this.$y+$);if(J===l)return Z(1);if(J===c)return Z(7);var P=(L={},L[a]=n,L[u]=r,L[o]=i,L)[J]||1,X=this.$d.getTime()+$*P;return H.w(X,this)},C.subtract=function($,F){return this.add(-1*$,F)},C.format=function($){var F=this,L=this.$locale();if(!this.isValid())return L.invalidDate||v;var E=$||"YYYY-MM-DDTHH:mm:ssZ",J=H.z(this),Z=this.$H,P=this.$m,X=this.$M,oe=L.weekdays,ae=L.months,$e=L.meridiem,de=function(Y,he,Te,Ne){return Y&&(Y[he]||Y(F,E))||Te[he].slice(0,Ne)},De=function(Y){return H.s(Z%12||12,Y,"0")},M=$e||function(Y,he,Te){var Ne=Y<12?"AM":"PM";return Te?Ne.toLowerCase():Ne};return E.replace(m,function(Y,he){return he||function(Te){switch(Te){case"YY":return String(F.$y).slice(-2);case"YYYY":return H.s(F.$y,4,"0");case"M":return X+1;case"MM":return H.s(X+1,2,"0");case"MMM":return de(L.monthsShort,X,ae,3);case"MMMM":return de(ae,X);case"D":return F.$D;case"DD":return H.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return de(L.weekdaysMin,F.$W,oe,2);case"ddd":return de(L.weekdaysShort,F.$W,oe,3);case"dddd":return oe[F.$W];case"H":return String(Z);case"HH":return H.s(Z,2,"0");case"h":return De(1);case"hh":return De(2);case"a":return M(Z,P,!0);case"A":return M(Z,P,!1);case"m":return String(P);case"mm":return H.s(P,2,"0");case"s":return String(F.$s);case"ss":return H.s(F.$s,2,"0");case"SSS":return H.s(F.$ms,3,"0");case"Z":return J}return null}(Y)||J.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function($,F,L){var E,J=this,Z=H.p(F),P=ee($),X=(P.utcOffset()-this.utcOffset())*n,oe=this-P,ae=function(){return H.m(J,P)};switch(Z){case h:E=ae()/12;break;case d:E=ae();break;case f:E=ae()/3;break;case c:E=(oe-X)/6048e5;break;case l:E=(oe-X)/864e5;break;case u:E=oe/r;break;case a:E=oe/n;break;case o:E=oe/i;break;default:E=oe}return L?E:H.a(E)},C.daysInMonth=function(){return this.endOf(d).$D},C.$locale=function(){return K[this.$L]},C.locale=function($,F){if(!$)return this.$L;var L=this.clone(),E=j($,F,!0);return E&&(L.$L=E),L},C.clone=function(){return H.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},z}(),ke=pe.prototype;return ee.prototype=ke,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",h],["$D",p]].forEach(function(z){ke[z[1]]=function(C){return this.$g(C,z[0],z[1])}}),ee.extend=function(z,C){return z.$i||(z(C,pe,ee),z.$i=!0),ee},ee.locale=j,ee.isDayjs=G,ee.unix=function(z){return ee(1e3*z)},ee.en=K[R],ee.Ls=K,ee.p={},ee})})(Rn);var Xr=Rn.exports;const Ze=Mt(Xr);var Fn={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Sn,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 p,v,w,m=d.$locale().relativeTime||o,D=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"}],O=D.length,x=0;x<O;x+=1){var R=D[x];R.d&&(p=f?r(l).diff(d,R.d,!0):d.diff(l,R.d,!0));var K=(i.rounding||Math.round)(Math.abs(p));if(w=p>0,K<=R.r||!R.r){K<=1&&x>0&&(R=D[x-1]);var ue=m[R.l];h&&(K=h(""+K)),v=typeof ue=="string"?ue.replace("%d",K):ue(K,c,R.l,w);break}}if(c)return v;var G=w?m.future:m.past;return typeof G=="function"?G(v):G.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)}}})})(Fn);var qr=Fn.exports;const jr=Mt(qr);Ze.extend(jr);function es(e){let t,i,n=[e[3],{title:e[2]},{datetime:e[1]}],r={};for(let s=0;s<n.length;s+=1)r=ct(r,n[s]);return{c(){t=k("time"),i=Q(e[0]),Jt(t,r)},m(s,o){N(s,t,o),y(t,i)},p(s,[o]){o&1&&Wn(i,s[0],r.contenteditable),Jt(t,r=Xn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:q,o:q,d(s){s&&S(t)}}}function ts(e,t,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=Kt(t,r),{timestamp:o=new Date().toISOString()}=t,{format:a="MMM DD, YYYY"}=t,{relative:u=!1}=t,{live:l=!1}=t,{formatted:c=""}=t,d;const f=60*1e3;return mt(()=>()=>clearInterval(d)),e.$$set=h=>{t=ct(ct({},t),xn(h)),i(3,s=Kt(t,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)},e.$$.update=()=>{e.$$.dirty&98&&u&&l!==!1&&(d=setInterval(()=>{i(0,c=Ze(o).from())},Math.abs(typeof l=="number"?l:f))),e.$$.dirty&50&&i(0,c=u?Ze(o).from():Ze(o).format(a)),e.$$.dirty&50&&i(2,n=u?Ze(o).format(a):void 0)},[c,o,n,s,a,u,l]}class ns extends se{constructor(t){super(),re(this,t,ts,es,te,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function is(e){le(e,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function rs(e){let t,i=e[4]("Invalid data")+"",n;return{c(){t=k("span"),n=Q(i),_(t,"class","invalid svelte-1o3wy2t")},m(r,s){N(r,t,s),y(t,n)},p(r,s){s&16&&i!==(i=r[4]("Invalid data")+"")&&ie(n,i)},i:q,o:q,d(r){r&&S(t)}}}function ss(e){let t,i;return t=new ns({props:{style:e[2],timestamp:e[0],format:e[1],relative:e[3]}}),{c(){U(t.$$.fragment)},m(n,r){I(t,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]),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function os(e){let t,i,n,r,s;const o=[ss,rs],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(e,-1),r=a[n]=o[n](e),{c(){t=k("div"),r.c(),_(t,"class","Date svelte-1o3wy2t")},m(l,c){N(l,t,c),a[n].m(t,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(be(),T(a[d],1,1,()=>{a[d]=null}),we(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),b(r,1),r.m(t,null))},i(l){s||(b(r),s=!0)},o(l){T(r),s=!1},d(l){l&&S(t),a[n].d()}}}function as(e,t,i){let n;V(e,Se,u=>i(4,n=u));let{data:r}=t,{format:s=""}=t,{style:o=""}=t,{relative:a=!1}=t;return e.$$set=u=>{"data"in u&&i(0,r=u.data),"format"in u&&i(1,s=u.format),"style"in u&&i(2,o=u.style),"relative"in u&&i(3,a=u.relative)},[r,s,o,a,n]}class Nt extends se{constructor(t){super(),re(this,t,as,os,te,{data:0,format:1,style:2,relative:3},is)}}function ls(e){le(e,"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 us(e){let t,i,n,r;i=new Ce({props:{iconLaClassName:e[2]}});const s=e[8].default,o=Ue(s,e,e[7],null);return{c(){t=k("div"),U(i.$$.fragment),n=W(),o&&o.c(),_(t,"class","IconWrapper svelte-1wdh20c")},m(a,u){N(a,t,u),I(i,t,null),N(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)&&He(o,s,a,a[7],r?We(s,a[7],u,null):Ye(a[7]),null)},i(a){r||(b(i.$$.fragment,a),b(o,a),r=!0)},o(a){T(i.$$.fragment,a),T(o,a),r=!1},d(a){a&&(S(t),S(n)),B(i),o&&o.d(a)}}}function cs(e){let t,i;return t=new yt({props:{style:e[3],text:e[0],iconLaClassName:e[2],className:"Combined"}}),{c(){U(t.$$.fragment)},m(n,r){I(t,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]),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function ds(e){let t,i,n,r,s,o;const a=[cs,us],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(e),n=u[i]=a[i](e),s=new vt({props:{style:e[4],text:e[1]}}),{c(){t=k("div"),n.c(),r=W(),U(s.$$.fragment),_(t,"class",ge(e[5])+" svelte-1wdh20c")},m(c,d){N(c,t,d),u[i].m(t,null),y(t,r),I(s,t,null),o=!0},p(c,[d]){let f=i;i=l(c),i===f?u[i].p(c,d):(be(),T(u[f],1,1,()=>{u[f]=null}),we(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),b(n,1),n.m(t,r));const h={};d&16&&(h.style=c[4]),d&2&&(h.text=c[1]),s.$set(h)},i(c){o||(b(n),b(s.$$.fragment,c),o=!0)},o(c){T(n),T(s.$$.fragment,c),o=!1},d(c){c&&S(t),u[i].d(),B(s)}}}function fs(e,t,i){let{$$slots:n={},$$scope:r}=t,{iconText:s=""}=t,{tagText:o}=t,{iconLaClassName:a}=t,{className:u}=t,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 e.$$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 An extends se{constructor(t){super(),re(this,t,fs,ds,te,{iconText:0,tagText:1,iconLaClassName:2,className:6},ls)}}function gs(e){let t,i;return t=new Nt({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:e[1],relative:!0}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function hs(e){let t,i;return t=new An({props:{iconLaClassName:e[3],tagText:e[0],className:e[2],$$slots:{default:[gs]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(n,r){I(t,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}),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function ms(e,t,i){let n,{tagText:r}=t,{due:s}=t,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return e.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},e.$$.update=()=>{e.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class ps extends se{constructor(t){super(),re(this,t,ms,hs,te,{tagText:0,due:1})}}function _s(e){le(e,"svelte-nbfjry",".TicketId.svelte-nbfjry{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-nbfjry{font-size:13px;line-height:20px}.Communication.svelte-nbfjry{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}.ticketDetails.svelte-nbfjry{display:flex;align-items:center;justify-content:space-between}@media(min-width: 900px){.Changed.svelte-nbfjry{display:none}}")}function vs(e){let t,i;return t=new vt({props:{text:e[3]("No SLA"),className:"SLA"}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.text=n[3]("No SLA")),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function ys(e){let t,i;return t=new ps({props:{tagText:"First answer",due:e[1].datedue}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function bs(e){let t,i,n=e[1].code+"",r,s,o,a,u,l,c,d=e[1].messagegroupsIn+"",f,h,p,v,w,m,D=e[1].messagegroupsOut+"",O,x,R,K,ue=e[3]("Created")+"",G,j,ee,H,pe,ke,z,C=e[3]("Changed")+"",$,F,L,E,J,Z,P,X,oe,ae;u=new Ce({props:{iconLaClassName:"la-incoming"}}),v=new Ce({props:{iconLaClassName:"la-outgoing"}}),H=new Nt({props:{data:e[1].datecreated,format:e[2]}}),E=new Nt({props:{data:e[1].datechanged,format:e[2]}});const $e=[ys,vs],de=[];function De(M,Y){return Y&2&&(Z=null),Z==null&&(Z=M[1].datedue instanceof Date&&!isNaN(M[1].datedue)),Z?0:1}return P=De(e,-1),X=de[P]=$e[P](e),{c(){t=k("div"),i=k("span"),r=Q(n),s=W(),o=k("div"),a=k("div"),U(u.$$.fragment),l=W(),c=k("span"),f=Q(d),h=W(),p=k("div"),U(v.$$.fragment),w=W(),m=k("span"),O=Q(D),x=W(),R=k("div"),K=k("span"),G=Q(ue),j=Q(":"),ee=W(),U(H.$$.fragment),pe=W(),ke=k("div"),z=k("span"),$=Q(C),F=Q(":"),L=W(),U(E.$$.fragment),J=W(),X.c(),oe=rt(),_(i,"class","TicketId svelte-nbfjry"),_(a,"class","Communication incomingMessages svelte-nbfjry"),_(p,"class","Communication outgoingMessages svelte-nbfjry"),_(o,"class","arrows"),_(t,"class","ticketDetails svelte-nbfjry"),_(R,"class","Created svelte-nbfjry"),_(ke,"class","Changed svelte-nbfjry")},m(M,Y){N(M,t,Y),y(t,i),y(i,r),y(t,s),y(t,o),y(o,a),I(u,a,null),y(a,l),y(a,c),y(c,f),y(o,h),y(o,p),I(v,p,null),y(p,w),y(p,m),y(m,O),N(M,x,Y),N(M,R,Y),y(R,K),y(K,G),y(K,j),y(R,ee),I(H,R,null),N(M,pe,Y),N(M,ke,Y),y(ke,z),y(z,$),y(z,F),y(ke,L),I(E,ke,null),N(M,J,Y),de[P].m(M,Y),N(M,oe,Y),ae=!0},p(M,Y){(!ae||Y&2)&&n!==(n=M[1].code+"")&&ie(r,n),(!ae||Y&2)&&d!==(d=M[1].messagegroupsIn+"")&&ie(f,d),(!ae||Y&2)&&D!==(D=M[1].messagegroupsOut+"")&&ie(O,D),(!ae||Y&8)&&ue!==(ue=M[3]("Created")+"")&&ie(G,ue);const he={};Y&2&&(he.data=M[1].datecreated),Y&4&&(he.format=M[2]),H.$set(he),(!ae||Y&8)&&C!==(C=M[3]("Changed")+"")&&ie($,C);const Te={};Y&2&&(Te.data=M[1].datechanged),Y&4&&(Te.format=M[2]),E.$set(Te);let Ne=P;P=De(M,Y),P===Ne?de[P].p(M,Y):(be(),T(de[Ne],1,1,()=>{de[Ne]=null}),we(),X=de[P],X?X.p(M,Y):(X=de[P]=$e[P](M),X.c()),b(X,1),X.m(oe.parentNode,oe))},i(M){ae||(b(u.$$.fragment,M),b(v.$$.fragment,M),b(H.$$.fragment,M),b(E.$$.fragment,M),b(X),ae=!0)},o(M){T(u.$$.fragment,M),T(v.$$.fragment,M),T(H.$$.fragment,M),T(E.$$.fragment,M),T(X),ae=!1},d(M){M&&(S(t),S(x),S(R),S(pe),S(ke),S(J),S(oe)),B(u),B(v),B(H),B(E),de[P].d(M)}}}function ws(e){let t,i;return t=new It({props:{className:e[0],$$slots:{default:[bs]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&30&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function ks(e,t,i){let n;V(e,Se,a=>i(3,n=a));let{className:r="importanceColumn"}=t,{row:s}=t,{format:o="YYYY-MM-DD HH:mm:ss"}=t;return e.$$set=a=>{"className"in a&&i(0,r=a.className),"row"in a&&i(1,s=a.row),"format"in a&&i(2,o=a.format)},[r,s,o,n]}class $s extends se{constructor(t){super(),re(this,t,ks,ws,te,{className:0,row:1,format:2},_s)}}function Ts(e){le(e,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function Cs(e){let t,i;return t=new vt({props:{style:"color: #"+e[2]+"; background: #"+e[1],text:e[0],className:"TicketTag"}}),{c(){U(t.$$.fragment)},m(n,r){I(t,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]),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function Ls(e,t,i){let n,r,s,o;V(e,Cn,u=>i(4,o=u));let{tagId:a}=t;return e.$$set=u=>{"tagId"in u&&i(3,a=u.tagId)},e.$$.update=()=>{var u,l,c;e.$$.dirty&24&&i(2,n=((u=o[a])==null?void 0:u.color)??0),e.$$.dirty&24&&i(1,r=((l=o[a])==null?void 0:l.backgroundcolor)??0),e.$$.dirty&24&&i(0,s=((c=o[a])==null?void 0:c.name)??"")},[s,r,n,a,o]}class Ss extends se{constructor(t){super(),re(this,t,Ls,Cs,te,{tagId:3},Ts)}}function en(e,t,i){const n=e.slice();return n[1]=t[i],n}function tn(e){let t,i;return t=new Ss({props:{tagId:e[1]}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function Ds(e){let t,i,n=Ke(e[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=tn(en(e,n,o));const s=o=>T(r[o],1,1,()=>{r[o]=null});return{c(){t=k("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){N(o,t,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(t,null);i=!0},p(o,[a]){if(a&1){n=Ke(o[0]);let u;for(u=0;u<n.length;u+=1){const l=en(o,n,u);r[u]?(r[u].p(l,a),b(r[u],1)):(r[u]=tn(l),r[u].c(),b(r[u],1),r[u].m(t,null))}for(be(),u=n.length;u<r.length;u+=1)s(u);we()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)b(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&&S(t),Rt(r,o)}}}function Ns(e,t,i){let{tags:n}=t;return e.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class Os extends se{constructor(t){super(),re(this,t,Ns,Ds,te,{tags:0})}}function Rs(e){le(e,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function Fs(e){let t,i;return t=new yt({props:{className:e[1][e[0]].text,style:"color: white; background-color: "+gt(e[0]),text:e[1][e[0]].text,iconLaClassName:e[1][e[0]].icon}}),{c(){U(t.$$.fragment)},m(n,r){I(t,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: "+gt(n[0])),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function As(e,t,i){let n;V(e,Se,o=>i(2,n=o));let{status:r}=t;const s={A:{text:n("Answered"),icon:"la-ticket-answered"},T:{text:n("Chatting"),icon:"la-chatting"},P:{text:n("Calling"),icon:"la-call"},X:{text:n("Deleted"),icon:"la-ticket-deleted"},B:{text:n("Spam"),icon:"la-spam"},I:{text:n("Init"),icon:""},R:{text:n("Resolved"),icon:"la-ticket-resolved"},N:{text:n("New"),icon:"la-ticket-new"},C:{text:n("Open"),icon:"la-ticket-open"},W:{text:n("Postponed"),icon:"la-ticket-postponed"}};return e.$$set=o=>{"status"in o&&i(0,r=o.status)},[r,s]}class Gs extends se{constructor(t){super(),re(this,t,As,Fs,te,{status:0},Rs)}}function zs(e){le(e,"svelte-nfaksv",".subject.svelte-nfaksv{font-size:13px;font-weight:bold;line-height:20px;margin:0}.preview.svelte-nfaksv{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:5px;margin:0;line-height:20px;font-size:13px}.additional.svelte-nfaksv{display:flex}")}function Es(e){let t,i;return t=new yt({props:{className:"Department",text:e[0].departmentname,iconLaClassName:"la-department"}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function xs(e){let t,i;return t=new An({props:{className:"Department",tagText:e[0].agentname,iconLaClassName:"la-department",iconText:e[0].departmentname}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function Ms(e){let t,i=e[0].subject+"",n,r,s,o=e[0].preview+"",a,u,l,c,d,f,h,p,v,w,m;c=new Gs({props:{status:e[0].status}});const D=[xs,Es],O=[];function x(R,K){return K&1&&(f=null),f==null&&(f=R[0].agentname.trim()!==""),f?0:1}return h=x(e,-1),p=O[h]=D[h](e),w=new Os({props:{tags:e[0].tags}}),{c(){t=k("h1"),n=Q(i),r=W(),s=k("p"),a=Q(o),u=W(),l=k("div"),U(c.$$.fragment),d=W(),p.c(),v=W(),U(w.$$.fragment),_(t,"class","subject svelte-nfaksv"),_(s,"class","preview svelte-nfaksv"),_(l,"class","additional svelte-nfaksv")},m(R,K){N(R,t,K),y(t,n),N(R,r,K),N(R,s,K),y(s,a),N(R,u,K),N(R,l,K),I(c,l,null),y(l,d),O[h].m(l,null),y(l,v),I(w,l,null),m=!0},p(R,K){(!m||K&1)&&i!==(i=R[0].subject+"")&&ie(n,i),(!m||K&1)&&o!==(o=R[0].preview+"")&&ie(a,o);const ue={};K&1&&(ue.status=R[0].status),c.$set(ue);let G=h;h=x(R,K),h===G?O[h].p(R,K):(be(),T(O[G],1,1,()=>{O[G]=null}),we(),p=O[h],p?p.p(R,K):(p=O[h]=D[h](R),p.c()),b(p,1),p.m(l,v));const j={};K&1&&(j.tags=R[0].tags),w.$set(j)},i(R){m||(b(c.$$.fragment,R),b(p),b(w.$$.fragment,R),m=!0)},o(R){T(c.$$.fragment,R),T(p),T(w.$$.fragment,R),m=!1},d(R){R&&(S(t),S(r),S(s),S(u),S(l)),B(c),O[h].d(),B(w)}}}function Is(e){let t,i;return t=new It({props:{className:e[1],$$slots:{default:[Ms]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function Bs(e,t,i){let{row:n}=t,{className:r="statusColumn"}=t;return e.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class Ks extends se{constructor(t){super(),re(this,t,Bs,Is,te,{row:0,className:1},zs)}}function Js(e){le(e,"svelte-76dgfl",`.Row.svelte-76dgfl.svelte-76dgfl{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
9
9
  "checkbox status"
10
- "checkbox importance";border-radius:12px;box-shadow:0 0 5px 2px rgb(0 0 0 / 0.2);padding-top:6px;padding-bottom:6px}.Row.svelte-8pmpj5:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-8pmpj5{background-color:var(--menu-selected-bg) !important}.UserColumn.svelte-8pmpj5{grid-area:user}.StatusColumn.svelte-8pmpj5{grid-area:status;display:flex;flex-direction:column;justify-content:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ImportanceColumn.svelte-8pmpj5{grid-area:importance}.Checkbox.svelte-8pmpj5{grid-area:checkbox;position:relative}.StatusBar.svelte-8pmpj5{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px}input.svelte-8pmpj5{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(min-width: 768px){.Row.svelte-8pmpj5{display:grid;grid-template-areas:"checkbox user importance"
11
- "checkbox status importance";grid-template-columns:60px 3fr 1fr;height:110px;padding-bottom:5px;padding-top:5px}}@media(min-width: 900px){.Row.svelte-8pmpj5{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 170px auto 190px;height:80px}}@media(min-width: 1300px){.Row.svelte-8pmpj5{grid-template-columns:60px 260px auto 230px}}`)}function Pt(e,t,i){const n=e.slice();return n[8]=t[i],n[9]=t,n[10]=i,n}function Vt(e){let t,i,n,r,s,o,a,u,l,c,f,d,g,m,_,v,N,x,A;function F(){e[5].call(s,e[10])}l=new ar({props:{row:e[8]}}),d=new qr({props:{row:e[8]}}),_=new Mr({props:{row:e[8]}});function b(){return e[6](e[8])}function z(...U){return e[7](e[8],...U)}return{c(){t=S("div"),i=S("div"),n=S("div"),r=P(),s=S("input"),a=P(),u=S("div"),H(l.$$.fragment),c=P(),f=S("div"),H(d.$$.fragment),g=P(),m=S("div"),H(_.$$.fragment),y(n,"class","StatusBar svelte-8pmpj5"),pt(n,"background-color",ut(e[8].status)),y(s,"type","checkbox"),s.__value=o=e[8].conversationid,It(s,s.__value),y(s,"class","svelte-8pmpj5"),y(i,"class","Checkbox svelte-8pmpj5"),pt(i,"position","relative"),y(u,"class","UserColumn svelte-8pmpj5"),y(f,"class","StatusColumn svelte-8pmpj5"),y(m,"class","ImportanceColumn svelte-8pmpj5"),y(t,"class",v="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-8pmpj5")},m(U,M){R(U,t,M),C(t,i),C(i,n),C(i,r),C(i,s),s.checked=e[2][e[10]].__selected,C(t,a),C(t,u),K(l,u,null),C(t,c),C(t,f),K(d,f,null),C(t,g),C(t,m),K(_,m,null),N=!0,x||(A=[le(s,"change",F),le(s,"click",bt(ts)),le(i,"click",bt(ns)),le(t,"click",b),le(t,"mousedown",z)],x=!0)},p(U,M){e=U,(!N||M&4)&&pt(n,"background-color",ut(e[8].status)),(!N||M&4&&o!==(o=e[8].conversationid))&&(s.__value=o,It(s,s.__value)),M&4&&(s.checked=e[2][e[10]].__selected);const B={};M&4&&(B.row=e[8]),l.$set(B);const I={};M&4&&(I.row=e[8]),d.$set(I);const T={};M&4&&(T.row=e[8]),_.$set(T),(!N||M&4&&v!==(v="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-8pmpj5"))&&y(t,"class",v)},i(U){N||(k(l.$$.fragment,U),k(d.$$.fragment,U),k(_.$$.fragment,U),N=!0)},o(U){$(l.$$.fragment,U),$(d.$$.fragment,U),$(_.$$.fragment,U),N=!1},d(U){U&&O(t),J(l),J(d),J(_),x=!1,be(A)}}}function es(e){let t,i,n,r=Ee(e[2]),s=[];for(let l=0;l<r.length;l+=1)s[l]=Vt(Pt(e,r,l));const o=l=>$(s[l],1,1,()=>{s[l]=null}),a=e[4].default,u=Ie(a,e,e[3],null);return{c(){t=S("div");for(let l=0;l<s.length;l+=1)s[l].c();i=P(),u&&u.c(),y(t,"class","Body")},m(l,c){R(l,t,c);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(t,null);C(t,i),u&&u.m(t,null),n=!0},p(l,[c]){if(c&6){r=Ee(l[2]);let f;for(f=0;f<r.length;f+=1){const d=Pt(l,r,f);s[f]?(s[f].p(d,c),k(s[f],1)):(s[f]=Vt(d),s[f].c(),k(s[f],1),s[f].m(t,i))}for(ge(),f=r.length;f<s.length;f+=1)o(f);he()}u&&u.p&&(!n||c&8)&&Be(u,a,l,l[3],n?xe(a,l[3],c,null):Ke(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)k(s[c]);k(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&&O(t),St(s,l),u&&u.d(l)}}}const ts=()=>{},ns=()=>{};function is(e,t,i){let n,r=V,s=()=>(r(),r=Oe(u,g=>i(2,n=g)),u);e.$$.on_destroy.push(()=>r());let{$$slots:o={},$$scope:a}=t,{data:u}=t;s();let{middleclickhandler:l}=t;function c(g){n[g].__selected=this.checked,u.set(n)}const f=g=>location.assign("#Conversation;id="+g.conversationid),d=(g,m)=>{m.button===1&&l&&(l(g.conversationid),m.preventDefault(),m.stopPropagation())};return e.$$set=g=>{"data"in g&&s(i(0,u=g.data)),"middleclickhandler"in g&&i(1,l=g.middleclickhandler),"$$scope"in g&&i(3,a=g.$$scope)},[u,l,n,a,o,c,f,d]}class rs extends ne{constructor(t){super(),te(this,t,is,es,Z,{data:0,middleclickhandler:1},jr)}}function ss(e){re(e,"svelte-7bt636","div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function os(e){let t,i,n;return{c(){t=S("div"),i=S("p"),n=ee(e[0]),y(t,"class","svelte-7bt636")},m(r,s){R(r,t,s),C(t,i),C(i,n)},p(r,[s]){s&1&&ie(n,r[0])},i:V,o:V,d(r){r&&O(t)}}}function as(e,t,i){let n,r,s,o,a;j(e,ke,m=>i(8,o=m));let u,l=ve("loading");j(e,l,m=>i(7,s=m));let c=ve("cursor");j(e,c,m=>i(6,r=m));let f=ve("data");j(e,f,m=>i(5,n=m));let d=ve("error");j(e,d,m=>i(9,a=m));function g(m,_,v){return a?o("Loading failed. Please try again later."):m?o("Loading..."):_==null?v.length===0?o("No results match your filter. Try broadening the search criteria."):o("All data loaded"):o("Load more data")}return e.$$.update=()=>{e.$$.dirty&224&&i(0,u=g(s,r,n))},[u,l,c,f,d,n,r,s]}class ls extends ne{constructor(t){super(),te(this,t,as,os,Z,{},ss)}}function us(e){re(e,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function cs(e){let t,i,n,r,s;const o=e[4].default,a=Ie(o,e,e[3],null);return{c(){t=S("button"),a&&a.c(),y(t,"class",i=Te(e[0])+" svelte-10fvxzv")},m(u,l){R(u,t,l),a&&a.m(t,null),n=!0,r||(s=le(t,"click",e[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&Be(a,o,u,u[3],n?xe(o,u[3],l,null):Ke(u[3]),null),(!n||l&1&&i!==(i=Te(u[0])+" svelte-10fvxzv"))&&y(t,"class",i)},i(u){n||(k(a,u),n=!0)},o(u){$(a,u),n=!1},d(u){u&&O(t),a&&a.d(u),r=!1,s()}}}function fs(e,t,i){let{$$slots:n={},$$scope:r}=t,{onAction:s=()=>{}}=t,{className:o=""}=t;function a(){s()}return e.$$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 Lt extends ne{constructor(t){super(),te(this,t,fs,cs,Z,{onAction:2,className:0},us)}}function ds(e){re(e,"svelte-1tadows","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}.Title.svelte-1tadows{font-size:13px;font-style:normal;font-weight:700;line-height:20px;margin:4px 0 8px 10px;font-family:'Roboto', sans-serif}.modal.svelte-1tadows{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);min-width:200px;display:flex;flex-direction:column;align-items:flex-start;padding:4px;background-color:white;border-radius:6px;overflow:hidden;z-index:110;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.12), 0px 8px 24px 0px rgba(30, 34, 39, 0.10)}")}function Qt(e,t,i){const n=e.slice();return n[7]=t[i],n}function gs(e){let t=e[7].label+"",i,n;return{c(){i=ee(t),n=P()},m(r,s){R(r,i,s),R(r,n,s)},p:V,d(r){r&&(O(i),O(n))}}}function Zt(e){let t,i;function n(){return e[5](e[7])}return t=new Lt({props:{className:e[0]===e[7].value?"SortingButton Selected":"SortingButton",onAction:n,$$slots:{default:[gs]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(r,s){K(t,r,s),i=!0},p(r,s){e=r;const o={};s&1&&(o.className=e[0]===e[7].value?"SortingButton Selected":"SortingButton"),s&1024&&(o.$$scope={dirty:s,ctx:e}),t.$set(o)},i(r){i||(k(t.$$.fragment,r),i=!0)},o(r){$(t.$$.fragment,r),i=!1},d(r){J(t,r)}}}function hs(e){let t,i,n=e[1]("Sort by")+"",r,s,o,a=Ee(e[2]),u=[];for(let c=0;c<a.length;c+=1)u[c]=Zt(Qt(e,a,c));const l=c=>$(u[c],1,1,()=>{u[c]=null});return{c(){t=S("div"),i=S("span"),r=ee(n),s=P();for(let c=0;c<u.length;c+=1)u[c].c();y(i,"class","Title svelte-1tadows"),y(t,"class","modal svelte-1tadows")},m(c,f){R(c,t,f),C(t,i),C(i,r),C(t,s);for(let d=0;d<u.length;d+=1)u[d]&&u[d].m(t,null);o=!0},p(c,[f]){if((!o||f&2)&&n!==(n=c[1]("Sort by")+"")&&ie(r,n),f&13){a=Ee(c[2]);let d;for(d=0;d<a.length;d+=1){const g=Qt(c,a,d);u[d]?(u[d].p(g,f),k(u[d],1)):(u[d]=Zt(g),u[d].c(),k(u[d],1),u[d].m(t,null))}for(ge(),d=a.length;d<u.length;d+=1)l(d);he()}},i(c){if(!o){for(let f=0;f<a.length;f+=1)k(u[f]);o=!0}},o(c){u=u.filter(Boolean);for(let f=0;f<u.length;f+=1)$(u[f]);o=!1},d(c){c&&O(t),St(u,c)}}}function ms(e,t,i){let n;j(e,ke,c=>i(1,n=c));let{currentValue:r="importance"}=t,{closeModal:s=()=>{}}=t;const o=ln(),a=[{value:"importance",label:n("Importance")},{value:"created-newest",label:n("Date created - Newest")},{value:"created-oldest",label:n("Date created - Oldest")},{value:"changed-newest",label:n("Date changed - Newest")},{value:"changed-oldest",label:n("Date changed - Oldest")}];function u(c){i(0,r=c),o("change",{value:c}),s()}const l=c=>u(c.value);return e.$$set=c=>{"currentValue"in c&&i(0,r=c.currentValue),"closeModal"in c&&i(4,s=c.closeModal)},[r,n,a,u,s,l]}class ps extends ne{constructor(t){super(),te(this,t,ms,hs,Z,{currentValue:0,closeModal:4},ds)}}function _s(e){re(e,"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 vs(e){let t,i,n;return{c(){t=S("div"),y(t,"class","backdrop svelte-657q9o")},m(r,s){R(r,t,s),i||(n=le(t,"click",bt(function(){ct(e[0])&&e[0].apply(this,arguments)})),i=!0)},p(r,[s]){e=r},i:V,o:V,d(r){r&&O(t),i=!1,n()}}}function ys(e,t,i){let{onClick:n}=t;return e.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class bs extends ne{constructor(t){super(),te(this,t,ys,vs,Z,{onClick:0},_s)}}function ks(e){re(e,"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 ws(e){let t,i,n,r,s,o;return n=new ls({}),{c(){t=S("div"),i=S("div"),H(n.$$.fragment),y(i,"class","load svelte-1fwehqj"),y(t,"class","load svelte-1fwehqj")},m(a,u){R(a,t,u),C(t,i),K(n,i,null),e[13](i),r=!0,s||(o=le(i,"click",e[14]),s=!0)},p:V,i(a){r||(k(n.$$.fragment,a),r=!0)},o(a){$(n.$$.fragment,a),r=!1},d(a){a&&O(t),J(n),e[13](null),s=!1,o()}}}function Xt(e){let t,i,n,r;return t=new ps({props:{closeModal:e[11]}}),t.$on("change",Ts),n=new bs({props:{onClick:e[11]}}),{c(){H(t.$$.fragment),i=P(),H(n.$$.fragment)},m(s,o){K(t,s,o),R(s,i,o),K(n,s,o),r=!0},p:V,i(s){r||(k(t.$$.fragment,s),k(n.$$.fragment,s),r=!0)},o(s){$(t.$$.fragment,s),$(n.$$.fragment,s),r=!1},d(s){s&&O(i),J(t,s),J(n,s)}}}function $s(e){let t,i,n,r,s,o;i=new Ai({props:{direction:e[3],data:e[0],filters:e[6]}}),i.$on("openModal",e[12]),r=new rs({props:{data:e[0],middleclickhandler:e[2],$$slots:{default:[ws]},$$scope:{ctx:e}}});let a=e[9]&&Xt(e);return{c(){t=S("div"),H(i.$$.fragment),n=P(),H(r.$$.fragment),s=P(),a&&a.c(),y(t,"class","container svelte-1fwehqj")},m(u,l){R(u,t,l),K(i,t,null),C(t,n),K(r,t,null),C(t,s),a&&a.m(t,null),e[15](t),o=!0},p(u,[l]){const c={};l&8&&(c.direction=u[3]),l&1&&(c.data=u[0]),l&64&&(c.filters=u[6]),i.$set(c);const f={};l&1&&(f.data=u[0]),l&4&&(f.middleclickhandler=u[2]),l&66706&&(f.$$scope={dirty:l,ctx:u}),r.$set(f),u[9]?a?(a.p(u,l),l&512&&k(a,1)):(a=Xt(u),a.c(),k(a,1),a.m(t,null)):a&&(ge(),$(a,1,1,()=>{a=null}),he())},i(u){o||(k(i.$$.fragment,u),k(r.$$.fragment,u),k(a),o=!0)},o(u){$(i.$$.fragment,u),$(r.$$.fragment,u),$(a),o=!1},d(u){u&&O(t),J(i),J(r),a&&a.d(),e[15](null)}}}function Ts(e){let t=e.detail.value;console.log(t)}function Cs(e,t,i){let n,r=V,s=()=>(r(),r=Oe(f,b=>i(10,n=b)),f);e.$$.on_destroy.push(()=>r());let{data:o}=t,{loadMore:a}=t,{middleclickhandler:u}=t,{direction:l}=t,{loaded:c}=t,{cursor:f}=t;s();let{filters:d}=t,g,m,_=!1;function v(){i(9,_=!_)}function N(){i(9,_=!0)}an(()=>{const b=new IntersectionObserver(z=>{z[0].isIntersecting&&a(!1)},{root:m,threshold:.5});return b.observe(g),()=>b.unobserve(g)});function x(b){qe[b?"unshift":"push"](()=>{g=b,i(7,g)})}const A=()=>a(c&&!n);function F(b){qe[b?"unshift":"push"](()=>{m=b,i(8,m)})}return e.$$set=b=>{"data"in b&&i(0,o=b.data),"loadMore"in b&&i(1,a=b.loadMore),"middleclickhandler"in b&&i(2,u=b.middleclickhandler),"direction"in b&&i(3,l=b.direction),"loaded"in b&&i(4,c=b.loaded),"cursor"in b&&s(i(5,f=b.cursor)),"filters"in b&&i(6,d=b.filters)},[o,a,u,l,c,f,d,g,m,_,n,v,N,x,A,F]}class Ls extends ne{constructor(t){super(),te(this,t,Cs,$s,Z,{data:0,loadMore:1,middleclickhandler:2,direction:3,loaded:4,cursor:5,filters:6},ks)}}var Ge=globalThis&&globalThis.__awaiter||function(e,t,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(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(e,t||[])).next())})};const Ss="https://localhost/api/v3".replace(/\/+$/,"");class Mt{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Ss}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||bn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:()=>Ge(this,void 0,void 0,function*(){return t})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const Ns=new Mt;class mt{constructor(t=Ns){this.configuration=t,this.fetchApi=(i,n)=>Ge(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 As(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=t.middleware}withMiddleware(...t){const i=this.clone();return i.middleware=i.middleware.concat(...t),i}withPreMiddleware(...t){const i=t.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...t){const i=t.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(t){return t?mt.jsonRegex.test(t):!1}request(t,i){return Ge(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(t,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new Rs(s,"Response returned an error code")})}createFetchParams(t,i){return Ge(this,void 0,void 0,function*(){let n=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(t.query));const r=Object.assign({},this.configuration.headers,t.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof i=="function"?i:()=>Ge(this,void 0,void 0,function*(){return i}),o={method:t.method,headers:r,body:t.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:t})),u=Object.assign(Object.assign({},a),{body:Os(a.body)||a.body instanceof URLSearchParams||Ds(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const t=this.constructor,i=new t(this.configuration);return i.middleware=this.middleware.slice(),i}}mt.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function Ds(e){return typeof Blob<"u"&&e instanceof Blob}function Os(e){return typeof FormData<"u"&&e instanceof FormData}class Rs extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class As extends Error{constructor(t,i){super(i),this.cause=t,this.name="FetchError"}}class qt extends Error{constructor(t,i){super(i),this.field=t,this.name="RequiredError"}}function h(e,t){const i=e[t];return i!=null}function bn(e,t=""){return Object.keys(e).map(i=>kn(i,e[i],t)).filter(i=>i.length>0).join("&")}function kn(e,t,i=""){const n=i+(i.length?`[${e}]`:e);if(t instanceof Array){const r=t.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(t instanceof Set){const r=Array.from(t);return kn(e,r,i)}return t instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?bn(t,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(t))}`}class X{constructor(t,i=n=>n){this.raw=t,this.transformer=i}value(){return Ge(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function Fs(e){return Ms(e)}function Ms(e,t){return e==null?e:{departmentid:h(e,"departmentid")?e.departmentid:void 0,onlineStatus:h(e,"online_status")?e.online_status:void 0,presetStatus:h(e,"preset_status")?e.preset_status:void 0}}function Gs(e){return zs(e)}function zs(e,t){return e==null?e:{agentid:h(e,"agentid")?e.agentid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,username:h(e,"username")?e.username:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,roleid:h(e,"roleid")?e.roleid:void 0,departmentsStatuses:h(e,"departments_statuses")?e.departments_statuses.map(Fs):void 0,twofa:h(e,"twofa")?e.twofa:void 0,lastPswdChange:h(e,"last_pswd_change")?new Date(e.last_pswd_change):void 0,userstatus:h(e,"userstatus")?e.userstatus:void 0}}function Es(e){return Is(e)}function Is(e,t){return e==null?e:{conversationid:h(e,"conversationid")?e.conversationid:void 0,datechanged:h(e,"datechanged")?new Date(e.datechanged):void 0,status:h(e,"status")?e.status:void 0,preview:h(e,"preview")?e.preview:void 0,subject:h(e,"subject")?e.subject:void 0,departmentname:h(e,"departmentname")?e.departmentname:void 0,agentname:h(e,"agentname")?e.agentname:void 0,tags:h(e,"tags")?e.tags:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,emails:h(e,"emails")?e.emails:void 0,city:h(e,"city")?e.city:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,rstatus:h(e,"rstatus")?e.rstatus:void 0,statusdatestarted:h(e,"statusdatestarted")?new Date(e.statusdatestarted):void 0,chatOrder:h(e,"chat_order")?e.chat_order:void 0}}function xs(e){return Bs(e)}function Bs(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,name:h(e,"name")?e.name:void 0,type:h(e,"type")?e.type:void 0,onlineCode:h(e,"online_code")?e.online_code:void 0,offlineCode:h(e,"offline_code")?e.offline_code:void 0,onlineCodeCss:h(e,"online_code_css")?e.online_code_css:void 0,offlineCodeCss:h(e,"offline_code_css")?e.offline_code_css:void 0,provide:h(e,"provide")?e.provide:void 0,impressions:h(e,"impressions")?e.impressions:void 0,tickets:h(e,"tickets")?e.tickets:void 0,status:h(e,"status")?e.status:void 0,lastDisplayTime:h(e,"last_display_time")?e.last_display_time:void 0,lastDisplayUrl:h(e,"last_display_url")?e.last_display_url:void 0}}function pe(e){return Ks(e)}function Ks(e,t){return e==null?e:{count:h(e,"count")?e.count:void 0}}function Js(e){return Us(e)}function Us(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,name:h(e,"name")?e.name:void 0,agentCount:h(e,"agent_count")?e.agent_count:void 0}}function Ws(e){return Hs(e)}function Hs(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,logid:h(e,"logid")?e.logid:void 0,line:h(e,"line")?e.line:void 0,filename:h(e,"filename")?e.filename:void 0,created:h(e,"created")?e.created:void 0,level:h(e,"level")?e.level:void 0,type:h(e,"type")?e.type:void 0,message:h(e,"message")?e.message:void 0,ip:h(e,"ip")?e.ip:void 0,groupid:h(e,"groupid")?e.groupid:void 0}}function Ys(e){return Ps(e)}function Ps(e,t){return e==null?e:{agentid:h(e,"agentid")?e.agentid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,chats:h(e,"chats")?e.chats:void 0}}function Vs(e){return Qs(e)}function Qs(e,t){return e==null?e:{name:h(e,"name")?e.name:void 0,code:h(e,"code")?e.code:void 0,engName:h(e,"eng_name")?e.eng_name:void 0,translated:h(e,"translated")?e.translated:void 0,isDefault:h(e,"is_default")?e.is_default:void 0,active:h(e,"active")?e.active:void 0,isCustom:h(e,"is_custom")?e.is_custom:void 0,isBuiltIn:h(e,"is_builtIn")?e.is_builtIn:void 0}}function Zs(e){return Xs(e)}function Xs(e,t){return e==null?e:{codeName:h(e,"code_name")?e.code_name:void 0,name:h(e,"name")?e.name:void 0,description:h(e,"description")?e.description:void 0,active:h(e,"active")?e.active:void 0,help:h(e,"help")?e.help:void 0,multiple:h(e,"multiple")?e.multiple:void 0,configFile:h(e,"config_file")?e.config_file:void 0,price:h(e,"price")?e.price:void 0,legacyIntegration:h(e,"legacy_integration")?e.legacy_integration:void 0}}function vt(e){return qs(e)}function qs(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,conversationid:h(e,"conversationid")?e.conversationid:void 0,code:h(e,"code")?e.code:void 0,slaTicketId:h(e,"sla_ticket_id")?e.sla_ticket_id:void 0,departmentid:h(e,"departmentid")?e.departmentid:void 0,departmentName:h(e,"department_name")?e.department_name:void 0,levelid:h(e,"levelid")?e.levelid:void 0,slaLevelName:h(e,"sla_level_name")?e.sla_level_name:void 0,sla:h(e,"sla")?e.sla:void 0,dateCreated:h(e,"date_created")?e.date_created:void 0,dateClosed:h(e,"date_closed")?e.date_closed:void 0,dateDue:h(e,"date_due")?e.date_due:void 0,slaLevelId:h(e,"sla_level_id")?e.sla_level_id:void 0,slaType:h(e,"sla_type")?new Date(e.sla_type):void 0,agentid:h(e,"agentid")?e.agentid:void 0,agentFirstname:h(e,"agent_firstname")?e.agent_firstname:void 0,agentLastname:h(e,"agent_lastname")?e.agent_lastname:void 0,agentAvatarUrl:h(e,"agent_avatar_url")?e.agent_avatar_url:void 0,reqContactid:h(e,"req_contactid")?e.req_contactid:void 0,reqFirstname:h(e,"req_firstname")?e.req_firstname:void 0,reqLastname:h(e,"req_lastname")?e.req_lastname:void 0,reqSystemname:h(e,"req_systemname")?e.req_systemname:void 0,reqContactName:h(e,"req_contactName")?e.req_contactName:void 0,reqAvatarUrl:h(e,"req_avatar_url")?e.req_avatar_url:void 0}}function jt(e){return js(e)}function js(e,t){return e==null?e:{tagid:h(e,"tagid")?e.tagid:void 0,name:h(e,"name")?e.name:void 0,type:h(e,"type")?e.type:void 0,color:h(e,"color")?e.color:void 0,backgroundcolor:h(e,"backgroundcolor")?e.backgroundcolor:void 0,isPublic:h(e,"is_public")?e.is_public:void 0}}function wn(e){return eo(e)}function eo(e,t){return e==null?e:{conversationid:h(e,"conversationid")?e.conversationid:void 0,code:h(e,"code")?e.code:void 0,datecreated:h(e,"datecreated")?new Date(e.datecreated):void 0,datechanged:h(e,"datechanged")?new Date(e.datechanged):void 0,dateresolved:h(e,"dateresolved")?new Date(e.dateresolved):void 0,statuschanged:h(e,"statuschanged")?new Date(e.statuschanged):void 0,rorder:h(e,"rorder")?e.rorder:void 0,datedue:h(e,"datedue")?new Date(e.datedue):void 0,datereopen:h(e,"datereopen")?new Date(e.datereopen):void 0,status:h(e,"status")?e.status:void 0,channelType:h(e,"channel_type")?e.channel_type:void 0,departmentid:h(e,"departmentid")?e.departmentid:void 0,agentid:h(e,"agentid")?e.agentid:void 0,preview:h(e,"preview")?e.preview:void 0,subject:h(e,"subject")?e.subject:void 0,departmentname:h(e,"departmentname")?e.departmentname:void 0,agentname:h(e,"agentname")?e.agentname:void 0,tags:h(e,"tags")?e.tags:void 0,messagegroupsIn:h(e,"messagegroups_in")?e.messagegroups_in:void 0,messagegroupsOut:h(e,"messagegroups_out")?e.messagegroups_out:void 0,contactid:h(e,"contactid")?e.contactid:void 0,parentContactid:h(e,"parent_contactid")?e.parent_contactid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,emails:h(e,"emails")?e.emails:void 0,phones:h(e,"phones")?e.phones:void 0,jobPosition:h(e,"job_position")?e.job_position:void 0,contactType:h(e,"contact_type")?e.contact_type:void 0,city:h(e,"city")?e.city:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,timeOffset:h(e,"time_offset")?e.time_offset:void 0,gender:h(e,"gender")?e.gender:void 0,levelid:h(e,"levelid")?e.levelid:void 0,groups:h(e,"groups")?e.groups:void 0,contactStatus:h(e,"contact_status")?e.contact_status:void 0,company:h(e,"company")?e.company:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,userid:h(e,"userid")?e.userid:void 0,roleid:h(e,"roleid")?e.roleid:void 0,userstatus:h(e,"userstatus")?e.userstatus:void 0,accountuserstatus:h(e,"accountuserstatus")?e.accountuserstatus:void 0,description:h(e,"description")?e.description:void 0,note:h(e,"note")?e.note:void 0,lastActivity:h(e,"last_activity")?new Date(e.last_activity):void 0,tagnames:h(e,"tagnames")?e.tagnames:void 0,groupnames:h(e,"groupnames")?e.groupnames:void 0}}function to(e){return no(e)}function no(e,t){return e==null?e:{cursor:h(e,"cursor")?e.cursor:void 0,rows:h(e,"rows")?e.rows.map(wn):void 0}}function io(e){return ro(e)}function ro(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,agentid:h(e,"agentid")?e.agentid:void 0,agent:h(e,"agent")?e.agent:void 0,conversationid:h(e,"conversationid")?e.conversationid:void 0,ticket:h(e,"ticket")?e.ticket:void 0,parentContactid:h(e,"parent_contactid")?e.parent_contactid:void 0,company:h(e,"company")?e.company:void 0,contactid:h(e,"contactid")?e.contactid:void 0,customer:h(e,"customer")?e.customer:void 0,customerFirstname:h(e,"customer_firstname")?e.customer_firstname:void 0,customerLastname:h(e,"customer_lastname")?e.customer_lastname:void 0,customerSystemname:h(e,"customer_systemname")?e.customer_systemname:void 0,agentTicket:h(e,"agent_ticket")?e.agent_ticket:void 0,reportdate:h(e,"reportdate")?e.reportdate:void 0,reportedtime:h(e,"reportedtime")?e.reportedtime:void 0,reportedtimeHhmmss:h(e,"reportedtime_hhmmss")?e.reportedtime_hhmmss:void 0,spenttime:h(e,"spenttime")?e.spenttime:void 0,dateinvoiced:h(e,"dateinvoiced")?e.dateinvoiced:void 0,note:h(e,"note")?e.note:void 0,type:h(e,"type")?e.type:void 0}}var G=globalThis&&globalThis.__awaiter||function(e,t,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(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(e,t||[])).next())})};class $n extends mt{getAgentsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 X(s,o=>o.map(Gs))})}getAgentsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(t,i)).value()})}getAgentsGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getAgentsGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(t,i)).value()})}getCallsSlaLogGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(vt))})}getCallsSlaLogGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(t,i)).value()})}getCallsSlaLogGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getCallsSlaLogGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(t,i)).value()})}getChatsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(Es))})}getChatsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(t,i)).value()})}getChatsGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getChatsGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(t,i)).value()})}getChatsSlaLogGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(vt))})}getChatsSlaLogGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(t,i)).value()})}getChatsSlaLogGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getChatsSlaLogGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(t,i)).value()})}getContactWidgetsCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getContactWidgetsCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(t,i)).value()})}getContactWidgetsListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.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 X(s,o=>o.map(xs))})}getContactWidgetsList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(t,i)).value()})}getCustomerGroupsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.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 X(s,o=>o.map(jt))})}getCustomerGroupsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(t,i)).value()})}getDepartmensGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getDepartmensGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(t,i)).value()})}getDepartmentsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 X(s,o=>o.map(Js))})}getDepartmentsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(t,i)).value()})}getEventLogsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(Ws))})}getEventLogsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(t,i)).value()})}getEventLogsGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getEventLogsGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(t,i)).value()})}getInviteAgentsGridListRaw(t,i){return G(this,void 0,void 0,function*(){if(t.departmentId===null||t.departmentId===void 0)throw new qt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.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(t.departmentId))),method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(Ys))})}getInviteAgentsGridList(t,i){return G(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(t,i)).value()})}getLanguagesGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.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 X(s,o=>o.map(Vs))})}getLanguagesGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(t,i)).value()})}getLanguagesGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getLanguagesGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(t,i)).value()})}getPlugindGridListRaw(t,i){return G(this,void 0,void 0,function*(){if(t.pluginPurpose===null||t.pluginPurpose===void 0)throw new qt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.pluginPurpose!==void 0&&(n.pluginPurpose=t.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 X(s,o=>o.map(Zs))})}getPlugindGridList(t,i){return G(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(t,i)).value()})}getTagsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.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 X(s,o=>o.map(jt))})}getTagsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(t,i)).value()})}getTicketsGridDatasetRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>to(o))})}getTicketsGridDataset(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(t,i)).value()})}getTicketsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(wn))})}getTicketsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(t,i)).value()})}getTicketsGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>pe(o))})}getTicketsGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(t,i)).value()})}getTicketsSlaLogGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.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 X(s,o=>o.map(vt))})}getTicketsSlaLogGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(t,i)).value()})}getTicketsSlaLogGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getTicketsSlaLogGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(t,i)).value()})}getTimeReportsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.sortField!==void 0&&(n._sortField=t.sortField),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.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 X(s,o=>o.map(io))})}getTimeReportsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(t,i)).value()})}getTimeReportsGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.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 X(s,o=>pe(o))})}getTimeReportsGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(t,i)).value()})}}const en={Asc:"ASC",Desc:"DESC"},so={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"};class oo{constructor(t,i){const n=new Mt({apiKey:t,basePath:i+"/api/v3"});this.api=new $n(n),this.tags=ce({})}async load(){let t=await this.api.getTagsGridList();t=t.reduce((i,n)=>(i[n.tagid]=n,i),{}),this.tags.set(t)}}function ao(e){re(e,"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 lo(e){let t,i,n=e[0]("Change filter")+"",r,s;return t=new ye({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){H(t.$$.fragment),i=P(),r=ee(n)},m(o,a){K(t,o,a),R(o,i,a),R(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Change filter")+"")&&ie(r,n)},i(o){s||(k(t.$$.fragment,o),s=!0)},o(o){$(t.$$.fragment,o),s=!1},d(o){o&&(O(i),O(r)),J(t,o)}}}function uo(e){let t,i,n=e[0]("Configure chat button")+"",r,s;return t=new ye({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){H(t.$$.fragment),i=P(),r=ee(n)},m(o,a){K(t,o,a),R(o,i,a),R(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Configure chat button")+"")&&ie(r,n)},i(o){s||(k(t.$$.fragment,o),s=!0)},o(o){$(t.$$.fragment,o),s=!1},d(o){o&&(O(i),O(r)),J(t,o)}}}function co(e){let t,i,n,r,s,o=e[0]("No tickets found")+"",a,u,l,c=e[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"",f,d,g,m,_,v,N;return m=new Lt({props:{className:"Filter",$$slots:{default:[lo]},$$scope:{ctx:e}}}),v=new Lt({props:{className:"Configure",$$slots:{default:[uo]},$$scope:{ctx:e}}}),{c(){t=S("div"),i=S("img"),r=P(),s=S("h1"),a=ee(o),u=P(),l=S("p"),f=ee(c),d=P(),g=S("div"),H(m.$$.fragment),_=P(),H(v.$$.fragment),y(i,"alt","No results placeholder"),yt(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||y(i,"src",n),y(i,"class","svelte-19qi61t"),y(s,"class","svelte-19qi61t"),y(l,"class","svelte-19qi61t"),y(g,"class","Buttons"),y(t,"class","NoTickets svelte-19qi61t")},m(x,A){R(x,t,A),C(t,i),C(t,r),C(t,s),C(s,a),C(t,u),C(t,l),C(l,f),C(t,d),C(t,g),K(m,g,null),C(g,_),K(v,g,null),N=!0},p(x,[A]){(!N||A&1)&&o!==(o=x[0]("No tickets found")+"")&&ie(a,o),(!N||A&1)&&c!==(c=x[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"")&&ie(f,c);const F={};A&3&&(F.$$scope={dirty:A,ctx:x}),m.$set(F);const b={};A&3&&(b.$$scope={dirty:A,ctx:x}),v.$set(b)},i(x){N||(k(m.$$.fragment,x),k(v.$$.fragment,x),N=!0)},o(x){$(m.$$.fragment,x),$(v.$$.fragment,x),N=!1},d(x){x&&O(t),J(m),J(v)}}}function fo(e,t,i){let n;return j(e,ke,r=>i(0,n=r)),[n]}class go extends ne{constructor(t){super(),te(this,t,fo,co,Z,{},ao)}}function ho(e){re(e,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function mo(e){let t,i;return t=new Ls({props:{direction:e[9],data:e[7],loaded:e[3],loadMore:e[2],cursor:e[11],middleclickhandler:e[1],filters:e[0]}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.loaded=n[3]),r&4&&(s.loadMore=n[2]),r&2&&(s.middleclickhandler=n[1]),r&1&&(s.filters=n[0]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function po(e){let t,i;return t=new go({}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p:V,i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function _o(e){let t,i,n,r;const s=[po,mo],o=[];function a(u,l){return!u[5].length&&!u[4]?0:1}return i=a(e),n=o[i]=s[i](e),{c(){t=S("main"),n.c(),y(t,"class","svelte-14f2ism")},m(u,l){R(u,t,l),o[i].m(t,null),r=!0},p(u,[l]){let c=i;i=a(u),i===c?o[i].p(u,l):(ge(),$(o[c],1,1,()=>{o[c]=null}),he(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),k(n,1),n.m(t,null))},i(u){r||(k(n),r=!0)},o(u){$(n),r=!1},d(u){u&&O(t),o[i].d()}}}function vo(e,t,i){let n,r,s,o,a,u,l,c;j(e,Ye,T=>i(14,n=T)),j(e,Ze,T=>i(15,r=T));let{apikey:f}=t,{filters:d}=t,{middleclickhandler:g}=t,{basePath:m}=t,_=new oo(f,m);_.load(),Se("tagsMap",_.tags);let v=ce(null);j(e,v,T=>i(16,o=T)),Se("error",v);const N=new Mt({apiKey:f,basePath:m+"/api/v3"}),x=new $n(N);Se("api",x);const A=ce([]);j(e,A,T=>i(5,u=T)),Se("data",A);const F=ce(so.Rorder);j(e,F,T=>i(18,l=T));const b=ce(!0);j(e,b,T=>i(19,c=T));const z=ce(!1);j(e,z,T=>i(4,s=T)),Se("loading",z);const U=ce(null);j(e,U,T=>i(17,a=T)),Se("cursor",U);let M=!1,B=()=>({perPage:20,sortDir:c?en.Asc:en.Desc,filters:d,sortField:l,cursor:a||""}),{loadMore:I=async(T=!1)=>{if(!s&&(T===!0&&(_e(U,a=null,a),i(3,M=!1)),!(!a&&M))){_e(z,s=!0,s);try{const Q=await x.getTicketsGridDatasetRaw(B());console.log("Loaded tickets response: ",Q);const me=await Q.value();T===!0&&_e(A,u=[],u),_e(A,u=u.concat(me.rows),u),_e(U,a=me.cursor,a),console.log("Loaded tickets value: ",me),console.log("Loaded tickets: ",me.rows.length,"cursor: ",me.cursor),i(3,M=!0)}catch(Q){console.error("Loading tickets failed: ",Q),_e(v,o=Q.toString(),o)}_e(z,s=!1,s)}}}=t;return b.subscribe(async()=>{await I(!0)}),F.subscribe(async()=>{await I(!0)}),A.subscribe(T=>{Ye.set([]),r===!0?_e(Ye,n=T.filter(Q=>!Q.__selected).map(Q=>Q.conversationid),n):_e(Ye,n=T.filter(Q=>Q.__selected??!1).map(Q=>Q.conversationid),n)}),Se("loadMoreFunction",I),e.$$set=T=>{"apikey"in T&&i(12,f=T.apikey),"filters"in T&&i(0,d=T.filters),"middleclickhandler"in T&&i(1,g=T.middleclickhandler),"basePath"in T&&i(13,m=T.basePath),"loadMore"in T&&i(2,I=T.loadMore)},e.$$.update=()=>{e.$$.dirty&5&&d&&I(!0)},[d,g,I,M,s,u,v,A,F,b,z,U,f,m]}class yo extends ne{constructor(t){super(),te(this,t,vo,_o,Z,{apikey:12,filters:0,middleclickhandler:1,basePath:13,loadMore:2},ho)}}const bo="modulepreload",ko=function(e){return"/"+e},tn={},nn=function(t,i,n){if(!i||i.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=ko(s),s in tn)return;tn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const f=r[c];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":bo,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function wo(){Jt("en",()=>nn(()=>import("./en.js"),[])),Jt("sk",()=>nn(()=>import("./sk.js"),[]))}function rn(e){let t,i,n;function r(o){e[9](o)}let s={apikey:e[0],basePath:e[3],filters:e[1],middleclickhandler:e[2],$$slots:{default:[$o]},$$scope:{ctx:e}};return e[4]!==void 0&&(s.loadMore=e[4]),t=new yo({props:s}),qe.push(()=>Un(t,"loadMore",r)),{c(){H(t.$$.fragment)},m(o,a){K(t,o,a),n=!0},p(o,a){const u={};a&1&&(u.apikey=o[0]),a&8&&(u.basePath=o[3]),a&2&&(u.filters=o[1]),a&4&&(u.middleclickhandler=o[2]),a&1024&&(u.$$scope={dirty:a,ctx:o}),!i&&a&16&&(i=!0,u.loadMore=o[4],xn(()=>i=!1)),t.$set(u)},i(o){n||(k(t.$$.fragment,o),n=!0)},o(o){$(t.$$.fragment,o),n=!1},d(o){J(t,o)}}}function $o(e){let t;const i=e[8].default,n=Ie(i,e,e[10],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),t=!0},p(r,s){n&&n.p&&(!t||s&1024)&&Be(n,i,r,r[10],t?xe(i,r[10],s,null):Ke(r[10]),null)},i(r){t||(k(n,r),t=!0)},o(r){$(n,r),t=!1},d(r){n&&n.d(r)}}}function To(e){let t,i,n,r,s=e[0]&&rn(e);return{c(){s&&s.c(),t=P(),i=S("link"),y(i,"rel","stylesheet"),y(i,"href",n=e[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),R(o,t,a),R(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&k(s,1)):(s=rn(o),s.c(),k(s,1),s.m(t.parentNode,t)):s&&(ge(),$(s,1,1,()=>{s=null}),he()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&y(i,"href",n)},i(o){r||(k(s),r=!0)},o(o){$(s),r=!1},d(o){o&&(O(t),O(i)),s&&s.d(o)}}}function Co(e,t,i){let{$$slots:n={},$$scope:r}=t;wo();let{lang:s="sk"}=t,{apikey:o}=t,{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"]]'}=t,{middleclickhandler:u}=t,{selectionhandler:l}=t,{basepath:c}=t,f;const d=function(m=!1){f&&f(m)};ui({initialLocale:s,fallbackLocale:"en"}),gi();function g(m){f=m,i(4,f)}return e.$$set=m=>{"lang"in m&&i(5,s=m.lang),"apikey"in m&&i(0,o=m.apikey),"filters"in m&&i(1,a=m.filters),"middleclickhandler"in m&&i(2,u=m.middleclickhandler),"selectionhandler"in m&&i(6,l=m.selectionhandler),"basepath"in m&&i(3,c=m.basepath),"$$scope"in m&&i(10,r=m.$$scope)},[o,a,u,c,f,s,l,d,n,g,r]}class Lo extends ne{constructor(t){super(),te(this,t,Co,To,Z,{lang:5,apikey:0,filters:1,middleclickhandler:2,selectionhandler:6,basepath:3,reload:7})}get lang(){return this.$$.ctx[5]}set lang(t){this.$$set({lang:t}),$e()}get apikey(){return this.$$.ctx[0]}set apikey(t){this.$$set({apikey:t}),$e()}get filters(){return this.$$.ctx[1]}set filters(t){this.$$set({filters:t}),$e()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(t){this.$$set({middleclickhandler:t}),$e()}get selectionhandler(){return this.$$.ctx[6]}set selectionhandler(t){this.$$set({selectionhandler:t}),$e()}get basepath(){return this.$$.ctx[3]}set basepath(t){this.$$set({basepath:t}),$e()}get reload(){return this.$$.ctx[7]}}customElements.define("tickets-table",Hn(Lo,{lang:{},apikey:{},filters:{},middleclickhandler:{},selectionhandler:{},basepath:{}},["default"],["reload"],!0));
10
+ "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-76dgfl.svelte-76dgfl:hover{background-color:var(--menu-hover-bg)}.Row.Selected.svelte-76dgfl.svelte-76dgfl{background-color:var(--menu-selected-bg) !important}.UserColumn.svelte-76dgfl.svelte-76dgfl{grid-area:user}.StatusColumn.svelte-76dgfl.svelte-76dgfl{grid-area:status;display:flex;flex-direction:column;justify-content:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ImportanceColumn.svelte-76dgfl.svelte-76dgfl{grid-area:importance}.Checkbox.svelte-76dgfl.svelte-76dgfl{grid-area:checkbox;position:relative}.StatusBar.svelte-76dgfl.svelte-76dgfl{position:absolute;left:0;top:10%;content:"";width:6px;height:80%;margin-left:8px;border-radius:69px;transition:width 0.1s ease}.Row.svelte-76dgfl:hover .StatusBar.svelte-76dgfl{width:10px}input.svelte-76dgfl.svelte-76dgfl{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(min-width: 768px){.Row.svelte-76dgfl.svelte-76dgfl{display:grid;grid-template-areas:"checkbox user importance"
11
+ "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-76dgfl.svelte-76dgfl{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 180px auto 190px;height:80px}}@media(min-width: 1300px){.Row.svelte-76dgfl.svelte-76dgfl{grid-template-columns:60px 260px auto 230px}}`)}function nn(e,t,i){const n=e.slice();return n[9]=t[i],n[10]=t,n[11]=i,n}function rn(e){let t,i,n,r,s,o,a,u,l,c,d,f,h,p,v,w,m,D,O;function x(){e[5].call(s,e[11])}function R(...G){return e[6](e[11],...G)}l=new Zr({props:{row:e[9]}}),f=new Ks({props:{row:e[9]}}),v=new $s({props:{row:e[9]}});function K(){return e[7](e[9])}function ue(...G){return e[8](e[9],...G)}return{c(){t=k("div"),i=k("div"),n=k("div"),r=W(),s=k("input"),a=W(),u=k("div"),U(l.$$.fragment),c=W(),d=k("div"),U(f.$$.fragment),h=W(),p=k("div"),U(v.$$.fragment),_(n,"class","StatusBar svelte-76dgfl"),bt(n,"background-color",gt(e[9].status)),_(s,"type","checkbox"),s.__value=o=e[9].conversationid,Ut(s,s.__value),_(s,"class","svelte-76dgfl"),_(i,"class","Checkbox svelte-76dgfl"),bt(i,"position","relative"),_(u,"class","UserColumn svelte-76dgfl"),_(d,"class","StatusColumn svelte-76dgfl"),_(p,"class","ImportanceColumn svelte-76dgfl"),_(t,"class",w="Row "+(e[1][e[11]].__selected?"Selected":"")+" svelte-76dgfl")},m(G,j){N(G,t,j),y(t,i),y(i,n),y(i,r),y(i,s),s.checked=e[1][e[11]].__selected,y(t,a),y(t,u),I(l,u,null),y(t,c),y(t,d),I(f,d,null),y(t,h),y(t,p),I(v,p,null),m=!0,D||(O=[ce(s,"change",x),ce(s,"click",Tt(R)),ce(i,"click",Tt(Ws)),ce(t,"click",K),ce(t,"mousedown",ue)],D=!0)},p(G,j){e=G,(!m||j&2)&&bt(n,"background-color",gt(e[9].status)),(!m||j&2&&o!==(o=e[9].conversationid))&&(s.__value=o,Ut(s,s.__value)),j&2&&(s.checked=e[1][e[11]].__selected);const ee={};j&2&&(ee.row=e[9]),l.$set(ee);const H={};j&2&&(H.row=e[9]),f.$set(H);const pe={};j&2&&(pe.row=e[9]),v.$set(pe),(!m||j&2&&w!==(w="Row "+(e[1][e[11]].__selected?"Selected":"")+" svelte-76dgfl"))&&_(t,"class",w)},i(G){m||(b(l.$$.fragment,G),b(f.$$.fragment,G),b(v.$$.fragment,G),m=!0)},o(G){T(l.$$.fragment,G),T(f.$$.fragment,G),T(v.$$.fragment,G),m=!1},d(G){G&&S(t),B(l),B(f),B(v),D=!1,Le(O)}}}function Us(e){let t,i,n,r=Ke(e[1]),s=[];for(let l=0;l<r.length;l+=1)s[l]=rn(nn(e,r,l));const o=l=>T(s[l],1,1,()=>{s[l]=null}),a=e[4].default,u=Ue(a,e,e[3],null);return{c(){t=k("div");for(let l=0;l<s.length;l+=1)s[l].c();i=W(),u&&u.c(),_(t,"class","Body")},m(l,c){N(l,t,c);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(t,null);y(t,i),u&&u.m(t,null),n=!0},p(l,[c]){if(c&7){r=Ke(l[1]);let d;for(d=0;d<r.length;d+=1){const f=nn(l,r,d);s[d]?(s[d].p(f,c),b(s[d],1)):(s[d]=rn(f),s[d].c(),b(s[d],1),s[d].m(t,i))}for(be(),d=r.length;d<s.length;d+=1)o(d);we()}u&&u.p&&(!n||c&8)&&He(u,a,l,l[3],n?We(a,l[3],c,null):Ye(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)b(s[c]);b(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&&S(t),Rt(s,l),u&&u.d(l)}}}const Ws=()=>{};function Hs(e,t,i){let n;V(e,ye,f=>i(1,n=f));let{$$slots:r={},$$scope:s}=t,{middleclickhandler:o}=t;function a(f,h){if(f.shiftKey){let p=n.findIndex(v=>v.__selected);if(p!==-1){let v=Math.min(p,h),w=Math.max(p,h);for(let m=v;m<=w;m++)hn(ye,n[m].__selected=!0,n)}}}function u(f){n[f].__selected=this.checked,ye.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 e.$$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 Ys extends se{constructor(t){super(),re(this,t,Hs,Us,te,{middleclickhandler:0},Js)}}function Ps(e){le(e,"svelte-1nok758","div.svelte-1nok758{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Vs(e){let t,i,n;return{c(){t=k("div"),i=k("p"),n=Q(e[0]),_(t,"class","svelte-1nok758")},m(r,s){N(r,t,s),y(t,i),y(i,n)},p(r,[s]){s&1&&ie(n,r[0])},i:q,o:q,d(r){r&&S(t)}}}function Qs(e,t,i){let n,r,s,o,a,u;return V(e,Se,l=>i(1,r=l)),V(e,Ae,l=>i(2,s=l)),V(e,ye,l=>i(3,o=l)),V(e,Ln,l=>i(4,a=l)),V(e,Ie,l=>i(5,u=l)),e.$$.update=()=>{e.$$.dirty&62&&i(0,n=u?r("Loading..."):a?r("Loading failed. Please try again later."):!o||o.length===0?r("No results match your filter. Try broadening the search criteria."):s==null?r("All data loaded"):r("Load more data"))},[n,r,s,o,a,u]}class Zs extends se{constructor(t){super(),re(this,t,Qs,Vs,te,{},Ps)}}function Xs(e){le(e,"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 sn(e,t,i){const n=e.slice();return n[9]=t[i],n}function on(e){let t,i,n,r,s=e[9].label+"",o,a,u,l,c;return{c(){t=k("label"),i=k("input"),r=W(),o=Q(s),a=W(),_(i,"type","radio"),_(i,"name","sorting"),i.value=e[9].value,i.checked=n=e[0]&&e[0].value===e[9].value,_(i,"class","svelte-1srt8g7"),_(t,"class",u=ge(e[0].value===e[9].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")},m(d,f){N(d,t,f),y(t,i),y(t,r),y(t,o),y(t,a),l||(c=ce(i,"click",e[5]),l=!0)},p(d,f){f&1&&n!==(n=d[0]&&d[0].value===d[9].value)&&(i.checked=n),f&1&&u!==(u=ge(d[0].value===d[9].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")&&_(t,"class",u)},d(d){d&&S(t),l=!1,c()}}}function qs(e){let t,i,n=e[3]("Sort by")+"",r,s,o=Ke(e[4]),a=[];for(let u=0;u<o.length;u+=1)a[u]=on(sn(e,o,u));return{c(){t=k("dialog"),i=k("span"),r=Q(n),s=W();for(let u=0;u<a.length;u+=1)a[u].c();_(i,"class","Title svelte-1srt8g7"),_(t,"class","modal svelte-1srt8g7"),_(t,"style",e[1])},m(u,l){N(u,t,l),y(t,i),y(i,r),y(t,s);for(let c=0;c<a.length;c+=1)a[c]&&a[c].m(t,null);e[7](t)},p(u,[l]){if(l&8&&n!==(n=u[3]("Sort by")+"")&&ie(r,n),l&49){o=Ke(u[4]);let c;for(c=0;c<o.length;c+=1){const d=sn(u,o,c);a[c]?a[c].p(d,l):(a[c]=on(d),a[c].c(),a[c].m(t,null))}for(;c<a.length;c+=1)a[c].d(1);a.length=o.length}l&2&&_(t,"style",u[1])},i:q,o:q,d(u){u&&S(t),Rt(a,u),e[7](null)}}}function js(e,t,i){let n;V(e,Se,f=>i(3,n=f));let{currentFilter:r}=t,{closeModal:s=()=>l.close()}=t,{style:o=""}=t;const a=pn(),u=[{value:"Datedue",label:n("Importance"),sort:Qe.Datedue,dir:!1},{value:"Created-newest",label:n("Date created - Newest"),sort:Qe.Datecreated,dir:!1},{value:"Created-oldest",label:n("Date created - Oldest"),sort:Qe.Datecreated,dir:!0},{value:"Changed-newest",label:n("Date changed - Newest"),sort:Qe.Datechanged,dir:!1},{value:"Changed-oldest",label:n("Date changed - Oldest"),sort:Qe.Datechanged,dir:!0}];let l;function c(f){const h=u.find(p=>p.value===f.target.value);i(0,r=h),a("filterChange",{option:h}),s()}function d(f){Be[f?"unshift":"push"](()=>{l=f,i(2,l)})}return e.$$set=f=>{"currentFilter"in f&&i(0,r=f.currentFilter),"closeModal"in f&&i(6,s=f.closeModal),"style"in f&&i(1,o=f.style)},[r,o,l,n,u,c,s,d]}class eo extends se{constructor(t){super(),re(this,t,js,qs,te,{currentFilter:0,closeModal:6,style:1},Xs)}}function to(e){le(e,"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 no(e){let t,i,n;return{c(){t=k("div"),_(t,"class","backdrop svelte-657q9o")},m(r,s){N(r,t,s),i||(n=ce(t,"click",Tt(function(){ht(e[0])&&e[0].apply(this,arguments)})),i=!0)},p(r,[s]){e=r},i:q,o:q,d(r){r&&S(t),i=!1,n()}}}function io(e,t,i){let{onClick:n}=t;return e.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class ro extends se{constructor(t){super(),re(this,t,io,no,te,{onClick:0},to)}}function so(e){le(e,"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 oo(e){let t,i,n,r,s,o;return n=new Zs({}),{c(){t=k("div"),i=k("div"),U(n.$$.fragment),_(i,"class","load svelte-1fwehqj"),_(t,"class","load svelte-1fwehqj")},m(a,u){N(a,t,u),y(t,i),I(n,i,null),e[11](i),r=!0,s||(o=ce(i,"click",e[12]),s=!0)},p:q,i(a){r||(b(n.$$.fragment,a),r=!0)},o(a){T(n.$$.fragment,a),r=!1},d(a){a&&S(t),B(n),e[11](null),s=!1,o()}}}function an(e){let t,i,n,r;return t=new eo({props:{closeModal:e[8],currentFilter:e[5],style:e[4]}}),t.$on("filterChange",e[10]),n=new ro({props:{onClick:e[8]}}),{c(){U(t.$$.fragment),i=W(),U(n.$$.fragment)},m(s,o){I(t,s,o),N(s,i,o),I(n,s,o),r=!0},p(s,o){const a={};o&32&&(a.currentFilter=s[5]),o&16&&(a.style=s[4]),t.$set(a)},i(s){r||(b(t.$$.fragment,s),b(n.$$.fragment,s),r=!0)},o(s){T(t.$$.fragment,s),T(n.$$.fragment,s),r=!1},d(s){s&&S(i),B(t,s),B(n,s)}}}function ao(e){let t,i,n,r,s,o;i=new wr({props:{currentFilter:e[5].label}}),i.$on("openModal",e[9]),r=new Ys({props:{middleclickhandler:e[0],$$slots:{default:[oo]},$$scope:{ctx:e}}});let a=e[3]&&an(e);return{c(){t=k("div"),U(i.$$.fragment),n=W(),U(r.$$.fragment),s=W(),a&&a.c(),_(t,"class","container svelte-1fwehqj")},m(u,l){N(u,t,l),I(i,t,null),y(t,n),I(r,t,null),y(t,s),a&&a.m(t,null),e[13](t),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&&b(a,1)):(a=an(u),a.c(),b(a,1),a.m(t,null)):a&&(be(),T(a,1,1,()=>{a=null}),we())},i(u){o||(b(i.$$.fragment,u),b(r.$$.fragment,u),b(a),o=!0)},o(u){T(i.$$.fragment,u),T(r.$$.fragment,u),T(a),o=!1},d(u){u&&S(t),B(i),B(r),a&&a.d(),e[13](null)}}}function lo(e,t,i){let n,r,s;V(e,et,m=>i(6,r=m)),V(e,Ae,m=>i(7,s=m));let{middleclickhandler:o}=t,a,u,l=!1,c="";mt(()=>{const m=localStorage.getItem("TicketGridCurrentFilter");m&&i(5,n=JSON.parse(m));const D=new IntersectionObserver(O=>{O[0].isIntersecting&&Je()},{root:u,threshold:.5});return D.observe(a),()=>D.unobserve(a)});function d(){i(3,l=!1)}function f(m){i(3,l=!0),i(4,c=m.detail.dialogStyles)}function h(m){d(),console.log("filter changed: "+m.detail.option.sort+" "+m.detail.option.dir),m.detail.option.value!==n.value&&(i(5,n=m.detail.option),localStorage.setItem("TicketGridCurrentFilter",JSON.stringify(n)),it.set(n.dir),xt.set(n.sort))}function p(m){Be[m?"unshift":"push"](()=>{a=m,i(1,a)})}const v=()=>Je(r&&!s);function w(m){Be[m?"unshift":"push"](()=>{u=m,i(2,u)})}return e.$$set=m=>{"middleclickhandler"in m&&i(0,o=m.middleclickhandler)},i(5,n={value:"Datedue",label:"Importance"}),[o,a,u,l,c,n,r,s,d,f,h,p,v,w]}class uo extends se{constructor(t){super(),re(this,t,lo,ao,te,{middleclickhandler:0},so)}}class co{constructor(t,i){const n=new Et({apiKey:t,basePath:i+"/api/v3"});this.api=new $n(n)}async load(){let t=await this.api.getTagsGridList();t=t.reduce((i,n)=>(i[n.tagid]=n,i),{}),Cn.set(t)}}function fo(e){le(e,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function go(e){let t,i,n,r,s;const o=e[4].default,a=Ue(o,e,e[3],null);return{c(){t=k("button"),a&&a.c(),_(t,"class",i=ge(e[0])+" svelte-10fvxzv")},m(u,l){N(u,t,l),a&&a.m(t,null),n=!0,r||(s=ce(t,"click",e[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&He(a,o,u,u[3],n?We(o,u[3],l,null):Ye(u[3]),null),(!n||l&1&&i!==(i=ge(u[0])+" svelte-10fvxzv"))&&_(t,"class",i)},i(u){n||(b(a,u),n=!0)},o(u){T(a,u),n=!1},d(u){u&&S(t),a&&a.d(u),r=!1,s()}}}function ho(e,t,i){let{$$slots:n={},$$scope:r}=t,{onAction:s=u=>{}}=t,{className:o=""}=t;function a(u){s(u)}return e.$$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 ln extends se{constructor(t){super(),re(this,t,ho,go,te,{onAction:2,className:0},fo)}}function mo(e){le(e,"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 po(e){let t,i,n=e[0]("Change filter")+"",r,s;return t=new Ce({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){U(t.$$.fragment),i=W(),r=Q(n)},m(o,a){I(t,o,a),N(o,i,a),N(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Change filter")+"")&&ie(r,n)},i(o){s||(b(t.$$.fragment,o),s=!0)},o(o){T(t.$$.fragment,o),s=!1},d(o){o&&(S(i),S(r)),B(t,o)}}}function _o(e){let t,i,n=e[0]("Configure chat button")+"",r,s;return t=new Ce({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){U(t.$$.fragment),i=W(),r=Q(n)},m(o,a){I(t,o,a),N(o,i,a),N(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Configure chat button")+"")&&ie(r,n)},i(o){s||(b(t.$$.fragment,o),s=!0)},o(o){T(t.$$.fragment,o),s=!1},d(o){o&&(S(i),S(r)),B(t,o)}}}function vo(e){let t,i,n,r,s,o=e[0]("No tickets found")+"",a,u,l,c=e[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"",d,f,h,p,v,w,m;return p=new ln({props:{className:"Filter",onAction:e[1],$$slots:{default:[po]},$$scope:{ctx:e}}}),w=new ln({props:{className:"Configure",$$slots:{default:[_o]},$$scope:{ctx:e}}}),{c(){t=k("div"),i=k("img"),r=W(),s=k("h1"),a=Q(o),u=W(),l=k("p"),d=Q(c),f=W(),h=k("div"),U(p.$$.fragment),v=W(),U(w.$$.fragment),_(i,"alt","No results placeholder"),$t(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"),_(l,"class","svelte-19qi61t"),_(h,"class","Buttons"),_(t,"class","NoTickets svelte-19qi61t")},m(D,O){N(D,t,O),y(t,i),y(t,r),y(t,s),y(s,a),y(t,u),y(t,l),y(l,d),y(t,f),y(t,h),I(p,h,null),y(h,v),I(w,h,null),m=!0},p(D,[O]){(!m||O&1)&&o!==(o=D[0]("No tickets found")+"")&&ie(a,o),(!m||O&1)&&c!==(c=D[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"")&&ie(d,c);const x={};O&5&&(x.$$scope={dirty:O,ctx:D}),p.$set(x);const R={};O&5&&(R.$$scope={dirty:O,ctx:D}),w.$set(R)},i(D){m||(b(p.$$.fragment,D),b(w.$$.fragment,D),m=!0)},o(D){T(p.$$.fragment,D),T(w.$$.fragment,D),m=!1},d(D){D&&S(t),B(p),B(w)}}}function yo(e,t,i){let n;return V(e,Se,s=>i(0,n=s)),[n,()=>Je(!0)]}class bo extends se{constructor(t){super(),re(this,t,yo,vo,te,{},mo)}}function wo(e){le(e,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function ko(e){let t,i;return t=new uo({props:{middleclickhandler:e[0]}}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.middleclickhandler=n[0]),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function $o(e){let t,i;return t=new bo({}),{c(){U(t.$$.fragment)},m(n,r){I(t,n,r),i=!0},p:q,i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function To(e){let t,i,n,r;const s=[$o,ko],o=[];function a(u,l){return!u[1].length&&u[2]?0:1}return i=a(e),n=o[i]=s[i](e),{c(){t=k("main"),n.c(),_(t,"class","svelte-14f2ism")},m(u,l){N(u,t,l),o[i].m(t,null),r=!0},p(u,[l]){let c=i;i=a(u),i===c?o[i].p(u,l):(be(),T(o[c],1,1,()=>{o[c]=null}),we(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),b(n,1),n.m(t,null))},i(u){r||(b(n),r=!0)},o(u){T(n),r=!1},d(u){u&&S(t),o[i].d()}}}function Co(e,t,i){let n,r,s,o,a,u;V(e,je,f=>i(8,n=f)),V(e,nt,f=>i(5,r=f)),V(e,xt,f=>i(6,s=f)),V(e,it,f=>i(7,o=f)),V(e,ye,f=>i(1,a=f)),V(e,et,f=>i(2,u=f));let{apikey:l}=t,{middleclickhandler:c}=t,{basePath:d}=t;return mt(async()=>{await new co(l,d).load();const f=new $n(new Et({apiKey:l,basePath:d+"/api/v3"}));ft.set(f),await Je(!0)}),ye.subscribe(f=>{Tn.set(n?f.filter(h=>!h.__selected).map(h=>h.conversationid):f.filter(h=>h.__selected).map(h=>h.conversationid))}),e.$$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)},e.$$.update=()=>{e.$$.dirty&224&&(o||s||r)&&Je(!0)},[c,a,u,l,d,r,s,o]}class Lo extends se{constructor(t){super(),re(this,t,Co,To,te,{apikey:3,middleclickhandler:0,basePath:4},wo)}}const So="modulepreload",Do=function(e){return"/"+e},un={},cn=function(t,i,n){if(!i||i.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=Do(s),s in un)return;un[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":So,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(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function No(){Vt("en",()=>cn(()=>import("./en.js"),[])),Vt("sk",()=>cn(()=>import("./sk.js"),[]))}function dn(e){let t,i;return t=new Lo({props:{apikey:e[0],basePath:e[3],filters:e[1],middleclickhandler:e[2],$$slots:{default:[Oo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(n,r){I(t,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}),t.$set(s)},i(n){i||(b(t.$$.fragment,n),i=!0)},o(n){T(t.$$.fragment,n),i=!1},d(n){B(t,n)}}}function Oo(e){let t;const i=e[5].default,n=Ue(i,e,e[6],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),t=!0},p(r,s){n&&n.p&&(!t||s&64)&&He(n,i,r,r[6],t?We(i,r[6],s,null):Ye(r[6]),null)},i(r){t||(b(n,r),t=!0)},o(r){T(n,r),t=!1},d(r){n&&n.d(r)}}}function Ro(e){let t,i,n,r,s=e[0]&&dn(e);return{c(){s&&s.c(),t=W(),i=k("link"),_(i,"rel","stylesheet"),_(i,"href",n=e[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),N(o,t,a),N(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&b(s,1)):(s=dn(o),s.c(),b(s,1),s.m(t.parentNode,t)):s&&(be(),T(s,1,1,()=>{s=null}),we()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&_(i,"href",n)},i(o){r||(b(s),r=!0)},o(o){T(s),r=!1},d(o){o&&(S(t),S(i)),s&&s.d(o)}}}function Fo(e,t,i){let{$$slots:n={},$$scope:r}=t;No();let{lang:s="sk"}=t,{apikey:o}=t,{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"]]'}=t,{middleclickhandler:u}=t,{basepath:l}=t;return mt(()=>{nt.set(a)}),_i({initialLocale:s,fallbackLocale:"en"}),wi(),e.$$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)},e.$$.update=()=>{e.$$.dirty&2&&a&&nt.set(a)},[o,a,u,l,s,n,r]}class Ao extends se{constructor(t){super(),re(this,t,Fo,Ro,te,{lang:4,apikey:0,filters:1,middleclickhandler:2,basepath:3})}get lang(){return this.$$.ctx[4]}set lang(t){this.$$set({lang:t}),Oe()}get apikey(){return this.$$.ctx[0]}set apikey(t){this.$$set({apikey:t}),Oe()}get filters(){return this.$$.ctx[1]}set filters(t){this.$$set({filters:t}),Oe()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(t){this.$$set({middleclickhandler:t}),Oe()}get basepath(){return this.$$.ctx[3]}set basepath(t){this.$$set({basepath:t}),Oe()}}customElements.define("tickets-table",jn(Ao,{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.28",
4
+ "version": "0.0.32",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",