@qualityunit/liveagent-ticket-grid 0.0.66 → 0.0.68

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/en.js CHANGED
@@ -1 +1 @@
1
- const e="",t="",o="",n="",a="",s="",l="",r="",c="",d="",i="",p="",g="",u="",w="",C={Created:e,Changed:t,"No text for preview":"","No name":"","No email":"","No Company":"","No tickets found":"","There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.":"","Change filter":"","Configure chat button":"",Reload:o,"First answer":"","No SLA":"",Answered:n,Chatting:a,Calling:s,Deleted:l,Spam:r,Init:c,Resolved:d,New:i,Open:p,Postponed:g,"Invalid data":"","all rows selected except %pCount rows":"all rows selected except {pCount, plural, one {1 row} other {# rows}}","all rows selected":"","%pCount rows selected":"{pCount, plural, one {1 row} other {# rows}} selected","Loading...":"","Displaying %count of":"Displaying {count} of","Loading..":"",many:u,"Displaying %count of %allCount":"Displaying {count} of {allCount}","Loading failed. Please try again later.":"","No results match your filter. Try broadening the search criteria.":"","All data loaded":"","Load more data":"",Importance:w,"Date created - Newest":"","Date created - Oldest":"","Date changed - Newest":"","Date changed - Oldest":"","Sort by":""};export{n as Answered,s as Calling,t as Changed,a as Chatting,e as Created,l as Deleted,w as Importance,c as Init,i as New,p as Open,g as Postponed,o as Reload,d as Resolved,r as Spam,C as default,u as many};
1
+ const e="Created",t="Changed",a="Reload",o="Answered",n="Chatting",s="Calling",r="Deleted",l="Spam",d="Init",c="Resolved",i="New",g="Open",p="Postponed",h="many",w="Importance",u={Created:e,Changed:t,"No text for preview":"No text for preview","No name":"No name","No email":"No email","No Company":"No Company","No tickets found":"No tickets found","There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.":"There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.","Change filter":"Change filter","Configure chat button":"Configure chat button",Reload:a,"First answer":"First answer","No SLA":"No SLA",Answered:o,Chatting:n,Calling:s,Deleted:r,Spam:l,Init:d,Resolved:c,New:i,Open:g,Postponed:p,"Invalid data":"Invalid data","all rows selected except %pCount rows":"all rows selected except {pCount, plural, one {1 row} other {# rows}}","all rows selected":"all rows selected","%pCount rows selected":"{pCount, plural, one {1 row} other {# rows}} selected","Loading...":"Loading...","Displaying %count of":"Displaying {count} of",many:h,"Displaying %count of %allCount":"Displaying {count} of {allCount}","Loading failed. Please try again later.":"Loading failed. Please try again later.","No results match your filter. Try broadening the search criteria.":"No results match your filter. Try broadening the search criteria.","All data loaded":"All data loaded","Load more data":"Load more data",Importance:w,"Date created - Newest":"Date created - Newest","Date created - Oldest":"Date created - Oldest","Date changed - Newest":"Date changed - Newest","Date changed - Oldest":"Date changed - Oldest","Sort by":"Sort by"};export{o as Answered,s as Calling,t as Changed,n as Chatting,e as Created,r as Deleted,w as Importance,d as Init,i as New,g as Open,p as Postponed,a as Reload,c as Resolved,l as Spam,u as default,h as many};
@@ -2,7 +2,7 @@ var sr=Object.defineProperty;var or=(e,t,n)=>t in e?sr(e,t,{enumerable:!0,config
2
2
  Try polyfilling it using "@formatjs/intl-pluralrules"
3
3
  `,Qe.MISSING_INTL_API,o);var L=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));C=c.options[L]||c.options.other}if(!C)throw new zn(c.value,d,Object.keys(c.options),o);a.push.apply(a,Ht(C.value,t,n,i,r,d-(c.offset||0)));continue}}return Os(a)}function Rs(e,t){return t?Q(Q(Q({},e||{}),t||{}),Object.keys(e).reduce(function(n,i){return n[i]=Q(Q({},e[i]),t[i]||{}),n},{})):e}function Ds(e,t){return t?Object.keys(e).reduce(function(n,i){return n[i]=Rs(e[i],t[i]),n},Q({},e)):e}function tn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Is(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:jt(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.NumberFormat).bind.apply(t,Qt([void 0],n,!1)))},{cache:tn(e.number),strategy:en.variadic}),getDateTimeFormat:jt(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.DateTimeFormat).bind.apply(t,Qt([void 0],n,!1)))},{cache:tn(e.dateTime),strategy:en.variadic}),getPluralRules:jt(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.PluralRules).bind.apply(t,Qt([void 0],n,!1)))},{cache:tn(e.pluralRules),strategy:en.variadic})}}var Bi=function(){function e(t,n,i,r){var s=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=s.formatToParts(u);if(l.length===1)return l[0].value;var c=l.reduce(function(f,d){return!f.length||d.type!==me.literal||typeof f[f.length-1]!="string"?f.push(d.value):f[f.length-1]+=d.value,f},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(u){return Ht(s.ast,s.locales,s.formatters,s.formats,u,void 0,s.message)},this.resolvedOptions=function(){var u;return{locale:((u=s.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var o=r||{};o.formatters;var a=Kr(o,["formatters"]);this.ast=e.__parse(t,Q(Q({},a),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ds(e.formats,i),this.formatters=r&&r.formatters||Is(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=xs,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},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"}}},e}();function Ms(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let i=e;for(let r=0;r<n.length;r++)if(typeof i=="object"){if(r>0){const s=n.slice(r,n.length).join(".");if(s in i){i=i[s];break}}i=i[n[r]]}else i=void 0;return i}const Re={},Bs=(e,t,n)=>n&&(t in Re||(Re[t]={}),e in Re[t]||(Re[t][e]=n),n),Fi=(e,t)=>{if(t==null)return;if(t in Re&&e in Re[t])return Re[t][e];const n=kt(t);for(let i=0;i<n.length;i++){const r=n[i],s=$s(r,e);if(s)return Bs(e,t,s)}};let xn;const tt=he({});function Fs(e){return xn[e]||null}function Tn(e){return e in xn}function $s(e,t){if(!Tn(e))return null;const n=Fs(e);return Ms(n,t)}function Ps(e){if(e==null)return;const t=kt(e);for(let n=0;n<t.length;n++){const i=t[n];if(Tn(i))return i}}function Gs(e,...t){delete Re[e],tt.update(n=>(n[e]=Wr.all([n[e]||{},...t]),n))}et([tt],([e])=>Object.keys(e));tt.subscribe(e=>xn=e);const ft={};function Us(e){ft[e]=new Set}function zs(e,t){ft[e].delete(t),ft[e].size===0&&delete ft[e]}function dt(e){return ft[e]}function Vs(e){return kt(e).map(t=>{const n=dt(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function It(e){return e==null?!1:kt(e).some(t=>{var n;return(n=dt(t))==null?void 0:n.size})}function Ws(e,t){return Promise.all(t.map(i=>(zs(e,i),i().then(r=>r.default||r)))).then(i=>Gs(e,...i))}const ot={};function $i(e){if(!It(e))return e in ot?ot[e]:Promise.resolve();const t=Vs(e);return ot[e]=Promise.all(t.map(([n,i])=>Ws(n,i))).then(()=>{if(It(e))return $i(e);delete ot[e]}),ot[e]}function Vn(e,t){dt(e)||Us(e);const n=dt(e);dt(e).has(t)||(Tn(e)||tt.update(i=>(i[e]={},i)),n.add(t))}var Wn=Object.getOwnPropertySymbols,Ks=Object.prototype.hasOwnProperty,Xs=Object.prototype.propertyIsEnumerable,Js=(e,t)=>{var n={};for(var i in e)Ks.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Wn)for(var i of Wn(e))t.indexOf(i)<0&&Xs.call(e,i)&&(n[i]=e[i]);return n};const Zs={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"}}};function Ys({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${kt(e).join('", "')}".${It(De())?`
4
4
 
5
- Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const Qs={fallbackLocale:null,loadingDelay:200,formats:Zs,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},lt=Qs;function qe(){return lt}function qs(e){const t=e,{formats:n}=t,i=Js(t,["formats"]);let r=e.fallbackLocale;if(e.initialLocale)try{Bi.resolveLocale(e.initialLocale)&&(r=e.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${e.initialLocale}" is not a valid locale.`)}return i.warnOnMissingMessages&&(delete i.warnOnMissingMessages,i.handleMissingMessage==null?i.handleMissingMessage=Ys:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(lt,i,{initialLocale:r}),n&&("number"in n&&Object.assign(lt.formats.number,n.number),"date"in n&&Object.assign(lt.formats.date,n.date),"time"in n&&Object.assign(lt.formats.time,n.time)),nt.set(r)}const Rt=he(!1);var js=Object.defineProperty,eo=Object.defineProperties,to=Object.getOwnPropertyDescriptors,Kn=Object.getOwnPropertySymbols,no=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable,Xn=(e,t,n)=>t in e?js(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ro=(e,t)=>{for(var n in t||(t={}))no.call(t,n)&&Xn(e,n,t[n]);if(Kn)for(var n of Kn(t))io.call(t,n)&&Xn(e,n,t[n]);return e},so=(e,t)=>eo(e,to(t));let mn;const Mt=he(null);function Jn(e){return e.split("-").map((t,n,i)=>i.slice(0,n+1).join("-")).reverse()}function kt(e,t=qe().fallbackLocale){const n=Jn(e);return t?[...new Set([...n,...Jn(t)])]:n}function De(){return mn??void 0}Mt.subscribe(e=>{mn=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const oo=e=>{if(e&&Ps(e)&&It(e)){const{loadingDelay:t}=qe();let n;return typeof window<"u"&&De()!=null&&t?n=window.setTimeout(()=>Rt.set(!0),t):Rt.set(!0),$i(e).then(()=>{Mt.set(e)}).finally(()=>{clearTimeout(n),Rt.set(!1)})}return Mt.set(e)},nt=so(ro({},Mt),{set:oo}),Vt=e=>{const t=Object.create(null);return i=>{const r=JSON.stringify(i);return r in t?t[r]:t[r]=e(i)}};var ao=Object.defineProperty,Bt=Object.getOwnPropertySymbols,Pi=Object.prototype.hasOwnProperty,Gi=Object.prototype.propertyIsEnumerable,Zn=(e,t,n)=>t in e?ao(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kn=(e,t)=>{for(var n in t||(t={}))Pi.call(t,n)&&Zn(e,n,t[n]);if(Bt)for(var n of Bt(t))Gi.call(t,n)&&Zn(e,n,t[n]);return e},it=(e,t)=>{var n={};for(var i in e)Pi.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Bt)for(var i of Bt(e))t.indexOf(i)<0&&Gi.call(e,i)&&(n[i]=e[i]);return n};const vt=(e,t)=>{const{formats:n}=qe();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},lo=Vt(e=>{var t=e,{locale:n,format:i}=t,r=it(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return i&&(r=vt("number",i)),new Intl.NumberFormat(n,r)}),uo=Vt(e=>{var t=e,{locale:n,format:i}=t,r=it(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return i?r=vt("date",i):Object.keys(r).length===0&&(r=vt("date","short")),new Intl.DateTimeFormat(n,r)}),co=Vt(e=>{var t=e,{locale:n,format:i}=t,r=it(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return i?r=vt("time",i):Object.keys(r).length===0&&(r=vt("time","short")),new Intl.DateTimeFormat(n,r)}),fo=(e={})=>{var t=e,{locale:n=De()}=t,i=it(t,["locale"]);return lo(kn({locale:n},i))},ho=(e={})=>{var t=e,{locale:n=De()}=t,i=it(t,["locale"]);return uo(kn({locale:n},i))},go=(e={})=>{var t=e,{locale:n=De()}=t,i=it(t,["locale"]);return co(kn({locale:n},i))},mo=Vt((e,t=De())=>new Bi(e,t,qe().formats,{ignoreTag:qe().ignoreTag})),po=(e,t={})=>{var n,i,r,s;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:a,locale:u=De(),default:l}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=Fi(e,u);if(!c)c=(s=(r=(i=(n=qe()).handleMissingMessage)==null?void 0:i.call(n,{locale:u,id:e,defaultValue:l}))!=null?r:l)!=null?s:e;else if(typeof c!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c;if(!a)return c;let f=c;try{f=mo(c,u).format(a)}catch(d){d instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,d.message)}return f},vo=(e,t)=>go(t).format(e),_o=(e,t)=>ho(t).format(e),yo=(e,t)=>fo(t).format(e),bo=(e,t=De())=>Fi(e,t),we=et([nt,tt],()=>po);et([nt],()=>vo);et([nt],()=>_o);et([nt],()=>yo);et([nt,tt],()=>bo);var Ue=globalThis&&globalThis.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((i=i.apply(e,t||[])).next())})};const wo="https://localhost/api/v3".replace(/\/+$/,"");class En{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:wo}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||Ui}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:()=>Ue(this,void 0,void 0,function*(){return t})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const xo=new En;class Wt{constructor(t=xo){this.configuration=t,this.fetchApi=(n,i)=>Ue(this,void 0,void 0,function*(){let r={url:n,init:i};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 Co(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 n=this.clone();return n.middleware=n.middleware.concat(...t),n}withPreMiddleware(...t){const n=t.map(i=>({pre:i}));return this.withMiddleware(...n)}withPostMiddleware(...t){const n=t.map(i=>({post:i}));return this.withMiddleware(...n)}isJsonMime(t){return t?Wt.jsonRegex.test(t):!1}request(t,n){return Ue(this,void 0,void 0,function*(){const{url:i,init:r}=yield this.createFetchParams(t,n),s=yield this.fetchApi(i,r);if(s&&s.status>=200&&s.status<300)return s;throw new Eo(s,"Response returned an error code")})}createFetchParams(t,n){return Ue(this,void 0,void 0,function*(){let i=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(i+="?"+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 n=="function"?n:()=>Ue(this,void 0,void 0,function*(){return n}),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:ko(a.body)||a.body instanceof URLSearchParams||To(a.body)?a.body:JSON.stringify(a.body)});return{url:i,init:u}})}clone(){const t=this.constructor,n=new t(this.configuration);return n.middleware=this.middleware.slice(),n}}Wt.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function To(e){return typeof Blob<"u"&&e instanceof Blob}function ko(e){return typeof FormData<"u"&&e instanceof FormData}class Eo extends Error{constructor(t,n){super(n),this.response=t,this.name="ResponseError"}}class Co extends Error{constructor(t,n){super(n),this.cause=t,this.name="FetchError"}}class Yn extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}function g(e,t){const n=e[t];return n!=null}function Ui(e,t=""){return Object.keys(e).map(n=>zi(n,e[n],t)).filter(n=>n.length>0).join("&")}function zi(e,t,n=""){const i=n+(n.length?`[${e}]`:e);if(t instanceof Array){const r=t.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(i)}=`);return`${encodeURIComponent(i)}=${r}`}if(t instanceof Set){const r=Array.from(t);return zi(e,r,n)}return t instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?Ui(t,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(t))}`}class re{constructor(t,n=i=>i){this.raw=t,this.transformer=n}value(){return Ue(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function So(e){return No(e)}function No(e,t){return e==null?e:{departmentid:g(e,"departmentid")?e.departmentid:void 0,onlineStatus:g(e,"online_status")?e.online_status:void 0,presetStatus:g(e,"preset_status")?e.preset_status:void 0}}function Lo(e){return Ao(e)}function Ao(e,t){return e==null?e:{agentid:g(e,"agentid")?e.agentid:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,username:g(e,"username")?e.username:void 0,countrycode:g(e,"countrycode")?e.countrycode:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,roleid:g(e,"roleid")?e.roleid:void 0,departmentsStatuses:g(e,"departments_statuses")?e.departments_statuses.map(So):void 0,twofa:g(e,"twofa")?e.twofa:void 0,lastPswdChange:g(e,"last_pswd_change")?new Date(e.last_pswd_change):void 0,userstatus:g(e,"userstatus")?e.userstatus:void 0}}function Oo(e){return Ho(e)}function Ho(e,t){return e==null?e:{conversationid:g(e,"conversationid")?e.conversationid:void 0,datechanged:g(e,"datechanged")?new Date(e.datechanged):void 0,status:g(e,"status")?e.status:void 0,preview:g(e,"preview")?e.preview:void 0,subject:g(e,"subject")?e.subject:void 0,departmentname:g(e,"departmentname")?e.departmentname:void 0,agentname:g(e,"agentname")?e.agentname:void 0,tags:g(e,"tags")?e.tags:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,emails:g(e,"emails")?e.emails:void 0,city:g(e,"city")?e.city:void 0,countrycode:g(e,"countrycode")?e.countrycode:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,rstatus:g(e,"rstatus")?e.rstatus:void 0,statusdatestarted:g(e,"statusdatestarted")?new Date(e.statusdatestarted):void 0,chatOrder:g(e,"chat_order")?e.chat_order:void 0}}function Ro(e){return Do(e)}function Do(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,name:g(e,"name")?e.name:void 0,type:g(e,"type")?e.type:void 0,onlineCode:g(e,"online_code")?e.online_code:void 0,offlineCode:g(e,"offline_code")?e.offline_code:void 0,onlineCodeCss:g(e,"online_code_css")?e.online_code_css:void 0,offlineCodeCss:g(e,"offline_code_css")?e.offline_code_css:void 0,provide:g(e,"provide")?e.provide:void 0,impressions:g(e,"impressions")?e.impressions:void 0,tickets:g(e,"tickets")?e.tickets:void 0,status:g(e,"status")?e.status:void 0,lastDisplayTime:g(e,"last_display_time")?e.last_display_time:void 0,lastDisplayUrl:g(e,"last_display_url")?e.last_display_url:void 0}}function Te(e){return Io(e)}function Io(e,t){return e==null?e:{count:g(e,"count")?e.count:void 0}}function Mo(e){return Bo(e)}function Bo(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,name:g(e,"name")?e.name:void 0,agentCount:g(e,"agent_count")?e.agent_count:void 0}}function Fo(e){return $o(e)}function $o(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,logid:g(e,"logid")?e.logid:void 0,line:g(e,"line")?e.line:void 0,filename:g(e,"filename")?e.filename:void 0,created:g(e,"created")?e.created:void 0,level:g(e,"level")?e.level:void 0,type:g(e,"type")?e.type:void 0,message:g(e,"message")?e.message:void 0,ip:g(e,"ip")?e.ip:void 0,groupid:g(e,"groupid")?e.groupid:void 0}}function Po(e){return Go(e)}function Go(e,t){return e==null?e:{agentid:g(e,"agentid")?e.agentid:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,chats:g(e,"chats")?e.chats:void 0}}function Uo(e){return zo(e)}function zo(e,t){return e==null?e:{name:g(e,"name")?e.name:void 0,code:g(e,"code")?e.code:void 0,engName:g(e,"eng_name")?e.eng_name:void 0,translated:g(e,"translated")?e.translated:void 0,isDefault:g(e,"is_default")?e.is_default:void 0,active:g(e,"active")?e.active:void 0,isCustom:g(e,"is_custom")?e.is_custom:void 0,isBuiltIn:g(e,"is_builtIn")?e.is_builtIn:void 0}}function Vo(e){return Wo(e)}function Wo(e,t){return e==null?e:{codeName:g(e,"code_name")?e.code_name:void 0,name:g(e,"name")?e.name:void 0,description:g(e,"description")?e.description:void 0,active:g(e,"active")?e.active:void 0,help:g(e,"help")?e.help:void 0,multiple:g(e,"multiple")?e.multiple:void 0,configFile:g(e,"config_file")?e.config_file:void 0,price:g(e,"price")?e.price:void 0,legacyIntegration:g(e,"legacy_integration")?e.legacy_integration:void 0}}function nn(e){return Ko(e)}function Ko(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,conversationid:g(e,"conversationid")?e.conversationid:void 0,code:g(e,"code")?e.code:void 0,slaTicketId:g(e,"sla_ticket_id")?e.sla_ticket_id:void 0,departmentid:g(e,"departmentid")?e.departmentid:void 0,departmentName:g(e,"department_name")?e.department_name:void 0,levelid:g(e,"levelid")?e.levelid:void 0,slaLevelName:g(e,"sla_level_name")?e.sla_level_name:void 0,sla:g(e,"sla")?e.sla:void 0,dateCreated:g(e,"date_created")?e.date_created:void 0,dateClosed:g(e,"date_closed")?e.date_closed:void 0,dateDue:g(e,"date_due")?e.date_due:void 0,slaLevelId:g(e,"sla_level_id")?e.sla_level_id:void 0,slaType:g(e,"sla_type")?new Date(e.sla_type):void 0,agentid:g(e,"agentid")?e.agentid:void 0,agentFirstname:g(e,"agent_firstname")?e.agent_firstname:void 0,agentLastname:g(e,"agent_lastname")?e.agent_lastname:void 0,agentAvatarUrl:g(e,"agent_avatar_url")?e.agent_avatar_url:void 0,reqContactid:g(e,"req_contactid")?e.req_contactid:void 0,reqFirstname:g(e,"req_firstname")?e.req_firstname:void 0,reqLastname:g(e,"req_lastname")?e.req_lastname:void 0,reqSystemname:g(e,"req_systemname")?e.req_systemname:void 0,reqContactName:g(e,"req_contactName")?e.req_contactName:void 0,reqAvatarUrl:g(e,"req_avatar_url")?e.req_avatar_url:void 0}}function Qn(e){return Xo(e)}function Xo(e,t){return e==null?e:{tagid:g(e,"tagid")?e.tagid:void 0,name:g(e,"name")?e.name:void 0,type:g(e,"type")?e.type:void 0,color:g(e,"color")?e.color:void 0,backgroundcolor:g(e,"backgroundcolor")?e.backgroundcolor:void 0,isPublic:g(e,"is_public")?e.is_public:void 0}}function Vi(e){return Jo(e)}function Jo(e,t){return e==null?e:{conversationid:g(e,"conversationid")?e.conversationid:void 0,code:g(e,"code")?e.code:void 0,datecreated:g(e,"datecreated")?new Date(e.datecreated):void 0,datechanged:g(e,"datechanged")?new Date(e.datechanged):void 0,dateresolved:g(e,"dateresolved")?new Date(e.dateresolved):void 0,statuschanged:g(e,"statuschanged")?new Date(e.statuschanged):void 0,rorder:g(e,"rorder")?e.rorder:void 0,datedue:g(e,"datedue")?new Date(e.datedue):void 0,datereopen:g(e,"datereopen")?new Date(e.datereopen):void 0,status:g(e,"status")?e.status:void 0,channelType:g(e,"channel_type")?e.channel_type:void 0,departmentid:g(e,"departmentid")?e.departmentid:void 0,agentid:g(e,"agentid")?e.agentid:void 0,preview:g(e,"preview")?e.preview:void 0,subject:g(e,"subject")?e.subject:void 0,departmentname:g(e,"departmentname")?e.departmentname:void 0,agentname:g(e,"agentname")?e.agentname:void 0,tags:g(e,"tags")?e.tags:void 0,messagegroupsIn:g(e,"messagegroups_in")?e.messagegroups_in:void 0,messagegroupsOut:g(e,"messagegroups_out")?e.messagegroups_out:void 0,contactid:g(e,"contactid")?e.contactid:void 0,parentContactid:g(e,"parent_contactid")?e.parent_contactid:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,emails:g(e,"emails")?e.emails:void 0,phones:g(e,"phones")?e.phones:void 0,jobPosition:g(e,"job_position")?e.job_position:void 0,contactType:g(e,"contact_type")?e.contact_type:void 0,city:g(e,"city")?e.city:void 0,countrycode:g(e,"countrycode")?e.countrycode:void 0,timeOffset:g(e,"time_offset")?e.time_offset:void 0,gender:g(e,"gender")?e.gender:void 0,levelid:g(e,"levelid")?e.levelid:void 0,groups:g(e,"groups")?e.groups:void 0,contactStatus:g(e,"contact_status")?e.contact_status:void 0,company:g(e,"company")?e.company:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,userid:g(e,"userid")?e.userid:void 0,roleid:g(e,"roleid")?e.roleid:void 0,userstatus:g(e,"userstatus")?e.userstatus:void 0,accountuserstatus:g(e,"accountuserstatus")?e.accountuserstatus:void 0,description:g(e,"description")?e.description:void 0,note:g(e,"note")?e.note:void 0,lastActivity:g(e,"last_activity")?new Date(e.last_activity):void 0,tagnames:g(e,"tagnames")?e.tagnames:void 0,groupnames:g(e,"groupnames")?e.groupnames:void 0}}function Zo(e){return Yo(e)}function Yo(e,t){return e==null?e:{cursor:g(e,"cursor")?e.cursor:void 0,rows:g(e,"rows")?e.rows.map(Vi):void 0}}function Qo(e){return qo(e)}function qo(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,agentid:g(e,"agentid")?e.agentid:void 0,agent:g(e,"agent")?e.agent:void 0,conversationid:g(e,"conversationid")?e.conversationid:void 0,ticket:g(e,"ticket")?e.ticket:void 0,parentContactid:g(e,"parent_contactid")?e.parent_contactid:void 0,company:g(e,"company")?e.company:void 0,contactid:g(e,"contactid")?e.contactid:void 0,customer:g(e,"customer")?e.customer:void 0,customerFirstname:g(e,"customer_firstname")?e.customer_firstname:void 0,customerLastname:g(e,"customer_lastname")?e.customer_lastname:void 0,customerSystemname:g(e,"customer_systemname")?e.customer_systemname:void 0,agentTicket:g(e,"agent_ticket")?e.agent_ticket:void 0,reportdate:g(e,"reportdate")?e.reportdate:void 0,reportedtime:g(e,"reportedtime")?e.reportedtime:void 0,reportedtimeHhmmss:g(e,"reportedtime_hhmmss")?e.reportedtime_hhmmss:void 0,spenttime:g(e,"spenttime")?e.spenttime:void 0,dateinvoiced:g(e,"dateinvoiced")?e.dateinvoiced:void 0,note:g(e,"note")?e.note:void 0,type:g(e,"type")?e.type:void 0}}var D=globalThis&&globalThis.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((i=i.apply(e,t||[])).next())})};class Wi extends Wt{getAgentsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Lo))})}getAgentsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(t,n)).value()})}getAgentsGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getAgentsGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(t,n)).value()})}getCallsSlaLogGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(nn))})}getCallsSlaLogGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(t,n)).value()})}getCallsSlaLogGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getCallsSlaLogGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(t,n)).value()})}getChatsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Oo))})}getChatsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(t,n)).value()})}getChatsGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getChatsGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(t,n)).value()})}getChatsSlaLogGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(nn))})}getChatsSlaLogGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(t,n)).value()})}getChatsSlaLogGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getChatsSlaLogGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(t,n)).value()})}getContactWidgetsCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getContactWidgetsCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(t,n)).value()})}getContactWidgetsListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Ro))})}getContactWidgetsList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(t,n)).value()})}getCustomerGroupsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Qn))})}getCustomerGroupsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(t,n)).value()})}getDepartmensGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getDepartmensGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(t,n)).value()})}getDepartmentsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Mo))})}getDepartmentsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(t,n)).value()})}getEventLogsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Fo))})}getEventLogsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(t,n)).value()})}getEventLogsGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getEventLogsGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(t,n)).value()})}getInviteAgentsGridListRaw(t,n){return D(this,void 0,void 0,function*(){if(t.departmentId===null||t.departmentId===void 0)throw new Yn("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.filters!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Po))})}getInviteAgentsGridList(t,n){return D(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(t,n)).value()})}getLanguagesGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Uo))})}getLanguagesGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(t,n)).value()})}getLanguagesGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getLanguagesGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(t,n)).value()})}getPlugindGridListRaw(t,n){return D(this,void 0,void 0,function*(){if(t.pluginPurpose===null||t.pluginPurpose===void 0)throw new Yn("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const i={};t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.pluginPurpose!==void 0&&(i.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:i},n);return new re(s,o=>o.map(Vo))})}getPlugindGridList(t,n){return D(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(t,n)).value()})}getTagsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Qn))})}getTagsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(t,n)).value()})}getTicketsGridDatasetRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>Zo(o))})}getTicketsGridDataset(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(t,n)).value()})}getTicketsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Vi))})}getTicketsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(t,n)).value()})}getTicketsGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getTicketsGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(t,n)).value()})}getTicketsSlaLogGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(nn))})}getTicketsSlaLogGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(t,n)).value()})}getTicketsSlaLogGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getTicketsSlaLogGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(t,n)).value()})}getTimeReportsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.sortField!==void 0&&(i._sortField=t.sortField),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Qo))})}getTimeReportsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(t,n)).value()})}getTimeReportsGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getTimeReportsGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(t,n)).value()})}}const qn={Asc:"ASC",Desc:"DESC"},at={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"},jo={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"},We=he(!1),Cn=he([]),Ft=he(null),_t=he(null),Ke=he(!1),ht=he(!1),Ki=he({}),_e=he([]),Xi=he(null),Fe=he(null),Kt=he(!0),Sn=he(jo.Rorder),ea="modulepreload",ta=function(e){return"/"+e},jn={},Nt=function(t,n,i){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=ta(s),s in jn)return;jn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!i)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":ea,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})},ei=(e,t)=>{const n=e[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((i,r)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(r.bind(null,new Error("Unknown variable dynamic import: "+t)))})},rn="en-US",ti="S",Ji="N",Zi="C",pn="D",na="A";let Se;function ia(e){Se===void 0&&(Se=e,Vn(rn,()=>ei(Object.assign({"../../locales/en-US.json":()=>Nt(()=>import("./en-US.js"),[]),"../../locales/en.json":()=>Nt(()=>import("./en.js"),[])}),`../../locales/${rn}.json`)),Vn(Se.locale,()=>ei(Object.assign({"../../locales/en-US.json":()=>Nt(()=>import("./en-US.js"),[]),"../../locales/en.json":()=>Nt(()=>import("./en.js"),[])}),`../../locales/${Se.locale}.json`)),qs({fallbackLocale:rn,initialLocale:Se.locale}))}function ra(e){return new Date(e.getTime()-e.getTimezoneOffset()*60*1e3)}function Lt(e){return ra(new Date(e))}function sa(){return Se.dateFormat.toUpperCase()}function oa(){return Se.timeFormat}function aa(){return sa()+" "+oa()}function ze(e){return la(e,2)}function la(e,t){let n="";return fa(t).formatToParts(e).forEach(i=>{i.type==="group"?n+=ua():i.type==="decimal"?n+=ca():n+=i.value}),n}function ua(){let e=Se.thousandsSeparator;switch(e==null&&(e=ti),e){case Zi:return",";case ti:return" ";case pn:return".";case na:return"'";case Ji:case"":return" ";default:return e}}function ca(){let e=Se.decimalSeparator;switch(e==null&&(e=pn),e){case Zi:return",";case Ji:case pn:return".";default:return e}}function fa(e){return new Intl.NumberFormat(Se.locale,{minimumFractionDigits:0,maximumFractionDigits:e,useGrouping:!0})}function da(e){le(e,"svelte-mupm4a",".Counter.svelte-mupm4a{display:none}span.svelte-mupm4a{margin-right:5px}.Selection.svelte-mupm4a{color:var(--ticket-selected-textcolor);background-color:var(--ticket-selected-bg);padding:6px 10px;border-radius:4px;font-size:12px;font-style:normal;font-weight:700;line-height:20px}.text.svelte-mupm4a{font-family:'Roboto', sans-serif;font-size:12px;line-height:20px}.many.svelte-mupm4a{color:var(--main-textcolor);padding:2px 12px;border:1px solid var(--menu-hover-bg);border-radius:4px;font-weight:500;font-size:12px;font-family:'Roboto', sans-serif;line-height:20px;cursor:pointer}.many.loading.svelte-mupm4a{border:none;padding:2px 0}@media(min-width: 768px){.Counter.svelte-mupm4a{display:block}}")}function ha(e){let t,n=e[5]("Displaying %count of %allCount",{values:{count:ze(e[7].length),allCount:ze(e[0])}})+"",i;return{c(){t=T("span"),i=q(n),_(t,"class","text svelte-mupm4a")},m(r,s){O(r,t,s),b(t,i)},p(r,s){s&161&&n!==(n=r[5]("Displaying %count of %allCount",{values:{count:ze(r[7].length),allCount:ze(r[0])}})+"")&&se(i,n)},d(r){r&&A(t)}}}function ga(e){let t,n=e[5]("Displaying %count of",{values:{count:ze(e[7].length)}})+"",i,r,s,o=(e[1]?e[5]("Loading.."):e[5]("many"))+"",a,u,l,c;return{c(){t=T("span"),i=q(n),r=U(),s=T("span"),a=q(o),_(t,"class","text svelte-mupm4a"),_(s,"class",u=ue(e[2])+" svelte-mupm4a")},m(f,d){O(f,t,d),b(t,i),O(f,r,d),O(f,s,d),b(s,a),l||(c=de(s,"click",e[8]),l=!0)},p(f,d){d&160&&n!==(n=f[5]("Displaying %count of",{values:{count:ze(f[7].length)}})+"")&&se(i,n),d&34&&o!==(o=(f[1]?f[5]("Loading.."):f[5]("many"))+"")&&se(a,o),d&4&&u!==(u=ue(f[2])+" svelte-mupm4a")&&_(s,"class",u)},d(f){f&&(A(t),A(r),A(s)),l=!1,c()}}}function ma(e){let t,n=e[5]("Loading...")+"",i;return{c(){t=T("span"),i=q(n),_(t,"class","text svelte-mupm4a")},m(r,s){O(r,t,s),b(t,i)},p(r,s){s&32&&n!==(n=r[5]("Loading...")+"")&&se(i,n)},d(r){r&&A(t)}}}function pa(e){let t;function n(s,o){return s[3]?_a:va}let i=n(e),r=i(e);return{c(){r.c(),t=Tt()},m(s,o){r.m(s,o),O(s,t,o)},p(s,o){i===(i=n(s))&&r?r.p(s,o):(r.d(1),r=i(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&A(t),r.d(s)}}}function va(e){let t,n=e[5]("%pCount rows selected",{values:{pCount:e[4].length}})+"",i;return{c(){t=T("span"),i=q(n),_(t,"class","Selection svelte-mupm4a")},m(r,s){O(r,t,s),b(t,i)},p(r,s){s&48&&n!==(n=r[5]("%pCount rows selected",{values:{pCount:r[4].length}})+"")&&se(i,n)},d(r){r&&A(t)}}}function _a(e){let t;function n(s,o){return s[4].length>0?ba:ya}let i=n(e),r=i(e);return{c(){r.c(),t=Tt()},m(s,o){r.m(s,o),O(s,t,o)},p(s,o){i===(i=n(s))&&r?r.p(s,o):(r.d(1),r=i(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&A(t),r.d(s)}}}function ya(e){let t,n=e[5]("all rows selected")+"",i;return{c(){t=T("span"),i=q(n),_(t,"class","Selection svelte-mupm4a")},m(r,s){O(r,t,s),b(t,i)},p(r,s){s&32&&n!==(n=r[5]("all rows selected")+"")&&se(i,n)},d(r){r&&A(t)}}}function ba(e){let t,n=e[5]("all rows selected except %pCount rows",{values:{pCount:e[4].length}})+"",i;return{c(){t=T("span"),i=q(n),_(t,"class","Selection svelte-mupm4a")},m(r,s){O(r,t,s),b(t,i)},p(r,s){s&48&&n!==(n=r[5]("all rows selected except %pCount rows",{values:{pCount:r[4].length}})+"")&&se(i,n)},d(r){r&&A(t)}}}function wa(e){let t;function n(s,o){return s[3]||s[4].length>0?pa:s[6]?ma:s[0]==null?ga:ha}let i=n(e),r=i(e);return{c(){t=T("div"),r.c(),_(t,"class","Counter svelte-mupm4a")},m(s,o){O(s,t,o),r.m(t,null)},p(s,[o]){i===(i=n(s))&&r?r.p(s,o):(r.d(1),r=i(s),r&&(r.c(),r.m(t,null)))},i:K,o:K,d(s){s&&A(t),r.d()}}}function xa(e,t,n){let i,r,s,o,a,u,l;V(e,_t,v=>n(9,i=v)),V(e,Ft,v=>n(10,r=v)),V(e,We,v=>n(3,s=v)),V(e,Cn,v=>n(4,o=v)),V(e,we,v=>n(5,a=v)),V(e,Ke,v=>n(6,u=v)),V(e,_e,v=>n(7,l=v));let c=null,f=!1,d="many";function h(){n(0,c=null)}async function p(){n(2,d="many loading"),n(1,f=!0);let v=await r.getTicketsGridListCount({filters:i,timezoneOffset:new Date().getTimezoneOffset()});n(0,c=v.count),n(1,f=!1)}return e.$$.update=()=>{e.$$.dirty&512&&i&&h()},[c,f,d,s,o,a,u,l,p,i]}class Ta extends ie{constructor(t){super(),ne(this,t,xa,wa,ee,{},da)}}async function je(e=!1){if(!(ke(Ke)||!ke(Ft))&&(e&&(Fe.set(null),ht.set(!1)),!(!ke(Fe)&&ke(ht)))){Ke.set(!0);try{const n=await(await ke(Ft).getTicketsGridDatasetRaw(ka())).value();e&&_e.set([]),_e.set([...ke(_e),...n.rows]),Fe.set(n.cursor),ht.set(!0)}catch(t){Xi.set(t.toString())}Ke.set(!1)}}function ka(){return{perPage:20,sortDir:ke(Kt)?qn.Asc:qn.Desc,filters:ke(_t),sortField:ke(Sn),cursor:ke(Fe)?ke(Fe):""}}function Ea(e){le(e,"svelte-oyjuek",".Head.svelte-oyjuek.svelte-oyjuek{display:flex;position:sticky;top:0;color:var(--panel_text_color);margin-bottom:20px;align-items:center;font-size:14px;font-family:'Roboto', sans-serif;border-bottom:1px solid var(--main-lighter-textcolor);padding:0 23px 6px 44px}.FilterIcon{font-size:20px;margin-right:2px}.headCheckbox.svelte-oyjuek.svelte-oyjuek{width:20px;margin-right:16px}.headCheckbox.svelte-oyjuek input[type=checkbox].svelte-oyjuek{vertical-align:middle;cursor:pointer;margin:3px}button.svelte-oyjuek.svelte-oyjuek{border:none;background:none;font-size:13px;font-weight:400;color:var(--main-lighter-textcolor)}.spinner.svelte-oyjuek.svelte-oyjuek{font-size:16px;cursor:pointer}.rightPanel.svelte-oyjuek.svelte-oyjuek{display:flex;margin-inline-start:auto}.Sorting.svelte-oyjuek.svelte-oyjuek{cursor:pointer;text-align:left;font-weight:bold}.loading.svelte-oyjuek.svelte-oyjuek{animation-name:svelte-oyjuek-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-oyjuek-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@media screen and (min-width: 768px){.headCheckbox.svelte-oyjuek.svelte-oyjuek{margin-right:42px}}")}function Ca(e){let t,n,i,r,s,o,a,u,l,c,f,d,h,p,v,y,m,w,C,L;return s=new Le({props:{iconLaClassName:"la-filter",className:"FilterIcon"}}),c=new Le({props:{iconLaClassName:"la-show"}}),h=new Ta({}),y=new Le({props:{iconLaClassName:"la-refresh"}}),{c(){t=T("div"),n=T("div"),i=T("input"),r=U(),P(s.$$.fragment),o=U(),a=T("button"),u=q(e[0]),l=U(),P(c.$$.fragment),f=U(),d=T("div"),P(h.$$.fragment),p=U(),v=T("button"),P(y.$$.fragment),_(i,"type","checkbox"),_(i,"class","svelte-oyjuek"),_(n,"class","headCheckbox svelte-oyjuek"),_(a,"class","Sorting svelte-oyjuek"),_(v,"class","spinner svelte-oyjuek"),_(v,"title",m=e[4]("Reload")),Rn(v,"loading",e[3]),_(d,"class","rightPanel svelte-oyjuek"),_(t,"class","Head svelte-oyjuek")},m(H,Z){O(H,t,Z),b(t,n),b(n,i),i.checked=e[2],b(t,r),F(s,t,null),b(t,o),b(t,a),b(a,u),e[8](a),b(t,l),F(c,t,null),b(t,f),b(t,d),F(h,d,null),b(d,p),b(d,v),F(y,v,null),w=!0,C||(L=[de(i,"change",e[7]),de(i,"click",e[5]),de(a,"click",e[6]),de(v,"click",e[9])],C=!0)},p(H,[Z]){Z&4&&(i.checked=H[2]),(!w||Z&1)&&se(u,H[0]),(!w||Z&16&&m!==(m=H[4]("Reload")))&&_(v,"title",m),(!w||Z&8)&&Rn(v,"loading",H[3])},i(H){w||(x(s.$$.fragment,H),x(c.$$.fragment,H),x(h.$$.fragment,H),x(y.$$.fragment,H),w=!0)},o(H){k(s.$$.fragment,H),k(c.$$.fragment,H),k(h.$$.fragment,H),k(y.$$.fragment,H),w=!1},d(H){H&&A(t),$(s),e[8](null),$(c),$(h),$(y),C=!1,Ae(L)}}}function Sa(e,t,n){let i,r,s;V(e,Kt,y=>n(12,y)),V(e,We,y=>n(2,i=y)),V(e,Ke,y=>n(3,r=y)),V(e,we,y=>n(4,s=y));let{currentFilter:o}=t;const a=pi();let u,l,c;function f(){We.set(!i),_e.update(y=>y.map(m=>({...m,__selected:i})))}function d(){u=l.getBoundingClientRect();let m=u.bottom-58,w=u.left-7;window.innerWidth>=768&&(w-=258),c=`position: absolute; top: ${m}px; left: ${w}px;`,a("openModal",{dialogStyles:c})}function h(){i=this.checked,We.set(i)}function p(y){Xe[y?"unshift":"push"](()=>{l=y,n(1,l)})}const v=()=>je(!0);return e.$$set=y=>{"currentFilter"in y&&n(0,o=y.currentFilter)},[o,l,i,r,s,f,d,h,p,v]}class Na extends ie{constructor(t){super(),ne(this,t,Sa,Ca,ee,{currentFilter:0},Ea)}}function He(e){switch(e){case"A":return{bg:"var(--ticket-status-answered-background)",text:"var(--ticket-status-answered-text)",border:"var(--ticket-status-answered-border)"};case"T":return{bg:"var(--ticket-status-chat-background)",text:"var(--ticket-status-chat-text)",border:"var(--ticket-status-chat-border)"};case"P":return{bg:"var(--ticket-status-phone-background)",text:"var(--ticket-status-phone-text)",border:"var(--ticket-status-phone-border)"};case"X":return{bg:"var(--ticket-status-deleted-background)",text:"var(--ticket-status-deleted-text)",border:"var(--ticket-status-deleted-border)"};case"B":return{bg:"var(--ticket-status-new-background)",text:"var(--ticket-status-new-text)",border:"var(--ticket-status-new-border)"};case"I":return{bg:"var(--ticket-status-deleted-background)",text:"var(--ticket-status-deleted-text)",border:"var(--ticket-status-deleted-border)"};case"R":return{bg:"var(--ticket-status-resolved-background)",text:"var(--ticket-status-resolved-text)",border:"var(--ticket-status-resolved-border)"};case"N":return{bg:"var(--ticket-status-new-background)",text:"var(--ticket-status-new-text)",border:"var(--ticket-status-new-border)"};case"C":return{bg:"var(--ticket-status-open-background)",text:"var(--ticket-status-open-text)",border:"var(--ticket-status-open-border)"};case"W":return{bg:"var(--ticket-status-postponed-background)",text:"var(--ticket-status-postponed-text)",border:"var(--ticket-status-postponed-border)"};default:return{bg:"",text:"",border:""}}}const La=()=>{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]},Aa=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 Oa(e){le(e,"svelte-hbozhk",".wrapper.svelte-hbozhk{position:relative;width:var(--size);height:var(--size)}.innerImage.svelte-hbozhk,.innerInitials.svelte-hbozhk,.imageLoading.svelte-hbozhk{display:block;width:100%;height:100%;border-radius:var(--borderRadius)}.innerInitials.svelte-hbozhk{line-height:var(--size);background-color:var(--bgColor);color:var(--textColor);text-align:center;font-size:calc(var(--size) / (var(--abbrLength) + 0.5))}.imageLoading.svelte-hbozhk{background-color:var(--bgColor)}.imageLoading.svelte-hbozhk::before{content:'';display:block;height:100%;width:100%;background:linear-gradient(90deg, transparent, #ffffff38, transparent);position:absolute;top:0;left:0;animation:svelte-hbozhk-skeleton-animation 1.2s linear infinite}@keyframes svelte-hbozhk-skeleton-animation{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}")}function Ha(e){let t;return{c(){t=T("div"),t.textContent=`${e[10]}`,_(t,"class","innerInitials svelte-hbozhk")},m(n,i){O(n,t,i)},p:K,d(n){n&&A(t)}}}function Ra(e){let t,n,i,r,s,o;return{c(){t=T("div"),n=T("img"),_(n,"alt",""),_(n,"class",ue("innerImage")+" svelte-hbozhk"),Dt(n.src,i=e[2])||_(n,"src",i),_(t,"class",r=ue(e[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){O(a,t,u),b(t,n),s||(o=[de(n,"error",e[15]),de(n,"load",e[16])],s=!0)},p(a,u){u&4&&!Dt(n.src,i=a[2])&&_(n,"src",i),u&256&&r!==(r=ue(a[8]?"imageLoading":"")+" svelte-hbozhk")&&_(t,"class",r)},d(a){a&&A(t),s=!1,Ae(o)}}}function Da(e){let t,n;function i(o,a){return o[2]&&!o[7]?Ra:Ha}let r=i(e),s=r(e);return{c(){t=T("div"),s.c(),_(t,"aria-label",e[1]),_(t,"class","wrapper svelte-hbozhk"),_(t,"style",n=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){O(o,t,a),s.m(t,null)},p(o,[a]){r===(r=i(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(t,null))),a&2&&_(t,"aria-label",o[1]),a&125&&n!==(n=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&_(t,"style",n)},i:K,o:K,d(o){o&&A(t),s.d()}}}function Ia(e,t,n){let{style:i=""}=t,{name:r="Avatar"}=t,{initials:s}=t,{src:o}=t,{bgColor:a="lightGrey"}=t,{textColor:u="white"}=t,{size:l="50px"}=t,{borderRadius:c="50%"}=t,{square:f=!1}=t,{randomBgColor:d=!1}=t;const h=d?La():a,p=s||Aa(r),v=p.length;let y=!1,m=!0;const w=()=>n(7,y=!0),C=()=>n(8,m=!1);return e.$$set=L=>{"style"in L&&n(0,i=L.style),"name"in L&&n(1,r=L.name),"initials"in L&&n(12,s=L.initials),"src"in L&&n(2,o=L.src),"bgColor"in L&&n(13,a=L.bgColor),"textColor"in L&&n(3,u=L.textColor),"size"in L&&n(4,l=L.size),"borderRadius"in L&&n(5,c=L.borderRadius),"square"in L&&n(6,f=L.square),"randomBgColor"in L&&n(14,d=L.randomBgColor)},[i,r,o,u,l,c,f,y,m,h,p,v,s,a,d,w,C]}class Ma extends ie{constructor(t){super(),ne(this,t,Ia,Da,ee,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},Oa)}}function Ba(e){let t,n;return t=new Ma({props:{bgColor:e[0],name:e[1],src:e[2],initials:e[3],size:"40px"}}),{c(){P(t.$$.fragment)},m(i,r){F(t,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.bgColor=i[0]),r&2&&(s.name=i[1]),r&4&&(s.src=i[2]),r&8&&(s.initials=i[3]),t.$set(s)},i(i){n||(x(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){$(t,i)}}}function Fa(e,t,n){let{bgColor:i}=t,{name:r}=t,{src:s}=t,{initials:o}=t;return e.$$set=a=>{"bgColor"in a&&n(0,i=a.bgColor),"name"in a&&n(1,r=a.name),"src"in a&&n(2,s=a.src),"initials"in a&&n(3,o=a.initials)},[i,r,s,o]}class $a extends ie{constructor(t){super(),ne(this,t,Fa,Ba,ee,{bgColor:0,name:1,src:2,initials:3})}}var Yi={exports:{}},Qi={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,i){return n<<i|n>>>32-i},rotr:function(n,i){return n<<32-i|n>>>i},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var i=0;i<n.length;i++)n[i]=t.endian(n[i]);return n},randomBytes:function(n){for(var i=[];n>0;n--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(n){for(var i=[],r=0,s=0;r<n.length;r++,s+=8)i[s>>>5]|=n[r]<<24-s%32;return i},wordsToBytes:function(n){for(var i=[],r=0;r<n.length*32;r+=8)i.push(n[r>>>5]>>>24-r%32&255);return i},bytesToHex:function(n){for(var i=[],r=0;r<n.length;r++)i.push((n[r]>>>4).toString(16)),i.push((n[r]&15).toString(16));return i.join("")},hexToBytes:function(n){for(var i=[],r=0;r<n.length;r+=2)i.push(parseInt(n.substr(r,2),16));return i},bytesToBase64:function(n){for(var i=[],r=0;r<n.length;r+=3)for(var s=n[r]<<16|n[r+1]<<8|n[r+2],o=0;o<4;o++)r*8+o*6<=n.length*8?i.push(e.charAt(s>>>6*(3-o)&63)):i.push("=");return i.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],r=0,s=0;r<n.length;s=++r%4)s!=0&&i.push((e.indexOf(n.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|e.indexOf(n.charAt(r))>>>6-s*2);return i}};Qi.exports=t})();var Pa=Qi.exports,vn={utf8:{stringToBytes:function(e){return vn.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(vn.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n)&255);return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},ni=vn;/*!
5
+ Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const Qs={fallbackLocale:null,loadingDelay:200,formats:Zs,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},lt=Qs;function qe(){return lt}function qs(e){const t=e,{formats:n}=t,i=Js(t,["formats"]);let r=e.fallbackLocale;if(e.initialLocale)try{Bi.resolveLocale(e.initialLocale)&&(r=e.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${e.initialLocale}" is not a valid locale.`)}return i.warnOnMissingMessages&&(delete i.warnOnMissingMessages,i.handleMissingMessage==null?i.handleMissingMessage=Ys:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(lt,i,{initialLocale:r}),n&&("number"in n&&Object.assign(lt.formats.number,n.number),"date"in n&&Object.assign(lt.formats.date,n.date),"time"in n&&Object.assign(lt.formats.time,n.time)),nt.set(r)}const Rt=he(!1);var js=Object.defineProperty,eo=Object.defineProperties,to=Object.getOwnPropertyDescriptors,Kn=Object.getOwnPropertySymbols,no=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable,Xn=(e,t,n)=>t in e?js(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ro=(e,t)=>{for(var n in t||(t={}))no.call(t,n)&&Xn(e,n,t[n]);if(Kn)for(var n of Kn(t))io.call(t,n)&&Xn(e,n,t[n]);return e},so=(e,t)=>eo(e,to(t));let mn;const Mt=he(null);function Jn(e){return e.split("-").map((t,n,i)=>i.slice(0,n+1).join("-")).reverse()}function kt(e,t=qe().fallbackLocale){const n=Jn(e);return t?[...new Set([...n,...Jn(t)])]:n}function De(){return mn??void 0}Mt.subscribe(e=>{mn=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const oo=e=>{if(e&&Ps(e)&&It(e)){const{loadingDelay:t}=qe();let n;return typeof window<"u"&&De()!=null&&t?n=window.setTimeout(()=>Rt.set(!0),t):Rt.set(!0),$i(e).then(()=>{Mt.set(e)}).finally(()=>{clearTimeout(n),Rt.set(!1)})}return Mt.set(e)},nt=so(ro({},Mt),{set:oo}),Vt=e=>{const t=Object.create(null);return i=>{const r=JSON.stringify(i);return r in t?t[r]:t[r]=e(i)}};var ao=Object.defineProperty,Bt=Object.getOwnPropertySymbols,Pi=Object.prototype.hasOwnProperty,Gi=Object.prototype.propertyIsEnumerable,Zn=(e,t,n)=>t in e?ao(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kn=(e,t)=>{for(var n in t||(t={}))Pi.call(t,n)&&Zn(e,n,t[n]);if(Bt)for(var n of Bt(t))Gi.call(t,n)&&Zn(e,n,t[n]);return e},it=(e,t)=>{var n={};for(var i in e)Pi.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Bt)for(var i of Bt(e))t.indexOf(i)<0&&Gi.call(e,i)&&(n[i]=e[i]);return n};const vt=(e,t)=>{const{formats:n}=qe();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},lo=Vt(e=>{var t=e,{locale:n,format:i}=t,r=it(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return i&&(r=vt("number",i)),new Intl.NumberFormat(n,r)}),uo=Vt(e=>{var t=e,{locale:n,format:i}=t,r=it(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return i?r=vt("date",i):Object.keys(r).length===0&&(r=vt("date","short")),new Intl.DateTimeFormat(n,r)}),co=Vt(e=>{var t=e,{locale:n,format:i}=t,r=it(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return i?r=vt("time",i):Object.keys(r).length===0&&(r=vt("time","short")),new Intl.DateTimeFormat(n,r)}),fo=(e={})=>{var t=e,{locale:n=De()}=t,i=it(t,["locale"]);return lo(kn({locale:n},i))},ho=(e={})=>{var t=e,{locale:n=De()}=t,i=it(t,["locale"]);return uo(kn({locale:n},i))},go=(e={})=>{var t=e,{locale:n=De()}=t,i=it(t,["locale"]);return co(kn({locale:n},i))},mo=Vt((e,t=De())=>new Bi(e,t,qe().formats,{ignoreTag:qe().ignoreTag})),po=(e,t={})=>{var n,i,r,s;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:a,locale:u=De(),default:l}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=Fi(e,u);if(!c)c=(s=(r=(i=(n=qe()).handleMissingMessage)==null?void 0:i.call(n,{locale:u,id:e,defaultValue:l}))!=null?r:l)!=null?s:e;else if(typeof c!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c;if(!a)return c;let f=c;try{f=mo(c,u).format(a)}catch(d){d instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,d.message)}return f},vo=(e,t)=>go(t).format(e),_o=(e,t)=>ho(t).format(e),yo=(e,t)=>fo(t).format(e),bo=(e,t=De())=>Fi(e,t),we=et([nt,tt],()=>po);et([nt],()=>vo);et([nt],()=>_o);et([nt],()=>yo);et([nt,tt],()=>bo);var Ue=globalThis&&globalThis.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((i=i.apply(e,t||[])).next())})};const wo="https://localhost/api/v3".replace(/\/+$/,"");class En{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:wo}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||Ui}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:()=>Ue(this,void 0,void 0,function*(){return t})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const xo=new En;class Wt{constructor(t=xo){this.configuration=t,this.fetchApi=(n,i)=>Ue(this,void 0,void 0,function*(){let r={url:n,init:i};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 Co(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 n=this.clone();return n.middleware=n.middleware.concat(...t),n}withPreMiddleware(...t){const n=t.map(i=>({pre:i}));return this.withMiddleware(...n)}withPostMiddleware(...t){const n=t.map(i=>({post:i}));return this.withMiddleware(...n)}isJsonMime(t){return t?Wt.jsonRegex.test(t):!1}request(t,n){return Ue(this,void 0,void 0,function*(){const{url:i,init:r}=yield this.createFetchParams(t,n),s=yield this.fetchApi(i,r);if(s&&s.status>=200&&s.status<300)return s;throw new Eo(s,"Response returned an error code")})}createFetchParams(t,n){return Ue(this,void 0,void 0,function*(){let i=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(i+="?"+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 n=="function"?n:()=>Ue(this,void 0,void 0,function*(){return n}),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:ko(a.body)||a.body instanceof URLSearchParams||To(a.body)?a.body:JSON.stringify(a.body)});return{url:i,init:u}})}clone(){const t=this.constructor,n=new t(this.configuration);return n.middleware=this.middleware.slice(),n}}Wt.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function To(e){return typeof Blob<"u"&&e instanceof Blob}function ko(e){return typeof FormData<"u"&&e instanceof FormData}class Eo extends Error{constructor(t,n){super(n),this.response=t,this.name="ResponseError"}}class Co extends Error{constructor(t,n){super(n),this.cause=t,this.name="FetchError"}}class Yn extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}function g(e,t){const n=e[t];return n!=null}function Ui(e,t=""){return Object.keys(e).map(n=>zi(n,e[n],t)).filter(n=>n.length>0).join("&")}function zi(e,t,n=""){const i=n+(n.length?`[${e}]`:e);if(t instanceof Array){const r=t.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(i)}=`);return`${encodeURIComponent(i)}=${r}`}if(t instanceof Set){const r=Array.from(t);return zi(e,r,n)}return t instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?Ui(t,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(t))}`}class re{constructor(t,n=i=>i){this.raw=t,this.transformer=n}value(){return Ue(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}}function So(e){return No(e)}function No(e,t){return e==null?e:{departmentid:g(e,"departmentid")?e.departmentid:void 0,onlineStatus:g(e,"online_status")?e.online_status:void 0,presetStatus:g(e,"preset_status")?e.preset_status:void 0}}function Lo(e){return Ao(e)}function Ao(e,t){return e==null?e:{agentid:g(e,"agentid")?e.agentid:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,username:g(e,"username")?e.username:void 0,countrycode:g(e,"countrycode")?e.countrycode:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,roleid:g(e,"roleid")?e.roleid:void 0,departmentsStatuses:g(e,"departments_statuses")?e.departments_statuses.map(So):void 0,twofa:g(e,"twofa")?e.twofa:void 0,lastPswdChange:g(e,"last_pswd_change")?new Date(e.last_pswd_change):void 0,userstatus:g(e,"userstatus")?e.userstatus:void 0}}function Oo(e){return Ho(e)}function Ho(e,t){return e==null?e:{conversationid:g(e,"conversationid")?e.conversationid:void 0,datechanged:g(e,"datechanged")?new Date(e.datechanged):void 0,status:g(e,"status")?e.status:void 0,preview:g(e,"preview")?e.preview:void 0,subject:g(e,"subject")?e.subject:void 0,departmentname:g(e,"departmentname")?e.departmentname:void 0,agentname:g(e,"agentname")?e.agentname:void 0,tags:g(e,"tags")?e.tags:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,emails:g(e,"emails")?e.emails:void 0,city:g(e,"city")?e.city:void 0,countrycode:g(e,"countrycode")?e.countrycode:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,rstatus:g(e,"rstatus")?e.rstatus:void 0,statusdatestarted:g(e,"statusdatestarted")?new Date(e.statusdatestarted):void 0,chatOrder:g(e,"chat_order")?e.chat_order:void 0}}function Ro(e){return Do(e)}function Do(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,name:g(e,"name")?e.name:void 0,type:g(e,"type")?e.type:void 0,onlineCode:g(e,"online_code")?e.online_code:void 0,offlineCode:g(e,"offline_code")?e.offline_code:void 0,onlineCodeCss:g(e,"online_code_css")?e.online_code_css:void 0,offlineCodeCss:g(e,"offline_code_css")?e.offline_code_css:void 0,provide:g(e,"provide")?e.provide:void 0,impressions:g(e,"impressions")?e.impressions:void 0,tickets:g(e,"tickets")?e.tickets:void 0,status:g(e,"status")?e.status:void 0,lastDisplayTime:g(e,"last_display_time")?e.last_display_time:void 0,lastDisplayUrl:g(e,"last_display_url")?e.last_display_url:void 0}}function Te(e){return Io(e)}function Io(e,t){return e==null?e:{count:g(e,"count")?e.count:void 0}}function Mo(e){return Bo(e)}function Bo(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,name:g(e,"name")?e.name:void 0,agentCount:g(e,"agent_count")?e.agent_count:void 0}}function Fo(e){return $o(e)}function $o(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,logid:g(e,"logid")?e.logid:void 0,line:g(e,"line")?e.line:void 0,filename:g(e,"filename")?e.filename:void 0,created:g(e,"created")?e.created:void 0,level:g(e,"level")?e.level:void 0,type:g(e,"type")?e.type:void 0,message:g(e,"message")?e.message:void 0,ip:g(e,"ip")?e.ip:void 0,groupid:g(e,"groupid")?e.groupid:void 0}}function Po(e){return Go(e)}function Go(e,t){return e==null?e:{agentid:g(e,"agentid")?e.agentid:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,chats:g(e,"chats")?e.chats:void 0}}function Uo(e){return zo(e)}function zo(e,t){return e==null?e:{name:g(e,"name")?e.name:void 0,code:g(e,"code")?e.code:void 0,engName:g(e,"eng_name")?e.eng_name:void 0,translated:g(e,"translated")?e.translated:void 0,isDefault:g(e,"is_default")?e.is_default:void 0,active:g(e,"active")?e.active:void 0,isCustom:g(e,"is_custom")?e.is_custom:void 0,isBuiltIn:g(e,"is_builtIn")?e.is_builtIn:void 0}}function Vo(e){return Wo(e)}function Wo(e,t){return e==null?e:{codeName:g(e,"code_name")?e.code_name:void 0,name:g(e,"name")?e.name:void 0,description:g(e,"description")?e.description:void 0,active:g(e,"active")?e.active:void 0,help:g(e,"help")?e.help:void 0,multiple:g(e,"multiple")?e.multiple:void 0,configFile:g(e,"config_file")?e.config_file:void 0,price:g(e,"price")?e.price:void 0,legacyIntegration:g(e,"legacy_integration")?e.legacy_integration:void 0}}function nn(e){return Ko(e)}function Ko(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,conversationid:g(e,"conversationid")?e.conversationid:void 0,code:g(e,"code")?e.code:void 0,slaTicketId:g(e,"sla_ticket_id")?e.sla_ticket_id:void 0,departmentid:g(e,"departmentid")?e.departmentid:void 0,departmentName:g(e,"department_name")?e.department_name:void 0,levelid:g(e,"levelid")?e.levelid:void 0,slaLevelName:g(e,"sla_level_name")?e.sla_level_name:void 0,sla:g(e,"sla")?e.sla:void 0,dateCreated:g(e,"date_created")?e.date_created:void 0,dateClosed:g(e,"date_closed")?e.date_closed:void 0,dateDue:g(e,"date_due")?e.date_due:void 0,slaLevelId:g(e,"sla_level_id")?e.sla_level_id:void 0,slaType:g(e,"sla_type")?new Date(e.sla_type):void 0,agentid:g(e,"agentid")?e.agentid:void 0,agentFirstname:g(e,"agent_firstname")?e.agent_firstname:void 0,agentLastname:g(e,"agent_lastname")?e.agent_lastname:void 0,agentAvatarUrl:g(e,"agent_avatar_url")?e.agent_avatar_url:void 0,reqContactid:g(e,"req_contactid")?e.req_contactid:void 0,reqFirstname:g(e,"req_firstname")?e.req_firstname:void 0,reqLastname:g(e,"req_lastname")?e.req_lastname:void 0,reqSystemname:g(e,"req_systemname")?e.req_systemname:void 0,reqContactName:g(e,"req_contactName")?e.req_contactName:void 0,reqAvatarUrl:g(e,"req_avatar_url")?e.req_avatar_url:void 0}}function Qn(e){return Xo(e)}function Xo(e,t){return e==null?e:{tagid:g(e,"tagid")?e.tagid:void 0,name:g(e,"name")?e.name:void 0,type:g(e,"type")?e.type:void 0,color:g(e,"color")?e.color:void 0,backgroundcolor:g(e,"backgroundcolor")?e.backgroundcolor:void 0,isPublic:g(e,"is_public")?e.is_public:void 0}}function Vi(e){return Jo(e)}function Jo(e,t){return e==null?e:{conversationid:g(e,"conversationid")?e.conversationid:void 0,code:g(e,"code")?e.code:void 0,datecreated:g(e,"datecreated")?new Date(e.datecreated):void 0,datechanged:g(e,"datechanged")?new Date(e.datechanged):void 0,dateresolved:g(e,"dateresolved")?new Date(e.dateresolved):void 0,statuschanged:g(e,"statuschanged")?new Date(e.statuschanged):void 0,rorder:g(e,"rorder")?e.rorder:void 0,datedue:g(e,"datedue")?new Date(e.datedue):void 0,datereopen:g(e,"datereopen")?new Date(e.datereopen):void 0,status:g(e,"status")?e.status:void 0,channelType:g(e,"channel_type")?e.channel_type:void 0,departmentid:g(e,"departmentid")?e.departmentid:void 0,agentid:g(e,"agentid")?e.agentid:void 0,preview:g(e,"preview")?e.preview:void 0,subject:g(e,"subject")?e.subject:void 0,departmentname:g(e,"departmentname")?e.departmentname:void 0,agentname:g(e,"agentname")?e.agentname:void 0,tags:g(e,"tags")?e.tags:void 0,messagegroupsIn:g(e,"messagegroups_in")?e.messagegroups_in:void 0,messagegroupsOut:g(e,"messagegroups_out")?e.messagegroups_out:void 0,contactid:g(e,"contactid")?e.contactid:void 0,parentContactid:g(e,"parent_contactid")?e.parent_contactid:void 0,firstname:g(e,"firstname")?e.firstname:void 0,lastname:g(e,"lastname")?e.lastname:void 0,systemName:g(e,"system_name")?e.system_name:void 0,emails:g(e,"emails")?e.emails:void 0,phones:g(e,"phones")?e.phones:void 0,jobPosition:g(e,"job_position")?e.job_position:void 0,contactType:g(e,"contact_type")?e.contact_type:void 0,city:g(e,"city")?e.city:void 0,countrycode:g(e,"countrycode")?e.countrycode:void 0,timeOffset:g(e,"time_offset")?e.time_offset:void 0,gender:g(e,"gender")?e.gender:void 0,levelid:g(e,"levelid")?e.levelid:void 0,groups:g(e,"groups")?e.groups:void 0,contactStatus:g(e,"contact_status")?e.contact_status:void 0,company:g(e,"company")?e.company:void 0,avatarUrl:g(e,"avatar_url")?e.avatar_url:void 0,userid:g(e,"userid")?e.userid:void 0,roleid:g(e,"roleid")?e.roleid:void 0,userstatus:g(e,"userstatus")?e.userstatus:void 0,accountuserstatus:g(e,"accountuserstatus")?e.accountuserstatus:void 0,description:g(e,"description")?e.description:void 0,note:g(e,"note")?e.note:void 0,lastActivity:g(e,"last_activity")?new Date(e.last_activity):void 0,tagnames:g(e,"tagnames")?e.tagnames:void 0,groupnames:g(e,"groupnames")?e.groupnames:void 0}}function Zo(e){return Yo(e)}function Yo(e,t){return e==null?e:{cursor:g(e,"cursor")?e.cursor:void 0,rows:g(e,"rows")?e.rows.map(Vi):void 0}}function Qo(e){return qo(e)}function qo(e,t){return e==null?e:{id:g(e,"id")?e.id:void 0,agentid:g(e,"agentid")?e.agentid:void 0,agent:g(e,"agent")?e.agent:void 0,conversationid:g(e,"conversationid")?e.conversationid:void 0,ticket:g(e,"ticket")?e.ticket:void 0,parentContactid:g(e,"parent_contactid")?e.parent_contactid:void 0,company:g(e,"company")?e.company:void 0,contactid:g(e,"contactid")?e.contactid:void 0,customer:g(e,"customer")?e.customer:void 0,customerFirstname:g(e,"customer_firstname")?e.customer_firstname:void 0,customerLastname:g(e,"customer_lastname")?e.customer_lastname:void 0,customerSystemname:g(e,"customer_systemname")?e.customer_systemname:void 0,agentTicket:g(e,"agent_ticket")?e.agent_ticket:void 0,reportdate:g(e,"reportdate")?e.reportdate:void 0,reportedtime:g(e,"reportedtime")?e.reportedtime:void 0,reportedtimeHhmmss:g(e,"reportedtime_hhmmss")?e.reportedtime_hhmmss:void 0,spenttime:g(e,"spenttime")?e.spenttime:void 0,dateinvoiced:g(e,"dateinvoiced")?e.dateinvoiced:void 0,note:g(e,"note")?e.note:void 0,type:g(e,"type")?e.type:void 0}}var D=globalThis&&globalThis.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):r(c.value).then(a,u)}l((i=i.apply(e,t||[])).next())})};class Wi extends Wt{getAgentsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Lo))})}getAgentsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListRaw(t,n)).value()})}getAgentsGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getAgentsGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getAgentsGridListCountRaw(t,n)).value()})}getCallsSlaLogGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(nn))})}getCallsSlaLogGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListRaw(t,n)).value()})}getCallsSlaLogGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getCallsSlaLogGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getCallsSlaLogGridListCountRaw(t,n)).value()})}getChatsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Oo))})}getChatsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListRaw(t,n)).value()})}getChatsGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getChatsGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getChatsGridListCountRaw(t,n)).value()})}getChatsSlaLogGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(nn))})}getChatsSlaLogGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListRaw(t,n)).value()})}getChatsSlaLogGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getChatsSlaLogGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getChatsSlaLogGridListCountRaw(t,n)).value()})}getContactWidgetsCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getContactWidgetsCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsCountRaw(t,n)).value()})}getContactWidgetsListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Ro))})}getContactWidgetsList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getContactWidgetsListRaw(t,n)).value()})}getCustomerGroupsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Qn))})}getCustomerGroupsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getCustomerGroupsGridListRaw(t,n)).value()})}getDepartmensGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getDepartmensGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getDepartmensGridListCountRaw(t,n)).value()})}getDepartmentsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Mo))})}getDepartmentsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getDepartmentsGridListRaw(t,n)).value()})}getEventLogsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Fo))})}getEventLogsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListRaw(t,n)).value()})}getEventLogsGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getEventLogsGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getEventLogsGridListCountRaw(t,n)).value()})}getInviteAgentsGridListRaw(t,n){return D(this,void 0,void 0,function*(){if(t.departmentId===null||t.departmentId===void 0)throw new Yn("departmentId","Required parameter requestParameters.departmentId was null or undefined when calling getInviteAgentsGridList.");const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.filters!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Po))})}getInviteAgentsGridList(t,n){return D(this,void 0,void 0,function*(){return yield(yield this.getInviteAgentsGridListRaw(t,n)).value()})}getLanguagesGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Uo))})}getLanguagesGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListRaw(t,n)).value()})}getLanguagesGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getLanguagesGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getLanguagesGridListCountRaw(t,n)).value()})}getPlugindGridListRaw(t,n){return D(this,void 0,void 0,function*(){if(t.pluginPurpose===null||t.pluginPurpose===void 0)throw new Yn("pluginPurpose","Required parameter requestParameters.pluginPurpose was null or undefined when calling getPlugindGridList.");const i={};t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.pluginPurpose!==void 0&&(i.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:i},n);return new re(s,o=>o.map(Vo))})}getPlugindGridList(t,n){return D(this,void 0,void 0,function*(){return yield(yield this.getPlugindGridListRaw(t,n)).value()})}getTagsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Qn))})}getTagsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTagsGridListRaw(t,n)).value()})}getTicketsGridDatasetRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>Zo(o))})}getTicketsGridDataset(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridDatasetRaw(t,n)).value()})}getTicketsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Vi))})}getTicketsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListRaw(t,n)).value()})}getTicketsGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getTicketsGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTicketsGridListCountRaw(t,n)).value()})}getTicketsSlaLogGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._cursor=t.cursor),t.sortField!==void 0&&(i._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:i},n);return new re(s,o=>o.map(nn))})}getTicketsSlaLogGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListRaw(t,n)).value()})}getTicketsSlaLogGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getTicketsSlaLogGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTicketsSlaLogGridListCountRaw(t,n)).value()})}getTimeReportsGridListRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.perPage!==void 0&&(i._perPage=t.perPage),t.sortDir!==void 0&&(i._sortDir=t.sortDir),t.sortField!==void 0&&(i._sortField=t.sortField),t.filters!==void 0&&(i._filters=t.filters),t.cursor!==void 0&&(i._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:i},n);return new re(s,o=>o.map(Qo))})}getTimeReportsGridList(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListRaw(t,n)).value()})}getTimeReportsGridListCountRaw(t,n){return D(this,void 0,void 0,function*(){const i={};t.filters!==void 0&&(i._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:i},n);return new re(s,o=>Te(o))})}getTimeReportsGridListCount(t={},n){return D(this,void 0,void 0,function*(){return yield(yield this.getTimeReportsGridListCountRaw(t,n)).value()})}}const qn={Asc:"ASC",Desc:"DESC"},at={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"},jo={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"},We=he(!1),Cn=he([]),Ft=he(null),_t=he(null),Ke=he(!1),ht=he(!1),Ki=he({}),_e=he([]),Xi=he(null),Fe=he(null),Kt=he(!0),Sn=he(jo.Rorder),ea="modulepreload",ta=function(e){return"/"+e},jn={},Nt=function(t,n,i){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=ta(s),s in jn)return;jn[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!i)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":ea,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})},ei=(e,t)=>{const n=e[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((i,r)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(r.bind(null,new Error("Unknown variable dynamic import: "+t)))})},rn="en-US",ti="S",Ji="N",Zi="C",pn="D",na="A";let Se;function ia(e){Se===void 0&&(Se=e,Vn(rn,()=>ei(Object.assign({"../../locales/en-US.json":()=>Nt(()=>import("./en-US.js"),[]),"../../locales/en.json":()=>Nt(()=>import("./en.js"),[])}),`../../locales/${rn}.json`)),Vn(Se.locale,()=>ei(Object.assign({"../../locales/en-US.json":()=>Nt(()=>import("./en-US.js"),[]),"../../locales/en.json":()=>Nt(()=>import("./en.js"),[])}),`../../locales/${Se.locale}.json`)),qs({fallbackLocale:rn,initialLocale:Se.locale}))}function ra(e){return new Date(e.getTime()-e.getTimezoneOffset()*60*1e3)}function Lt(e){return ra(new Date(e))}function sa(){return Se.dateFormat.toUpperCase()}function oa(){return Se.timeFormat}function aa(){return sa()+" "+oa()}function ze(e){return la(e,2)}function la(e,t){let n="";return fa(t).formatToParts(e).forEach(i=>{i.type==="group"?n+=ua():i.type==="decimal"?n+=ca():n+=i.value}),n}function ua(){let e=Se.thousandsSeparator;switch(e==null&&(e=ti),e){case Zi:return",";case ti:return" ";case pn:return".";case na:return"'";case Ji:case"":return" ";default:return e}}function ca(){let e=Se.decimalSeparator;switch(e==null&&(e=pn),e){case Zi:return",";case Ji:case pn:return".";default:return e}}function fa(e){return new Intl.NumberFormat(Se.locale,{minimumFractionDigits:0,maximumFractionDigits:e,useGrouping:!0})}function da(e){le(e,"svelte-mupm4a",".Counter.svelte-mupm4a{display:none}span.svelte-mupm4a{margin-right:5px}.Selection.svelte-mupm4a{color:var(--ticket-selected-textcolor);background-color:var(--ticket-selected-bg);padding:6px 10px;border-radius:4px;font-size:12px;font-style:normal;font-weight:700;line-height:20px}.text.svelte-mupm4a{font-family:'Roboto', sans-serif;font-size:12px;line-height:20px}.many.svelte-mupm4a{color:var(--main-textcolor);padding:2px 12px;border:1px solid var(--menu-hover-bg);border-radius:4px;font-weight:500;font-size:12px;font-family:'Roboto', sans-serif;line-height:20px;cursor:pointer}.many.loading.svelte-mupm4a{border:none;padding:2px 0}@media(min-width: 768px){.Counter.svelte-mupm4a{display:block}}")}function ha(e){let t,n=e[5]("Displaying %count of %allCount",{values:{count:ze(e[7].length),allCount:ze(e[0])}})+"",i;return{c(){t=T("span"),i=q(n),_(t,"class","text svelte-mupm4a")},m(r,s){O(r,t,s),b(t,i)},p(r,s){s&161&&n!==(n=r[5]("Displaying %count of %allCount",{values:{count:ze(r[7].length),allCount:ze(r[0])}})+"")&&se(i,n)},d(r){r&&A(t)}}}function ga(e){let t,n=e[5]("Displaying %count of",{values:{count:ze(e[7].length)}})+"",i,r,s,o=(e[1]?e[5]("Loading..."):e[5]("many"))+"",a,u,l,c;return{c(){t=T("span"),i=q(n),r=U(),s=T("span"),a=q(o),_(t,"class","text svelte-mupm4a"),_(s,"class",u=ue(e[2])+" svelte-mupm4a")},m(f,d){O(f,t,d),b(t,i),O(f,r,d),O(f,s,d),b(s,a),l||(c=de(s,"click",e[8]),l=!0)},p(f,d){d&160&&n!==(n=f[5]("Displaying %count of",{values:{count:ze(f[7].length)}})+"")&&se(i,n),d&34&&o!==(o=(f[1]?f[5]("Loading..."):f[5]("many"))+"")&&se(a,o),d&4&&u!==(u=ue(f[2])+" svelte-mupm4a")&&_(s,"class",u)},d(f){f&&(A(t),A(r),A(s)),l=!1,c()}}}function ma(e){let t,n=e[5]("Loading...")+"",i;return{c(){t=T("span"),i=q(n),_(t,"class","text svelte-mupm4a")},m(r,s){O(r,t,s),b(t,i)},p(r,s){s&32&&n!==(n=r[5]("Loading...")+"")&&se(i,n)},d(r){r&&A(t)}}}function pa(e){let t;function n(s,o){return s[3]?_a:va}let i=n(e),r=i(e);return{c(){r.c(),t=Tt()},m(s,o){r.m(s,o),O(s,t,o)},p(s,o){i===(i=n(s))&&r?r.p(s,o):(r.d(1),r=i(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&A(t),r.d(s)}}}function va(e){let t,n=e[5]("%pCount rows selected",{values:{pCount:e[4].length}})+"",i;return{c(){t=T("span"),i=q(n),_(t,"class","Selection svelte-mupm4a")},m(r,s){O(r,t,s),b(t,i)},p(r,s){s&48&&n!==(n=r[5]("%pCount rows selected",{values:{pCount:r[4].length}})+"")&&se(i,n)},d(r){r&&A(t)}}}function _a(e){let t;function n(s,o){return s[4].length>0?ba:ya}let i=n(e),r=i(e);return{c(){r.c(),t=Tt()},m(s,o){r.m(s,o),O(s,t,o)},p(s,o){i===(i=n(s))&&r?r.p(s,o):(r.d(1),r=i(s),r&&(r.c(),r.m(t.parentNode,t)))},d(s){s&&A(t),r.d(s)}}}function ya(e){let t,n=e[5]("all rows selected")+"",i;return{c(){t=T("span"),i=q(n),_(t,"class","Selection svelte-mupm4a")},m(r,s){O(r,t,s),b(t,i)},p(r,s){s&32&&n!==(n=r[5]("all rows selected")+"")&&se(i,n)},d(r){r&&A(t)}}}function ba(e){let t,n=e[5]("all rows selected except %pCount rows",{values:{pCount:e[4].length}})+"",i;return{c(){t=T("span"),i=q(n),_(t,"class","Selection svelte-mupm4a")},m(r,s){O(r,t,s),b(t,i)},p(r,s){s&48&&n!==(n=r[5]("all rows selected except %pCount rows",{values:{pCount:r[4].length}})+"")&&se(i,n)},d(r){r&&A(t)}}}function wa(e){let t;function n(s,o){return s[3]||s[4].length>0?pa:s[6]?ma:s[0]==null?ga:ha}let i=n(e),r=i(e);return{c(){t=T("div"),r.c(),_(t,"class","Counter svelte-mupm4a")},m(s,o){O(s,t,o),r.m(t,null)},p(s,[o]){i===(i=n(s))&&r?r.p(s,o):(r.d(1),r=i(s),r&&(r.c(),r.m(t,null)))},i:K,o:K,d(s){s&&A(t),r.d()}}}function xa(e,t,n){let i,r,s,o,a,u,l;V(e,_t,v=>n(9,i=v)),V(e,Ft,v=>n(10,r=v)),V(e,We,v=>n(3,s=v)),V(e,Cn,v=>n(4,o=v)),V(e,we,v=>n(5,a=v)),V(e,Ke,v=>n(6,u=v)),V(e,_e,v=>n(7,l=v));let c=null,f=!1,d="many";function h(){n(0,c=null)}async function p(){n(2,d="many loading"),n(1,f=!0);let v=await r.getTicketsGridListCount({filters:i,timezoneOffset:new Date().getTimezoneOffset()});n(0,c=v.count),n(1,f=!1)}return e.$$.update=()=>{e.$$.dirty&512&&i&&h()},[c,f,d,s,o,a,u,l,p,i]}class Ta extends ie{constructor(t){super(),ne(this,t,xa,wa,ee,{},da)}}async function je(e=!1){if(!(ke(Ke)||!ke(Ft))&&(e&&(Fe.set(null),ht.set(!1)),!(!ke(Fe)&&ke(ht)))){Ke.set(!0);try{const n=await(await ke(Ft).getTicketsGridDatasetRaw(ka())).value();e&&_e.set([]),_e.set([...ke(_e),...n.rows]),Fe.set(n.cursor),ht.set(!0)}catch(t){Xi.set(t.toString())}Ke.set(!1)}}function ka(){return{perPage:20,sortDir:ke(Kt)?qn.Asc:qn.Desc,filters:ke(_t),sortField:ke(Sn),cursor:ke(Fe)?ke(Fe):""}}function Ea(e){le(e,"svelte-oyjuek",".Head.svelte-oyjuek.svelte-oyjuek{display:flex;position:sticky;top:0;color:var(--panel_text_color);margin-bottom:20px;align-items:center;font-size:14px;font-family:'Roboto', sans-serif;border-bottom:1px solid var(--main-lighter-textcolor);padding:0 23px 6px 44px}.FilterIcon{font-size:20px;margin-right:2px}.headCheckbox.svelte-oyjuek.svelte-oyjuek{width:20px;margin-right:16px}.headCheckbox.svelte-oyjuek input[type=checkbox].svelte-oyjuek{vertical-align:middle;cursor:pointer;margin:3px}button.svelte-oyjuek.svelte-oyjuek{border:none;background:none;font-size:13px;font-weight:400;color:var(--main-lighter-textcolor)}.spinner.svelte-oyjuek.svelte-oyjuek{font-size:16px;cursor:pointer}.rightPanel.svelte-oyjuek.svelte-oyjuek{display:flex;margin-inline-start:auto}.Sorting.svelte-oyjuek.svelte-oyjuek{cursor:pointer;text-align:left;font-weight:bold}.loading.svelte-oyjuek.svelte-oyjuek{animation-name:svelte-oyjuek-rotate;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes svelte-oyjuek-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@media screen and (min-width: 768px){.headCheckbox.svelte-oyjuek.svelte-oyjuek{margin-right:42px}}")}function Ca(e){let t,n,i,r,s,o,a,u,l,c,f,d,h,p,v,y,m,w,C,L;return s=new Le({props:{iconLaClassName:"la-filter",className:"FilterIcon"}}),c=new Le({props:{iconLaClassName:"la-show"}}),h=new Ta({}),y=new Le({props:{iconLaClassName:"la-refresh"}}),{c(){t=T("div"),n=T("div"),i=T("input"),r=U(),P(s.$$.fragment),o=U(),a=T("button"),u=q(e[0]),l=U(),P(c.$$.fragment),f=U(),d=T("div"),P(h.$$.fragment),p=U(),v=T("button"),P(y.$$.fragment),_(i,"type","checkbox"),_(i,"class","svelte-oyjuek"),_(n,"class","headCheckbox svelte-oyjuek"),_(a,"class","Sorting svelte-oyjuek"),_(v,"class","spinner svelte-oyjuek"),_(v,"title",m=e[4]("Reload")),Rn(v,"loading",e[3]),_(d,"class","rightPanel svelte-oyjuek"),_(t,"class","Head svelte-oyjuek")},m(H,Z){O(H,t,Z),b(t,n),b(n,i),i.checked=e[2],b(t,r),F(s,t,null),b(t,o),b(t,a),b(a,u),e[8](a),b(t,l),F(c,t,null),b(t,f),b(t,d),F(h,d,null),b(d,p),b(d,v),F(y,v,null),w=!0,C||(L=[de(i,"change",e[7]),de(i,"click",e[5]),de(a,"click",e[6]),de(v,"click",e[9])],C=!0)},p(H,[Z]){Z&4&&(i.checked=H[2]),(!w||Z&1)&&se(u,H[0]),(!w||Z&16&&m!==(m=H[4]("Reload")))&&_(v,"title",m),(!w||Z&8)&&Rn(v,"loading",H[3])},i(H){w||(x(s.$$.fragment,H),x(c.$$.fragment,H),x(h.$$.fragment,H),x(y.$$.fragment,H),w=!0)},o(H){k(s.$$.fragment,H),k(c.$$.fragment,H),k(h.$$.fragment,H),k(y.$$.fragment,H),w=!1},d(H){H&&A(t),$(s),e[8](null),$(c),$(h),$(y),C=!1,Ae(L)}}}function Sa(e,t,n){let i,r,s;V(e,Kt,y=>n(12,y)),V(e,We,y=>n(2,i=y)),V(e,Ke,y=>n(3,r=y)),V(e,we,y=>n(4,s=y));let{currentFilter:o}=t;const a=pi();let u,l,c;function f(){We.set(!i),_e.update(y=>y.map(m=>({...m,__selected:i})))}function d(){u=l.getBoundingClientRect();let m=u.bottom-58,w=u.left-7;window.innerWidth>=768&&(w-=258),c=`position: absolute; top: ${m}px; left: ${w}px;`,a("openModal",{dialogStyles:c})}function h(){i=this.checked,We.set(i)}function p(y){Xe[y?"unshift":"push"](()=>{l=y,n(1,l)})}const v=()=>je(!0);return e.$$set=y=>{"currentFilter"in y&&n(0,o=y.currentFilter)},[o,l,i,r,s,f,d,h,p,v]}class Na extends ie{constructor(t){super(),ne(this,t,Sa,Ca,ee,{currentFilter:0},Ea)}}function He(e){switch(e){case"A":return{bg:"var(--ticket-status-answered-background)",text:"var(--ticket-status-answered-text)",border:"var(--ticket-status-answered-border)"};case"T":return{bg:"var(--ticket-status-chat-background)",text:"var(--ticket-status-chat-text)",border:"var(--ticket-status-chat-border)"};case"P":return{bg:"var(--ticket-status-phone-background)",text:"var(--ticket-status-phone-text)",border:"var(--ticket-status-phone-border)"};case"X":return{bg:"var(--ticket-status-deleted-background)",text:"var(--ticket-status-deleted-text)",border:"var(--ticket-status-deleted-border)"};case"B":return{bg:"var(--ticket-status-new-background)",text:"var(--ticket-status-new-text)",border:"var(--ticket-status-new-border)"};case"I":return{bg:"var(--ticket-status-deleted-background)",text:"var(--ticket-status-deleted-text)",border:"var(--ticket-status-deleted-border)"};case"R":return{bg:"var(--ticket-status-resolved-background)",text:"var(--ticket-status-resolved-text)",border:"var(--ticket-status-resolved-border)"};case"N":return{bg:"var(--ticket-status-new-background)",text:"var(--ticket-status-new-text)",border:"var(--ticket-status-new-border)"};case"C":return{bg:"var(--ticket-status-open-background)",text:"var(--ticket-status-open-text)",border:"var(--ticket-status-open-border)"};case"W":return{bg:"var(--ticket-status-postponed-background)",text:"var(--ticket-status-postponed-text)",border:"var(--ticket-status-postponed-border)"};default:return{bg:"",text:"",border:""}}}const La=()=>{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]},Aa=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 Oa(e){le(e,"svelte-hbozhk",".wrapper.svelte-hbozhk{position:relative;width:var(--size);height:var(--size)}.innerImage.svelte-hbozhk,.innerInitials.svelte-hbozhk,.imageLoading.svelte-hbozhk{display:block;width:100%;height:100%;border-radius:var(--borderRadius)}.innerInitials.svelte-hbozhk{line-height:var(--size);background-color:var(--bgColor);color:var(--textColor);text-align:center;font-size:calc(var(--size) / (var(--abbrLength) + 0.5))}.imageLoading.svelte-hbozhk{background-color:var(--bgColor)}.imageLoading.svelte-hbozhk::before{content:'';display:block;height:100%;width:100%;background:linear-gradient(90deg, transparent, #ffffff38, transparent);position:absolute;top:0;left:0;animation:svelte-hbozhk-skeleton-animation 1.2s linear infinite}@keyframes svelte-hbozhk-skeleton-animation{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}")}function Ha(e){let t;return{c(){t=T("div"),t.textContent=`${e[10]}`,_(t,"class","innerInitials svelte-hbozhk")},m(n,i){O(n,t,i)},p:K,d(n){n&&A(t)}}}function Ra(e){let t,n,i,r,s,o;return{c(){t=T("div"),n=T("img"),_(n,"alt",""),_(n,"class",ue("innerImage")+" svelte-hbozhk"),Dt(n.src,i=e[2])||_(n,"src",i),_(t,"class",r=ue(e[8]?"imageLoading":"")+" svelte-hbozhk")},m(a,u){O(a,t,u),b(t,n),s||(o=[de(n,"error",e[15]),de(n,"load",e[16])],s=!0)},p(a,u){u&4&&!Dt(n.src,i=a[2])&&_(n,"src",i),u&256&&r!==(r=ue(a[8]?"imageLoading":"")+" svelte-hbozhk")&&_(t,"class",r)},d(a){a&&A(t),s=!1,Ae(o)}}}function Da(e){let t,n;function i(o,a){return o[2]&&!o[7]?Ra:Ha}let r=i(e),s=r(e);return{c(){t=T("div"),s.c(),_(t,"aria-label",e[1]),_(t,"class","wrapper svelte-hbozhk"),_(t,"style",n=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){O(o,t,a),s.m(t,null)},p(o,[a]){r===(r=i(o))&&s?s.p(o,a):(s.d(1),s=r(o),s&&(s.c(),s.m(t,null))),a&2&&_(t,"aria-label",o[1]),a&125&&n!==(n=o[0]+"--borderRadius:"+(o[6]?0:o[5])+"; --size:"+o[4]+"; --bgColor:"+o[9]+"; --src:"+o[2]+"; --textColor:"+o[3]+"; --abbrLength:"+o[11])&&_(t,"style",n)},i:K,o:K,d(o){o&&A(t),s.d()}}}function Ia(e,t,n){let{style:i=""}=t,{name:r="Avatar"}=t,{initials:s}=t,{src:o}=t,{bgColor:a="lightGrey"}=t,{textColor:u="white"}=t,{size:l="50px"}=t,{borderRadius:c="50%"}=t,{square:f=!1}=t,{randomBgColor:d=!1}=t;const h=d?La():a,p=s||Aa(r),v=p.length;let y=!1,m=!0;const w=()=>n(7,y=!0),C=()=>n(8,m=!1);return e.$$set=L=>{"style"in L&&n(0,i=L.style),"name"in L&&n(1,r=L.name),"initials"in L&&n(12,s=L.initials),"src"in L&&n(2,o=L.src),"bgColor"in L&&n(13,a=L.bgColor),"textColor"in L&&n(3,u=L.textColor),"size"in L&&n(4,l=L.size),"borderRadius"in L&&n(5,c=L.borderRadius),"square"in L&&n(6,f=L.square),"randomBgColor"in L&&n(14,d=L.randomBgColor)},[i,r,o,u,l,c,f,y,m,h,p,v,s,a,d,w,C]}class Ma extends ie{constructor(t){super(),ne(this,t,Ia,Da,ee,{style:0,name:1,initials:12,src:2,bgColor:13,textColor:3,size:4,borderRadius:5,square:6,randomBgColor:14},Oa)}}function Ba(e){let t,n;return t=new Ma({props:{bgColor:e[0],name:e[1],src:e[2],initials:e[3],size:"40px"}}),{c(){P(t.$$.fragment)},m(i,r){F(t,i,r),n=!0},p(i,[r]){const s={};r&1&&(s.bgColor=i[0]),r&2&&(s.name=i[1]),r&4&&(s.src=i[2]),r&8&&(s.initials=i[3]),t.$set(s)},i(i){n||(x(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){$(t,i)}}}function Fa(e,t,n){let{bgColor:i}=t,{name:r}=t,{src:s}=t,{initials:o}=t;return e.$$set=a=>{"bgColor"in a&&n(0,i=a.bgColor),"name"in a&&n(1,r=a.name),"src"in a&&n(2,s=a.src),"initials"in a&&n(3,o=a.initials)},[i,r,s,o]}class $a extends ie{constructor(t){super(),ne(this,t,Fa,Ba,ee,{bgColor:0,name:1,src:2,initials:3})}}var Yi={exports:{}},Qi={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,i){return n<<i|n>>>32-i},rotr:function(n,i){return n<<32-i|n>>>i},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var i=0;i<n.length;i++)n[i]=t.endian(n[i]);return n},randomBytes:function(n){for(var i=[];n>0;n--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(n){for(var i=[],r=0,s=0;r<n.length;r++,s+=8)i[s>>>5]|=n[r]<<24-s%32;return i},wordsToBytes:function(n){for(var i=[],r=0;r<n.length*32;r+=8)i.push(n[r>>>5]>>>24-r%32&255);return i},bytesToHex:function(n){for(var i=[],r=0;r<n.length;r++)i.push((n[r]>>>4).toString(16)),i.push((n[r]&15).toString(16));return i.join("")},hexToBytes:function(n){for(var i=[],r=0;r<n.length;r+=2)i.push(parseInt(n.substr(r,2),16));return i},bytesToBase64:function(n){for(var i=[],r=0;r<n.length;r+=3)for(var s=n[r]<<16|n[r+1]<<8|n[r+2],o=0;o<4;o++)r*8+o*6<=n.length*8?i.push(e.charAt(s>>>6*(3-o)&63)):i.push("=");return i.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],r=0,s=0;r<n.length;s=++r%4)s!=0&&i.push((e.indexOf(n.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|e.indexOf(n.charAt(r))>>>6-s*2);return i}};Qi.exports=t})();var Pa=Qi.exports,vn={utf8:{stringToBytes:function(e){return vn.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(vn.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n)&255);return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},ni=vn;/*!
6
6
  * Determine if an object is a Buffer
7
7
  *
8
8
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -1,44 +1,43 @@
1
1
  {
2
- "Created": "",
3
- "Changed": "",
4
- "No text for preview": "",
5
- "No name": "",
6
- "No email": "",
7
- "No Company": "",
8
- "No tickets found": "",
9
- "There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.": "",
10
- "Change filter": "",
11
- "Configure chat button": "",
12
- "Reload": "",
13
- "First answer": "",
14
- "No SLA": "",
15
- "Answered": "",
16
- "Chatting": "",
17
- "Calling": "",
18
- "Deleted": "",
19
- "Spam": "",
20
- "Init": "",
21
- "Resolved": "",
22
- "New": "",
23
- "Open": "",
24
- "Postponed": "",
25
- "Invalid data": "",
2
+ "Created": "Created",
3
+ "Changed": "Changed",
4
+ "No text for preview": "No text for preview",
5
+ "No name": "No name",
6
+ "No email": "No email",
7
+ "No Company": "No Company",
8
+ "No tickets found": "No tickets found",
9
+ "There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.": "There is no tickets to be displayed. Change filter or place chat widget on your website to reach customers.",
10
+ "Change filter": "Change filter",
11
+ "Configure chat button": "Configure chat button",
12
+ "Reload": "Reload",
13
+ "First answer": "First answer",
14
+ "No SLA": "No SLA",
15
+ "Answered": "Answered",
16
+ "Chatting": "Chatting",
17
+ "Calling": "Calling",
18
+ "Deleted": "Deleted",
19
+ "Spam": "Spam",
20
+ "Init": "Init",
21
+ "Resolved": "Resolved",
22
+ "New": "New",
23
+ "Open": "Open",
24
+ "Postponed": "Postponed",
25
+ "Invalid data": "Invalid data",
26
26
  "all rows selected except %pCount rows": "all rows selected except {pCount, plural, one {1 row} other {# rows}}",
27
- "all rows selected": "",
27
+ "all rows selected": "all rows selected",
28
28
  "%pCount rows selected": "{pCount, plural, one {1 row} other {# rows}} selected",
29
- "Loading...": "",
29
+ "Loading...": "Loading...",
30
30
  "Displaying %count of": "Displaying {count} of",
31
- "Loading..": "",
32
- "many": "",
31
+ "many": "many",
33
32
  "Displaying %count of %allCount": "Displaying {count} of {allCount}",
34
- "Loading failed. Please try again later.": "",
35
- "No results match your filter. Try broadening the search criteria.": "",
36
- "All data loaded": "",
37
- "Load more data": "",
38
- "Importance": "",
39
- "Date created - Newest": "",
40
- "Date created - Oldest": "",
41
- "Date changed - Newest": "",
42
- "Date changed - Oldest": "",
43
- "Sort by": ""
33
+ "Loading failed. Please try again later.": "Loading failed. Please try again later.",
34
+ "No results match your filter. Try broadening the search criteria.": "No results match your filter. Try broadening the search criteria.",
35
+ "All data loaded": "All data loaded",
36
+ "Load more data": "Load more data",
37
+ "Importance": "Importance",
38
+ "Date created - Newest": "Date created - Newest",
39
+ "Date created - Oldest": "Date created - Oldest",
40
+ "Date changed - Newest": "Date changed - Newest",
41
+ "Date changed - Oldest": "Date changed - Oldest",
42
+ "Sort by": "Sort by"
44
43
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qualityunit/liveagent-ticket-grid",
3
3
  "private": false,
4
- "version": "0.0.66",
4
+ "version": "0.0.68",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",