PageSourceSearch

https://prod.mechai.app/chunk-OXCJ2I5D.js

js mechai.app collected 2026-09-25 03:06:45 UTC 5,439 bytes, 1 lines download raw bytes

1import{k as $}from"./chunk-O5ZA6SCX.js";import"./chunk-7UQHOJYQ.js";import"./chunk-RO6UT36A.js";import"./chunk-VC5WCY5B.js";import"./chunk-QUB4BT56.js";import"./chunk-CPL5NPBA.js";import{a as Z}from"./chunk-6ZLTLLGV.js";import"./chunk-VA2AIVFA.js";import"./chunk-QA27LE3P.js";import"./chunk-PTOXGBBU.js";import{gb as X}from"./chunk-N6RRKPMH.js";import"./chunk-FJFH4XCE.js";import"./chunk-RWQTLYTV.js";import{p as q,q as J}from"./chunk-L7WATY32.js";import"./chunk-2RDPNIM6.js";import"./chunk-XPR5ELEW.js";import{b as Q}from"./chunk-GGY6QDTV.js";import"./chunk-5IJU7MQ2.js";import"./chunk-LM6BYTWK.js";import"./chunk-ZWZG7L3J.js";import"./chunk-UXZT3DCY.js";import{o as W}from"./chunk-ECXCM7JU.js";import"./chunk-7DHSGR33.js";import"./chunk-QO327RTO.js";import"./chunk-4MYWE7CD.js";import"./chunk-RS4X3CMD.js";import{g as Y,i as z}from"./chunk-EWPP756Y.js";import"./chunk-I5EQON52.js";import{c as G,d as K}from"./chunk-G6PWMA7J.js";import{F as A,Jd as j,M as I,N as O,Qb as n,Qc as h,Rb as a,Rc as _,Sb as l,V as w,W as L,X as S,Y as P,ac as C,cc as v,db as o,e as b,ec as p,fd as F,ga as c,i as u,oa as f,p as H,pa as x,q as V,r as M,sb as B,sc as d,tc as N,uc as y,xd as U,yb as g}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 T,b as D}from"./chunk-XUHYVR5R.js";function te(r,m){r&1&&(a(0,"p"),d(1),h(2,"translate"),l()),r&2&&(o(),N(_(2,1,"V2.COMMON.LOADING")))}function re(r,m){if(r&1&&(a(0,"p"),d(1),h(2,"translate"),l()),r&2){let e=p(2);o(),y(" ",_(2,1,e.error==="unavailable"?"V2.VEHICLE_HEALTH.REPORT.STORED_UNAVAILABLE":"V2.VEHICLE_HEALTH.REPORT.STORED_LOAD_FAILED")," ")}}function ie(r,m){if(r&1){let e=C();a(0,"button",8),v("click",function(){f(e);let t=p(3);return x(t.retry())}),d(1),h(2,"translate"),l()}r&2&&(o(),y(" ",_(2,1,"V2.COMMON.RETRY")," "))}function oe(r,m){if(r&1){let e=C();a(0,"div",5),g(1,ie,3,3,"button",6),a(2,"button",7),v("click",function(){f(e);let t=p(2);return x(t.back())}),d(3),h(4,"translate"),l()()}if(r&2){let e=p(2);o(),n("ngIf",e.error==="load_failed"),o(2),y(" ",_(4,2,"V2.VEHICLE_HEALTH.HISTORY.BACK")," ")}}function ne(r,m){if(r&1&&(a(0,"section",2),g(1,te,3,3,"p",3)(2,re,3,3,"p",3)(3,oe,5,4,"div",4),l()),r&2){let e=p();o(),n("ngIf",e.loading),o(),n("ngIf",e.error),o(),n("ngIf",e.error)}}function ae(r,m){if(r&1){let e=C();a(0,"app-health-report",9),v("resetReport",function(){f(e);let t=p();return x(t.back())}),l()}if(r&2){let e=p();n("report",e.report)("savedContext",e.savedContext)("advancedLocked",!1)}}var Ie=(()=>{class r{constructor(){this.api=c(Z),this.route=c(Y),this.router=c(z),this.cdr=c(F),this.store=c(W),this.retryRead=new b,this.destroyed=new b,this.report=null,this.savedContext=null,this.loading=!0,this.error=null}ngOnInit(){M([this.route.paramMap.pipe(V(e=>e.get("id")),I()),this.store.select(X.currentUser).pipe(V(e=>e?.id),I()),this.retryRead.pipe(w(void 0))]).pipe(L(([e,i])=>(this.report=null,this.savedContext=null,this.error=null,this.loading=!!e&&!!i,this.cdr.markForCheck(),i?e?this.api.getReport(e).pipe(H(15e3),P(t=>{let s=t?.report?.score;if((t?.id??"").toLowerCase()!==e.toLowerCase()||typeof s!="number"||!Number.isInteger(s)||s<0||s>100||!Array.isArray(t.report?.criticalIssues)||!Array.isArray(t.report?.maintenancePlan)){this.error="unavailable";return}let k=typeof t.make=="string"?t.make.trim():"",E=typeof t.model=="string"?t.model.trim():"",ee=Number.isInteger(t.year)&&t.year>0?t.year:null,R=Q(t.createTime);this.savedContext={vehicleLabel:k||E?[ee,k,E].filter(Boolean).join(" "):null,createdAt:R&&Number.isFinite(R.getTime())?R:null},this.report=D(T({},t.report),{garageCarId:t.garageCarId??null})}),A(t=>{let s=t?.status;return this.error=s===422||s===404?"unavailable":"load_failed",u}),O(()=>{this.loading=!1,this.cdr.markForCheck()})):(this.error="unavailable",u):u)),S(this.destroyed)).subscribe()}retry(){this.loading||this.retryRead.next()}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete()}back(){this.router.navigate(["/v2/mech-care/health/history"])}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=B({type:r,selectors:[["app-vehicle-health-report-detail"]],decls:2,vars:2,consts:[["class","stored-report-state","aria-live","polite",4,"ngIf"],[3,"report","savedContext","advancedLocked","resetReport",4,"ngIf"],["aria-live","polite",1,"stored-report-state"],[4,"ngIf"],["class","stored-report-actions",4,"ngIf"],[1,"stored-report-actions"],["mat-stroked-button","",3,"click",4,"ngIf"],["mat-button","",3,"click"],["mat-stroked-button","",3,"click"],[3,"resetReport","report","savedContext","advancedLocked"]],template:function(i,t){i&1&&g(0,ne,4,3,"section",0)(1,ae,1,3,"app-health-report",1),i&2&&(n("ngIf",t.loading||t.error),o(),n("ngIf",t.report))},dependencies:[j,U,$,J,q,K,G],styles:[".stored-report-state[_ngcontent-%COMP%]{max-width:600px;margin:24px auto;padding:20px;border:1px solid var(--color-border);border-radius:16px;background:var(--color-surface);color:var(--color-text)}.stored-report-state[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0 0 16px;line-height:1.5}.stored-report-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px}.stored-report-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{color:var(--color-text)}"],changeDetection:0})}}return r})();export{Ie as VehicleHealthReportDetailComponent};

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.