/*! maintenance_supporter frontend 2.103.4 */ import{a as _i,b as fi,c as vi,g as wi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-ZV64DBGN.js";import{a as $}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-CEMSNJOA.js";import{a as Ei,b as Ri,c as Oi,d as mt,e as Ci,f as It}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-XGDOC3LZ.js";import{A as Xi,B as Ji,C as Zi,D as yt,E as es,F as ts,G as is,H as ss,I as as,P as rs,S as ns,a as le,b as ti,c as je,d as Se,e as nt,f as He,g as ut,h as yi,i as xi,j as gt,k as $i,l as ji,m as O,n as Ze,o as we,p as ze,q as qe,r as Lt,s as vt,t as bt,u as qi,v as Fi,w as Ki,x as Gi,y as Yi,z as Qi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-2O5L64BC.js";import{f as Hi,g as Ne,i as Bi,j as ft,k as Ni}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-OGNOZSAN.js";import{a as _t}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4L3M4JJ2.js";import{a as mi,b as dt,c as Ee,d as pt,e as Xe,f as ht}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-KWB4V7O6.js";import{a as rt,c as Le}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-5I66TXQ6.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-UTR4JXIG.js";import{a as Ht,b as ge}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-BEOQQBVL.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-7UBCSMVS.js";import{a as zi,b as Li}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-554LAA35.js";import{c as Pi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-D4O4EFCE.js";import{a as A,b as Z,c as V}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-3RPKQDNU.js";import{c as Si,d as Ti,e as Re}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FWV5U3XL.js";import{b as bi,i as ki}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-6RILZ2NX.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-IBP22ZP4.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-5EUY2VLM.js";import{a as At}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-OW3M7YB7.js";import{c as Mi,d as zt,e as Di}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-RHQP4L4Q.js";import{l as Je}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-SDECZFD6.js";import{a as Ui,b as Vi,c as Wi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-OEIFCESH.js";import{a as P,b as Ai,c as Ii,d as Pt}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-3SWZBEHR.js";import{$ as Ie,B as fe,C as Dt,E as Te,F as ci,G as lt,H as Be,I as K,J as Ke,L as G,M as U,N as Ge,P as q,Q as di,S as xe,T as pi,U as hi,V as Ye,Y as ui,Z as gi,a as m,aa as Qe,b as B,c as n,d as Y,da as ct,f as h,h as N,i as Mt,j as ii,k as si,l as ai,m as R,n as f,o as ot,p as ri,q as Me,t as s,u as ni,v as re,x as oi,y as li,z as ye}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-VXQI3S2Y.js";var Ns=["assignee_pool","required_completion_fields","checklist","labels","mirror_todo_entities","next_event_titles","history","readings"],qs=["checklist_progress"],Fs=["tasks","parts"],Us=["manual_docs","battery_fleet_excluded"];function Bt(l,d,e=[]){for(let t of d)l[t]===void 0&&(l[t]=[]);for(let t of e)l[t]===void 0&&(l[t]={})}function Vs(l){let d=l;Bt(d,Fs),d.object&&typeof d.object=="object"&&Bt(d.object,Us);for(let e of d.tasks)Bt(e,Ns,qs);return l}function et(l){for(let d of l)Vs(d);return l}function Ws(l,d){if(d.objects)return d.objects;let e=d.delta||[],t=d.removed||[];if(!e.length&&!t.length)return null;let i=new Map(l.map(a=>[a.entry_id,a]));for(let a of e)i.set(a.entry_id,a);for(let a of t)i.delete(a);return[...i.values()]}function os(l,d){return d.objects&&et(d.objects),d.delta&&et(d.delta),Ws(l,d)}var Nt=["today","dashboard","calendar","settings"];var Ks=168*3600*1e3;function ls(){try{let l=Z(A.objectsCache);if(!l)return null;let d=JSON.parse(l);return d.v!==Mt||!Number.isFinite(d.at)||Date.now()-d.at>Ks||!Array.isArray(d.objects)||d.objects.length===0?null:{objects:d.objects,stats:d.stats??null}}catch{return null}}function qt(l,d){if(!(!Array.isArray(l)||l.length===0))try{let e={v:Mt,at:Date.now(),objects:l,stats:d};V(A.objectsCache,JSON.stringify(e))}catch{}}function tt(l){return l.responsible_user_id?[l.responsible_user_id]:[...new Set((l.assignee_pool||[]).filter(d=>typeof d=="string"&&d))]}function it(l,d){return!!d&&tt(l).includes(d)}var Gs={days:1,weeks:7,months:30.4368,years:365.25};function Ft(l,d){return!l||l<=0?0:l*(Gs[d||"days"]??1)}function xt(l,d,e){let t=Ft(l,e);if(t<=0||d==null)return{pct:0,overflow:!1};let i=(t-d)/t*100;return{pct:Math.max(0,Math.min(100,i)),overflow:i>100}}function cs(l,d,e,t,i,a){let r=[[e.manufacturer,l.manufacturer],[e.model,l.model],[e.serial,l.serial_number],[e.installed,l.installation_date?t(l.installation_date):null],[e.warranty,l.warranty_expiry?t(l.warranty_expiry):null]].filter(([,u])=>!!u),c=d.map(u=>{let p=e.scheduleLabel(u);return`
${$(e.title)} \xB7 ${$(e.generated)}: ${$(t(a))}
${r.length?``:""}| ${$(e.colTask)} | ${$(e.colType)} | ${$(e.colStatus)} | ${$(e.colSchedule)} | ${$(e.colLastDone)} | ${$(e.colNextDue)} | ${$(e.colTimes)} | ${$(e.colCost)} |
|---|---|---|---|---|---|---|---|
| ${$(e.none)} | |||||||
| ${$(e.totalCost)} | ${$(i(o))} | ||||||
| ${L(y)} | ${T} |