/*! maintenance_supporter frontend 2.99.0 */ import{a as di,b as pi,c as hi,g as mi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4APLU3YR.js";import{a as $}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-5MYBEQC2.js";import{a as ki,b as wi,c as $i,d as ue,e as ji,f as De}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-MGSZZ3YF.js";import{A as ve,B as Fi,C as Ui,D as Vi,E as Wi,F as Ki,M as Gi,P as Yi,a as st,b as jt,c as St,d as ae,e as Ht,f as pe,g as gi,h as _i,i as he,j as vi,k as bi,l as O,m as Zt,n as kt,o as zt,p as qt,q as ze,r as me,s as fe,t as zi,u as Pi,v as Li,w as Hi,x as Bi,y as Ni,z as qi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-XTTCEGMX.js";import{a as Di,b as Nt,d as Ai,e as _e,f as Ii}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-GWAP5R2S.js";import{a as ge}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-EKN6HBJN.js";import{a as ci,b as le,c as Et,d as ce,e as Jt,f as de}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-DRT62KZF.js";import{a as se,c as Lt}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-SYPCMUXO.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-ZHMFEWT2.js";import{a as Pe,b as gt}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-PL7JXZOW.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-TX2GMEMJ.js";import{a as Oi,b as Mi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-6BKNHM6I.js";import{c as Ci}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-WACUKJSI.js";import{a as A,b as Z,c as V}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-HFZZVTW7.js";import{c as yi,d as xi,e as Rt}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-55ND3GKE.js";import{b as ui,i as fi}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-MNPRUCF5.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-RUYEMIDM.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-SUOGXDNI.js";import{a as Me}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JQXHX4U4.js";import{c as Si,d as Ae,e as Ti}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-PCR5FRSH.js";import{l as Xt}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-RHKFQ4Q2.js";import{a as P,b as Ei,c as Ri,d as Ie}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-GM2CHGSG.js";import{A as ft,B as Ce,D as Tt,E as ai,F as oe,G as Bt,H as K,I as Kt,K as Y,L as F,M as Gt,O as U,P as ri,R as vt,S as oi,T as Yt,W as ni,X as li,Z as It,_ as Qt,a as _,b as B,ba as ne,c as o,d as G,f as h,h as N,i as Oe,j as Xe,k as Ze,l as R,m as f,n as re,o as ti,p as Mt,s,t as ei,u as ot,w as ii,x as si,y as xt}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-3FGYBPXY.js";var Os=["assignee_pool","required_completion_fields","checklist","labels","mirror_todo_entities","next_event_titles","history","readings"],Cs=["checklist_progress"],Ms=["tasks","parts"],Ds=["manual_docs","battery_fleet_excluded"];function Le(l,p,t=[]){for(let e of p)l[e]===void 0&&(l[e]=[]);for(let e of t)l[e]===void 0&&(l[e]={})}function As(l){let p=l;Le(p,Ms),p.object&&typeof p.object=="object"&&Le(p.object,Ds);for(let t of p.tasks)Le(t,Os,Cs);return l}function te(l){for(let p of l)As(p);return l}function Is(l,p){if(p.objects)return p.objects;let t=p.delta||[],e=p.removed||[];if(!t.length&&!e.length)return null;let i=new Map(l.map(a=>[a.entry_id,a]));for(let a of t)i.set(a.entry_id,a);for(let a of e)i.delete(a);return[...i.values()]}function Qi(l,p){return p.objects&&te(p.objects),p.delta&&te(p.delta),Is(l,p)}var He=["today","dashboard","calendar","settings"];var zs=168*3600*1e3;function Ji(){try{let l=Z(A.objectsCache);if(!l)return null;let p=JSON.parse(l);return p.v!==Oe||!Number.isFinite(p.at)||Date.now()-p.at>zs||!Array.isArray(p.objects)||p.objects.length===0?null:{objects:p.objects,stats:p.stats??null}}catch{return null}}function Be(l,p){if(!(!Array.isArray(l)||l.length===0))try{let t={v:Oe,at:Date.now(),objects:l,stats:p};V(A.objectsCache,JSON.stringify(t))}catch{}}var Ps={days:1,weeks:7,months:30.4368,years:365.25};function Ne(l,p){return!l||l<=0?0:l*(Ps[p||"days"]??1)}function be(l,p,t){let e=Ne(l,t);if(e<=0||p==null)return{pct:0,overflow:!1};let i=(e-p)/e*100;return{pct:Math.max(0,Math.min(100,i)),overflow:i>100}}function Xi(l,p,t,e,i,a){let r=[[t.manufacturer,l.manufacturer],[t.model,l.model],[t.serial,l.serial_number],[t.installed,l.installation_date?e(l.installation_date):null],[t.warranty,l.warranty_expiry?e(l.warranty_expiry):null]].filter(([,u])=>!!u),c=p.map(u=>{let d=t.scheduleLabel(u);return`
${$(t.title)} \xB7 ${$(t.generated)}: ${$(e(a))}
${r.length?``:""}| ${$(t.colTask)} | ${$(t.colType)} | ${$(t.colStatus)} | ${$(t.colSchedule)} | ${$(t.colLastDone)} | ${$(t.colNextDue)} | ${$(t.colTimes)} | ${$(t.colCost)} |
|---|---|---|---|---|---|---|---|
| ${$(t.none)} | |||||||
| ${$(t.totalCost)} | ${$(i(n))} | ||||||
| ${L(y)} | ${E} |