@qualityunit/liveagent-ticket-grid 0.0.30 → 0.0.34

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,9 @@
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 P(){}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 P}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 ge(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=N("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 N(e){return document.createElement(e)}function ee(e){return document.createTextNode(e)}function Y(){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 he(){Ne={r:0,c:[],p:Ne}}function me(){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 W(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:P,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,...h)=>{const m=h.length?h[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=N("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=P}$on(t,i){if(!ct(i))return P;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=N("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:P,o:P,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=P){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=P){const l=[a,u];return n.add(l),n.size===1&&(i=t(r,s)||P),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=P;const d=()=>{if(c)return;f();const m=t(n?l[0]:l,o,a);s?o(m):f=ct(m)?m:P},h=r.map((m,p)=>Oe(m,v=>{l[p]=v,c&=~(1<<p),u&&d()},()=>{c|=1<<p}));return u=!0,d(),function(){be(h),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())?`
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=N("span"),n=ee(i),r=Y(),s=N("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=N("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=N("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=N("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=N("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=N("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:P,o:P,d(s){s&&O(t),r.d(s)}}}function Ci(e,t,i){let n,r,s,o,a=P,u=()=>(a(),a=Oe(l,p=>i(5,o=p)),l);j(e,Ze,p=>i(2,n=p)),j(e,Ye,p=>i(3,r=p)),j(e,ke,p=>i(4,s=p)),e.$$.on_destroy.push(()=>a());let{data:l}=t;u();let{filter:c}=t,f=null,d=ve("loading");function h(){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=p=>{"data"in p&&u(i(0,l=p.data)),"filter"in p&&i(7,c=p.filter)},e.$$.update=()=>{e.$$.dirty&128&&c&&h()},[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(){W(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(){W(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,h,m,p,v,L,x,F,M,b;const z=[Di,Ni],Q=[];function A(E,B){return E[3]?0:1}return c=A(e),f=Q[c]=z[c](e),m=new Li({props:{data:e[1],filter:e[2]}}),L=new ye({props:{iconLaClassName:"la-refresh"}}),{c(){t=N("div"),i=N("div"),n=N("input"),r=Y(),s=N("button"),a=ee(o),u=Y(),l=N("button"),f.c(),d=Y(),h=N("div"),W(m.$$.fragment),p=Y(),v=N("button"),W(L.$$.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(h,"class","rightPanel svelte-7v4n24"),y(t,"class","Head svelte-7v4n24")},m(E,B){R(E,t,B),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),Q[c].m(l,null),C(t,d),C(t,h),K(m,h,null),C(h,p),C(h,v),K(L,v,null),F=!0,M||(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])],M=!0)},p(E,[B]){B&16&&(n.checked=E[4]),(!F||B&32)&&o!==(o=E[5]("Importance")+"")&&ie(a,o);let T=c;c=A(E),c!==T&&(he(),$(Q[T],1,1,()=>{Q[T]=null}),me(),f=Q[c],f||(f=Q[c]=z[c](E),f.c()),k(f,1),f.m(l,null));const V={};B&2&&(V.data=E[1]),B&4&&(V.filter=E[2]),m.$set(V),(!F||B&32&&x!==(x=E[5]("Reload")))&&y(v,"title",x),(!F||B&64)&&xt(v,"loading",E[6])},i(E){F||(k(f),k(m.$$.fragment,E),k(L.$$.fragment,E),F=!0)},o(E){$(f),$(m.$$.fragment,E),$(L.$$.fragment,E),F=!1},d(E){E&&O(t),Q[c].d(),J(m),J(L),M=!1,be(b)}}}function Ri(e,t,i){let n,r=P,s=()=>(r(),r=Oe(d,A=>i(3,n=A)),d),o,a,u=P,l=()=>(u(),u=Oe(h,A=>i(15,a=A)),h),c,f;j(e,Ze,A=>i(4,o=A)),j(e,ke,A=>i(5,c=A)),e.$$.on_destroy.push(()=>r()),e.$$.on_destroy.push(()=>u());let{direction:d}=t;s();let{data:h}=t;l();let{filters:m}=t;const p=ve("loadMoreFunction"),v=ve("loading");j(e,v,A=>i(6,f=A));const L=ln();function x(){Ze.set(!o),ge(h,a=a.map(A=>(A.__selected=o,A)),a)}function F(){L("openModal")}const M=()=>{ge(d,n=!n,n)};function b(){o=this.checked,Ze.set(o)}const z=()=>M(),Q=()=>p(!0);return e.$$set=A=>{"direction"in A&&s(i(0,d=A.direction)),"data"in A&&l(i(1,h=A.data)),"filters"in A&&i(2,m=A.filters)},[d,h,m,n,o,c,f,p,v,x,F,M,b,z,Q]}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=N("div"),t.textContent=`${e[10]}`,y(t,"class","innerInitials svelte-hbozhk")},m(i,n){R(i,t,n)},p:P,d(i){i&&O(t)}}}function Ei(e){let t,i,n,r,s,o;return{c(){t=N("div"),i=N("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=N("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:P,o:P,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 h=d?Fi():a,m=s||Mi(r),p=m.length;let v=!1,L=!0;const x=()=>i(7,v=!0),F=()=>i(8,L=!1);return e.$$set=M=>{"style"in M&&i(0,n=M.style),"name"in M&&i(1,r=M.name),"initials"in M&&i(12,s=M.initials),"src"in M&&i(2,o=M.src),"bgColor"in M&&i(13,a=M.bgColor),"textColor"in M&&i(3,u=M.textColor),"size"in M&&i(4,l=M.size),"borderRadius"in M&&i(5,c=M.borderRadius),"square"in M&&i(6,f=M.square),"randomBgColor"in M&&i(14,d=M.randomBgColor)},[n,r,o,u,l,c,f,v,L,h,m,p,s,a,d,x,F]}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;/*!
1
+ var Fn=Object.defineProperty;var An=(t,e,i)=>e in t?Fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ge=(t,e,i)=>(An(t,typeof e!="symbol"?e+"":e,i),i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();function Q(){}function at(t,e){for(const i in e)t[i]=e[i];return t}function on(t){return t()}function At(){return Object.create(null)}function Ce(t){t.forEach(on)}function Ct(t){return typeof t=="function"}function q(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let rt;function _t(t,e){return t===e?!0:(rt||(rt=document.createElement("a")),rt.href=e,t===rt.href)}function Gn(t){return Object.keys(t).length===0}function an(t,...e){if(t==null){for(const n of e)n(void 0);return Q}const i=t.subscribe(...e);return i.unsubscribe?()=>i.unsubscribe():i}function he(t){let e;return an(t,i=>e=i)(),e}function re(t,e,i){t.$$.on_destroy.push(an(e,i))}function Ie(t,e,i,n){if(t){const r=ln(t,e,i,n);return t[0](r)}}function ln(t,e,i,n){return t[1]&&n?at(i.ctx.slice(),t[1](n(e))):i.ctx}function Be(t,e,i,n){if(t[2]&&n){const r=t[2](n(i));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(e.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=e.dirty[a]|r[a];return s}return e.dirty|r}return e.dirty}function Ke(t,e,i,n,r,s){if(r){const o=ln(e,i,n,s);t.p(o,r)}}function Je(t){if(t.ctx.length>32){const e=[],i=t.ctx.length/32;for(let n=0;n<i;n++)e[n]=-1;return e}return-1}function zn(t){const e={};for(const i in t)i[0]!=="$"&&(e[i]=t[i]);return e}function Gt(t,e){const i={};e=new Set(e);for(const n in t)!e.has(n)&&n[0]!=="$"&&(i[n]=t[n]);return i}function fe(t){return t??""}function un(t,e,i){return t.set(i),e}const En=["",!0,1,"true","contenteditable"];function y(t,e){t.appendChild(e)}function oe(t,e,i){const n=Mn(t);if(!n.getElementById(e)){const r=k("style");r.id=e,r.textContent=i,In(n,r)}}function Mn(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function In(t,e){return y(t.head||t,e),e.sheet}function N(t,e,i){t.insertBefore(e,i||null)}function D(t){t.parentNode&&t.parentNode.removeChild(t)}function Lt(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function k(t){return document.createElement(t)}function se(t){return document.createTextNode(t)}function U(){return se(" ")}function tt(){return se("")}function ae(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function yt(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function v(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}const Bn=["width","height"];function zt(t,e){const i=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:i[n]&&i[n].set&&Bn.indexOf(n)===-1?t[n]=e[n]:v(t,n,e[n])}function Kn(t){return Array.from(t.childNodes)}function le(t,e){e=""+e,t.data!==e&&(t.data=e)}function Jn(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Un(t,e,i){~En.indexOf(i)?Jn(t,e):le(t,e)}function Et(t,e){t.value=e??""}function mt(t,e,i,n){i==null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"")}function Mt(t,e,i){t.classList.toggle(e,!!i)}function Wn(t,e,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:i,cancelable:n})}function Hn(t){const e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}let qe;function Ve(t){qe=t}function cn(){if(!qe)throw new Error("Function called outside component initialization");return qe}function ct(t){cn().$$.on_mount.push(t)}function dn(){const t=cn();return(e,i,{cancelable:n=!1}={})=>{const r=t.$$.callbacks[e];if(r){const s=Wn(e,i,{cancelable:n});return r.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}const Re=[],ze=[];let Ae=[];const It=[],Yn=Promise.resolve();let bt=!1;function Pn(){bt||(bt=!0,Yn.then(Se))}function wt(t){Ae.push(t)}const pt=new Set;let Oe=0;function Se(){if(Oe!==0)return;const t=qe;do{try{for(;Oe<Re.length;){const e=Re[Oe];Oe++,Ve(e),Vn(e.$$)}}catch(e){throw Re.length=0,Oe=0,e}for(Ve(null),Re.length=0,Oe=0;ze.length;)ze.pop()();for(let e=0;e<Ae.length;e+=1){const i=Ae[e];pt.has(i)||(pt.add(i),i())}Ae.length=0}while(Re.length);for(;It.length;)It.pop()();bt=!1,pt.clear(),Ve(t)}function Vn(t){if(t.fragment!==null){t.update(),Ce(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(wt)}}function Qn(t){const e=[],i=[];Ae.forEach(n=>t.indexOf(n)===-1?e.push(n):i.push(n)),i.forEach(n=>n()),Ae=e}const st=new Set;let De;function _e(){De={r:0,c:[],p:De}}function ye(){De.r||Ce(De.c),De=De.p}function b(t,e){t&&t.i&&(st.delete(t),t.i(e))}function $(t,e,i,n){if(t&&t.o){if(st.has(t))return;st.add(t),De.c.push(()=>{st.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}function Ee(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Zn(t,e){const i={},n={},r={$$scope:1};let s=t.length;for(;s--;){const o=t[s],a=e[s];if(a){for(const u in o)u in a||(n[u]=1);for(const u in a)r[u]||(i[u]=a[u],r[u]=1);t[s]=a}else for(const u in o)r[u]=1}for(const o in n)o in i||(i[o]=void 0);return i}function I(t){t&&t.c()}function E(t,e,i){const{fragment:n,after_update:r}=t.$$;n&&n.m(e,i),wt(()=>{const s=t.$$.on_mount.map(on).filter(Ct);t.$$.on_destroy?t.$$.on_destroy.push(...s):Ce(s),t.$$.on_mount=[]}),r.forEach(wt)}function M(t,e){const i=t.$$;i.fragment!==null&&(Qn(i.after_update),Ce(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function Xn(t,e){t.$$.dirty[0]===-1&&(Re.push(t),Pn(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ee(t,e,i,n,r,s,o=null,a=[-1]){const u=qe;Ve(t);const l=t.$$={fragment:null,ctx:[],props:s,update:Q,not_equal:r,bound:At(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:At(),dirty:a,skip_bound:!1,root:e.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(t,e.props||{},(d,f,...h)=>{const 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&&Xn(t,d)),f}):[],l.update(),c=!0,Ce(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){const d=Kn(e.target);l.fragment&&l.fragment.l(d),d.forEach(D)}else l.fragment&&l.fragment.c();e.intro&&b(t.$$.fragment),E(t,e.target,e.anchor),Se()}Ve(u)}let fn;typeof HTMLElement=="function"&&(fn=class extends HTMLElement{constructor(e,i,n){super();ge(this,"$$ctor");ge(this,"$$s");ge(this,"$$c");ge(this,"$$cn",!1);ge(this,"$$d",{});ge(this,"$$r",!1);ge(this,"$$p_d",{});ge(this,"$$l",{});ge(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=i,n&&this.attachShadow({mode:"open"})}addEventListener(e,i,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){const r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,n)}removeEventListener(e,i,n){if(super.removeEventListener(e,i,n),this.$$c){const r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(o){return()=>{let a;return{c:function(){a=k("slot"),o!=="default"&&v(a,"name",o)},m:function(c,d){N(c,a,d)},d:function(c){c&&D(a)}}}};var e=i;if(await Promise.resolve(),!this.$$cn)return;const n={},r=Hn(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(e,i,n){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=ot(e,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function ot(t,e,i,n){var s;const r=(s=i[t])==null?void 0:s.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!i[t])return e;if(n==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function qn(t,e,i,n,r,s){let o=class extends fn{constructor(){super(t,i,r),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Object.keys(e).forEach(a=>{Object.defineProperty(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){var l;u=ot(a,u,e),this.$$d[a]=u,(l=this.$$c)==null||l.$set({[a]:u})}})}),n.forEach(a=>{Object.defineProperty(o.prototype,a,{get(){var u;return(u=this.$$c)==null?void 0:u[a]}})}),s&&(o=s(o)),t.element=o,o}class te{constructor(){ge(this,"$$");ge(this,"$$set")}$destroy(){M(this,1),this.$destroy=Q}$on(e,i){if(!Ct(i))return Q;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(e){this.$$set&&!Gn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const jn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(jn);function ei(t){oe(t,"svelte-uqg1eo",".Icon.svelte-uqg1eo:before{font-family:'la-icon-font';display:inline-block;margin:0;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1em}")}function ti(t){let e,i;return{c(){e=k("span"),v(e,"class",i=fe(`Icon ${t[0]} ${t[1]}`)+" svelte-uqg1eo")},m(n,r){N(n,e,r)},p(n,[r]){r&3&&i!==(i=fe(`Icon ${n[0]} ${n[1]}`)+" svelte-uqg1eo")&&v(e,"class",i)},i:Q,o:Q,d(n){n&&D(e)}}}function ni(t,e,i){let{className:n=""}=e,{iconLaClassName:r}=e;return t.$$set=s=>{"className"in s&&i(0,n=s.className),"iconLaClassName"in s&&i(1,r=s.iconLaClassName)},[n,r]}class $e extends te{constructor(e){super(),ee(this,e,ni,ti,q,{className:0,iconLaClassName:1},ei)}}const xe=[];function ce(t,e=Q){let i;const n=new Set;function r(a){if(q(t,a)&&(t=a,i)){const u=!xe.length;for(const l of n)l[1](),xe.push(l,t);if(u){for(let l=0;l<xe.length;l+=2)xe[l][0](xe[l+1]);xe.length=0}}}function s(a){r(a(t))}function o(a,u=Q){const l=[a,u];return n.add(l),n.size===1&&(i=e(r,s)||Q),a(t),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}var Fe=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};const ii="https://localhost/api/v3".replace(/\/+$/,"");class St{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:ii}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||gn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:()=>Fe(this,void 0,void 0,function*(){return e})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const ri=new St;class dt{constructor(e=ri){this.configuration=e,this.fetchApi=(i,n)=>Fe(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 li(o,"The request failed and the interceptors did not return an alternative response"):o}for(const o of this.middleware)o.post&&(s=(yield o.post({fetch:this.fetchApi,url:r.url,init:r.init,response:s.clone()}))||s);return s}),this.middleware=e.middleware}withMiddleware(...e){const i=this.clone();return i.middleware=i.middleware.concat(...e),i}withPreMiddleware(...e){const i=e.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...e){const i=e.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(e){return e?dt.jsonRegex.test(e):!1}request(e,i){return Fe(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(e,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new ai(s,"Response returned an error code")})}createFetchParams(e,i){return Fe(this,void 0,void 0,function*(){let n=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(e.query));const r=Object.assign({},this.configuration.headers,e.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof i=="function"?i:()=>Fe(this,void 0,void 0,function*(){return i}),o={method:e.method,headers:r,body:e.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:e})),u=Object.assign(Object.assign({},a),{body:oi(a.body)||a.body instanceof URLSearchParams||si(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const e=this.constructor,i=new e(this.configuration);return i.middleware=this.middleware.slice(),i}}dt.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function si(t){return typeof Blob<"u"&&t instanceof Blob}function oi(t){return typeof FormData<"u"&&t instanceof FormData}class ai extends Error{constructor(e,i){super(i),this.response=e,this.name="ResponseError"}}class li extends Error{constructor(e,i){super(i),this.cause=e,this.name="FetchError"}}class Bt extends Error{constructor(e,i){super(i),this.field=e,this.name="RequiredError"}}function g(t,e){const i=t[e];return i!=null}function gn(t,e=""){return Object.keys(t).map(i=>hn(i,t[i],e)).filter(i=>i.length>0).join("&")}function hn(t,e,i=""){const n=i+(i.length?`[${t}]`:t);if(e instanceof Array){const r=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(e instanceof Set){const r=Array.from(e);return hn(t,r,i)}return e instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?gn(e,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(e))}`}class j{constructor(e,i=n=>n){this.raw=e,this.transformer=i}value(){return Fe(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function ui(t){return ci(t)}function ci(t,e){return t==null?t:{departmentid:g(t,"departmentid")?t.departmentid:void 0,onlineStatus:g(t,"online_status")?t.online_status:void 0,presetStatus:g(t,"preset_status")?t.preset_status:void 0}}function di(t){return fi(t)}function fi(t,e){return t==null?t:{agentid:g(t,"agentid")?t.agentid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,username:g(t,"username")?t.username:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,roleid:g(t,"roleid")?t.roleid:void 0,departmentsStatuses:g(t,"departments_statuses")?t.departments_statuses.map(ui):void 0,twofa:g(t,"twofa")?t.twofa:void 0,lastPswdChange:g(t,"last_pswd_change")?new Date(t.last_pswd_change):void 0,userstatus:g(t,"userstatus")?t.userstatus:void 0}}function gi(t){return hi(t)}function hi(t,e){return t==null?t:{conversationid:g(t,"conversationid")?t.conversationid:void 0,datechanged:g(t,"datechanged")?new Date(t.datechanged):void 0,status:g(t,"status")?t.status:void 0,preview:g(t,"preview")?t.preview:void 0,subject:g(t,"subject")?t.subject:void 0,departmentname:g(t,"departmentname")?t.departmentname:void 0,agentname:g(t,"agentname")?t.agentname:void 0,tags:g(t,"tags")?t.tags:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,emails:g(t,"emails")?t.emails:void 0,city:g(t,"city")?t.city:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,rstatus:g(t,"rstatus")?t.rstatus:void 0,statusdatestarted:g(t,"statusdatestarted")?new Date(t.statusdatestarted):void 0,chatOrder:g(t,"chat_order")?t.chat_order:void 0}}function mi(t){return pi(t)}function pi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,name:g(t,"name")?t.name:void 0,type:g(t,"type")?t.type:void 0,onlineCode:g(t,"online_code")?t.online_code:void 0,offlineCode:g(t,"offline_code")?t.offline_code:void 0,onlineCodeCss:g(t,"online_code_css")?t.online_code_css:void 0,offlineCodeCss:g(t,"offline_code_css")?t.offline_code_css:void 0,provide:g(t,"provide")?t.provide:void 0,impressions:g(t,"impressions")?t.impressions:void 0,tickets:g(t,"tickets")?t.tickets:void 0,status:g(t,"status")?t.status:void 0,lastDisplayTime:g(t,"last_display_time")?t.last_display_time:void 0,lastDisplayUrl:g(t,"last_display_url")?t.last_display_url:void 0}}function pe(t){return vi(t)}function vi(t,e){return t==null?t:{count:g(t,"count")?t.count:void 0}}function _i(t){return yi(t)}function yi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,name:g(t,"name")?t.name:void 0,agentCount:g(t,"agent_count")?t.agent_count:void 0}}function bi(t){return wi(t)}function wi(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,logid:g(t,"logid")?t.logid:void 0,line:g(t,"line")?t.line:void 0,filename:g(t,"filename")?t.filename:void 0,created:g(t,"created")?t.created:void 0,level:g(t,"level")?t.level:void 0,type:g(t,"type")?t.type:void 0,message:g(t,"message")?t.message:void 0,ip:g(t,"ip")?t.ip:void 0,groupid:g(t,"groupid")?t.groupid:void 0}}function ki(t){return $i(t)}function $i(t,e){return t==null?t:{agentid:g(t,"agentid")?t.agentid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,chats:g(t,"chats")?t.chats:void 0}}function Ti(t){return Ci(t)}function Ci(t,e){return t==null?t:{name:g(t,"name")?t.name:void 0,code:g(t,"code")?t.code:void 0,engName:g(t,"eng_name")?t.eng_name:void 0,translated:g(t,"translated")?t.translated:void 0,isDefault:g(t,"is_default")?t.is_default:void 0,active:g(t,"active")?t.active:void 0,isCustom:g(t,"is_custom")?t.is_custom:void 0,isBuiltIn:g(t,"is_builtIn")?t.is_builtIn:void 0}}function Li(t){return Si(t)}function Si(t,e){return t==null?t:{codeName:g(t,"code_name")?t.code_name:void 0,name:g(t,"name")?t.name:void 0,description:g(t,"description")?t.description:void 0,active:g(t,"active")?t.active:void 0,help:g(t,"help")?t.help:void 0,multiple:g(t,"multiple")?t.multiple:void 0,configFile:g(t,"config_file")?t.config_file:void 0,price:g(t,"price")?t.price:void 0,legacyIntegration:g(t,"legacy_integration")?t.legacy_integration:void 0}}function vt(t){return Di(t)}function Di(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,conversationid:g(t,"conversationid")?t.conversationid:void 0,code:g(t,"code")?t.code:void 0,slaTicketId:g(t,"sla_ticket_id")?t.sla_ticket_id:void 0,departmentid:g(t,"departmentid")?t.departmentid:void 0,departmentName:g(t,"department_name")?t.department_name:void 0,levelid:g(t,"levelid")?t.levelid:void 0,slaLevelName:g(t,"sla_level_name")?t.sla_level_name:void 0,sla:g(t,"sla")?t.sla:void 0,dateCreated:g(t,"date_created")?t.date_created:void 0,dateClosed:g(t,"date_closed")?t.date_closed:void 0,dateDue:g(t,"date_due")?t.date_due:void 0,slaLevelId:g(t,"sla_level_id")?t.sla_level_id:void 0,slaType:g(t,"sla_type")?new Date(t.sla_type):void 0,agentid:g(t,"agentid")?t.agentid:void 0,agentFirstname:g(t,"agent_firstname")?t.agent_firstname:void 0,agentLastname:g(t,"agent_lastname")?t.agent_lastname:void 0,agentAvatarUrl:g(t,"agent_avatar_url")?t.agent_avatar_url:void 0,reqContactid:g(t,"req_contactid")?t.req_contactid:void 0,reqFirstname:g(t,"req_firstname")?t.req_firstname:void 0,reqLastname:g(t,"req_lastname")?t.req_lastname:void 0,reqSystemname:g(t,"req_systemname")?t.req_systemname:void 0,reqContactName:g(t,"req_contactName")?t.req_contactName:void 0,reqAvatarUrl:g(t,"req_avatar_url")?t.req_avatar_url:void 0}}function Kt(t){return Ni(t)}function Ni(t,e){return t==null?t:{tagid:g(t,"tagid")?t.tagid:void 0,name:g(t,"name")?t.name:void 0,type:g(t,"type")?t.type:void 0,color:g(t,"color")?t.color:void 0,backgroundcolor:g(t,"backgroundcolor")?t.backgroundcolor:void 0,isPublic:g(t,"is_public")?t.is_public:void 0}}function mn(t){return Oi(t)}function Oi(t,e){return t==null?t:{conversationid:g(t,"conversationid")?t.conversationid:void 0,code:g(t,"code")?t.code:void 0,datecreated:g(t,"datecreated")?new Date(t.datecreated):void 0,datechanged:g(t,"datechanged")?new Date(t.datechanged):void 0,dateresolved:g(t,"dateresolved")?new Date(t.dateresolved):void 0,statuschanged:g(t,"statuschanged")?new Date(t.statuschanged):void 0,rorder:g(t,"rorder")?t.rorder:void 0,datedue:g(t,"datedue")?new Date(t.datedue):void 0,datereopen:g(t,"datereopen")?new Date(t.datereopen):void 0,status:g(t,"status")?t.status:void 0,channelType:g(t,"channel_type")?t.channel_type:void 0,departmentid:g(t,"departmentid")?t.departmentid:void 0,agentid:g(t,"agentid")?t.agentid:void 0,preview:g(t,"preview")?t.preview:void 0,subject:g(t,"subject")?t.subject:void 0,departmentname:g(t,"departmentname")?t.departmentname:void 0,agentname:g(t,"agentname")?t.agentname:void 0,tags:g(t,"tags")?t.tags:void 0,messagegroupsIn:g(t,"messagegroups_in")?t.messagegroups_in:void 0,messagegroupsOut:g(t,"messagegroups_out")?t.messagegroups_out:void 0,contactid:g(t,"contactid")?t.contactid:void 0,parentContactid:g(t,"parent_contactid")?t.parent_contactid:void 0,firstname:g(t,"firstname")?t.firstname:void 0,lastname:g(t,"lastname")?t.lastname:void 0,systemName:g(t,"system_name")?t.system_name:void 0,emails:g(t,"emails")?t.emails:void 0,phones:g(t,"phones")?t.phones:void 0,jobPosition:g(t,"job_position")?t.job_position:void 0,contactType:g(t,"contact_type")?t.contact_type:void 0,city:g(t,"city")?t.city:void 0,countrycode:g(t,"countrycode")?t.countrycode:void 0,timeOffset:g(t,"time_offset")?t.time_offset:void 0,gender:g(t,"gender")?t.gender:void 0,levelid:g(t,"levelid")?t.levelid:void 0,groups:g(t,"groups")?t.groups:void 0,contactStatus:g(t,"contact_status")?t.contact_status:void 0,company:g(t,"company")?t.company:void 0,avatarUrl:g(t,"avatar_url")?t.avatar_url:void 0,userid:g(t,"userid")?t.userid:void 0,roleid:g(t,"roleid")?t.roleid:void 0,userstatus:g(t,"userstatus")?t.userstatus:void 0,accountuserstatus:g(t,"accountuserstatus")?t.accountuserstatus:void 0,description:g(t,"description")?t.description:void 0,note:g(t,"note")?t.note:void 0,lastActivity:g(t,"last_activity")?new Date(t.last_activity):void 0,tagnames:g(t,"tagnames")?t.tagnames:void 0,groupnames:g(t,"groupnames")?t.groupnames:void 0}}function xi(t){return Ri(t)}function Ri(t,e){return t==null?t:{cursor:g(t,"cursor")?t.cursor:void 0,rows:g(t,"rows")?t.rows.map(mn):void 0}}function Fi(t){return Ai(t)}function Ai(t,e){return t==null?t:{id:g(t,"id")?t.id:void 0,agentid:g(t,"agentid")?t.agentid:void 0,agent:g(t,"agent")?t.agent:void 0,conversationid:g(t,"conversationid")?t.conversationid:void 0,ticket:g(t,"ticket")?t.ticket:void 0,parentContactid:g(t,"parent_contactid")?t.parent_contactid:void 0,company:g(t,"company")?t.company:void 0,contactid:g(t,"contactid")?t.contactid:void 0,customer:g(t,"customer")?t.customer:void 0,customerFirstname:g(t,"customer_firstname")?t.customer_firstname:void 0,customerLastname:g(t,"customer_lastname")?t.customer_lastname:void 0,customerSystemname:g(t,"customer_systemname")?t.customer_systemname:void 0,agentTicket:g(t,"agent_ticket")?t.agent_ticket:void 0,reportdate:g(t,"reportdate")?t.reportdate:void 0,reportedtime:g(t,"reportedtime")?t.reportedtime:void 0,reportedtimeHhmmss:g(t,"reportedtime_hhmmss")?t.reportedtime_hhmmss:void 0,spenttime:g(t,"spenttime")?t.spenttime:void 0,dateinvoiced:g(t,"dateinvoiced")?t.dateinvoiced:void 0,note:g(t,"note")?t.note:void 0,type:g(t,"type")?t.type:void 0}}var F=globalThis&&globalThis.__awaiter||function(t,e,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(t,e||[])).next())})};class pn extends dt{getAgentsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(di))})}getAgentsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(e,i)).value()})}getAgentsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getAgentsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(e,i)).value()})}getCallsSlaLogGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vt))})}getCallsSlaLogGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(e,i)).value()})}getCallsSlaLogGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getCallsSlaLogGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(e,i)).value()})}getChatsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(gi))})}getChatsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(e,i)).value()})}getChatsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getChatsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(e,i)).value()})}getChatsSlaLogGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vt))})}getChatsSlaLogGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(e,i)).value()})}getChatsSlaLogGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getChatsSlaLogGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(e,i)).value()})}getContactWidgetsCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getContactWidgetsCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(e,i)).value()})}getContactWidgetsListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(mi))})}getContactWidgetsList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(e,i)).value()})}getCustomerGroupsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/customer_groups",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Kt))})}getCustomerGroupsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(e,i)).value()})}getDepartmensGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getDepartmensGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(e,i)).value()})}getDepartmentsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(_i))})}getDepartmentsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(e,i)).value()})}getEventLogsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(bi))})}getEventLogsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(e,i)).value()})}getEventLogsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getEventLogsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(e,i)).value()})}getInviteAgentsGridListRaw(e,i){return F(this,void 0,void 0,function*(){if(e.departmentId===null||e.departmentId===void 0)throw new Bt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/{departmentId}/invite/agents".replace("{departmentId}",encodeURIComponent(String(e.departmentId))),method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(ki))})}getInviteAgentsGridList(e,i){return F(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(e,i)).value()})}getLanguagesGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Ti))})}getLanguagesGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(e,i)).value()})}getLanguagesGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getLanguagesGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(e,i)).value()})}getPlugindGridListRaw(e,i){return F(this,void 0,void 0,function*(){if(e.pluginPurpose===null||e.pluginPurpose===void 0)throw new Bt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.pluginPurpose!==void 0&&(n.pluginPurpose=e.pluginPurpose);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["plugin_settings.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/plugins",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Li))})}getPlugindGridList(e,i){return F(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(e,i)).value()})}getTagsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tags",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Kt))})}getTagsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(e,i)).value()})}getTicketsGridDatasetRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets_new",method:"GET",headers:r,query:n},i);return new j(s,o=>xi(o))})}getTicketsGridDataset(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(e,i)).value()})}getTicketsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(mn))})}getTicketsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(e,i)).value()})}getTicketsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTicketsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(e,i)).value()})}getTicketsSlaLogGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor),e.sortField!==void 0&&(n._sortField=e.sortField);const r={};e.timezoneOffset!==void 0&&e.timezoneOffset!==null&&(r["Timezone-Offset"]=String(e.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(vt))})}getTicketsSlaLogGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(e,i)).value()})}getTicketsSlaLogGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTicketsSlaLogGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(e,i)).value()})}getTimeReportsGridListRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.perPage!==void 0&&(n._perPage=e.perPage),e.sortDir!==void 0&&(n._sortDir=e.sortDir),e.sortField!==void 0&&(n._sortField=e.sortField),e.filters!==void 0&&(n._filters=e.filters),e.cursor!==void 0&&(n._cursor=e.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time",method:"GET",headers:r,query:n},i);return new j(s,o=>o.map(Fi))})}getTimeReportsGridList(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(e,i)).value()})}getTimeReportsGridListCountRaw(e,i){return F(this,void 0,void 0,function*(){const n={};e.filters!==void 0&&(n._filters=e.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time/count",method:"GET",headers:r,query:n},i);return new j(s,o=>pe(o))})}getTimeReportsGridListCount(e={},i){return F(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(e,i)).value()})}}const Jt={Asc:"ASC",Desc:"DESC"},He={Conversationid:"conversationid",Code:"code",Datecreated:"datecreated",Datechanged:"datechanged",Dateresolved:"dateresolved",Statuschanged:"statuschanged",Rorder:"rorder",Datedue:"datedue",Datereopen:"datereopen",Status:"status",ChannelType:"channel_type",Departmentid:"departmentid",Agentid:"agentid",Subject:"subject",Departmentname:"departmentname",Agentname:"agentname",Tags:"tags",MessagegroupsIn:"messagegroups_in",MessagegroupsOut:"messagegroups_out",Rstatus:"rstatus",LastActivity:"last_activity"},Gi={Conversationid:"conversationid",Code:"code",Datecreated:"datecreated",Datechanged:"datechanged",Dateresolved:"dateresolved",Statuschanged:"statuschanged",Rorder:"rorder",Datedue:"datedue",Datereopen:"datereopen",Status:"status",ChannelType:"channel_type",Departmentid:"departmentid",Agentid:"agentid",Subject:"subject",Departmentname:"departmentname",Agentname:"agentname",Tags:"tags",MessagegroupsIn:"messagegroups_in",MessagegroupsOut:"messagegroups_out",Rstatus:"rstatus",LastActivity:"last_activity"},Qe=ce(!1),vn=ce([]),lt=ce(null),je=ce(null),Ge=ce(!1),Ze=ce(!1),zi=ce({}),ve=ce([]),_n=ce(null),Ne=ce(null),et=ce(!0),Dt=ce(Gi.Rorder),yn=ce([]);function A(t){return he(yn)[t]||t}function Ei(t){oe(t,"svelte-864uvw","span.svelte-864uvw{margin-right:5px}.Selection.svelte-864uvw{color:var(--ticket-status-chat-background);background-color:var(--menu-selected-bg);padding:6px 10px;border-radius:4px;font-size:12px;font-style:normal;font-weight:700;line-height:20px}.text.svelte-864uvw{font-family:'Roboto', sans-serif;font-size:12px;line-height:20px}.many.svelte-864uvw{color:var(--main-textcolor);padding:2px 12px;border:1px solid var(--menu-hover-bg);border-radius:4px;font-weight:700;font-size:13px;font-family:'Roboto', sans-serif;line-height:20px;cursor:pointer}.many.loading.svelte-864uvw{border:none;padding:2px 0}")}function Mi(t){let e,i=A("Displaying ")+t[6].length+" "+A("of"),n,r,s,o=(t[1]?A("Loading.."):t[0]??A("many"))+"",a,u,l,c;return{c(){e=k("span"),n=se(i),r=U(),s=k("span"),a=se(o),v(e,"class","text svelte-864uvw"),v(s,"class",u=fe(t[2])+" svelte-864uvw")},m(d,f){N(d,e,f),y(e,n),N(d,r,f),N(d,s,f),y(s,a),l||(c=ae(s,"click",t[7]),l=!0)},p(d,f){f&64&&i!==(i=A("Displaying ")+d[6].length+" "+A("of"))&&le(n,i),f&3&&o!==(o=(d[1]?A("Loading.."):d[0]??A("many"))+"")&&le(a,o),f&4&&u!==(u=fe(d[2])+" svelte-864uvw")&&v(s,"class",u)},d(d){d&&(D(e),D(r),D(s)),l=!1,c()}}}function Ii(t){let e;return{c(){e=k("span"),e.textContent=`${A("Loading...")}`,v(e,"class","text svelte-864uvw")},m(i,n){N(i,e,n)},p:Q,d(i){i&&D(e)}}}function Bi(t){let e;function i(s,o){return s[3]?Ui:s[4].length===1?Ji:Ki}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Ki(t){let e,i=t[4].length+" rows selected",n;return{c(){e=k("span"),n=se(i),v(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=r[4].length+" rows selected")&&le(n,i)},d(r){r&&D(e)}}}function Ji(t){let e,i=t[4].length+" row selected",n;return{c(){e=k("span"),n=se(i),v(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=r[4].length+" row selected")&&le(n,i)},d(r){r&&D(e)}}}function Ui(t){let e;function i(s,o){return s[4].length>0?Hi:Wi}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Wi(t){let e;return{c(){e=k("span"),e.textContent=`${A("all rows selected")}`,v(e,"class","Selection svelte-864uvw")},m(i,n){N(i,e,n)},p:Q,d(i){i&&D(e)}}}function Hi(t){let e;function i(s,o){return s[4].length===1?Pi:Yi}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&D(e),r.d(s)}}}function Yi(t){let e,i=A("all rows selected except")+" "+t[4].length+" "+A("rows"),n;return{c(){e=k("span"),n=se(i),v(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=A("all rows selected except")+" "+r[4].length+" "+A("rows"))&&le(n,i)},d(r){r&&D(e)}}}function Pi(t){let e,i=A("all rows selected except")+" "+t[4].length+" "+A("row"),n;return{c(){e=k("span"),n=se(i),v(e,"class","Selection svelte-864uvw")},m(r,s){N(r,e,s),y(e,n)},p(r,s){s&16&&i!==(i=A("all rows selected except")+" "+r[4].length+" "+A("row"))&&le(n,i)},d(r){r&&D(e)}}}function Vi(t){let e;function i(s,o){return s[3]||s[4].length>0?Bi:s[5]?Ii:Mi}let n=i(t),r=n(t);return{c(){r.c(),e=tt()},m(s,o){r.m(s,o),N(s,e,o)},p(s,[o]){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(e.parentNode,e)))},i:Q,o:Q,d(s){s&&D(e),r.d(s)}}}function Qi(t,e,i){let n,r,s,o,a,u;re(t,je,p=>i(8,n=p)),re(t,lt,p=>i(9,r=p)),re(t,Qe,p=>i(3,s=p)),re(t,vn,p=>i(4,o=p)),re(t,Ge,p=>i(5,a=p)),re(t,ve,p=>i(6,u=p));let l=null,c=!1,d="many";function f(){i(0,l=null)}async function h(){i(2,d="many loading"),i(1,c=!0);let p=await r.getTicketsGridListCount({filters:n,timezoneOffset:new Date().getTimezoneOffset()});i(0,l=p.count),i(1,c=!1)}return t.$$.update=()=>{t.$$.dirty&256&&n&&f()},[l,c,d,s,o,a,u,h,n]}class Zi extends te{constructor(e){super(),ee(this,e,Qi,Vi,q,{},Ei)}}async function Me(t=!1){if(!(he(Ge)||!he(lt))&&(t&&(Ne.set(null),Ze.set(!1)),!(!he(Ne)&&he(Ze)))){Ge.set(!0);try{const i=await(await he(lt).getTicketsGridDatasetRaw(Xi())).value();t&&ve.set([]),ve.set([...he(ve),...i.rows]),Ne.set(i.cursor),Ze.set(!0)}catch(e){_n.set(e.toString())}Ge.set(!1)}}function Xi(){return{perPage:20,sortDir:he(et)?Jt.Asc:Jt.Desc,filters:he(je),sortField:he(Dt),cursor:he(Ne)?he(Ne):""}}function qi(t){oe(t,"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 ji(t){let e,i;return e=new $e({props:{iconLaClassName:"la-move-down"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function er(t){let e,i;return e=new $e({props:{iconLaClassName:"la-move-up"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function tr(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,p,w,C,m,R,Y;const J=[er,ji],O=[];function W(Z,B){return Z[2]?0:1}return l=W(t),c=O[l]=J[l](t),h=new Zi({}),C=new $e({props:{iconLaClassName:"la-refresh"}}),{c(){e=k("div"),i=k("div"),n=k("input"),r=U(),s=k("button"),o=se(t[0]),a=U(),u=k("button"),c.c(),d=U(),f=k("div"),I(h.$$.fragment),p=U(),w=k("button"),I(C.$$.fragment),v(n,"type","checkbox"),v(n,"class","svelte-7v4n24"),v(i,"class","headCheckbox svelte-7v4n24"),v(s,"class","Sorting svelte-7v4n24"),v(u,"class","sortButton svelte-7v4n24"),v(w,"class","spinner svelte-7v4n24"),v(w,"title",A("Reload")),Mt(w,"loading",t[4]),v(f,"class","rightPanel svelte-7v4n24"),v(e,"class","Head svelte-7v4n24")},m(Z,B){N(Z,e,B),y(e,i),y(i,n),n.checked=t[3],y(e,r),y(e,s),y(s,o),t[9](s),y(e,a),y(e,u),O[l].m(u,null),y(e,d),y(e,f),E(h,f,null),y(f,p),y(f,w),E(C,w,null),m=!0,R||(Y=[ae(n,"change",t[8]),ae(n,"click",t[5]),ae(s,"click",t[7]),ae(u,"click",t[10]),ae(w,"click",t[11])],R=!0)},p(Z,[B]){B&8&&(n.checked=Z[3]),(!m||B&1)&&le(o,Z[0]);let ne=l;l=W(Z),l!==ne&&(_e(),$(O[ne],1,1,()=>{O[ne]=null}),ye(),c=O[l],c||(c=O[l]=J[l](Z),c.c()),b(c,1),c.m(u,null)),(!m||B&16)&&Mt(w,"loading",Z[4])},i(Z){m||(b(c),b(h.$$.fragment,Z),b(C.$$.fragment,Z),m=!0)},o(Z){$(c),$(h.$$.fragment,Z),$(C.$$.fragment,Z),m=!1},d(Z){Z&&D(e),t[9](null),O[l].d(),M(h),M(C),R=!1,Ce(Y)}}}function nr(t,e,i){let n,r,s;re(t,et,R=>i(2,n=R)),re(t,Qe,R=>i(3,r=R)),re(t,Ge,R=>i(4,s=R));let{currentFilter:o}=e;const a=dn();let u,l,c;function d(){Qe.set(!r),ve.update(R=>R.map(Y=>({...Y,__selected:r})))}const f=()=>{un(et,n=!n,n)};function h(){u=l.getBoundingClientRect(),c=`position: absolute; top: ${u.bottom-58}px; left: ${u.left-265}px;`,a("openModal",{dialogStyles:c})}function p(){r=this.checked,Qe.set(r)}function w(R){ze[R?"unshift":"push"](()=>{l=R,i(1,l)})}const C=()=>f(),m=()=>Me(!0);return t.$$set=R=>{"currentFilter"in R&&i(0,o=R.currentFilter)},[o,l,n,r,s,d,f,h,p,w,C,m]}class ir extends te{constructor(e){super(),ee(this,e,nr,tr,q,{currentFilter:0},qi)}}function ut(t){switch(t){case"A":return"var(--ticket-status-answered-background)";case"T":return"var(--ticket-status-chat-background)";case"P":return"var(--ticket-status-phone-background)";case"X":return"var(--ticket-status-deleted-background)";case"B":return"";case"I":return"var(--ticket-status-deleted-background)";case"R":return"var(--ticket-status-resolved-background)";case"N":return"var(--ticket-status-new-background)";case"C":return"var(--ticket-status-open-background)";case"W":return"var(--ticket-status-postponed-background)"}}const rr=()=>{const t=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#FFEB3B","#FFC107","#FF5722","#795548"],e=Math.floor(Math.random()*t.length);return t[e]},sr=t=>{let e=t.split(" ");return e.length>1?e=e.shift().charAt(0)+e.pop().charAt(0):e=t.substring(0,2),e.toUpperCase()};function or(t){oe(t,"svelte-hbozhk",".wrapper.svelte-hbozhk{position:relative;width:var(--size);height:var(--size)}.innerImage.svelte-hbozhk,.innerInitials.svelte-hbozhk,.imageLoading.svelte-hbozhk{display:block;width:100%;height:100%;border-radius:var(--borderRadius)}.innerInitials.svelte-hbozhk{line-height:var(--size);background-color:var(--bgColor);color:var(--textColor);text-align:center;font-size:calc(var(--size) / (var(--abbrLength) + 0.5))}.imageLoading.svelte-hbozhk{background-color:var(--bgColor)}.imageLoading.svelte-hbozhk::before{content:'';display:block;height:100%;width:100%;background:linear-gradient(90deg, transparent, #ffffff38, transparent);position:absolute;top:0;left:0;animation:svelte-hbozhk-skeleton-animation 1.2s linear infinite}@keyframes svelte-hbozhk-skeleton-animation{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}")}function ar(t){let e;return{c(){e=k("div"),e.textContent=`${t[10]}`,v(e,"class","innerInitials svelte-hbozhk")},m(i,n){N(i,e,n)},p:Q,d(i){i&&D(e)}}}function lr(t){let e,i,n,r,s,o;return{c(){e=k("div"),i=k("img"),v(i,"alt",""),v(i,"class",fe("innerImage")+" svelte-hbozhk"),_t(i.src,n=t[2])||v(i,"src",n),v(e,"class",r=fe(t[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){N(a,e,u),y(e,i),s||(o=[ae(i,"error",t[15]),ae(i,"load",t[16])],s=!0)},p(a,u){u&4&&!_t(i.src,n=a[2])&&v(i,"src",n),u&256&&r!==(r=fe(a[8]?"imageLoading":"")+" svelte-hbozhk")&&v(e,"class",r)},d(a){a&&D(e),s=!1,Ce(o)}}}function ur(t){let e,i;function n(o,a){return o[2]&&!o[7]?lr:ar}let r=n(t),s=r(t);return{c(){e=k("div"),s.c(),v(e,"aria-label",t[1]),v(e,"class","wrapper svelte-hbozhk"),v(e,"style",i=t[0]+"--borderRadius:"+(t[6]?0:t[5])+"; --size:"+t[4]+"; --bgColor:"+t[9]+"; --src:"+t[2]+"; --textColor:"+t[3]+"; --abbrLength:"+t[11])},m(o,a){N(o,e,a),s.m(e,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(e,null))),a&2&&v(e,"aria-label",o[1]),a&125&&i!==(i=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&v(e,"style",i)},i:Q,o:Q,d(o){o&&D(e),s.d()}}}function cr(t,e,i){let{style:n=""}=e,{name:r="Avatar"}=e,{initials:s}=e,{src:o}=e,{bgColor:a="lightGrey"}=e,{textColor:u="white"}=e,{size:l="50px"}=e,{borderRadius:c="50%"}=e,{square:d=!1}=e,{randomBgColor:f=!1}=e;const h=f?rr():a,p=s||sr(r),w=p.length;let C=!1,m=!0;const R=()=>i(7,C=!0),Y=()=>i(8,m=!1);return t.$$set=J=>{"style"in J&&i(0,n=J.style),"name"in J&&i(1,r=J.name),"initials"in J&&i(12,s=J.initials),"src"in J&&i(2,o=J.src),"bgColor"in J&&i(13,a=J.bgColor),"textColor"in J&&i(3,u=J.textColor),"size"in J&&i(4,l=J.size),"borderRadius"in J&&i(5,c=J.borderRadius),"square"in J&&i(6,d=J.square),"randomBgColor"in J&&i(14,f=J.randomBgColor)},[n,r,o,u,l,c,d,C,m,h,p,w,s,a,f,R,Y]}class dr extends te{constructor(e){super(),ee(this,e,cr,ur,q,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},or)}}var bn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var wn={exports:{}},kn={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(i,n){return i<<n|i>>>32-n},rotr:function(i,n){return i<<32-n|i>>>n},endian:function(i){if(i.constructor==Number)return e.rotl(i,8)&16711935|e.rotl(i,24)&4278255360;for(var n=0;n<i.length;n++)i[n]=e.endian(i[n]);return i},randomBytes:function(i){for(var n=[];i>0;i--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(i){for(var n=[],r=0,s=0;r<i.length;r++,s+=8)n[s>>>5]|=i[r]<<24-s%32;return n},wordsToBytes:function(i){for(var n=[],r=0;r<i.length*32;r+=8)n.push(i[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(i){for(var n=[],r=0;r<i.length;r++)n.push((i[r]>>>4).toString(16)),n.push((i[r]&15).toString(16));return n.join("")},hexToBytes:function(i){for(var n=[],r=0;r<i.length;r+=2)n.push(parseInt(i.substr(r,2),16));return n},bytesToBase64:function(i){for(var n=[],r=0;r<i.length;r+=3)for(var s=i[r]<<16|i[r+1]<<8|i[r+2],o=0;o<4;o++)r*8+o*6<=i.length*8?n.push(t.charAt(s>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<i.length;s=++r%4)s!=0&&n.push((t.indexOf(i.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(i.charAt(r))>>>6-s*2);return n}};kn.exports=e})();var fr=kn.exports,kt={utf8:{stringToBytes:function(t){return kt.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(kt.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],i=0;i<t.length;i++)e.push(t.charCodeAt(i)&255);return e},bytesToString:function(t){for(var e=[],i=0;i<t.length;i++)e.push(String.fromCharCode(t[i]));return e.join("")}}},Ut=kt;/*!
4
2
  * Determine if an object is a Buffer
5
3
  *
6
4
  * @author Feross Aboukhadijeh <https://feross.org>
7
5
  * @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,h=0;h<a.length;h++)a[h]=(a[h]<<8|a[h]>>>24)&16711935|(a[h]<<24|a[h]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var m=r._ff,p=r._gg,v=r._hh,L=r._ii,h=0;h<a.length;h+=16){var x=l,F=c,M=f,b=d;l=m(l,c,f,d,a[h+0],7,-680876936),d=m(d,l,c,f,a[h+1],12,-389564586),f=m(f,d,l,c,a[h+2],17,606105819),c=m(c,f,d,l,a[h+3],22,-1044525330),l=m(l,c,f,d,a[h+4],7,-176418897),d=m(d,l,c,f,a[h+5],12,1200080426),f=m(f,d,l,c,a[h+6],17,-1473231341),c=m(c,f,d,l,a[h+7],22,-45705983),l=m(l,c,f,d,a[h+8],7,1770035416),d=m(d,l,c,f,a[h+9],12,-1958414417),f=m(f,d,l,c,a[h+10],17,-42063),c=m(c,f,d,l,a[h+11],22,-1990404162),l=m(l,c,f,d,a[h+12],7,1804603682),d=m(d,l,c,f,a[h+13],12,-40341101),f=m(f,d,l,c,a[h+14],17,-1502002290),c=m(c,f,d,l,a[h+15],22,1236535329),l=p(l,c,f,d,a[h+1],5,-165796510),d=p(d,l,c,f,a[h+6],9,-1069501632),f=p(f,d,l,c,a[h+11],14,643717713),c=p(c,f,d,l,a[h+0],20,-373897302),l=p(l,c,f,d,a[h+5],5,-701558691),d=p(d,l,c,f,a[h+10],9,38016083),f=p(f,d,l,c,a[h+15],14,-660478335),c=p(c,f,d,l,a[h+4],20,-405537848),l=p(l,c,f,d,a[h+9],5,568446438),d=p(d,l,c,f,a[h+14],9,-1019803690),f=p(f,d,l,c,a[h+3],14,-187363961),c=p(c,f,d,l,a[h+8],20,1163531501),l=p(l,c,f,d,a[h+13],5,-1444681467),d=p(d,l,c,f,a[h+2],9,-51403784),f=p(f,d,l,c,a[h+7],14,1735328473),c=p(c,f,d,l,a[h+12],20,-1926607734),l=v(l,c,f,d,a[h+5],4,-378558),d=v(d,l,c,f,a[h+8],11,-2022574463),f=v(f,d,l,c,a[h+11],16,1839030562),c=v(c,f,d,l,a[h+14],23,-35309556),l=v(l,c,f,d,a[h+1],4,-1530992060),d=v(d,l,c,f,a[h+4],11,1272893353),f=v(f,d,l,c,a[h+7],16,-155497632),c=v(c,f,d,l,a[h+10],23,-1094730640),l=v(l,c,f,d,a[h+13],4,681279174),d=v(d,l,c,f,a[h+0],11,-358537222),f=v(f,d,l,c,a[h+3],16,-722521979),c=v(c,f,d,l,a[h+6],23,76029189),l=v(l,c,f,d,a[h+9],4,-640364487),d=v(d,l,c,f,a[h+12],11,-421815835),f=v(f,d,l,c,a[h+15],16,530742520),c=v(c,f,d,l,a[h+2],23,-995338651),l=L(l,c,f,d,a[h+0],6,-198630844),d=L(d,l,c,f,a[h+7],10,1126891415),f=L(f,d,l,c,a[h+14],15,-1416354905),c=L(c,f,d,l,a[h+5],21,-57434055),l=L(l,c,f,d,a[h+12],6,1700485571),d=L(d,l,c,f,a[h+3],10,-1894986606),f=L(f,d,l,c,a[h+10],15,-1051523),c=L(c,f,d,l,a[h+1],21,-2054922799),l=L(l,c,f,d,a[h+8],6,1873313359),d=L(d,l,c,f,a[h+15],10,-30611744),f=L(f,d,l,c,a[h+6],15,-1560198380),c=L(c,f,d,l,a[h+13],21,1309151649),l=L(l,c,f,d,a[h+4],6,-145523070),d=L(d,l,c,f,a[h+11],10,-1120210379),f=L(f,d,l,c,a[h+2],15,718787259),c=L(c,f,d,l,a[h+9],21,-343485551),l=l+x>>>0,c=c+F>>>0,f=f+M>>>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=N("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=N("div"),u&&u.c(),i=Y(),n=N("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(){W(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(){W(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(){W(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,h,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=N("div"),m.c(),n=Y(),r=N("div"),s=N("div"),s.textContent=`${name}`,o=Y(),a=N("div"),l=ee(u),c=Y(),f=N("div"),W(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(p,v){R(p,t,v),m.m(t,null),R(p,n,v),R(p,r,v),C(r,s),C(r,o),C(r,a),C(a,l),C(r,c),C(r,f),K(d,f,null),h=!0},p(p,v){v&1&&Z(i,i=[p[4](p[0]),je(p[0]),p[3](p[0])])?(he(),$(m,1,1,P),me(),m=Wt(p),m.c(),k(m,1),m.m(t,null)):m.p(p,v),(!h||v&1)&&u!==(u=p[0].emails+"")&&ie(l,u);const L={};v&5&&(L.text=p[0].company==="Y"?"Company":p[2]("No Company")),v&1&&(L.className=(p[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),d.$set(L)},i(p){h||(k(m),k(d.$$.fragment,p),h=!0)},o(p){$(m),$(d.$$.fragment,p),h=!1},d(p){p&&(O(t),O(n),O(r)),m.d(p),J(d)}}}function sr(e){let t,i;return t=new Ft({props:{className:e[1],$$slots:{default:[rr]},$$scope:{ctx:e}}}),{c(){W(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",h="year",m="date",p="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,L=/\[([^\]]+)]|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(I){var D=["th","st","nd","rd"],_=I%100;return"["+I+(D[(_-20)%10]||D[_]||D[0])+"]"}},F=function(I,D,_){var w=String(I);return!w||w.length>=D?I:""+Array(D+1-w.length).join(_)+I},M={s:F,z:function(I){var D=-I.utcOffset(),_=Math.abs(D),w=Math.floor(_/60),S=_%60;return(D<=0?"+":"-")+F(w,2,"0")+":"+F(S,2,"0")},m:function I(D,_){if(D.date()<_.date())return-I(_,D);var w=12*(_.year()-D.year())+(_.month()-D.month()),S=D.clone().add(w,f),U=_-S<0,H=D.clone().add(w+(U?-1:1),f);return+(-(w+(_-S)/(U?S-H:H-S))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:f,y:h,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:d}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},b="en",z={};z[b]=x;var Q="$isDayjsObject",A=function(I){return I instanceof V||!(!I||!I[Q])},E=function I(D,_,w){var S;if(!D)return b;if(typeof D=="string"){var U=D.toLowerCase();z[U]&&(S=U),_&&(z[U]=_,S=U);var H=D.split("-");if(!S&&H.length>1)return I(H[0])}else{var q=D.name;z[q]=D,S=q}return!w&&S&&(b=S),S||!w&&b},B=function(I,D){if(A(I))return I.clone();var _=typeof D=="object"?D:{};return _.date=I,_.args=arguments,new V(_)},T=M;T.l=E,T.i=A,T.w=function(I,D){return B(I,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var V=function(){function I(_){this.$L=E(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[Q]=!0}var D=I.prototype;return D.parse=function(_){this.$d=function(w){var S=w.date,U=w.utc;if(S===null)return new Date(NaN);if(T.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var H=S.match(v);if(H){var q=H[2]-1||0,se=(H[7]||"0").substring(0,3);return U?new Date(Date.UTC(H[1],q,H[3]||1,H[4]||0,H[5]||0,H[6]||0,se)):new Date(H[1],q,H[3]||1,H[4]||0,H[5]||0,H[6]||0,se)}}return new Date(S)}(_),this.init()},D.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()},D.$utils=function(){return T},D.isValid=function(){return this.$d.toString()!==p},D.isSame=function(_,w){var S=B(_);return this.startOf(w)<=S&&S<=this.endOf(w)},D.isAfter=function(_,w){return B(_)<this.startOf(w)},D.isBefore=function(_,w){return this.endOf(w)<B(_)},D.$g=function(_,w,S){return T.u(_)?this[w]:this.set(S,_)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(_,w){var S=this,U=!!T.u(w)||w,H=T.p(_),q=function(Le,ue){var we=T.w(S.$u?Date.UTC(S.$y,ue,Le):new Date(S.$y,ue,Le),S);return U?we:we.endOf(l)},se=function(Le,ue){return T.w(S.toDate()[Le].apply(S.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(ue)),S)},oe=this.$W,ae=this.$M,fe=this.$D,Re="set"+(this.$u?"UTC":"");switch(H){case h:return U?q(1,0):q(31,11);case f:return U?q(1,ae):q(0,ae+1);case c:var Ce=this.$locale().weekStart||0,Ue=(oe<Ce?oe+7:oe)-Ce;return q(U?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(_){return this.startOf(_,!1)},D.$set=function(_,w){var S,U=T.p(_),H="set"+(this.$u?"UTC":""),q=(S={},S[l]=H+"Date",S[m]=H+"Date",S[f]=H+"Month",S[h]=H+"FullYear",S[u]=H+"Hours",S[a]=H+"Minutes",S[o]=H+"Seconds",S[s]=H+"Milliseconds",S)[U],se=U===l?this.$D+(w-this.$W):w;if(U===f||U===h){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(_,w){return this.clone().$set(_,w)},D.get=function(_){return this[T.p(_)]()},D.add=function(_,w){var S,U=this;_=Number(_);var H=T.p(w),q=function(ae){var fe=B(U);return T.w(fe.date(fe.date()+Math.round(ae*_)),U)};if(H===f)return this.set(f,this.$M+_);if(H===h)return this.set(h,this.$y+_);if(H===l)return q(1);if(H===c)return q(7);var se=(S={},S[a]=n,S[u]=r,S[o]=i,S)[H]||1,oe=this.$d.getTime()+_*se;return T.w(oe,this)},D.subtract=function(_,w){return this.add(-1*_,w)},D.format=function(_){var w=this,S=this.$locale();if(!this.isValid())return S.invalidDate||p;var U=_||"YYYY-MM-DDTHH:mm:ssZ",H=T.z(this),q=this.$H,se=this.$m,oe=this.$M,ae=S.weekdays,fe=S.months,Re=S.meridiem,Ce=function(ue,we,We,it){return ue&&(ue[we]||ue(w,U))||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 U.replace(L,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(S.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(S.weekdaysMin,w.$W,ae,2);case"ddd":return Ce(S.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 H}return null}(ue)||H.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(_,w,S){var U,H=this,q=T.p(w),se=B(_),oe=(se.utcOffset()-this.utcOffset())*n,ae=this-se,fe=function(){return T.m(H,se)};switch(q){case h:U=fe()/12;break;case f:U=fe();break;case d:U=fe()/3;break;case c:U=(ae-oe)/6048e5;break;case l:U=(ae-oe)/864e5;break;case u:U=ae/r;break;case a:U=ae/n;break;case o:U=ae/i;break;default:U=ae}return S?U:T.a(U)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return z[this.$L]},D.locale=function(_,w){if(!_)return this.$L;var S=this.clone(),U=E(_,w,!0);return U&&(S.$L=U),S},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()},I}(),pe=V.prototype;return B.prototype=pe,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",f],["$y",h],["$D",m]].forEach(function(I){pe[I[1]]=function(D){return this.$g(D,I[0],I[1])}}),B.extend=function(I,D){return I.$i||(I(D,V,B),I.$i=!0),B},B.locale=E,B.isDayjs=A,B.unix=function(I){return B(1e3*I)},B.en=z[b],B.Ls=z,B.p={},B})})(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,h){for(var m,p,v,L=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"}],F=x.length,M=0;M<F;M+=1){var b=x[M];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&&M>0&&(b=x[M-1]);var Q=L[b.l];h&&(z=h(""+z)),p=typeof Q=="string"?Q.replace("%d",z):Q(z,c,b.l,v);break}}if(c)return p;var A=v?L.future:L.past;return typeof A=="function"?A(p):A.replace("%s",p)},s.to=function(l,c){return a(l,c,this,!0)},s.from=function(l,c){return a(l,c,this)};var u=function(l){return l.$u?r.utc():r()};s.toNow=function(l){return this.to(u(this),l)},s.fromNow=function(l){return this.from(u(this),l)}}})})(_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=N("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:P,o:P,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=h=>{t=at(at({},t),Sn(h)),i(3,s=zt(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&&(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=N("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:P,o:P,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(){W(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=N("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):(he(),$(a[f],1,1,()=>{a[f]=null}),me(),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=N("div"),W(i.$$.fragment),n=Y(),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(){W(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=N("div"),n.c(),r=Y(),W(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):(he(),$(u[d],1,1,()=>{u[d]=null}),me(),n=u[i],n?n.p(c,f):(n=u[i]=a[i](c),n.c()),k(n,1),n.m(t,r));const h={};f&16&&(h.style=c[4]),f&2&&(h.text=c[1]),s.$set(h)},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(){W(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(){W(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(){W(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(){W(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,h,m,p,v=e[1].messagegroupsOut+"",L,x,F,M,b,z,Q,A,E,B,T,V;o=new ye({props:{iconLaClassName:"la-incoming"}}),h=new ye({props:{iconLaClassName:"la-outgoing"}}),z=new vn({props:{data:e[1].datecreated,format:e[2]}});const pe=[Or,Dr],I=[];function D(_,w){return w&2&&(A=null),A==null&&(A=_[1].datedue instanceof Date&&!isNaN(_[1].datedue)),A?0:1}return E=D(e,-1),B=I[E]=pe[E](e),{c(){t=N("span"),n=ee(i),r=Y(),s=N("div"),W(o.$$.fragment),a=Y(),u=N("span"),c=ee(l),f=Y(),d=N("div"),W(h.$$.fragment),m=Y(),p=N("span"),L=ee(v),x=Y(),F=N("div"),M=N("span"),M.textContent=`${e[4]}:`,b=Y(),W(z.$$.fragment),Q=Y(),B.c(),T=et(),y(t,"class","TicketId svelte-rl80em"),y(s,"class","Communication incomingMessages svelte-rl80em"),y(d,"class","Communication outgoingMessages svelte-rl80em"),y(F,"class","Created svelte-rl80em")},m(_,w){R(_,t,w),C(t,n),R(_,r,w),R(_,s,w),K(o,s,null),C(s,a),C(s,u),C(u,c),R(_,f,w),R(_,d,w),K(h,d,null),C(d,m),C(d,p),C(p,L),R(_,x,w),R(_,F,w),C(F,M),C(F,b),K(z,F,null),R(_,Q,w),I[E].m(_,w),R(_,T,w),V=!0},p(_,w){(!V||w&2)&&i!==(i=_[1].code+"")&&ie(n,i),(!V||w&2)&&l!==(l=_[1].messagegroupsIn+"")&&ie(c,l),(!V||w&2)&&v!==(v=_[1].messagegroupsOut+"")&&ie(L,v);const S={};w&2&&(S.data=_[1].datecreated),w&4&&(S.format=_[2]),z.$set(S);let U=E;E=D(_,w),E===U?I[E].p(_,w):(he(),$(I[U],1,1,()=>{I[U]=null}),me(),B=I[E],B?B.p(_,w):(B=I[E]=pe[E](_),B.c()),k(B,1),B.m(T.parentNode,T))},i(_){V||(k(o.$$.fragment,_),k(h.$$.fragment,_),k(z.$$.fragment,_),k(B),V=!0)},o(_){$(o.$$.fragment,_),$(h.$$.fragment,_),$(z.$$.fragment,_),$(B),V=!1},d(_){_&&(O(t),O(r),O(s),O(f),O(d),O(x),O(F),O(Q),O(T)),J(o),J(h),J(z),I[E].d(_)}}}function Ar(e){let t,i;return t=new Ft({props:{className:e[0],$$slots:{default:[Rr]},$$scope:{ctx:e}}}),{c(){W(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(){W(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(){W(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=N("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(he(),u=n.length;u<r.length;u+=1)s(u);me()}},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(){W(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(){W(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(){W(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,h,m,p,v,L;c=new Hr({props:{status:e[0].status}});const x=[Vr,Pr],F=[];function M(b,z){return z&1&&(d=null),d==null&&(d=b[0].agentname.trim()!==""),d?0:1}return h=M(e,-1),m=F[h]=x[h](e),v=new Kr({props:{tags:e[0].tags}}),{c(){t=N("h1"),n=ee(i),r=Y(),s=N("p"),a=ee(o),u=Y(),l=N("div"),W(c.$$.fragment),f=Y(),m.c(),p=Y(),W(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),F[h].m(l,null),C(l,p),K(v,l,null),L=!0},p(b,z){(!L||z&1)&&i!==(i=b[0].subject+"")&&ie(n,i),(!L||z&1)&&o!==(o=b[0].preview+"")&&ie(a,o);const Q={};z&1&&(Q.status=b[0].status),c.$set(Q);let A=h;h=M(b,z),h===A?F[h].p(b,z):(he(),$(F[A],1,1,()=>{F[A]=null}),me(),m=F[h],m?m.p(b,z):(m=F[h]=x[h](b),m.c()),k(m,1),m.m(l,p));const E={};z&1&&(E.tags=b[0].tags),v.$set(E)},i(b){L||(k(c.$$.fragment,b),k(m),k(v.$$.fragment,b),L=!0)},o(b){$(c.$$.fragment,b),$(m),$(v.$$.fragment,b),L=!1},d(b){b&&(O(t),O(r),O(s),O(u),O(l)),J(c),F[h].d(),J(v)}}}function Zr(e){let t,i;return t=new Ft({props:{className:e[1],$$slots:{default:[Qr]},$$scope:{ctx:e}}}),{c(){W(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"
6
+ */var gr=function(t){return t!=null&&($n(t)||hr(t)||!!t._isBuffer)};function $n(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function hr(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&$n(t.slice(0,0))}(function(){var t=fr,e=Ut.utf8,i=gr,n=Ut.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=e.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=t.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,d=-1732584194,f=271733878,h=0;h<a.length;h++)a[h]=(a[h]<<8|a[h]>>>24)&16711935|(a[h]<<24|a[h]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var p=r._ff,w=r._gg,C=r._hh,m=r._ii,h=0;h<a.length;h+=16){var R=l,Y=c,J=d,O=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=w(l,c,d,f,a[h+1],5,-165796510),f=w(f,l,c,d,a[h+6],9,-1069501632),d=w(d,f,l,c,a[h+11],14,643717713),c=w(c,d,f,l,a[h+0],20,-373897302),l=w(l,c,d,f,a[h+5],5,-701558691),f=w(f,l,c,d,a[h+10],9,38016083),d=w(d,f,l,c,a[h+15],14,-660478335),c=w(c,d,f,l,a[h+4],20,-405537848),l=w(l,c,d,f,a[h+9],5,568446438),f=w(f,l,c,d,a[h+14],9,-1019803690),d=w(d,f,l,c,a[h+3],14,-187363961),c=w(c,d,f,l,a[h+8],20,1163531501),l=w(l,c,d,f,a[h+13],5,-1444681467),f=w(f,l,c,d,a[h+2],9,-51403784),d=w(d,f,l,c,a[h+7],14,1735328473),c=w(c,d,f,l,a[h+12],20,-1926607734),l=C(l,c,d,f,a[h+5],4,-378558),f=C(f,l,c,d,a[h+8],11,-2022574463),d=C(d,f,l,c,a[h+11],16,1839030562),c=C(c,d,f,l,a[h+14],23,-35309556),l=C(l,c,d,f,a[h+1],4,-1530992060),f=C(f,l,c,d,a[h+4],11,1272893353),d=C(d,f,l,c,a[h+7],16,-155497632),c=C(c,d,f,l,a[h+10],23,-1094730640),l=C(l,c,d,f,a[h+13],4,681279174),f=C(f,l,c,d,a[h+0],11,-358537222),d=C(d,f,l,c,a[h+3],16,-722521979),c=C(c,d,f,l,a[h+6],23,76029189),l=C(l,c,d,f,a[h+9],4,-640364487),f=C(f,l,c,d,a[h+12],11,-421815835),d=C(d,f,l,c,a[h+15],16,530742520),c=C(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+R>>>0,c=c+Y>>>0,d=d+J>>>0,f=f+O>>>0}return t.endian([l,c,d,f])};r._ff=function(s,o,a,u,l,c,d){var f=s+(o&a|~o&u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._gg=function(s,o,a,u,l,c,d){var f=s+(o&u|a&~u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._hh=function(s,o,a,u,l,c,d){var f=s+(o^a^u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._ii=function(s,o,a,u,l,c,d){var f=s+(a^(o|~u))+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._blocksize=16,r._digestsize=16,wn.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=t.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):t.bytesToHex(a)}})();var mr=wn.exports;const pr=Nt(mr);function vr(t){return[...t].reduce((e,i)=>Math.imul(31,e)+i.charCodeAt(0)|0,0)}function _r(t){oe(t,"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 yr(t){let e,i,n;const r=t[2].default,s=Ie(r,t,t[1],null);return{c(){e=k("div"),s&&s.c(),v(e,"class",i="Column "+t[0]+" svelte-in3p8g")},m(o,a){N(o,e,a),s&&s.m(e,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&Ke(s,r,o,o[1],n?Be(r,o[1],a,null):Je(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-in3p8g"))&&v(e,"class",i)},i(o){n||(b(s,o),n=!0)},o(o){$(s,o),n=!1},d(o){o&&D(e),s&&s.d(o)}}}function br(t,e,i){let{$$slots:n={},$$scope:r}=e,{className:s=""}=e;return t.$$set=o=>{"className"in o&&i(0,s=o.className),"$$scope"in o&&i(1,r=o.$$scope)},[s,r,n]}class Ot extends te{constructor(e){super(),ee(this,e,br,yr,q,{className:0},_r)}}function wr(t){oe(t,"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 kr(t){let e,i,n,r,s,o;const a=t[4].default,u=Ie(a,t,t[3],null);return{c(){e=k("div"),u&&u.c(),i=U(),n=k("span"),r=se(t[0]),v(n,"class","text"),v(e,"class",s="Tag "+t[1]+" svelte-1d2a8s6"),v(e,"style",t[2])},m(l,c){N(l,e,c),u&&u.m(e,null),y(e,i),y(e,n),y(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Ke(u,a,l,l[3],o?Be(a,l[3],c,null):Je(l[3]),null),(!o||c&1)&&le(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1d2a8s6"))&&v(e,"class",s),(!o||c&4)&&v(e,"style",l[2])},i(l){o||(b(u,l),o=!0)},o(l){$(u,l),o=!1},d(l){l&&D(e),u&&u.d(l)}}}function $r(t,e,i){let{$$slots:n={},$$scope:r}=e,{text:s}=e,{className:o=""}=e,{style:a=""}=e;return t.$$set=u=>{"text"in u&&i(0,s=u.text),"className"in u&&i(1,o=u.className),"style"in u&&i(2,a=u.style),"$$scope"in u&&i(3,r=u.$$scope)},[s,o,a,r,n]}class ft extends te{constructor(e){super(),ee(this,e,$r,kr,q,{text:0,className:1,style:2},wr)}}function Tr(t){oe(t,"svelte-1ify73x","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}.IconTag .Icon{display:flex;align-items:center;justify-content:center;font-size:16px;width:16px;height:16px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function Cr(t){let e,i;return e=new $e({props:{iconLaClassName:t[2]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Lr(t){let e,i;return e=new ft({props:{text:t[0],className:t[3],style:t[1],$$slots:{default:[Cr]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.text=n[0]),r&2&&(s.style=n[1]),r&36&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Sr(t,e,i){let{text:n}=e,{className:r=""}=e,{style:s=""}=e,{iconLaClassName:o}=e,a=`IconTag ${r}`;return t.$$set=u=>{"text"in u&&i(0,n=u.text),"className"in u&&i(4,r=u.className),"style"in u&&i(1,s=u.style),"iconLaClassName"in u&&i(2,o=u.iconLaClassName)},[n,s,o,a,r]}class gt extends te{constructor(e){super(),ee(this,e,Sr,Lr,q,{text:0,className:4,style:1,iconLaClassName:2},Tr)}}function Dr(t){oe(t,"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 Wt(t){let e,i;return e=new dr({props:{bgColor:t[5](t[0]),name:t[3](t[0]),src:t[4](t[0])}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.bgColor=n[5](n[0])),r&1&&(s.name=n[3](n[0])),r&1&&(s.src=n[4](n[0])),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Nr(t){let e,i=[t[5](t[0]),t[3](t[0]),t[4](t[0])],n,r,s,o,a,u,l,c=t[0].emails+"",d,f,h,p,w,C=Wt(t);return p=new gt({props:{text:t[0].company==="Y"?"Company":A("No Company"),className:(t[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){e=k("div"),C.c(),n=U(),r=k("div"),s=k("div"),o=se(t[2]),u=U(),l=k("div"),d=se(c),f=U(),h=k("div"),I(p.$$.fragment),v(e,"class","avatar svelte-416m4x"),v(s,"class",a=fe(t[2]?"name":"no name")+" svelte-416m4x"),v(l,"class","email svelte-416m4x"),v(h,"class","companyTag svelte-416m4x"),v(r,"class","texts svelte-416m4x")},m(m,R){N(m,e,R),C.m(e,null),N(m,n,R),N(m,r,R),y(r,s),y(s,o),y(r,u),y(r,l),y(l,d),y(r,f),y(r,h),E(p,h,null),w=!0},p(m,R){R&1&&q(i,i=[m[5](m[0]),m[3](m[0]),m[4](m[0])])?(_e(),$(C,1,1,Q),ye(),C=Wt(m),C.c(),b(C,1),C.m(e,null)):C.p(m,R),(!w||R&4)&&le(o,m[2]),(!w||R&4&&a!==(a=fe(m[2]?"name":"no name")+" svelte-416m4x"))&&v(s,"class",a),(!w||R&1)&&c!==(c=m[0].emails+"")&&le(d,c);const Y={};R&1&&(Y.text=m[0].company==="Y"?"Company":A("No Company")),R&1&&(Y.className=(m[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),p.$set(Y)},i(m){w||(b(C),b(p.$$.fragment,m),w=!0)},o(m){$(C),$(p.$$.fragment,m),w=!1},d(m){m&&(D(e),D(n),D(r)),C.d(m),M(p)}}}function Or(t){let e,i;return e=new Ot({props:{className:t[1],$$slots:{default:[Nr]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&69&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function xr(t,e,i){let n,{row:r}=e,{className:s="userColumn"}=e;function o(l){if(!l)return"";let c=l.firstname+" "+l.lastname;return c.trim()||(c=l.systemName),c}function a(l){let c=l.avatarUrl;return c||(c="https://www.gravatar.com/avatar/"+pr(l.emails[0]??"")+"?s=200&d=404"),c}function u(l){let c;l?c=vr(o(l)+l.emails):c=Math.floor(Math.random()*16777215);let d=(c&16711680)>>16,f=(c&65280)>>8,h=c&255;return d+f+h<150&&(d=150),d+f+h>400&&(d=0),`rgb(${d},${f},${h})`}return t.$$set=l=>{"row"in l&&i(0,r=l.row),"className"in l&&i(1,s=l.className)},t.$$.update=()=>{t.$$.dirty&1&&i(2,n=r.name)},[r,s,n,o,a,u]}class Rr extends te{constructor(e){super(),ee(this,e,xr,Or,q,{row:0,className:1},Dr)}}var Tn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(bn,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",w="Invalid Date",C=/^(\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,R={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 L=["th","st","nd","rd"],_=z%100;return"["+z+(L[(_-20)%10]||L[_]||L[0])+"]"}},Y=function(z,L,_){var S=String(z);return!S||S.length>=L?z:""+Array(L+1-S.length).join(_)+z},J={s:Y,z:function(z){var L=-z.utcOffset(),_=Math.abs(L),S=Math.floor(_/60),T=_%60;return(L<=0?"+":"-")+Y(S,2,"0")+":"+Y(T,2,"0")},m:function z(L,_){if(L.date()<_.date())return-z(_,L);var S=12*(_.year()-L.year())+(_.month()-L.month()),T=L.clone().add(S,d),G=_-T<0,K=L.clone().add(S+(G?-1:1),d);return+(-(S+(_-T)/(G?T-K:K-T))||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}},O="en",W={};W[O]=R;var Z="$isDayjsObject",B=function(z){return z instanceof be||!(!z||!z[Z])},ne=function z(L,_,S){var T;if(!L)return O;if(typeof L=="string"){var G=L.toLowerCase();W[G]&&(T=G),_&&(W[G]=_,T=G);var K=L.split("-");if(!T&&K.length>1)return z(K[0])}else{var V=L.name;W[V]=L,T=V}return!S&&T&&(O=T),T||!S&&O},X=function(z,L){if(B(z))return z.clone();var _=typeof L=="object"?L:{};return _.date=z,_.args=arguments,new be(_)},P=J;P.l=ne,P.i=B,P.w=function(z,L){return X(z,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var be=function(){function z(_){this.$L=ne(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[Z]=!0}var L=z.prototype;return L.parse=function(_){this.$d=function(S){var T=S.date,G=S.utc;if(T===null)return new Date(NaN);if(P.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var K=T.match(C);if(K){var V=K[2]-1||0,ie=(K[7]||"0").substring(0,3);return G?new Date(Date.UTC(K[1],V,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ie)):new Date(K[1],V,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ie)}}return new Date(T)}(_),this.init()},L.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()},L.$utils=function(){return P},L.isValid=function(){return this.$d.toString()!==w},L.isSame=function(_,S){var T=X(_);return this.startOf(S)<=T&&T<=this.endOf(S)},L.isAfter=function(_,S){return X(_)<this.startOf(S)},L.isBefore=function(_,S){return this.endOf(S)<X(_)},L.$g=function(_,S,T){return P.u(_)?this[S]:this.set(T,_)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(_,S){var T=this,G=!!P.u(S)||S,K=P.p(_),V=function(Le,de){var Te=P.w(T.$u?Date.UTC(T.$y,de,Le):new Date(T.$y,de,Le),T);return G?Te:Te.endOf(l)},ie=function(Le,de){return P.w(T.toDate()[Le].apply(T.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(de)),T)},x=this.$W,H=this.$M,ue=this.$D,ke="set"+(this.$u?"UTC":"");switch(K){case h:return G?V(1,0):V(31,11);case d:return G?V(1,H):V(0,H+1);case c:var me=this.$locale().weekStart||0,Ue=(x<me?x+7:x)-me;return V(G?ue-Ue:ue+(6-Ue),H);case l:case p:return ie(ke+"Hours",0);case u:return ie(ke+"Minutes",1);case a:return ie(ke+"Seconds",2);case o:return ie(ke+"Milliseconds",3);default:return this.clone()}},L.endOf=function(_){return this.startOf(_,!1)},L.$set=function(_,S){var T,G=P.p(_),K="set"+(this.$u?"UTC":""),V=(T={},T[l]=K+"Date",T[p]=K+"Date",T[d]=K+"Month",T[h]=K+"FullYear",T[u]=K+"Hours",T[a]=K+"Minutes",T[o]=K+"Seconds",T[s]=K+"Milliseconds",T)[G],ie=G===l?this.$D+(S-this.$W):S;if(G===d||G===h){var x=this.clone().set(p,1);x.$d[V](ie),x.init(),this.$d=x.set(p,Math.min(this.$D,x.daysInMonth())).$d}else V&&this.$d[V](ie);return this.init(),this},L.set=function(_,S){return this.clone().$set(_,S)},L.get=function(_){return this[P.p(_)]()},L.add=function(_,S){var T,G=this;_=Number(_);var K=P.p(S),V=function(H){var ue=X(G);return P.w(ue.date(ue.date()+Math.round(H*_)),G)};if(K===d)return this.set(d,this.$M+_);if(K===h)return this.set(h,this.$y+_);if(K===l)return V(1);if(K===c)return V(7);var ie=(T={},T[a]=n,T[u]=r,T[o]=i,T)[K]||1,x=this.$d.getTime()+_*ie;return P.w(x,this)},L.subtract=function(_,S){return this.add(-1*_,S)},L.format=function(_){var S=this,T=this.$locale();if(!this.isValid())return T.invalidDate||w;var G=_||"YYYY-MM-DDTHH:mm:ssZ",K=P.z(this),V=this.$H,ie=this.$m,x=this.$M,H=T.weekdays,ue=T.months,ke=T.meridiem,me=function(de,Te,We,it){return de&&(de[Te]||de(S,G))||We[Te].slice(0,it)},Ue=function(de){return P.s(V%12||12,de,"0")},Le=ke||function(de,Te,We){var it=de<12?"AM":"PM";return We?it.toLowerCase():it};return G.replace(m,function(de,Te){return Te||function(We){switch(We){case"YY":return String(S.$y).slice(-2);case"YYYY":return P.s(S.$y,4,"0");case"M":return x+1;case"MM":return P.s(x+1,2,"0");case"MMM":return me(T.monthsShort,x,ue,3);case"MMMM":return me(ue,x);case"D":return S.$D;case"DD":return P.s(S.$D,2,"0");case"d":return String(S.$W);case"dd":return me(T.weekdaysMin,S.$W,H,2);case"ddd":return me(T.weekdaysShort,S.$W,H,3);case"dddd":return H[S.$W];case"H":return String(V);case"HH":return P.s(V,2,"0");case"h":return Ue(1);case"hh":return Ue(2);case"a":return Le(V,ie,!0);case"A":return Le(V,ie,!1);case"m":return String(ie);case"mm":return P.s(ie,2,"0");case"s":return String(S.$s);case"ss":return P.s(S.$s,2,"0");case"SSS":return P.s(S.$ms,3,"0");case"Z":return K}return null}(de)||K.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(_,S,T){var G,K=this,V=P.p(S),ie=X(_),x=(ie.utcOffset()-this.utcOffset())*n,H=this-ie,ue=function(){return P.m(K,ie)};switch(V){case h:G=ue()/12;break;case d:G=ue();break;case f:G=ue()/3;break;case c:G=(H-x)/6048e5;break;case l:G=(H-x)/864e5;break;case u:G=H/r;break;case a:G=H/n;break;case o:G=H/i;break;default:G=H}return T?G:P.a(G)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return W[this.$L]},L.locale=function(_,S){if(!_)return this.$L;var T=this.clone(),G=ne(_,S,!0);return G&&(T.$L=G),T},L.clone=function(){return P.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},z}(),we=be.prototype;return X.prototype=we,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",h],["$D",p]].forEach(function(z){we[z[1]]=function(L){return this.$g(L,z[0],z[1])}}),X.extend=function(z,L){return z.$i||(z(L,be,X),z.$i=!0),X},X.locale=ne,X.isDayjs=B,X.unix=function(z){return X(1e3*z)},X.en=W[O],X.Ls=W,X.p={},X})})(Tn);var Fr=Tn.exports;const Pe=Nt(Fr);var Cn={exports:{}};(function(t,e){(function(i,n){t.exports=n()})(bn,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,w,C,m=d.$locale().relativeTime||o,R=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"}],Y=R.length,J=0;J<Y;J+=1){var O=R[J];O.d&&(p=f?r(l).diff(d,O.d,!0):d.diff(l,O.d,!0));var W=(i.rounding||Math.round)(Math.abs(p));if(C=p>0,W<=O.r||!O.r){W<=1&&J>0&&(O=R[J-1]);var Z=m[O.l];h&&(W=h(""+W)),w=typeof Z=="string"?Z.replace("%d",W):Z(W,c,O.l,C);break}}if(c)return w;var B=C?m.future:m.past;return typeof B=="function"?B(w):B.replace("%s",w)},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)}}})})(Cn);var Ar=Cn.exports;const Gr=Nt(Ar);Pe.extend(Gr);function zr(t){let e,i,n=[t[3],{title:t[2]},{datetime:t[1]}],r={};for(let s=0;s<n.length;s+=1)r=at(r,n[s]);return{c(){e=k("time"),i=se(t[0]),zt(e,r)},m(s,o){N(s,e,o),y(e,i)},p(s,[o]){o&1&&Un(i,s[0],r.contenteditable),zt(e,r=Zn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:Q,o:Q,d(s){s&&D(e)}}}function Er(t,e,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=Gt(e,r),{timestamp:o=new Date().toISOString()}=e,{format:a="MMM DD, YYYY"}=e,{relative:u=!1}=e,{live:l=!1}=e,{formatted:c=""}=e,d;const f=60*1e3;return ct(()=>()=>clearInterval(d)),t.$$set=h=>{e=at(at({},e),zn(h)),i(3,s=Gt(e,r)),"timestamp"in h&&i(1,o=h.timestamp),"format"in h&&i(4,a=h.format),"relative"in h&&i(5,u=h.relative),"live"in h&&i(6,l=h.live),"formatted"in h&&i(0,c=h.formatted)},t.$$.update=()=>{t.$$.dirty&98&&u&&l!==!1&&(d=setInterval(()=>{i(0,c=Pe(o).from())},Math.abs(typeof l=="number"?l:f))),t.$$.dirty&50&&i(0,c=u?Pe(o).from():Pe(o).format(a)),t.$$.dirty&50&&i(2,n=u?Pe(o).format(a):void 0)},[c,o,n,s,a,u,l]}class Mr extends te{constructor(e){super(),ee(this,e,Er,zr,q,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function Ir(t){oe(t,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function Br(t){let e;return{c(){e=k("span"),e.textContent=`${A("Invalid data")}`,v(e,"class","invalid svelte-1o3wy2t")},m(i,n){N(i,e,n)},p:Q,i:Q,o:Q,d(i){i&&D(e)}}}function Kr(t){let e,i;return e=new Mr({props:{style:t[2],timestamp:t[0],format:t[1],relative:t[3]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&4&&(s.style=n[2]),r&1&&(s.timestamp=n[0]),r&2&&(s.format=n[1]),r&8&&(s.relative=n[3]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Jr(t){let e,i,n,r,s;const o=[Kr,Br],a=[];function u(l,c){return c&1&&(i=null),i==null&&(i=l[0]instanceof Date&&!isNaN(l[0].getTime())),i?0:1}return n=u(t,-1),r=a[n]=o[n](t),{c(){e=k("div"),r.c(),v(e,"class","Date svelte-1o3wy2t")},m(l,c){N(l,e,c),a[n].m(e,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(_e(),$(a[d],1,1,()=>{a[d]=null}),ye(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),b(r,1),r.m(e,null))},i(l){s||(b(r),s=!0)},o(l){$(r),s=!1},d(l){l&&D(e),a[n].d()}}}function Ur(t,e,i){let{data:n}=e,{format:r=""}=e,{style:s=""}=e,{relative:o=!1}=e;return t.$$set=a=>{"data"in a&&i(0,n=a.data),"format"in a&&i(1,r=a.format),"style"in a&&i(2,s=a.style),"relative"in a&&i(3,o=a.relative)},[n,r,s,o]}class $t extends te{constructor(e){super(),ee(this,e,Ur,Jr,q,{data:0,format:1,style:2,relative:3},Ir)}}function Wr(t){oe(t,"svelte-1wdh20c",".IconWrapper.svelte-1wdh20c{display:flex;justify-content:center;align-items:center;margin:4px 6px}.CombinedTag.svelte-1wdh20c{display:inline-flex;flex-direction:row;border-radius:4px;margin-top:2px;margin-right:6px;padding-right:0}.Department.svelte-1wdh20c{display:flex;background-color:var(--department-bg-color)}.Pending.svelte-1wdh20c{background-color:var(--ok-color)}.Overdue.svelte-1wdh20c{background-color:var(--notif-error-color)}")}function Hr(t){let e,i,n,r;i=new $e({props:{iconLaClassName:t[2]}});const s=t[8].default,o=Ie(s,t,t[7],null);return{c(){e=k("div"),I(i.$$.fragment),n=U(),o&&o.c(),v(e,"class","IconWrapper svelte-1wdh20c")},m(a,u){N(a,e,u),E(i,e,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)&&Ke(o,s,a,a[7],r?Be(s,a[7],u,null):Je(a[7]),null)},i(a){r||(b(i.$$.fragment,a),b(o,a),r=!0)},o(a){$(i.$$.fragment,a),$(o,a),r=!1},d(a){a&&(D(e),D(n)),M(i),o&&o.d(a)}}}function Yr(t){let e,i;return e=new gt({props:{style:t[3],text:t[0],iconLaClassName:t[2],className:"Combined"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&8&&(s.style=n[3]),r&1&&(s.text=n[0]),r&4&&(s.iconLaClassName=n[2]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Pr(t){let e,i,n,r,s,o;const a=[Yr,Hr],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(t),n=u[i]=a[i](t),s=new ft({props:{style:t[4],text:t[1]}}),{c(){e=k("div"),n.c(),r=U(),I(s.$$.fragment),v(e,"class",fe(t[5])+" svelte-1wdh20c")},m(c,d){N(c,e,d),u[i].m(e,null),y(e,r),E(s,e,null),o=!0},p(c,[d]){let f=i;i=l(c),i===f?u[i].p(c,d):(_e(),$(u[f],1,1,()=>{u[f]=null}),ye(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),b(n,1),n.m(e,r));const h={};d&16&&(h.style=c[4]),d&2&&(h.text=c[1]),s.$set(h)},i(c){o||(b(n),b(s.$$.fragment,c),o=!0)},o(c){$(n),$(s.$$.fragment,c),o=!1},d(c){c&&D(e),u[i].d(),M(s)}}}function Vr(t,e,i){let{$$slots:n={},$$scope:r}=e,{iconText:s=""}=e,{tagText:o}=e,{iconLaClassName:a}=e,{className:u}=e,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let d=`CombinedTag ${u}`;return t.$$set=f=>{"iconText"in f&&i(0,s=f.iconText),"tagText"in f&&i(1,o=f.tagText),"iconLaClassName"in f&&i(2,a=f.iconLaClassName),"className"in f&&i(6,u=f.className),"$$scope"in f&&i(7,r=f.$$scope)},[s,o,a,l,c,d,u,r,n]}class Ln extends te{constructor(e){super(),ee(this,e,Vr,Pr,q,{iconText:0,tagText:1,iconLaClassName:2,className:6},Wr)}}function Qr(t){let e,i;return e=new $t({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:t[1],relative:!0}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Zr(t){let e,i;return e=new Ln({props:{iconLaClassName:t[3],tagText:t[0],className:t[2],$$slots:{default:[Qr]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconLaClassName=n[3]),r&1&&(s.tagText=n[0]),r&4&&(s.className=n[2]),r&34&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function Xr(t,e,i){let n,{tagText:r}=e,{due:s}=e,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return t.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},t.$$.update=()=>{t.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class qr extends te{constructor(e){super(),ee(this,e,Xr,Zr,q,{tagText:0,due:1})}}function jr(t){oe(t,"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 es(t){let e,i;return e=new ft({props:{text:A("No SLA"),className:"SLA"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p:Q,i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ts(t){let e,i;return e=new qr({props:{tagText:"First answer",due:t[1].datedue}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ns(t){let e,i,n=t[1].code+"",r,s,o,a,u,l,c,d=t[1].messagegroupsIn+"",f,h,p,w,C,m,R=t[1].messagegroupsOut+"",Y,J,O,W,Z,B,ne,X,P,be,we,z,L,_,S,T,G;u=new $e({props:{iconLaClassName:"la-incoming"}}),w=new $e({props:{iconLaClassName:"la-outgoing"}}),B=new $t({props:{data:t[1].datecreated,format:t[2]}}),we=new $t({props:{data:t[1].datechanged,format:t[2]}});const K=[ts,es],V=[];function ie(x,H){return H&2&&(L=null),L==null&&(L=x[1].datedue instanceof Date&&!isNaN(x[1].datedue)),L?0:1}return _=ie(t,-1),S=V[_]=K[_](t),{c(){e=k("div"),i=k("span"),r=se(n),s=U(),o=k("div"),a=k("div"),I(u.$$.fragment),l=U(),c=k("span"),f=se(d),h=U(),p=k("div"),I(w.$$.fragment),C=U(),m=k("span"),Y=se(R),J=U(),O=k("div"),W=k("span"),W.textContent=`${A("Created")}:`,Z=U(),I(B.$$.fragment),ne=U(),X=k("div"),P=k("span"),P.textContent=`${A("Changed")}:`,be=U(),I(we.$$.fragment),z=U(),S.c(),T=tt(),v(i,"class","TicketId svelte-nbfjry"),v(a,"class","Communication incomingMessages svelte-nbfjry"),v(p,"class","Communication outgoingMessages svelte-nbfjry"),v(o,"class","arrows"),v(e,"class","ticketDetails svelte-nbfjry"),v(O,"class","Created svelte-nbfjry"),v(X,"class","Changed svelte-nbfjry")},m(x,H){N(x,e,H),y(e,i),y(i,r),y(e,s),y(e,o),y(o,a),E(u,a,null),y(a,l),y(a,c),y(c,f),y(o,h),y(o,p),E(w,p,null),y(p,C),y(p,m),y(m,Y),N(x,J,H),N(x,O,H),y(O,W),y(O,Z),E(B,O,null),N(x,ne,H),N(x,X,H),y(X,P),y(X,be),E(we,X,null),N(x,z,H),V[_].m(x,H),N(x,T,H),G=!0},p(x,H){(!G||H&2)&&n!==(n=x[1].code+"")&&le(r,n),(!G||H&2)&&d!==(d=x[1].messagegroupsIn+"")&&le(f,d),(!G||H&2)&&R!==(R=x[1].messagegroupsOut+"")&&le(Y,R);const ue={};H&2&&(ue.data=x[1].datecreated),H&4&&(ue.format=x[2]),B.$set(ue);const ke={};H&2&&(ke.data=x[1].datechanged),H&4&&(ke.format=x[2]),we.$set(ke);let me=_;_=ie(x,H),_===me?V[_].p(x,H):(_e(),$(V[me],1,1,()=>{V[me]=null}),ye(),S=V[_],S?S.p(x,H):(S=V[_]=K[_](x),S.c()),b(S,1),S.m(T.parentNode,T))},i(x){G||(b(u.$$.fragment,x),b(w.$$.fragment,x),b(B.$$.fragment,x),b(we.$$.fragment,x),b(S),G=!0)},o(x){$(u.$$.fragment,x),$(w.$$.fragment,x),$(B.$$.fragment,x),$(we.$$.fragment,x),$(S),G=!1},d(x){x&&(D(e),D(J),D(O),D(ne),D(X),D(z),D(T)),M(u),M(w),M(B),M(we),V[_].d(x)}}}function is(t){let e,i;return e=new Ot({props:{className:t[0],$$slots:{default:[ns]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&14&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function rs(t,e,i){let{className:n="importanceColumn"}=e,{row:r}=e,{format:s="YYYY-MM-DD HH:mm:ss"}=e;return t.$$set=o=>{"className"in o&&i(0,n=o.className),"row"in o&&i(1,r=o.row),"format"in o&&i(2,s=o.format)},[n,r,s]}class ss extends te{constructor(e){super(),ee(this,e,rs,is,q,{className:0,row:1,format:2},jr)}}function os(t){oe(t,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function as(t){let e,i;return e=new ft({props:{style:"color: #"+t[2]+"; background: #"+t[1],text:t[0],className:"TicketTag"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&6&&(s.style="color: #"+n[2]+"; background: #"+n[1]),r&1&&(s.text=n[0]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ls(t,e,i){let n,r,s,{tagId:o}=e;return t.$$set=a=>{"tagId"in a&&i(3,o=a.tagId)},t.$$.update=()=>{var a,u,l;t.$$.dirty&8&&i(2,n=((a=translateags[o])==null?void 0:a.color)??0),t.$$.dirty&8&&i(1,r=((u=translateags[o])==null?void 0:u.backgroundcolor)??0),t.$$.dirty&8&&i(0,s=((l=translateags[o])==null?void 0:l.name)??"")},[s,r,n,o]}class us extends te{constructor(e){super(),ee(this,e,ls,as,q,{tagId:3},os)}}function Ht(t,e,i){const n=t.slice();return n[1]=e[i],n}function Yt(t){let e,i;return e=new us({props:{tagId:t[1]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function cs(t){let e,i,n=Ee(t[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Yt(Ht(t,n,o));const s=o=>$(r[o],1,1,()=>{r[o]=null});return{c(){e=k("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){N(o,e,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);i=!0},p(o,[a]){if(a&1){n=Ee(o[0]);let u;for(u=0;u<n.length;u+=1){const l=Ht(o,n,u);r[u]?(r[u].p(l,a),b(r[u],1)):(r[u]=Yt(l),r[u].c(),b(r[u],1),r[u].m(e,null))}for(_e(),u=n.length;u<r.length;u+=1)s(u);ye()}},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)$(r[a]);i=!1},d(o){o&&D(e),Lt(r,o)}}}function ds(t,e,i){let{tags:n}=e;return t.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class fs extends te{constructor(e){super(),ee(this,e,ds,cs,q,{tags:0})}}function gs(t){oe(t,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function hs(t){let e,i;return e=new gt({props:{className:t[1][t[0]].text,style:"color: white; background-color: "+ut(t[0]),text:t[1][t[0]].text,iconLaClassName:t[1][t[0]].icon}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[1][n[0]].text),r&1&&(s.style="color: white; background-color: "+ut(n[0])),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ms(t,e,i){let{status:n}=e;const r={A:{text:A("Answered"),icon:"la-ticket-answered"},T:{text:A("Chatting"),icon:"la-chatting"},P:{text:A("Calling"),icon:"la-call"},X:{text:A("Deleted"),icon:"la-ticket-deleted"},B:{text:A("Spam"),icon:"la-spam"},I:{text:A("Init"),icon:""},R:{text:A("Resolved"),icon:"la-ticket-resolved"},N:{text:A("New"),icon:"la-ticket-new"},C:{text:A("Open"),icon:"la-ticket-open"},W:{text:A("Postponed"),icon:"la-ticket-postponed"}};return t.$$set=s=>{"status"in s&&i(0,n=s.status)},[n,r]}class ps extends te{constructor(e){super(),ee(this,e,ms,hs,q,{status:0},gs)}}function vs(t){oe(t,"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 _s(t){let e,i;return e=new gt({props:{className:"Department",text:t[0].departmentname,iconLaClassName:"la-department"}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ys(t){let e,i;return e=new Ln({props:{className:"Department",tagText:t[0].agentname,iconLaClassName:"la-department",iconText:t[0].departmentname}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function bs(t){let e,i=t[0].subject+"",n,r,s,o=t[0].preview+"",a,u,l,c,d,f,h,p,w,C,m;c=new ps({props:{status:t[0].status}});const R=[ys,_s],Y=[];function J(O,W){return W&1&&(f=null),f==null&&(f=O[0].agentname.trim()!==""),f?0:1}return h=J(t,-1),p=Y[h]=R[h](t),C=new fs({props:{tags:t[0].tags}}),{c(){e=k("h1"),n=se(i),r=U(),s=k("p"),a=se(o),u=U(),l=k("div"),I(c.$$.fragment),d=U(),p.c(),w=U(),I(C.$$.fragment),v(e,"class","subject svelte-nfaksv"),v(s,"class","preview svelte-nfaksv"),v(l,"class","additional svelte-nfaksv")},m(O,W){N(O,e,W),y(e,n),N(O,r,W),N(O,s,W),y(s,a),N(O,u,W),N(O,l,W),E(c,l,null),y(l,d),Y[h].m(l,null),y(l,w),E(C,l,null),m=!0},p(O,W){(!m||W&1)&&i!==(i=O[0].subject+"")&&le(n,i),(!m||W&1)&&o!==(o=O[0].preview+"")&&le(a,o);const Z={};W&1&&(Z.status=O[0].status),c.$set(Z);let B=h;h=J(O,W),h===B?Y[h].p(O,W):(_e(),$(Y[B],1,1,()=>{Y[B]=null}),ye(),p=Y[h],p?p.p(O,W):(p=Y[h]=R[h](O),p.c()),b(p,1),p.m(l,w));const ne={};W&1&&(ne.tags=O[0].tags),C.$set(ne)},i(O){m||(b(c.$$.fragment,O),b(p),b(C.$$.fragment,O),m=!0)},o(O){$(c.$$.fragment,O),$(p),$(C.$$.fragment,O),m=!1},d(O){O&&(D(e),D(r),D(s),D(u),D(l)),M(c),Y[h].d(),M(C)}}}function ws(t){let e,i;return e=new Ot({props:{className:t[1],$$slots:{default:[bs]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ks(t,e,i){let{row:n}=e,{className:r="statusColumn"}=e;return t.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class $s extends te{constructor(e){super(),ee(this,e,ks,ws,q,{row:0,className:1},vs)}}function Ts(t){oe(t,"svelte-76dgfl",`.Row.svelte-76dgfl.svelte-76dgfl{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
9
7
  "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[10]=t[i],n[11]=t,n[12]=i,n}function Vt(e){let t,i,n,r,s,o,a,u,l,c,f,d,h,m,p,v,L,x,F;function M(){e[6].call(s,e[12])}function b(...A){return e[7](e[12],...A)}l=new ar({props:{row:e[10]}}),d=new qr({props:{row:e[10]}}),p=new Mr({props:{row:e[10]}});function z(){return e[8](e[10])}function Q(...A){return e[9](e[10],...A)}return{c(){t=N("div"),i=N("div"),n=N("div"),r=Y(),s=N("input"),a=Y(),u=N("div"),W(l.$$.fragment),c=Y(),f=N("div"),W(d.$$.fragment),h=Y(),m=N("div"),W(p.$$.fragment),y(n,"class","StatusBar svelte-8pmpj5"),pt(n,"background-color",ut(e[10].status)),y(s,"type","checkbox"),s.__value=o=e[10].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[12]].__selected?"Selected":"")+" svelte-8pmpj5")},m(A,E){R(A,t,E),C(t,i),C(i,n),C(i,r),C(i,s),s.checked=e[2][e[12]].__selected,C(t,a),C(t,u),K(l,u,null),C(t,c),C(t,f),K(d,f,null),C(t,h),C(t,m),K(p,m,null),L=!0,x||(F=[le(s,"change",M),le(s,"click",bt(b)),le(i,"click",bt(ts)),le(t,"click",z),le(t,"mousedown",Q)],x=!0)},p(A,E){e=A,(!L||E&4)&&pt(n,"background-color",ut(e[10].status)),(!L||E&4&&o!==(o=e[10].conversationid))&&(s.__value=o,It(s,s.__value)),E&4&&(s.checked=e[2][e[12]].__selected);const B={};E&4&&(B.row=e[10]),l.$set(B);const T={};E&4&&(T.row=e[10]),d.$set(T);const V={};E&4&&(V.row=e[10]),p.$set(V),(!L||E&4&&v!==(v="Row "+(e[2][e[12]].__selected?"Selected":"")+" svelte-8pmpj5"))&&y(t,"class",v)},i(A){L||(k(l.$$.fragment,A),k(d.$$.fragment,A),k(p.$$.fragment,A),L=!0)},o(A){$(l.$$.fragment,A),$(d.$$.fragment,A),$(p.$$.fragment,A),L=!1},d(A){A&&O(t),J(l),J(d),J(p),x=!1,be(F)}}}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[5].default,u=Ie(a,e,e[4],null);return{c(){t=N("div");for(let l=0;l<s.length;l+=1)s[l].c();i=Y(),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&14){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(he(),f=r.length;f<s.length;f+=1)o(f);me()}u&&u.p&&(!n||c&16)&&Be(u,a,l,l[4],n?xe(a,l[4],c,null):Ke(l[4]),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=()=>{};function ns(e,t,i){let n,r=P,s=()=>(r(),r=Oe(u,p=>i(2,n=p)),u);e.$$.on_destroy.push(()=>r());let{$$slots:o={},$$scope:a}=t,{data:u}=t;s();let{middleclickhandler:l}=t;function c(p,v){if(p.shiftKey){let L=n.findIndex(x=>x.__selected);if(L!==-1){let x=Math.min(L,v),F=Math.max(L,v);for(let M=x;M<=F;M++)ge(u,n[M].__selected=!0,n)}}}function f(p){n[p].__selected=this.checked,u.set(n)}const d=(p,v)=>c(v,p),h=p=>location.assign("#Conversation;id="+p.conversationid),m=(p,v)=>{v.button===1&&l&&(l(p.conversationid),v.preventDefault(),v.stopPropagation())};return e.$$set=p=>{"data"in p&&s(i(0,u=p.data)),"middleclickhandler"in p&&i(1,l=p.middleclickhandler),"$$scope"in p&&i(4,a=p.$$scope)},[u,l,n,c,a,o,f,d,h,m]}class is extends ne{constructor(t){super(),te(this,t,ns,es,Z,{data:0,middleclickhandler:1},jr)}}function rs(e){re(e,"svelte-7bt636","div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function ss(e){let t,i,n;return{c(){t=N("div"),i=N("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:P,o:P,d(r){r&&O(t)}}}function os(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 h(m,p,v){return a?o("Loading failed. Please try again later."):m?o("Loading..."):p==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=h(s,r,n))},[u,l,c,f,d,n,r,s]}class as extends ne{constructor(t){super(),te(this,t,os,ss,Z,{},rs)}}function ls(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 us(e){let t,i,n,r,s;const o=e[4].default,a=Ie(o,e,e[3],null);return{c(){t=N("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 cs(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,cs,us,Z,{onAction:2,className:0},ls)}}function fs(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 ds(e){let t=e[7].label+"",i,n;return{c(){i=ee(t),n=Y()},m(r,s){R(r,i,s),R(r,n,s)},p:P,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:[ds]},$$scope:{ctx:e}}}),{c(){W(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 gs(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=N("div"),i=N("span"),r=ee(n),s=Y();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 h=Qt(c,a,d);u[d]?(u[d].p(h,f),k(u[d],1)):(u[d]=Zt(h),u[d].c(),k(u[d],1),u[d].m(t,null))}for(he(),d=a.length;d<u.length;d+=1)l(d);me()}},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 hs(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 ms extends ne{constructor(t){super(),te(this,t,hs,gs,Z,{currentValue:0,closeModal:4},fs)}}function ps(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 _s(e){let t,i,n;return{c(){t=N("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:P,o:P,d(r){r&&O(t),i=!1,n()}}}function vs(e,t,i){let{onClick:n}=t;return e.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class ys extends ne{constructor(t){super(),te(this,t,vs,_s,Z,{onClick:0},ps)}}function bs(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 ks(e){let t,i,n,r,s,o;return n=new as({}),{c(){t=N("div"),i=N("div"),W(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:P,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 ms({props:{closeModal:e[11]}}),t.$on("change",$s),n=new ys({props:{onClick:e[11]}}),{c(){W(t.$$.fragment),i=Y(),W(n.$$.fragment)},m(s,o){K(t,s,o),R(s,i,o),K(n,s,o),r=!0},p:P,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 ws(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 is({props:{data:e[0],middleclickhandler:e[2],$$slots:{default:[ks]},$$scope:{ctx:e}}});let a=e[9]&&Xt(e);return{c(){t=N("div"),W(i.$$.fragment),n=Y(),W(r.$$.fragment),s=Y(),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&&(he(),$(a,1,1,()=>{a=null}),me())},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 $s(e){let t=e.detail.value;console.log(t)}function Ts(e,t,i){let n,r=P,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,h,m,p=!1;function v(){i(9,p=!p)}function L(){i(9,p=!0)}an(()=>{const b=new IntersectionObserver(z=>{z[0].isIntersecting&&a(!1)},{root:m,threshold:.5});return b.observe(h),()=>b.unobserve(h)});function x(b){qe[b?"unshift":"push"](()=>{h=b,i(7,h)})}const F=()=>a(c&&!n);function M(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,h,m,p,n,v,L,x,F,M]}class Cs extends ne{constructor(t){super(),te(this,t,Ts,ws,Z,{data:0,loadMore:1,middleclickhandler:2,direction:3,loaded:4,cursor:5,filters:6},bs)}}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 Ls="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:Ls}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 Ss=new Mt;class mt{constructor(t=Ss){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 Rs(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 Os(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:Ds(a.body)||a.body instanceof URLSearchParams||Ns(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 Ns(e){return typeof Blob<"u"&&e instanceof Blob}function Ds(e){return typeof FormData<"u"&&e instanceof FormData}class Os extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class Rs 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=>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 As(e){return Fs(e)}function Fs(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 Ms(e){return Gs(e)}function Gs(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(As):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 zs(e){return Es(e)}function Es(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 Is(e){return xs(e)}function xs(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 Bs(e)}function Bs(e,t){return e==null?e:{count:g(e,"count")?e.count:void 0}}function Ks(e){return Js(e)}function Js(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 Us(e){return Ws(e)}function Ws(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 Hs(e){return Ys(e)}function Ys(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 Ps(e){return Vs(e)}function Vs(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 Qs(e){return Zs(e)}function Zs(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 vt(e){return Xs(e)}function Xs(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 jt(e){return qs(e)}function qs(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 wn(e){return js(e)}function js(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 eo(e){return to(e)}function to(e,t){return e==null?e:{cursor:g(e,"cursor")?e.cursor:void 0,rows:g(e,"rows")?e.rows.map(wn):void 0}}function no(e){return io(e)}function io(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 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(Ms))})}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=>_e(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=>_e(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(zs))})}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=>_e(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=>_e(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=>_e(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(Is))})}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=>_e(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(Ks))})}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(Us))})}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=>_e(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(Hs))})}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(Ps))})}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=>_e(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(Qs))})}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=>eo(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=>_e(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=>_e(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(no))})}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=>_e(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"},ro={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 so{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 oo(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 ao(e){let t,i,n=e[0]("Change filter")+"",r,s;return t=new ye({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){W(t.$$.fragment),i=Y(),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 lo(e){let t,i,n=e[0]("Configure chat button")+"",r,s;return t=new ye({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){W(t.$$.fragment),i=Y(),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 uo(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,h,m,p,v,L;return m=new Lt({props:{className:"Filter",$$slots:{default:[ao]},$$scope:{ctx:e}}}),v=new Lt({props:{className:"Configure",$$slots:{default:[lo]},$$scope:{ctx:e}}}),{c(){t=N("div"),i=N("img"),r=Y(),s=N("h1"),a=ee(o),u=Y(),l=N("p"),f=ee(c),d=Y(),h=N("div"),W(m.$$.fragment),p=Y(),W(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(h,"class","Buttons"),y(t,"class","NoTickets svelte-19qi61t")},m(x,F){R(x,t,F),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,h),K(m,h,null),C(h,p),K(v,h,null),L=!0},p(x,[F]){(!L||F&1)&&o!==(o=x[0]("No tickets found")+"")&&ie(a,o),(!L||F&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 M={};F&3&&(M.$$scope={dirty:F,ctx:x}),m.$set(M);const b={};F&3&&(b.$$scope={dirty:F,ctx:x}),v.$set(b)},i(x){L||(k(m.$$.fragment,x),k(v.$$.fragment,x),L=!0)},o(x){$(m.$$.fragment,x),$(v.$$.fragment,x),L=!1},d(x){x&&O(t),J(m),J(v)}}}function co(e,t,i){let n;return j(e,ke,r=>i(0,n=r)),[n]}class fo extends ne{constructor(t){super(),te(this,t,co,uo,Z,{},oo)}}function go(e){re(e,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function ho(e){let t,i;return t=new Cs({props:{direction:e[9],data:e[7],loaded:e[3],loadMore:e[2],cursor:e[11],middleclickhandler:e[1],filters:e[0]}}),{c(){W(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 mo(e){let t,i;return t=new fo({}),{c(){W(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p:P,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,n,r;const s=[mo,ho],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=N("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):(he(),$(o[c],1,1,()=>{o[c]=null}),me(),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 _o(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:h}=t,{basePath:m}=t,p=new so(f,m);p.load(),Se("tagsMap",p.tags);let v=ce(null);j(e,v,T=>i(16,o=T)),Se("error",v);const L=new Mt({apiKey:f,basePath:m+"/api/v3"}),x=new $n(L);Se("api",x);const F=ce([]);j(e,F,T=>i(5,u=T)),Se("data",F);const M=ce(ro.Rorder);j(e,M,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 Q=ce(null);j(e,Q,T=>i(17,a=T)),Se("cursor",Q);let A=!1,E=()=>({perPage:20,sortDir:c?en.Asc:en.Desc,filters:d,sortField:l,cursor:a||""}),{loadMore:B=async(T=!1)=>{if(!s&&(T===!0&&(ge(Q,a=null,a),i(3,A=!1)),!(!a&&A))){ge(z,s=!0,s);try{const V=await x.getTicketsGridDatasetRaw(E());console.log("Loaded tickets response: ",V);const pe=await V.value();T===!0&&ge(F,u=[],u),ge(F,u=u.concat(pe.rows),u),ge(Q,a=pe.cursor,a),console.log("Loaded tickets value: ",pe),console.log("Loaded tickets: ",pe.rows.length,"cursor: ",pe.cursor),i(3,A=!0)}catch(V){console.error("Loading tickets failed: ",V),ge(v,o=V.toString(),o)}ge(z,s=!1,s)}}}=t;return b.subscribe(async()=>{await B(!0)}),M.subscribe(async()=>{await B(!0)}),F.subscribe(T=>{Ye.set([]),r===!0?ge(Ye,n=T.filter(V=>!V.__selected).map(V=>V.conversationid),n):ge(Ye,n=T.filter(V=>V.__selected??!1).map(V=>V.conversationid),n)}),Se("loadMoreFunction",B),e.$$set=T=>{"apikey"in T&&i(12,f=T.apikey),"filters"in T&&i(0,d=T.filters),"middleclickhandler"in T&&i(1,h=T.middleclickhandler),"basePath"in T&&i(13,m=T.basePath),"loadMore"in T&&i(2,B=T.loadMore)},e.$$.update=()=>{e.$$.dirty&5&&d&&B(!0)},[d,h,B,A,s,u,v,F,M,b,z,Q,f,m]}class vo extends ne{constructor(t){super(),te(this,t,_o,po,Z,{apikey:12,filters:0,middleclickhandler:1,basePath:13,loadMore:2},go)}}const yo="modulepreload",bo=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=bo(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":yo,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 ko(){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:[wo]},$$scope:{ctx:e}};return e[4]!==void 0&&(s.loadMore=e[4]),t=new vo({props:s}),qe.push(()=>Un(t,"loadMore",r)),{c(){W(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 wo(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 $o(e){let t,i,n,r,s=e[0]&&rn(e);return{c(){s&&s.c(),t=Y(),i=N("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&&(he(),$(s,1,1,()=>{s=null}),me()),(!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 To(e,t,i){let{$$slots:n={},$$scope:r}=t;ko();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 h(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,h,r]}class Co extends ne{constructor(t){super(),te(this,t,To,$o,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(Co,{lang:{},apikey:{},filters:{},middleclickhandler:{},selectionhandler:{},basepath:{}},["default"],["reload"],!0));
8
+ "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"
9
+ "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 Pt(t,e,i){const n=t.slice();return n[9]=e[i],n[10]=e,n[11]=i,n}function Vt(t){let e,i,n,r,s,o,a,u,l,c,d,f,h,p,w,C,m,R,Y;function J(){t[5].call(s,t[11])}function O(...B){return t[6](t[11],...B)}l=new Rr({props:{row:t[9]}}),f=new $s({props:{row:t[9]}}),w=new ss({props:{row:t[9]}});function W(){return t[7](t[9])}function Z(...B){return t[8](t[9],...B)}return{c(){e=k("div"),i=k("div"),n=k("div"),r=U(),s=k("input"),a=U(),u=k("div"),I(l.$$.fragment),c=U(),d=k("div"),I(f.$$.fragment),h=U(),p=k("div"),I(w.$$.fragment),v(n,"class","StatusBar svelte-76dgfl"),mt(n,"background-color",ut(t[9].status)),v(s,"type","checkbox"),s.__value=o=t[9].conversationid,Et(s,s.__value),v(s,"class","svelte-76dgfl"),v(i,"class","Checkbox svelte-76dgfl"),mt(i,"position","relative"),v(u,"class","UserColumn svelte-76dgfl"),v(d,"class","StatusColumn svelte-76dgfl"),v(p,"class","ImportanceColumn svelte-76dgfl"),v(e,"class",C="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-76dgfl")},m(B,ne){N(B,e,ne),y(e,i),y(i,n),y(i,r),y(i,s),s.checked=t[1][t[11]].__selected,y(e,a),y(e,u),E(l,u,null),y(e,c),y(e,d),E(f,d,null),y(e,h),y(e,p),E(w,p,null),m=!0,R||(Y=[ae(s,"change",J),ae(s,"click",yt(O)),ae(i,"click",yt(Ls)),ae(e,"click",W),ae(e,"mousedown",Z)],R=!0)},p(B,ne){t=B,(!m||ne&2)&&mt(n,"background-color",ut(t[9].status)),(!m||ne&2&&o!==(o=t[9].conversationid))&&(s.__value=o,Et(s,s.__value)),ne&2&&(s.checked=t[1][t[11]].__selected);const X={};ne&2&&(X.row=t[9]),l.$set(X);const P={};ne&2&&(P.row=t[9]),f.$set(P);const be={};ne&2&&(be.row=t[9]),w.$set(be),(!m||ne&2&&C!==(C="Row "+(t[1][t[11]].__selected?"Selected":"")+" svelte-76dgfl"))&&v(e,"class",C)},i(B){m||(b(l.$$.fragment,B),b(f.$$.fragment,B),b(w.$$.fragment,B),m=!0)},o(B){$(l.$$.fragment,B),$(f.$$.fragment,B),$(w.$$.fragment,B),m=!1},d(B){B&&D(e),M(l),M(f),M(w),R=!1,Ce(Y)}}}function Cs(t){let e,i,n,r=Ee(t[1]),s=[];for(let l=0;l<r.length;l+=1)s[l]=Vt(Pt(t,r,l));const o=l=>$(s[l],1,1,()=>{s[l]=null}),a=t[4].default,u=Ie(a,t,t[3],null);return{c(){e=k("div");for(let l=0;l<s.length;l+=1)s[l].c();i=U(),u&&u.c(),v(e,"class","Body")},m(l,c){N(l,e,c);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(e,null);y(e,i),u&&u.m(e,null),n=!0},p(l,[c]){if(c&7){r=Ee(l[1]);let d;for(d=0;d<r.length;d+=1){const f=Pt(l,r,d);s[d]?(s[d].p(f,c),b(s[d],1)):(s[d]=Vt(f),s[d].c(),b(s[d],1),s[d].m(e,i))}for(_e(),d=r.length;d<s.length;d+=1)o(d);ye()}u&&u.p&&(!n||c&8)&&Ke(u,a,l,l[3],n?Be(a,l[3],c,null):Je(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)b(s[c]);b(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)$(s[c]);$(u,l),n=!1},d(l){l&&D(e),Lt(s,l),u&&u.d(l)}}}const Ls=()=>{};function Ss(t,e,i){let n;re(t,ve,f=>i(1,n=f));let{$$slots:r={},$$scope:s}=e,{middleclickhandler:o}=e;function a(f,h){if(f.shiftKey){let p=n.findIndex(w=>w.__selected);if(p!==-1){let w=Math.min(p,h),C=Math.max(p,h);for(let m=w;m<=C;m++)un(ve,n[m].__selected=!0,n)}}}function u(f){n[f].__selected=this.checked,ve.set(n)}const l=(f,h)=>a(h,f),c=f=>location.assign("#Conversation;id="+f.conversationid),d=(f,h)=>{h.button===1&&o&&(o(f.conversationid),h.preventDefault(),h.stopPropagation())};return t.$$set=f=>{"middleclickhandler"in f&&i(0,o=f.middleclickhandler),"$$scope"in f&&i(3,s=f.$$scope)},[o,n,a,s,r,u,l,c,d]}class Ds extends te{constructor(e){super(),ee(this,e,Ss,Cs,q,{middleclickhandler:0},Ts)}}function Ns(t){oe(t,"svelte-1nok758","div.svelte-1nok758{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Os(t){let e,i,n;return{c(){e=k("div"),i=k("p"),n=se(t[0]),v(e,"class","svelte-1nok758")},m(r,s){N(r,e,s),y(e,i),y(i,n)},p(r,[s]){s&1&&le(n,r[0])},i:Q,o:Q,d(r){r&&D(e)}}}function xs(t,e,i){let n,r,s,o,a;return re(t,Ne,u=>i(1,r=u)),re(t,ve,u=>i(2,s=u)),re(t,_n,u=>i(3,o=u)),re(t,Ge,u=>i(4,a=u)),t.$$.update=()=>{t.$$.dirty&30&&i(0,n=a?A("Loading..."):o?A("Loading failed. Please try again later."):!s||s.length===0?A("No results match your filter. Try broadening the search criteria."):r==null?A("All data loaded"):A("Load more data"))},[n,r,s,o,a]}class Rs extends te{constructor(e){super(),ee(this,e,xs,Os,q,{},Ns)}}function Fs(t){oe(t,"svelte-1srt8g7",`button.SortingButton{width:calc(100% - 8px);text-align:left;font-weight:normal;margin:0 0 0 30px}button.SortingButton.Selected{width:100%;text-align:left;font-weight:bold}.radio-option.svelte-1srt8g7 input[type="radio"].svelte-1srt8g7{display:none}.radio-option.svelte-1srt8g7.svelte-1srt8g7{display:flex;align-items:center;position:relative;width:calc(100% - 8px);padding:6px 10px;color:var(--main-textcolor);cursor:pointer}.radio-option.svelte-1srt8g7.svelte-1srt8g7::before{content:'';display:inline-block;width:16px;height:16px;margin-right:10px;border-radius:50%;border:2px solid var(--menu-selected-bg);background-color:white}.selected.svelte-1srt8g7.svelte-1srt8g7{font-weight:700}.selected.svelte-1srt8g7.svelte-1srt8g7::before{width:10px;height:10px;border:5px solid var(--ticket-status-chat-background)}.radio-option.svelte-1srt8g7.svelte-1srt8g7:hover{background:var(--menu-hover-bg)}.Title.svelte-1srt8g7.svelte-1srt8g7{width:100%;margin:4px 0 12px 10px;color:var(--main-textcolor);font-size:13px;font-style:normal;font-weight:700;line-height:20px;font-family:'Roboto', sans-serif}.Title.svelte-1srt8g7.svelte-1srt8g7::after{content:'';position:absolute;left:10px;right:10px;bottom:calc(100% - 37px);height:1px;background-color:var(--menu-selected-bg)}.modal.svelte-1srt8g7.svelte-1srt8g7{min-width:200px;display:flex;flex-direction:column;align-items:flex-start;margin:0;padding:4px;background-color:var(--main-background);border:none;border-radius:6px;overflow:hidden;z-index:99999;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.12), 0px 8px 24px 0px rgba(30, 34, 39, 0.10)}`)}function Qt(t,e,i){const n=t.slice();return n[8]=e[i],n}function Zt(t){let e,i,n,r,s=t[8].label+"",o,a,u,l,c;return{c(){e=k("label"),i=k("input"),r=U(),o=se(s),a=U(),v(i,"type","radio"),v(i,"name","sorting"),i.value=t[8].value,i.checked=n=t[0]&&t[0].value===t[8].value,v(i,"class","svelte-1srt8g7"),v(e,"class",u=fe(t[0].value===t[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")},m(d,f){N(d,e,f),y(e,i),y(e,r),y(e,o),y(e,a),l||(c=ae(i,"click",t[4]),l=!0)},p(d,f){f&1&&n!==(n=d[0]&&d[0].value===d[8].value)&&(i.checked=n),f&1&&u!==(u=fe(d[0].value===d[8].value?"radio-option selected":"radio-option")+" svelte-1srt8g7")&&v(e,"class",u)},d(d){d&&D(e),l=!1,c()}}}function As(t){let e,i,n,r=Ee(t[3]),s=[];for(let o=0;o<r.length;o+=1)s[o]=Zt(Qt(t,r,o));return{c(){e=k("dialog"),i=k("span"),i.textContent=`${A("Sort by")}`,n=U();for(let o=0;o<s.length;o+=1)s[o].c();v(i,"class","Title svelte-1srt8g7"),v(e,"class","modal svelte-1srt8g7"),v(e,"style",t[1])},m(o,a){N(o,e,a),y(e,i),y(e,n);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(e,null);t[6](e)},p(o,[a]){if(a&25){r=Ee(o[3]);let u;for(u=0;u<r.length;u+=1){const l=Qt(o,r,u);s[u]?s[u].p(l,a):(s[u]=Zt(l),s[u].c(),s[u].m(e,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=r.length}a&2&&v(e,"style",o[1])},i:Q,o:Q,d(o){o&&D(e),Lt(s,o),t[6](null)}}}function Gs(t,e,i){let{currentFilter:n}=e,{closeModal:r=()=>u.close()}=e,{style:s=""}=e;const o=dn(),a=[{value:"Datedue",label:A("Importance"),sort:He.Datedue,dir:!1},{value:"Created-newest",label:A("Date created - Newest"),sort:He.Datecreated,dir:!1},{value:"Created-oldest",label:A("Date created - Oldest"),sort:He.Datecreated,dir:!0},{value:"Changed-newest",label:A("Date changed - Newest"),sort:He.Datechanged,dir:!1},{value:"Changed-oldest",label:A("Date changed - Oldest"),sort:He.Datechanged,dir:!0}];let u;function l(d){const f=a.find(h=>h.value===d.target.value);i(0,n=f),o("filterChange",{option:f}),r()}function c(d){ze[d?"unshift":"push"](()=>{u=d,i(2,u)})}return t.$$set=d=>{"currentFilter"in d&&i(0,n=d.currentFilter),"closeModal"in d&&i(5,r=d.closeModal),"style"in d&&i(1,s=d.style)},[n,s,u,a,l,r,c]}class zs extends te{constructor(e){super(),ee(this,e,Gs,As,q,{currentFilter:0,closeModal:5,style:1},Fs)}}function Es(t){oe(t,"svelte-657q9o",".backdrop.svelte-657q9o{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:100}")}function Ms(t){let e,i,n;return{c(){e=k("div"),v(e,"class","backdrop svelte-657q9o")},m(r,s){N(r,e,s),i||(n=ae(e,"click",yt(function(){Ct(t[0])&&t[0].apply(this,arguments)})),i=!0)},p(r,[s]){t=r},i:Q,o:Q,d(r){r&&D(e),i=!1,n()}}}function Is(t,e,i){let{onClick:n}=e;return t.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class Bs extends te{constructor(e){super(),ee(this,e,Is,Ms,q,{onClick:0},Es)}}function Ks(t){oe(t,"svelte-1fwehqj",".load.svelte-1fwehqj{display:block}.container.svelte-1fwehqj{width:calc(100% - 16px);flex-grow:1;flex-basis:0;padding:8px;overflow-y:scroll;overflow-x:hidden;border-spacing:4px 5px;border:none}@media screen and (min-width: 768px){.load.svelte-1fwehqj{width:100%}}")}function Js(t){let e,i,n,r,s,o;return n=new Rs({}),{c(){e=k("div"),i=k("div"),I(n.$$.fragment),v(i,"class","load svelte-1fwehqj"),v(e,"class","load svelte-1fwehqj")},m(a,u){N(a,e,u),y(e,i),E(n,i,null),t[11](i),r=!0,s||(o=ae(i,"click",t[12]),s=!0)},p:Q,i(a){r||(b(n.$$.fragment,a),r=!0)},o(a){$(n.$$.fragment,a),r=!1},d(a){a&&D(e),M(n),t[11](null),s=!1,o()}}}function Xt(t){let e,i,n,r;return e=new zs({props:{closeModal:t[8],currentFilter:t[5],style:t[4]}}),e.$on("filterChange",t[10]),n=new Bs({props:{onClick:t[8]}}),{c(){I(e.$$.fragment),i=U(),I(n.$$.fragment)},m(s,o){E(e,s,o),N(s,i,o),E(n,s,o),r=!0},p(s,o){const a={};o&32&&(a.currentFilter=s[5]),o&16&&(a.style=s[4]),e.$set(a)},i(s){r||(b(e.$$.fragment,s),b(n.$$.fragment,s),r=!0)},o(s){$(e.$$.fragment,s),$(n.$$.fragment,s),r=!1},d(s){s&&D(i),M(e,s),M(n,s)}}}function Us(t){let e,i,n,r,s,o;i=new ir({props:{currentFilter:t[5].label}}),i.$on("openModal",t[9]),r=new Ds({props:{middleclickhandler:t[0],$$slots:{default:[Js]},$$scope:{ctx:t}}});let a=t[3]&&Xt(t);return{c(){e=k("div"),I(i.$$.fragment),n=U(),I(r.$$.fragment),s=U(),a&&a.c(),v(e,"class","container svelte-1fwehqj")},m(u,l){N(u,e,l),E(i,e,null),y(e,n),E(r,e,null),y(e,s),a&&a.m(e,null),t[13](e),o=!0},p(u,[l]){const c={};l&32&&(c.currentFilter=u[5].label),i.$set(c);const d={};l&1&&(d.middleclickhandler=u[0]),l&16578&&(d.$$scope={dirty:l,ctx:u}),r.$set(d),u[3]?a?(a.p(u,l),l&8&&b(a,1)):(a=Xt(u),a.c(),b(a,1),a.m(e,null)):a&&(_e(),$(a,1,1,()=>{a=null}),ye())},i(u){o||(b(i.$$.fragment,u),b(r.$$.fragment,u),b(a),o=!0)},o(u){$(i.$$.fragment,u),$(r.$$.fragment,u),$(a),o=!1},d(u){u&&D(e),M(i),M(r),a&&a.d(),t[13](null)}}}function Ws(t,e,i){let n,r,s;re(t,Ze,m=>i(6,r=m)),re(t,Ne,m=>i(7,s=m));let{middleclickhandler:o}=e,a,u,l=!1,c="";ct(()=>{const m=localStorage.getItem("TicketGridCurrentFilter");m&&i(5,n=JSON.parse(m));const R=new IntersectionObserver(Y=>{Y[0].isIntersecting&&Me()},{root:u,threshold:.5});return R.observe(a),()=>R.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)),et.set(n.dir),Dt.set(n.sort))}function p(m){ze[m?"unshift":"push"](()=>{a=m,i(1,a)})}const w=()=>Me(r&&!s);function C(m){ze[m?"unshift":"push"](()=>{u=m,i(2,u)})}return t.$$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,w,C]}class Hs extends te{constructor(e){super(),ee(this,e,Ws,Us,q,{middleclickhandler:0},Ks)}}class Ys{constructor(e,i){const n=new St({apiKey:e,basePath:i+"/api/v3"});this.api=new pn(n)}async load(){let e=await this.api.getTagsGridList();e=e.reduce((i,n)=>(i[n.tagid]=n,i),{}),zi.set(e)}}function Ps(t){oe(t,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function Vs(t){let e,i,n,r,s;const o=t[4].default,a=Ie(o,t,t[3],null);return{c(){e=k("button"),a&&a.c(),v(e,"class",i=fe(t[0])+" svelte-10fvxzv")},m(u,l){N(u,e,l),a&&a.m(e,null),n=!0,r||(s=ae(e,"click",t[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&Ke(a,o,u,u[3],n?Be(o,u[3],l,null):Je(u[3]),null),(!n||l&1&&i!==(i=fe(u[0])+" svelte-10fvxzv"))&&v(e,"class",i)},i(u){n||(b(a,u),n=!0)},o(u){$(a,u),n=!1},d(u){u&&D(e),a&&a.d(u),r=!1,s()}}}function Qs(t,e,i){let{$$slots:n={},$$scope:r}=e,{onAction:s=u=>{}}=e,{className:o=""}=e;function a(u){s(u)}return t.$$set=u=>{"onAction"in u&&i(2,s=u.onAction),"className"in u&&i(0,o=u.className),"$$scope"in u&&i(3,r=u.$$scope)},[o,a,s,r,n]}class qt extends te{constructor(e){super(),ee(this,e,Qs,Vs,q,{onAction:2,className:0},Ps)}}function Zs(t){oe(t,"svelte-19qi61t",".NoTickets.svelte-19qi61t{width:100%;height:100%;display:flex;flex-direction:column;align-items:center}p.svelte-19qi61t{max-width:450px;font-size:13px;font-weight:400;text-align:center}h1.svelte-19qi61t{font-size:20px;font-weight:600;margin:50px auto 0 auto}img.svelte-19qi61t{max-width:300px}")}function Xs(t){let e,i,n=A("Change filter")+"",r,s;return e=new $e({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){I(e.$$.fragment),i=U(),r=se(n)},m(o,a){E(e,o,a),N(o,i,a),N(o,r,a),s=!0},p:Q,i(o){s||(b(e.$$.fragment,o),s=!0)},o(o){$(e.$$.fragment,o),s=!1},d(o){o&&(D(i),D(r)),M(e,o)}}}function qs(t){let e,i,n=A("Configure chat button")+"",r,s;return e=new $e({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){I(e.$$.fragment),i=U(),r=se(n)},m(o,a){E(e,o,a),N(o,i,a),N(o,r,a),s=!0},p:Q,i(o){s||(b(e.$$.fragment,o),s=!0)},o(o){$(e.$$.fragment,o),s=!1},d(o){o&&(D(i),D(r)),M(e,o)}}}function js(t){let e,i,n,r,s,o,a,u,l,c,d,f,h;return c=new qt({props:{className:"Filter",onAction:t[0],$$slots:{default:[Xs]},$$scope:{ctx:t}}}),f=new qt({props:{className:"Configure",$$slots:{default:[qs]},$$scope:{ctx:t}}}),{c(){e=k("div"),i=k("img"),r=U(),s=k("h1"),s.textContent=`${A("No tickets found")}`,o=U(),a=k("p"),a.textContent=`${A("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")}`,u=U(),l=k("div"),I(c.$$.fragment),d=U(),I(f.$$.fragment),v(i,"alt","No results placeholder"),_t(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||v(i,"src",n),v(i,"class","svelte-19qi61t"),v(s,"class","svelte-19qi61t"),v(a,"class","svelte-19qi61t"),v(l,"class","Buttons"),v(e,"class","NoTickets svelte-19qi61t")},m(p,w){N(p,e,w),y(e,i),y(e,r),y(e,s),y(e,o),y(e,a),y(e,u),y(e,l),E(c,l,null),y(l,d),E(f,l,null),h=!0},p(p,[w]){const C={};w&2&&(C.$$scope={dirty:w,ctx:p}),c.$set(C);const m={};w&2&&(m.$$scope={dirty:w,ctx:p}),f.$set(m)},i(p){h||(b(c.$$.fragment,p),b(f.$$.fragment,p),h=!0)},o(p){$(c.$$.fragment,p),$(f.$$.fragment,p),h=!1},d(p){p&&D(e),M(c),M(f)}}}function eo(t){return[()=>Me(!0)]}class to extends te{constructor(e){super(),ee(this,e,eo,js,q,{},Zs)}}function no(t){oe(t,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function io(t){let e,i;return e=new Hs({props:{middleclickhandler:t[0]}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.middleclickhandler=n[0]),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function ro(t){let e,i;return e=new to({}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p:Q,i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function so(t){let e,i,n,r;const s=[ro,io],o=[];function a(u,l){return!u[1].length&&u[2]?0:1}return i=a(t),n=o[i]=s[i](t),{c(){e=k("main"),n.c(),v(e,"class","svelte-14f2ism")},m(u,l){N(u,e,l),o[i].m(e,null),r=!0},p(u,[l]){let c=i;i=a(u),i===c?o[i].p(u,l):(_e(),$(o[c],1,1,()=>{o[c]=null}),ye(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),b(n,1),n.m(e,null))},i(u){r||(b(n),r=!0)},o(u){$(n),r=!1},d(u){u&&D(e),o[i].d()}}}function oo(t,e,i){let n,r,s,o,a,u;re(t,Qe,f=>i(8,n=f)),re(t,je,f=>i(5,r=f)),re(t,Dt,f=>i(6,s=f)),re(t,et,f=>i(7,o=f)),re(t,ve,f=>i(1,a=f)),re(t,Ze,f=>i(2,u=f));let{apikey:l}=e,{middleclickhandler:c}=e,{basePath:d}=e;return ct(async()=>{await new Ys(l,d).load();const f=new pn(new St({apiKey:l,basePath:d+"/api/v3"}));lt.set(f),await Me(!0)}),ve.subscribe(f=>{vn.set(n?f.filter(h=>!h.__selected).map(h=>h.conversationid):f.filter(h=>h.__selected).map(h=>h.conversationid))}),t.$$set=f=>{"apikey"in f&&i(3,l=f.apikey),"middleclickhandler"in f&&i(0,c=f.middleclickhandler),"basePath"in f&&i(4,d=f.basePath)},t.$$.update=()=>{t.$$.dirty&224&&(o||s||r)&&Me(!0)},[c,a,u,l,d,r,s,o]}class ao extends te{constructor(e){super(),ee(this,e,oo,so,q,{apikey:3,middleclickhandler:0,basePath:4},no)}}const lo={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"}}},uo={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:lo,warnOnMissingMessages:!0},co=uo;let Sn;function Dn(){return Sn}function fo(t){return Sn=t}function ht(){return co}function jt(t){return t.split("-").map((e,i,n)=>n.slice(0,i+1).join("-")).reverse()}function xt(t,e=ht().fallbackLocale){const i=jt(t);return e?[...new Set([...i,...jt(e)])]:i}let Nn;const Rt=ce({});function On(t){return t in Nn}function go(t){if(t==null)return null;const e=xt(t);for(let i=0;i<e.length;i++){const n=e[i];if(On(n))return n}return null}function ho(t,...e){Rt.update(i=>(i[t]=Object.assign(i[t]||{},...e),i))}Rt.subscribe(t=>Nn=t);const en=ce(!1),Ft={};function mo(t){Ft[t]=new Set}function po(t){delete Ft[t]}function Xe(t){return Ft[t]}function vo(t){return xt(t).reverse().map(e=>{const i=Xe(e);return[e,i?[...i]:[]]}).filter(([,e])=>e.length>0)}function xn(t){return xt(t).reverse().some(Xe)}const Ye={};function Rn(t){if(!xn(t))return Promise.resolve();if(t in Ye)return Ye[t];const e=vo(t);if(e.length===0)return Promise.resolve();const i=setTimeout(()=>en.set(!0),ht().loadingDelay);return Ye[t]=Promise.all(e.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{po(n),s=s.map(o=>o.default||o),ho(n,...s)}))).then(()=>{clearTimeout(i),en.set(!1),delete Ye[t]}),Ye[t]}function tn(t,e){Xe(t)||mo(t);const i=Xe(t);Xe(t).has(e)||(On(t)||Rt.update(n=>(n[t]={},n)),i.add(e))}const nt=ce("");nt.subscribe(t=>{fo(t),typeof window<"u"&&t!==""&&document.documentElement.setAttribute("lang",t)});const Tt=nt.set;nt.set=t=>go(t)&&xn(t)?Rn(t).then(()=>Tt(t)):Tt(t);nt.update=t=>{let e=Dn();t(e),Tt(e)};function _o(t){const{formats:e,...i}=t,n=t.initialLocale||t.fallbackLocale,r=ht();return Object.assign(r,i,{initialLocale:n}),e&&("number"in e&&Object.assign(r.formats.number,e.number),"date"in e&&Object.assign(r.formats.date,e.date),"time"in e&&Object.assign(r.formats.time,e.time)),nt.set(n)}function yo(t){return Rn(t||Dn()||ht().initialLocale)}const bo="modulepreload",wo=function(t){return"/"+t},nn={},rn=function(e,i,n){if(!i||i.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=wo(s),s in nn)return;nn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const d=r[c];if(d.href===s&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":bo,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,d)=>{l.addEventListener("load",c),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function ko(){tn("en",()=>rn(()=>import("./en.js"),[])),tn("sk",()=>rn(()=>import("./sk.js"),[]))}function sn(t){let e,i;return e=new ao({props:{apikey:t[0],basePath:t[3],filters:t[1],middleclickhandler:t[2],$$slots:{default:[$o]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(n,r){E(e,n,r),i=!0},p(n,r){const s={};r&1&&(s.apikey=n[0]),r&8&&(s.basePath=n[3]),r&2&&(s.filters=n[1]),r&4&&(s.middleclickhandler=n[2]),r&64&&(s.$$scope={dirty:r,ctx:n}),e.$set(s)},i(n){i||(b(e.$$.fragment,n),i=!0)},o(n){$(e.$$.fragment,n),i=!1},d(n){M(e,n)}}}function $o(t){let e;const i=t[5].default,n=Ie(i,t,t[6],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),e=!0},p(r,s){n&&n.p&&(!e||s&64)&&Ke(n,i,r,r[6],e?Be(i,r[6],s,null):Je(r[6]),null)},i(r){e||(b(n,r),e=!0)},o(r){$(n,r),e=!1},d(r){n&&n.d(r)}}}function To(t){let e,i,n,r,s=t[0]&&sn(t);return{c(){s&&s.c(),e=U(),i=k("link"),v(i,"rel","stylesheet"),v(i,"href",n=t[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),N(o,e,a),N(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&b(s,1)):(s=sn(o),s.c(),b(s,1),s.m(e.parentNode,e)):s&&(_e(),$(s,1,1,()=>{s=null}),ye()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&v(i,"href",n)},i(o){r||(b(s),r=!0)},o(o){$(s),r=!1},d(o){o&&(D(e),D(i)),s&&s.d(o)}}}function Co(t){const e={};return t.forEach(i=>{if(i.length===2){const[n,r]=i;e[n]=r}}),e}function Lo(t,e,i){let{$$slots:n={},$$scope:r}=e;ko();let{lang:s="sk"}=e,{apikey:o}=e,{filters:a='[["rstatus","IN","A,P,T,N,C,R,W"],["channel_type","IN","B,M,E,F,A,I,Q,S,C,W,T,V"]]'}=e,{middleclickhandler:u}=e,{basepath:l}=e;return ct(()=>{je.set(a);const c=localStorage.getItem("la-dictionary-a");if(c)try{const d=JSON.parse(c);yn.set(Co(d[3][1]))}catch(d){console.error("Error parsing translation data:",d)}}),_o({initialLocale:s,fallbackLocale:"en"}),yo(),t.$$set=c=>{"lang"in c&&i(4,s=c.lang),"apikey"in c&&i(0,o=c.apikey),"filters"in c&&i(1,a=c.filters),"middleclickhandler"in c&&i(2,u=c.middleclickhandler),"basepath"in c&&i(3,l=c.basepath),"$$scope"in c&&i(6,r=c.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&a&&je.set(a)},[o,a,u,l,s,n,r]}class So extends te{constructor(e){super(),ee(this,e,Lo,To,q,{lang:4,apikey:0,filters:1,middleclickhandler:2,basepath:3})}get lang(){return this.$$.ctx[4]}set lang(e){this.$$set({lang:e}),Se()}get apikey(){return this.$$.ctx[0]}set apikey(e){this.$$set({apikey:e}),Se()}get filters(){return this.$$.ctx[1]}set filters(e){this.$$set({filters:e}),Se()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(e){this.$$set({middleclickhandler:e}),Se()}get basepath(){return this.$$.ctx[3]}set basepath(e){this.$$set({basepath:e}),Se()}}customElements.define("tickets-table",qn(So,{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.30",
4
+ "version": "0.0.34",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",