1
0
Fork 0
forked from Simnation/Main
Main/resources/[standalone]/ps-multijob/html/index.js

45 lines
36 KiB
JavaScript
Raw Normal View History

2025-06-18 00:53:24 +02:00
const kt=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function t(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=t(l);fetch(l.href,o)}};kt();function $(){}const ot=n=>n;function st(n){return n()}function Re(){return Object.create(null)}function ie(n){n.forEach(st)}function Ve(n){return typeof n=="function"}function P(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}function $t(n){return Object.keys(n).length===0}function ct(n,...e){if(n==null)return $;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Lt(n){let e;return ct(n,t=>e=t)(),e}function X(n,e,t){n.$$.on_destroy.push(ct(e,t))}function Be(n){return n==null?"":n}const ft=typeof window<"u";let at=ft?()=>window.performance.now():()=>Date.now(),De=ft?n=>requestAnimationFrame(n):$;const se=new Set;function ut(n){se.forEach(e=>{e.c(n)||(se.delete(e),e.f())}),se.size!==0&&De(ut)}function mt(n){let e;return se.size===0&&De(ut),{promise:new Promise(t=>{se.add(e={c:n,f:t})}),abort(){se.delete(e)}}}function g(n,e){n.appendChild(e)}function dt(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function jt(n){const e=y("style");return St(dt(n),e),e.sheet}function St(n,e){g(n.head||n,e)}function z(n,e,t){n.insertBefore(e,t||null)}function M(n){n.parentNode.removeChild(n)}function xt(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function y(n){return document.createElement(n)}function E(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function W(n){return document.createTextNode(n)}function T(){return W(" ")}function je(){return W("")}function Y(n,e,t,r){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}function m(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Mt(n){return Array.from(n.childNodes)}function ne(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function zt(n,e,{bubbles:t=!1,cancelable:r=!1}={}){const l=document.createEvent("CustomEvent");return l.initCustomEvent(n,t,r,e),l}const we=new Map;let ye=0;function At(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Nt(n,e){const t={stylesheet:jt(e),rules:{}};return we.set(n,t),t}function gt(n,e,t,r,l,o,i,s=0){const f=16.666/r;let c=`{
`;for(let h=0;h<=1;h+=f){const S=e+(t-e)*o(h);c+=h*100+`%{${i(S,1-S)}}
`}const a=c+`100% {${i(t,1-t)}}
}`,u=`__svelte_${At(a)}_${s}`,_=dt(n),{stylesheet:v,rules:C}=we.get(_)||Nt(_,n);C[u]||(C[u]=!0,v.insertRule(`@keyframes ${u} ${a}`,v.cssRules.length));const d=n.style.animation||"";return n.style.animation=`${d?`${d}, `:""}${u} ${r}ms linear ${l}ms 1 both`,ye+=1,u}function Ae(n,e){const t=(n.style.animation||"").split(", "),r=t.filter(e?o=>o.indexOf(e)<0:o=>o.indexOf("__svelte")===-1),l=t.length-r.length;l&&(n.style.animation=r.join(", "),ye-=l,ye||Vt())}function Vt(){De(()=>{ye||(we.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),we.clear())})}let de;function me(n){de=n}function _t(){if(!de)throw new Error("Function called outside component initialization");return de}function Dt(n){_t().$$.on_mount.push(n)}function Jt(n){_t().$$.on_destroy.push(n)}const ae=[],Ge=[],ve=[],Te=[],Et=Promise.resolve();let Ne=!1;function Ot(){Ne||(Ne=!0,Et.then(ht))}function re(n){ve.push(n)}const xe=new Set;let pe=0;function ht(){const n=de;do{for(;pe<ae.length;){const e=ae[pe];pe++,me(e),Ht(e.$$)}for(me(null),ae.length=0,pe=0;Ge.length;)Ge.pop()();for(let e=0;e<ve.length;e+=1){const t=ve[e];xe.has(t)||(xe.add(t),t())}ve.length=0}while(ae.length);for(;Te.length;)Te.pop()();Ne=!1,xe.clear(),me(n)}function Ht(n){if(n.fragment!==null){n.update(),ie(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(re)}}let fe;function pt(){return fe||(fe=Promise.resolve(),fe.then(()=>{fe=null})),fe}function Ce(n,e,t){n.dispatchEvent(zt(`${e?"intro":"outro"}${t}`))}const be=new Set;let Z;function R(){Z={r:0,c:[],p:Z}}function B(){Z.r||ie(Z.c),Z=Z.p}function p(n,e){n&&n.i&&(be.delete(n),n.i(e))}function w(n,e,t,r){if(n&&n.o){if(be.has(n))return;be.add(n),Z.c.push(()=>{be.delete(n),r&&(t&&n.d(1),r())}),n.o(e)}else r&&r()}const vt={duration:0};function bt(n,e,t){let r=e(n,t),l=!1,o,i,s=0;function f(){o&&Ae(n,o)}function c(){const{delay:u=0,duration:_=300,easing:v=ot,tick:C=$,css:d}=r||vt;d&&(o=gt(n,0,1,_,u,v,d,s++)),C(0,1);const h=at()+u,S=h+_;i&&i.abort(),l=!0,re(()=>Ce(n,!0,"start")),i=mt(x=>{if(l){if(x>=S)return C(1,0),Ce(n,!0,"end"),f(),l=!1;if(x>=h){const j=v((x-h)/_);C(j,1-j)}}return l})}let a=!1;return{start(){a||(a=!0,Ae(n),Ve(r)?(r=r(),pt().then(c)):c())},invalidate(){a=!1},end(){l&&(f(),l=!1)}}}function wt(n,e,t){let r=e(n,t),l=!0,o;const i=Z;i.r+=1;function s(){const{delay:f=0,duration:c=300,easing:a=ot,tick:u=$,css:_}=r||vt;_&&(o=gt(n,1,0,c,f,a,_));const v=at()+f,C=v+c;re(()=>Ce(n,!1,"start")),mt(d=>{if(l){if(d>=C)return u(0,1),Ce(n,!1,"end"),--i.r||ie(i.c),!1;if(d>=v){const h=a((d-v)/c);u(1-h,h)}}return l})}return Ve(r)?pt().then(()=>{r=r(),s()}):s(),{end(f){f&&r.tick&&r.tick(1,0),l&&(o&&Ae(n,o),l=!1)}}}function Rt(n,e){w(n,1,1,()=>{e.delete(n.key)})}function Bt(n,e,t,r,l,o,i,s,f,c,a,u){let _=n.length,v=o.length,C=_;const d={};for(;C--;)d[n[C].key]=C;const h=[],S=new Map,x=new Map;for(C=v;C--;){const L=u(l,o,C),J=t(L);let G=i.get(J);G?r&&G.p(L,e):(G=c(J,L),G.c()),S.set(J,h[C]=G),J in d&&x.set(J,Math.abs(C-d[J]))}const j=new Set,A=new Set;function k(L){p(L,1),L.m(s,a),i.set(L.key,L),a=L.first,v--}for(;_&&v;){const L=h[v-1],J=n[_-1],G=L.key,F=J.key;L===J?(a=L.first,_--,v--):S.has(F)?!i.has(G)||j.has(G)?k(L):A.has(F)?_--:x.get(G)>x.get(F)?(A.add(G),k(L)):(j.add(F),_--):(f(J,i),_--)}for(;_--;){const L=n[_];S.has(L.key)||f(L,i)}for(;v;)k(h[v-1]);return h}function D(n){n&&n.c()}function N(n,e,t,r){const{fragment:l,on_mount:o,on_destroy:i,after_update:s}=n.$$;l&&l.m(e,t),r||re(()=>{const f=o.map(st).filter(Ve);i?i.push(...f):ie(f),n.$$.on_mount=[]}),s.forEach(re)}function V(n,e){const t=n.$$;t.fragment!==null&&(ie(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Gt(n,e){n.$$.dirty[0]===-1&&(ae.push(n),Ot(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function U(n,e,t,r,l,o,i,s=[-1]){const f=de;me(n);const c=n.$$={fragment:null,ctx:null,props:o,update:$,not_equal:l,bound:Re(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(f?f.$$.context:[])),callbacks:Re(),di
transform: ${c} translate(${(1-u)*l}px, ${(1-u)*o}px);
opacity: ${f-a*_}`}}function Pt(n){let e,t,r,l,o,i,s,f,c,a,u,_;var v=n[0];function C(d){return{}}return v&&(l=new v(C())),{c(){e=y("div"),t=y("div"),r=y("div"),l&&D(l.$$.fragment),o=T(),i=y("div"),s=y("p"),f=W(n[1]),c=W(`:
`),a=y("span"),u=W(n[2]),m(r,"class",n[3]),m(t,"class","w-full flex justify-center text-white"),m(a,"class","text-[var(--color-green)]"),m(s,"class","text-xs"),m(i,"class","text-center"),m(e,"class","flex flex-1 flex-col items-center gap-2 b-2 b-rd-2 border-[var(--color-darkblue)] pt-[14px] pb-[14px]")},m(d,h){z(d,e,h),g(e,t),g(t,r),l&&N(l,r,null),g(e,o),g(e,i),g(i,s),g(s,f),g(s,c),g(s,a),g(a,u),_=!0},p(d,[h]){if(v!==(v=d[0])){if(l){R();const S=l;w(S.$$.fragment,1,0,()=>{V(S,1)}),B()}v?(l=new v(C()),D(l.$$.fragment),p(l.$$.fragment,1),N(l,r,null)):l=null}(!_||h&8)&&m(r,"class",d[3]),(!_||h&2)&&ne(f,d[1]),(!_||h&4)&&ne(u,d[2])},i(d){_||(l&&p(l.$$.fragment,d),_=!0)},o(d){l&&w(l.$$.fragment,d),_=!1},d(d){d&&M(e),l&&V(l)}}}function Ut(n,e,t){let{icon:r=null}=e,{detail:l}=e,{value:o}=e,{svgSize:i}=e;return n.$$set=s=>{"icon"in s&&t(0,r=s.icon),"detail"in s&&t(1,l=s.detail),"value"in s&&t(2,o=s.value),"svgSize"in s&&t(3,i=s.svgSize)},[r,l,o,i]}class Me extends I{constructor(e){super(),U(this,e,Ut,Pt,P,{icon:0,detail:1,value:2,svgSize:3})}}function It(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M160 0C177.7 0 192 14.33 192 32V67.68C193.6 67.89 195.1 68.12 196.7 68.35C207.3 69.93 238.9 75.02 251.9 78.31C268.1
82.65 279.4 100.1 275 117.2C270.7 134.3 253.3 144.7 236.1 140.4C226.8 137.1 198.5 133.3 187.3 131.7C155.2 126.9 127.7 129.3
108.8 136.5C90.52 143.5 82.93 153.4 80.92 164.5C78.98 175.2 80.45 181.3 82.21 185.1C84.1 189.1 87.79 193.6 95.14 198.5C111.4
209.2 136.2 216.4 168.4 225.1L171.2 225.9C199.6 233.6 234.4 243.1 260.2 260.2C274.3 269.6 287.6 282.3 295.8 299.9C304.1 317.7
305.9 337.7 302.1 358.1C295.1 397 268.1 422.4 236.4 435.6C222.8 441.2 207.8 444.8 192 446.6V480C192 497.7 177.7 512 160 512C142.3
512 128 497.7 128 480V445.1C127.6 445.1 127.1 444.1 126.7 444.9L126.5 444.9C102.2 441.1 62.07 430.6 35 418.6C18.85 411.4 11.58
392.5 18.76 376.3C25.94 360.2 44.85 352.9 60.1 360.1C81.9 369.4 116.3 378.5 136.2 381.6C168.2 386.4 194.5 383.6 212.3 376.4C229.2
369.5 236.9 359.5 239.1 347.5C241 336.8 239.6 330.7 237.8 326.9C235.9 322.9 232.2 318.4 224.9 313.5C208.6 302.8 183.8 295.6 151.6
286.9L148.8 286.1C120.4 278.4 85.58 268.9 59.76 251.8C45.65 242.4 32.43 229.7 24.22 212.1C15.89 194.3 14.08 174.3 17.95 153C25.03
114.1 53.05 89.29 85.96 76.73C98.98 71.76 113.1 68.49 128 66.73V32C128 14.33 142.3 0 160 0V0z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 320 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class qt extends I{constructor(e){super(),U(this,e,null,It,P,{})}}function Ft(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M287.9 0C297.1 0 305.5 5.25 309.5 13.52L378.1 154.8L531.4 177.5C540.4 178.8 547.8 185.1 550.7 193.7C553.5 202.4
551.2 211.9 544.8 218.2L433.6 328.4L459.9 483.9C461.4 492.9 457.7 502.1 450.2 507.4C442.8 512.7 432.1 513.4 424.9 509.1L287.9
435.9L150.1 509.1C142.9 513.4 133.1 512.7 125.6 507.4C118.2 502.1 114.5 492.9 115.1 483.9L142.2 328.4L31.11 218.2C24.65 211.9
22.36 202.4 25.2 193.7C28.03 185.1 35.5 178.8 44.49 177.5L197.7 154.8L266.3 13.52C270.4 5.249 278.7 0 287.9 0L287.9 0zM287.9
78.95L235.4 187.2C231.9 194.3 225.1 199.3 217.3 200.5L98.98 217.9L184.9 303C190.4 308.5 192.9 316.4 191.6 324.1L171.4 443.7L276.6
387.5C283.7 383.7 292.2 383.7 299.2 387.5L404.4 443.7L384.2 324.1C382.9 316.4 385.5 308.5 391 303L476.9 217.9L358.6 200.5C350.7
199.3 343.9 194.3 340.5 187.2L287.9 78.95z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 576 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class Kt extends I{constructor(e){super(),U(this,e,null,Ft,P,{})}}function Wt(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M224 256c70.7 0 128-57.31 128-128s-57.3-128-128-128C153.3 0 96 57.31 96 128S153.3 256 224 256zM274.7 304H173.3C77.61
304 0 381.6 0 477.3c0 19.14 15.52 34.67 34.66 34.67h378.7C432.5 512 448 496.5 448 477.3C448 381.6 370.4 304 274.7 304z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 448 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class Yt extends I{constructor(e){super(),U(this,e,null,Wt,P,{})}}function Qt(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M547.3,112.1c-98,98.1-196,196.2-294,294.2c-11.9,11.9-23.7,23.8-35.6,35.6c-6,6-9.3,6-15.3,0
C141.5,381.1,80.7,320.2,19.8,259.3c-6-6-6-9.2,0-15.2c13.6-13.6,27.2-27.2,40.8-40.8c6-6,9.2-6,15.2,0
c43.2,43.2,86.5,86.4,129.7,129.7c1.3,1.3,2.4,3,3.8,4.8c2-1.9,3.4-3.1,4.7-4.4c90.5-90.5,181-181,271.5-271.5
c7.7-7.7,10-7.7,17.8,0.1c12.7,12.7,25.5,25.5,38.2,38.2c2.1,2.1,3.9,4.4,5.8,6.6C547.3,108.6,547.3,110.4,547.3,112.1z`),m(e,"fill","currentColor"),m(e,"x","0px"),m(e,"y","0px"),m(e,"viewBox","0 0 562.7 502.7"),m(e,"xml:space","preserve")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class $e extends I{constructor(e){super(),U(this,e,null,Qt,P,{})}}function Xt(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3
0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5
12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 320 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class Pe extends I{constructor(e){super(),U(this,e,null,Xt,P,{})}}function Zt(n){let e,t,r;return{c(){e=E("svg"),t=E("path"),r=E("path"),m(t,"d","M0 0h24v24H0z"),m(t,"fill","none"),m(r,"d","M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"),m(e,"fill","currentColor"),m(e,"viewBox","0 0 24 24")},m(l,o){z(l,e,o),g(e,t),g(e,r)},p:$,i:$,o:$,d(l){l&&M(e)}}}class Ue extends I{constructor(e){super(),U(this,e,null,Zt,P,{})}}function en(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M256 512C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256zM232 120V256c0
8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24
10.7-24 24z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 512 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class Ie extends I{constructor(e){super(),U(this,e,null,en,P,{})}}function tn(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M352 0C369.7 0 384 14.33 384 32V64L384 64.15C422.6 66.31 456.3 91.49 469.2 128.3L504.4 228.8C527.6 238.4 544
261.3 544 288V480C544 497.7 529.7 512 512 512H480C462.3 512 448 497.7 448 480V432H128V480C128 497.7 113.7 512 96 512H64C46.33
512 32 497.7 32 480V288C32 261.3 48.36 238.4 71.61 228.8L106.8 128.3C119.7 91.49 153.4 66.31 192 64.15L192 64V32C192 14.33
206.3 0 224 0L352 0zM197.4 128C183.8 128 171.7 136.6 167.2 149.4L141.1 224H434.9L408.8 149.4C404.3 136.6 392.2 128 378.6
128H197.4zM128 352C145.7 352 160 337.7 160 320C160 302.3 145.7 288 128 288C110.3 288 96 302.3 96 320C96 337.7 110.3 352
128 352zM448 288C430.3 288 416 302.3 416 320C416 337.7 430.3 352 448 352C465.7 352 480 337.7 480 320C480 302.3 465.7 288
448 288z`),m(e,"fill","currentColor"),m(e,"viewBox","0 0 576 512")},m(r,l){z(r,e,l),g(e,t)},p:$,i:$,o:$,d(r){r&&M(e)}}}class qe extends I{constructor(e){super(),U(this,e,null,tn,P,{})}}const oe=[];function te(n,e=$){let t;const r=new Set;function l(s){if(P(n,s)&&(n=s,t)){const f=!oe.length;for(const c of r)c[1](),oe.push(c,n);if(f){for(let c=0;c<oe.length;c+=2)oe[c][0](oe[c+1]);oe.length=0}}}function o(s){l(s(n))}function i(s,f=$){const c=[s,f];return r.add(c),r.size===1&&(t=e(l)||$),s(n),()=>{r.delete(c),r.size===0&&(t(),t=null)}}return{set:l,update:o,subscribe:i}}async function ue(n,e={}){const t={method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(e)},l=(()=>{try{return window.GetParentResourceName()}catch{return"ps-multijob"}})();try{return await(await fetch(`https://${l}/${n}`,t)).json()}catch{}}function nn(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d","M0 32v448h448V32H0zm316.5 325.2L224 445.9l-92.5-88.7 64.5-184-64.5-86.6h184.9L252 173.2l64.5 184z"),m(e,"fill",n[0]),m(e,"xmlns","http://www.w3.org/2000/svg"),m(e,"viewBox","0 0 448 512")},m(r,l){z(r,e,l),g(e,t)},p(r,[l]){l&1&&m(e,"fill",r[0])},i:$,o:$,d(r){r&&M(e)}}}function rn(n,e,t){let{color:r="black"}=e;return n.$$set=l=>{"color"in l&&t(0,r=l.color)},[r]}class ln extends I{constructor(e){super(),U(this,e,rn,nn,P,{color:0})}}function on(n){let e,t;return{c(){e=E("svg"),t=E("path"),m(t,"d",`M152.1 38.16C161.9 47.03 162.7 62.2 153.8 72.06L81.84 152.1C77.43 156.9 71.21 159.8 64.63 159.1C58.05
160.2 51.69 157.6 47.03 152.1L7.029 112.1C-2.343 103.6-2.343 88.4 7.029 79.03C16.4 69.66 31.6 69.66 40.97 79.03L63.08
101.1L118.2 39.94C127 30.09 142.2 29.29 152.1 38.16V38.16zM152.1 198.2C161.9 207 162.7 222.2 153.8 232.1L81.84 312.1C77.43
316.9 71.21 319.8 64.63 319.1C58.05 320.2 51.69 317.6 47.03 312.1L7.029 272.1C-2.343 263.6-2.343 248.4 7.029 239C16.4
229.7 31.6 229.7 40.97 239L63.08 261.1L118.2 199.9C127 190.1 142.2 189.3 152.1 198.2V198.2zM224 96C224 78.33 238.3 64
256 64H480C497.7 64 512 78.33 512 96C512 113.7 497.7 128 480 128H256C238.3 128 224 113.7 224 96V96zM224 256C224 238.3
238.3 224 256 224H480C497.7 224 512 238.3 512 256C512 273.7 497.7 288 480 288H256C238.3 288 224 273.7 224 256zM160 416C160
398.3 174.3 384 192 384H480C497.7 384 512 398.3 512 416C512 433.7 497.7 448 480 448H192C174.3 448 160 433.7 160 416zM0
416C0 389.5 21.49 368 48 368C74.51 368 96 389.5 96 416C96 442.5 74.51 464 48 464C21.49 464 0 442.5 0 416z`),m(e,"fill",n[0]),m(e,"xmlns","http://www.w3.org/2000/svg"),m(e,"viewBox","0 0 512 512")},m(r,l){z(r,e,l),g(e,t)},p(r,[l]){l&1&&m(e,"fill",r[0])},i:$,o:$,d(r){r&&M(e)}}}function sn(n,e,t){let{color:r="black"}=e;return n.$$set=l=>{"color"in l&&t(0,r=l.color)},[r]}class cn extends I{constructor(e){super(),U(this,e,sn,on,P,{color:0})}}const fn=[{name:"whitelist",icon:cn},{name:"civilian",icon:ln}],an=()=>{const n={panelActive:te(""),panels:te(fn),show:te(!1),side:te("right")},e={handleKeyUp(t){t.key=="Escape"&&(e.setShow(!1),ue("closemenu",null))},setActive(t){n.panelActive.set(t)},setShow(t){n.show.set(t)},setSide(t){n.side.set(t)}};return{...n,...e}},le=an(),un=()=>{const n={jobManifest:te({civilian:[],whitelist:[]}),activeJob:te("police person"),onDuty:te(!1)};return{...n,...{deleteJob(t,r,l){ue("removejob",{name:t,grade:r}),n.jobManifest.update(o=>(o[l]=o[l].filter(i=>i.name!=t),o))},receiveOpenMessage(t){n.jobManifest.set(t.jobs),n.activeJob.set(t.activeJob),n.onDuty.set(t.onDuty),le.side.set(t.side||"right")},recieveUpdateJob(t){Lt(n.activeJob)==t.name&&n.onDuty.set(t.onDuty),n.jobManifest.update(l=>{var a;function o(u,_){let v=l[u][_];v.grade=t.grade,v.gradeLabel=t.gradeLabel,v.salary=t.salary}function i(){return{name:t.name,label:t.label,description:t.description,salary:t.salary,gradeLabel:t.gradeLabel,grade:t.grade,active:0,icon:t.icon}}let s=u=>u.name==t.name;const f=t.isWhitelist?"whitelist":"civilian";let c=(a=l[f])==null?void 0:a.findIndex(s);return c!=-1?o(f,c):l[f]=[...l[f],i()],l})},async setActiveJob(t,r,l){n.activeJob.set(t);let o=await ue("selectjob",{name:r,grade:l});n.onDuty.set(o==null?void 0:o.onDuty)},unSetActiveJob(){n.activeJob.set(""),n.onDuty.set(!1),ue("selectjob",{name:"unemployed",grade:0})},toggleDuty(){n.onDuty.update(t=>!t),ue("toggleduty",null)}}}},Le=un();function mn(n){let e,t,r;var l=qe;function o(i){return{}}return l&&(e=new l(o())),{c(){e&&D(e.$$.fragment),t=je()},m(i,s){e&&N(e,i,s),z(i,t,s),r=!0},p(i,s){if(l!==(l=qe)){if(e){R();const f=e;w(f.$$.fragment,1,0,()=>{V(f,1)}),B()}l?(e=new l(o()),D(e.$$.fragment),p(e.$$.fragment,1),N(e,t.parentNode,t)):e=null}},i(i){r||(e&&p(e.$$.fragment,i),r=!0)},o(i){e&&w(e.$$.fragment,i),r=!1},d(i){i&&M(t),e&&V(e,i)}}}function dn(n){let e,t;return{c(){e=y("i"),m(e,"class",t=n[2]+" fa-lg")},m(r,l){z(r,e,l)},p(r,l){l[0]&4&&t!==(t=r[2]+" fa-lg")&&m(e,"class",t)},i:$,o:$,d(r){r&&M(e)}}}function Fe(n){let e,t,r,l,o,i,s,f;var c=$e;function a(u){return{}}return c&&(r=new c(a())),{c(){e=y("button"),t=y("div"),r&&D(r.$$.fragment),l=T(),o=y("p"),o.textContent="select",m(t,"class","w-4"),m(o,"class","ml-[5px] uppercase tracking-wide"),m(e,"class","bg-[var(--color-green)] flex flex-row h-11 items-center justify-center gap-1 b-rd-[5px] py-[10px] font-medium text-black flex-1 w-full")},m(u,_){z(u,e,_),g(e,t),r&&N(r,t,null),g(e,l),g(e,o),i=!0,s||(f=Y(e,"click",n[29]),s=!0)},p(u,_){if(c!==(c=$e)){if(r){R();const v=r;w(v.$$.fragment,1,0,()=>{V(v,1)}),B()}c?(r=new c(a()),D(r.$$.fragment),p(r.$$.fragment,1),N(r,t,null)):r=null}},i(u){i||(r&&p(r.$$.fragment,u),i=!0)},o(u){r&&w(r.$$.fragment,u),i=!1},d(u){u&&M(e),r&&V(r),s=!1,f()}}}function Ke(n){let e,t,r,l,o,i,s,f,c,a,u,_,v,C,d,h,S,x=!n[15]&&We(),j=(n[9]&&!n[11]||n[12])&&Ye(),A=(!n[9]&&!n[11]||n[13])&&Qe();return{c(){e=y("div"),t=y("button"),x&&x.c(),r=T(),l=y("p"),o=W(n[14]),s=T(),f=y("div"),c=y("button"),j&&j.c(),a=T(),A&&A.c(),u=T(),_=y("p"),v=W(n[16]),m(l,"class","uppercase tracking-wide"),m(t,"class",i="flex flex-1 flex-row gap-2 border-1 b-rd-[5px] justify-center items-center h-11"+(n[15]?"border-[var(--color-orange)] text-[var(--color-orange)]":"")),m(_,"class","ml-[5px] uppercase tracking-wide"),m(c,"class",C="flex flex-row justify-center items-center gap-1 h-11 border-1 b-rd-[5px] py-[10px] font-medium flex-1 w-full "+(n[9]?"border-[var(--color-green)] text-[var(--color-green)] ":"border-[var(--color-orange)] text-[var(--color-orange)] ")+(n[9]&&!n[12]?"hover:border-[var(--color-orange)] hover:text-[v