PageSourceSearch

https://agenceweb-proenvue.lovable.app/assets/ScanPage-Dgxj3Ez1.js

js agenceweb-proenvue.lovable.app collected 2026-10-03 03:20:13 UTC 4,514 bytes, 1 lines download raw bytes

1import{j as e,r as t,a as i,b as v,c as E}from"./index-D3v-3Oo3.js";import{A as Q,u as Y,S as H,P as D,a as K,b as U,L as W}from"./AnalysisSentScreen-HyFVz_of.js";import{S as X,R as q,E as J,a as Z}from"./EstimationTarifModal-DJULyaj2.js";const $=()=>{const{addAnalysis:P,pieces:p,confirmedVolume:w,confirmedCartons:A,analyzingCount:ee,doneCount:k}=Y(),[G,S]=t.useState(!1),[u,a]=t.useState("idle"),[m,n]=t.useState([]),[C,r]=t.useState([]),[se,x]=t.useState(null),[f,N]=t.useState(""),[c,z]=t.useState([]),[_,R]=t.useState(!1),[I,h]=t.useState(!1),[y,j]=t.useState("standard"),g=w+c.reduce((s,l)=>s+l.result.volume_total,0),L=t.useCallback(s=>{N(s),n([]),r([]),x(null),h(!1),localStorage.getItem(H)==="true"?a("capturing"):R(!0)},[]),F=()=>{R(!1),a("capturing")},O=(s,l)=>{n(d=>[...d,s]),r(d=>[...d,l])},T=s=>{n(l=>l.filter((d,b)=>b!==s)),r(l=>l.filter((d,b)=>b!==s))},V=()=>{C.length!==0&&(P({nom:f,etage:"",mode:"photo",photos:[...m],analysisPayload:{images_base64:[...C],remplissage:y}}),a("sent"))},B=()=>{a("report")},M=()=>{z([]),x(null),n([]),r([]),N(""),a("idle"),j("standard")};[...c.map(s=>({label:s.label,volume:s.result.volume_total,done:!0})),...p.filter(s=>s.mode==="photo"||s.mode==="360").map(s=>({label:s.nom,volume:s.volume??0,done:s.statut==="analysee"}))];const o=c.length+k;return e.jsxs("div",{className:"min-h-screen bg-background flex flex-col items-center px-4 py-6 pb-24",children:[e.jsxs("div",{className:"text-center mb-4",children:[e.jsx("h1",{className:"text-3xl sm:text-4xl font-black text-primary tracking-wider",children:"🔥 PHOENIX SCAN"}),e.jsx("p",{className:"text-muted-foreground text-base mt-2",children:"Scannez vos pièces • Estimez votre volume"})]}),u==="idle"&&e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full max-w-md gap-4",children:[e.jsx(i,{onClick:()=>h(!0),className:"w-full h-[72px] text-xl font-bold rounded-2xl",size:"lg",children:"📷 SCANNER UNE PIÈCE"}),o>0&&e.jsxs(e.Fragment,{children:[e.jsx(v,{className:"w-full border-primary/30",children:e.jsxs(E,{className:"p-5",children:[e.jsx("p",{className:"text-muted-foreground text-sm mb-2",children:"Volume cumulé"}),e.jsxs("p",{className:"font-mono text-3xl text-primary font-black",children:["📦 ",g.toFixed(1)," m³"]}),e.jsxs("p",{className:"text-muted-foreground text-sm mt-1",children:[o," pièce",o>1?"s":""," scannée",o>1?"s":""]})]})}),e.jsx(i,{onClick:B,className:"w-full h-[60px] text-lg font-bold rounded-2xl",size:"lg",children:"✅ TERMINER LE SCAN"})]})]}
1),u==="capturing"&&e.jsxs("div",{className:"w-full max-w-md space-y-5",children:[e.jsx("div",{className:"text-center",children:e.jsx("p",{className:"text-primary font-bold text-lg",children:f})}),e.jsx(D,{photos:m,onAddPhoto:O,onRemovePhoto:T,maxPhotos:4}),e.jsx(K,{remplissage:y,onChange:j}),m.length>0&&e.jsxs(i,{onClick:V,className:"w-full h-[64px] text-lg font-bold rounded-2xl",size:"lg",children:["✅ ENVOYER À L'ANALYSE (",m.length," photo",m.length>1?"s":"",")"]}),e.jsx(i,{onClick:()=>{a("idle"),n([]),r([])},variant:"outline",className:"w-full h-[52px] text-base rounded-2xl",children:"← Annuler"})]}),u==="sent"&&e.jsx(U,{roomName:f,onNextRoom:()=>{n([]),r([]),x(null),N(""),j("standard"),a("idle"),h(!0)},onWaitResult:()=>{n([]),r([]),x(null),a("idle")}}),u==="report"&&o>0&&e.jsxs("div",{className:"w-full max-w-md space-y-6",children:[e.jsx(v,{className:"border-primary bg-primary/10",children:e.jsxs(E,{className:"p-6 text-center",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Volume total déménagement"}),e.jsxs("p",{className:"font-mono text-5xl text-primary font-black",children:["🚛 ",g.toFixed(1)," m³"]}),e.jsxs("p",{className:"text-muted-foreground text-sm mt-2",children:[o," pièce",o>1?"s":""," scannée",o>1?"s":""]})]})}),e.jsx(q,{rooms:[...c,...p.filter(s=>s.statut==="analysee"&&s.result).map(s=>({label:s.nom,result:s.result,photos:s.photos}))]}),e.jsx(i,{onClick:()=>S(!0),className:"w-full h-[56px] text-base font-bold rounded-2xl",size:"lg",children:"💰 ESTIMER LE TARIF"}),e.jsx(i,{onClick:M,variant:"outline",className:"w-full h-[48px] text-sm rounded-2xl",children:"🔄 Nouveau scan"}),e.jsx(J,{open:G,onClose:()=>S(!1),volume:g,cartons:A+c.reduce((s,l)=>s+(l.result.total_cartons??0),0),nbPieces:o})]}),e.jsx(W,{open:_,onClose:F}),e.jsx(Z,{open:I,onSelect:L,onCancel:()=>h(!1),usedNames:[...c.map(s=>s.label),...p.map(s=>s.nom)]})]})},ae=()=>e.jsx(X,{children:e.jsx(Q,{children:e.jsx($,{})})});export{ae 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.