diff --git a/html/index.js b/html/index.js
index efee22cb..f8a47dc1 100644
--- a/html/index.js
+++ b/html/index.js
@@ -1,6 +1,6 @@
-(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function l(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=l(i);fetch(i.href,s)}})();function q(){}const Pt=e=>e;function Vt(e,t){for(const l in t)e[l]=t[l];return e}function Mt(e){return e()}function Ye(){return Object.create(null)}function Z(e){e.forEach(Mt)}function Ne(e){return typeof e=="function"}function ie(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Ht(e){return Object.keys(e).length===0}function St(e,...t){if(e==null)return q;const l=e.subscribe(...t);return l.unsubscribe?()=>l.unsubscribe():l}function Y(e,t,l){e.$$.on_destroy.push(St(t,l))}function Gt(e,t,l,n){if(e){const i=Nt(e,t,l,n);return e[0](i)}}function Nt(e,t,l,n){return e[1]&&n?Vt(l.ctx.slice(),e[1](n(t))):l.ctx}function Yt(e,t,l,n){if(e[2]&&n){const i=e[2](n(l));if(t.dirty===void 0)return i;if(typeof i=="object"){const s=[],r=Math.max(t.dirty.length,i.length);for(let a=0;a32){const t=[],l=e.ctx.length/32;for(let n=0;nwindow.performance.now():()=>Date.now(),Oe=Dt?e=>requestAnimationFrame(e):q;const ae=new Set;function At(e){ae.forEach(t=>{t.c(e)||(ae.delete(t),t.f())}),ae.size!==0&&Oe(At)}function Jt(e){let t;return ae.size===0&&Oe(At),{promise:new Promise(l=>{ae.add(t={c:e,f:l})}),abort(){ae.delete(t)}}}function d(e,t){e.appendChild(t)}function Ct(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Kt(e){const t=b("style");return Qt(Ct(e),t),t.sheet}function Qt(e,t){return d(e.head||e,t),t.sheet}function R(e,t,l){e.insertBefore(t,l||null)}function S(e){e.parentNode&&e.parentNode.removeChild(e)}function _e(e,t){for(let l=0;le.removeEventListener(t,l,n)}function p(e,t,l){l==null?e.removeAttribute(t):e.getAttribute(t)!==l&&e.setAttribute(t,l)}function Xt(e){return Array.from(e.childNodes)}function B(e,t){t=""+t,e.data!==t&&(e.data=t)}function J(e,t,l){e.classList[l?"add":"remove"](t)}function Zt(e,t,{bubbles:l=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,l,n,t),i}const Ie=new Map;let Me=0;function xt(e){let t=5381,l=e.length;for(;l--;)t=(t<<5)-t^e.charCodeAt(l);return t>>>0}function el(e,t){const l={stylesheet:Kt(t),rules:{}};return Ie.set(e,l),l}function We(e,t,l,n,i,s,r,a=0){const f=16.666/n;let o=`{
-`;for(let $=0;$<=1;$+=f){const y=t+(l-t)*s($);o+=$*100+`%{${r(y,1-y)}}
-`}const u=o+`100% {${r(l,1-l)}}
-}`,c=`__svelte_${xt(u)}_${a}`,m=Ct(e),{stylesheet:h,rules:g}=Ie.get(m)||el(m,e);g[c]||(g[c]=!0,h.insertRule(`@keyframes ${c} ${u}`,h.cssRules.length));const k=e.style.animation||"";return e.style.animation=`${k?`${k}, `:""}${c} ${n}ms linear ${i}ms 1 both`,Me+=1,c}function tl(e,t){const l=(e.style.animation||"").split(", "),n=l.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),i=l.length-n.length;i&&(e.style.animation=n.join(", "),Me-=i,Me||ll())}function ll(){Oe(()=>{Me||(Ie.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&S(t)}),Ie.clear())})}let we;function ve(e){we=e}function Ue(){if(!we)throw new Error("Function called outside component initialization");return we}function Fe(e){Ue().$$.on_mount.push(e)}function nl(e){Ue().$$.after_update.push(e)}function il(e){Ue().$$.on_destroy.push(e)}const oe=[],qe=[];let fe=[];const Je=[],rl=Promise.resolve();let Re=!1;function sl(){Re||(Re=!0,rl.then(Rt))}function te(e){fe.push(e)}const Ae=new Set;let re=0;function Rt(){if(re!==0)return;const e=we;do{try{for(;ree.indexOf(n)===-1?t.push(n):l.push(n)),l.forEach(n=>n()),fe=t}let me;function fl(){return me||(me=Promise.resolve(),me.then(()=>{me=null})),me}function Ce(e,t,l){e.dispatchEvent(Zt(`${t?"intro":"outro"}${l}`))}const Ee=new Set;let X;function le(){X={r:0,c:[],p:X}}function ne(){X.r||Z(X.c),X=X.p}function O(e,t){e&&e.i&&(Ee.delete(e),e.i(t))}function V(e,t,l,n){if(e&&e.o){if(Ee.has(e))return;Ee.add(e),X.c.push(()=>{Ee.delete(e),n&&(l&&e.d(1),n())}),e.o(t)}else n&&n()}const cl={duration:0};function ce(e,t,l,n){const i={direction:"both"};let s=t(e,l,i),r=n?0:1,a=null,f=null,o=null;function u(){o&&tl(e,o)}function c(h,g){const k=h.b-r;return g*=Math.abs(k),{a:r,b:h.b,d:k,duration:g,start:h.start,end:h.start+g,group:h.group}}function m(h){const{delay:g=0,duration:k=300,easing:$=Pt,tick:y=q,css:j}=s||cl,E={start:qt()+g,b:h};h||(E.group=X,X.r+=1),a||f?f=E:(j&&(u(),o=We(e,r,h,k,g,$,j)),h&&y(0,1),a=c(E,k),te(()=>Ce(e,h,"start")),Jt(w=>{if(f&&w>f.start&&(a=c(f,k),f=null,Ce(e,a.b,"start"),j&&(u(),o=We(e,r,a.b,a.duration,0,$,s.css))),a){if(w>=a.end)y(r=a.b,1-r),Ce(e,a.b,"end"),f||(a.b?u():--a.group.r||Z(a.group.c)),a=null;else if(w>=a.start){const U=w-a.start;r=a.a+a.d*$(U/a.duration),y(r,1-r)}}return!!(a||f)}))}return{run(h){Ne(s)?fl().then(()=>{s=s(i),m(h)}):m(h)},end(){u(),a=f=null}}}function ul(e,t){V(e,1,1,()=>{t.delete(e.key)})}function dl(e,t,l,n,i,s,r,a,f,o,u,c){let m=e.length,h=s.length,g=m;const k={};for(;g--;)k[e[g].key]=g;const $=[],y=new Map,j=new Map,E=[];for(g=h;g--;){const _=c(i,s,g),F=l(_);let v=r.get(F);v?n&&E.push(()=>v.p(_,t)):(v=o(F,_),v.c()),y.set(F,$[g]=v),F in k&&j.set(F,Math.abs(g-k[F]))}const w=new Set,U=new Set;function M(_){O(_,1),_.m(a,u),r.set(_.key,_),u=_.first,h--}for(;m&&h;){const _=$[h-1],F=e[m-1],v=_.key,D=F.key;_===F?(u=_.first,m--,h--):y.has(D)?!r.has(v)||w.has(v)?M(_):U.has(D)?m--:j.get(v)>j.get(D)?(U.add(v),M(_)):(w.add(D),m--):(f(F,r),m--)}for(;m--;){const _=e[m];y.has(_.key)||f(_,r)}for(;h;)M($[h-1]);return Z(E),$}function $e(e){e&&e.c()}function ue(e,t,l,n){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,l),n||te(()=>{const r=e.$$.on_mount.map(Mt).filter(Ne);e.$$.on_destroy?e.$$.on_destroy.push(...r):Z(r),e.$$.on_mount=[]}),s.forEach(te)}function de(e,t){const l=e.$$;l.fragment!==null&&(al(l.after_update),Z(l.on_destroy),l.fragment&&l.fragment.d(t),l.on_destroy=l.fragment=null,l.ctx=[])}function _l(e,t){e.$$.dirty[0]===-1&&(oe.push(e),sl(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const g=h.length?h[0]:m;return o.ctx&&i(o.ctx[c],o.ctx[c]=g)&&(!o.skip_bound&&o.bound[c]&&o.bound[c](g),u&&_l(e,c)),m}):[],o.update(),u=!0,Z(o.before_update),o.fragment=n?n(o.ctx):!1,t.target){if(t.hydrate){const c=Xt(t.target);o.fragment&&o.fragment.l(c),c.forEach(S)}else o.fragment&&o.fragment.c();t.intro&&O(e.$$.fragment),ue(e,t.target,t.anchor,t.customElement),Rt()}ve(f)}class he{$destroy(){de(this,1),this.$destroy=q}$on(t,l){if(!Ne(l))return q;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(l),()=>{const i=n.indexOf(l);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!Ht(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function ge(e,t){const l=n=>{const{action:i,data:s}=n.data;i===e&&t(s)};Fe(()=>window.addEventListener("message",l)),il(()=>window.removeEventListener("message",l))}const se=[];function pl(e,t){return{subscribe:W(e,t).subscribe}}function W(e,t=q){let l;const n=new Set;function i(a){if(ie(e,a)&&(e=a,l)){const f=!se.length;for(const o of n)o[1](),se.push(o,e);if(f){for(let o=0;o{n.delete(o),n.size===0&&l&&(l(),l=null)}}return{set:i,update:s,subscribe:r}}function hl(e,t,l){const n=!Array.isArray(e),i=n?[e]:e,s=t.length<2;return pl(l,r=>{let a=!1;const f=[];let o=0,u=q;const c=()=>{if(o)return;u();const h=t(n?f[0]:f,r);s?r(h):u=Ne(h)?h:q},m=i.map((h,g)=>St(h,k=>{f[g]=k,o&=~(1<{o|=1<t.filter(l=>l.data.id!==e))}const Ve=W(null),He=W(null),gl=hl([Ve,jt,Be],([e,t,l])=>!e||t===null||!l?[]:e.slice(-t).filter(n=>n.message&&n.jobs.includes(l.job.type)).reverse());let Te=!1;De.subscribe(e=>{Te=e});let Ot="";je.subscribe(e=>{Ot=e});async function K(e,t={},l){if(Te==!0&&l||Te==!0)return Promise.resolve(l||{});const n={method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)},i=window.GetParentResourceName?window.GetParentResourceName():Ot;return await(await fetch(`https://${i}/${e}`,n)).json()}function Xe(e){let t,l;const n=e[2].default,i=Gt(n,e,e[1],null);return{c(){t=b("main"),i&&i.c(),p(t,"class","svelte-a4h32x")},m(s,r){R(s,t,r),i&&i.m(t,null),l=!0},p(s,r){i&&i.p&&(!l||r&2)&&zt(i,n,s,s[1],l?Yt(n,s[1],r,null):Wt(s[1]),null)},i(s){l||(O(i,s),l=!0)},o(s){V(i,s),l=!1},d(s){s&&S(t),i&&i.d(s)}}}function vl(e){let t,l,n=e[0]&&Xe(e);return{c(){n&&n.c(),t=x()},m(i,s){n&&n.m(i,s),R(i,t,s),l=!0},p(i,[s]){i[0]?n?(n.p(i,s),s&1&&O(n,1)):(n=Xe(i),n.c(),O(n,1),n.m(t.parentNode,t)):n&&(le(),V(n,1,1,()=>{n=null}),ne())},i(i){l||(O(n),l=!0)},o(i){V(n),l=!1},d(i){n&&n.d(i),i&&S(t)}}}function bl(e,t,l){let n,i;Y(e,De,f=>l(4,n=f)),Y(e,ee,f=>l(0,i=f));let{$$slots:s={},$$scope:r}=t,a;return ee.subscribe(f=>{a=f}),ge("setVisible",f=>{ee.set(f)}),Fe(()=>{const f=o=>{a&&o.code==="Escape"&&(K("hideUI"),ee.set(!1)),!a&&o.code==="Escape"&&n&&(K("setVisible",!0),ee.set(!0))};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)}),e.$$set=f=>{"$$scope"in f&&l(1,r=f.$$scope)},[i,r,s]}class yl extends he{constructor(t){super(),pe(this,t,bl,vl,ie,{})}}const wl=()=>!window.invokeNative,Le=(e,t=0)=>{if(wl())for(const l of e)setTimeout(()=>{window.dispatchEvent(new MessageEvent("message",{data:{action:l.action,data:l.data}}))},t)};function Ze(e,t,l){const n=e.slice();return n[4]=t[l],n}function xe(e,t,l){const n=e.slice();return n[7]=t[l],n}function et(e){let t,l=e[1],n=[];for(let i=0;i{l(0,n=!n)},a=>{if(a.custom==!0){a.customFunction();return}Le([{action:a.action,data:a.data}])}]}class El extends he{constructor(t){super(),pe(this,t,kl,$l,ie,{})}}function Il(e,t,l){let n;Y(e,ee,s=>l(0,n=s)),Le([{action:"setVisible",data:!0}]),Le([{action:"setBrowserMode",data:!0}]);function i(s){s.key==="="&&ye(ee,n=!0,n)}return ge("setBrowserMode",s=>{De.set(s),console.log("browser mode enabled"),s?window.addEventListener("keydown",i):window.removeEventListener("keydown",i)}),ge("newCall",s=>{Pe.update(r=>(r=r||[],r.push(s),r))}),ge("setDispatchs",s=>{Ve.set(s)}),ge("setupUI",s=>{Be.set(s.player),He.set(s.locales),Tt.set(s.keybind),jt.set(s.maxCallList),Lt.set(s.shortCalls)}),[]}class Ml extends he{constructor(t){super(),pe(this,t,Il,null,ie,{})}}function Ut(e){const t=e-1;return t*t*t+1}function Se(e,{delay:t=0,duration:l=400,easing:n=Ut,x:i=0,y:s=0,opacity:r=0}={}){const a=getComputedStyle(e),f=+a.opacity,o=a.transform==="none"?"":a.transform,u=f*(1-r),[c,m]=ze(i),[h,g]=ze(s);return{delay:t,duration:l,easing:n,css:(k,$)=>`
- transform: ${o} translate(${(1-k)*c}${m}, ${(1-k)*h}${g});
- opacity: ${f-u*$}`}}function nt(e,{delay:t=0,duration:l=400,easing:n=Ut,axis:i="y"}={}){const s=getComputedStyle(e),r=+s.opacity,a=i==="y"?"height":"width",f=parseFloat(s[a]),o=i==="y"?["top","bottom"]:["left","right"],u=o.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(s[`padding${u[0]}`]),m=parseFloat(s[`padding${u[1]}`]),h=parseFloat(s[`margin${u[0]}`]),g=parseFloat(s[`margin${u[1]}`]),k=parseFloat(s[`border${u[0]}Width`]),$=parseFloat(s[`border${u[1]}Width`]);return{delay:t,duration:l,easing:n,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*r};${a}: ${y*f}px;padding-${o[0]}: ${y*c}px;padding-${o[1]}: ${y*m}px;margin-${o[0]}: ${y*h}px;margin-${o[1]}: ${y*g}px;border-${o[0]}-width: ${y*k}px;border-${o[1]}-width: ${y*$}px;`}}const Sl=["January","February","March","April","May","June","July","August","September","October","November","December"];function ke(e,t=!1,l=!1){const n=e.getDate(),i=Sl[e.getMonth()],s=e.getFullYear(),r=e.getHours();let a=e.getMinutes();return a<10&&(a=`0${a}`),t?`${t} at ${r}:${a}`:l?`${n}. ${i} at ${r}:${a}`:`${n}. ${i} ${s}. at ${r}:${a}`}function Ft(e){if(!e)return"Unknown";let t;try{t=typeof e=="object"?e:new Date(e)}catch{return"Invalid date"}if(isNaN(t))return"Invalid date";const l=864e5,n=new Date,i=new Date(n-l),s=Math.round((n-t)/1e3),r=Math.round(s/60),a=n.toDateString()===t.toDateString(),f=i.toDateString()===t.toDateString(),o=n.getFullYear()===t.getFullYear();return s<5?"Just Now":s<60?`${s} Seconds ago`:s<90?"A minute ago":r<60?`${r} Minutes ago`:a?ke(t,"Today"):f?ke(t,"Yesterday"):o?ke(t,!1,!0):ke(t)}function it(e,t,l){const n=e.slice();return n[20]=t[l],n}function rt(e,t,l){const n=e.slice();return n[23]=t[l],n}function st(e,t,l){const n=e.slice();return n[26]=t[l],n}function ot(e){let t,l,n=e[6],i=[];for(let r=0;rV(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r0&&ut(e);function U(v,D){return D&320&&(h=null),h==null&&(h=!!Bt(v[20].units,v[8].citizenid)),h?Dl:Nl}let M=U(e,-1),_=M(e);function F(){return e[19](e[20])}return{c(){t=b("div"),w&&w.c(),l=I(),n=b("button"),i=b("p"),r=C(s),a=I(),o=C(f),c=I(),m=b("p"),_.c(),k=I(),p(i,"class",u="mx-[2vh] px-[2vh] py-[0.2vh] rounded-full "+(e[20].priority==1?" bg-accent_dark_red":" bg-accent_dark_green")),p(m,"class","ml-[3vh]"),p(n,"class",g="w-full h-[5vh] "+(e[20].priority==1?" bg-priority_quaternary":" bg-accent_green")+" flex items-center font-medium"),p(t,"class","mb-[1vh]")},m(v,D){R(v,t,D),w&&w.m(t,null),d(t,l),d(t,n),d(n,i),d(i,r),d(i,a),d(i,o),d(n,c),d(n,m),_.m(m,null),d(t,k),y=!0,j||(E=Q(n,"click",F),j=!0)},p(v,D){e=v,e[20].units.length>0?w?w.p(e,D):(w=ut(e),w.c(),w.m(t,l)):w&&(w.d(1),w=null),(!y||D&64)&&s!==(s=e[20].units.length+"")&&B(r,s),(!y||D&128)&&f!==(f=e[7].units+"")&&B(o,f),(!y||D&64&&u!==(u="mx-[2vh] px-[2vh] py-[0.2vh] rounded-full "+(e[20].priority==1?" bg-accent_dark_red":" bg-accent_dark_green")))&&p(i,"class",u),M===(M=U(e,D))&&_?_.p(e,D):(_.d(1),_=M(e),_&&(_.c(),_.m(m,null))),(!y||D&64&&g!==(g="w-full h-[5vh] "+(e[20].priority==1?" bg-priority_quaternary":" bg-accent_green")+" flex items-center font-medium"))&&p(n,"class",g)},i(v){y||(te(()=>{y&&($||($=ce(t,nt,{duration:300},!0)),$.run(1))}),y=!0)},o(v){$||($=ce(t,nt,{duration:300},!1)),$.run(0),y=!1},d(v){v&&S(t),w&&w.d(),_.d(),v&&$&&$.end(),j=!1,E()}}}function ut(e){let t,l,n=e[20].units.slice(0,e[1][e[20].id]?e[20].units.length:3),i=[];for(let r=0;r3&&_t(e);return{c(){t=b("div");for(let r=0;r3?s?s.p(r,a):(s=_t(r),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},d(r){r&&S(t),_e(i,r),s&&s.d()}}}function dt(e){let t,l,n=e[23].metadata.callsign+"",i,s,r,a,f=e[23].job.name+"",o,u,c,m,h=e[23].charinfo.firstname+"",g,k,$=e[23].charinfo.lastname+"",y,j;return{c(){t=b("div"),l=b("p"),i=C(n),r=I(),a=b("p"),o=C(f),c=I(),m=b("p"),g=C(h),k=I(),y=C($),p(l,"class",s="ml-[2vh] px-[1.4vh] py-[0.2vh] rounded-full "+(e[20].priority==1?"bg-priority_secondary":"bg-secondary")),p(a,"class",u="mx-[1vh] px-[1.5vh] py-[0.2vh] rounded-full uppercase "+(e[23].job.type=="leo"?"bg-[#004ca5] ":e[23].job.type=="ems"?"bg-[#e03535]":"bg-[#4b4b4b]")),p(m,"class","ml-[0.5vh]"),p(t,"class",j="w-full h-[5vh] flex "+(e[20].priority==1?"bg-priority_tertiary":"bg-tertiary")+" flex items-center font-medium")},m(E,w){R(E,t,w),d(t,l),d(l,i),d(t,r),d(t,a),d(a,o),d(t,c),d(t,m),d(m,g),d(m,k),d(m,y)},p(E,w){w&66&&n!==(n=E[23].metadata.callsign+"")&&B(i,n),w&64&&s!==(s="ml-[2vh] px-[1.4vh] py-[0.2vh] rounded-full "+(E[20].priority==1?"bg-priority_secondary":"bg-secondary"))&&p(l,"class",s),w&66&&f!==(f=E[23].job.name+"")&&B(o,f),w&66&&u!==(u="mx-[1vh] px-[1.5vh] py-[0.2vh] rounded-full uppercase "+(E[23].job.type=="leo"?"bg-[#004ca5] ":E[23].job.type=="ems"?"bg-[#e03535]":"bg-[#4b4b4b]"))&&p(a,"class",u),w&66&&h!==(h=E[23].charinfo.firstname+"")&&B(g,h),w&66&&$!==($=E[23].charinfo.lastname+"")&&B(y,$),w&64&&j!==(j="w-full h-[5vh] flex "+(E[20].priority==1?"bg-priority_tertiary":"bg-tertiary")+" flex items-center font-medium")&&p(t,"class",j)},d(E){E&&S(t)}}}function _t(e){let t,l=!e[1][e[20].id]&&pt(e);return{c(){l&&l.c(),t=x()},m(n,i){l&&l.m(n,i),R(n,t,i)},p(n,i){n[1][n[20].id]?l&&(l.d(1),l=null):l?l.p(n,i):(l=pt(n),l.c(),l.m(t.parentNode,t))},d(n){l&&l.d(n),n&&S(t)}}}function pt(e){let t,l,n,i=mt(e[20])+"",s,r,a=e[7].additionals+"",f,o,u,c;function m(){return e[18](e[20])}return{c(){t=b("button"),l=b("p"),n=C("+"),s=C(i),r=I(),f=C(a),p(l,"class","ml-[0.5vh]"),p(t,"class",o="w-full h-[5vh] flex items-center justify-center "+(e[20].priority==1?"bg-priority_tertiary":"bg-tertiary")+" flex items-center font-medium")},m(h,g){R(h,t,g),d(t,l),d(l,n),d(l,s),d(l,r),d(l,f),u||(c=Q(t,"click",m),u=!0)},p(h,g){e=h,g&64&&i!==(i=mt(e[20])+"")&&B(s,i),g&128&&a!==(a=e[7].additionals+"")&&B(f,a),g&64&&o!==(o="w-full h-[5vh] flex items-center justify-center "+(e[20].priority==1?"bg-priority_tertiary":"bg-tertiary")+" flex items-center font-medium")&&p(t,"class",o)},d(h){h&&S(t),u=!1,c()}}}function Nl(e){let t=e[7].dispatch_attach+"",l;return{c(){l=C(t)},m(n,i){R(n,l,i)},p(n,i){i&128&&t!==(t=n[7].dispatch_attach+"")&&B(l,t)},d(n){n&&S(l)}}}function Dl(e){let t=e[7].dispatch_detach+"",l;return{c(){l=C(t)},m(n,i){R(n,l,i)},p(n,i){i&128&&t!==(t=n[7].dispatch_detach+"")&&B(l,t)},d(n){n&&S(l)}}}function ht(e){let t,l,n,i,s=e[20].id+"",r,a,f,o=e[20].code+"",u,c,m,h,g=e[20].message+"",k,$,y,j,E,w,U,M,_,F,v,D,P,z=e[14](e[20]),T=[];for(let A=0;A{N=null}),ne())},i(A){v||(O(N),v=!0)},o(A){V(N),v=!1},d(A){A&&S(t),_e(T,A),A&&S(_),N&&N.d(A),A&&S(F),D=!1,P()}}}function Al(e){let t,l,n,i,s,r,a,f,o,u,c,m,h,g,k,$,y,j,E,w,U,M,_,F,v=e[5]&&ot(e);return{c(){t=b("div"),l=b("div"),n=b("button"),n.innerHTML='',i=I(),s=b("button"),r=b("i"),f=I(),o=b("button"),u=b("i"),m=I(),h=b("button"),h.innerHTML='',g=I(),k=b("button"),$=b("i"),j=I(),E=b("div"),v&&v.c(),p(n,"class","w-full h-[3vh] flex items-center justify-center bg-primary hover:bg-secondary"),p(r,"class",a="fas fa-volume-"+(e[3]?"xmark":"high")+" text-[1.5vh]"),p(s,"class","w-full h-[3vh] flex items-center justify-center bg-primary hover:bg-secondary"),p(u,"class",c="fas fa-"+(e[2]?"bell-slash":"bell")+" text-[1.5vh]"),p(o,"class","w-full h-[3vh] flex items-center justify-center bg-primary hover:bg-secondary"),p(h,"class","w-full h-[3vh] flex items-center justify-center bg-primary hover:bg-secondary"),p($,"class",y="fas fa-"+(e[4]?"hand-point-left":"hand-point-right")+" text-[1.5vh]"),p(k,"class","w-full h-[3vh] flex items-center justify-center bg-primary hover:bg-secondary"),p(l,"class","w-[3.2vh] h-[85%] flex flex-col gap-[1vh]"),J(l,"ml-[1vh]",!e[4]),J(l,"mr-[1vh]",e[4]),p(E,"class","w-[25%] h-[97%] overflow-auto pr-[0.5vh]"),J(E,"ml-[2vh]",!e[4]),J(E,"mr-[2vh]",e[4]),p(t,"class",w="w-screen h-screen flex items-center justify-end "+(e[4]?"flex-row":"flex-row-reverse"))},m(D,P){R(D,t,P),d(t,l),d(l,n),d(l,i),d(l,s),d(s,r),d(l,f),d(l,o),d(o,u),d(l,m),d(l,h),d(l,g),d(l,k),d(k,$),d(t,j),d(t,E),v&&v.m(E,null),M=!0,_||(F=[Q(n,"click",e[15]),Q(s,"click",e[12]),Q(o,"click",e[13]),Q(h,"click",e[16]),Q(k,"click",e[11])],_=!0)},p(D,[P]){e=D,(!M||P&8&&a!==(a="fas fa-volume-"+(e[3]?"xmark":"high")+" text-[1.5vh]"))&&p(r,"class",a),(!M||P&4&&c!==(c="fas fa-"+(e[2]?"bell-slash":"bell")+" text-[1.5vh]"))&&p(u,"class",c),(!M||P&16&&y!==(y="fas fa-"+(e[4]?"hand-point-left":"hand-point-right")+" text-[1.5vh]"))&&p($,"class",y),(!M||P&16)&&J(l,"ml-[1vh]",!e[4]),(!M||P&16)&&J(l,"mr-[1vh]",e[4]),e[5]?v?(v.p(e,P),P&32&&O(v,1)):(v=ot(e),v.c(),O(v,1),v.m(E,null)):v&&(le(),V(v,1,1,()=>{v=null}),ne()),(!M||P&16)&&J(E,"ml-[2vh]",!e[4]),(!M||P&16)&&J(E,"mr-[2vh]",e[4]),(!M||P&16&&w!==(w="w-screen h-screen flex items-center justify-end "+(e[4]?"flex-row":"flex-row-reverse")))&&p(t,"class",w)},i(D){M||(O(v),te(()=>{M&&(U||(U=ce(t,Se,{x:e[4]?400:-400},!0)),U.run(1))}),M=!0)},o(D){V(v),U||(U=ce(t,Se,{x:e[4]?400:-400},!1)),U.run(0),M=!1},d(D){D&&S(t),v&&v.d(),D&&U&&U.end(),_=!1,Z(F)}}}function Bt(e,t){for(let l=0;ll(2,n=_)),Y(e,Ke,_=>l(3,i=_)),Y(e,be,_=>l(4,s=_)),Y(e,Ve,_=>l(5,r=_)),Y(e,gl,_=>l(6,a=_)),Y(e,He,_=>l(7,f=_)),Y(e,Be,_=>l(8,o=_));let u=null,c={};ye(be,s=localStorage.getItem("IsRightMargin")==="true",s);function m(_){u===_?l(0,u=null):l(0,u=_)}function h(_){l(1,c[_]=!c[_],c)}function g(){s?localStorage.setItem("IsRightMargin","false"):localStorage.setItem("IsRightMargin","true"),ye(be,s=localStorage.getItem("IsRightMargin")==="true",s)}function k(){Ke.update(_=>!_),K("toggleMute",{boolean:i})}function $(){Qe.update(_=>!_),K("toggleAlerts",{boolean:n})}function y(_){return[{icon:"fas fa-clock",label:"Time",value:Ft(_.time)},{icon:"fas fa-user",label:"Name",value:_.name},{icon:"fas fa-phone",label:"Number",value:_.number},{icon:"fas fa-comment",label:"Information",value:_.information},{icon:"fas fa-map-location-dot",label:"Street",value:_.street},{icon:"fas fa-user",label:"Gender",value:_.gender},{icon:"fas fa-gun",label:"Automatic Gun Fire",value:_.automaticGunFire},{icon:"fas fa-gun",label:"Weapon",value:_.weapon},{icon:"fas fa-car",label:"Vehicle",value:_.vehicle},{icon:"fas fa-rectangle-list",label:"Plate",value:_.plate},{icon:"fas fa-droplet",label:"Color",value:_.color},{icon:"fas fa-car",label:"Class",value:_.class},{icon:"fas fa-door-open",label:"Doors",value:_.doors},{icon:"fas fa-compass",label:"Heading",value:_.heading},{icon:"fas fa-user-group",label:"Units",value:_.units.length}]}return[u,c,n,i,s,r,a,f,o,m,h,g,k,$,y,()=>{K("refreshAlerts")},()=>{K("clearBlips")},_=>m(_.id),_=>h(_.id),_=>{Bt(_.units,o.citizenid)?(K("detachUnit",_),K("refreshAlerts")):(K("attachUnit",_),K("refreshAlerts"))}]}class Rl extends he{constructor(t){super(),pe(this,t,Cl,Al,ie,{})}}function gt(e,t,l){const n=e.slice();return n[6]=t[l],n[8]=l,n}function vt(e,t,l){const n=e.slice();return n[9]=t[l],n}function bt(e){let t,l=e[3](e[6]),n=[];for(let i=0;i{T&&(z||(z=ce(l,Se,{x:t[1]?400:-400},!0)),z.run(1))}),T=!0)},o(A){z||(z=ce(l,Se,{x:t[1]?400:-400},!1)),z.run(0),T=!1},d(A){A&&S(l),G&&G.d(),N&&N.d(),A&&z&&z.end()}}}function jl(e){let t,l,n=[],i=new Map,s,r,a=e[0].slice().reverse();const f=o=>o[6].data.id;for(let o=0;ol(4,n=o)),Y(e,be,o=>l(1,i=o)),Y(e,Tt,o=>l(2,s=o));let r=[];ye(be,i=localStorage.getItem("IsRightMargin")==="true",i),Pe.subscribe(o=>{l(0,r=o||[])});function a(o){ml(o)}Fe(()=>{r.forEach(o=>{const{data:u,timer:c}=o;setTimeout(()=>{a(u.id)},c)})}),nl(()=>{r.forEach(o=>{const{data:u,timer:c}=o;setTimeout(()=>{a(u.id)},c)})});function f(o){return n?[{label:"Call",value:o.data.message},{icon:"fas fa-comment",label:"Information",value:o.data.information}]:[{icon:"fas fa-clock",label:"Time",value:Ft(o.data.time)},{icon:"fas fa-user",label:"Name",value:o.data.name},{icon:"fas fa-phone",label:"Number",value:o.data.number},{icon:"fas fa-comment",label:"Information",value:o.data.information},{icon:"fas fa-map-location-dot",label:"Street",value:o.data.street},{icon:"fas fa-user",label:"Gender",value:o.data.gender},{icon:"fas fa-gun",label:"Automatic Gun Fire",value:o.data.automaticGunFire},{icon:"fas fa-gun",label:"Weapon",value:o.data.weapon},{icon:"fas fa-car",label:"Vehicle",value:o.data.vehicle},{icon:"fas fa-rectangle-list",label:"Plate",value:o.data.plate},{icon:"fas fa-droplet",label:"Color",value:o.data.color},{icon:"fas fa-car",label:"Class",value:o.data.class},{icon:"fas fa-door-open",label:"Doors",value:o.data.doors},{icon:"fas fa-compass",label:"Heading",value:o.data.heading}]}return[r,i,s,f]}class Ll extends he{constructor(t){super(),pe(this,t,Tl,jl,ie,{})}}function Et(e){let t,l,n,i;return t=new yl({props:{$$slots:{default:[Ol]},$$scope:{ctx:e}}}),n=new Ll({}),{c(){$e(t.$$.fragment),l=I(),$e(n.$$.fragment)},m(s,r){ue(t,s,r),R(s,l,r),ue(n,s,r),i=!0},i(s){i||(O(t.$$.fragment,s),O(n.$$.fragment,s),i=!0)},o(s){V(t.$$.fragment,s),V(n.$$.fragment,s),i=!1},d(s){de(t,s),s&&S(l),de(n,s)}}}function Ol(e){let t,l;return t=new Rl({}),{c(){$e(t.$$.fragment)},m(n,i){ue(t,n,i),l=!0},i(n){l||(O(t.$$.fragment,n),l=!0)},o(n){V(t.$$.fragment,n),l=!1},d(n){de(t,n)}}}function It(e){let t,l,n,i;return t=new El({}),{c(){$e(t.$$.fragment),l=I(),n=b("body"),p(n,"class","bg-neutral-700")},m(s,r){ue(t,s,r),R(s,l,r),R(s,n,r),i=!0},i(s){i||(O(t.$$.fragment,s),i=!0)},o(s){V(t.$$.fragment,s),i=!1},d(s){de(t,s),s&&S(l),s&&S(n)}}}function Ul(e){let t,l,n,i,s,r=e[0]&&Et(e);l=new Ml({});let a=e[1]&&It();return{c(){r&&r.c(),t=I(),$e(l.$$.fragment),n=I(),a&&a.c(),i=x()},m(f,o){r&&r.m(f,o),R(f,t,o),ue(l,f,o),R(f,n,o),a&&a.m(f,o),R(f,i,o),s=!0},p(f,[o]){f[0]?r?o&1&&O(r,1):(r=Et(f),r.c(),O(r,1),r.m(t.parentNode,t)):r&&(le(),V(r,1,1,()=>{r=null}),ne()),f[1]?a?o&2&&O(a,1):(a=It(),a.c(),O(a,1),a.m(i.parentNode,i)):a&&(le(),V(a,1,1,()=>{a=null}),ne())},i(f){s||(O(r),O(l.$$.fragment,f),O(a),s=!0)},o(f){V(r),V(l.$$.fragment,f),V(a),s=!1},d(f){r&&r.d(f),f&&S(t),de(l,f),f&&S(n),a&&a.d(f),f&&S(i)}}}function Fl(e,t,l){let n,i,s;return Y(e,je,r=>l(2,n=r)),Y(e,He,r=>l(0,i=r)),Y(e,De,r=>l(1,s=r)),ye(je,n="ps-dispatch",n),[i,s]}class Bl extends he{constructor(t){super(),pe(this,t,Fl,Ul,ie,{})}}new Bl({target:document.getElementById("app")});
+(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))l(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&l(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function q(){}const Pt=e=>e;function Vt(e,t){for(const n in t)e[n]=t[n];return e}function Nt(e){return e()}function Ge(){return Object.create(null)}function Z(e){e.forEach(Nt)}function Me(e){return typeof e=="function"}function ie(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Ht(e){return Object.keys(e).length===0}function Dt(e,...t){if(e==null)return q;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Y(e,t,n){e.$$.on_destroy.push(Dt(t,n))}function Gt(e,t,n,l){if(e){const i=Mt(e,t,n,l);return e[0](i)}}function Mt(e,t,n,l){return e[1]&&l?Vt(n.ctx.slice(),e[1](l(t))):n.ctx}function Yt(e,t,n,l){if(e[2]&&l){const i=e[2](l(n));if(t.dirty===void 0)return i;if(typeof i=="object"){const s=[],r=Math.max(t.dirty.length,i.length);for(let a=0;a32){const t=[],n=e.ctx.length/32;for(let l=0;lwindow.performance.now():()=>Date.now(),Re=At?e=>requestAnimationFrame(e):q;const ae=new Set;function It(e){ae.forEach(t=>{t.c(e)||(ae.delete(t),t.f())}),ae.size!==0&&Re(It)}function Jt(e){let t;return ae.size===0&&Re(It),{promise:new Promise(n=>{ae.add(t={c:e,f:n})}),abort(){ae.delete(t)}}}function d(e,t){e.appendChild(t)}function Ct(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Kt(e){const t=g("style");return Qt(Ct(e),t),t.sheet}function Qt(e,t){return d(e.head||e,t),t.sheet}function j(e,t,n){e.insertBefore(t,n||null)}function M(e){e.parentNode&&e.parentNode.removeChild(e)}function _e(e,t){for(let n=0;ne.removeEventListener(t,n,l)}function p(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Xt(e){return Array.from(e.childNodes)}function B(e,t){t=""+t,e.data!==t&&(e.data=t)}function J(e,t,n){e.classList[n?"add":"remove"](t)}function Zt(e,t,{bubbles:n=!1,cancelable:l=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,l,t),i}const Ee=new Map;let Ne=0;function xt(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}function en(e,t){const n={stylesheet:Kt(t),rules:{}};return Ee.set(e,n),n}function ze(e,t,n,l,i,s,r,a=0){const f=16.666/l;let o=`{
+`;for(let $=0;$<=1;$+=f){const y=t+(n-t)*s($);o+=$*100+`%{${r(y,1-y)}}
+`}const u=o+`100% {${r(n,1-n)}}
+}`,c=`__svelte_${xt(u)}_${a}`,m=Ct(e),{stylesheet:h,rules:v}=Ee.get(m)||en(m,e);v[c]||(v[c]=!0,h.insertRule(`@keyframes ${c} ${u}`,h.cssRules.length));const k=e.style.animation||"";return e.style.animation=`${k?`${k}, `:""}${c} ${l}ms linear ${i}ms 1 both`,Ne+=1,c}function tn(e,t){const n=(e.style.animation||"").split(", "),l=n.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),i=n.length-l.length;i&&(e.style.animation=l.join(", "),Ne-=i,Ne||nn())}function nn(){Re(()=>{Ne||(Ee.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&M(t)}),Ee.clear())})}let ye;function ge(e){ye=e}function Oe(){if(!ye)throw new Error("Function called outside component initialization");return ye}function Ue(e){Oe().$$.on_mount.push(e)}function ln(e){Oe().$$.after_update.push(e)}function rn(e){Oe().$$.on_destroy.push(e)}const oe=[],We=[];let fe=[];const qe=[],sn=Promise.resolve();let Ce=!1;function on(){Ce||(Ce=!0,sn.then(jt))}function te(e){fe.push(e)}const Ae=new Set;let re=0;function jt(){if(re!==0)return;const e=ye;do{try{for(;ree.indexOf(l)===-1?t.push(l):n.push(l)),n.forEach(l=>l()),fe=t}let me;function cn(){return me||(me=Promise.resolve(),me.then(()=>{me=null})),me}function Ie(e,t,n){e.dispatchEvent(Zt(`${t?"intro":"outro"}${n}`))}const ke=new Set;let X;function ne(){X={r:0,c:[],p:X}}function le(){X.r||Z(X.c),X=X.p}function O(e,t){e&&e.i&&(ke.delete(e),e.i(t))}function V(e,t,n,l){if(e&&e.o){if(ke.has(e))return;ke.add(e),X.c.push(()=>{ke.delete(e),l&&(n&&e.d(1),l())}),e.o(t)}else l&&l()}const un={duration:0};function ce(e,t,n,l){const i={direction:"both"};let s=t(e,n,i),r=l?0:1,a=null,f=null,o=null;function u(){o&&tn(e,o)}function c(h,v){const k=h.b-r;return v*=Math.abs(k),{a:r,b:h.b,d:k,duration:v,start:h.start,end:h.start+v,group:h.group}}function m(h){const{delay:v=0,duration:k=300,easing:$=Pt,tick:y=q,css:T}=s||un,E={start:qt()+v,b:h};h||(E.group=X,X.r+=1),a||f?f=E:(T&&(u(),o=ze(e,r,h,k,v,$,T)),h&&y(0,1),a=c(E,k),te(()=>Ie(e,h,"start")),Jt(w=>{if(f&&w>f.start&&(a=c(f,k),f=null,Ie(e,a.b,"start"),T&&(u(),o=ze(e,r,a.b,a.duration,0,$,s.css))),a){if(w>=a.end)y(r=a.b,1-r),Ie(e,a.b,"end"),f||(a.b?u():--a.group.r||Z(a.group.c)),a=null;else if(w>=a.start){const U=w-a.start;r=a.a+a.d*$(U/a.duration),y(r,1-r)}}return!!(a||f)}))}return{run(h){Me(s)?cn().then(()=>{s=s(i),m(h)}):m(h)},end(){u(),a=f=null}}}function dn(e,t){V(e,1,1,()=>{t.delete(e.key)})}function _n(e,t,n,l,i,s,r,a,f,o,u,c){let m=e.length,h=s.length,v=m;const k={};for(;v--;)k[e[v].key]=v;const $=[],y=new Map,T=new Map,E=[];for(v=h;v--;){const _=c(i,s,v),F=n(_);let b=r.get(F);b?l&&E.push(()=>b.p(_,t)):(b=o(F,_),b.c()),y.set(F,$[v]=b),F in k&&T.set(F,Math.abs(v-k[F]))}const w=new Set,U=new Set;function D(_){O(_,1),_.m(a,u),r.set(_.key,_),u=_.first,h--}for(;m&&h;){const _=$[h-1],F=e[m-1],b=_.key,A=F.key;_===F?(u=_.first,m--,h--):y.has(A)?!r.has(b)||w.has(b)?D(_):U.has(A)?m--:T.get(b)>T.get(A)?(U.add(b),D(_)):(w.add(A),m--):(f(F,r),m--)}for(;m--;){const _=e[m];y.has(_.key)||f(_,r)}for(;h;)D($[h-1]);return Z(E),$}function we(e){e&&e.c()}function ue(e,t,n,l){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,n),l||te(()=>{const r=e.$$.on_mount.map(Nt).filter(Me);e.$$.on_destroy?e.$$.on_destroy.push(...r):Z(r),e.$$.on_mount=[]}),s.forEach(te)}function de(e,t){const n=e.$$;n.fragment!==null&&(fn(n.after_update),Z(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function pn(e,t){e.$$.dirty[0]===-1&&(oe.push(e),on(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const v=h.length?h[0]:m;return o.ctx&&i(o.ctx[c],o.ctx[c]=v)&&(!o.skip_bound&&o.bound[c]&&o.bound[c](v),u&&pn(e,c)),m}):[],o.update(),u=!0,Z(o.before_update),o.fragment=l?l(o.ctx):!1,t.target){if(t.hydrate){const c=Xt(t.target);o.fragment&&o.fragment.l(c),c.forEach(M)}else o.fragment&&o.fragment.c();t.intro&&O(e.$$.fragment),ue(e,t.target,t.anchor,t.customElement),jt()}ge(f)}class he{$destroy(){de(this,1),this.$destroy=q}$on(t,n){if(!Me(n))return q;const l=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return l.push(n),()=>{const i=l.indexOf(n);i!==-1&&l.splice(i,1)}}$set(t){this.$$set&&!Ht(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function ve(e,t){const n=l=>{const{action:i,data:s}=l.data;i===e&&t(s)};Ue(()=>window.addEventListener("message",n)),rn(()=>window.removeEventListener("message",n))}const se=[];function hn(e,t){return{subscribe:W(e,t).subscribe}}function W(e,t=q){let n;const l=new Set;function i(a){if(ie(e,a)&&(e=a,n)){const f=!se.length;for(const o of l)o[1](),se.push(o,e);if(f){for(let o=0;o{l.delete(o),l.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:r}}function mn(e,t,n){const l=!Array.isArray(e),i=l?[e]:e,s=t.length<2;return hn(n,r=>{let a=!1;const f=[];let o=0,u=q;const c=()=>{if(o)return;u();const h=t(l?f[0]:f,r);s?r(h):u=Me(h)?h:q},m=i.map((h,v)=>Dt(h,k=>{f[v]=k,o&=~(1<{o|=1<t.filter(n=>n.data.id!==e))}const Pe=W(null),Ve=W(null),bn=mn([Pe,Tt,Fe],([e,t,n])=>!e||t===null||!n?[]:e.slice(-t).filter(l=>l.message&&l.jobs.includes(n.job.type)).reverse());let Te=!1;Se.subscribe(e=>{Te=e});let Ot="";je.subscribe(e=>{Ot=e});async function K(e,t={},n){if(Te==!0&&n||Te==!0)return Promise.resolve(n||{});const l={method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)},i=window.GetParentResourceName?window.GetParentResourceName():Ot;return await(await fetch(`https://${i}/${e}`,l)).json()}function Qe(e){let t,n;const l=e[2].default,i=Gt(l,e,e[1],null);return{c(){t=g("main"),i&&i.c(),p(t,"class","svelte-a4h32x")},m(s,r){j(s,t,r),i&&i.m(t,null),n=!0},p(s,r){i&&i.p&&(!n||r&2)&&zt(i,l,s,s[1],n?Yt(l,s[1],r,null):Wt(s[1]),null)},i(s){n||(O(i,s),n=!0)},o(s){V(i,s),n=!1},d(s){s&&M(t),i&&i.d(s)}}}function gn(e){let t,n,l=e[0]&&Qe(e);return{c(){l&&l.c(),t=x()},m(i,s){l&&l.m(i,s),j(i,t,s),n=!0},p(i,[s]){i[0]?l?(l.p(i,s),s&1&&O(l,1)):(l=Qe(i),l.c(),O(l,1),l.m(t.parentNode,t)):l&&(ne(),V(l,1,1,()=>{l=null}),le())},i(i){n||(O(l),n=!0)},o(i){V(l),n=!1},d(i){l&&l.d(i),i&&M(t)}}}function yn(e,t,n){let l,i;Y(e,Se,f=>n(4,l=f)),Y(e,ee,f=>n(0,i=f));let{$$slots:s={},$$scope:r}=t,a;return ee.subscribe(f=>{a=f}),ve("setVisible",f=>{ee.set(f)}),Ue(()=>{const f=o=>{a&&o.code==="Escape"&&(K("hideUI"),ee.set(!1)),!a&&o.code==="Escape"&&l&&(K("setVisible",!0),ee.set(!0))};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)}),e.$$set=f=>{"$$scope"in f&&n(1,r=f.$$scope)},[i,r,s]}class wn extends he{constructor(t){super(),pe(this,t,yn,gn,ie,{})}}const $n=()=>!window.invokeNative,Le=(e,t=0)=>{if($n())for(const n of e)setTimeout(()=>{window.dispatchEvent(new MessageEvent("message",{data:{action:n.action,data:n.data}}))},t)};function Xe(e,t,n){const l=e.slice();return l[4]=t[n],l}function Ze(e,t,n){const l=e.slice();return l[7]=t[n],l}function xe(e){let t,n=e[1],l=[];for(let i=0;i{n(0,l=!l)},a=>{if(a.custom==!0){a.customFunction();return}Le([{action:a.action,data:a.data}])}]}class Nn extends he{constructor(t){super(),pe(this,t,En,kn,ie,{})}}function Dn(e,t,n){let l;Y(e,ee,s=>n(0,l=s)),Le([{action:"setVisible",data:!0}]),Le([{action:"setBrowserMode",data:!0}]);function i(s){s.key==="="&&St(ee,l=!0,l)}return ve("setBrowserMode",s=>{Se.set(s),console.log("browser mode enabled"),s?window.addEventListener("keydown",i):window.removeEventListener("keydown",i)}),ve("newCall",s=>{Be.update(r=>(r=r||[],r.push(s),r))}),ve("setDispatchs",s=>{Pe.set(s)}),ve("setupUI",s=>{Fe.set(s.player),Ve.set(s.locales),Lt.set(s.keybind),Tt.set(s.maxCallList),Rt.set(s.shortCalls)}),[]}class Mn extends he{constructor(t){super(),pe(this,t,Dn,null,ie,{})}}function Ut(e){const t=e-1;return t*t*t+1}function De(e,{delay:t=0,duration:n=400,easing:l=Ut,x:i=0,y:s=0,opacity:r=0}={}){const a=getComputedStyle(e),f=+a.opacity,o=a.transform==="none"?"":a.transform,u=f*(1-r),[c,m]=Ye(i),[h,v]=Ye(s);return{delay:t,duration:n,easing:l,css:(k,$)=>`
+ transform: ${o} translate(${(1-k)*c}${m}, ${(1-k)*h}${v});
+ opacity: ${f-u*$}`}}function nt(e,{delay:t=0,duration:n=400,easing:l=Ut,axis:i="y"}={}){const s=getComputedStyle(e),r=+s.opacity,a=i==="y"?"height":"width",f=parseFloat(s[a]),o=i==="y"?["top","bottom"]:["left","right"],u=o.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(s[`padding${u[0]}`]),m=parseFloat(s[`padding${u[1]}`]),h=parseFloat(s[`margin${u[0]}`]),v=parseFloat(s[`margin${u[1]}`]),k=parseFloat(s[`border${u[0]}Width`]),$=parseFloat(s[`border${u[1]}Width`]);return{delay:t,duration:n,easing:l,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*r};${a}: ${y*f}px;padding-${o[0]}: ${y*c}px;padding-${o[1]}: ${y*m}px;margin-${o[0]}: ${y*h}px;margin-${o[1]}: ${y*v}px;border-${o[0]}-width: ${y*k}px;border-${o[1]}-width: ${y*$}px;`}}const Sn=["January","February","March","April","May","June","July","August","September","October","November","December"];function $e(e,t=!1,n=!1){const l=e.getDate(),i=Sn[e.getMonth()],s=e.getFullYear(),r=e.getHours();let a=e.getMinutes();return a<10&&(a=`0${a}`),t?`${t} at ${r}:${a}`:n?`${l}. ${i} at ${r}:${a}`:`${l}. ${i} ${s}. at ${r}:${a}`}function Ft(e){if(!e)return"Unknown";let t;try{t=typeof e=="object"?e:new Date(e)}catch{return"Invalid date"}if(isNaN(t))return"Invalid date";const n=864e5,l=new Date,i=new Date(l-n),s=Math.round((l-t)/1e3),r=Math.round(s/60),a=l.toDateString()===t.toDateString(),f=i.toDateString()===t.toDateString(),o=l.getFullYear()===t.getFullYear();return s<5?"Just Now":s<60?`${s} Seconds ago`:s<90?"A minute ago":r<60?`${r} Minutes ago`:a?$e(t,"Today"):f?$e(t,"Yesterday"):o?$e(t,!1,!0):$e(t)}function lt(e,t,n){const l=e.slice();return l[20]=t[n],l}function it(e,t,n){const l=e.slice();return l[23]=t[n],l}function rt(e,t,n){const l=e.slice();return l[26]=t[n],l}function st(e){let t,n,l=e[6],i=[];for(let r=0;rV(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r0&&ct(e);function U(b,A){return A&320&&(h=null),h==null&&(h=!!Bt(b[20].units,b[8].citizenid)),h?In:An}let D=U(e,-1),_=D(e);function F(){return e[19](e[20])}return{c(){t=g("div"),w&&w.c(),n=N(),l=g("button"),i=g("p"),r=C(s),a=N(),o=C(f),c=N(),m=g("p"),_.c(),k=N(),p(i,"class",u="mx-[2vh] px-[2vh] py-[0.2vh] rounded-full "+(e[20].priority==1?" bg-accent_dark_red":" bg-accent_dark_green")),p(m,"class","ml-[3vh]"),p(l,"class",v="w-full h-[5vh] "+(e[20].priority==1?" bg-priority_quaternary":" bg-accent_green")+" flex items-center font-medium"),p(t,"class","mb-[1vh]")},m(b,A){j(b,t,A),w&&w.m(t,null),d(t,n),d(t,l),d(l,i),d(i,r),d(i,a),d(i,o),d(l,c),d(l,m),_.m(m,null),d(t,k),y=!0,T||(E=Q(l,"click",F),T=!0)},p(b,A){e=b,e[20].units.length>0?w?w.p(e,A):(w=ct(e),w.c(),w.m(t,n)):w&&(w.d(1),w=null),(!y||A&64)&&s!==(s=e[20].units.length+"")&&B(r,s),(!y||A&128)&&f!==(f=e[7].units+"")&&B(o,f),(!y||A&64&&u!==(u="mx-[2vh] px-[2vh] py-[0.2vh] rounded-full "+(e[20].priority==1?" bg-accent_dark_red":" bg-accent_dark_green")))&&p(i,"class",u),D===(D=U(e,A))&&_?_.p(e,A):(_.d(1),_=D(e),_&&(_.c(),_.m(m,null))),(!y||A&64&&v!==(v="w-full h-[5vh] "+(e[20].priority==1?" bg-priority_quaternary":" bg-accent_green")+" flex items-center font-medium"))&&p(l,"class",v)},i(b){y||(te(()=>{y&&($||($=ce(t,nt,{duration:300},!0)),$.run(1))}),y=!0)},o(b){$||($=ce(t,nt,{duration:300},!1)),$.run(0),y=!1},d(b){b&&M(t),w&&w.d(),_.d(),b&&$&&$.end(),T=!1,E()}}}function ct(e){let t,n,l=e[20].units.slice(0,e[1][e[20].id]?e[20].units.length:3),i=[];for(let r=0;r3&&dt(e);return{c(){t=g("div");for(let r=0;r3?s?s.p(r,a):(s=dt(r),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},d(r){r&&M(t),_e(i,r),s&&s.d()}}}function ut(e){let t,n,l=e[23].metadata.callsign+"",i,s,r,a,f=e[23].job.name+"",o,u,c,m,h=e[23].charinfo.firstname+"",v,k,$=e[23].charinfo.lastname+"",y,T;return{c(){t=g("div"),n=g("p"),i=C(l),r=N(),a=g("p"),o=C(f),c=N(),m=g("p"),v=C(h),k=N(),y=C($),p(n,"class",s="ml-[2vh] px-[1.4vh] py-[0.2vh] rounded-full "+(e[20].priority==1?"bg-priority_secondary":"bg-secondary")),p(a,"class",u="mx-[1vh] px-[1.5vh] py-[0.2vh] rounded-full uppercase "+(e[23].job.type=="leo"?"bg-[#004ca5] ":e[23].job.type=="ems"?"bg-[#e03535]":"bg-[#4b4b4b]")),p(m,"class","ml-[0.5vh]"),p(t,"class",T="w-full h-[5vh] flex "+(e[20].priority==1?"bg-priority_tertiary":"bg-tertiary")+" flex items-center font-medium")},m(E,w){j(E,t,w),d(t,n),d(n,i),d(t,r),d(t,a),d(a,o),d(t,c),d(t,m),d(m,v),d(m,k),d(m,y)},p(E,w){w&66&&l!==(l=E[23].metadata.callsign+"")&&B(i,l),w&64&&s!==(s="ml-[2vh] px-[1.4vh] py-[0.2vh] rounded-full "+(E[20].priority==1?"bg-priority_secondary":"bg-secondary"))&&p(n,"class",s),w&66&&f!==(f=E[23].job.name+"")&&B(o,f),w&66&&u!==(u="mx-[1vh] px-[1.5vh] py-[0.2vh] rounded-full uppercase "+(E[23].job.type=="leo"?"bg-[#004ca5] ":E[23].job.type=="ems"?"bg-[#e03535]":"bg-[#4b4b4b]"))&&p(a,"class",u),w&66&&h!==(h=E[23].charinfo.firstname+"")&&B(v,h),w&66&&$!==($=E[23].charinfo.lastname+"")&&B(y,$),w&64&&T!==(T="w-full h-[5vh] flex "+(E[20].priority==1?"bg-priority_tertiary":"bg-tertiary")+" flex items-center font-medium")&&p(t,"class",T)},d(E){E&&M(t)}}}function dt(e){let t,n=!e[1][e[20].id]&&_t(e);return{c(){n&&n.c(),t=x()},m(l,i){n&&n.m(l,i),j(l,t,i)},p(l,i){l[1][l[20].id]?n&&(n.d(1),n=null):n?n.p(l,i):(n=_t(l),n.c(),n.m(t.parentNode,t))},d(l){n&&n.d(l),l&&M(t)}}}function _t(e){let t,n,l,i=ht(e[20])+"",s,r,a=e[7].additionals+"",f,o,u,c;function m(){return e[18](e[20])}return{c(){t=g("button"),n=g("p"),l=C("+"),s=C(i),r=N(),f=C(a),p(n,"class","ml-[0.5vh]"),p(t,"class",o="w-full h-[5vh] flex items-center justify-center "+(e[20].priority==1?"bg-priority_tertiary":"bg-tertiary")+" flex items-center font-medium")},m(h,v){j(h,t,v),d(t,n),d(n,l),d(n,s),d(n,r),d(n,f),u||(c=Q(t,"click",m),u=!0)},p(h,v){e=h,v&64&&i!==(i=ht(e[20])+"")&&B(s,i),v&128&&a!==(a=e[7].additionals+"")&&B(f,a),v&64&&o!==(o="w-full h-[5vh] flex items-center justify-center "+(e[20].priority==1?"bg-priority_tertiary":"bg-tertiary")+" flex items-center font-medium")&&p(t,"class",o)},d(h){h&&M(t),u=!1,c()}}}function An(e){let t=e[7].dispatch_attach+"",n;return{c(){n=C(t)},m(l,i){j(l,n,i)},p(l,i){i&128&&t!==(t=l[7].dispatch_attach+"")&&B(n,t)},d(l){l&&M(n)}}}function In(e){let t=e[7].dispatch_detach+"",n;return{c(){n=C(t)},m(l,i){j(l,n,i)},p(l,i){i&128&&t!==(t=l[7].dispatch_detach+"")&&B(n,t)},d(l){l&&M(n)}}}function pt(e){let t,n,l,i,s=e[20].id+"",r,a,f,o=e[20].code+"",u,c,m,h,v=e[20].message+"",k,$,y,T,E,w,U,D,_,F,b,A,P,z=e[14](e[20]),L=[];for(let I=0;I{S=null}),le())},i(I){b||(O(S),b=!0)},o(I){V(S),b=!1},d(I){I&&M(t),_e(L,I),I&&M(_),S&&S.d(I),I&&M(F),A=!1,P()}}}function Cn(e){let t,n,l,i,s,r,a,f,o,u,c,m,h,v,k,$,y,T,E,w,U,D,_,F,b=e[5]&&st(e);return{c(){t=g("div"),n=g("div"),l=g("button"),l.innerHTML='',i=N(),s=g("button"),r=g("i"),f=N(),o=g("button"),u=g("i"),m=N(),h=g("button"),h.innerHTML='',v=N(),k=g("button"),$=g("i"),T=N(),E=g("div"),b&&b.c(),p(l,"class","w-full h-[3vh] flex items-center justify-center bg-primary hover:bg-secondary"),p(r,"class",a="fas fa-volume-"+(e[3]?"xmark":"high")+" text-[1.5vh]"),p(s,"class","w-full h-[3vh] flex items-center justify-center bg-primary hover:bg-secondary"),p(u,"class",c="fas fa-"+(e[2]?"bell-slash":"bell")+" text-[1.5vh]"),p(o,"class","w-full h-[3vh] flex items-center justify-center bg-primary hover:bg-secondary"),p(h,"class","w-full h-[3vh] flex items-center justify-center bg-primary hover:bg-secondary"),p($,"class",y="fas fa-"+(e[4]?"hand-point-left":"hand-point-right")+" text-[1.5vh]"),p(k,"class","w-full h-[3vh] flex items-center justify-center bg-primary hover:bg-secondary"),p(n,"class","w-[3.2vh] h-[85%] flex flex-col gap-[1vh]"),J(n,"ml-[1vh]",!e[4]),J(n,"mr-[1vh]",e[4]),p(E,"class","w-[25%] h-[97%] overflow-auto pr-[0.5vh]"),J(E,"ml-[2vh]",!e[4]),J(E,"mr-[2vh]",e[4]),p(t,"class",w="w-screen h-screen flex items-center justify-end "+(e[4]?"flex-row":"flex-row-reverse"))},m(A,P){j(A,t,P),d(t,n),d(n,l),d(n,i),d(n,s),d(s,r),d(n,f),d(n,o),d(o,u),d(n,m),d(n,h),d(n,v),d(n,k),d(k,$),d(t,T),d(t,E),b&&b.m(E,null),D=!0,_||(F=[Q(l,"click",e[15]),Q(s,"click",e[12]),Q(o,"click",e[13]),Q(h,"click",e[16]),Q(k,"click",e[11])],_=!0)},p(A,[P]){e=A,(!D||P&8&&a!==(a="fas fa-volume-"+(e[3]?"xmark":"high")+" text-[1.5vh]"))&&p(r,"class",a),(!D||P&4&&c!==(c="fas fa-"+(e[2]?"bell-slash":"bell")+" text-[1.5vh]"))&&p(u,"class",c),(!D||P&16&&y!==(y="fas fa-"+(e[4]?"hand-point-left":"hand-point-right")+" text-[1.5vh]"))&&p($,"class",y),(!D||P&16)&&J(n,"ml-[1vh]",!e[4]),(!D||P&16)&&J(n,"mr-[1vh]",e[4]),e[5]?b?(b.p(e,P),P&32&&O(b,1)):(b=st(e),b.c(),O(b,1),b.m(E,null)):b&&(ne(),V(b,1,1,()=>{b=null}),le()),(!D||P&16)&&J(E,"ml-[2vh]",!e[4]),(!D||P&16)&&J(E,"mr-[2vh]",e[4]),(!D||P&16&&w!==(w="w-screen h-screen flex items-center justify-end "+(e[4]?"flex-row":"flex-row-reverse")))&&p(t,"class",w)},i(A){D||(O(b),te(()=>{D&&(U||(U=ce(t,De,{x:e[4]?400:-400},!0)),U.run(1))}),D=!0)},o(A){V(b),U||(U=ce(t,De,{x:e[4]?400:-400},!1)),U.run(0),D=!1},d(A){A&&M(t),b&&b.d(),A&&U&&U.end(),_=!1,Z(F)}}}function Bt(e,t){for(let n=0;nn(2,l=_)),Y(e,Je,_=>n(3,i=_)),Y(e,be,_=>n(4,s=_)),Y(e,Pe,_=>n(5,r=_)),Y(e,bn,_=>n(6,a=_)),Y(e,Ve,_=>n(7,f=_)),Y(e,Fe,_=>n(8,o=_));let u=null,c={};function m(_){u===_?n(0,u=null):n(0,u=_)}function h(_){n(1,c[_]=!c[_],c)}function v(){be.subscribe(_=>{_?be.set(!1):be.set(!0)})}function k(){Je.update(_=>!_),K("toggleMute",{boolean:i})}function $(){Ke.update(_=>!_),K("toggleAlerts",{boolean:l})}function y(_){return[{icon:"fas fa-clock",label:"Time",value:Ft(_.time)},{icon:"fas fa-user",label:"Name",value:_.name},{icon:"fas fa-phone",label:"Number",value:_.number},{icon:"fas fa-comment",label:"Information",value:_.information},{icon:"fas fa-map-location-dot",label:"Street",value:_.street},{icon:"fas fa-user",label:"Gender",value:_.gender},{icon:"fas fa-gun",label:"Automatic Gun Fire",value:_.automaticGunFire},{icon:"fas fa-gun",label:"Weapon",value:_.weapon},{icon:"fas fa-car",label:"Vehicle",value:_.vehicle},{icon:"fas fa-rectangle-list",label:"Plate",value:_.plate},{icon:"fas fa-droplet",label:"Color",value:_.color},{icon:"fas fa-car",label:"Class",value:_.class},{icon:"fas fa-door-open",label:"Doors",value:_.doors},{icon:"fas fa-compass",label:"Heading",value:_.heading},{icon:"fas fa-user-group",label:"Units",value:_.units.length}]}return[u,c,l,i,s,r,a,f,o,m,h,v,k,$,y,()=>{K("refreshAlerts")},()=>{K("clearBlips")},_=>m(_.id),_=>h(_.id),_=>{Bt(_.units,o.citizenid)?(K("detachUnit",_),K("refreshAlerts")):(K("attachUnit",_),K("refreshAlerts"))}]}class Tn extends he{constructor(t){super(),pe(this,t,jn,Cn,ie,{})}}function mt(e,t,n){const l=e.slice();return l[6]=t[n],l[8]=n,l}function vt(e,t,n){const l=e.slice();return l[9]=t[n],l}function bt(e){let t,n=e[3](e[6]),l=[];for(let i=0;i{L&&(z||(z=ce(n,De,{x:t[1]?400:-400},!0)),z.run(1))}),L=!0)},o(I){z||(z=ce(n,De,{x:t[1]?400:-400},!1)),z.run(0),L=!1},d(I){I&&M(n),G&&G.d(),S&&S.d(),I&&z&&z.end()}}}function Ln(e){let t,n,l=[],i=new Map,s,r,a=e[0].slice().reverse();const f=o=>o[6].data.id;for(let o=0;on(4,l=o)),Y(e,be,o=>n(1,i=o)),Y(e,Lt,o=>n(2,s=o));let r=[];Be.subscribe(o=>{n(0,r=o||[])});function a(o){vn(o)}Ue(()=>{r.forEach(o=>{const{data:u,timer:c}=o;setTimeout(()=>{a(u.id)},c)})}),ln(()=>{r.forEach(o=>{const{data:u,timer:c}=o;setTimeout(()=>{a(u.id)},c)})});function f(o){return l?[{label:"Call",value:o.data.message},{icon:"fas fa-comment",label:"Information",value:o.data.information}]:[{icon:"fas fa-clock",label:"Time",value:Ft(o.data.time)},{icon:"fas fa-user",label:"Name",value:o.data.name},{icon:"fas fa-phone",label:"Number",value:o.data.number},{icon:"fas fa-comment",label:"Information",value:o.data.information},{icon:"fas fa-map-location-dot",label:"Street",value:o.data.street},{icon:"fas fa-user",label:"Gender",value:o.data.gender},{icon:"fas fa-gun",label:"Automatic Gun Fire",value:o.data.automaticGunFire},{icon:"fas fa-gun",label:"Weapon",value:o.data.weapon},{icon:"fas fa-car",label:"Vehicle",value:o.data.vehicle},{icon:"fas fa-rectangle-list",label:"Plate",value:o.data.plate},{icon:"fas fa-droplet",label:"Color",value:o.data.color},{icon:"fas fa-car",label:"Class",value:o.data.class},{icon:"fas fa-door-open",label:"Doors",value:o.data.doors},{icon:"fas fa-compass",label:"Heading",value:o.data.heading}]}return[r,i,s,f]}class On extends he{constructor(t){super(),pe(this,t,Rn,Ln,ie,{})}}function kt(e){let t,n,l,i;return t=new wn({props:{$$slots:{default:[Un]},$$scope:{ctx:e}}}),l=new On({}),{c(){we(t.$$.fragment),n=N(),we(l.$$.fragment)},m(s,r){ue(t,s,r),j(s,n,r),ue(l,s,r),i=!0},i(s){i||(O(t.$$.fragment,s),O(l.$$.fragment,s),i=!0)},o(s){V(t.$$.fragment,s),V(l.$$.fragment,s),i=!1},d(s){de(t,s),s&&M(n),de(l,s)}}}function Un(e){let t,n;return t=new Tn({}),{c(){we(t.$$.fragment)},m(l,i){ue(t,l,i),n=!0},i(l){n||(O(t.$$.fragment,l),n=!0)},o(l){V(t.$$.fragment,l),n=!1},d(l){de(t,l)}}}function Et(e){let t,n,l,i;return t=new Nn({}),{c(){we(t.$$.fragment),n=N(),l=g("body"),p(l,"class","bg-neutral-700")},m(s,r){ue(t,s,r),j(s,n,r),j(s,l,r),i=!0},i(s){i||(O(t.$$.fragment,s),i=!0)},o(s){V(t.$$.fragment,s),i=!1},d(s){de(t,s),s&&M(n),s&&M(l)}}}function Fn(e){let t,n,l,i,s,r=e[0]&&kt(e);n=new Mn({});let a=e[1]&&Et();return{c(){r&&r.c(),t=N(),we(n.$$.fragment),l=N(),a&&a.c(),i=x()},m(f,o){r&&r.m(f,o),j(f,t,o),ue(n,f,o),j(f,l,o),a&&a.m(f,o),j(f,i,o),s=!0},p(f,[o]){f[0]?r?o&1&&O(r,1):(r=kt(f),r.c(),O(r,1),r.m(t.parentNode,t)):r&&(ne(),V(r,1,1,()=>{r=null}),le()),f[1]?a?o&2&&O(a,1):(a=Et(),a.c(),O(a,1),a.m(i.parentNode,i)):a&&(ne(),V(a,1,1,()=>{a=null}),le())},i(f){s||(O(r),O(n.$$.fragment,f),O(a),s=!0)},o(f){V(r),V(n.$$.fragment,f),V(a),s=!1},d(f){r&&r.d(f),f&&M(t),de(n,f),f&&M(l),a&&a.d(f),f&&M(i)}}}function Bn(e,t,n){let l,i,s;return Y(e,je,r=>n(2,l=r)),Y(e,Ve,r=>n(0,i=r)),Y(e,Se,r=>n(1,s=r)),St(je,l="ps-dispatch",l),[i,s]}class Pn extends he{constructor(t){super(),pe(this,t,Bn,Fn,ie,{})}}new Pn({target:document.getElementById("app")});
diff --git a/ui/src/components/Main.svelte b/ui/src/components/Main.svelte
index dbc29247..75b2c31d 100644
--- a/ui/src/components/Main.svelte
+++ b/ui/src/components/Main.svelte
@@ -5,7 +5,6 @@
import { timeAgo } from '@utils/timeAgo';
let notifications = [];
- $IS_RIGHT_MARGIN = localStorage.getItem('IsRightMargin') === 'true';
DISPATCH.subscribe(value => {
notifications = value || [];
diff --git a/ui/src/components/Menu.svelte b/ui/src/components/Menu.svelte
index 1deba6c9..96c8e7f5 100644
--- a/ui/src/components/Menu.svelte
+++ b/ui/src/components/Menu.svelte
@@ -6,7 +6,6 @@
let activeCallId = null;
let additionalUnitsVisible = {};
- $IS_RIGHT_MARGIN = localStorage.getItem('IsRightMargin') === 'true';
function toggleDispatch(id) {
if (activeCallId === id) {
@@ -36,14 +35,12 @@
}
function toggleMargin() {
- if ($IS_RIGHT_MARGIN) {
- localStorage.setItem('IsRightMargin', 'false');
- } else {
- localStorage.setItem('IsRightMargin', 'true');
- }
-
- $IS_RIGHT_MARGIN = localStorage.getItem('IsRightMargin') === 'true';
-
+ IS_RIGHT_MARGIN.subscribe((right) => {
+ if (right) {
+ IS_RIGHT_MARGIN.set(false)
+ } else {
+ IS_RIGHT_MARGIN.set(true)
+ }})
}
function toggleMute() {