@qualityunit/liveagent-ticket-grid 0.0.26 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.js +4 -6
- package/package.json +1 -1
package/dist/assets/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
var kn=Object.defineProperty;var Tn=(e,t,i)=>t in e?kn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var ge=(e,t,i)=>(Tn(e,typeof t!="symbol"?t+"":t,i),i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();function Q(){}function rt(e,t){for(const i in t)e[i]=t[i];return e}function nn(e){return e()}function Rt(){return Object.create(null)}function we(e){e.forEach(nn)}function at(e){return typeof e=="function"}function Z(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let tt;function pt(e,t){return e===t?!0:(tt||(tt=document.createElement("a")),tt.href=t,e===tt.href)}function Cn(e){return Object.keys(e).length===0}function ye(e,...t){if(e==null){for(const n of t)n(void 0);return Q}const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function ne(e,t,i){e.$$.on_destroy.push(ye(t,i))}function xe(e,t,i,n){if(e){const r=rn(e,t,i,n);return e[0](r)}}function rn(e,t,i,n){return e[1]&&n?rt(i.ctx.slice(),e[1](n(t))):i.ctx}function Ie(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=rn(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 $n(e){const t={};for(const i in e)i[0]!=="$"&&(t[i]=e[i]);return t}function Mt(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 Ce(e){return e??""}function _e(e,t,i){return e.set(i),t}const Ln=["",!0,1,"true","contenteditable"];function S(e,t){e.appendChild(t)}function ie(e,t,i){const n=Sn(e);if(!n.getElementById(t)){const r=D("style");r.id=t,r.textContent=i,Nn(n,r)}}function Sn(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Nn(e,t){return S(e.head||e,t),t.sheet}function F(e,t,i){e.insertBefore(t,i||null)}function R(e){e.parentNode&&e.parentNode.removeChild(e)}function Ct(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function D(e){return document.createElement(e)}function te(e){return document.createTextNode(e)}function P(){return te(" ")}function Dn(){return te("")}function le(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function _t(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function T(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}const An=["width","height"];function Ft(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&&An.indexOf(n)===-1?e[n]=t[n]:T(e,n,t[n])}function On(e){return Array.from(e.childNodes)}function oe(e,t){t=""+t,e.data!==t&&(e.data=t)}function Rn(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function Mn(e,t,i){~Ln.indexOf(i)?Rn(e,t):oe(e,t)}function Gt(e,t){e.value=t??""}function gt(e,t,i,n){i==null?e.style.removeProperty(t):e.style.setProperty(t,i,n?"important":"")}function zt(e,t,i){e.classList.toggle(t,!!i)}function Fn(e,t,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:n})}function Gn(e){const t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}let Qe;function Pe(e){Qe=e}function lt(){if(!Qe)throw new Error("Function called outside component initialization");return Qe}function sn(e){lt().$$.on_mount.push(e)}function on(){const e=lt();return(t,i,{cancelable:n=!1}={})=>{const r=e.$$.callbacks[t];if(r){const s=Fn(t,i,{cancelable:n});return r.slice().forEach(o=>{o.call(e,s)}),!s.defaultPrevented}return!0}}function Ne(e,t){return lt().$$.context.set(e,t),t}function Te(e){return lt().$$.context.get(e)}const Fe=[],Ze=[];let ze=[];const vt=[],zn=Promise.resolve();let yt=!1;function En(){yt||(yt=!0,zn.then(ve))}function bt(e){ze.push(e)}function xn(e){vt.push(e)}const ht=new Set;let Re=0;function ve(){if(Re!==0)return;const e=Qe;do{try{for(;Re<Fe.length;){const t=Fe[Re];Re++,Pe(t),In(t.$$)}}catch(t){throw Fe.length=0,Re=0,t}for(Pe(null),Fe.length=0,Re=0;Ze.length;)Ze.pop()();for(let t=0;t<ze.length;t+=1){const i=ze[t];ht.has(i)||(ht.add(i),i())}ze.length=0}while(Fe.length);for(;vt.length;)vt.pop()();yt=!1,ht.clear(),Pe(e)}function In(e){if(e.fragment!==null){e.update(),we(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(bt)}}function Bn(e){const t=[],i=[];ze.forEach(n=>e.indexOf(n)===-1?t.push(n):i.push(n)),i.forEach(n=>n()),ze=t}const nt=new Set;let De;function he(){De={r:0,c:[],p:De}}function me(){De.r||we(De.c),De=De.p}function w(e,t){e&&e.i&&(nt.delete(e),e.i(t))}function L(e,t,i,n){if(e&&e.o){if(nt.has(e))return;nt.add(e),De.c.push(()=>{nt.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 Kn(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 Jn(e,t,i){const n=e.$$.props[t];n!==void 0&&(e.$$.bound[n]=i,i(e.$$.ctx[n]))}function H(e){e&&e.c()}function B(e,t,i){const{fragment:n,after_update:r}=e.$$;n&&n.m(t,i),bt(()=>{const s=e.$$.on_mount.map(nn).filter(at);e.$$.on_destroy?e.$$.on_destroy.push(...s):we(s),e.$$.on_mount=[]}),r.forEach(bt)}function K(e,t){const i=e.$$;i.fragment!==null&&(Bn(i.after_update),we(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function Un(e,t){e.$$.dirty[0]===-1&&(Fe.push(e),En(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function j(e,t,i,n,r,s,o=null,a=[-1]){const u=Qe;Pe(e);const l=e.$$={fragment:null,ctx:[],props:s,update:Q,not_equal:r,bound:Rt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Rt(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(e,t.props||{},(d,f,...g)=>{const m=g.length?g[0]:f;return l.ctx&&r(l.ctx[d],l.ctx[d]=m)&&(!l.skip_bound&&l.bound[d]&&l.bound[d](m),c&&Un(e,d)),f}):[],l.update(),c=!0,we(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const d=On(t.target);l.fragment&&l.fragment.l(d),d.forEach(R)}else l.fragment&&l.fragment.c();t.intro&&w(e.$$.fragment),B(e,t.target,t.anchor),ve()}Pe(u)}let an;typeof HTMLElement=="function"&&(an=class extends HTMLElement{constructor(t,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=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=D("slot"),o!=="default"&&T(a,"name",o)},m:function(c,d){F(c,a,d)},d:function(c){c&&R(a)}}}};var t=i;if(await Promise.resolve(),!this.$$cn)return;const n={},r=Gn(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]=it(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=it(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]=it(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 it(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 an{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=it(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 ee{constructor(){ge(this,"$$");ge(this,"$$set")}$destroy(){K(this,1),this.$destroy=Q}$on(t,i){if(!at(i))return Q;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(t){this.$$set&&!Cn(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Wn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Wn);function Yn(e){ie(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 Pn(e){let t,i;return{c(){t=D("span"),T(t,"class",i=Ce(`Icon ${e[0]} ${e[1]}`)+" svelte-yh1nwn")},m(n,r){F(n,t,r)},p(n,[r]){r&3&&i!==(i=Ce(`Icon ${n[0]} ${n[1]}`)+" svelte-yh1nwn")&&T(t,"class",i)},i:Q,o:Q,d(n){n&&R(t)}}}function Vn(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 be extends ee{constructor(t){super(),j(this,t,Vn,Pn,Z,{className:0,iconLaClassName:1},Yn)}}const Me=[];function Qn(e,t){return{subscribe:ce(e,t).subscribe}}function ce(e,t=Q){let i;const n=new Set;function r(a){if(Z(e,a)&&(e=a,i)){const u=!Me.length;for(const l of n)l[1](),Me.push(l,e);if(u){for(let l=0;l<Me.length;l+=2)Me[l][0](Me[l+1]);Me.length=0}}}function s(a){r(a(e))}function o(a,u=Q){const l=[a,u];return n.add(l),n.size===1&&(i=t(r,s)||Q),a(e),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}function Zn(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 Qn(i,(o,a)=>{let u=!1;const l=[];let c=0,d=Q;const f=()=>{if(c)return;d();const m=t(n?l[0]:l,o,a);s?o(m):d=at(m)?m:Q},g=r.map((m,_)=>ye(m,y=>{l[_]=y,c&=~(1<<_),u&&f()},()=>{c|=1<<_}));return u=!0,f(),function(){we(g),d(),u=!1}})}const Xn={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"}}},qn={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:Xn,warnOnMissingMessages:!0},jn=qn;let ln;function st(){return ln}function ei(e){return ln=e}function qe(){return jn}function Et(e){return e.split("-").map((t,i,n)=>n.slice(0,i+1).join("-")).reverse()}function je(e,t=qe().fallbackLocale){const i=Et(e);return t?[...new Set([...i,...Et(t)])]:i}let $t;const ut=ce({});function ti(e){return $t[e]||null}function Lt(e){return e in $t}function ni(e,t){if(Lt(e)){const i=ti(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 ii(e){if(e==null)return null;const t=je(e);for(let i=0;i<t.length;i++){const n=t[i];if(Lt(n))return n}return null}function ri(e,...t){ut.update(i=>(i[e]=Object.assign(i[e]||{},...t),i))}ut.subscribe(e=>$t=e);const xt=ce(!1),St={};function si(e){St[e]=new Set}function oi(e){delete St[e]}function Ve(e){return St[e]}function ai(e){return je(e).reverse().map(t=>{const i=Ve(t);return[t,i?[...i]:[]]}).filter(([,t])=>t.length>0)}function Nt(e){return je(e).reverse().some(Ve)}const We={};function un(e){if(!Nt(e))return Promise.resolve();if(e in We)return We[e];const t=ai(e);if(t.length===0)return Promise.resolve();const i=setTimeout(()=>xt.set(!0),qe().loadingDelay);return We[e]=Promise.all(t.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{oi(n),s=s.map(o=>o.default||o),ri(n,...s)}))).then(()=>{clearTimeout(i),xt.set(!1),delete We[e]}),We[e]}function It(e,t){Ve(e)||si(e);const i=Ve(e);Ve(e).has(t)||(Lt(e)||ut.update(n=>(n[e]={},n)),i.add(t))}const Je=ce("");Je.subscribe(e=>{ei(e),typeof window<"u"&&e!==""&&document.documentElement.setAttribute("lang",e)});const wt=Je.set;Je.set=e=>ii(e)&&Nt(e)?un(e).then(()=>wt(e)):wt(e);Je.update=e=>{let t=st();e(t),wt(t)};function li(e){const{formats:t,...i}=e,n=e.initialLocale||e.fallbackLocale,r=qe();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 Ae={},ui=(e,t,i)=>i&&(t in Ae||(Ae[t]={}),e in Ae[t]||(Ae[t][e]=i),i),ci=(e,t)=>{if(t==null)return;if(t in Ae&&e in Ae[t])return Ae[t][e];const i=je(t);for(let n=0;n<i.length;n++){const r=i[n],s=ni(r,e);if(s)return ui(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||st(),default:a}=r;if(o==null)throw new Error("[svelte-intl-precompile] Cannot format a message without first setting the initial locale.");let u=ci(n,o);return typeof u=="string"?u:typeof u=="function"?u(...Object.keys(r.values||{}).sort().map(l=>(r.values||{})[l])):(qe().warnOnMissingMessages&&console.warn(`[svelte-intl-precompile] The message "${n}" was not found in "${je(o).join('", "')}".${Nt(st())?`
|
|
1
|
+
var Tn=Object.defineProperty;var Cn=(e,t,i)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var de=(e,t,i)=>(Cn(e,typeof t!="symbol"?t+"":t,i),i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();function V(){}function at(e,t){for(const i in t)e[i]=t[i];return e}function sn(e){return e()}function Gt(){return Object.create(null)}function be(e){e.forEach(sn)}function ct(e){return typeof e=="function"}function Z(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let rt;function yt(e,t){return e===t?!0:(rt||(rt=document.createElement("a")),rt.href=t,e===rt.href)}function Ln(e){return Object.keys(e).length===0}function Oe(e,...t){if(e==null){for(const n of t)n(void 0);return V}const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function j(e,t,i){e.$$.on_destroy.push(Oe(t,i))}function Ie(e,t,i,n){if(e){const r=on(e,t,i,n);return e[0](r)}}function on(e,t,i,n){return e[1]&&n?at(i.ctx.slice(),e[1](n(t))):i.ctx}function xe(e,t,i,n){if(e[2]&&n){const r=e[2](n(i));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let a=0;a<o;a+=1)s[a]=t.dirty[a]|r[a];return s}return t.dirty|r}return t.dirty}function Be(e,t,i,n,r,s){if(r){const o=on(t,i,n,s);e.p(o,r)}}function Ke(e){if(e.ctx.length>32){const t=[],i=e.ctx.length/32;for(let n=0;n<i;n++)t[n]=-1;return t}return-1}function Sn(e){const t={};for(const i in e)i[0]!=="$"&&(t[i]=e[i]);return t}function zt(e,t){const i={};t=new Set(t);for(const n in e)!t.has(n)&&n[0]!=="$"&&(i[n]=e[n]);return i}function Te(e){return e??""}function _e(e,t,i){return e.set(i),t}const Nn=["",!0,1,"true","contenteditable"];function C(e,t){e.appendChild(t)}function re(e,t,i){const n=Dn(e);if(!n.getElementById(t)){const r=S("style");r.id=t,r.textContent=i,On(n,r)}}function Dn(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function On(e,t){return C(e.head||e,t),t.sheet}function R(e,t,i){e.insertBefore(t,i||null)}function O(e){e.parentNode&&e.parentNode.removeChild(e)}function St(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function S(e){return document.createElement(e)}function ee(e){return document.createTextNode(e)}function P(){return ee(" ")}function et(){return ee("")}function le(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function bt(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function y(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}const Rn=["width","height"];function Et(e,t){const i=Object.getOwnPropertyDescriptors(e.__proto__);for(const n in t)t[n]==null?e.removeAttribute(n):n==="style"?e.style.cssText=t[n]:n==="__value"?e.value=e[n]=t[n]:i[n]&&i[n].set&&Rn.indexOf(n)===-1?e[n]=t[n]:y(e,n,t[n])}function An(e){return Array.from(e.childNodes)}function ie(e,t){t=""+t,e.data!==t&&(e.data=t)}function Fn(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function Mn(e,t,i){~Nn.indexOf(i)?Fn(e,t):ie(e,t)}function It(e,t){e.value=t??""}function pt(e,t,i,n){i==null?e.style.removeProperty(t):e.style.setProperty(t,i,n?"important":"")}function xt(e,t,i){e.classList.toggle(t,!!i)}function Gn(e,t,{bubbles:i=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:t,bubbles:i,cancelable:n})}function zn(e){const t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}let Xe;function Ve(e){Xe=e}function ft(){if(!Xe)throw new Error("Function called outside component initialization");return Xe}function an(e){ft().$$.on_mount.push(e)}function ln(){const e=ft();return(t,i,{cancelable:n=!1}={})=>{const r=e.$$.callbacks[t];if(r){const s=Gn(t,i,{cancelable:n});return r.slice().forEach(o=>{o.call(e,s)}),!s.defaultPrevented}return!0}}function Se(e,t){return ft().$$.context.set(e,t),t}function ve(e){return ft().$$.context.get(e)}const Me=[],qe=[];let ze=[];const kt=[],En=Promise.resolve();let wt=!1;function In(){wt||(wt=!0,En.then($e))}function $t(e){ze.push(e)}function xn(e){kt.push(e)}const _t=new Set;let Ae=0;function $e(){if(Ae!==0)return;const e=Xe;do{try{for(;Ae<Me.length;){const t=Me[Ae];Ae++,Ve(t),Bn(t.$$)}}catch(t){throw Me.length=0,Ae=0,t}for(Ve(null),Me.length=0,Ae=0;qe.length;)qe.pop()();for(let t=0;t<ze.length;t+=1){const i=ze[t];_t.has(i)||(_t.add(i),i())}ze.length=0}while(Me.length);for(;kt.length;)kt.pop()();wt=!1,_t.clear(),Ve(e)}function Bn(e){if(e.fragment!==null){e.update(),be(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach($t)}}function Kn(e){const t=[],i=[];ze.forEach(n=>e.indexOf(n)===-1?t.push(n):i.push(n)),i.forEach(n=>n()),ze=t}const st=new Set;let Ne;function ge(){Ne={r:0,c:[],p:Ne}}function he(){Ne.r||be(Ne.c),Ne=Ne.p}function k(e,t){e&&e.i&&(st.delete(e),e.i(t))}function $(e,t,i,n){if(e&&e.o){if(st.has(e))return;st.add(e),Ne.c.push(()=>{st.delete(e),n&&(i&&e.d(1),n())}),e.o(t)}else n&&n()}function Ee(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Jn(e,t){const i={},n={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],a=t[s];if(a){for(const u in o)u in a||(n[u]=1);for(const u in a)r[u]||(i[u]=a[u],r[u]=1);e[s]=a}else for(const u in o)r[u]=1}for(const o in n)o in i||(i[o]=void 0);return i}function Un(e,t,i){const n=e.$$.props[t];n!==void 0&&(e.$$.bound[n]=i,i(e.$$.ctx[n]))}function H(e){e&&e.c()}function K(e,t,i){const{fragment:n,after_update:r}=e.$$;n&&n.m(t,i),$t(()=>{const s=e.$$.on_mount.map(sn).filter(ct);e.$$.on_destroy?e.$$.on_destroy.push(...s):be(s),e.$$.on_mount=[]}),r.forEach($t)}function J(e,t){const i=e.$$;i.fragment!==null&&(Kn(i.after_update),be(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function Wn(e,t){e.$$.dirty[0]===-1&&(Me.push(e),In(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function te(e,t,i,n,r,s,o=null,a=[-1]){const u=Xe;Ve(e);const l=e.$$={fragment:null,ctx:[],props:s,update:V,not_equal:r,bound:Gt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Gt(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(l.root);let c=!1;if(l.ctx=i?i(e,t.props||{},(f,d,...g)=>{const m=g.length?g[0]:d;return l.ctx&&r(l.ctx[f],l.ctx[f]=m)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](m),c&&Wn(e,f)),d}):[],l.update(),c=!0,be(l.before_update),l.fragment=n?n(l.ctx):!1,t.target){if(t.hydrate){const f=An(t.target);l.fragment&&l.fragment.l(f),f.forEach(O)}else l.fragment&&l.fragment.c();t.intro&&k(e.$$.fragment),K(e,t.target,t.anchor),$e()}Ve(u)}let un;typeof HTMLElement=="function"&&(un=class extends HTMLElement{constructor(t,i,n){super();de(this,"$$ctor");de(this,"$$s");de(this,"$$c");de(this,"$$cn",!1);de(this,"$$d",{});de(this,"$$r",!1);de(this,"$$p_d",{});de(this,"$$l",{});de(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=i,n&&this.attachShadow({mode:"open"})}addEventListener(t,i,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(i),this.$$c){const r=this.$$c.$on(t,i);this.$$l_u.set(i,r)}super.addEventListener(t,i,n)}removeEventListener(t,i,n){if(super.removeEventListener(t,i,n),this.$$c){const r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(o){return()=>{let a;return{c:function(){a=S("slot"),o!=="default"&&y(a,"name",o)},m:function(c,f){R(c,a,f)},d:function(c){c&&O(a)}}}};var t=i;if(await Promise.resolve(),!this.$$cn)return;const n={},r=zn(this);for(const o of this.$$s)o in r&&(n[o]=[i(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=ot(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=ot(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const a of this.$$l[o]){const u=this.$$c.$on(o,a);this.$$l_u.set(a,u)}this.$$l={}}}attributeChangedCallback(t,i,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=ot(t,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(i=>this.$$p_d[i].attribute===t||!this.$$p_d[i].attribute&&i.toLowerCase()===t)||t}});function ot(e,t,i,n){var s;const r=(s=i[e])==null?void 0:s.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!i[e])return t;if(n==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Hn(e,t,i,n,r,s){let o=class extends un{constructor(){super(e,i,r),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Object.keys(t).forEach(a=>{Object.defineProperty(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){var l;u=ot(a,u,t),this.$$d[a]=u,(l=this.$$c)==null||l.$set({[a]:u})}})}),n.forEach(a=>{Object.defineProperty(o.prototype,a,{get(){var u;return(u=this.$$c)==null?void 0:u[a]}})}),s&&(o=s(o)),e.element=o,o}class ne{constructor(){de(this,"$$");de(this,"$$set")}$destroy(){J(this,1),this.$destroy=V}$on(t,i){if(!ct(i))return V;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(i),()=>{const r=n.indexOf(i);r!==-1&&n.splice(r,1)}}$set(t){this.$$set&&!Ln(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Yn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Yn);function Pn(e){re(e,"svelte-yh1nwn",".Icon.svelte-yh1nwn:before{font-family:'la-icon-font';display:inline-block;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;font-size:1em}")}function Vn(e){let t,i;return{c(){t=S("span"),y(t,"class",i=Te(`Icon ${e[0]} ${e[1]}`)+" svelte-yh1nwn")},m(n,r){R(n,t,r)},p(n,[r]){r&3&&i!==(i=Te(`Icon ${n[0]} ${n[1]}`)+" svelte-yh1nwn")&&y(t,"class",i)},i:V,o:V,d(n){n&&O(t)}}}function Qn(e,t,i){let{className:n=""}=t,{iconLaClassName:r}=t;return e.$$set=s=>{"className"in s&&i(0,n=s.className),"iconLaClassName"in s&&i(1,r=s.iconLaClassName)},[n,r]}class ye extends ne{constructor(t){super(),te(this,t,Qn,Vn,Z,{className:0,iconLaClassName:1},Pn)}}const Fe=[];function Zn(e,t){return{subscribe:ce(e,t).subscribe}}function ce(e,t=V){let i;const n=new Set;function r(a){if(Z(e,a)&&(e=a,i)){const u=!Fe.length;for(const l of n)l[1](),Fe.push(l,e);if(u){for(let l=0;l<Fe.length;l+=2)Fe[l][0](Fe[l+1]);Fe.length=0}}}function s(a){r(a(e))}function o(a,u=V){const l=[a,u];return n.add(l),n.size===1&&(i=t(r,s)||V),a(e),()=>{n.delete(l),n.size===0&&i&&(i(),i=null)}}return{set:r,update:s,subscribe:o}}function Xn(e,t,i){const n=!Array.isArray(e),r=n?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return Zn(i,(o,a)=>{let u=!1;const l=[];let c=0,f=V;const d=()=>{if(c)return;f();const m=t(n?l[0]:l,o,a);s?o(m):f=ct(m)?m:V},g=r.map((m,_)=>Oe(m,v=>{l[_]=v,c&=~(1<<_),u&&d()},()=>{c|=1<<_}));return u=!0,d(),function(){be(g),f(),u=!1}})}const qn={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},jn={fallbackLocale:"",initialLocale:"",loadingDelay:200,formats:qn,warnOnMissingMessages:!0},ei=jn;let cn;function lt(){return cn}function ti(e){return cn=e}function tt(){return ei}function Bt(e){return e.split("-").map((t,i,n)=>n.slice(0,i+1).join("-")).reverse()}function nt(e,t=tt().fallbackLocale){const i=Bt(e);return t?[...new Set([...i,...Bt(t)])]:i}let Nt;const dt=ce({});function ni(e){return Nt[e]||null}function Dt(e){return e in Nt}function ii(e,t){if(Dt(e)){const i=ni(e);if(t in i)return i[t];const n=t.split(".");let r=i;for(let s=0;s<n.length;s++){if(typeof r[n[s]]!="object")return r[n[s]]||null;r=r[n[s]]}return r}return null}function ri(e){if(e==null)return null;const t=nt(e);for(let i=0;i<t.length;i++){const n=t[i];if(Dt(n))return n}return null}function si(e,...t){dt.update(i=>(i[e]=Object.assign(i[e]||{},...t),i))}dt.subscribe(e=>Nt=e);const Kt=ce(!1),Ot={};function oi(e){Ot[e]=new Set}function ai(e){delete Ot[e]}function Qe(e){return Ot[e]}function li(e){return nt(e).reverse().map(t=>{const i=Qe(t);return[t,i?[...i]:[]]}).filter(([,t])=>t.length>0)}function Rt(e){return nt(e).reverse().some(Qe)}const He={};function fn(e){if(!Rt(e))return Promise.resolve();if(e in He)return He[e];const t=li(e);if(t.length===0)return Promise.resolve();const i=setTimeout(()=>Kt.set(!0),tt().loadingDelay);return He[e]=Promise.all(t.map(([n,r])=>Promise.all(r.map(s=>s())).then(s=>{ai(n),s=s.map(o=>o.default||o),si(n,...s)}))).then(()=>{clearTimeout(i),Kt.set(!1),delete He[e]}),He[e]}function Jt(e,t){Qe(e)||oi(e);const i=Qe(e);Qe(e).has(t)||(Dt(e)||dt.update(n=>(n[e]={},n)),i.add(t))}const Je=ce("");Je.subscribe(e=>{ti(e),typeof window<"u"&&e!==""&&document.documentElement.setAttribute("lang",e)});const Tt=Je.set;Je.set=e=>ri(e)&&Rt(e)?fn(e).then(()=>Tt(e)):Tt(e);Je.update=e=>{let t=lt();e(t),Tt(t)};function ui(e){const{formats:t,...i}=e,n=e.initialLocale||e.fallbackLocale,r=tt();return Object.assign(r,i,{initialLocale:n}),t&&("number"in t&&Object.assign(r.formats.number,t.number),"date"in t&&Object.assign(r.formats.date,t.date),"time"in t&&Object.assign(r.formats.time,t.time)),Je.set(n)}const De={},ci=(e,t,i)=>i&&(t in De||(De[t]={}),e in De[t]||(De[t][e]=i),i),fi=(e,t)=>{if(t==null)return;if(t in De&&e in De[t])return De[t][e];const i=nt(t);for(let n=0;n<i.length;n++){const r=i[n],s=ii(r,e);if(s)return ci(e,t,s)}},di=(e,t,i={})=>{const n=typeof t=="string"?t:t.id,r=typeof t=="string"?i:t,{values:s,locale:o=e||lt(),default:a}=r;if(o==null)throw new Error("[svelte-intl-precompile] Cannot format a message without first setting the initial locale.");let u=fi(n,o);return typeof u=="string"?u:typeof u=="function"?u(...Object.keys(r.values||{}).sort().map(l=>(r.values||{})[l])):(tt().warnOnMissingMessages&&console.warn(`[svelte-intl-precompile] The message "${n}" was not found in "${nt(o).join('", "')}".${Rt(lt())?`
|
|
2
2
|
|
|
3
|
-
Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`),a||n)},$e=Zn([Je,ut],([e])=>di.bind(null,e));function fi(e){return un(e||st()||qe().initialLocale)}function gi(e){ie(e,"svelte-xoajdi","span.svelte-xoajdi{margin-right:10px}")}function Bt(e){let t,i=(e[2]??"many")+"",n;return{c(){t=te("of "),n=te(i)},m(r,s){F(r,t,s),F(r,n,s)},p(r,s){s&4&&i!==(i=(r[2]??"many")+"")&&oe(n,i)},d(r){r&&(R(t),R(n))}}}function hi(e){let t,i,n=e[3].length+"",r,s,o,a,u,l=e[4]&&Bt(e);return{c(){t=D("span"),i=te("Showing "),r=te(n),s=P(),l&&l.c(),o=te(`
|
|
4
|
-
results
|
|
5
|
-
`),T(t,"class","svelte-xoajdi")},m(c,d){F(c,t,d),S(t,i),S(t,r),S(t,s),l&&l.m(t,null),S(t,o),a||(u=le(t,"click",e[5]),a=!0)},p(c,[d]){d&8&&n!==(n=c[3].length+"")&&oe(r,n),c[4]?l?l.p(c,d):(l=Bt(c),l.c(),l.m(t,o)):l&&(l.d(1),l=null)},i:Q,o:Q,d(c){c&&R(t),l&&l.d(),a=!1,u()}}}function mi(e,t,i){let n,r=Q,s=()=>(r(),r=ye(l,_=>i(3,n=_)),l),o,a=Q,u=()=>(a(),a=ye(c,_=>i(4,o=_)),c);e.$$.on_destroy.push(()=>r()),e.$$.on_destroy.push(()=>a());let{data:l}=t;s();let{cursor:c}=t;u();let{filter:d}=t,f=null;function g(){i(2,f=null)}async function m(){let y=await Te("api").getTicketsGridListCount({filters:d,timezoneOffset:new Date().getTimezoneOffset()});i(2,f=y.count)}return e.$$set=_=>{"data"in _&&s(i(0,l=_.data)),"cursor"in _&&u(i(1,c=_.cursor)),"filter"in _&&i(6,d=_.filter)},e.$$.update=()=>{e.$$.dirty&64&&d&&g()},[l,c,f,n,o,m,d]}class pi extends ee{constructor(t){super(),j(this,t,mi,hi,Z,{data:0,cursor:1,filter:6},gi)}}function _i(e){ie(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 vi(e){let t,i;return t=new be({props:{iconLaClassName:"la-move-down"}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function yi(e){let t,i;return t=new be({props:{iconLaClassName:"la-move-up"}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function bi(e){let t,i,n,r,s,o=e[7]("Importance")+"",a,u,l,c,d,f,g,m,_,y,v,x,O,G,A;const k=[yi,vi],J=[];function V(z,E){return z[5]?0:1}return c=V(e),d=J[c]=k[c](e),m=new pi({props:{cursor:e[3],data:e[2],filter:e[4]}}),v=new be({props:{iconLaClassName:"la-refresh"}}),{c(){t=D("div"),i=D("div"),n=D("input"),r=P(),s=D("button"),a=te(o),u=P(),l=D("button"),d.c(),f=P(),g=D("div"),H(m.$$.fragment),_=P(),y=D("button"),H(v.$$.fragment),T(n,"type","checkbox"),T(n,"class","svelte-7v4n24"),T(i,"class","headCheckbox svelte-7v4n24"),T(s,"class","Sorting svelte-7v4n24"),T(l,"class","sortButton svelte-7v4n24"),T(y,"class","spinner svelte-7v4n24"),T(y,"title",x=e[7]("Reload")),zt(y,"loading",e[8]),T(g,"class","rightPanel svelte-7v4n24"),T(t,"class","Head svelte-7v4n24")},m(z,E){F(z,t,E),S(t,i),S(i,n),n.checked=e[6],S(t,r),S(t,s),S(s,a),S(t,u),S(t,l),J[c].m(l,null),S(t,f),S(t,g),B(m,g,null),S(g,_),S(g,y),B(v,y,null),O=!0,G||(A=[le(n,"change",e[14]),le(n,"click",e[11]),le(s,"click",e[12]),le(l,"click",e[15]),le(y,"click",e[16])],G=!0)},p(z,[E]){E&64&&(n.checked=z[6]),(!O||E&128)&&o!==(o=z[7]("Importance")+"")&&oe(a,o);let I=c;c=V(z),c!==I&&(he(),L(J[I],1,1,()=>{J[I]=null}),me(),d=J[c],d||(d=J[c]=k[c](z),d.c()),w(d,1),d.m(l,null));const W={};E&8&&(W.cursor=z[3]),E&4&&(W.data=z[2]),E&16&&(W.filter=z[4]),m.$set(W),(!O||E&128&&x!==(x=z[7]("Reload")))&&T(y,"title",x),(!O||E&256)&&zt(y,"loading",z[8])},i(z){O||(w(d),w(m.$$.fragment,z),w(v.$$.fragment,z),O=!0)},o(z){L(d),L(m.$$.fragment,z),L(v.$$.fragment,z),O=!1},d(z){z&&R(t),J[c].d(),K(m),K(v),G=!1,we(A)}}}function wi(e,t,i){let n,r=Q,s=()=>(r(),r=ye(m,W=>i(5,n=W)),m),o,a=Q,u=()=>(a(),a=ye(_,W=>i(6,o=W)),_),l,c=Q,d=()=>(c(),c=ye(y,W=>i(17,l=W)),y),f,g;ne(e,$e,W=>i(7,f=W)),e.$$.on_destroy.push(()=>r()),e.$$.on_destroy.push(()=>a()),e.$$.on_destroy.push(()=>c());let{direction:m}=t;s();let{selectedAll:_}=t;u();let{data:y}=t;d();let{cursor:v}=t,{filters:x}=t;const O=Te("loadMoreFunction"),G=Te("loading");ne(e,G,W=>i(8,g=W));const A=on();function k(){_e(y,l=l.map(W=>(W.__selected=!o,W)),l)}function J(){A("openModal")}const V=()=>{_e(m,n=!n,n)};function z(){o=this.checked,_.set(o)}const E=()=>V(),I=()=>O(!0);return e.$$set=W=>{"direction"in W&&s(i(0,m=W.direction)),"selectedAll"in W&&u(i(1,_=W.selectedAll)),"data"in W&&d(i(2,y=W.data)),"cursor"in W&&i(3,v=W.cursor),"filters"in W&&i(4,x=W.filters)},[m,_,y,v,x,n,o,f,g,O,G,k,J,V,z,E,I]}class ki extends ee{constructor(t){super(),j(this,t,wi,bi,Z,{direction:0,selectedAll:1,data:2,cursor:3,filters:4},_i)}}function ot(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 Ti=()=>{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]},Ci=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 $i(e){ie(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 Li(e){let t;return{c(){t=D("div"),t.textContent=`${e[10]}`,T(t,"class","innerInitials svelte-hbozhk")},m(i,n){F(i,t,n)},p:Q,d(i){i&&R(t)}}}function Si(e){let t,i,n,r,s,o;return{c(){t=D("div"),i=D("img"),T(i,"alt",""),T(i,"class",Ce("innerImage")+" svelte-hbozhk"),pt(i.src,n=e[2])||T(i,"src",n),T(t,"class",r=Ce(e[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){F(a,t,u),S(t,i),s||(o=[le(i,"error",e[15]),le(i,"load",e[16])],s=!0)},p(a,u){u&4&&!pt(i.src,n=a[2])&&T(i,"src",n),u&256&&r!==(r=Ce(a[8]?"imageLoading":"")+" svelte-hbozhk")&&T(t,"class",r)},d(a){a&&R(t),s=!1,we(o)}}}function Ni(e){let t,i;function n(o,a){return o[2]&&!o[7]?Si:Li}let r=n(e),s=r(e);return{c(){t=D("div"),s.c(),T(t,"aria-label",e[1]),T(t,"class","wrapper svelte-hbozhk"),T(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){F(o,t,a),s.m(t,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(t,null))),a&2&&T(t,"aria-label",o[1]),a&125&&i!==(i=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&T(t,"style",i)},i:Q,o:Q,d(o){o&&R(t),s.d()}}}function Di(e,t,i){let{style:n=""}=t,{name:r="Avatar"}=t,{initials:s}=t,{src:o}=t,{bgColor:a="lightGrey"}=t,{textColor:u="white"}=t,{size:l="50px"}=t,{borderRadius:c="50%"}=t,{square:d=!1}=t,{randomBgColor:f=!1}=t;const g=f?Ti():a,m=s||Ci(r),_=m.length;let y=!1,v=!0;const x=()=>i(7,y=!0),O=()=>i(8,v=!1);return e.$$set=G=>{"style"in G&&i(0,n=G.style),"name"in G&&i(1,r=G.name),"initials"in G&&i(12,s=G.initials),"src"in G&&i(2,o=G.src),"bgColor"in G&&i(13,a=G.bgColor),"textColor"in G&&i(3,u=G.textColor),"size"in G&&i(4,l=G.size),"borderRadius"in G&&i(5,c=G.borderRadius),"square"in G&&i(6,d=G.square),"randomBgColor"in G&&i(14,f=G.randomBgColor)},[n,r,o,u,l,c,d,y,v,g,m,_,s,a,f,x,O]}class Ai extends ee{constructor(t){super(),j(this,t,Di,Ni,Z,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},$i)}}var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dn={exports:{}},fn={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}};fn.exports=t})();var Oi=fn.exports,kt={utf8:{stringToBytes:function(e){return kt.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(kt.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("")}}},Kt=kt;/*!
|
|
3
|
+
Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`),a||n)},ke=Xn([Je,dt],([e])=>di.bind(null,e));function gi(e){return fn(e||lt()||tt().initialLocale)}const Ze=ce(!1),Ye=ce([]);function hi(e){re(e,"svelte-12rp7nl","span.svelte-12rp7nl{margin-right:10px}.Selection.svelte-12rp7nl{color:var(--ticket-status-chat-background);font-size:12px;font-style:normal;font-weight:700;line-height:20px}.many.svelte-12rp7nl{color:var(--main-textcolor);font-weight:700}")}function mi(e){let t,i=e[4]("Displaying ")+e[5].length+" "+e[4]("of"),n,r,s,o=(e[1]??e[4]("many"))+"",a,u,l;return{c(){t=S("span"),n=ee(i),r=P(),s=S("span"),a=ee(o),y(t,"class","svelte-12rp7nl"),y(s,"class","many svelte-12rp7nl")},m(c,f){R(c,t,f),C(t,n),R(c,r,f),R(c,s,f),C(s,a),u||(l=le(s,"click",e[6]),u=!0)},p(c,f){f&48&&i!==(i=c[4]("Displaying ")+c[5].length+" "+c[4]("of"))&&ie(n,i),f&18&&o!==(o=(c[1]??c[4]("many"))+"")&&ie(a,o)},d(c){c&&(O(t),O(r),O(s)),u=!1,l()}}}function pi(e){let t;function i(s,o){return s[2]?yi:s[3].length===1?vi:_i}let n=i(e),r=n(e);return{c(){r.c(),t=et()},m(s,o){r.m(s,o),R(s,t,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&O(t),r.d(s)}}}function _i(e){let t,i=e[3].length+" rows selected",n;return{c(){t=S("span"),n=ee(i),y(t,"class","Selection svelte-12rp7nl")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&8&&i!==(i=r[3].length+" rows selected")&&ie(n,i)},d(r){r&&O(t)}}}function vi(e){let t,i=e[3].length+" row selected",n;return{c(){t=S("span"),n=ee(i),y(t,"class","Selection svelte-12rp7nl")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&8&&i!==(i=r[3].length+" row selected")&&ie(n,i)},d(r){r&&O(t)}}}function yi(e){let t;function i(s,o){return s[3].length>0?ki:bi}let n=i(e),r=n(e);return{c(){r.c(),t=et()},m(s,o){r.m(s,o),R(s,t,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&O(t),r.d(s)}}}function bi(e){let t,i=e[4]("all rows selected")+"",n;return{c(){t=S("span"),n=ee(i),y(t,"class","Selection svelte-12rp7nl")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&16&&i!==(i=r[4]("all rows selected")+"")&&ie(n,i)},d(r){r&&O(t)}}}function ki(e){let t;function i(s,o){return s[3].length===1?$i:wi}let n=i(e),r=n(e);return{c(){r.c(),t=et()},m(s,o){r.m(s,o),R(s,t,o)},p(s,o){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&O(t),r.d(s)}}}function wi(e){let t,i=e[4]("all rows selected except")+" "+e[3].length+" "+e[4]("rows"),n;return{c(){t=S("span"),n=ee(i),y(t,"class","Selection svelte-12rp7nl")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&24&&i!==(i=r[4]("all rows selected except")+" "+r[3].length+" "+r[4]("rows"))&&ie(n,i)},d(r){r&&O(t)}}}function $i(e){let t,i=e[4]("all rows selected except")+" "+e[3].length+" "+e[4]("row"),n;return{c(){t=S("span"),n=ee(i),y(t,"class","Selection svelte-12rp7nl")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&24&&i!==(i=r[4]("all rows selected except")+" "+r[3].length+" "+r[4]("row"))&&ie(n,i)},d(r){r&&O(t)}}}function Ti(e){let t;function i(s,o){return s[2]||s[3].length>0?pi:mi}let n=i(e),r=n(e);return{c(){r.c(),t=et()},m(s,o){r.m(s,o),R(s,t,o)},p(s,[o]){n===(n=i(s))&&r?r.p(s,o):(r.d(1),r=n(s),r&&(r.c(),r.m(t.parentNode,t)))},i:V,o:V,d(s){s&&O(t),r.d(s)}}}function Ci(e,t,i){let n,r,s,o,a=V,u=()=>(a(),a=Oe(l,_=>i(5,o=_)),l);j(e,Ze,_=>i(2,n=_)),j(e,Ye,_=>i(3,r=_)),j(e,ke,_=>i(4,s=_)),e.$$.on_destroy.push(()=>a());let{data:l}=t;u();let{filter:c}=t,f=null,d=ve("loading");function g(){i(1,f=null)}async function m(){if(d)return;let v=await ve("api").getTicketsGridListCount({filters:c,timezoneOffset:new Date().getTimezoneOffset()});i(1,f=v.count)}return e.$$set=_=>{"data"in _&&u(i(0,l=_.data)),"filter"in _&&i(7,c=_.filter)},e.$$.update=()=>{e.$$.dirty&128&&c&&g()},[l,f,n,r,s,o,m,c]}class Li extends ne{constructor(t){super(),te(this,t,Ci,Ti,Z,{data:0,filter:7},hi)}}function Si(e){re(e,"svelte-7v4n24",".Head.svelte-7v4n24.svelte-7v4n24{display:none}.headCheckbox.svelte-7v4n24.svelte-7v4n24{width:20px}button.svelte-7v4n24.svelte-7v4n24{border:none;background:none;font-size:13px;font-weight:400;color:var(--main-lighter-textcolor)}.spinner.svelte-7v4n24.svelte-7v4n24{font-size:16px;cursor:pointer}.rightPanel.svelte-7v4n24.svelte-7v4n24{margin-left:auto}.Sorting.svelte-7v4n24.svelte-7v4n24{cursor:pointer;text-align:left;font-weight:bold}.sortButton.svelte-7v4n24.svelte-7v4n24{cursor:pointer;text-align:left;font-weight:bold}.loading.svelte-7v4n24.svelte-7v4n24{animation-name:svelte-7v4n24-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-7v4n24-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@media screen and (min-width: 768px){.Head.svelte-7v4n24.svelte-7v4n24{display:flex;position:sticky;top:0;color:var(--panel_text_color);margin:6px 23px;align-items:center;font-size:14px;font-family:'Roboto', sans-serif}.headCheckbox.svelte-7v4n24 input[type=checkbox].svelte-7v4n24{vertical-align:middle;cursor:pointer}}")}function Ni(e){let t,i;return t=new ye({props:{iconLaClassName:"la-move-down"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Di(e){let t,i;return t=new ye({props:{iconLaClassName:"la-move-up"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Oi(e){let t,i,n,r,s,o=e[5]("Importance")+"",a,u,l,c,f,d,g,m,_,v,N,x,A,F,b;const z=[Di,Ni],U=[];function M(B,I){return B[3]?0:1}return c=M(e),f=U[c]=z[c](e),m=new Li({props:{data:e[1],filter:e[2]}}),N=new ye({props:{iconLaClassName:"la-refresh"}}),{c(){t=S("div"),i=S("div"),n=S("input"),r=P(),s=S("button"),a=ee(o),u=P(),l=S("button"),f.c(),d=P(),g=S("div"),H(m.$$.fragment),_=P(),v=S("button"),H(N.$$.fragment),y(n,"type","checkbox"),y(n,"class","svelte-7v4n24"),y(i,"class","headCheckbox svelte-7v4n24"),y(s,"class","Sorting svelte-7v4n24"),y(l,"class","sortButton svelte-7v4n24"),y(v,"class","spinner svelte-7v4n24"),y(v,"title",x=e[5]("Reload")),xt(v,"loading",e[6]),y(g,"class","rightPanel svelte-7v4n24"),y(t,"class","Head svelte-7v4n24")},m(B,I){R(B,t,I),C(t,i),C(i,n),n.checked=e[4],C(t,r),C(t,s),C(s,a),C(t,u),C(t,l),U[c].m(l,null),C(t,d),C(t,g),K(m,g,null),C(g,_),C(g,v),K(N,v,null),A=!0,F||(b=[le(n,"change",e[12]),le(n,"click",e[9]),le(s,"click",e[10]),le(l,"click",e[13]),le(v,"click",e[14])],F=!0)},p(B,[I]){I&16&&(n.checked=B[4]),(!A||I&32)&&o!==(o=B[5]("Importance")+"")&&ie(a,o);let T=c;c=M(B),c!==T&&(ge(),$(U[T],1,1,()=>{U[T]=null}),he(),f=U[c],f||(f=U[c]=z[c](B),f.c()),k(f,1),f.m(l,null));const Q={};I&2&&(Q.data=B[1]),I&4&&(Q.filter=B[2]),m.$set(Q),(!A||I&32&&x!==(x=B[5]("Reload")))&&y(v,"title",x),(!A||I&64)&&xt(v,"loading",B[6])},i(B){A||(k(f),k(m.$$.fragment,B),k(N.$$.fragment,B),A=!0)},o(B){$(f),$(m.$$.fragment,B),$(N.$$.fragment,B),A=!1},d(B){B&&O(t),U[c].d(),J(m),J(N),F=!1,be(b)}}}function Ri(e,t,i){let n,r=V,s=()=>(r(),r=Oe(d,M=>i(3,n=M)),d),o,a,u=V,l=()=>(u(),u=Oe(g,M=>i(15,a=M)),g),c,f;j(e,Ze,M=>i(4,o=M)),j(e,ke,M=>i(5,c=M)),e.$$.on_destroy.push(()=>r()),e.$$.on_destroy.push(()=>u());let{direction:d}=t;s();let{data:g}=t;l();let{filters:m}=t;const _=ve("loadMoreFunction"),v=ve("loading");j(e,v,M=>i(6,f=M));const N=ln();function x(){Ze.set(!o),_e(g,a=a.map(M=>(M.__selected=o,M)),a)}function A(){N("openModal")}const F=()=>{_e(d,n=!n,n)};function b(){o=this.checked,Ze.set(o)}const z=()=>F(),U=()=>_(!0);return e.$$set=M=>{"direction"in M&&s(i(0,d=M.direction)),"data"in M&&l(i(1,g=M.data)),"filters"in M&&i(2,m=M.filters)},[d,g,m,n,o,c,f,_,v,x,A,F,b,z,U]}class Ai extends ne{constructor(t){super(),te(this,t,Ri,Oi,Z,{direction:0,data:1,filters:2},Si)}}function ut(e){switch(e){case"A":return"var(--ticket-status-answered-background)";case"T":return"var(--ticket-status-chat-background)";case"P":return"var(--ticket-status-phone-background)";case"X":return"var(--ticket-status-deleted-background)";case"B":return"";case"I":return"var(--ticket-status-deleted-background)";case"R":return"var(--ticket-status-resolved-background)";case"N":return"var(--ticket-status-new-background)";case"C":return"var(--ticket-status-open-background)";case"W":return"var(--ticket-status-postponed-background)"}}const Fi=()=>{const e=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#FFEB3B","#FFC107","#FF5722","#795548"],t=Math.floor(Math.random()*e.length);return e[t]},Mi=e=>{let t=e.split(" ");return t.length>1?t=t.shift().charAt(0)+t.pop().charAt(0):t=e.substring(0,2),t.toUpperCase()};function Gi(e){re(e,"svelte-hbozhk",".wrapper.svelte-hbozhk{position:relative;width:var(--size);height:var(--size)}.innerImage.svelte-hbozhk,.innerInitials.svelte-hbozhk,.imageLoading.svelte-hbozhk{display:block;width:100%;height:100%;border-radius:var(--borderRadius)}.innerInitials.svelte-hbozhk{line-height:var(--size);background-color:var(--bgColor);color:var(--textColor);text-align:center;font-size:calc(var(--size) / (var(--abbrLength) + 0.5))}.imageLoading.svelte-hbozhk{background-color:var(--bgColor)}.imageLoading.svelte-hbozhk::before{content:'';display:block;height:100%;width:100%;background:linear-gradient(90deg, transparent, #ffffff38, transparent);position:absolute;top:0;left:0;animation:svelte-hbozhk-skeleton-animation 1.2s linear infinite}@keyframes svelte-hbozhk-skeleton-animation{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}")}function zi(e){let t;return{c(){t=S("div"),t.textContent=`${e[10]}`,y(t,"class","innerInitials svelte-hbozhk")},m(i,n){R(i,t,n)},p:V,d(i){i&&O(t)}}}function Ei(e){let t,i,n,r,s,o;return{c(){t=S("div"),i=S("img"),y(i,"alt",""),y(i,"class",Te("innerImage")+" svelte-hbozhk"),yt(i.src,n=e[2])||y(i,"src",n),y(t,"class",r=Te(e[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){R(a,t,u),C(t,i),s||(o=[le(i,"error",e[15]),le(i,"load",e[16])],s=!0)},p(a,u){u&4&&!yt(i.src,n=a[2])&&y(i,"src",n),u&256&&r!==(r=Te(a[8]?"imageLoading":"")+" svelte-hbozhk")&&y(t,"class",r)},d(a){a&&O(t),s=!1,be(o)}}}function Ii(e){let t,i;function n(o,a){return o[2]&&!o[7]?Ei:zi}let r=n(e),s=r(e);return{c(){t=S("div"),s.c(),y(t,"aria-label",e[1]),y(t,"class","wrapper svelte-hbozhk"),y(t,"style",i=e[0]+"--borderRadius:"+(e[6]?0:e[5])+"; --size:"+e[4]+"; --bgColor:"+e[9]+"; --src:"+e[2]+"; --textColor:"+e[3]+"; --abbrLength:"+e[11])},m(o,a){R(o,t,a),s.m(t,null)},p(o,[a]){r===(r=n(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(t,null))),a&2&&y(t,"aria-label",o[1]),a&125&&i!==(i=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&y(t,"style",i)},i:V,o:V,d(o){o&&O(t),s.d()}}}function xi(e,t,i){let{style:n=""}=t,{name:r="Avatar"}=t,{initials:s}=t,{src:o}=t,{bgColor:a="lightGrey"}=t,{textColor:u="white"}=t,{size:l="50px"}=t,{borderRadius:c="50%"}=t,{square:f=!1}=t,{randomBgColor:d=!1}=t;const g=d?Fi():a,m=s||Mi(r),_=m.length;let v=!1,N=!0;const x=()=>i(7,v=!0),A=()=>i(8,N=!1);return e.$$set=F=>{"style"in F&&i(0,n=F.style),"name"in F&&i(1,r=F.name),"initials"in F&&i(12,s=F.initials),"src"in F&&i(2,o=F.src),"bgColor"in F&&i(13,a=F.bgColor),"textColor"in F&&i(3,u=F.textColor),"size"in F&&i(4,l=F.size),"borderRadius"in F&&i(5,c=F.borderRadius),"square"in F&&i(6,f=F.square),"randomBgColor"in F&&i(14,d=F.randomBgColor)},[n,r,o,u,l,c,f,v,N,g,m,_,s,a,d,x,A]}class Bi extends ne{constructor(t){super(),te(this,t,xi,Ii,Z,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},Gi)}}var dn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function At(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gn={exports:{}},hn={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(i,n){return i<<n|i>>>32-n},rotr:function(i,n){return i<<32-n|i>>>n},endian:function(i){if(i.constructor==Number)return t.rotl(i,8)&16711935|t.rotl(i,24)&4278255360;for(var n=0;n<i.length;n++)i[n]=t.endian(i[n]);return i},randomBytes:function(i){for(var n=[];i>0;i--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(i){for(var n=[],r=0,s=0;r<i.length;r++,s+=8)n[s>>>5]|=i[r]<<24-s%32;return n},wordsToBytes:function(i){for(var n=[],r=0;r<i.length*32;r+=8)n.push(i[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(i){for(var n=[],r=0;r<i.length;r++)n.push((i[r]>>>4).toString(16)),n.push((i[r]&15).toString(16));return n.join("")},hexToBytes:function(i){for(var n=[],r=0;r<i.length;r+=2)n.push(parseInt(i.substr(r,2),16));return n},bytesToBase64:function(i){for(var n=[],r=0;r<i.length;r+=3)for(var s=i[r]<<16|i[r+1]<<8|i[r+2],o=0;o<4;o++)r*8+o*6<=i.length*8?n.push(e.charAt(s>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<i.length;s=++r%4)s!=0&&n.push((e.indexOf(i.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|e.indexOf(i.charAt(r))>>>6-s*2);return n}};hn.exports=t})();var Ki=hn.exports,Ct={utf8:{stringToBytes:function(e){return Ct.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Ct.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i)&255);return t},bytesToString:function(e){for(var t=[],i=0;i<e.length;i++)t.push(String.fromCharCode(e[i]));return t.join("")}}},Ut=Ct;/*!
|
|
6
4
|
* Determine if an object is a Buffer
|
|
7
5
|
*
|
|
8
6
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
9
7
|
* @license MIT
|
|
10
|
-
*/var Ri=function(e){return e!=null&&(gn(e)||Mi(e)||!!e._isBuffer)};function gn(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Mi(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&gn(e.slice(0,0))}(function(){var e=Oi,t=Kt.utf8,i=Ri,n=Kt.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=t.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=e.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,d=-1732584194,f=271733878,g=0;g<a.length;g++)a[g]=(a[g]<<8|a[g]>>>24)&16711935|(a[g]<<24|a[g]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var m=r._ff,_=r._gg,y=r._hh,v=r._ii,g=0;g<a.length;g+=16){var x=l,O=c,G=d,A=f;l=m(l,c,d,f,a[g+0],7,-680876936),f=m(f,l,c,d,a[g+1],12,-389564586),d=m(d,f,l,c,a[g+2],17,606105819),c=m(c,d,f,l,a[g+3],22,-1044525330),l=m(l,c,d,f,a[g+4],7,-176418897),f=m(f,l,c,d,a[g+5],12,1200080426),d=m(d,f,l,c,a[g+6],17,-1473231341),c=m(c,d,f,l,a[g+7],22,-45705983),l=m(l,c,d,f,a[g+8],7,1770035416),f=m(f,l,c,d,a[g+9],12,-1958414417),d=m(d,f,l,c,a[g+10],17,-42063),c=m(c,d,f,l,a[g+11],22,-1990404162),l=m(l,c,d,f,a[g+12],7,1804603682),f=m(f,l,c,d,a[g+13],12,-40341101),d=m(d,f,l,c,a[g+14],17,-1502002290),c=m(c,d,f,l,a[g+15],22,1236535329),l=_(l,c,d,f,a[g+1],5,-165796510),f=_(f,l,c,d,a[g+6],9,-1069501632),d=_(d,f,l,c,a[g+11],14,643717713),c=_(c,d,f,l,a[g+0],20,-373897302),l=_(l,c,d,f,a[g+5],5,-701558691),f=_(f,l,c,d,a[g+10],9,38016083),d=_(d,f,l,c,a[g+15],14,-660478335),c=_(c,d,f,l,a[g+4],20,-405537848),l=_(l,c,d,f,a[g+9],5,568446438),f=_(f,l,c,d,a[g+14],9,-1019803690),d=_(d,f,l,c,a[g+3],14,-187363961),c=_(c,d,f,l,a[g+8],20,1163531501),l=_(l,c,d,f,a[g+13],5,-1444681467),f=_(f,l,c,d,a[g+2],9,-51403784),d=_(d,f,l,c,a[g+7],14,1735328473),c=_(c,d,f,l,a[g+12],20,-1926607734),l=y(l,c,d,f,a[g+5],4,-378558),f=y(f,l,c,d,a[g+8],11,-2022574463),d=y(d,f,l,c,a[g+11],16,1839030562),c=y(c,d,f,l,a[g+14],23,-35309556),l=y(l,c,d,f,a[g+1],4,-1530992060),f=y(f,l,c,d,a[g+4],11,1272893353),d=y(d,f,l,c,a[g+7],16,-155497632),c=y(c,d,f,l,a[g+10],23,-1094730640),l=y(l,c,d,f,a[g+13],4,681279174),f=y(f,l,c,d,a[g+0],11,-358537222),d=y(d,f,l,c,a[g+3],16,-722521979),c=y(c,d,f,l,a[g+6],23,76029189),l=y(l,c,d,f,a[g+9],4,-640364487),f=y(f,l,c,d,a[g+12],11,-421815835),d=y(d,f,l,c,a[g+15],16,530742520),c=y(c,d,f,l,a[g+2],23,-995338651),l=v(l,c,d,f,a[g+0],6,-198630844),f=v(f,l,c,d,a[g+7],10,1126891415),d=v(d,f,l,c,a[g+14],15,-1416354905),c=v(c,d,f,l,a[g+5],21,-57434055),l=v(l,c,d,f,a[g+12],6,1700485571),f=v(f,l,c,d,a[g+3],10,-1894986606),d=v(d,f,l,c,a[g+10],15,-1051523),c=v(c,d,f,l,a[g+1],21,-2054922799),l=v(l,c,d,f,a[g+8],6,1873313359),f=v(f,l,c,d,a[g+15],10,-30611744),d=v(d,f,l,c,a[g+6],15,-1560198380),c=v(c,d,f,l,a[g+13],21,1309151649),l=v(l,c,d,f,a[g+4],6,-145523070),f=v(f,l,c,d,a[g+11],10,-1120210379),d=v(d,f,l,c,a[g+2],15,718787259),c=v(c,d,f,l,a[g+9],21,-343485551),l=l+x>>>0,c=c+O>>>0,d=d+G>>>0,f=f+A>>>0}return e.endian([l,c,d,f])};r._ff=function(s,o,a,u,l,c,d){var f=s+(o&a|~o&u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._gg=function(s,o,a,u,l,c,d){var f=s+(o&u|a&~u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._hh=function(s,o,a,u,l,c,d){var f=s+(o^a^u)+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._ii=function(s,o,a,u,l,c,d){var f=s+(a^(o|~u))+(l>>>0)+d;return(f<<c|f>>>32-c)+o},r._blocksize=16,r._digestsize=16,dn.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):e.bytesToHex(a)}})();var Fi=dn.exports;const Gi=Dt(Fi);function zi(e){return[...e].reduce((t,i)=>Math.imul(31,t)+i.charCodeAt(0)|0,0)}function Ei(e){ie(e,"svelte-1p23x6g",".Column.svelte-1p23x6g{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}function xi(e){let t,i,n;const r=e[2].default,s=xe(r,e,e[1],null);return{c(){t=D("div"),s&&s.c(),T(t,"class",i="Column "+e[0]+" svelte-1p23x6g")},m(o,a){F(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?Ie(r,o[1],a,null):Ke(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-1p23x6g"))&&T(t,"class",i)},i(o){n||(w(s,o),n=!0)},o(o){L(s,o),n=!1},d(o){o&&R(t),s&&s.d(o)}}}function Ii(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 At extends ee{constructor(t){super(),j(this,t,Ii,xi,Z,{className:0},Ei)}}function Bi(e){ie(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 Ki(e){let t,i,n,r,s,o;const a=e[4].default,u=xe(a,e,e[3],null);return{c(){t=D("div"),u&&u.c(),i=P(),n=D("span"),r=te(e[0]),T(n,"class","text"),T(t,"class",s="Tag "+e[1]+" svelte-1d2a8s6"),T(t,"style",e[2])},m(l,c){F(l,t,c),u&&u.m(t,null),S(t,i),S(t,n),S(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Be(u,a,l,l[3],o?Ie(a,l[3],c,null):Ke(l[3]),null),(!o||c&1)&&oe(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1d2a8s6"))&&T(t,"class",s),(!o||c&4)&&T(t,"style",l[2])},i(l){o||(w(u,l),o=!0)},o(l){L(u,l),o=!1},d(l){l&&R(t),u&&u.d(l)}}}function Ji(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 ct extends ee{constructor(t){super(),j(this,t,Ji,Ki,Z,{text:0,className:1,style:2},Bi)}}function Ui(e){ie(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 Hi(e){let t,i;return t=new be({props:{iconLaClassName:e[2]}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Wi(e){let t,i;return t=new ct({props:{text:e[0],className:e[3],style:e[1],$$slots:{default:[Hi]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){B(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Yi(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 dt extends ee{constructor(t){super(),j(this,t,Yi,Wi,Z,{text:0,className:4,style:1,iconLaClassName:2},Ui)}}function Pi(e){ie(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 Jt(e){let t,i;return t=new Ai({props:{bgColor:e[4](e[0]),name:Xe(e[0]),src:e[3](e[0])}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.bgColor=n[4](n[0])),r&1&&(s.name=Xe(n[0])),r&1&&(s.src=n[3](n[0])),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Vi(e){let t,i=[e[4](e[0]),Xe(e[0]),e[3](e[0])],n,r,s,o,a,u=e[0].emails+"",l,c,d,f,g,m=Jt(e);return f=new dt({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=D("div"),m.c(),n=P(),r=D("div"),s=D("div"),s.textContent=`${name}`,o=P(),a=D("div"),l=te(u),c=P(),d=D("div"),H(f.$$.fragment),T(t,"class","avatar svelte-d2fkh2"),T(s,"class","name svelte-d2fkh2"),T(a,"class","email svelte-d2fkh2"),T(d,"class","companyTag svelte-d2fkh2"),T(r,"class","texts svelte-d2fkh2")},m(_,y){F(_,t,y),m.m(t,null),F(_,n,y),F(_,r,y),S(r,s),S(r,o),S(r,a),S(a,l),S(r,c),S(r,d),B(f,d,null),g=!0},p(_,y){y&1&&Z(i,i=[_[4](_[0]),Xe(_[0]),_[3](_[0])])?(he(),L(m,1,1,Q),me(),m=Jt(_),m.c(),w(m,1),m.m(t,null)):m.p(_,y),(!g||y&1)&&u!==(u=_[0].emails+"")&&oe(l,u);const v={};y&5&&(v.text=_[0].company==="Y"?"Company":_[2]("No Company")),y&1&&(v.className=(_[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),f.$set(v)},i(_){g||(w(m),w(f.$$.fragment,_),g=!0)},o(_){L(m),L(f.$$.fragment,_),g=!1},d(_){_&&(R(t),R(n),R(r)),m.d(_),K(f)}}}function Qi(e){let t,i;return t=new At({props:{className:e[1],$$slots:{default:[Vi]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){B(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Xe(e){if(!e)return"";let t=e.firstname+" "+e.lastname;return t.trim()||(t=e.systemName),t}function Zi(e,t,i){let n;ne(e,$e,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/"+Gi(u.emails[0]??"")+"?s=200&d=404"),l}function a(u){let l;u?l=zi(Xe(u)+u.emails):l=Math.floor(Math.random()*16777215);let c=(l&16711680)>>16,d=(l&65280)>>8,f=l&255;return c+d+f<150&&(c=150),c+d+f>400&&(c=0),`rgb(${c},${d},${f})`}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 Xi extends ee{constructor(t){super(),j(this,t,Zi,Qi,Z,{row:0,className:1},Pi)}}var hn={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(cn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",d="month",f="quarter",g="year",m="date",_="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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(b){var C=["th","st","nd","rd"],p=b%100;return"["+b+(C[(p-20)%10]||C[p]||C[0])+"]"}},O=function(b,C,p){var $=String(b);return!$||$.length>=C?b:""+Array(C+1-$.length).join(p)+b},G={s:O,z:function(b){var C=-b.utcOffset(),p=Math.abs(C),$=Math.floor(p/60),N=p%60;return(C<=0?"+":"-")+O($,2,"0")+":"+O(N,2,"0")},m:function b(C,p){if(C.date()<p.date())return-b(p,C);var $=12*(p.year()-C.year())+(p.month()-C.month()),N=C.clone().add($,d),U=p-N<0,Y=C.clone().add($+(U?-1:1),d);return+(-($+(p-N)/(U?N-Y:Y-N))||0)},a:function(b){return b<0?Math.ceil(b)||0:Math.floor(b)},p:function(b){return{M:d,y:g,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:f}[b]||String(b||"").toLowerCase().replace(/s$/,"")},u:function(b){return b===void 0}},A="en",k={};k[A]=x;var J="$isDayjsObject",V=function(b){return b instanceof W||!(!b||!b[J])},z=function b(C,p,$){var N;if(!C)return A;if(typeof C=="string"){var U=C.toLowerCase();k[U]&&(N=U),p&&(k[U]=p,N=U);var Y=C.split("-");if(!N&&Y.length>1)return b(Y[0])}else{var q=C.name;k[q]=C,N=q}return!$&&N&&(A=N),N||!$&&A},E=function(b,C){if(V(b))return b.clone();var p=typeof C=="object"?C:{};return p.date=b,p.args=arguments,new W(p)},I=G;I.l=z,I.i=V,I.w=function(b,C){return E(b,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var W=function(){function b(p){this.$L=z(p.locale,null,!0),this.parse(p),this.$x=this.$x||p.x||{},this[J]=!0}var C=b.prototype;return C.parse=function(p){this.$d=function($){var N=$.date,U=$.utc;if(N===null)return new Date(NaN);if(I.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var Y=N.match(y);if(Y){var q=Y[2]-1||0,re=(Y[7]||"0").substring(0,3);return U?new Date(Date.UTC(Y[1],q,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,re)):new Date(Y[1],q,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,re)}}return new Date(N)}(p),this.init()},C.init=function(){var p=this.$d;this.$y=p.getFullYear(),this.$M=p.getMonth(),this.$D=p.getDate(),this.$W=p.getDay(),this.$H=p.getHours(),this.$m=p.getMinutes(),this.$s=p.getSeconds(),this.$ms=p.getMilliseconds()},C.$utils=function(){return I},C.isValid=function(){return this.$d.toString()!==_},C.isSame=function(p,$){var N=E(p);return this.startOf($)<=N&&N<=this.endOf($)},C.isAfter=function(p,$){return E(p)<this.startOf($)},C.isBefore=function(p,$){return this.endOf($)<E(p)},C.$g=function(p,$,N){return I.u(p)?this[$]:this.set(N,p)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(p,$){var N=this,U=!!I.u($)||$,Y=I.p(p),q=function(Se,ue){var ke=I.w(N.$u?Date.UTC(N.$y,ue,Se):new Date(N.$y,ue,Se),N);return U?ke:ke.endOf(l)},re=function(Se,ue){return I.w(N.toDate()[Se].apply(N.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(ue)),N)},se=this.$W,ae=this.$M,fe=this.$D,Oe="set"+(this.$u?"UTC":"");switch(Y){case g:return U?q(1,0):q(31,11);case d:return U?q(1,ae):q(0,ae+1);case c:var Le=this.$locale().weekStart||0,Ue=(se<Le?se+7:se)-Le;return q(U?fe-Ue:fe+(6-Ue),ae);case l:case m:return re(Oe+"Hours",0);case u:return re(Oe+"Minutes",1);case a:return re(Oe+"Seconds",2);case o:return re(Oe+"Milliseconds",3);default:return this.clone()}},C.endOf=function(p){return this.startOf(p,!1)},C.$set=function(p,$){var N,U=I.p(p),Y="set"+(this.$u?"UTC":""),q=(N={},N[l]=Y+"Date",N[m]=Y+"Date",N[d]=Y+"Month",N[g]=Y+"FullYear",N[u]=Y+"Hours",N[a]=Y+"Minutes",N[o]=Y+"Seconds",N[s]=Y+"Milliseconds",N)[U],re=U===l?this.$D+($-this.$W):$;if(U===d||U===g){var se=this.clone().set(m,1);se.$d[q](re),se.init(),this.$d=se.set(m,Math.min(this.$D,se.daysInMonth())).$d}else q&&this.$d[q](re);return this.init(),this},C.set=function(p,$){return this.clone().$set(p,$)},C.get=function(p){return this[I.p(p)]()},C.add=function(p,$){var N,U=this;p=Number(p);var Y=I.p($),q=function(ae){var fe=E(U);return I.w(fe.date(fe.date()+Math.round(ae*p)),U)};if(Y===d)return this.set(d,this.$M+p);if(Y===g)return this.set(g,this.$y+p);if(Y===l)return q(1);if(Y===c)return q(7);var re=(N={},N[a]=n,N[u]=r,N[o]=i,N)[Y]||1,se=this.$d.getTime()+p*re;return I.w(se,this)},C.subtract=function(p,$){return this.add(-1*p,$)},C.format=function(p){var $=this,N=this.$locale();if(!this.isValid())return N.invalidDate||_;var U=p||"YYYY-MM-DDTHH:mm:ssZ",Y=I.z(this),q=this.$H,re=this.$m,se=this.$M,ae=N.weekdays,fe=N.months,Oe=N.meridiem,Le=function(ue,ke,He,et){return ue&&(ue[ke]||ue($,U))||He[ke].slice(0,et)},Ue=function(ue){return I.s(q%12||12,ue,"0")},Se=Oe||function(ue,ke,He){var et=ue<12?"AM":"PM";return He?et.toLowerCase():et};return U.replace(v,function(ue,ke){return ke||function(He){switch(He){case"YY":return String($.$y).slice(-2);case"YYYY":return I.s($.$y,4,"0");case"M":return se+1;case"MM":return I.s(se+1,2,"0");case"MMM":return Le(N.monthsShort,se,fe,3);case"MMMM":return Le(fe,se);case"D":return $.$D;case"DD":return I.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Le(N.weekdaysMin,$.$W,ae,2);case"ddd":return Le(N.weekdaysShort,$.$W,ae,3);case"dddd":return ae[$.$W];case"H":return String(q);case"HH":return I.s(q,2,"0");case"h":return Ue(1);case"hh":return Ue(2);case"a":return Se(q,re,!0);case"A":return Se(q,re,!1);case"m":return String(re);case"mm":return I.s(re,2,"0");case"s":return String($.$s);case"ss":return I.s($.$s,2,"0");case"SSS":return I.s($.$ms,3,"0");case"Z":return Y}return null}(ue)||Y.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(p,$,N){var U,Y=this,q=I.p($),re=E(p),se=(re.utcOffset()-this.utcOffset())*n,ae=this-re,fe=function(){return I.m(Y,re)};switch(q){case g:U=fe()/12;break;case d:U=fe();break;case f:U=fe()/3;break;case c:U=(ae-se)/6048e5;break;case l:U=(ae-se)/864e5;break;case u:U=ae/r;break;case a:U=ae/n;break;case o:U=ae/i;break;default:U=ae}return N?U:I.a(U)},C.daysInMonth=function(){return this.endOf(d).$D},C.$locale=function(){return k[this.$L]},C.locale=function(p,$){if(!p)return this.$L;var N=this.clone(),U=z(p,$,!0);return U&&(N.$L=U),N},C.clone=function(){return I.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},b}(),de=W.prototype;return E.prototype=de,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",d],["$y",g],["$D",m]].forEach(function(b){de[b[1]]=function(C){return this.$g(C,b[0],b[1])}}),E.extend=function(b,C){return b.$i||(b(C,W,E),b.$i=!0),E},E.locale=z,E.isDayjs=V,E.unix=function(b){return E(1e3*b)},E.en=k[A],E.Ls=k,E.p={},E})})(hn);var qi=hn.exports;const Ye=Dt(qi);var mn={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(cn,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,g){for(var m,_,y,v=d.$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"}],O=x.length,G=0;G<O;G+=1){var A=x[G];A.d&&(m=f?r(l).diff(d,A.d,!0):d.diff(l,A.d,!0));var k=(i.rounding||Math.round)(Math.abs(m));if(y=m>0,k<=A.r||!A.r){k<=1&&G>0&&(A=x[G-1]);var J=v[A.l];g&&(k=g(""+k)),_=typeof J=="string"?J.replace("%d",k):J(k,c,A.l,y);break}}if(c)return _;var V=y?v.future:v.past;return typeof V=="function"?V(_):V.replace("%s",_)},s.to=function(l,c){return a(l,c,this,!0)},s.from=function(l,c){return a(l,c,this)};var u=function(l){return l.$u?r.utc():r()};s.toNow=function(l){return this.to(u(this),l)},s.fromNow=function(l){return this.from(u(this),l)}}})})(mn);var ji=mn.exports;const er=Dt(ji);Ye.extend(er);function tr(e){let t,i,n=[e[3],{title:e[2]},{datetime:e[1]}],r={};for(let s=0;s<n.length;s+=1)r=rt(r,n[s]);return{c(){t=D("time"),i=te(e[0]),Ft(t,r)},m(s,o){F(s,t,o),S(t,i)},p(s,[o]){o&1&&Mn(i,s[0],r.contenteditable),Ft(t,r=Kn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:Q,o:Q,d(s){s&&R(t)}}}function nr(e,t,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=Mt(t,r),{timestamp:o=new Date().toISOString()}=t,{format:a="MMM DD, YYYY"}=t,{relative:u=!1}=t,{live:l=!1}=t,{formatted:c=""}=t,d;const f=60*1e3;return sn(()=>()=>clearInterval(d)),e.$$set=g=>{t=rt(rt({},t),$n(g)),i(3,s=Mt(t,r)),"timestamp"in g&&i(1,o=g.timestamp),"format"in g&&i(4,a=g.format),"relative"in g&&i(5,u=g.relative),"live"in g&&i(6,l=g.live),"formatted"in g&&i(0,c=g.formatted)},e.$$.update=()=>{e.$$.dirty&98&&u&&l!==!1&&(d=setInterval(()=>{i(0,c=Ye(o).from())},Math.abs(typeof l=="number"?l:f))),e.$$.dirty&50&&i(0,c=u?Ye(o).from():Ye(o).format(a)),e.$$.dirty&50&&i(2,n=u?Ye(o).format(a):void 0)},[c,o,n,s,a,u,l]}class ir extends ee{constructor(t){super(),j(this,t,nr,tr,Z,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function rr(e){ie(e,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function sr(e){let t,i=e[4]("Invalid data")+"",n;return{c(){t=D("span"),n=te(i),T(t,"class","invalid svelte-1o3wy2t")},m(r,s){F(r,t,s),S(t,n)},p(r,s){s&16&&i!==(i=r[4]("Invalid data")+"")&&oe(n,i)},i:Q,o:Q,d(r){r&&R(t)}}}function or(e){let t,i;return t=new ir({props:{style:e[2],timestamp:e[0],format:e[1],relative:e[3]}}),{c(){H(t.$$.fragment)},m(n,r){B(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function ar(e){let t,i,n,r,s;const o=[or,sr],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=D("div"),r.c(),T(t,"class","Date svelte-1o3wy2t")},m(l,c){F(l,t,c),a[n].m(t,null),s=!0},p(l,[c]){let d=n;n=u(l,c),n===d?a[n].p(l,c):(he(),L(a[d],1,1,()=>{a[d]=null}),me(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),w(r,1),r.m(t,null))},i(l){s||(w(r),s=!0)},o(l){L(r),s=!1},d(l){l&&R(t),a[n].d()}}}function lr(e,t,i){let n;ne(e,$e,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 pn extends ee{constructor(t){super(),j(this,t,lr,ar,Z,{data:0,format:1,style:2,relative:3},rr)}}function ur(e){ie(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 cr(e){let t,i,n,r;i=new be({props:{iconLaClassName:e[2]}});const s=e[8].default,o=xe(s,e,e[7],null);return{c(){t=D("div"),H(i.$$.fragment),n=P(),o&&o.c(),T(t,"class","IconWrapper svelte-1wdh20c")},m(a,u){F(a,t,u),B(i,t,null),F(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconLaClassName=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&Be(o,s,a,a[7],r?Ie(s,a[7],u,null):Ke(a[7]),null)},i(a){r||(w(i.$$.fragment,a),w(o,a),r=!0)},o(a){L(i.$$.fragment,a),L(o,a),r=!1},d(a){a&&(R(t),R(n)),K(i),o&&o.d(a)}}}function dr(e){let t,i;return t=new dt({props:{style:e[3],text:e[0],iconLaClassName:e[2],className:"Combined"}}),{c(){H(t.$$.fragment)},m(n,r){B(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function fr(e){let t,i,n,r,s,o;const a=[dr,cr],u=[];function l(c,d){return c[0]!==""?0:1}return i=l(e),n=u[i]=a[i](e),s=new ct({props:{style:e[4],text:e[1]}}),{c(){t=D("div"),n.c(),r=P(),H(s.$$.fragment),T(t,"class",Ce(e[5])+" svelte-1wdh20c")},m(c,d){F(c,t,d),u[i].m(t,null),S(t,r),B(s,t,null),o=!0},p(c,[d]){let f=i;i=l(c),i===f?u[i].p(c,d):(he(),L(u[f],1,1,()=>{u[f]=null}),me(),n=u[i],n?n.p(c,d):(n=u[i]=a[i](c),n.c()),w(n,1),n.m(t,r));const g={};d&16&&(g.style=c[4]),d&2&&(g.text=c[1]),s.$set(g)},i(c){o||(w(n),w(s.$$.fragment,c),o=!0)},o(c){L(n),L(s.$$.fragment,c),o=!1},d(c){c&&R(t),u[i].d(),K(s)}}}function gr(e,t,i){let{$$slots:n={},$$scope:r}=t,{iconText:s=""}=t,{tagText:o}=t,{iconLaClassName:a}=t,{className:u}=t,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let d=`CombinedTag ${u}`;return e.$$set=f=>{"iconText"in f&&i(0,s=f.iconText),"tagText"in f&&i(1,o=f.tagText),"iconLaClassName"in f&&i(2,a=f.iconLaClassName),"className"in f&&i(6,u=f.className),"$$scope"in f&&i(7,r=f.$$scope)},[s,o,a,l,c,d,u,r,n]}class _n extends ee{constructor(t){super(),j(this,t,gr,fr,Z,{iconText:0,tagText:1,iconLaClassName:2,className:6},ur)}}function hr(e){let t,i;return t=new pn({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:e[1],relative:!0}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function mr(e){let t,i;return t=new _n({props:{iconLaClassName:e[3],tagText:e[0],className:e[2],$$slots:{default:[hr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){B(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function pr(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 _r extends ee{constructor(t){super(),j(this,t,pr,mr,Z,{tagText:0,due:1})}}function vr(e){ie(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 yr(e){let t,i;return t=new ct({props:{text:e[3]("No SLA"),className:"SLA"}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.text=n[3]("No SLA")),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function br(e){let t,i;return t=new _r({props:{tagText:"First answer",due:e[1].datedue}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function wr(e){let t,i=e[1].code+"",n,r,s,o,a,u,l=e[1].messagegroupsIn+"",c,d,f,g,m,_,y=e[1].messagegroupsOut+"",v,x,O,G,A,k,J,V,z,E,I,W;o=new be({props:{iconLaClassName:"la-incoming"}}),g=new be({props:{iconLaClassName:"la-outgoing"}}),k=new pn({props:{data:e[1].datecreated,format:e[2]}});const de=[br,yr],b=[];function C(p,$){return $&2&&(V=null),V==null&&(V=p[1].datedue instanceof Date&&!isNaN(p[1].datedue)),V?0:1}return z=C(e,-1),E=b[z]=de[z](e),{c(){t=D("span"),n=te(i),r=P(),s=D("div"),H(o.$$.fragment),a=P(),u=D("span"),c=te(l),d=P(),f=D("div"),H(g.$$.fragment),m=P(),_=D("span"),v=te(y),x=P(),O=D("div"),G=D("span"),G.textContent=`${e[4]}:`,A=P(),H(k.$$.fragment),J=P(),E.c(),I=Dn(),T(t,"class","TicketId svelte-rl80em"),T(s,"class","Communication incomingMessages svelte-rl80em"),T(f,"class","Communication outgoingMessages svelte-rl80em"),T(O,"class","Created svelte-rl80em")},m(p,$){F(p,t,$),S(t,n),F(p,r,$),F(p,s,$),B(o,s,null),S(s,a),S(s,u),S(u,c),F(p,d,$),F(p,f,$),B(g,f,null),S(f,m),S(f,_),S(_,v),F(p,x,$),F(p,O,$),S(O,G),S(O,A),B(k,O,null),F(p,J,$),b[z].m(p,$),F(p,I,$),W=!0},p(p,$){(!W||$&2)&&i!==(i=p[1].code+"")&&oe(n,i),(!W||$&2)&&l!==(l=p[1].messagegroupsIn+"")&&oe(c,l),(!W||$&2)&&y!==(y=p[1].messagegroupsOut+"")&&oe(v,y);const N={};$&2&&(N.data=p[1].datecreated),$&4&&(N.format=p[2]),k.$set(N);let U=z;z=C(p,$),z===U?b[z].p(p,$):(he(),L(b[U],1,1,()=>{b[U]=null}),me(),E=b[z],E?E.p(p,$):(E=b[z]=de[z](p),E.c()),w(E,1),E.m(I.parentNode,I))},i(p){W||(w(o.$$.fragment,p),w(g.$$.fragment,p),w(k.$$.fragment,p),w(E),W=!0)},o(p){L(o.$$.fragment,p),L(g.$$.fragment,p),L(k.$$.fragment,p),L(E),W=!1},d(p){p&&(R(t),R(r),R(s),R(d),R(f),R(x),R(O),R(J),R(I)),K(o),K(g),K(k),b[z].d(p)}}}function kr(e){let t,i;return t=new At({props:{className:e[0],$$slots:{default:[wr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){B(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Tr(e,t,i){let n;ne(e,$e,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 Cr extends ee{constructor(t){super(),j(this,t,Tr,kr,Z,{className:0,row:1,format:2},vr)}}function $r(e){ie(e,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function Lr(e){let t,i;return t=new ct({props:{style:"color: #"+e[2]+"; background: #"+e[1],text:e[0],className:"TicketTag"}}),{c(){H(t.$$.fragment)},m(n,r){B(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Sr(e,t,i){let n,r,s,o,{tagId:a}=t,u=Te("tagsMap");return ne(e,u,l=>i(5,o=l)),e.$$set=l=>{"tagId"in l&&i(4,a=l.tagId)},e.$$.update=()=>{var l,c,d;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=((d=o[a])==null?void 0:d.name)??"")},[s,r,n,u,a,o]}class Nr extends ee{constructor(t){super(),j(this,t,Sr,Lr,Z,{tagId:4},$r)}}function Ut(e,t,i){const n=e.slice();return n[1]=t[i],n}function Ht(e){let t,i;return t=new Nr({props:{tagId:e[1]}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Dr(e){let t,i,n=Ee(e[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Ht(Ut(e,n,o));const s=o=>L(r[o],1,1,()=>{r[o]=null});return{c(){t=D("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){F(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=Ut(o,n,u);r[u]?(r[u].p(l,a),w(r[u],1)):(r[u]=Ht(l),r[u].c(),w(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)w(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)L(r[a]);i=!1},d(o){o&&R(t),Ct(r,o)}}}function Ar(e,t,i){let{tags:n}=t;return e.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class Or extends ee{constructor(t){super(),j(this,t,Ar,Dr,Z,{tags:0})}}function Rr(e){ie(e,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function Mr(e){let t,i;return t=new dt({props:{className:e[1][e[0]].text,style:"color: white; background-color: "+ot(e[0]),text:e[1][e[0]].text,iconLaClassName:e[1][e[0]].icon}}),{c(){H(t.$$.fragment)},m(n,r){B(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: "+ot(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Fr(e,t,i){let n;ne(e,$e,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 Gr extends ee{constructor(t){super(),j(this,t,Fr,Mr,Z,{status:0},Rr)}}function zr(e){ie(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 Er(e){let t,i;return t=new dt({props:{className:"Department",text:e[0].departmentname,iconLaClassName:"la-department"}}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),t.$set(s)},i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function xr(e){let t,i;return t=new _n({props:{className:"Department",tagText:e[0].agentname,iconLaClassName:"la-department",iconText:e[0].departmentname}}),{c(){H(t.$$.fragment)},m(n,r){B(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Ir(e){let t,i=e[0].subject+"",n,r,s,o=e[0].preview+"",a,u,l,c,d,f,g,m,_,y,v;c=new Gr({props:{status:e[0].status}});const x=[xr,Er],O=[];function G(A,k){return k&1&&(f=null),f==null&&(f=A[0].agentname.trim()!==""),f?0:1}return g=G(e,-1),m=O[g]=x[g](e),y=new Or({props:{tags:e[0].tags}}),{c(){t=D("h1"),n=te(i),r=P(),s=D("p"),a=te(o),u=P(),l=D("div"),H(c.$$.fragment),d=P(),m.c(),_=P(),H(y.$$.fragment),T(t,"class","subject svelte-nfaksv"),T(s,"class","preview svelte-nfaksv"),T(l,"class","additional svelte-nfaksv")},m(A,k){F(A,t,k),S(t,n),F(A,r,k),F(A,s,k),S(s,a),F(A,u,k),F(A,l,k),B(c,l,null),S(l,d),O[g].m(l,null),S(l,_),B(y,l,null),v=!0},p(A,k){(!v||k&1)&&i!==(i=A[0].subject+"")&&oe(n,i),(!v||k&1)&&o!==(o=A[0].preview+"")&&oe(a,o);const J={};k&1&&(J.status=A[0].status),c.$set(J);let V=g;g=G(A,k),g===V?O[g].p(A,k):(he(),L(O[V],1,1,()=>{O[V]=null}),me(),m=O[g],m?m.p(A,k):(m=O[g]=x[g](A),m.c()),w(m,1),m.m(l,_));const z={};k&1&&(z.tags=A[0].tags),y.$set(z)},i(A){v||(w(c.$$.fragment,A),w(m),w(y.$$.fragment,A),v=!0)},o(A){L(c.$$.fragment,A),L(m),L(y.$$.fragment,A),v=!1},d(A){A&&(R(t),R(r),R(s),R(u),R(l)),K(c),O[g].d(),K(y)}}}function Br(e){let t,i;return t=new At({props:{className:e[1],$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){B(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function Kr(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 Jr extends ee{constructor(t){super(),j(this,t,Kr,Br,Z,{row:0,className:1},zr)}}function Ur(e){ie(e,"svelte-8pmpj5",`.Row.svelte-8pmpj5{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
|
|
8
|
+
*/var Ji=function(e){return e!=null&&(mn(e)||Ui(e)||!!e._isBuffer)};function mn(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Ui(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&mn(e.slice(0,0))}(function(){var e=Ki,t=Ut.utf8,i=Ji,n=Ut.bin,r=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=n.stringToBytes(s):s=t.stringToBytes(s):i(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=e.bytesToWords(s),u=s.length*8,l=1732584193,c=-271733879,f=-1732584194,d=271733878,g=0;g<a.length;g++)a[g]=(a[g]<<8|a[g]>>>24)&16711935|(a[g]<<24|a[g]>>>8)&4278255360;a[u>>>5]|=128<<u%32,a[(u+64>>>9<<4)+14]=u;for(var m=r._ff,_=r._gg,v=r._hh,N=r._ii,g=0;g<a.length;g+=16){var x=l,A=c,F=f,b=d;l=m(l,c,f,d,a[g+0],7,-680876936),d=m(d,l,c,f,a[g+1],12,-389564586),f=m(f,d,l,c,a[g+2],17,606105819),c=m(c,f,d,l,a[g+3],22,-1044525330),l=m(l,c,f,d,a[g+4],7,-176418897),d=m(d,l,c,f,a[g+5],12,1200080426),f=m(f,d,l,c,a[g+6],17,-1473231341),c=m(c,f,d,l,a[g+7],22,-45705983),l=m(l,c,f,d,a[g+8],7,1770035416),d=m(d,l,c,f,a[g+9],12,-1958414417),f=m(f,d,l,c,a[g+10],17,-42063),c=m(c,f,d,l,a[g+11],22,-1990404162),l=m(l,c,f,d,a[g+12],7,1804603682),d=m(d,l,c,f,a[g+13],12,-40341101),f=m(f,d,l,c,a[g+14],17,-1502002290),c=m(c,f,d,l,a[g+15],22,1236535329),l=_(l,c,f,d,a[g+1],5,-165796510),d=_(d,l,c,f,a[g+6],9,-1069501632),f=_(f,d,l,c,a[g+11],14,643717713),c=_(c,f,d,l,a[g+0],20,-373897302),l=_(l,c,f,d,a[g+5],5,-701558691),d=_(d,l,c,f,a[g+10],9,38016083),f=_(f,d,l,c,a[g+15],14,-660478335),c=_(c,f,d,l,a[g+4],20,-405537848),l=_(l,c,f,d,a[g+9],5,568446438),d=_(d,l,c,f,a[g+14],9,-1019803690),f=_(f,d,l,c,a[g+3],14,-187363961),c=_(c,f,d,l,a[g+8],20,1163531501),l=_(l,c,f,d,a[g+13],5,-1444681467),d=_(d,l,c,f,a[g+2],9,-51403784),f=_(f,d,l,c,a[g+7],14,1735328473),c=_(c,f,d,l,a[g+12],20,-1926607734),l=v(l,c,f,d,a[g+5],4,-378558),d=v(d,l,c,f,a[g+8],11,-2022574463),f=v(f,d,l,c,a[g+11],16,1839030562),c=v(c,f,d,l,a[g+14],23,-35309556),l=v(l,c,f,d,a[g+1],4,-1530992060),d=v(d,l,c,f,a[g+4],11,1272893353),f=v(f,d,l,c,a[g+7],16,-155497632),c=v(c,f,d,l,a[g+10],23,-1094730640),l=v(l,c,f,d,a[g+13],4,681279174),d=v(d,l,c,f,a[g+0],11,-358537222),f=v(f,d,l,c,a[g+3],16,-722521979),c=v(c,f,d,l,a[g+6],23,76029189),l=v(l,c,f,d,a[g+9],4,-640364487),d=v(d,l,c,f,a[g+12],11,-421815835),f=v(f,d,l,c,a[g+15],16,530742520),c=v(c,f,d,l,a[g+2],23,-995338651),l=N(l,c,f,d,a[g+0],6,-198630844),d=N(d,l,c,f,a[g+7],10,1126891415),f=N(f,d,l,c,a[g+14],15,-1416354905),c=N(c,f,d,l,a[g+5],21,-57434055),l=N(l,c,f,d,a[g+12],6,1700485571),d=N(d,l,c,f,a[g+3],10,-1894986606),f=N(f,d,l,c,a[g+10],15,-1051523),c=N(c,f,d,l,a[g+1],21,-2054922799),l=N(l,c,f,d,a[g+8],6,1873313359),d=N(d,l,c,f,a[g+15],10,-30611744),f=N(f,d,l,c,a[g+6],15,-1560198380),c=N(c,f,d,l,a[g+13],21,1309151649),l=N(l,c,f,d,a[g+4],6,-145523070),d=N(d,l,c,f,a[g+11],10,-1120210379),f=N(f,d,l,c,a[g+2],15,718787259),c=N(c,f,d,l,a[g+9],21,-343485551),l=l+x>>>0,c=c+A>>>0,f=f+F>>>0,d=d+b>>>0}return e.endian([l,c,f,d])};r._ff=function(s,o,a,u,l,c,f){var d=s+(o&a|~o&u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._gg=function(s,o,a,u,l,c,f){var d=s+(o&u|a&~u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._hh=function(s,o,a,u,l,c,f){var d=s+(o^a^u)+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._ii=function(s,o,a,u,l,c,f){var d=s+(a^(o|~u))+(l>>>0)+f;return(d<<c|d>>>32-c)+o},r._blocksize=16,r._digestsize=16,gn.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(r(s,o));return o&&o.asBytes?a:o&&o.asString?n.bytesToString(a):e.bytesToHex(a)}})();var Wi=gn.exports;const Hi=At(Wi);function Yi(e){return[...e].reduce((t,i)=>Math.imul(31,t)+i.charCodeAt(0)|0,0)}function Pi(e){re(e,"svelte-1p23x6g",".Column.svelte-1p23x6g{height:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}function Vi(e){let t,i,n;const r=e[2].default,s=Ie(r,e,e[1],null);return{c(){t=S("div"),s&&s.c(),y(t,"class",i="Column "+e[0]+" svelte-1p23x6g")},m(o,a){R(o,t,a),s&&s.m(t,null),n=!0},p(o,[a]){s&&s.p&&(!n||a&2)&&Be(s,r,o,o[1],n?xe(r,o[1],a,null):Ke(o[1]),null),(!n||a&1&&i!==(i="Column "+o[0]+" svelte-1p23x6g"))&&y(t,"class",i)},i(o){n||(k(s,o),n=!0)},o(o){$(s,o),n=!1},d(o){o&&O(t),s&&s.d(o)}}}function Qi(e,t,i){let{$$slots:n={},$$scope:r}=t,{className:s=""}=t;return e.$$set=o=>{"className"in o&&i(0,s=o.className),"$$scope"in o&&i(1,r=o.$$scope)},[s,r,n]}class Ft extends ne{constructor(t){super(),te(this,t,Qi,Vi,Z,{className:0},Pi)}}function Zi(e){re(e,"svelte-1d2a8s6",'.Tag.svelte-1d2a8s6{display:inline-block;color:var(--main-textcolor);text-align:center;font-size:12px;font-weight:bold;line-height:20px;padding:2px 6px;margin-right:6px;margin-top:2px;border-radius:69px}.Tag.svelte-1d2a8s6:before{font-family:"la-icon-font"}.SLA.svelte-1d2a8s6{border:1px solid #CFD6DD;border-radius:4px}')}function Xi(e){let t,i,n,r,s,o;const a=e[4].default,u=Ie(a,e,e[3],null);return{c(){t=S("div"),u&&u.c(),i=P(),n=S("span"),r=ee(e[0]),y(n,"class","text"),y(t,"class",s="Tag "+e[1]+" svelte-1d2a8s6"),y(t,"style",e[2])},m(l,c){R(l,t,c),u&&u.m(t,null),C(t,i),C(t,n),C(n,r),o=!0},p(l,[c]){u&&u.p&&(!o||c&8)&&Be(u,a,l,l[3],o?xe(a,l[3],c,null):Ke(l[3]),null),(!o||c&1)&&ie(r,l[0]),(!o||c&2&&s!==(s="Tag "+l[1]+" svelte-1d2a8s6"))&&y(t,"class",s),(!o||c&4)&&y(t,"style",l[2])},i(l){o||(k(u,l),o=!0)},o(l){$(u,l),o=!1},d(l){l&&O(t),u&&u.d(l)}}}function qi(e,t,i){let{$$slots:n={},$$scope:r}=t,{text:s}=t,{className:o=""}=t,{style:a=""}=t;return e.$$set=u=>{"text"in u&&i(0,s=u.text),"className"in u&&i(1,o=u.className),"style"in u&&i(2,a=u.style),"$$scope"in u&&i(3,r=u.$$scope)},[s,o,a,r,n]}class gt extends ne{constructor(t){super(),te(this,t,qi,Xi,Z,{text:0,className:1,style:2},Zi)}}function ji(e){re(e,"svelte-xnu6kx","div.Tag.IconTag{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:4px}div.Tag.IconTag.Department{background-color:var(--department-bg-color);color:white}")}function er(e){let t,i;return t=new ye({props:{iconLaClassName:e[2]}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&4&&(s.iconLaClassName=n[2]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function tr(e){let t,i;return t=new gt({props:{text:e[0],className:e[3],style:e[1],$$slots:{default:[er]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.text=n[0]),r&2&&(s.style=n[1]),r&36&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function nr(e,t,i){let{text:n}=t,{className:r=""}=t,{style:s=""}=t,{iconLaClassName:o}=t,a=`IconTag ${r}`;return e.$$set=u=>{"text"in u&&i(0,n=u.text),"className"in u&&i(4,r=u.className),"style"in u&&i(1,s=u.style),"iconLaClassName"in u&&i(2,o=u.iconLaClassName)},[n,s,o,a,r]}class ht extends ne{constructor(t){super(),te(this,t,nr,tr,Z,{text:0,className:4,style:1,iconLaClassName:2},ji)}}function ir(e){re(e,"svelte-d2fkh2",".Column.userColumn{display:flex}.Tag.CompanyTag{background-color:var(--department-bg-color);color:var(--main-textcolor)}div.Tag.NoCompanyTag{color:var(--main-lighter-textcolor);border:1px solid var(--main-lighter-textcolor)}.avatar.svelte-d2fkh2{display:none}.companyTag.svelte-d2fkh2{display:none}.name.svelte-d2fkh2{font-size:13px;line-height:20px;font-weight:bold;padding-right:6px;border-right:1px solid var(--main-textcolor)}.email.svelte-d2fkh2{font-size:13px;line-height:20px;padding-left:6px}.texts.svelte-d2fkh2{display:flex;flex-direction:row;justify-content:flex-start}@media(min-width: 900px){.avatar.svelte-d2fkh2{display:flex;align-items:center;justify-content:center;margin:0 10px}.name.svelte-d2fkh2{padding:0;border:none}.email.svelte-d2fkh2{padding:0}.companyTag.svelte-d2fkh2{display:flex}.texts.svelte-d2fkh2{display:flex;flex-direction:column;justify-content:center}}")}function Wt(e){let t,i;return t=new Bi({props:{bgColor:e[4](e[0]),name:je(e[0]),src:e[3](e[0])}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.bgColor=n[4](n[0])),r&1&&(s.name=je(n[0])),r&1&&(s.src=n[3](n[0])),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function rr(e){let t,i=[e[4](e[0]),je(e[0]),e[3](e[0])],n,r,s,o,a,u=e[0].emails+"",l,c,f,d,g,m=Wt(e);return d=new ht({props:{text:e[0].company==="Y"?"Company":e[2]("No Company"),className:(e[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag",iconLaClassName:"la-companies"}}),{c(){t=S("div"),m.c(),n=P(),r=S("div"),s=S("div"),s.textContent=`${name}`,o=P(),a=S("div"),l=ee(u),c=P(),f=S("div"),H(d.$$.fragment),y(t,"class","avatar svelte-d2fkh2"),y(s,"class","name svelte-d2fkh2"),y(a,"class","email svelte-d2fkh2"),y(f,"class","companyTag svelte-d2fkh2"),y(r,"class","texts svelte-d2fkh2")},m(_,v){R(_,t,v),m.m(t,null),R(_,n,v),R(_,r,v),C(r,s),C(r,o),C(r,a),C(a,l),C(r,c),C(r,f),K(d,f,null),g=!0},p(_,v){v&1&&Z(i,i=[_[4](_[0]),je(_[0]),_[3](_[0])])?(ge(),$(m,1,1,V),he(),m=Wt(_),m.c(),k(m,1),m.m(t,null)):m.p(_,v),(!g||v&1)&&u!==(u=_[0].emails+"")&&ie(l,u);const N={};v&5&&(N.text=_[0].company==="Y"?"Company":_[2]("No Company")),v&1&&(N.className=(_[0].company==="Y"?"Company":"No Company")=="Company"?"CompanyTag":"NoCompanyTag"),d.$set(N)},i(_){g||(k(m),k(d.$$.fragment,_),g=!0)},o(_){$(m),$(d.$$.fragment,_),g=!1},d(_){_&&(O(t),O(n),O(r)),m.d(_),J(d)}}}function sr(e){let t,i;return t=new Ft({props:{className:e[1],$$slots:{default:[rr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&37&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function je(e){if(!e)return"";let t=e.firstname+" "+e.lastname;return t.trim()||(t=e.systemName),t}function or(e,t,i){let n;j(e,ke,u=>i(2,n=u));let{row:r}=t,{className:s="userColumn"}=t;function o(u){let l=u.avatarUrl;return l||(l="https://www.gravatar.com/avatar/"+Hi(u.emails[0]??"")+"?s=200&d=404"),l}function a(u){let l;u?l=Yi(je(u)+u.emails):l=Math.floor(Math.random()*16777215);let c=(l&16711680)>>16,f=(l&65280)>>8,d=l&255;return c+f+d<150&&(c=150),c+f+d>400&&(c=0),`rgb(${c},${f},${d})`}return e.$$set=u=>{"row"in u&&i(0,r=u.row),"className"in u&&i(1,s=u.className)},[r,s,n,o,a]}class ar extends ne{constructor(t){super(),te(this,t,or,sr,Z,{row:0,className:1},ir)}}var pn={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(dn,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",c="week",f="month",d="quarter",g="year",m="date",_="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,N=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var D=["th","st","nd","rd"],p=E%100;return"["+E+(D[(p-20)%10]||D[p]||D[0])+"]"}},A=function(E,D,p){var w=String(E);return!w||w.length>=D?E:""+Array(D+1-w.length).join(p)+E},F={s:A,z:function(E){var D=-E.utcOffset(),p=Math.abs(D),w=Math.floor(p/60),L=p%60;return(D<=0?"+":"-")+A(w,2,"0")+":"+A(L,2,"0")},m:function E(D,p){if(D.date()<p.date())return-E(p,D);var w=12*(p.year()-D.year())+(p.month()-D.month()),L=D.clone().add(w,f),W=p-L<0,Y=D.clone().add(w+(W?-1:1),f);return+(-(w+(p-L)/(W?L-Y:Y-L))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:f,y:g,w:c,d:l,D:m,h:u,m:a,s:o,ms:s,Q:d}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},b="en",z={};z[b]=x;var U="$isDayjsObject",M=function(E){return E instanceof Q||!(!E||!E[U])},B=function E(D,p,w){var L;if(!D)return b;if(typeof D=="string"){var W=D.toLowerCase();z[W]&&(L=W),p&&(z[W]=p,L=W);var Y=D.split("-");if(!L&&Y.length>1)return E(Y[0])}else{var q=D.name;z[q]=D,L=q}return!w&&L&&(b=L),L||!w&&b},I=function(E,D){if(M(E))return E.clone();var p=typeof D=="object"?D:{};return p.date=E,p.args=arguments,new Q(p)},T=F;T.l=B,T.i=M,T.w=function(E,D){return I(E,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var Q=function(){function E(p){this.$L=B(p.locale,null,!0),this.parse(p),this.$x=this.$x||p.x||{},this[U]=!0}var D=E.prototype;return D.parse=function(p){this.$d=function(w){var L=w.date,W=w.utc;if(L===null)return new Date(NaN);if(T.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var Y=L.match(v);if(Y){var q=Y[2]-1||0,se=(Y[7]||"0").substring(0,3);return W?new Date(Date.UTC(Y[1],q,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,se)):new Date(Y[1],q,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,se)}}return new Date(L)}(p),this.init()},D.init=function(){var p=this.$d;this.$y=p.getFullYear(),this.$M=p.getMonth(),this.$D=p.getDate(),this.$W=p.getDay(),this.$H=p.getHours(),this.$m=p.getMinutes(),this.$s=p.getSeconds(),this.$ms=p.getMilliseconds()},D.$utils=function(){return T},D.isValid=function(){return this.$d.toString()!==_},D.isSame=function(p,w){var L=I(p);return this.startOf(w)<=L&&L<=this.endOf(w)},D.isAfter=function(p,w){return I(p)<this.startOf(w)},D.isBefore=function(p,w){return this.endOf(w)<I(p)},D.$g=function(p,w,L){return T.u(p)?this[w]:this.set(L,p)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(p,w){var L=this,W=!!T.u(w)||w,Y=T.p(p),q=function(Le,ue){var we=T.w(L.$u?Date.UTC(L.$y,ue,Le):new Date(L.$y,ue,Le),L);return W?we:we.endOf(l)},se=function(Le,ue){return T.w(L.toDate()[Le].apply(L.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(ue)),L)},oe=this.$W,ae=this.$M,fe=this.$D,Re="set"+(this.$u?"UTC":"");switch(Y){case g:return W?q(1,0):q(31,11);case f:return W?q(1,ae):q(0,ae+1);case c:var Ce=this.$locale().weekStart||0,Ue=(oe<Ce?oe+7:oe)-Ce;return q(W?fe-Ue:fe+(6-Ue),ae);case l:case m:return se(Re+"Hours",0);case u:return se(Re+"Minutes",1);case a:return se(Re+"Seconds",2);case o:return se(Re+"Milliseconds",3);default:return this.clone()}},D.endOf=function(p){return this.startOf(p,!1)},D.$set=function(p,w){var L,W=T.p(p),Y="set"+(this.$u?"UTC":""),q=(L={},L[l]=Y+"Date",L[m]=Y+"Date",L[f]=Y+"Month",L[g]=Y+"FullYear",L[u]=Y+"Hours",L[a]=Y+"Minutes",L[o]=Y+"Seconds",L[s]=Y+"Milliseconds",L)[W],se=W===l?this.$D+(w-this.$W):w;if(W===f||W===g){var oe=this.clone().set(m,1);oe.$d[q](se),oe.init(),this.$d=oe.set(m,Math.min(this.$D,oe.daysInMonth())).$d}else q&&this.$d[q](se);return this.init(),this},D.set=function(p,w){return this.clone().$set(p,w)},D.get=function(p){return this[T.p(p)]()},D.add=function(p,w){var L,W=this;p=Number(p);var Y=T.p(w),q=function(ae){var fe=I(W);return T.w(fe.date(fe.date()+Math.round(ae*p)),W)};if(Y===f)return this.set(f,this.$M+p);if(Y===g)return this.set(g,this.$y+p);if(Y===l)return q(1);if(Y===c)return q(7);var se=(L={},L[a]=n,L[u]=r,L[o]=i,L)[Y]||1,oe=this.$d.getTime()+p*se;return T.w(oe,this)},D.subtract=function(p,w){return this.add(-1*p,w)},D.format=function(p){var w=this,L=this.$locale();if(!this.isValid())return L.invalidDate||_;var W=p||"YYYY-MM-DDTHH:mm:ssZ",Y=T.z(this),q=this.$H,se=this.$m,oe=this.$M,ae=L.weekdays,fe=L.months,Re=L.meridiem,Ce=function(ue,we,We,it){return ue&&(ue[we]||ue(w,W))||We[we].slice(0,it)},Ue=function(ue){return T.s(q%12||12,ue,"0")},Le=Re||function(ue,we,We){var it=ue<12?"AM":"PM";return We?it.toLowerCase():it};return W.replace(N,function(ue,we){return we||function(We){switch(We){case"YY":return String(w.$y).slice(-2);case"YYYY":return T.s(w.$y,4,"0");case"M":return oe+1;case"MM":return T.s(oe+1,2,"0");case"MMM":return Ce(L.monthsShort,oe,fe,3);case"MMMM":return Ce(fe,oe);case"D":return w.$D;case"DD":return T.s(w.$D,2,"0");case"d":return String(w.$W);case"dd":return Ce(L.weekdaysMin,w.$W,ae,2);case"ddd":return Ce(L.weekdaysShort,w.$W,ae,3);case"dddd":return ae[w.$W];case"H":return String(q);case"HH":return T.s(q,2,"0");case"h":return Ue(1);case"hh":return Ue(2);case"a":return Le(q,se,!0);case"A":return Le(q,se,!1);case"m":return String(se);case"mm":return T.s(se,2,"0");case"s":return String(w.$s);case"ss":return T.s(w.$s,2,"0");case"SSS":return T.s(w.$ms,3,"0");case"Z":return Y}return null}(ue)||Y.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(p,w,L){var W,Y=this,q=T.p(w),se=I(p),oe=(se.utcOffset()-this.utcOffset())*n,ae=this-se,fe=function(){return T.m(Y,se)};switch(q){case g:W=fe()/12;break;case f:W=fe();break;case d:W=fe()/3;break;case c:W=(ae-oe)/6048e5;break;case l:W=(ae-oe)/864e5;break;case u:W=ae/r;break;case a:W=ae/n;break;case o:W=ae/i;break;default:W=ae}return L?W:T.a(W)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return z[this.$L]},D.locale=function(p,w){if(!p)return this.$L;var L=this.clone(),W=B(p,w,!0);return W&&(L.$L=W),L},D.clone=function(){return T.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},E}(),me=Q.prototype;return I.prototype=me,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",f],["$y",g],["$D",m]].forEach(function(E){me[E[1]]=function(D){return this.$g(D,E[0],E[1])}}),I.extend=function(E,D){return E.$i||(E(D,Q,I),E.$i=!0),I},I.locale=B,I.isDayjs=M,I.unix=function(E){return I(1e3*E)},I.en=z[b],I.Ls=z,I.p={},I})})(pn);var lr=pn.exports;const Pe=At(lr);var _n={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(dn,function(){return function(i,n,r){i=i||{};var s=n.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,c,f,d){return s.fromToBase(l,c,f,d)}r.en.relativeTime=o,s.fromToBase=function(l,c,f,d,g){for(var m,_,v,N=f.$locale().relativeTime||o,x=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],A=x.length,F=0;F<A;F+=1){var b=x[F];b.d&&(m=d?r(l).diff(f,b.d,!0):f.diff(l,b.d,!0));var z=(i.rounding||Math.round)(Math.abs(m));if(v=m>0,z<=b.r||!b.r){z<=1&&F>0&&(b=x[F-1]);var U=N[b.l];g&&(z=g(""+z)),_=typeof U=="string"?U.replace("%d",z):U(z,c,b.l,v);break}}if(c)return _;var M=v?N.future:N.past;return typeof M=="function"?M(_):M.replace("%s",_)},s.to=function(l,c){return a(l,c,this,!0)},s.from=function(l,c){return a(l,c,this)};var u=function(l){return l.$u?r.utc():r()};s.toNow=function(l){return this.to(u(this),l)},s.fromNow=function(l){return this.from(u(this),l)}}})})(_n);var ur=_n.exports;const cr=At(ur);Pe.extend(cr);function fr(e){let t,i,n=[e[3],{title:e[2]},{datetime:e[1]}],r={};for(let s=0;s<n.length;s+=1)r=at(r,n[s]);return{c(){t=S("time"),i=ee(e[0]),Et(t,r)},m(s,o){R(s,t,o),C(t,i)},p(s,[o]){o&1&&Mn(i,s[0],r.contenteditable),Et(t,r=Jn(n,[o&8&&s[3],o&4&&{title:s[2]},o&2&&{datetime:s[1]}]))},i:V,o:V,d(s){s&&O(t)}}}function dr(e,t,i){let n;const r=["timestamp","format","relative","live","formatted"];let s=zt(t,r),{timestamp:o=new Date().toISOString()}=t,{format:a="MMM DD, YYYY"}=t,{relative:u=!1}=t,{live:l=!1}=t,{formatted:c=""}=t,f;const d=60*1e3;return an(()=>()=>clearInterval(f)),e.$$set=g=>{t=at(at({},t),Sn(g)),i(3,s=zt(t,r)),"timestamp"in g&&i(1,o=g.timestamp),"format"in g&&i(4,a=g.format),"relative"in g&&i(5,u=g.relative),"live"in g&&i(6,l=g.live),"formatted"in g&&i(0,c=g.formatted)},e.$$.update=()=>{e.$$.dirty&98&&u&&l!==!1&&(f=setInterval(()=>{i(0,c=Pe(o).from())},Math.abs(typeof l=="number"?l:d))),e.$$.dirty&50&&i(0,c=u?Pe(o).from():Pe(o).format(a)),e.$$.dirty&50&&i(2,n=u?Pe(o).format(a):void 0)},[c,o,n,s,a,u,l]}class gr extends ne{constructor(t){super(),te(this,t,dr,fr,Z,{timestamp:1,format:4,relative:5,live:6,formatted:0})}}function hr(e){re(e,"svelte-1o3wy2t",".invalid.svelte-1o3wy2t{color:var(--panel_text_color)}div.svelte-1o3wy2t{display:inline-block}")}function mr(e){let t,i=e[4]("Invalid data")+"",n;return{c(){t=S("span"),n=ee(i),y(t,"class","invalid svelte-1o3wy2t")},m(r,s){R(r,t,s),C(t,n)},p(r,s){s&16&&i!==(i=r[4]("Invalid data")+"")&&ie(n,i)},i:V,o:V,d(r){r&&O(t)}}}function pr(e){let t,i;return t=new gr({props:{style:e[2],timestamp:e[0],format:e[1],relative:e[3]}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&4&&(s.style=n[2]),r&1&&(s.timestamp=n[0]),r&2&&(s.format=n[1]),r&8&&(s.relative=n[3]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function _r(e){let t,i,n,r,s;const o=[pr,mr],a=[];function u(l,c){return c&1&&(i=null),i==null&&(i=l[0]instanceof Date&&!isNaN(l[0].getTime())),i?0:1}return n=u(e,-1),r=a[n]=o[n](e),{c(){t=S("div"),r.c(),y(t,"class","Date svelte-1o3wy2t")},m(l,c){R(l,t,c),a[n].m(t,null),s=!0},p(l,[c]){let f=n;n=u(l,c),n===f?a[n].p(l,c):(ge(),$(a[f],1,1,()=>{a[f]=null}),he(),r=a[n],r?r.p(l,c):(r=a[n]=o[n](l),r.c()),k(r,1),r.m(t,null))},i(l){s||(k(r),s=!0)},o(l){$(r),s=!1},d(l){l&&O(t),a[n].d()}}}function vr(e,t,i){let n;j(e,ke,u=>i(4,n=u));let{data:r}=t,{format:s=""}=t,{style:o=""}=t,{relative:a=!1}=t;return e.$$set=u=>{"data"in u&&i(0,r=u.data),"format"in u&&i(1,s=u.format),"style"in u&&i(2,o=u.style),"relative"in u&&i(3,a=u.relative)},[r,s,o,a,n]}class vn extends ne{constructor(t){super(),te(this,t,vr,_r,Z,{data:0,format:1,style:2,relative:3},hr)}}function yr(e){re(e,"svelte-1wdh20c",".IconWrapper.svelte-1wdh20c{display:flex;justify-content:center;align-items:center;margin:4px 6px}.CombinedTag.svelte-1wdh20c{display:inline-flex;flex-direction:row;border-radius:4px;margin-top:2px;margin-right:6px;padding-right:0}.Department.svelte-1wdh20c{display:flex;background-color:var(--department-bg-color)}.Pending.svelte-1wdh20c{background-color:var(--ok-color)}.Overdue.svelte-1wdh20c{background-color:var(--notif-error-color)}")}function br(e){let t,i,n,r;i=new ye({props:{iconLaClassName:e[2]}});const s=e[8].default,o=Ie(s,e,e[7],null);return{c(){t=S("div"),H(i.$$.fragment),n=P(),o&&o.c(),y(t,"class","IconWrapper svelte-1wdh20c")},m(a,u){R(a,t,u),K(i,t,null),R(a,n,u),o&&o.m(a,u),r=!0},p(a,u){const l={};u&4&&(l.iconLaClassName=a[2]),i.$set(l),o&&o.p&&(!r||u&128)&&Be(o,s,a,a[7],r?xe(s,a[7],u,null):Ke(a[7]),null)},i(a){r||(k(i.$$.fragment,a),k(o,a),r=!0)},o(a){$(i.$$.fragment,a),$(o,a),r=!1},d(a){a&&(O(t),O(n)),J(i),o&&o.d(a)}}}function kr(e){let t,i;return t=new ht({props:{style:e[3],text:e[0],iconLaClassName:e[2],className:"Combined"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.style=n[3]),r&1&&(s.text=n[0]),r&4&&(s.iconLaClassName=n[2]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function wr(e){let t,i,n,r,s,o;const a=[kr,br],u=[];function l(c,f){return c[0]!==""?0:1}return i=l(e),n=u[i]=a[i](e),s=new gt({props:{style:e[4],text:e[1]}}),{c(){t=S("div"),n.c(),r=P(),H(s.$$.fragment),y(t,"class",Te(e[5])+" svelte-1wdh20c")},m(c,f){R(c,t,f),u[i].m(t,null),C(t,r),K(s,t,null),o=!0},p(c,[f]){let d=i;i=l(c),i===d?u[i].p(c,f):(ge(),$(u[d],1,1,()=>{u[d]=null}),he(),n=u[i],n?n.p(c,f):(n=u[i]=a[i](c),n.c()),k(n,1),n.m(t,r));const g={};f&16&&(g.style=c[4]),f&2&&(g.text=c[1]),s.$set(g)},i(c){o||(k(n),k(s.$$.fragment,c),o=!0)},o(c){$(n),$(s.$$.fragment,c),o=!1},d(c){c&&O(t),u[i].d(),J(s)}}}function $r(e,t,i){let{$$slots:n={},$$scope:r}=t,{iconText:s=""}=t,{tagText:o}=t,{iconLaClassName:a}=t,{className:u}=t,l="",c="";u==="Department"?(l="color: white; background-color: var(--department-bg-color); margin-top: 0;",c="color: white; background-color: black; border-radius: 4px; margin: 0"):u.includes("SLATag")&&(l="color: white",u.includes("Pending")?c="color: var(--ok-color); background-color: #D9FAE0; border-radius: 4px; border: 1px solid var(--ok-color); margin: 0":c="color: var(--notif-error-color); background-color: #FEEAE8; border-radius: 4px; border: 1px solid var(--notif-error-color); margin: 0");let f=`CombinedTag ${u}`;return e.$$set=d=>{"iconText"in d&&i(0,s=d.iconText),"tagText"in d&&i(1,o=d.tagText),"iconLaClassName"in d&&i(2,a=d.iconLaClassName),"className"in d&&i(6,u=d.className),"$$scope"in d&&i(7,r=d.$$scope)},[s,o,a,l,c,f,u,r,n]}class yn extends ne{constructor(t){super(),te(this,t,$r,wr,Z,{iconText:0,tagText:1,iconLaClassName:2,className:6},yr)}}function Tr(e){let t,i;return t=new vn({props:{style:"color: white; font-size: 12px; font-weight: bold; margin-right: 5px",data:e[1],relative:!0}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.data=n[1]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Cr(e){let t,i;return t=new yn({props:{iconLaClassName:e[3],tagText:e[0],className:e[2],$$slots:{default:[Tr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,[r]){const s={};r&8&&(s.iconLaClassName=n[3]),r&1&&(s.tagText=n[0]),r&4&&(s.className=n[2]),r&34&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Lr(e,t,i){let n,{tagText:r}=t,{due:s}=t,o;const a=u=>u>new Date?(i(2,o="SLATag Pending"),"la-sla"):(i(2,o="SLATag Overdue"),"la-sla-compliance");return e.$$set=u=>{"tagText"in u&&i(0,r=u.tagText),"due"in u&&i(1,s=u.due)},e.$$.update=()=>{e.$$.dirty&2&&i(3,n=a(s))},[r,s,o,n]}class Sr extends ne{constructor(t){super(),te(this,t,Lr,Cr,Z,{tagText:0,due:1})}}function Nr(e){re(e,"svelte-rl80em",".TicketId.svelte-rl80em{font-weight:bold;font-size:13px;line-height:20px;margin-right:14px}.Created.svelte-rl80em{font-size:13px;line-height:20px}.Communication.svelte-rl80em{font-size:13px;line-height:20px;display:inline-flex;align-items:center;justify-content:center;margin-right:6px}")}function Dr(e){let t,i;return t=new gt({props:{text:e[3]("No SLA"),className:"SLA"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.text=n[3]("No SLA")),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Or(e){let t,i;return t=new Sr({props:{tagText:"First answer",due:e[1].datedue}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&2&&(s.due=n[1].datedue),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Rr(e){let t,i=e[1].code+"",n,r,s,o,a,u,l=e[1].messagegroupsIn+"",c,f,d,g,m,_,v=e[1].messagegroupsOut+"",N,x,A,F,b,z,U,M,B,I,T,Q;o=new ye({props:{iconLaClassName:"la-incoming"}}),g=new ye({props:{iconLaClassName:"la-outgoing"}}),z=new vn({props:{data:e[1].datecreated,format:e[2]}});const me=[Or,Dr],E=[];function D(p,w){return w&2&&(M=null),M==null&&(M=p[1].datedue instanceof Date&&!isNaN(p[1].datedue)),M?0:1}return B=D(e,-1),I=E[B]=me[B](e),{c(){t=S("span"),n=ee(i),r=P(),s=S("div"),H(o.$$.fragment),a=P(),u=S("span"),c=ee(l),f=P(),d=S("div"),H(g.$$.fragment),m=P(),_=S("span"),N=ee(v),x=P(),A=S("div"),F=S("span"),F.textContent=`${e[4]}:`,b=P(),H(z.$$.fragment),U=P(),I.c(),T=et(),y(t,"class","TicketId svelte-rl80em"),y(s,"class","Communication incomingMessages svelte-rl80em"),y(d,"class","Communication outgoingMessages svelte-rl80em"),y(A,"class","Created svelte-rl80em")},m(p,w){R(p,t,w),C(t,n),R(p,r,w),R(p,s,w),K(o,s,null),C(s,a),C(s,u),C(u,c),R(p,f,w),R(p,d,w),K(g,d,null),C(d,m),C(d,_),C(_,N),R(p,x,w),R(p,A,w),C(A,F),C(A,b),K(z,A,null),R(p,U,w),E[B].m(p,w),R(p,T,w),Q=!0},p(p,w){(!Q||w&2)&&i!==(i=p[1].code+"")&&ie(n,i),(!Q||w&2)&&l!==(l=p[1].messagegroupsIn+"")&&ie(c,l),(!Q||w&2)&&v!==(v=p[1].messagegroupsOut+"")&&ie(N,v);const L={};w&2&&(L.data=p[1].datecreated),w&4&&(L.format=p[2]),z.$set(L);let W=B;B=D(p,w),B===W?E[B].p(p,w):(ge(),$(E[W],1,1,()=>{E[W]=null}),he(),I=E[B],I?I.p(p,w):(I=E[B]=me[B](p),I.c()),k(I,1),I.m(T.parentNode,T))},i(p){Q||(k(o.$$.fragment,p),k(g.$$.fragment,p),k(z.$$.fragment,p),k(I),Q=!0)},o(p){$(o.$$.fragment,p),$(g.$$.fragment,p),$(z.$$.fragment,p),$(I),Q=!1},d(p){p&&(O(t),O(r),O(s),O(f),O(d),O(x),O(A),O(U),O(T)),J(o),J(g),J(z),E[B].d(p)}}}function Ar(e){let t,i;return t=new Ft({props:{className:e[0],$$slots:{default:[Rr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[0]),r&46&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Fr(e,t,i){let n;j(e,ke,u=>i(3,n=u));let{className:r="importanceColumn"}=t,{row:s}=t,{format:o="YYYY-MM-DD HH:mm:ss"}=t;const a=n("Created");return e.$$set=u=>{"className"in u&&i(0,r=u.className),"row"in u&&i(1,s=u.row),"format"in u&&i(2,o=u.format)},[r,s,o,n,a]}class Mr extends ne{constructor(t){super(),te(this,t,Fr,Ar,Z,{className:0,row:1,format:2},Nr)}}function Gr(e){re(e,"svelte-vqrmm9",".Tag.TicketTag{font-size:12px;font-weight:bold;padding:2px 10px}")}function zr(e){let t,i;return t=new gt({props:{style:"color: #"+e[2]+"; background: #"+e[1],text:e[0],className:"TicketTag"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,[r]){const s={};r&6&&(s.style="color: #"+n[2]+"; background: #"+n[1]),r&1&&(s.text=n[0]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Er(e,t,i){let n,r,s,o,{tagId:a}=t,u=ve("tagsMap");return j(e,u,l=>i(5,o=l)),e.$$set=l=>{"tagId"in l&&i(4,a=l.tagId)},e.$$.update=()=>{var l,c,f;e.$$.dirty&48&&i(2,n=((l=o[a])==null?void 0:l.color)??0),e.$$.dirty&48&&i(1,r=((c=o[a])==null?void 0:c.backgroundcolor)??0),e.$$.dirty&48&&i(0,s=((f=o[a])==null?void 0:f.name)??"")},[s,r,n,u,a,o]}class Ir extends ne{constructor(t){super(),te(this,t,Er,zr,Z,{tagId:4},Gr)}}function Ht(e,t,i){const n=e.slice();return n[1]=t[i],n}function Yt(e){let t,i;return t=new Ir({props:{tagId:e[1]}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagId=n[1]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function xr(e){let t,i,n=Ee(e[0]),r=[];for(let o=0;o<n.length;o+=1)r[o]=Yt(Ht(e,n,o));const s=o=>$(r[o],1,1,()=>{r[o]=null});return{c(){t=S("span");for(let o=0;o<r.length;o+=1)r[o].c()},m(o,a){R(o,t,a);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(t,null);i=!0},p(o,[a]){if(a&1){n=Ee(o[0]);let u;for(u=0;u<n.length;u+=1){const l=Ht(o,n,u);r[u]?(r[u].p(l,a),k(r[u],1)):(r[u]=Yt(l),r[u].c(),k(r[u],1),r[u].m(t,null))}for(ge(),u=n.length;u<r.length;u+=1)s(u);he()}},i(o){if(!i){for(let a=0;a<n.length;a+=1)k(r[a]);i=!0}},o(o){r=r.filter(Boolean);for(let a=0;a<r.length;a+=1)$(r[a]);i=!1},d(o){o&&O(t),St(r,o)}}}function Br(e,t,i){let{tags:n}=t;return e.$$set=r=>{"tags"in r&&i(0,n=r.tags)},[n]}class Kr extends ne{constructor(t){super(),te(this,t,Br,xr,Z,{tags:0})}}function Jr(e){re(e,"svelte-q9af99",".Tag.IconTag.StatusTag .text{display:none}@media(min-width: 768px){.Tag.IconTag.StatusTag .text{display:inline}}")}function Ur(e){let t,i;return t=new ht({props:{className:e[1][e[0]].text,style:"color: white; background-color: "+ut(e[0]),text:e[1][e[0]].text,iconLaClassName:e[1][e[0]].icon}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,[r]){const s={};r&1&&(s.className=n[1][n[0]].text),r&1&&(s.style="color: white; background-color: "+ut(n[0])),r&1&&(s.text=n[1][n[0]].text),r&1&&(s.iconLaClassName=n[1][n[0]].icon),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Wr(e,t,i){let n;j(e,ke,o=>i(2,n=o));let{status:r}=t;const s={A:{text:n("Answered"),icon:"la-ticket-answered"},T:{text:n("Chatting"),icon:"la-chatting"},P:{text:n("Calling"),icon:"la-call"},X:{text:n("Deleted"),icon:"la-ticket-deleted"},B:{text:n("Spam"),icon:"la-spam"},I:{text:n("Init"),icon:""},R:{text:n("Resolved"),icon:"la-ticket-resolved"},N:{text:n("New"),icon:"la-ticket-new"},C:{text:n("Open"),icon:"la-ticket-open"},W:{text:n("Postponed"),icon:"la-ticket-postponed"}};return e.$$set=o=>{"status"in o&&i(0,r=o.status)},[r,s]}class Hr extends ne{constructor(t){super(),te(this,t,Wr,Ur,Z,{status:0},Jr)}}function Yr(e){re(e,"svelte-nfaksv",".subject.svelte-nfaksv{font-size:13px;font-weight:bold;line-height:20px;margin:0}.preview.svelte-nfaksv{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:5px;margin:0;line-height:20px;font-size:13px}.additional.svelte-nfaksv{display:flex}")}function Pr(e){let t,i;return t=new ht({props:{className:"Department",text:e[0].departmentname,iconLaClassName:"la-department"}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.text=n[0].departmentname),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Vr(e){let t,i;return t=new yn({props:{className:"Department",tagText:e[0].agentname,iconLaClassName:"la-department",iconText:e[0].departmentname}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&1&&(s.tagText=n[0].agentname),r&1&&(s.iconText=n[0].departmentname),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Qr(e){let t,i=e[0].subject+"",n,r,s,o=e[0].preview+"",a,u,l,c,f,d,g,m,_,v,N;c=new Hr({props:{status:e[0].status}});const x=[Vr,Pr],A=[];function F(b,z){return z&1&&(d=null),d==null&&(d=b[0].agentname.trim()!==""),d?0:1}return g=F(e,-1),m=A[g]=x[g](e),v=new Kr({props:{tags:e[0].tags}}),{c(){t=S("h1"),n=ee(i),r=P(),s=S("p"),a=ee(o),u=P(),l=S("div"),H(c.$$.fragment),f=P(),m.c(),_=P(),H(v.$$.fragment),y(t,"class","subject svelte-nfaksv"),y(s,"class","preview svelte-nfaksv"),y(l,"class","additional svelte-nfaksv")},m(b,z){R(b,t,z),C(t,n),R(b,r,z),R(b,s,z),C(s,a),R(b,u,z),R(b,l,z),K(c,l,null),C(l,f),A[g].m(l,null),C(l,_),K(v,l,null),N=!0},p(b,z){(!N||z&1)&&i!==(i=b[0].subject+"")&&ie(n,i),(!N||z&1)&&o!==(o=b[0].preview+"")&&ie(a,o);const U={};z&1&&(U.status=b[0].status),c.$set(U);let M=g;g=F(b,z),g===M?A[g].p(b,z):(ge(),$(A[M],1,1,()=>{A[M]=null}),he(),m=A[g],m?m.p(b,z):(m=A[g]=x[g](b),m.c()),k(m,1),m.m(l,_));const B={};z&1&&(B.tags=b[0].tags),v.$set(B)},i(b){N||(k(c.$$.fragment,b),k(m),k(v.$$.fragment,b),N=!0)},o(b){$(c.$$.fragment,b),$(m),$(v.$$.fragment,b),N=!1},d(b){b&&(O(t),O(r),O(s),O(u),O(l)),J(c),A[g].d(),J(v)}}}function Zr(e){let t,i;return t=new Ft({props:{className:e[1],$$slots:{default:[Qr]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,[r]){const s={};r&2&&(s.className=n[1]),r&5&&(s.$$scope={dirty:r,ctx:n}),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function Xr(e,t,i){let{row:n}=t,{className:r="statusColumn"}=t;return e.$$set=s=>{"row"in s&&i(0,n=s.row),"className"in s&&i(1,r=s.className)},[n,r]}class qr extends ne{constructor(t){super(),te(this,t,Xr,Zr,Z,{row:0,className:1},Yr)}}function jr(e){re(e,"svelte-8pmpj5",`.Row.svelte-8pmpj5{display:grid;grid-template-columns:60px 1fr;grid-template-rows:auto;grid-template-areas:"checkbox user"
|
|
11
9
|
"checkbox status"
|
|
12
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"
|
|
13
|
-
"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 Wt(e,t,i){const n=e.slice();return n[8]=t[i],n[9]=t,n[10]=i,n}function Yt(e){let t,i,n,r,s,o,a,u,l,c,d,f,g,m,_,y,v,x,O;function G(){e[5].call(s,e[10])}l=new Xi({props:{row:e[8]}}),f=new Jr({props:{row:e[8]}}),_=new Cr({props:{row:e[8]}});function A(){return e[6](e[8])}function k(...J){return e[7](e[8],...J)}return{c(){t=D("div"),i=D("div"),n=D("div"),r=P(),s=D("input"),a=P(),u=D("div"),H(l.$$.fragment),c=P(),d=D("div"),H(f.$$.fragment),g=P(),m=D("div"),H(_.$$.fragment),T(n,"class","StatusBar svelte-8pmpj5"),gt(n,"background-color",ot(e[8].status)),T(s,"type","checkbox"),s.__value=o=e[8].conversationid,Gt(s,s.__value),T(s,"class","svelte-8pmpj5"),T(i,"class","Checkbox svelte-8pmpj5"),gt(i,"position","relative"),T(u,"class","UserColumn svelte-8pmpj5"),T(d,"class","StatusColumn svelte-8pmpj5"),T(m,"class","ImportanceColumn svelte-8pmpj5"),T(t,"class",y="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-8pmpj5")},m(J,V){F(J,t,V),S(t,i),S(i,n),S(i,r),S(i,s),s.checked=e[2][e[10]].__selected,S(t,a),S(t,u),B(l,u,null),S(t,c),S(t,d),B(f,d,null),S(t,g),S(t,m),B(_,m,null),v=!0,x||(O=[le(s,"change",G),le(s,"click",_t(Wr)),le(i,"click",_t(Yr)),le(t,"click",A),le(t,"mousedown",k)],x=!0)},p(J,V){e=J,(!v||V&4)&>(n,"background-color",ot(e[8].status)),(!v||V&4&&o!==(o=e[8].conversationid))&&(s.__value=o,Gt(s,s.__value)),V&4&&(s.checked=e[2][e[10]].__selected);const z={};V&4&&(z.row=e[8]),l.$set(z);const E={};V&4&&(E.row=e[8]),f.$set(E);const I={};V&4&&(I.row=e[8]),_.$set(I),(!v||V&4&&y!==(y="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-8pmpj5"))&&T(t,"class",y)},i(J){v||(w(l.$$.fragment,J),w(f.$$.fragment,J),w(_.$$.fragment,J),v=!0)},o(J){L(l.$$.fragment,J),L(f.$$.fragment,J),L(_.$$.fragment,J),v=!1},d(J){J&&R(t),K(l),K(f),K(_),x=!1,we(O)}}}function Hr(e){let t,i,n,r=Ee(e[2]),s=[];for(let l=0;l<r.length;l+=1)s[l]=Yt(Wt(e,r,l));const o=l=>L(s[l],1,1,()=>{s[l]=null}),a=e[4].default,u=xe(a,e,e[3],null);return{c(){t=D("div");for(let l=0;l<s.length;l+=1)s[l].c();i=P(),u&&u.c(),T(t,"class","Body")},m(l,c){F(l,t,c);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(t,null);S(t,i),u&&u.m(t,null),n=!0},p(l,[c]){if(c&6){r=Ee(l[2]);let d;for(d=0;d<r.length;d+=1){const f=Wt(l,r,d);s[d]?(s[d].p(f,c),w(s[d],1)):(s[d]=Yt(f),s[d].c(),w(s[d],1),s[d].m(t,i))}for(he(),d=r.length;d<s.length;d+=1)o(d);me()}u&&u.p&&(!n||c&8)&&Be(u,a,l,l[3],n?Ie(a,l[3],c,null):Ke(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)w(s[c]);w(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)L(s[c]);L(u,l),n=!1},d(l){l&&R(t),Ct(s,l),u&&u.d(l)}}}const Wr=()=>{},Yr=()=>{};function Pr(e,t,i){let n,r=Q,s=()=>(r(),r=ye(u,g=>i(2,n=g)),u);e.$$.on_destroy.push(()=>r());let{$$slots:o={},$$scope:a}=t,{data:u}=t;s();let{middleclickhandler:l}=t;function c(g){n[g].__selected=this.checked,u.set(n)}const d=g=>location.assign("#Conversation;id="+g.conversationid),f=(g,m)=>{m.button===1&&l&&(l(g.conversationid),m.preventDefault(),m.stopPropagation())};return e.$$set=g=>{"data"in g&&s(i(0,u=g.data)),"middleclickhandler"in g&&i(1,l=g.middleclickhandler),"$$scope"in g&&i(3,a=g.$$scope)},[u,l,n,a,o,c,d,f]}class Vr extends ee{constructor(t){super(),j(this,t,Pr,Hr,Z,{data:0,middleclickhandler:1},Ur)}}function Qr(e){ie(e,"svelte-7bt636","div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function Zr(e){let t,i,n;return{c(){t=D("div"),i=D("p"),n=te(e[0]),T(t,"class","svelte-7bt636")},m(r,s){F(r,t,s),S(t,i),S(i,n)},p(r,[s]){s&1&&oe(n,r[0])},i:Q,o:Q,d(r){r&&R(t)}}}function Xr(e,t,i){let n,r,s,o,a;ne(e,$e,m=>i(8,o=m));let u,l=Te("loading");ne(e,l,m=>i(7,s=m));let c=Te("cursor");ne(e,c,m=>i(6,r=m));let d=Te("data");ne(e,d,m=>i(5,n=m));let f=Te("error");ne(e,f,m=>i(9,a=m));function g(m,_,y){return a?o("Loading failed. Please try again later."):m?o("Loading..."):_==null?y.length===0?o("No results match your filter. Try broadening the search criteria."):o("All data loaded"):o("Load more data")}return e.$$.update=()=>{e.$$.dirty&224&&i(0,u=g(s,r,n))},[u,l,c,d,f,n,r,s]}class qr extends ee{constructor(t){super(),j(this,t,Xr,Zr,Z,{},Qr)}}function jr(e){ie(e,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function es(e){let t,i,n,r,s;const o=e[4].default,a=xe(o,e,e[3],null);return{c(){t=D("button"),a&&a.c(),T(t,"class",i=Ce(e[0])+" svelte-10fvxzv")},m(u,l){F(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?Ie(o,u[3],l,null):Ke(u[3]),null),(!n||l&1&&i!==(i=Ce(u[0])+" svelte-10fvxzv"))&&T(t,"class",i)},i(u){n||(w(a,u),n=!0)},o(u){L(a,u),n=!1},d(u){u&&R(t),a&&a.d(u),r=!1,s()}}}function ts(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 Tt extends ee{constructor(t){super(),j(this,t,ts,es,Z,{onAction:2,className:0},jr)}}function ns(e){ie(e,"svelte-5dux4v","button.SortingButton{width:calc(100% - 8px);text-align:left;font-weight:normal;margin:0;margin-left:30px}button.SortingButton.Selected{width:100%;text-align:left;font-weight:bold}.Title.svelte-5dux4v{font-size:13px;font-style:normal;font-weight:700;line-height:20px;margin:4px 0 8px 10px;font-family:'Roboto', sans-serif}.modal.svelte-5dux4v{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 Pt(e,t,i){const n=e.slice();return n[7]=t[i],n}function is(e){let t=e[7].label+"",i,n;return{c(){i=te(t),n=P()},m(r,s){F(r,i,s),F(r,n,s)},p:Q,d(r){r&&(R(i),R(n))}}}function Vt(e){let t,i;function n(){return e[5](e[7])}return t=new Tt({props:{className:e[0]===e[7].value?"SortingButton Selected":"SortingButton",onAction:n,$$slots:{default:[is]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(r,s){B(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||(w(t.$$.fragment,r),i=!0)},o(r){L(t.$$.fragment,r),i=!1},d(r){K(t,r)}}}function rs(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]=Vt(Pt(e,a,c));const l=c=>L(u[c],1,1,()=>{u[c]=null});return{c(){t=D("div"),i=D("span"),r=te(n),s=P();for(let c=0;c<u.length;c+=1)u[c].c();T(i,"class","Title svelte-5dux4v"),T(t,"class","modal svelte-5dux4v")},m(c,d){F(c,t,d),S(t,i),S(i,r),S(t,s);for(let f=0;f<u.length;f+=1)u[f]&&u[f].m(t,null);o=!0},p(c,[d]){if((!o||d&2)&&n!==(n=c[1]("Sort by")+"")&&oe(r,n),d&13){a=Ee(c[2]);let f;for(f=0;f<a.length;f+=1){const g=Pt(c,a,f);u[f]?(u[f].p(g,d),w(u[f],1)):(u[f]=Vt(g),u[f].c(),w(u[f],1),u[f].m(t,null))}for(he(),f=a.length;f<u.length;f+=1)l(f);me()}},i(c){if(!o){for(let d=0;d<a.length;d+=1)w(u[d]);o=!0}},o(c){u=u.filter(Boolean);for(let d=0;d<u.length;d+=1)L(u[d]);o=!1},d(c){c&&R(t),Ct(u,c)}}}function ss(e,t,i){let n;ne(e,$e,c=>i(1,n=c));let{currentValue:r="importance"}=t,{closeModal:s=()=>{}}=t;const o=on(),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 os extends ee{constructor(t){super(),j(this,t,ss,rs,Z,{currentValue:0,closeModal:4},ns)}}function as(e){ie(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 ls(e){let t,i,n;return{c(){t=D("div"),T(t,"class","backdrop svelte-657q9o")},m(r,s){F(r,t,s),i||(n=le(t,"click",_t(function(){at(e[0])&&e[0].apply(this,arguments)})),i=!0)},p(r,[s]){e=r},i:Q,o:Q,d(r){r&&R(t),i=!1,n()}}}function us(e,t,i){let{onClick:n}=t;return e.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class cs extends ee{constructor(t){super(),j(this,t,us,ls,Z,{onClick:0},as)}}function ds(e){ie(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 fs(e){let t,i,n,r,s,o;return n=new qr({}),{c(){t=D("div"),i=D("div"),H(n.$$.fragment),T(i,"class","load svelte-1fwehqj"),T(t,"class","load svelte-1fwehqj")},m(a,u){F(a,t,u),S(t,i),B(n,i,null),e[14](i),r=!0,s||(o=le(i,"click",e[15]),s=!0)},p:Q,i(a){r||(w(n.$$.fragment,a),r=!0)},o(a){L(n.$$.fragment,a),r=!1},d(a){a&&R(t),K(n),e[14](null),s=!1,o()}}}function Qt(e){let t,i,n,r;return t=new os({props:{closeModal:e[12]}}),t.$on("change",hs),n=new cs({props:{onClick:e[12]}}),{c(){H(t.$$.fragment),i=P(),H(n.$$.fragment)},m(s,o){B(t,s,o),F(s,i,o),B(n,s,o),r=!0},p:Q,i(s){r||(w(t.$$.fragment,s),w(n.$$.fragment,s),r=!0)},o(s){L(t.$$.fragment,s),L(n.$$.fragment,s),r=!1},d(s){s&&R(i),K(t,s),K(n,s)}}}function gs(e){let t,i,n,r,s,o;i=new ki({props:{direction:e[4],data:e[0],selectedAll:e[3],cursor:e[6],filters:e[7]}}),i.$on("openModal",e[13]),r=new Vr({props:{data:e[0],middleclickhandler:e[2],$$slots:{default:[fs]},$$scope:{ctx:e}}});let a=e[10]&&Qt(e);return{c(){t=D("div"),H(i.$$.fragment),n=P(),H(r.$$.fragment),s=P(),a&&a.c(),T(t,"class","container svelte-1fwehqj")},m(u,l){F(u,t,l),B(i,t,null),S(t,n),B(r,t,null),S(t,s),a&&a.m(t,null),e[16](t),o=!0},p(u,[l]){const c={};l&16&&(c.direction=u[4]),l&1&&(c.data=u[0]),l&8&&(c.selectedAll=u[3]),l&64&&(c.cursor=u[6]),l&128&&(c.filters=u[7]),i.$set(c);const d={};l&1&&(d.data=u[0]),l&4&&(d.middleclickhandler=u[2]),l&133410&&(d.$$scope={dirty:l,ctx:u}),r.$set(d),u[10]?a?(a.p(u,l),l&1024&&w(a,1)):(a=Qt(u),a.c(),w(a,1),a.m(t,null)):a&&(he(),L(a,1,1,()=>{a=null}),me())},i(u){o||(w(i.$$.fragment,u),w(r.$$.fragment,u),w(a),o=!0)},o(u){L(i.$$.fragment,u),L(r.$$.fragment,u),L(a),o=!1},d(u){u&&R(t),K(i),K(r),a&&a.d(),e[16](null)}}}function hs(e){let t=e.detail.value;console.log(t)}function ms(e,t,i){let n,r=Q,s=()=>(r(),r=ye(f,k=>i(11,n=k)),f);e.$$.on_destroy.push(()=>r());let{data:o}=t,{loadMore:a}=t,{middleclickhandler:u}=t,{selectedAll:l}=t,{direction:c}=t,{loaded:d}=t,{cursor:f}=t;s();let{filters:g}=t,m,_,y=!1;function v(){i(10,y=!y)}function x(){i(10,y=!0)}sn(()=>{const k=new IntersectionObserver(J=>{J[0].isIntersecting&&a(!1)},{root:_,threshold:.5});return k.observe(m),()=>k.unobserve(m)});function O(k){Ze[k?"unshift":"push"](()=>{m=k,i(8,m)})}const G=()=>a(d&&!n);function A(k){Ze[k?"unshift":"push"](()=>{_=k,i(9,_)})}return e.$$set=k=>{"data"in k&&i(0,o=k.data),"loadMore"in k&&i(1,a=k.loadMore),"middleclickhandler"in k&&i(2,u=k.middleclickhandler),"selectedAll"in k&&i(3,l=k.selectedAll),"direction"in k&&i(4,c=k.direction),"loaded"in k&&i(5,d=k.loaded),"cursor"in k&&s(i(6,f=k.cursor)),"filters"in k&&i(7,g=k.filters)},[o,a,u,l,c,d,f,g,m,_,y,n,v,x,O,G,A]}class ps extends ee{constructor(t){super(),j(this,t,ms,gs,Z,{data:0,loadMore:1,middleclickhandler:2,selectedAll:3,direction:4,loaded:5,cursor:6,filters:7},ds)}}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(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(e,t||[])).next())})};const _s="https://localhost/api/v3".replace(/\/+$/,"");class Ot{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:_s}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||vn}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 vs=new Ot;class ft{constructor(t=vs){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 ks(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?ft.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 ws(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:bs(a.body)||a.body instanceof URLSearchParams||ys(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}}ft.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function ys(e){return typeof Blob<"u"&&e instanceof Blob}function bs(e){return typeof FormData<"u"&&e instanceof FormData}class ws extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class ks extends Error{constructor(t,i){super(i),this.cause=t,this.name="FetchError"}}class Zt extends Error{constructor(t,i){super(i),this.field=t,this.name="RequiredError"}}function h(e,t){const i=e[t];return i!=null}function vn(e,t=""){return Object.keys(e).map(i=>yn(i,e[i],t)).filter(i=>i.length>0).join("&")}function yn(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 yn(e,r,i)}return t instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?vn(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 Ts(e){return Cs(e)}function Cs(e,t){return e==null?e:{departmentid:h(e,"departmentid")?e.departmentid:void 0,onlineStatus:h(e,"online_status")?e.online_status:void 0,presetStatus:h(e,"preset_status")?e.preset_status:void 0}}function $s(e){return Ls(e)}function Ls(e,t){return e==null?e:{agentid:h(e,"agentid")?e.agentid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,username:h(e,"username")?e.username:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,roleid:h(e,"roleid")?e.roleid:void 0,departmentsStatuses:h(e,"departments_statuses")?e.departments_statuses.map(Ts):void 0,twofa:h(e,"twofa")?e.twofa:void 0,lastPswdChange:h(e,"last_pswd_change")?new Date(e.last_pswd_change):void 0,userstatus:h(e,"userstatus")?e.userstatus:void 0}}function Ss(e){return Ns(e)}function Ns(e,t){return e==null?e:{conversationid:h(e,"conversationid")?e.conversationid:void 0,datechanged:h(e,"datechanged")?new Date(e.datechanged):void 0,status:h(e,"status")?e.status:void 0,preview:h(e,"preview")?e.preview:void 0,subject:h(e,"subject")?e.subject:void 0,departmentname:h(e,"departmentname")?e.departmentname:void 0,agentname:h(e,"agentname")?e.agentname:void 0,tags:h(e,"tags")?e.tags:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,emails:h(e,"emails")?e.emails:void 0,city:h(e,"city")?e.city:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,rstatus:h(e,"rstatus")?e.rstatus:void 0,statusdatestarted:h(e,"statusdatestarted")?new Date(e.statusdatestarted):void 0,chatOrder:h(e,"chat_order")?e.chat_order:void 0}}function Ds(e){return As(e)}function As(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,name:h(e,"name")?e.name:void 0,type:h(e,"type")?e.type:void 0,onlineCode:h(e,"online_code")?e.online_code:void 0,offlineCode:h(e,"offline_code")?e.offline_code:void 0,onlineCodeCss:h(e,"online_code_css")?e.online_code_css:void 0,offlineCodeCss:h(e,"offline_code_css")?e.offline_code_css:void 0,provide:h(e,"provide")?e.provide:void 0,impressions:h(e,"impressions")?e.impressions:void 0,tickets:h(e,"tickets")?e.tickets:void 0,status:h(e,"status")?e.status:void 0,lastDisplayTime:h(e,"last_display_time")?e.last_display_time:void 0,lastDisplayUrl:h(e,"last_display_url")?e.last_display_url:void 0}}function pe(e){return Os(e)}function Os(e,t){return e==null?e:{count:h(e,"count")?e.count:void 0}}function Rs(e){return Ms(e)}function Ms(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,name:h(e,"name")?e.name:void 0,agentCount:h(e,"agent_count")?e.agent_count:void 0}}function Fs(e){return Gs(e)}function Gs(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,logid:h(e,"logid")?e.logid:void 0,line:h(e,"line")?e.line:void 0,filename:h(e,"filename")?e.filename:void 0,created:h(e,"created")?e.created:void 0,level:h(e,"level")?e.level:void 0,type:h(e,"type")?e.type:void 0,message:h(e,"message")?e.message:void 0,ip:h(e,"ip")?e.ip:void 0,groupid:h(e,"groupid")?e.groupid:void 0}}function zs(e){return Es(e)}function Es(e,t){return e==null?e:{agentid:h(e,"agentid")?e.agentid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,chats:h(e,"chats")?e.chats:void 0}}function xs(e){return Is(e)}function Is(e,t){return e==null?e:{name:h(e,"name")?e.name:void 0,code:h(e,"code")?e.code:void 0,engName:h(e,"eng_name")?e.eng_name:void 0,translated:h(e,"translated")?e.translated:void 0,isDefault:h(e,"is_default")?e.is_default:void 0,active:h(e,"active")?e.active:void 0,isCustom:h(e,"is_custom")?e.is_custom:void 0,isBuiltIn:h(e,"is_builtIn")?e.is_builtIn:void 0}}function Bs(e){return Ks(e)}function Ks(e,t){return e==null?e:{codeName:h(e,"code_name")?e.code_name:void 0,name:h(e,"name")?e.name:void 0,description:h(e,"description")?e.description:void 0,active:h(e,"active")?e.active:void 0,help:h(e,"help")?e.help:void 0,multiple:h(e,"multiple")?e.multiple:void 0,configFile:h(e,"config_file")?e.config_file:void 0,price:h(e,"price")?e.price:void 0,legacyIntegration:h(e,"legacy_integration")?e.legacy_integration:void 0}}function mt(e){return Js(e)}function Js(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,conversationid:h(e,"conversationid")?e.conversationid:void 0,code:h(e,"code")?e.code:void 0,slaTicketId:h(e,"sla_ticket_id")?e.sla_ticket_id:void 0,departmentid:h(e,"departmentid")?e.departmentid:void 0,departmentName:h(e,"department_name")?e.department_name:void 0,levelid:h(e,"levelid")?e.levelid:void 0,slaLevelName:h(e,"sla_level_name")?e.sla_level_name:void 0,sla:h(e,"sla")?e.sla:void 0,dateCreated:h(e,"date_created")?e.date_created:void 0,dateClosed:h(e,"date_closed")?e.date_closed:void 0,dateDue:h(e,"date_due")?e.date_due:void 0,slaLevelId:h(e,"sla_level_id")?e.sla_level_id:void 0,slaType:h(e,"sla_type")?new Date(e.sla_type):void 0,agentid:h(e,"agentid")?e.agentid:void 0,agentFirstname:h(e,"agent_firstname")?e.agent_firstname:void 0,agentLastname:h(e,"agent_lastname")?e.agent_lastname:void 0,agentAvatarUrl:h(e,"agent_avatar_url")?e.agent_avatar_url:void 0,reqContactid:h(e,"req_contactid")?e.req_contactid:void 0,reqFirstname:h(e,"req_firstname")?e.req_firstname:void 0,reqLastname:h(e,"req_lastname")?e.req_lastname:void 0,reqSystemname:h(e,"req_systemname")?e.req_systemname:void 0,reqContactName:h(e,"req_contactName")?e.req_contactName:void 0,reqAvatarUrl:h(e,"req_avatar_url")?e.req_avatar_url:void 0}}function Xt(e){return Us(e)}function Us(e,t){return e==null?e:{tagid:h(e,"tagid")?e.tagid:void 0,name:h(e,"name")?e.name:void 0,type:h(e,"type")?e.type:void 0,color:h(e,"color")?e.color:void 0,backgroundcolor:h(e,"backgroundcolor")?e.backgroundcolor:void 0,isPublic:h(e,"is_public")?e.is_public:void 0}}function bn(e){return Hs(e)}function Hs(e,t){return e==null?e:{conversationid:h(e,"conversationid")?e.conversationid:void 0,code:h(e,"code")?e.code:void 0,datecreated:h(e,"datecreated")?new Date(e.datecreated):void 0,datechanged:h(e,"datechanged")?new Date(e.datechanged):void 0,dateresolved:h(e,"dateresolved")?new Date(e.dateresolved):void 0,statuschanged:h(e,"statuschanged")?new Date(e.statuschanged):void 0,rorder:h(e,"rorder")?e.rorder:void 0,datedue:h(e,"datedue")?new Date(e.datedue):void 0,datereopen:h(e,"datereopen")?new Date(e.datereopen):void 0,status:h(e,"status")?e.status:void 0,channelType:h(e,"channel_type")?e.channel_type:void 0,departmentid:h(e,"departmentid")?e.departmentid:void 0,agentid:h(e,"agentid")?e.agentid:void 0,preview:h(e,"preview")?e.preview:void 0,subject:h(e,"subject")?e.subject:void 0,departmentname:h(e,"departmentname")?e.departmentname:void 0,agentname:h(e,"agentname")?e.agentname:void 0,tags:h(e,"tags")?e.tags:void 0,messagegroupsIn:h(e,"messagegroups_in")?e.messagegroups_in:void 0,messagegroupsOut:h(e,"messagegroups_out")?e.messagegroups_out:void 0,contactid:h(e,"contactid")?e.contactid:void 0,parentContactid:h(e,"parent_contactid")?e.parent_contactid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,emails:h(e,"emails")?e.emails:void 0,phones:h(e,"phones")?e.phones:void 0,jobPosition:h(e,"job_position")?e.job_position:void 0,contactType:h(e,"contact_type")?e.contact_type:void 0,city:h(e,"city")?e.city:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,timeOffset:h(e,"time_offset")?e.time_offset:void 0,gender:h(e,"gender")?e.gender:void 0,levelid:h(e,"levelid")?e.levelid:void 0,groups:h(e,"groups")?e.groups:void 0,contactStatus:h(e,"contact_status")?e.contact_status:void 0,company:h(e,"company")?e.company:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,userid:h(e,"userid")?e.userid:void 0,roleid:h(e,"roleid")?e.roleid:void 0,userstatus:h(e,"userstatus")?e.userstatus:void 0,accountuserstatus:h(e,"accountuserstatus")?e.accountuserstatus:void 0,description:h(e,"description")?e.description:void 0,note:h(e,"note")?e.note:void 0,lastActivity:h(e,"last_activity")?new Date(e.last_activity):void 0,tagnames:h(e,"tagnames")?e.tagnames:void 0,groupnames:h(e,"groupnames")?e.groupnames:void 0}}function Ws(e){return Ys(e)}function Ys(e,t){return e==null?e:{cursor:h(e,"cursor")?e.cursor:void 0,rows:h(e,"rows")?e.rows.map(bn):void 0}}function Ps(e){return Vs(e)}function Vs(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,agentid:h(e,"agentid")?e.agentid:void 0,agent:h(e,"agent")?e.agent:void 0,conversationid:h(e,"conversationid")?e.conversationid:void 0,ticket:h(e,"ticket")?e.ticket:void 0,parentContactid:h(e,"parent_contactid")?e.parent_contactid:void 0,company:h(e,"company")?e.company:void 0,contactid:h(e,"contactid")?e.contactid:void 0,customer:h(e,"customer")?e.customer:void 0,customerFirstname:h(e,"customer_firstname")?e.customer_firstname:void 0,customerLastname:h(e,"customer_lastname")?e.customer_lastname:void 0,customerSystemname:h(e,"customer_systemname")?e.customer_systemname:void 0,agentTicket:h(e,"agent_ticket")?e.agent_ticket:void 0,reportdate:h(e,"reportdate")?e.reportdate:void 0,reportedtime:h(e,"reportedtime")?e.reportedtime:void 0,reportedtimeHhmmss:h(e,"reportedtime_hhmmss")?e.reportedtime_hhmmss:void 0,spenttime:h(e,"spenttime")?e.spenttime:void 0,dateinvoiced:h(e,"dateinvoiced")?e.dateinvoiced:void 0,note:h(e,"note")?e.note:void 0,type:h(e,"type")?e.type:void 0}}var M=globalThis&&globalThis.__awaiter||function(e,t,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(e,t||[])).next())})};class wn extends ft{getAgentsGridListRaw(t,i){return M(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($s))})}getAgentsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(t,i)).value()})}getAgentsGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getAgentsGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(t,i)).value()})}getCallsSlaLogGridListRaw(t,i){return M(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(mt))})}getCallsSlaLogGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(t,i)).value()})}getCallsSlaLogGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getCallsSlaLogGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(t,i)).value()})}getChatsGridListRaw(t,i){return M(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(Ss))})}getChatsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(t,i)).value()})}getChatsGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getChatsGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(t,i)).value()})}getChatsSlaLogGridListRaw(t,i){return M(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(mt))})}getChatsSlaLogGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(t,i)).value()})}getChatsSlaLogGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getChatsSlaLogGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(t,i)).value()})}getContactWidgetsCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getContactWidgetsCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(t,i)).value()})}getContactWidgetsListRaw(t,i){return M(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(Ds))})}getContactWidgetsList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(t,i)).value()})}getCustomerGroupsGridListRaw(t,i){return M(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(Xt))})}getCustomerGroupsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(t,i)).value()})}getDepartmensGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getDepartmensGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(t,i)).value()})}getDepartmentsGridListRaw(t,i){return M(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(Rs))})}getDepartmentsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(t,i)).value()})}getEventLogsGridListRaw(t,i){return M(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(Fs))})}getEventLogsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(t,i)).value()})}getEventLogsGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getEventLogsGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(t,i)).value()})}getInviteAgentsGridListRaw(t,i){return M(this,void 0,void 0,function*(){if(t.departmentId===null||t.departmentId===void 0)throw new Zt("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(zs))})}getInviteAgentsGridList(t,i){return M(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(t,i)).value()})}getLanguagesGridListRaw(t,i){return M(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(xs))})}getLanguagesGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(t,i)).value()})}getLanguagesGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getLanguagesGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(t,i)).value()})}getPlugindGridListRaw(t,i){return M(this,void 0,void 0,function*(){if(t.pluginPurpose===null||t.pluginPurpose===void 0)throw new Zt("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(Bs))})}getPlugindGridList(t,i){return M(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(t,i)).value()})}getTagsGridListRaw(t,i){return M(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(Xt))})}getTagsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(t,i)).value()})}getTicketsGridDatasetRaw(t,i){return M(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=>Ws(o))})}getTicketsGridDataset(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(t,i)).value()})}getTicketsGridListRaw(t,i){return M(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(bn))})}getTicketsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(t,i)).value()})}getTicketsGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getTicketsGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(t,i)).value()})}getTicketsSlaLogGridListRaw(t,i){return M(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(mt))})}getTicketsSlaLogGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(t,i)).value()})}getTicketsSlaLogGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getTicketsSlaLogGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(t,i)).value()})}getTimeReportsGridListRaw(t,i){return M(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(Ps))})}getTimeReportsGridList(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(t,i)).value()})}getTimeReportsGridListCountRaw(t,i){return M(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getTimeReportsGridListCount(t={},i){return M(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(t,i)).value()})}}const qt={Asc:"ASC",Desc:"DESC"},Qs={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 Zs{constructor(t,i){const n=new Ot({apiKey:t,basePath:i+"/api/v3"});this.api=new wn(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 Xs(e){ie(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 qs(e){let t,i,n=e[0]("Change filter")+"",r,s;return t=new be({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){H(t.$$.fragment),i=P(),r=te(n)},m(o,a){B(t,o,a),F(o,i,a),F(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Change filter")+"")&&oe(r,n)},i(o){s||(w(t.$$.fragment,o),s=!0)},o(o){L(t.$$.fragment,o),s=!1},d(o){o&&(R(i),R(r)),K(t,o)}}}function js(e){let t,i,n=e[0]("Configure chat button")+"",r,s;return t=new be({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){H(t.$$.fragment),i=P(),r=te(n)},m(o,a){B(t,o,a),F(o,i,a),F(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Configure chat button")+"")&&oe(r,n)},i(o){s||(w(t.$$.fragment,o),s=!0)},o(o){L(t.$$.fragment,o),s=!1},d(o){o&&(R(i),R(r)),K(t,o)}}}function eo(e){let t,i,n,r,s,o=e[0]("No tickets found")+"",a,u,l,c=e[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"",d,f,g,m,_,y,v;return m=new Tt({props:{className:"Filter",$$slots:{default:[qs]},$$scope:{ctx:e}}}),y=new Tt({props:{className:"Configure",$$slots:{default:[js]},$$scope:{ctx:e}}}),{c(){t=D("div"),i=D("img"),r=P(),s=D("h1"),a=te(o),u=P(),l=D("p"),d=te(c),f=P(),g=D("div"),H(m.$$.fragment),_=P(),H(y.$$.fragment),T(i,"alt","No results placeholder"),pt(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||T(i,"src",n),T(i,"class","svelte-19qi61t"),T(s,"class","svelte-19qi61t"),T(l,"class","svelte-19qi61t"),T(g,"class","Buttons"),T(t,"class","NoTickets svelte-19qi61t")},m(x,O){F(x,t,O),S(t,i),S(t,r),S(t,s),S(s,a),S(t,u),S(t,l),S(l,d),S(t,f),S(t,g),B(m,g,null),S(g,_),B(y,g,null),v=!0},p(x,[O]){(!v||O&1)&&o!==(o=x[0]("No tickets found")+"")&&oe(a,o),(!v||O&1)&&c!==(c=x[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"")&&oe(d,c);const G={};O&3&&(G.$$scope={dirty:O,ctx:x}),m.$set(G);const A={};O&3&&(A.$$scope={dirty:O,ctx:x}),y.$set(A)},i(x){v||(w(m.$$.fragment,x),w(y.$$.fragment,x),v=!0)},o(x){L(m.$$.fragment,x),L(y.$$.fragment,x),v=!1},d(x){x&&R(t),K(m),K(y)}}}function to(e,t,i){let n;return ne(e,$e,r=>i(0,n=r)),[n]}class no extends ee{constructor(t){super(),j(this,t,to,eo,Z,{},Xs)}}function io(e){ie(e,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function ro(e){let t,i;return t=new ps({props:{direction:e[11],data:e[9],loaded:e[3],loadMore:e[2],cursor:e[13],middleclickhandler:e[1],selectedAll:e[7],filters:e[0]}}),{c(){H(t.$$.fragment)},m(n,r){B(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||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function so(e){let t,i;return t=new no({}),{c(){H(t.$$.fragment)},m(n,r){B(t,n,r),i=!0},p:Q,i(n){i||(w(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){K(t,n)}}}function oo(e){let t,i,n,r;const s=[so,ro],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=D("main"),n.c(),T(t,"class","svelte-14f2ism")},m(u,l){F(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(),L(o[c],1,1,()=>{o[c]=null}),me(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),w(n,1),n.m(t,null))},i(u){r||(w(n),r=!0)},o(u){L(n),r=!1},d(u){u&&R(t),o[i].d()}}}function ao(e,t,i){let n,r,s,o,a,u,l,c,{apikey:d}=t,{filters:f}=t,{middleclickhandler:g}=t,{selectionHandler:m}=t,{basePath:_}=t,y=ce({});ne(e,y,b=>i(17,n=b));let v=ce(!1);ne(e,v,b=>i(18,c=b));let x=new Zs(d,_);x.load(),Ne("tagsMap",x.tags);let O=ce(null);ne(e,O,b=>i(19,s=b)),Ne("error",O);const G=new Ot({apiKey:d,basePath:_+"/api/v3"}),A=new wn(G);Ne("api",A);const k=ce([]);ne(e,k,b=>i(5,a=b)),Ne("data",k);const J=ce(Qs.Rorder);ne(e,J,b=>i(21,u=b));const V=ce(!0);ne(e,V,b=>i(22,l=b));const z=ce(!1);ne(e,z,b=>i(4,r=b)),Ne("loading",z);const E=ce(null);ne(e,E,b=>i(20,o=b)),Ne("cursor",E);let I=!1,W=()=>({perPage:20,sortDir:l?qt.Asc:qt.Desc,filters:f,sortField:u,cursor:o||""}),{loadMore:de=async(b=!1)=>{if(!r&&(b===!0&&(_e(E,o=null,o),i(3,I=!1)),!(!o&&I))){_e(z,r=!0,r);try{const C=await A.getTicketsGridDatasetRaw(W());console.log("Loaded tickets response: ",C);const p=await C.value();b===!0&&_e(k,a=[],a),_e(k,a=a.concat(p.rows),a),_e(E,o=p.cursor,o),console.log("Loaded tickets value: ",p),console.log("Loaded tickets: ",p.rows.length,"cursor: ",p.cursor),i(3,I=!0)}catch(C){console.error("Loading tickets failed: ",C),_e(O,s=C.toString(),s)}_e(z,r=!1,r)}}}=t;return V.subscribe(async()=>{await de(!0)}),J.subscribe(async()=>{await de(!0)}),k.subscribe(b=>{_e(y,n=b.filter(C=>C.__selected??!1).map(C=>C.conversationid),n)}),Ne("loadMoreFunction",de),e.$$set=b=>{"apikey"in b&&i(14,d=b.apikey),"filters"in b&&i(0,f=b.filters),"middleclickhandler"in b&&i(1,g=b.middleclickhandler),"selectionHandler"in b&&i(15,m=b.selectionHandler),"basePath"in b&&i(16,_=b.basePath),"loadMore"in b&&i(2,de=b.loadMore)},e.$$.update=()=>{e.$$.dirty&425984&&m(n,c),e.$$.dirty&5&&f&&de(!0)},[f,g,de,I,r,a,y,v,O,k,J,V,z,E,d,m,_,n,c]}class lo extends ee{constructor(t){super(),j(this,t,ao,oo,Z,{apikey:14,filters:0,middleclickhandler:1,selectionHandler:15,basePath:16,loadMore:2},io)}}const uo="modulepreload",co=function(e){return"/"+e},jt={},en=function(t,i,n){if(!i||i.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=co(s),s in jt)return;jt[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":uo,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,d)=>{l.addEventListener("load",c),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function fo(){It("en",()=>en(()=>import("./en.js"),[])),It("sk",()=>en(()=>import("./sk.js"),[]))}function tn(e){let t,i,n;function r(o){e[12](o)}let s={apikey:e[0],basePath:e[3],filters:e[1],middleclickhandler:e[2],selectionHandler:e[5],$$slots:{default:[go]},$$scope:{ctx:e}};return e[4]!==void 0&&(s.loadMore=e[4]),t=new lo({props:s}),Ze.push(()=>Jn(t,"loadMore",r)),{c(){H(t.$$.fragment)},m(o,a){B(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&8192&&(u.$$scope={dirty:a,ctx:o}),!i&&a&16&&(i=!0,u.loadMore=o[4],xn(()=>i=!1)),t.$set(u)},i(o){n||(w(t.$$.fragment,o),n=!0)},o(o){L(t.$$.fragment,o),n=!1},d(o){K(t,o)}}}function go(e){let t;const i=e[11].default,n=xe(i,e,e[13],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),t=!0},p(r,s){n&&n.p&&(!t||s&8192)&&Be(n,i,r,r[13],t?Ie(i,r[13],s,null):Ke(r[13]),null)},i(r){t||(w(n,r),t=!0)},o(r){L(n,r),t=!1},d(r){n&&n.d(r)}}}function ho(e){let t,i,n,r,s=e[0]&&tn(e);return{c(){s&&s.c(),t=P(),i=D("link"),T(i,"rel","stylesheet"),T(i,"href",n=e[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),F(o,t,a),F(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&w(s,1)):(s=tn(o),s.c(),w(s,1),s.m(t.parentNode,t)):s&&(he(),L(s,1,1,()=>{s=null}),me()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&T(i,"href",n)},i(o){r||(w(s),r=!0)},o(o){L(s),r=!1},d(o){o&&(R(t),R(i)),s&&s.d(o)}}}function mo(e,t,i){let{$$slots:n={},$$scope:r}=t;fo();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,{selectionMap:c={}}=t,{selectedAll:d=!1}=t,{basepath:f}=t,g;const m=function(v=!1){g&&g(v)};li({initialLocale:s,fallbackLocale:"en"}),fi();function _(v,x){i(6,c=v),i(7,d=x),l&&l(v,x)}function y(v){g=v,i(4,g)}return e.$$set=v=>{"lang"in v&&i(8,s=v.lang),"apikey"in v&&i(0,o=v.apikey),"filters"in v&&i(1,a=v.filters),"middleclickhandler"in v&&i(2,u=v.middleclickhandler),"selectionhandler"in v&&i(9,l=v.selectionhandler),"selectionMap"in v&&i(6,c=v.selectionMap),"selectedAll"in v&&i(7,d=v.selectedAll),"basepath"in v&&i(3,f=v.basepath),"$$scope"in v&&i(13,r=v.$$scope)},[o,a,u,f,g,_,c,d,s,l,m,n,y,r]}class po extends ee{constructor(t){super(),j(this,t,mo,ho,Z,{lang:8,apikey:0,filters:1,middleclickhandler:2,selectionhandler:9,selectionMap:6,selectedAll:7,basepath:3,reload:10})}get lang(){return this.$$.ctx[8]}set lang(t){this.$$set({lang:t}),ve()}get apikey(){return this.$$.ctx[0]}set apikey(t){this.$$set({apikey:t}),ve()}get filters(){return this.$$.ctx[1]}set filters(t){this.$$set({filters:t}),ve()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(t){this.$$set({middleclickhandler:t}),ve()}get selectionhandler(){return this.$$.ctx[9]}set selectionhandler(t){this.$$set({selectionhandler:t}),ve()}get selectionMap(){return this.$$.ctx[6]}set selectionMap(t){this.$$set({selectionMap:t}),ve()}get selectedAll(){return this.$$.ctx[7]}set selectedAll(t){this.$$set({selectedAll:t}),ve()}get basepath(){return this.$$.ctx[3]}set basepath(t){this.$$set({basepath:t}),ve()}get reload(){return this.$$.ctx[10]}}customElements.define("tickets-table",Hn(po,{lang:{},apikey:{},filters:{},middleclickhandler:{},selectionhandler:{},selectionMap:{},selectedAll:{type:"Boolean"},basepath:{}},["default"],["reload"],!0));
|
|
11
|
+
"checkbox status importance";grid-template-columns:60px 3fr 1fr;height:110px;padding-bottom:5px;padding-top:5px}}@media(min-width: 900px){.Row.svelte-8pmpj5{grid-template-areas:"checkbox user status importance";grid-template-columns:60px 170px auto 190px;height:80px}}@media(min-width: 1300px){.Row.svelte-8pmpj5{grid-template-columns:60px 260px auto 230px}}`)}function Pt(e,t,i){const n=e.slice();return n[8]=t[i],n[9]=t,n[10]=i,n}function Vt(e){let t,i,n,r,s,o,a,u,l,c,f,d,g,m,_,v,N,x,A;function F(){e[5].call(s,e[10])}l=new ar({props:{row:e[8]}}),d=new qr({props:{row:e[8]}}),_=new Mr({props:{row:e[8]}});function b(){return e[6](e[8])}function z(...U){return e[7](e[8],...U)}return{c(){t=S("div"),i=S("div"),n=S("div"),r=P(),s=S("input"),a=P(),u=S("div"),H(l.$$.fragment),c=P(),f=S("div"),H(d.$$.fragment),g=P(),m=S("div"),H(_.$$.fragment),y(n,"class","StatusBar svelte-8pmpj5"),pt(n,"background-color",ut(e[8].status)),y(s,"type","checkbox"),s.__value=o=e[8].conversationid,It(s,s.__value),y(s,"class","svelte-8pmpj5"),y(i,"class","Checkbox svelte-8pmpj5"),pt(i,"position","relative"),y(u,"class","UserColumn svelte-8pmpj5"),y(f,"class","StatusColumn svelte-8pmpj5"),y(m,"class","ImportanceColumn svelte-8pmpj5"),y(t,"class",v="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-8pmpj5")},m(U,M){R(U,t,M),C(t,i),C(i,n),C(i,r),C(i,s),s.checked=e[2][e[10]].__selected,C(t,a),C(t,u),K(l,u,null),C(t,c),C(t,f),K(d,f,null),C(t,g),C(t,m),K(_,m,null),N=!0,x||(A=[le(s,"change",F),le(s,"click",bt(ts)),le(i,"click",bt(ns)),le(t,"click",b),le(t,"mousedown",z)],x=!0)},p(U,M){e=U,(!N||M&4)&&pt(n,"background-color",ut(e[8].status)),(!N||M&4&&o!==(o=e[8].conversationid))&&(s.__value=o,It(s,s.__value)),M&4&&(s.checked=e[2][e[10]].__selected);const B={};M&4&&(B.row=e[8]),l.$set(B);const I={};M&4&&(I.row=e[8]),d.$set(I);const T={};M&4&&(T.row=e[8]),_.$set(T),(!N||M&4&&v!==(v="Row "+(e[2][e[10]].__selected?"Selected":"")+" svelte-8pmpj5"))&&y(t,"class",v)},i(U){N||(k(l.$$.fragment,U),k(d.$$.fragment,U),k(_.$$.fragment,U),N=!0)},o(U){$(l.$$.fragment,U),$(d.$$.fragment,U),$(_.$$.fragment,U),N=!1},d(U){U&&O(t),J(l),J(d),J(_),x=!1,be(A)}}}function es(e){let t,i,n,r=Ee(e[2]),s=[];for(let l=0;l<r.length;l+=1)s[l]=Vt(Pt(e,r,l));const o=l=>$(s[l],1,1,()=>{s[l]=null}),a=e[4].default,u=Ie(a,e,e[3],null);return{c(){t=S("div");for(let l=0;l<s.length;l+=1)s[l].c();i=P(),u&&u.c(),y(t,"class","Body")},m(l,c){R(l,t,c);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(t,null);C(t,i),u&&u.m(t,null),n=!0},p(l,[c]){if(c&6){r=Ee(l[2]);let f;for(f=0;f<r.length;f+=1){const d=Pt(l,r,f);s[f]?(s[f].p(d,c),k(s[f],1)):(s[f]=Vt(d),s[f].c(),k(s[f],1),s[f].m(t,i))}for(ge(),f=r.length;f<s.length;f+=1)o(f);he()}u&&u.p&&(!n||c&8)&&Be(u,a,l,l[3],n?xe(a,l[3],c,null):Ke(l[3]),null)},i(l){if(!n){for(let c=0;c<r.length;c+=1)k(s[c]);k(u,l),n=!0}},o(l){s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)$(s[c]);$(u,l),n=!1},d(l){l&&O(t),St(s,l),u&&u.d(l)}}}const ts=()=>{},ns=()=>{};function is(e,t,i){let n,r=V,s=()=>(r(),r=Oe(u,g=>i(2,n=g)),u);e.$$.on_destroy.push(()=>r());let{$$slots:o={},$$scope:a}=t,{data:u}=t;s();let{middleclickhandler:l}=t;function c(g){n[g].__selected=this.checked,u.set(n)}const f=g=>location.assign("#Conversation;id="+g.conversationid),d=(g,m)=>{m.button===1&&l&&(l(g.conversationid),m.preventDefault(),m.stopPropagation())};return e.$$set=g=>{"data"in g&&s(i(0,u=g.data)),"middleclickhandler"in g&&i(1,l=g.middleclickhandler),"$$scope"in g&&i(3,a=g.$$scope)},[u,l,n,a,o,c,f,d]}class rs extends ne{constructor(t){super(),te(this,t,is,es,Z,{data:0,middleclickhandler:1},jr)}}function ss(e){re(e,"svelte-7bt636","div.svelte-7bt636{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:auto}")}function os(e){let t,i,n;return{c(){t=S("div"),i=S("p"),n=ee(e[0]),y(t,"class","svelte-7bt636")},m(r,s){R(r,t,s),C(t,i),C(i,n)},p(r,[s]){s&1&&ie(n,r[0])},i:V,o:V,d(r){r&&O(t)}}}function as(e,t,i){let n,r,s,o,a;j(e,ke,m=>i(8,o=m));let u,l=ve("loading");j(e,l,m=>i(7,s=m));let c=ve("cursor");j(e,c,m=>i(6,r=m));let f=ve("data");j(e,f,m=>i(5,n=m));let d=ve("error");j(e,d,m=>i(9,a=m));function g(m,_,v){return a?o("Loading failed. Please try again later."):m?o("Loading..."):_==null?v.length===0?o("No results match your filter. Try broadening the search criteria."):o("All data loaded"):o("Load more data")}return e.$$.update=()=>{e.$$.dirty&224&&i(0,u=g(s,r,n))},[u,l,c,f,d,n,r,s]}class ls extends ne{constructor(t){super(),te(this,t,as,os,Z,{},ss)}}function us(e){re(e,"svelte-10fvxzv","button.svelte-10fvxzv{padding:10px;margin:5px;border:none;border-radius:5px;cursor:pointer;font-size:13px;font-weight:600}")}function cs(e){let t,i,n,r,s;const o=e[4].default,a=Ie(o,e,e[3],null);return{c(){t=S("button"),a&&a.c(),y(t,"class",i=Te(e[0])+" svelte-10fvxzv")},m(u,l){R(u,t,l),a&&a.m(t,null),n=!0,r||(s=le(t,"click",e[1]),r=!0)},p(u,[l]){a&&a.p&&(!n||l&8)&&Be(a,o,u,u[3],n?xe(o,u[3],l,null):Ke(u[3]),null),(!n||l&1&&i!==(i=Te(u[0])+" svelte-10fvxzv"))&&y(t,"class",i)},i(u){n||(k(a,u),n=!0)},o(u){$(a,u),n=!1},d(u){u&&O(t),a&&a.d(u),r=!1,s()}}}function fs(e,t,i){let{$$slots:n={},$$scope:r}=t,{onAction:s=()=>{}}=t,{className:o=""}=t;function a(){s()}return e.$$set=u=>{"onAction"in u&&i(2,s=u.onAction),"className"in u&&i(0,o=u.className),"$$scope"in u&&i(3,r=u.$$scope)},[o,a,s,r,n]}class Lt extends ne{constructor(t){super(),te(this,t,fs,cs,Z,{onAction:2,className:0},us)}}function ds(e){re(e,"svelte-1tadows","button.SortingButton{width:calc(100% - 8px);text-align:left;font-weight:normal;margin:0 0 0 30px}button.SortingButton.Selected{width:100%;text-align:left;font-weight:bold}.Title.svelte-1tadows{font-size:13px;font-style:normal;font-weight:700;line-height:20px;margin:4px 0 8px 10px;font-family:'Roboto', sans-serif}.modal.svelte-1tadows{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);min-width:200px;display:flex;flex-direction:column;align-items:flex-start;padding:4px;background-color:white;border-radius:6px;overflow:hidden;z-index:110;box-shadow:0px 1px 3px 0px rgba(30, 34, 39, 0.12), 0px 8px 24px 0px rgba(30, 34, 39, 0.10)}")}function Qt(e,t,i){const n=e.slice();return n[7]=t[i],n}function gs(e){let t=e[7].label+"",i,n;return{c(){i=ee(t),n=P()},m(r,s){R(r,i,s),R(r,n,s)},p:V,d(r){r&&(O(i),O(n))}}}function Zt(e){let t,i;function n(){return e[5](e[7])}return t=new Lt({props:{className:e[0]===e[7].value?"SortingButton Selected":"SortingButton",onAction:n,$$slots:{default:[gs]},$$scope:{ctx:e}}}),{c(){H(t.$$.fragment)},m(r,s){K(t,r,s),i=!0},p(r,s){e=r;const o={};s&1&&(o.className=e[0]===e[7].value?"SortingButton Selected":"SortingButton"),s&1024&&(o.$$scope={dirty:s,ctx:e}),t.$set(o)},i(r){i||(k(t.$$.fragment,r),i=!0)},o(r){$(t.$$.fragment,r),i=!1},d(r){J(t,r)}}}function hs(e){let t,i,n=e[1]("Sort by")+"",r,s,o,a=Ee(e[2]),u=[];for(let c=0;c<a.length;c+=1)u[c]=Zt(Qt(e,a,c));const l=c=>$(u[c],1,1,()=>{u[c]=null});return{c(){t=S("div"),i=S("span"),r=ee(n),s=P();for(let c=0;c<u.length;c+=1)u[c].c();y(i,"class","Title svelte-1tadows"),y(t,"class","modal svelte-1tadows")},m(c,f){R(c,t,f),C(t,i),C(i,r),C(t,s);for(let d=0;d<u.length;d+=1)u[d]&&u[d].m(t,null);o=!0},p(c,[f]){if((!o||f&2)&&n!==(n=c[1]("Sort by")+"")&&ie(r,n),f&13){a=Ee(c[2]);let d;for(d=0;d<a.length;d+=1){const g=Qt(c,a,d);u[d]?(u[d].p(g,f),k(u[d],1)):(u[d]=Zt(g),u[d].c(),k(u[d],1),u[d].m(t,null))}for(ge(),d=a.length;d<u.length;d+=1)l(d);he()}},i(c){if(!o){for(let f=0;f<a.length;f+=1)k(u[f]);o=!0}},o(c){u=u.filter(Boolean);for(let f=0;f<u.length;f+=1)$(u[f]);o=!1},d(c){c&&O(t),St(u,c)}}}function ms(e,t,i){let n;j(e,ke,c=>i(1,n=c));let{currentValue:r="importance"}=t,{closeModal:s=()=>{}}=t;const o=ln(),a=[{value:"importance",label:n("Importance")},{value:"created-newest",label:n("Date created - Newest")},{value:"created-oldest",label:n("Date created - Oldest")},{value:"changed-newest",label:n("Date changed - Newest")},{value:"changed-oldest",label:n("Date changed - Oldest")}];function u(c){i(0,r=c),o("change",{value:c}),s()}const l=c=>u(c.value);return e.$$set=c=>{"currentValue"in c&&i(0,r=c.currentValue),"closeModal"in c&&i(4,s=c.closeModal)},[r,n,a,u,s,l]}class ps extends ne{constructor(t){super(),te(this,t,ms,hs,Z,{currentValue:0,closeModal:4},ds)}}function _s(e){re(e,"svelte-657q9o",".backdrop.svelte-657q9o{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:100}")}function vs(e){let t,i,n;return{c(){t=S("div"),y(t,"class","backdrop svelte-657q9o")},m(r,s){R(r,t,s),i||(n=le(t,"click",bt(function(){ct(e[0])&&e[0].apply(this,arguments)})),i=!0)},p(r,[s]){e=r},i:V,o:V,d(r){r&&O(t),i=!1,n()}}}function ys(e,t,i){let{onClick:n}=t;return e.$$set=r=>{"onClick"in r&&i(0,n=r.onClick)},[n]}class bs extends ne{constructor(t){super(),te(this,t,ys,vs,Z,{onClick:0},_s)}}function ks(e){re(e,"svelte-1fwehqj",".load.svelte-1fwehqj{display:block}.container.svelte-1fwehqj{width:calc(100% - 16px);flex-grow:1;flex-basis:0;padding:8px;overflow-y:scroll;overflow-x:hidden;border-spacing:4px 5px;border:none}@media screen and (min-width: 768px){.load.svelte-1fwehqj{width:100%}}")}function ws(e){let t,i,n,r,s,o;return n=new ls({}),{c(){t=S("div"),i=S("div"),H(n.$$.fragment),y(i,"class","load svelte-1fwehqj"),y(t,"class","load svelte-1fwehqj")},m(a,u){R(a,t,u),C(t,i),K(n,i,null),e[13](i),r=!0,s||(o=le(i,"click",e[14]),s=!0)},p:V,i(a){r||(k(n.$$.fragment,a),r=!0)},o(a){$(n.$$.fragment,a),r=!1},d(a){a&&O(t),J(n),e[13](null),s=!1,o()}}}function Xt(e){let t,i,n,r;return t=new ps({props:{closeModal:e[11]}}),t.$on("change",Ts),n=new bs({props:{onClick:e[11]}}),{c(){H(t.$$.fragment),i=P(),H(n.$$.fragment)},m(s,o){K(t,s,o),R(s,i,o),K(n,s,o),r=!0},p:V,i(s){r||(k(t.$$.fragment,s),k(n.$$.fragment,s),r=!0)},o(s){$(t.$$.fragment,s),$(n.$$.fragment,s),r=!1},d(s){s&&O(i),J(t,s),J(n,s)}}}function $s(e){let t,i,n,r,s,o;i=new Ai({props:{direction:e[3],data:e[0],filters:e[6]}}),i.$on("openModal",e[12]),r=new rs({props:{data:e[0],middleclickhandler:e[2],$$slots:{default:[ws]},$$scope:{ctx:e}}});let a=e[9]&&Xt(e);return{c(){t=S("div"),H(i.$$.fragment),n=P(),H(r.$$.fragment),s=P(),a&&a.c(),y(t,"class","container svelte-1fwehqj")},m(u,l){R(u,t,l),K(i,t,null),C(t,n),K(r,t,null),C(t,s),a&&a.m(t,null),e[15](t),o=!0},p(u,[l]){const c={};l&8&&(c.direction=u[3]),l&1&&(c.data=u[0]),l&64&&(c.filters=u[6]),i.$set(c);const f={};l&1&&(f.data=u[0]),l&4&&(f.middleclickhandler=u[2]),l&66706&&(f.$$scope={dirty:l,ctx:u}),r.$set(f),u[9]?a?(a.p(u,l),l&512&&k(a,1)):(a=Xt(u),a.c(),k(a,1),a.m(t,null)):a&&(ge(),$(a,1,1,()=>{a=null}),he())},i(u){o||(k(i.$$.fragment,u),k(r.$$.fragment,u),k(a),o=!0)},o(u){$(i.$$.fragment,u),$(r.$$.fragment,u),$(a),o=!1},d(u){u&&O(t),J(i),J(r),a&&a.d(),e[15](null)}}}function Ts(e){let t=e.detail.value;console.log(t)}function Cs(e,t,i){let n,r=V,s=()=>(r(),r=Oe(f,b=>i(10,n=b)),f);e.$$.on_destroy.push(()=>r());let{data:o}=t,{loadMore:a}=t,{middleclickhandler:u}=t,{direction:l}=t,{loaded:c}=t,{cursor:f}=t;s();let{filters:d}=t,g,m,_=!1;function v(){i(9,_=!_)}function N(){i(9,_=!0)}an(()=>{const b=new IntersectionObserver(z=>{z[0].isIntersecting&&a(!1)},{root:m,threshold:.5});return b.observe(g),()=>b.unobserve(g)});function x(b){qe[b?"unshift":"push"](()=>{g=b,i(7,g)})}const A=()=>a(c&&!n);function F(b){qe[b?"unshift":"push"](()=>{m=b,i(8,m)})}return e.$$set=b=>{"data"in b&&i(0,o=b.data),"loadMore"in b&&i(1,a=b.loadMore),"middleclickhandler"in b&&i(2,u=b.middleclickhandler),"direction"in b&&i(3,l=b.direction),"loaded"in b&&i(4,c=b.loaded),"cursor"in b&&s(i(5,f=b.cursor)),"filters"in b&&i(6,d=b.filters)},[o,a,u,l,c,f,d,g,m,_,n,v,N,x,A,F]}class Ls extends ne{constructor(t){super(),te(this,t,Cs,$s,Z,{data:0,loadMore:1,middleclickhandler:2,direction:3,loaded:4,cursor:5,filters:6},ks)}}var Ge=globalThis&&globalThis.__awaiter||function(e,t,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(e,t||[])).next())})};const Ss="https://localhost/api/v3".replace(/\/+$/,"");class Mt{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Ss}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||bn}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:()=>Ge(this,void 0,void 0,function*(){return t})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const Ns=new Mt;class mt{constructor(t=Ns){this.configuration=t,this.fetchApi=(i,n)=>Ge(this,void 0,void 0,function*(){let r={url:i,init:n};for(const o of this.middleware)o.pre&&(r=(yield o.pre(Object.assign({fetch:this.fetchApi},r)))||r);let s;try{s=yield(this.configuration.fetchApi||fetch)(r.url,r.init)}catch(o){for(const a of this.middleware)a.onError&&(s=(yield a.onError({fetch:this.fetchApi,url:r.url,init:r.init,error:o,response:s?s.clone():void 0}))||s);if(s===void 0)throw o instanceof Error?new As(o,"The request failed and the interceptors did not return an alternative response"):o}for(const o of this.middleware)o.post&&(s=(yield o.post({fetch:this.fetchApi,url:r.url,init:r.init,response:s.clone()}))||s);return s}),this.middleware=t.middleware}withMiddleware(...t){const i=this.clone();return i.middleware=i.middleware.concat(...t),i}withPreMiddleware(...t){const i=t.map(n=>({pre:n}));return this.withMiddleware(...i)}withPostMiddleware(...t){const i=t.map(n=>({post:n}));return this.withMiddleware(...i)}isJsonMime(t){return t?mt.jsonRegex.test(t):!1}request(t,i){return Ge(this,void 0,void 0,function*(){const{url:n,init:r}=yield this.createFetchParams(t,i),s=yield this.fetchApi(n,r);if(s&&s.status>=200&&s.status<300)return s;throw new Rs(s,"Response returned an error code")})}createFetchParams(t,i){return Ge(this,void 0,void 0,function*(){let n=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(t.query));const r=Object.assign({},this.configuration.headers,t.headers);Object.keys(r).forEach(l=>r[l]===void 0?delete r[l]:{});const s=typeof i=="function"?i:()=>Ge(this,void 0,void 0,function*(){return i}),o={method:t.method,headers:r,body:t.body,credentials:this.configuration.credentials},a=Object.assign(Object.assign({},o),yield s({init:o,context:t})),u=Object.assign(Object.assign({},a),{body:Os(a.body)||a.body instanceof URLSearchParams||Ds(a.body)?a.body:JSON.stringify(a.body)});return{url:n,init:u}})}clone(){const t=this.constructor,i=new t(this.configuration);return i.middleware=this.middleware.slice(),i}}mt.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function Ds(e){return typeof Blob<"u"&&e instanceof Blob}function Os(e){return typeof FormData<"u"&&e instanceof FormData}class Rs extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class As extends Error{constructor(t,i){super(i),this.cause=t,this.name="FetchError"}}class qt extends Error{constructor(t,i){super(i),this.field=t,this.name="RequiredError"}}function h(e,t){const i=e[t];return i!=null}function bn(e,t=""){return Object.keys(e).map(i=>kn(i,e[i],t)).filter(i=>i.length>0).join("&")}function kn(e,t,i=""){const n=i+(i.length?`[${e}]`:e);if(t instanceof Array){const r=t.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${r}`}if(t instanceof Set){const r=Array.from(t);return kn(e,r,i)}return t instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?bn(t,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(t))}`}class X{constructor(t,i=n=>n){this.raw=t,this.transformer=i}value(){return Ge(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function Fs(e){return Ms(e)}function Ms(e,t){return e==null?e:{departmentid:h(e,"departmentid")?e.departmentid:void 0,onlineStatus:h(e,"online_status")?e.online_status:void 0,presetStatus:h(e,"preset_status")?e.preset_status:void 0}}function Gs(e){return zs(e)}function zs(e,t){return e==null?e:{agentid:h(e,"agentid")?e.agentid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,username:h(e,"username")?e.username:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,roleid:h(e,"roleid")?e.roleid:void 0,departmentsStatuses:h(e,"departments_statuses")?e.departments_statuses.map(Fs):void 0,twofa:h(e,"twofa")?e.twofa:void 0,lastPswdChange:h(e,"last_pswd_change")?new Date(e.last_pswd_change):void 0,userstatus:h(e,"userstatus")?e.userstatus:void 0}}function Es(e){return Is(e)}function Is(e,t){return e==null?e:{conversationid:h(e,"conversationid")?e.conversationid:void 0,datechanged:h(e,"datechanged")?new Date(e.datechanged):void 0,status:h(e,"status")?e.status:void 0,preview:h(e,"preview")?e.preview:void 0,subject:h(e,"subject")?e.subject:void 0,departmentname:h(e,"departmentname")?e.departmentname:void 0,agentname:h(e,"agentname")?e.agentname:void 0,tags:h(e,"tags")?e.tags:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,emails:h(e,"emails")?e.emails:void 0,city:h(e,"city")?e.city:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,rstatus:h(e,"rstatus")?e.rstatus:void 0,statusdatestarted:h(e,"statusdatestarted")?new Date(e.statusdatestarted):void 0,chatOrder:h(e,"chat_order")?e.chat_order:void 0}}function xs(e){return Bs(e)}function Bs(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,name:h(e,"name")?e.name:void 0,type:h(e,"type")?e.type:void 0,onlineCode:h(e,"online_code")?e.online_code:void 0,offlineCode:h(e,"offline_code")?e.offline_code:void 0,onlineCodeCss:h(e,"online_code_css")?e.online_code_css:void 0,offlineCodeCss:h(e,"offline_code_css")?e.offline_code_css:void 0,provide:h(e,"provide")?e.provide:void 0,impressions:h(e,"impressions")?e.impressions:void 0,tickets:h(e,"tickets")?e.tickets:void 0,status:h(e,"status")?e.status:void 0,lastDisplayTime:h(e,"last_display_time")?e.last_display_time:void 0,lastDisplayUrl:h(e,"last_display_url")?e.last_display_url:void 0}}function pe(e){return Ks(e)}function Ks(e,t){return e==null?e:{count:h(e,"count")?e.count:void 0}}function Js(e){return Us(e)}function Us(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,name:h(e,"name")?e.name:void 0,agentCount:h(e,"agent_count")?e.agent_count:void 0}}function Ws(e){return Hs(e)}function Hs(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,logid:h(e,"logid")?e.logid:void 0,line:h(e,"line")?e.line:void 0,filename:h(e,"filename")?e.filename:void 0,created:h(e,"created")?e.created:void 0,level:h(e,"level")?e.level:void 0,type:h(e,"type")?e.type:void 0,message:h(e,"message")?e.message:void 0,ip:h(e,"ip")?e.ip:void 0,groupid:h(e,"groupid")?e.groupid:void 0}}function Ys(e){return Ps(e)}function Ps(e,t){return e==null?e:{agentid:h(e,"agentid")?e.agentid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,chats:h(e,"chats")?e.chats:void 0}}function Vs(e){return Qs(e)}function Qs(e,t){return e==null?e:{name:h(e,"name")?e.name:void 0,code:h(e,"code")?e.code:void 0,engName:h(e,"eng_name")?e.eng_name:void 0,translated:h(e,"translated")?e.translated:void 0,isDefault:h(e,"is_default")?e.is_default:void 0,active:h(e,"active")?e.active:void 0,isCustom:h(e,"is_custom")?e.is_custom:void 0,isBuiltIn:h(e,"is_builtIn")?e.is_builtIn:void 0}}function Zs(e){return Xs(e)}function Xs(e,t){return e==null?e:{codeName:h(e,"code_name")?e.code_name:void 0,name:h(e,"name")?e.name:void 0,description:h(e,"description")?e.description:void 0,active:h(e,"active")?e.active:void 0,help:h(e,"help")?e.help:void 0,multiple:h(e,"multiple")?e.multiple:void 0,configFile:h(e,"config_file")?e.config_file:void 0,price:h(e,"price")?e.price:void 0,legacyIntegration:h(e,"legacy_integration")?e.legacy_integration:void 0}}function vt(e){return qs(e)}function qs(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,conversationid:h(e,"conversationid")?e.conversationid:void 0,code:h(e,"code")?e.code:void 0,slaTicketId:h(e,"sla_ticket_id")?e.sla_ticket_id:void 0,departmentid:h(e,"departmentid")?e.departmentid:void 0,departmentName:h(e,"department_name")?e.department_name:void 0,levelid:h(e,"levelid")?e.levelid:void 0,slaLevelName:h(e,"sla_level_name")?e.sla_level_name:void 0,sla:h(e,"sla")?e.sla:void 0,dateCreated:h(e,"date_created")?e.date_created:void 0,dateClosed:h(e,"date_closed")?e.date_closed:void 0,dateDue:h(e,"date_due")?e.date_due:void 0,slaLevelId:h(e,"sla_level_id")?e.sla_level_id:void 0,slaType:h(e,"sla_type")?new Date(e.sla_type):void 0,agentid:h(e,"agentid")?e.agentid:void 0,agentFirstname:h(e,"agent_firstname")?e.agent_firstname:void 0,agentLastname:h(e,"agent_lastname")?e.agent_lastname:void 0,agentAvatarUrl:h(e,"agent_avatar_url")?e.agent_avatar_url:void 0,reqContactid:h(e,"req_contactid")?e.req_contactid:void 0,reqFirstname:h(e,"req_firstname")?e.req_firstname:void 0,reqLastname:h(e,"req_lastname")?e.req_lastname:void 0,reqSystemname:h(e,"req_systemname")?e.req_systemname:void 0,reqContactName:h(e,"req_contactName")?e.req_contactName:void 0,reqAvatarUrl:h(e,"req_avatar_url")?e.req_avatar_url:void 0}}function jt(e){return js(e)}function js(e,t){return e==null?e:{tagid:h(e,"tagid")?e.tagid:void 0,name:h(e,"name")?e.name:void 0,type:h(e,"type")?e.type:void 0,color:h(e,"color")?e.color:void 0,backgroundcolor:h(e,"backgroundcolor")?e.backgroundcolor:void 0,isPublic:h(e,"is_public")?e.is_public:void 0}}function wn(e){return eo(e)}function eo(e,t){return e==null?e:{conversationid:h(e,"conversationid")?e.conversationid:void 0,code:h(e,"code")?e.code:void 0,datecreated:h(e,"datecreated")?new Date(e.datecreated):void 0,datechanged:h(e,"datechanged")?new Date(e.datechanged):void 0,dateresolved:h(e,"dateresolved")?new Date(e.dateresolved):void 0,statuschanged:h(e,"statuschanged")?new Date(e.statuschanged):void 0,rorder:h(e,"rorder")?e.rorder:void 0,datedue:h(e,"datedue")?new Date(e.datedue):void 0,datereopen:h(e,"datereopen")?new Date(e.datereopen):void 0,status:h(e,"status")?e.status:void 0,channelType:h(e,"channel_type")?e.channel_type:void 0,departmentid:h(e,"departmentid")?e.departmentid:void 0,agentid:h(e,"agentid")?e.agentid:void 0,preview:h(e,"preview")?e.preview:void 0,subject:h(e,"subject")?e.subject:void 0,departmentname:h(e,"departmentname")?e.departmentname:void 0,agentname:h(e,"agentname")?e.agentname:void 0,tags:h(e,"tags")?e.tags:void 0,messagegroupsIn:h(e,"messagegroups_in")?e.messagegroups_in:void 0,messagegroupsOut:h(e,"messagegroups_out")?e.messagegroups_out:void 0,contactid:h(e,"contactid")?e.contactid:void 0,parentContactid:h(e,"parent_contactid")?e.parent_contactid:void 0,firstname:h(e,"firstname")?e.firstname:void 0,lastname:h(e,"lastname")?e.lastname:void 0,systemName:h(e,"system_name")?e.system_name:void 0,emails:h(e,"emails")?e.emails:void 0,phones:h(e,"phones")?e.phones:void 0,jobPosition:h(e,"job_position")?e.job_position:void 0,contactType:h(e,"contact_type")?e.contact_type:void 0,city:h(e,"city")?e.city:void 0,countrycode:h(e,"countrycode")?e.countrycode:void 0,timeOffset:h(e,"time_offset")?e.time_offset:void 0,gender:h(e,"gender")?e.gender:void 0,levelid:h(e,"levelid")?e.levelid:void 0,groups:h(e,"groups")?e.groups:void 0,contactStatus:h(e,"contact_status")?e.contact_status:void 0,company:h(e,"company")?e.company:void 0,avatarUrl:h(e,"avatar_url")?e.avatar_url:void 0,userid:h(e,"userid")?e.userid:void 0,roleid:h(e,"roleid")?e.roleid:void 0,userstatus:h(e,"userstatus")?e.userstatus:void 0,accountuserstatus:h(e,"accountuserstatus")?e.accountuserstatus:void 0,description:h(e,"description")?e.description:void 0,note:h(e,"note")?e.note:void 0,lastActivity:h(e,"last_activity")?new Date(e.last_activity):void 0,tagnames:h(e,"tagnames")?e.tagnames:void 0,groupnames:h(e,"groupnames")?e.groupnames:void 0}}function to(e){return no(e)}function no(e,t){return e==null?e:{cursor:h(e,"cursor")?e.cursor:void 0,rows:h(e,"rows")?e.rows.map(wn):void 0}}function io(e){return ro(e)}function ro(e,t){return e==null?e:{id:h(e,"id")?e.id:void 0,agentid:h(e,"agentid")?e.agentid:void 0,agent:h(e,"agent")?e.agent:void 0,conversationid:h(e,"conversationid")?e.conversationid:void 0,ticket:h(e,"ticket")?e.ticket:void 0,parentContactid:h(e,"parent_contactid")?e.parent_contactid:void 0,company:h(e,"company")?e.company:void 0,contactid:h(e,"contactid")?e.contactid:void 0,customer:h(e,"customer")?e.customer:void 0,customerFirstname:h(e,"customer_firstname")?e.customer_firstname:void 0,customerLastname:h(e,"customer_lastname")?e.customer_lastname:void 0,customerSystemname:h(e,"customer_systemname")?e.customer_systemname:void 0,agentTicket:h(e,"agent_ticket")?e.agent_ticket:void 0,reportdate:h(e,"reportdate")?e.reportdate:void 0,reportedtime:h(e,"reportedtime")?e.reportedtime:void 0,reportedtimeHhmmss:h(e,"reportedtime_hhmmss")?e.reportedtime_hhmmss:void 0,spenttime:h(e,"spenttime")?e.spenttime:void 0,dateinvoiced:h(e,"dateinvoiced")?e.dateinvoiced:void 0,note:h(e,"note")?e.note:void 0,type:h(e,"type")?e.type:void 0}}var G=globalThis&&globalThis.__awaiter||function(e,t,i,n){function r(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(c){try{l(n.next(c))}catch(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((n=n.apply(e,t||[])).next())})};class $n extends mt{getAgentsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(Gs))})}getAgentsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(t,i)).value()})}getAgentsGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["agent.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/agents/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getAgentsGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(t,i)).value()})}getCallsSlaLogGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(vt))})}getCallsSlaLogGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(t,i)).value()})}getCallsSlaLogGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/calls/sla/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getCallsSlaLogGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(t,i)).value()})}getChatsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(Es))})}getChatsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(t,i)).value()})}getChatsGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getChatsGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(t,i)).value()})}getChatsSlaLogGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(vt))})}getChatsSlaLogGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(t,i)).value()})}getChatsSlaLogGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/chats/sla/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getChatsSlaLogGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(t,i)).value()})}getContactWidgetsCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getContactWidgetsCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(t,i)).value()})}getContactWidgetsListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["button.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/contact-widgets",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(xs))})}getContactWidgetsList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(t,i)).value()})}getCustomerGroupsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/customer_groups",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(jt))})}getCustomerGroupsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(t,i)).value()})}getDepartmensGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getDepartmensGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(t,i)).value()})}getDepartmentsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/departments",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(Js))})}getDepartmentsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(t,i)).value()})}getEventLogsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(Ws))})}getEventLogsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(t,i)).value()})}getEventLogsGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["eventlogs.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/eventlogs/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getEventLogsGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(t,i)).value()})}getInviteAgentsGridListRaw(t,i){return G(this,void 0,void 0,function*(){if(t.departmentId===null||t.departmentId===void 0)throw new qt("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["user.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/{departmentId}/invite/agents".replace("{departmentId}",encodeURIComponent(String(t.departmentId))),method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(Ys))})}getInviteAgentsGridList(t,i){return G(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(t,i)).value()})}getLanguagesGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(Vs))})}getLanguagesGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(t,i)).value()})}getLanguagesGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/languages/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getLanguagesGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(t,i)).value()})}getPlugindGridListRaw(t,i){return G(this,void 0,void 0,function*(){if(t.pluginPurpose===null||t.pluginPurpose===void 0)throw new qt("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.pluginPurpose!==void 0&&(n.pluginPurpose=t.pluginPurpose);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["plugin_settings.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/plugins",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(Zs))})}getPlugindGridList(t,i){return G(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(t,i)).value()})}getTagsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["tag.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tags",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(jt))})}getTagsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(t,i)).value()})}getTicketsGridDatasetRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets_new",method:"GET",headers:r,query:n},i);return new X(s,o=>to(o))})}getTicketsGridDataset(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(t,i)).value()})}getTicketsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(wn))})}getTicketsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(t,i)).value()})}getTicketsGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["ticket.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getTicketsGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(t,i)).value()})}getTicketsSlaLogGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor),t.sortField!==void 0&&(n._sortField=t.sortField);const r={};t.timezoneOffset!==void 0&&t.timezoneOffset!==null&&(r["Timezone-Offset"]=String(t.timezoneOffset)),this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(vt))})}getTicketsSlaLogGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(t,i)).value()})}getTicketsSlaLogGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["sla.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/tickets/sla/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getTicketsSlaLogGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(t,i)).value()})}getTimeReportsGridListRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.perPage!==void 0&&(n._perPage=t.perPage),t.sortDir!==void 0&&(n._sortDir=t.sortDir),t.sortField!==void 0&&(n._sortField=t.sortField),t.filters!==void 0&&(n._filters=t.filters),t.cursor!==void 0&&(n._cursor=t.cursor);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time",method:"GET",headers:r,query:n},i);return new X(s,o=>o.map(io))})}getTimeReportsGridList(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(t,i)).value()})}getTimeReportsGridListCountRaw(t,i){return G(this,void 0,void 0,function*(){const n={};t.filters!==void 0&&(n._filters=t.filters);const r={};this.configuration&&this.configuration.accessToken&&(r.Authorization=yield this.configuration.accessToken("privileges",["time_report.read"])),this.configuration&&this.configuration.apiKey&&(r.apikey=this.configuration.apiKey("apikey"));const s=yield this.request({path:"/grid/reports/time/count",method:"GET",headers:r,query:n},i);return new X(s,o=>pe(o))})}getTimeReportsGridListCount(t={},i){return G(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(t,i)).value()})}}const en={Asc:"ASC",Desc:"DESC"},so={Conversationid:"conversationid",Code:"code",Datecreated:"datecreated",Datechanged:"datechanged",Dateresolved:"dateresolved",Statuschanged:"statuschanged",Rorder:"rorder",Datedue:"datedue",Datereopen:"datereopen",Status:"status",ChannelType:"channel_type",Departmentid:"departmentid",Agentid:"agentid",Subject:"subject",Departmentname:"departmentname",Agentname:"agentname",Tags:"tags",MessagegroupsIn:"messagegroups_in",MessagegroupsOut:"messagegroups_out",Rstatus:"rstatus",LastActivity:"last_activity"};class oo{constructor(t,i){const n=new Mt({apiKey:t,basePath:i+"/api/v3"});this.api=new $n(n),this.tags=ce({})}async load(){let t=await this.api.getTagsGridList();t=t.reduce((i,n)=>(i[n.tagid]=n,i),{}),this.tags.set(t)}}function ao(e){re(e,"svelte-19qi61t",".NoTickets.svelte-19qi61t{width:100%;height:100%;display:flex;flex-direction:column;align-items:center}p.svelte-19qi61t{max-width:450px;font-size:13px;font-weight:400;text-align:center}h1.svelte-19qi61t{font-size:20px;font-weight:600;margin:50px auto 0 auto}img.svelte-19qi61t{max-width:300px}")}function lo(e){let t,i,n=e[0]("Change filter")+"",r,s;return t=new ye({props:{className:"FilterIcon",iconLaClassName:"la-tune"}}),{c(){H(t.$$.fragment),i=P(),r=ee(n)},m(o,a){K(t,o,a),R(o,i,a),R(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Change filter")+"")&&ie(r,n)},i(o){s||(k(t.$$.fragment,o),s=!0)},o(o){$(t.$$.fragment,o),s=!1},d(o){o&&(O(i),O(r)),J(t,o)}}}function uo(e){let t,i,n=e[0]("Configure chat button")+"",r,s;return t=new ye({props:{className:"ConfigureIcon",iconLaClassName:"la-configuration"}}),{c(){H(t.$$.fragment),i=P(),r=ee(n)},m(o,a){K(t,o,a),R(o,i,a),R(o,r,a),s=!0},p(o,a){(!s||a&1)&&n!==(n=o[0]("Configure chat button")+"")&&ie(r,n)},i(o){s||(k(t.$$.fragment,o),s=!0)},o(o){$(t.$$.fragment,o),s=!1},d(o){o&&(O(i),O(r)),J(t,o)}}}function co(e){let t,i,n,r,s,o=e[0]("No tickets found")+"",a,u,l,c=e[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"",f,d,g,m,_,v,N;return m=new Lt({props:{className:"Filter",$$slots:{default:[lo]},$$scope:{ctx:e}}}),v=new Lt({props:{className:"Configure",$$slots:{default:[uo]},$$scope:{ctx:e}}}),{c(){t=S("div"),i=S("img"),r=P(),s=S("h1"),a=ee(o),u=P(),l=S("p"),f=ee(c),d=P(),g=S("div"),H(m.$$.fragment),_=P(),H(v.$$.fragment),y(i,"alt","No results placeholder"),yt(i.src,n="https://support.qualityunit.com/themes/agent/obsidian/img/no-result.svg")||y(i,"src",n),y(i,"class","svelte-19qi61t"),y(s,"class","svelte-19qi61t"),y(l,"class","svelte-19qi61t"),y(g,"class","Buttons"),y(t,"class","NoTickets svelte-19qi61t")},m(x,A){R(x,t,A),C(t,i),C(t,r),C(t,s),C(s,a),C(t,u),C(t,l),C(l,f),C(t,d),C(t,g),K(m,g,null),C(g,_),K(v,g,null),N=!0},p(x,[A]){(!N||A&1)&&o!==(o=x[0]("No tickets found")+"")&&ie(a,o),(!N||A&1)&&c!==(c=x[0]("There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.")+"")&&ie(f,c);const F={};A&3&&(F.$$scope={dirty:A,ctx:x}),m.$set(F);const b={};A&3&&(b.$$scope={dirty:A,ctx:x}),v.$set(b)},i(x){N||(k(m.$$.fragment,x),k(v.$$.fragment,x),N=!0)},o(x){$(m.$$.fragment,x),$(v.$$.fragment,x),N=!1},d(x){x&&O(t),J(m),J(v)}}}function fo(e,t,i){let n;return j(e,ke,r=>i(0,n=r)),[n]}class go extends ne{constructor(t){super(),te(this,t,fo,co,Z,{},ao)}}function ho(e){re(e,"svelte-14f2ism","main.svelte-14f2ism{height:100%;display:flex;flex-direction:column}")}function mo(e){let t,i;return t=new Ls({props:{direction:e[9],data:e[7],loaded:e[3],loadMore:e[2],cursor:e[11],middleclickhandler:e[1],filters:e[0]}}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p(n,r){const s={};r&8&&(s.loaded=n[3]),r&4&&(s.loadMore=n[2]),r&2&&(s.middleclickhandler=n[1]),r&1&&(s.filters=n[0]),t.$set(s)},i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function po(e){let t,i;return t=new go({}),{c(){H(t.$$.fragment)},m(n,r){K(t,n,r),i=!0},p:V,i(n){i||(k(t.$$.fragment,n),i=!0)},o(n){$(t.$$.fragment,n),i=!1},d(n){J(t,n)}}}function _o(e){let t,i,n,r;const s=[po,mo],o=[];function a(u,l){return!u[5].length&&!u[4]?0:1}return i=a(e),n=o[i]=s[i](e),{c(){t=S("main"),n.c(),y(t,"class","svelte-14f2ism")},m(u,l){R(u,t,l),o[i].m(t,null),r=!0},p(u,[l]){let c=i;i=a(u),i===c?o[i].p(u,l):(ge(),$(o[c],1,1,()=>{o[c]=null}),he(),n=o[i],n?n.p(u,l):(n=o[i]=s[i](u),n.c()),k(n,1),n.m(t,null))},i(u){r||(k(n),r=!0)},o(u){$(n),r=!1},d(u){u&&O(t),o[i].d()}}}function vo(e,t,i){let n,r,s,o,a,u,l,c;j(e,Ye,T=>i(14,n=T)),j(e,Ze,T=>i(15,r=T));let{apikey:f}=t,{filters:d}=t,{middleclickhandler:g}=t,{basePath:m}=t,_=new oo(f,m);_.load(),Se("tagsMap",_.tags);let v=ce(null);j(e,v,T=>i(16,o=T)),Se("error",v);const N=new Mt({apiKey:f,basePath:m+"/api/v3"}),x=new $n(N);Se("api",x);const A=ce([]);j(e,A,T=>i(5,u=T)),Se("data",A);const F=ce(so.Rorder);j(e,F,T=>i(18,l=T));const b=ce(!0);j(e,b,T=>i(19,c=T));const z=ce(!1);j(e,z,T=>i(4,s=T)),Se("loading",z);const U=ce(null);j(e,U,T=>i(17,a=T)),Se("cursor",U);let M=!1,B=()=>({perPage:20,sortDir:c?en.Asc:en.Desc,filters:d,sortField:l,cursor:a||""}),{loadMore:I=async(T=!1)=>{if(!s&&(T===!0&&(_e(U,a=null,a),i(3,M=!1)),!(!a&&M))){_e(z,s=!0,s);try{const Q=await x.getTicketsGridDatasetRaw(B());console.log("Loaded tickets response: ",Q);const me=await Q.value();T===!0&&_e(A,u=[],u),_e(A,u=u.concat(me.rows),u),_e(U,a=me.cursor,a),console.log("Loaded tickets value: ",me),console.log("Loaded tickets: ",me.rows.length,"cursor: ",me.cursor),i(3,M=!0)}catch(Q){console.error("Loading tickets failed: ",Q),_e(v,o=Q.toString(),o)}_e(z,s=!1,s)}}}=t;return b.subscribe(async()=>{await I(!0)}),F.subscribe(async()=>{await I(!0)}),A.subscribe(T=>{Ye.set([]),r===!0?_e(Ye,n=T.filter(Q=>!Q.__selected).map(Q=>Q.conversationid),n):_e(Ye,n=T.filter(Q=>Q.__selected??!1).map(Q=>Q.conversationid),n)}),Se("loadMoreFunction",I),e.$$set=T=>{"apikey"in T&&i(12,f=T.apikey),"filters"in T&&i(0,d=T.filters),"middleclickhandler"in T&&i(1,g=T.middleclickhandler),"basePath"in T&&i(13,m=T.basePath),"loadMore"in T&&i(2,I=T.loadMore)},e.$$.update=()=>{e.$$.dirty&5&&d&&I(!0)},[d,g,I,M,s,u,v,A,F,b,z,U,f,m]}class yo extends ne{constructor(t){super(),te(this,t,vo,_o,Z,{apikey:12,filters:0,middleclickhandler:1,basePath:13,loadMore:2},ho)}}const bo="modulepreload",ko=function(e){return"/"+e},tn={},nn=function(t,i,n){if(!i||i.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=ko(s),s in tn)return;tn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const f=r[c];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":bo,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function wo(){Jt("en",()=>nn(()=>import("./en.js"),[])),Jt("sk",()=>nn(()=>import("./sk.js"),[]))}function rn(e){let t,i,n;function r(o){e[9](o)}let s={apikey:e[0],basePath:e[3],filters:e[1],middleclickhandler:e[2],$$slots:{default:[$o]},$$scope:{ctx:e}};return e[4]!==void 0&&(s.loadMore=e[4]),t=new yo({props:s}),qe.push(()=>Un(t,"loadMore",r)),{c(){H(t.$$.fragment)},m(o,a){K(t,o,a),n=!0},p(o,a){const u={};a&1&&(u.apikey=o[0]),a&8&&(u.basePath=o[3]),a&2&&(u.filters=o[1]),a&4&&(u.middleclickhandler=o[2]),a&1024&&(u.$$scope={dirty:a,ctx:o}),!i&&a&16&&(i=!0,u.loadMore=o[4],xn(()=>i=!1)),t.$set(u)},i(o){n||(k(t.$$.fragment,o),n=!0)},o(o){$(t.$$.fragment,o),n=!1},d(o){J(t,o)}}}function $o(e){let t;const i=e[8].default,n=Ie(i,e,e[10],null);return{c(){n&&n.c()},m(r,s){n&&n.m(r,s),t=!0},p(r,s){n&&n.p&&(!t||s&1024)&&Be(n,i,r,r[10],t?xe(i,r[10],s,null):Ke(r[10]),null)},i(r){t||(k(n,r),t=!0)},o(r){$(n,r),t=!1},d(r){n&&n.d(r)}}}function To(e){let t,i,n,r,s=e[0]&&rn(e);return{c(){s&&s.c(),t=P(),i=S("link"),y(i,"rel","stylesheet"),y(i,"href",n=e[3]+"/themes/agent/_common_templates/icons_mapping.css")},m(o,a){s&&s.m(o,a),R(o,t,a),R(o,i,a),r=!0},p(o,[a]){o[0]?s?(s.p(o,a),a&1&&k(s,1)):(s=rn(o),s.c(),k(s,1),s.m(t.parentNode,t)):s&&(ge(),$(s,1,1,()=>{s=null}),he()),(!r||a&8&&n!==(n=o[3]+"/themes/agent/_common_templates/icons_mapping.css"))&&y(i,"href",n)},i(o){r||(k(s),r=!0)},o(o){$(s),r=!1},d(o){o&&(O(t),O(i)),s&&s.d(o)}}}function Co(e,t,i){let{$$slots:n={},$$scope:r}=t;wo();let{lang:s="sk"}=t,{apikey:o}=t,{filters:a='[["rstatus","IN","A,P,T,N,C,R,W"],["channel_type","IN","B,M,E,F,A,I,Q,S,C,W,T,V"]]'}=t,{middleclickhandler:u}=t,{selectionhandler:l}=t,{basepath:c}=t,f;const d=function(m=!1){f&&f(m)};ui({initialLocale:s,fallbackLocale:"en"}),gi();function g(m){f=m,i(4,f)}return e.$$set=m=>{"lang"in m&&i(5,s=m.lang),"apikey"in m&&i(0,o=m.apikey),"filters"in m&&i(1,a=m.filters),"middleclickhandler"in m&&i(2,u=m.middleclickhandler),"selectionhandler"in m&&i(6,l=m.selectionhandler),"basepath"in m&&i(3,c=m.basepath),"$$scope"in m&&i(10,r=m.$$scope)},[o,a,u,c,f,s,l,d,n,g,r]}class Lo extends ne{constructor(t){super(),te(this,t,Co,To,Z,{lang:5,apikey:0,filters:1,middleclickhandler:2,selectionhandler:6,basepath:3,reload:7})}get lang(){return this.$$.ctx[5]}set lang(t){this.$$set({lang:t}),$e()}get apikey(){return this.$$.ctx[0]}set apikey(t){this.$$set({apikey:t}),$e()}get filters(){return this.$$.ctx[1]}set filters(t){this.$$set({filters:t}),$e()}get middleclickhandler(){return this.$$.ctx[2]}set middleclickhandler(t){this.$$set({middleclickhandler:t}),$e()}get selectionhandler(){return this.$$.ctx[6]}set selectionhandler(t){this.$$set({selectionhandler:t}),$e()}get basepath(){return this.$$.ctx[3]}set basepath(t){this.$$set({basepath:t}),$e()}get reload(){return this.$$.ctx[7]}}customElements.define("tickets-table",Hn(Lo,{lang:{},apikey:{},filters:{},middleclickhandler:{},selectionhandler:{},basepath:{}},["default"],["reload"],!0));
|