1import{a as Vt,b as Pt,c as jt}from"./chunk-UOW25UIC.js";import{a as Tt}from"./chunk-VFAZ3Q4T.js";import{b as Ot}from"./chunk-QUB4BT56.js";import{a as q}from"./chunk-IQ2XMB63.js";import{c as Rt,e as Et,f as St,g as z,i as It}from"./chunk-WAZ2LIIK.js";import{a as yt}from"./chunk-JXSG6THO.js";import{ja as G}from"./chunk-ENDAT2WW.js";import{f as vt,j as Ct}from"./chunk-KBSSFVI3.js";import{a as M}from"./chunk-PTOXGBBU.js";import{db as k}from"./chunk-N6RRKPMH.js";import"./chunk-FJFH4XCE.js";import"./chunk-RWQTLYTV.js";import"./chunk-L7WATY32.js";import"./chunk-2RDPNIM6.js";import{e as ft}from"./chunk-XPR5ELEW.js";import"./chunk-GGY6QDTV.js";import"./chunk-5IJU7MQ2.js";import"./chunk-LM6BYTWK.js";import"./chunk-ZWZG7L3J.js";import"./chunk-UXZT3DCY.js";import{o as lt}from"./chunk-ECXCM7JU.js";import"./chunk-7DHSGR33.js";import{c as ct,f as pt,g as dt,h as mt,i as wt,j as ut,p as _t,q as gt,r as xt,w as bt,y as ht}from"./chunk-QO327RTO.js";import"./chunk-4MYWE7CD.js";import"./chunk-RS4X3CMD.js";import{g as ot,i as at}from"./chunk-EWPP756Y.js";import"./chunk-I5EQON52.js";
1import{b as st,c as P,d as j}from"./chunk-G6PWMA7J.js";import{Aa as S,Ac as N,Bc as L,Cc as F,Ea as K,Gb as H,J as A,Jb as y,Jc as Q,Jd as rt,Kc as U,Lb as R,Lc as X,Nc as Z,Qb as l,Qc as d,Rb as o,Rc as w,Sb as a,Sc as T,Tb as v,ac as x,cc as g,db as i,ec as c,fd as tt,ga as E,mb as f,oa as u,pa as _,pc as B,qa as O,qc as J,r as W,ra as Y,sb as V,sc as s,tc as C,uc as p,vc as $,vd as et,wd as it,xd as nt,yb as h}from"./chunk-IQ6SK2BU.js";import"./chunk-AMJ4GB2S.js";import"./chunk-WGJEEJGF.js";import"./chunk-6ACFICIG.js";import"./chunk-K7BHMZHH.js";import"./chunk-FE7444LI.js";import"./chunk-OXDKANHF.js";import{a as I,b as D}from"./chunk-XUHYVR5R.js";function Ft(e,m){e&1&&(o(0,"p",3),s(1),d(2,"translate"),a()),e&2&&(i(),p(" ",w(2,1,"V2.COMMON.LOADING")," "))}function Ut(e,m){if(e&1){let t=x();o(0,"p",5),s(1),d(2,"translate"),a(),o(3,"button",6),g("click",function(){u(t);let r=c();return _(r.load())}),s(4),d(5,"translate"),a()}e&2&&(i(),p(" ",w(2,2,"V2.REPAIR_OUTCOME.LOAD_ERROR")," "),i(3),p(" ",w(5,4,"V2.REPAIR_OUTCOME.RETRY")," "))}function Gt(e,m){e&1&&(o(0,"option",13),s(1),d(2,"translate"),a()),e&2&&(l("ngValue",null),i(),C(w(2,2,"V2.REPAIR_OUTCOME.NOT_CHECKED")))}function zt(e,m){e&1&&(o(0,"p",5),s(1),d(2,"translate"),a()),e&2&&(i(),p(" ",w(2,1,"V2.REPAIR_OUTCOME.SAVE_ERROR")," "))}function qt(e,m){e&1&&(o(0,"p",3),s(1),d(2,"translate"),a()),e&2&&(i(),p(" ",w(2,1,"V2.REPAIR_OUTCOME.SAVED")," "))}function Wt(e,m){if(e&1){let t=x();o(0,"form",7),g("ngSubmit",function(){u(t);let r=c();return _(r.save())}),o(1,"div",8)(2,"label",9),s(3),d(4,"translate"),a(),o(5,"textarea",10),F("ngModelChange",function(r){u(t);let b=c();return L(b.description,r)||(b.description=r),_(r)}),g("ngModelChange",function(){u(t);let r=c();return _(r.saved.set(!1))}),a()(),o(6,"div",8)(7,"label",11),s(8),d(9,"translate"),a(),o(10,"select",12),F("ngModelChange",function(r){u(t);let b=c();return L(b.resolution,r)||(b.resolution=r),_(r)}),g("ngModelChange",function(){u(t);let r=c();return _(r.saved.set(!1))}),y(11,Gt,3,4,"option",13),o(12,"option",13),s(13),d(14,"translate"),a(),o(15,"option",13),s(16),d(17,"translate"),a()()(),y(18,zt,3,3,"p",5),y(19,qt,3,3,"p",3),o(20,"button",14),s(21),d(22,"translate"),a()()}if(e&2){let t,n=c();i(3),p(" ",w(4,15,"V2.REPAIR_OUTCOME.NOTES")," "),i(2),N("ngModel",n.description),l("disabled",n.saving()),i(3),p(" ",w(9,17,"V2.REPAIR_OUTCOME.RESOLUTION")," "),i(2),N("ngModel",n.resolution),l("disabled",n.saving()),i(),R(((t=n.outcome())==null?null:t.symptomResolved)===null||n.outcome()===null?11:-1),i(),l("ngValue",!1),i(),C(w(14,19,"V2.REPAIR_OUTCOME.UNRESOLVED")),i(2),l("ngValue",!0),i(),C(w(17,21,"V2.REPAIR_OUTCOME.RESOLVED")),i(2),R(n.error()==="save"?18:-1),i(),R(n.saved()?19:-1),i(),l("disabled",n.saving()||!n.hasChanges),i(),p(" ",w(22,23,n.saving()?"V2.REPAIR_OUTCOME.SAVING":"V2.REPAIR_OUTCOME.SAVE")," ")}}var kt=(()=>{class e{constructor(){this.jobId="",this.outcome=S(null),this.loading=S(!0),this.saving=S(!1),this.error=S(null),this.saved=S(!1),this.description="",this.resolution=null,this.generation=0,this.api=E(yt),this.flags=E(M),this.analytics=E(k)}ngOnChanges(){this.load()}ngOnDestroy(){this.generation++}get hasChanges(){return this.description.trim()!==(this.outcome()?.fixDescription?.trim()??"")||this.resolution!==(this.outcome()?.symptomResolved??null)}async load(){let t=++this.generation;if(this.outcome.set(null),this.description="",this.resolution=null,this.saved.set(!1),this.error.set(null),this.loading.set(!0),this.saving.set(!1),!this.jobId||!this.flags.is("repairCaseSpineEnabled")){this.loading.set(!1);return}try{let n=await this.api.getOutcome(this.jobId);if(t!==this.generation)return;this.outcome.set(n),this.description=n?.fixDescription??"",this.resolution=n?.symptomResolved??null}catch{t===this.generation&&this.error.set("load")}finally{t===this.generation&&this.loading.set(!1)}}async save(){if(this.loading()||this.saving()||this.error()==="load"||!this.jobId||!this.flags.is("repairCaseSpineEnabled")||!this.hasChanges)return;let t=this.generation;this.saving.set(!0),this.error.set(null),this.saved.set(!1);try{let n=await this.api.saveOutcome(this.jobId,I({fixDescription:this.description.trim(),symptomResolved:this.resolution},!this.description.trim()&&this.outcome()?.fixDescription?{clearFixDescription:!0}
1:{}));if(t!==this.generation)return;this.outcome.set(n),this.description=n.fixDescription??"",this.resolution=n.symptomResolved,this.saved.set(!0),this.analytics.logRepairOutcomeSaved(n.repairJobId,n.symptomResolved)}catch{t===this.generation&&this.error.set("save")}finally{t===this.generation&&this.saving.set(!1)}}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=V({type:e,selectors:[["app-repair-outcome"]],inputs:{jobId:"jobId"},features:[K],decls:10,vars:7,consts:[["aria-labelledby","repair-outcome-title",1,"tw-bg-mech-surface","tw-border","tw-border-mech-border","tw-rounded-2xl","tw-p-5","tw-space-y-4"],["id","repair-outcome-title",1,"tw-text-base","tw-font-bold","tw-text-mech-text"],[1,"tw-text-sm","tw-text-mech-text-secondary"],["role","status",1,"tw-text-sm","tw-text-mech-text-secondary"],[1,"tw-space-y-4"],["role","alert",1,"tw-text-sm","tw-text-mech-text-secondary"],["type","button",1,"mech-btn-secondary",3,"click"],[1,"tw-space-y-4",3,"ngSubmit"],[1,"tw-space-y-2"],["for","repair-outcome-notes",1,"tw-block","tw-text-sm","tw-font-semibold","tw-text-mech-text"],["id","repair-outcome-notes","name","notes","rows","3","maxlength","2000",1,"tw-w-full","tw-text-base","tw-bg-mech-surface-2","tw-text-mech-text","tw-border","tw-border-mech-border","tw-rounded-xl","tw-p-3",3,"ngModelChange","ngModel","disabled"],["for","repair-outcome-resolution",1,"tw-block","tw-text-sm","tw-font-semibold","tw-text-mech-text"],["id","repair-outcome-resolution","name","resolution",1,"tw-w-full","tw-min-h-11","tw-text-base","tw-bg-mech-surface-2","tw-text-mech-text","tw-border","tw-border-mech-border","tw-rounded-xl","tw-p-3",3,"ngModelChange","ngModel","disabled"],[3,"ngValue"],["type","submit",1,"mech-btn-primary","tw-min-h-11",3,"disabled"]],template:function(n,r){n&1&&(o(0,"section",0)(1,"h2",1),s(2),d(3,"translate"),a(),o(4,"p",2),s(5),d(6,"translate"),a(),y(7,Ft,3,3,"p",3)(8,Ut,6,6)(9,Wt,23,25,"form",4),a()),n&2&&(i(2),p(" ",w(3,3,"V2.REPAIR_OUTCOME.TITLE")," "),i(3),C(w(6,5,"V2.REPAIR_OUTCOME.HELP")),i(2),R(r.loading()?7:r.error()==="load"?8:9))},dependencies:[ht,ut,gt,xt,ct,_t,pt,dt,bt,wt,mt,j,P],encapsulation:2,changeDetection:0})}}return e})();var Yt=()=>[1,2,3,4],Kt=(e,m,t,n)=>({"tw-bg-mech-surface-2 tw-text-mech-text-secondary":e,"tw-bg-mech-primary-50 tw-text-mech-primary":m,"tw-bg-green-100 tw-text-green-700":t,"tw-bg-mech-surface-2 tw-text-mech-text-muted":n}),Ht=(e,m)=>({done:e,total:m}),$t=e=>({date:e}),Qt=e=>({count:e});function Xt(e,m){e&1&&v(0,"div",8),e&2&&B("width",85,"%")}function Zt(e,m){e&1&&(o(0,"div",3),v(1,"div",4)(2,"div",5),o(3,"div",6),h(4,Xt,1,2,"div",7),a()()),e&2&&(i(4),l("ngForOf",Q(1,Yt)))}function te(e,m){if(e&1){let t=x();o(0,"div",9)(1,"p",10),s(2),d(3,"translate"),a(),o(4,"button",11),g("click",function(){u(t);let r=c();return _(r.goBack())}),s(5),d(6,"translate"),a()()}e&2&&(i(2),C(w(3,2,"V2.REPAIR_JOBS.LOAD_ERROR")),i(3),p(" ",w(6,4,"V2.REPAIR_JOBS.BACK_TO_JOBS")," "))}function ee(e,m){if(e&1&&(o(0,"span",32),O(),o(1,"svg",14),v(2,"path",33),a(),s(3),d(4,"translate"),a()),e&2){let t=c(2);i(3),p(" ",T(4,1,t.eta.key,t.eta.params)," ")}}function ie(e,m){if(e&1&&(o(0,"span",34),s(1),d(2,"translate"),a()),e&2){let t=c(2);i(),p(" ",T(2,1,"V2.REPAIR_JOBS.STARTED_ON",U(4,$t,t.formattedDate(t.job.startedAt)))," ")}}function ne(e,m){e&1&&(O(),o(0,"svg",47),v(1,"path",48),a())}function re(e,m){if(e&1&&(o(0,"span",49),s(1),a()),e&2){let t=m.$implicit;i(),p(" \u26A0 ",t," ")}}function oe(e,m){if(e&1&&(o(0,"span",50),s(1),a()),e&2){let t=c().$implicit;i(),p(" ",t.body," ")}}function ae(e,m){if(e&1){let t=x();o(0,"li",39)(1,"button",40),g("click",function(){let r=u(t).$implicit,b=c(3);return _(b.toggleStep(r))}),o(2,"span",41),h(3,ne,2,0,"svg",42),a(),o(4,"span",43)(5,"span",44),s(6),a(),h(7,re,2,1,"span",45)(8,oe,2,1,"span",46),a()()()}if(e&2){let t=m.$implicit,n=c(3);i(),l("disabled",n.saving||n.isTerminal),H("aria-pressed",t.completed),i(),l("ngClass",t.completed?"tw-bg-mech-primary tw-border-mech-primary":"tw-border-mech-border-strong tw-bg-transparent"),i(),l("ngIf",t.completed),i(2),J("tw-line-through",t.completed)("tw-text-mech-text-muted",t.completed),i(),$(" ",t.stepNumber,". ",t.title," "),i(),l("ngForOf",t.warnings),i(),l("ngIf",t.body)}}function se(e,m){if(e&1&&(o(0,"div",35)(1,"h2",36),s(2),d(3,"translate"),a(),o(4,"ul",37),h(5,ae,9,12,"li",38),a()()),e&2){let t=c(2);
1i(2),p(" ",w(3,3,"V2.REPAIR_JOBS.CHECKLIST")," "),i(3),l("ngForOf",t.job.steps)("ngForTrackBy",t.trackByStep)}}function le(e,m){if(e&1&&(o(0,"span"),s(1),a()),e&2){let t=c().$implicit;i(),p("\xB7 ",t.oemPartNumber)}}function ce(e,m){if(e&1){let t=x();o(0,"li",52)(1,"span",43)(2,"span",44),s(3),a(),o(4,"span",53),s(5),d(6,"translate"),h(7,le,2,1,"span",54),a()(),o(8,"div",55)(9,"button",56),g("click",function(){let r=u(t).$implicit,b=c(3);return _(b.togglePartAcquired(r))}),s(10),d(11,"translate"),a(),o(12,"button",56),g("click",function(){let r=u(t).$implicit,b=c(3);return _(b.togglePartInstalled(r))}),s(13),d(14,"translate"),a()()()}if(e&2){let t=m.$implicit,n=c(3);i(3),C(t.displayName),i(2),p(" ",T(6,9,"V2.REPAIR_JOBS.QUANTITY",U(16,Qt,t.quantity))," "),i(2),l("ngIf",t.oemPartNumber),i(2),l("ngClass",t.acquired?"tw-bg-mech-primary-50 tw-text-mech-primary tw-border-mech-primary-100":"tw-bg-transparent tw-text-mech-text-muted tw-border-mech-border-strong")("disabled",n.saving||n.isTerminal),i(),p(" ",w(11,12,"V2.REPAIR_JOBS.PART_ACQUIRED")," "),i(2),l("ngClass",t.installed?"tw-bg-green-100 tw-text-green-700 tw-border-green-200":"tw-bg-transparent tw-text-mech-text-muted tw-border-mech-border-strong")("disabled",n.saving||n.isTerminal),i(),p(" ",w(14,14,"V2.REPAIR_JOBS.PART_INSTALLED")," ")}}function pe(e,m){if(e&1&&(o(0,"div",35)(1,"h2",36),s(2),d(3,"translate"),a(),o(4,"ul",37),h(5,ce,15,18,"li",51),a()()),e&2){let t=c(2);i(2),p(" ",w(3,3,"V2.REPAIR_JOBS.PARTS")," "),i(3),l("ngForOf",t.job.parts)("ngForTrackBy",t.trackByPart)}}function de(e,m){if(e&1){let t=x();o(0,"button",62),g("click",function(){u(t);let r=c(3);return _(r.setStatus("in_progress"))}),s(1),d(2,"translate"),a()}if(e&2){let t=c(3);l("disabled",t.saving),i(),p(" ",w(2,2,t.job.status==="not_started"?"V2.REPAIR_JOBS.START":"V2.REPAIR_JOBS.RESUME_CTA")," ")}}function me(e,m){if(e&1){let t=x();o(0,"button",63),g("click",function(){u(t);let r=c(3);return _(r.setStatus("paused"))}),s(1),d(2,"translate"),a()}if(e&2){let t=c(3);l("disabled",t.saving),i(),p(" ",w(2,2,"V2.REPAIR_JOBS.PAUSE")," ")}}function we(e,m){if(e&1){let t=x();o(0,"button",64),g("click",function(){u(t);let r=c(3);return _(r.setStatus("completed"))}),s(1),d(2,"translate"),a()}if(e&2){let t=c(3);l("disabled",t.saving),i(),p(" ",w(2,2,"V2.REPAIR_JOBS.MARK_DONE")," ")}}function ue(e,m){if(e&1){let t=x();o(0,"div",57),h(1,de,3,4,"button",58)(2,me,3,4,"button",59)(3,we,3,4,"button",60),o(4,"button",61),g("click",function(){u(t);let r=c(2);return _(r.setStatus("abandoned"))}),s(5),d(6,"translate"),a()()}if(e&2){let t=c(2);i(),l("ngIf",t.canResume),i(),l("ngIf",t.canPause),i(),l("ngIf",t.canComplete),i(),l("disabled",t.saving),i(),p(" ",w(6,5,"V2.REPAIR_JOBS.ABANDON")," ")}}function _e(e,m){if(e&1){let t=x();o(0,"div",65)(1,"div",66)(2,"p",67),s(3),d(4,"translate"),a(),o(5,"p",68),s(6),d(7,"translate"),a()(),o(8,"button",69),g("click",function(){u(t);let r=c(2);return _(r.setMaintenanceReminder())}),s(9),d(10,"translate"),a()()}e&2&&(i(3),p(" ",w(4,3,"V2.DIY_RETENTION.CASE_COMPLETED_TITLE")," "),i(3),p(" ",w(7,5,"V2.DIY_RETENTION.CASE_COMPLETED_BODY")," "),i(3),p(" ",w(10,7,"V2.DIY_RETENTION.SET_REMINDER_CTA")," "))}function ge(e,m){if(e&1&&v(0,"app-repair-outcome",30),e&2){let t=c(2);l("jobId",t.job.id)}}function xe(e,m){if(e&1){let t=x();o(0,"button",70),g("click",function(){u(t);let r=c(2);return _(r.openSourceGuide())}),O(),o(1,"svg",14),v(2,"path",71),a(),s(3),d(4,"translate"),a()}e&2&&(i(3),p(" ",w(4,1,"V2.REPAIR_JOBS.VIEW_SOURCE_GUIDE")," "))}function be(e,m){if(e&1){let t=x();o(0,"div",12)(1,"div")(2,"button",13),g("click",function(){u(t);let r=c();return _(r.goBack())}),O(),o(3,"svg",14),v(4,"path",15),a(),s(5),d(6,"translate"),a(),Y(),v(7,"app-garage-reading-toggle",16),o(8,"h1",17),s(9),a(),o(10,"div",18)(11,"span",19),s(12),a(),h(13,ee,5,4,"span",20)(14,ie,3,6,"span",21),a()(),o(15,"div",22)(16,"div",23)(17,"span"),s(18),d(19,"translate"),a(),o(20,"span",24),s(21),a()(),o(22,"div",25),v(23,"div",26),a()(),h(24,se,6,5,"div",27)(25,pe,6,5,"div",27)(26,ue,7,7,"div",28)(27,_e,11,9,"div",29),y(28,ge,1,1,"app-repair-outcome",30),h(29,xe,5,3,"button",31),a()}if(e&2){let t=c();J("garage-reading",t.readingMode.enabled()),i(5),p(" ",w(6,18,"V2.REPAIR_JOBS.BACK_TO_JOBS")," "),i(4),p(" ",t.job.title," "),i(2),l("ngClass",Z(23,Kt,t.job.status==="not_started"||t.job.status==="paused",t.job.status==="in_progress",t.job.status==="completed",t.job.status==="abandoned")),i(),p(" ",t.statusLabel," "),i(),l("ngIf",t.eta),i(),l("ngIf",t.job.startedAt),i(4),C(T(19,20,"V2.REPAIR_JOBS.STEPS_PROGRESS",X(28,Ht,t.job.stepsCompleted,t.job.stepsTotal))),i(3),p("",t.percent,"%"),i(2),B("width",t.percent,"%"),i(),l("ngIf",t.job.steps&&t.job.steps.length>0),i(),l("ngIf",t.job.parts&&t.job.parts.length>0),i(),l("ngIf",!t.isTerminal),i(),l("ngIf",t.diyRetentionLoopEnabled&&t.job.status==="completed"),i(),R(t.repairCaseSpineEnabled?28:-1),i(),l("ngIf",t.job.sourceGuideId)}}var he={not_started:"V2.REPAIR_JOBS.STATUS_NOT_STARTED",in_progress:"V2.REPAIR_JOBS.STATUS_IN_PROGRESS",paused:"V2.REPAIR_JOBS.STATUS_PAUSED",completed:"V2.REPAIR_JOBS.STATUS_COMPLETED",abandoned:"V2.REPAIR_JOBS.STATUS_ABANDONED"},ei=(()=>{class e{constructor(t,n,r,b,Mt,Dt,At,Bt,Jt){this.route=t,this.router=n,this.store=r,this.cdr=b,this.translate=Mt,this.localeService=Dt,this.analytics=At,this.diyRetention=Bt,this.featureFlags=Jt,this.readingMode=E(Pt),this.job=null,this.eta=null,this.isLoading=!0,this.loadError=!1,this.saving=!1,this.diyRetentionLoopEnabled=!1,this.repairCaseSpineEnabled=!1,this.subs=[],this.jobId="",this.detailLoa
1ded=!1}ngOnInit(){if(this.diyRetentionLoopEnabled=this.featureFlags.is("diyRetentionLoopEnabled"),this.repairCaseSpineEnabled=this.featureFlags.is("repairCaseSpineEnabled"),this.jobId=this.route.snapshot.paramMap.get("id")??"",!this.jobId){this.router.navigate(["/v2/repair-jobs"]);return}this.subs.push(W([this.store.select(G.currentProduct),this.store.select(G.rcUserReady)]).subscribe(([t,n])=>{if(vt("repair-jobs",Ct(t?.entitlementName??""))){n&&this.router.navigate(["/v2/repair-jobs"],{replaceUrl:!0});return}this.detailLoaded||(this.detailLoaded=!0,this.loadDetail())}))}ngOnDestroy(){this.subs.forEach(t=>t.unsubscribe()),this.store.dispatch(new It)}loadDetail(){this.subs.push(this.store.select(q.current).subscribe(t=>{t&&t.id===this.jobId&&(this.job=t,this.eta=t.estimatedTimeMinutes?Vt(t.estimatedTimeMinutes):null,this.isLoading=!1),this.cdr.markForCheck()})),this.subs.push(this.store.select(q.saving).subscribe(t=>{this.saving=t,this.cdr.markForCheck()})),this.store.dispatch(new Rt(this.jobId)).pipe(A(1)).subscribe({error:()=>{this.isLoading=!1,this.loadError=!0,this.cdr.markForCheck()}})}get statusLabel(){return this.job?this.translate.instant(he[this.job.status]??this.job.status):""}get percent(){return!this.job||this.job.stepsTotal<=0?0:Math.round(this.job.stepsCompleted/this.job.stepsTotal*100)}get canComplete(){return this.job?.status==="in_progress"||this.job?.status==="paused"}get canPause(){return this.job?.status==="in_progress"}get canResume(){return this.job?.status==="paused"||this.job?.status==="not_started"}get isTerminal(){return this.job?.status==="completed"||this.job?.status==="abandoned"}formattedDate(t){return t==null?"":Tt(t,this.localeService.getActiveLocale(),{month:"short",day:"numeric",year:"numeric"})}toggleStep(t){if(!this.job||this.saving||this.isTerminal)return;let n=this.job.status==="not_started";this.store.dispatch(new Et(this.job.id,t.id,!t.completed)),this.analytics.logRepairJobStepCompleted(this.job.id,!t.completed,this.jobEventContext()),n&&!t.completed&&this.analytics.logRepairJobStarted(this.job.id,this.job.sourceType,this.jobEventContext())}togglePartAcquired(t){if(!this.job||this.saving||this.isTerminal)return;let n=this.job.parts.map(r=>r.canonicalName===t.canonicalName?D(I({},r),{acquired:!r.acquired}):r);this.store.dispatch(new z(this.job.id,n))}togglePartInstalled(t){if(!this.job||this.saving||this.isTerminal)return;let n=this.job.parts.map(r=>r.canonicalName===t.canonicalName?D(I({},r),{installed:!r.installed}):r);this.store.dispatch(new z(this.job.id,n))}setStatus(t){if(!this.job||this.saving)return;let n=this.job.id,r=this.store.dispatch(new St(n,t));t==="completed"&&r.pipe(A(1)).subscribe({next:()=>{this.analytics.logRepairJobCompleted(n,this.jobEventContext()),this.diyRetention.mark("repair_completed","repair_job_detail"),this.cdr.markForCheck()}})}setMaintenanceReminder(){this.router.navigate(["/v2","mech-care","plan"],{queryParams:{src:"completed_repair_job"}})}jobEventContext(){return{sourceGuideId:this.job?.sourceGuideId,vehicleId:this.job?.garageCarId}}openSourceGuide(){this.job?.sourceGuideId&&this.router.navigate(["/v2/repair-guides",this.job.sourceGuideId])}goBack(){this.router.navigate(["/v2/repair-jobs"])}trackByStep(t,n){return n.id}trackByPart(t,n){return n.canonicalName}static{this.\u0275fac=function(n){return new(n||e)(f(ot),f(at),f(lt),f(tt),f(st),f(ft),f(k),f(Ot),f(M))}}static{this.\u0275cmp=V({type:e,selectors:[["app-repair-job-detail"]],decls:3,vars:3,consts:[["class","tw-space-y-4 tw-pb-10",4,"ngIf"],["class","tw-flex tw-flex-col tw-items-center tw-justify-center tw-py-20 tw-gap-4",4,"ngIf"],["class","tw-pb-12 tw-space-y-6",3,"garage-reading",4,"ngIf"],[1,"tw-space-y-4","tw-pb-10"],[1,"tw-h-8","shimmer-line","tw-rounded-2xl","tw-w-3/4"],[1,"tw-h-4","shimmer-line","tw-rounded-xl","tw-w-1/2"],[1,"tw-bg-mech-surface","tw-rounded-[20px]","tw-border","tw-border-mech-border","tw-p-6","tw-space-y-3"],["class","tw-h-3 shimmer-line tw-rounded-xl",3,"width",4,"ngFor","ngForOf"],[1,"tw-h-3","shimmer-line","tw-rounded-xl"],[1,"tw-flex","tw-flex-col","tw-items-center","tw-justify-center","tw-py-20","tw-gap-4"],[1,"tw-text-sm","tw-font-semibold","tw-text-mech-text-secondary"],["type","button",1,"mech-btn-primary",3,"click"],[1,"tw-pb-12","tw-space-y-6"],["type","button",1,"tw-flex","tw-items-center","tw-gap-1.5","tw-text-xs","tw-font-semibold","tw-text-mech-text-muted","hover:tw-text-mech-primary","tw-transition-colors","tw-border-none","tw-bg-transparent","tw-cursor-pointer","tw-mb-4",3,"click"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2",1,"tw-w-3.5","tw-h-3.5"],["stroke-linecap","round","stroke-linejoin","round","d","M15.75 19.5L8.25 12l7.5-7.5"],[1,"tw-mb-4"],[1,"tw-text-xl","md:tw-text-2xl","tw-font-[800]","tw-text-mech-text","tw-tracking-tight","tw-mb-3"],[1,"tw-flex","tw-flex-wrap","tw-gap-2"],[1,"tw-inline-flex","tw-items-center","tw-text-xs","tw-font-bold","tw-px-2.5","tw-py-1","tw-rounded-full",3,"ngClass"],["class","tw-inline-flex tw-items-center tw-gap-1 tw-text-xs tw-font-semibold tw-text-mech-text-secondary tw-bg-mech-surface-2 tw-px-2.5 tw-py-1 tw-rounded-full",4,"ngIf"],["class","tw-inline-flex tw-items-center tw-text-xs tw-font-semibold tw-text-mech-text-muted tw-bg-mech-surface-2 tw-px-2.5 tw-py-1 tw-rounded-full",4,"ngIf"],[1,"tw-bg-mech-surface","tw-border","t
1w-border-mech-border","tw-rounded-[20px]","tw-p-5","tw-space-y-2"],[1,"tw-flex","tw-items-center","tw-justify-between","tw-text-sm","tw-font-semibold","tw-text-mech-text"],[1,"tw-text-mech-text-muted"],[1,"tw-h-2","tw-rounded-full","tw-bg-mech-surface-2","tw-overflow-hidden"],[1,"tw-h-full","tw-rounded-full","tw-bg-mech-primary","tw-transition-all"],["class","tw-bg-mech-surface tw-border tw-border-mech-border tw-rounded-[20px]",4,"ngIf"],["class","tw-flex tw-flex-wrap tw-gap-3",4,"ngIf"],["class","tw-bg-green-500/10 tw-border tw-border-green-500/30 tw-rounded-2xl tw-p-4 tw-flex tw-flex-col sm:tw-flex-row sm:tw-items-center tw-gap-3",4,"ngIf"],[3,"jobId"],["type","button","class","tw-flex tw-items-center tw-gap-1.5 tw-text-xs tw-font-semibold tw-text-mech-primary hover:tw-underline tw-border-none tw-bg-transparent tw-cursor-pointer",3,"click",4,"ngIf"],[1,"tw-inline-flex","tw-items-center","tw-gap-1","tw-text-xs","tw-font-semibold","tw-text-mech-text-secondary","tw-bg-mech-surface-2","tw-px-2.5","tw-py-1","tw-rounded-full"],["stroke-linecap","round","stroke-linejoin","round","d","M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"],[1,"tw-inline-flex","tw-items-center","tw-text-xs","tw-font-semibold","tw-text-mech-text-muted","tw-bg-mech-surface-2","tw-px-2.5","tw-py-1","tw-rounded-full"],[1,"tw-bg-mech-surface","tw-border","tw-border-mech-border","tw-rounded-[20px]"],[1,"tw-text-[11px]","tw-font-[800]","tw-uppercase","tw-tracking-widest","tw-text-mech-text-muted","tw-px-4","tw-pt-4","tw-pb-2"],[1,"tw-list-none","tw-m-0","tw-p-0"],["class","tw-border-t tw-border-mech-border",4,"ngFor","ngForOf","ngForTrackBy"],[1,"tw-border-t","tw-border-mech-border"],["type","button",1,"tw-w-full","tw-flex","tw-items-start","tw-gap-3","tw-px-4","tw-py-3","tw-text-left","tw-bg-transparent","tw-border-none","tw-cursor-pointer","hover:tw-bg-mech-surface-2","tw-transition-colors","disabled:tw-cursor-default",3,"click","disabled"],[1,"tw-mt-0.5","tw-w-5","tw-h-5","tw-rounded-md","tw-border-2","tw-flex","tw-items-center","tw-justify-center","tw-shrink-0","tw-transition-colors",3,"ngClass"],["aria-hidden","true","class","tw-w-3 tw-h-3 tw-text-mech-text-inverse","fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","3",4,"ngIf"],[1,"tw-flex-1","tw-min-w-0"],[1,"reading-text","tw-block","tw-text-sm","tw-font-semibold","tw-text-mech-text"],["class","reading-text tw-block tw-text-xs tw-text-[var(--color-danger-text)] tw-mt-1",4,"ngFor","ngForOf"],["class","reading-text tw-block tw-text-xs tw-text-mech-text-muted tw-mt-0.5",4,"ngIf"],["aria-hidden","true","fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","3",1,"tw-w-3","tw-h-3","tw-text-mech-text-inverse"],["stroke-linecap","round","stroke-linejoin","round","d","M5 13l4 4L19 7"],[1,"reading-text","tw-block","tw-text-xs","tw-text-[var(--color-danger-text)]","tw-mt-1"],[1,"reading-text","tw-block","tw-text-xs","tw-text-mech-text-muted","tw-mt-0.5"],["class","reading-part-row tw-border-t tw-border-mech-border tw-px-4 tw-py-3 tw-flex tw-flex-wrap tw-items-center tw-gap-3",4,"ngFor","ngForOf","ngForTrackBy"],[1,"reading-part-row","tw-border-t","tw-border-mech-border","tw-px-4","tw-py-3","tw-flex","tw-flex-wrap","tw-items-center","tw-gap-3"],[1,"reading-label","tw-block","tw-text-xs","tw-text-mech-text-muted"],[4,"ngIf"],[1,"reading-part-controls","tw-flex","tw-items-center","tw-gap-2"],["type","button",1,"tw-text-[11px]","tw-font-bold","tw-px-2.5","tw-py-1","tw-rounded-full","tw-border","tw-cursor-pointer","tw-transition-colors","disabled:tw-cursor-default",3,"click","ngClass","disabled"],[1,"tw-flex","tw-flex-wrap","tw-gap-3"],["type","button","class","mech-btn-primary",3,"disabled","click",4,"ngIf"],["type","button","class","tw-bg-mech-surface-2 hover:tw-bg-mech-primary-50 hover:tw-text-mech-primary tw-text-mech-text-secondary tw-font-bold tw-py-2 tw-px-5 tw-rounded-xl tw-border tw-border-mech-border-strong tw-cursor-pointer tw-transition-colors",3,"disabled","click",4,"ngIf"],["type","button","class","tw-bg-green-600 hover:tw-bg-green-700 tw-text-white tw-font-bold tw-py-2 tw-px-5 tw-rounded-xl tw-border-none tw-cursor-pointer tw-transition-colors",3,"disabled","click",4,"ngIf"],["type","button",1,"tw-bg-transparent","hover:tw-text-[var(--color-danger)]","tw-text-mech-text-muted","tw-font-semibold","tw-py-2","tw-px-3","tw-rounded-xl","tw-border-none","tw-cursor-pointer","tw-transition-colors",3,"click","disabled"],["type","button",1,"mech-btn-primary",3,"click","disabled"],["type","button",1,"tw-bg-mech-surface-2","hover:tw-bg-mech-primary-50","hover:tw-text-mech-primary","tw-text-mech-text-secondary","tw-font-bold","tw-py-2","tw-px-5","tw-rounded-xl","tw-border","t
1w-border-mech-border-strong","tw-cursor-pointer","tw-transition-colors",3,"click","disabled"],["type","button",1,"tw-bg-green-600","hover:tw-bg-green-700","tw-text-white","tw-font-bold","tw-py-2","tw-px-5","tw-rounded-xl","tw-border-none","tw-cursor-pointer","tw-transition-colors",3,"click","disabled"],[1,"tw-bg-green-500/10","tw-border","tw-border-green-500/30","tw-rounded-2xl","tw-p-4","tw-flex","tw-flex-col","sm:tw-flex-row","sm:tw-items-center","tw-gap-3"],[1,"tw-flex-1"],[1,"tw-text-sm","tw-font-bold","tw-text-mech-text","tw-m-0"],[1,"tw-text-xs","tw-text-mech-text-secondary","tw-m-0","tw-mt-1"],["type","button",1,"mech-btn-primary","tw-text-sm","tw-shrink-0",3,"click"],["type","button",1,"tw-flex","tw-items-center","tw-gap-1.5","tw-text-xs","tw-font-semibold","tw-text-mech-primary","hover:tw-underline","tw-border-none","tw-bg-transparent","tw-cursor-pointer",3,"click"],["stroke-linecap","round","stroke-linejoin","round","d","M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2zM22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7z"]],template:function(n,r){n&1&&h(0,Zt,5,2,"div",0)(1,te,7,6,"div",1)(2,be,30,31,"div",2),n&2&&(l("ngIf",r.isLoading),i(),l("ngIf",!r.isLoading&&r.loadError),i(),l("ngIf",!r.isLoading&&!r.loadError&&r.job))},dependencies:[rt,et,it,nt,j,kt,jt,P],styles:["@media screen{.garage-reading[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .garage-reading[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .garage-reading[_ngcontent-%COMP%] .rg-step-body[_ngcontent-%COMP%], .garage-reading[_ngcontent-%COMP%] .reading-text[_ngcontent-%COMP%]{font-size:1.25rem;line-height:1.6;overflow-wrap:anywhere}.garage-reading[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:44px;min-height:48px;font-size:1rem;line-height:1.5;white-space:normal}.garage-reading[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:not(.reading-text), .garage-reading[_ngcontent-%COMP%] .reading-label[_ngcontent-%COMP%]{font-size:1rem;line-height:1.5}.garage-reading[_ngcontent-%COMP%] .reading-step-number[_ngcontent-%COMP%]{width:44px;height:44px}.garage-reading[_ngcontent-%COMP%] .reading-step-number[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:1rem}.garage-reading[_ngcontent-%COMP%] .reading-step-offset[_ngcontent-%COMP%]{padding-left:0}.garage-reading[_ngcontent-%COMP%] .reading-part-row[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.garage-reading[_ngcontent-%COMP%] .reading-part-controls[_ngcontent-%COMP%]{flex-wrap:wrap}}[_nghost-%COMP%]{display:block;font-family:Inter,ui-sans-serif,system-ui,sans-serif}.shimmer-line[_ngcontent-%COMP%]{display:block;background:linear-gradient(90deg,var(--color-border-strong) 25%,var(--color-surface-2) 50%,var(--color-border-strong) 75%);background-size:200% 100%;animation:_ngcontent-%COMP%_rj-shimmer 1.6s ease-in-out infinite}@keyframes _ngcontent-%COMP%_rj-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}"],changeDetection:0})}}return e})();export{ei as RepairJobDetailComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.