PageSourceSearch

https://myka.ng/assets/SubmitPage-BO8y81V0.js

js myka.ng collected 2026-10-09 22:44:08 UTC 2,703 bytes, 1 lines download raw bytes

1import{d as R,u as w,r as x,j as t}from"./vendor-react-DfYGAhtm.js";import{t as a,k as I,m as l,g as f}from"./index-DsBgCU7r.js";import{W as C}from"./recording.constants-Cr2cQllO.js";import{g as c}from"./errors-BYKXB8DF.js";import{u as E}from"./useWitnessFlowDeviceB-BXT16w5i.js";import{WitnessFlowRoutes as g}from"./index-CX6eACXF.js";import{M as T}from"./webToWebInspection-BgWNZmY_.js";import{h as B,a as i,V as h,T as d}from"./vendor-ui-DA_r9yXk.js";import"./vendor-icons-1odZwi-b.js";import"./vendor-state-BsBVN-fX.js";import"./vendor-forms-BP-7CbAP.js";import"./inspectionAnalysis.runtime-CbjBTDqp.js";import"./sseStream-C28FcIBw.js";import"./WitnessFlowLayout-sXdBrCkv.js";import"./device-DbCxnG1h.js";const J=()=>{const p=R(),b=w(),{videoUrl:e}=b.state??{},{error:o,session:m,witnessToken:y,isJoining:s,retakeSession:j,moveToAiAnalysis:S}=E(),[r,u]=x.useState(!1);x.useEffect(()=>{o.trim()&&a.error(c(new Error(o))??o)},[o]);const k=async()=>{try{await j(),sessionStorage.removeItem(C),e&&URL.revokeObjectURL(e),p(g.recording,{replace:!0})}catch(n){a.error(c(n)??"Could not restart inspection. Please try again.")}},v=async()=>{if(!(!e?.trim()||r)){u(!0);try{await S(T),p(g.analysis,{state:{videoUrl:e}})}catch(n){a.error(c(n)??"Could not submit inspection. Please try again."),u(!1)}}},A=!!e?.trim()&&!!m?.policyId&&!!m?.id&&!!y&&!s&&!r;return t.jsxs(B,{gap:0,minH:"100dvh",pb:8,children:[t.jsx(i,{display:"flex",justifyContent:"center",pt:8,pb:4,children:t.jsx(I,{variant:"light",alt:"Myka",h:"36px"})}),t.jsxs(h,{gap:1,px:6,pb:6,align:"center",children:[t.jsx(d,{fontSize:"xl",fontWeight:"bold",color:l.text.primary,textAlign:"center",children:"Inspection Complete"}),t.jsx(d,{fontSize:"sm",color:l.text.info,textAlign:"center",children:"Confirm the recording before submitting."})]}),t.jsx(i,{px:4,flex:1,children:e?t.jsx(i,{borderRadius:"3xl",overflow:"hidden",bg:"black",aspectRatio:1,w:"full",children:t.jsx("video",{src:e,controls:!0,controlsList:"nodownload",disablePictureInPicture:!0,playsInline:!0,style:{width:"100%",height:"100%",objectFit:"contain",display:"block"}})}):t.jsx(i,{borderRadius:"3xl",overflow:"hidden",bg:"gray.800",aspectRatio:1,w:"full",display:"flex",alignItems:"center",justifyContent:"center",children:t.jsx(d,{fontSize:"xs",color:"whiteAlpha.500",textAlign:"center",px:6,children:"No recording found. Please restart and try again."})})}),t.jsxs(h,{px:5,pt:8,gap:3,align:"stretch",children:[t.jsx(f,{text:"Submit Inspection",onClick:()=>void v(),fullWidth:!0,disabled:!A,loading:s||r}),t.jsx(f,{buttonType:"outline",text:"Restart Inspection",onClick:()=>void k(),fullWidth:!0,border:`.5px solid ${l.border.primary}`,disabled:s||r})]})]})};export{J as default};

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.