1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[59159],{58553:function(e,a,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/claims/status/[claimNumber]/DocumentsNeeded",function(){return l(72175)}])},13360:function(e,a,l){"use strict";l.d(a,{Z:function(){return t}});var r=l(67294),t=e=>r.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"on icon"},e),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5H17.5L15.8 2.4C15.6 2.2 15.3 2 15 2H9C8.7 2 8.4 2.2 8.2 2.4L6.5 5H3C1.3 5 0 6.3 0 8V19C0 20.7 1.3 22 3 22H21C22.7 22 24 20.7 24 19V8C24 6.3 22.7 5 21 5ZM22 19C22 19.6 21.6 20 21 20H3C2.4 20 2 19.6 2 19V8C2 7.4 2.4 7 3 7H7C7.3 7 7.6 6.8 7.8 6.6L9.5 4H14.4L16.1 6.6C16.4 6.8 16.7 7 17 7H21C21.6 7 22 7.4 22 8V19ZM12 8C9.2 8 7 10.2 7 13C7 15.8 9.2 18 12 18C14.8 18 17 15.8 17 13C17 10.2 14.8 8 12 8ZM12 16C10.3 16 9 14.7 9 13C9 11.3 10.3 10 12 10C13.7 10 15 11.3 15 13C15 14.7 13.7 16 12 16Z",fill:"currentColor"}))},38481:function(e,a,l){"use strict";l.d(a,{Z:function(){return t}});var r=l(67294),t=e=>r.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"paper-clip icon"},e),r.createElement("path",{d:"M11.9995 23C8.13455 23 5 19.8747 5 16.0446V5.89197C5 3.19559 7.2095 1 9.92297 1C12.6364 1 14.8459 3.19559 14.8459 5.89197V16.0446C14.8459 17.6072 13.5711 18.8741 11.9985 18.8741C10.426 18.8741 9.15111 17.6072 9.15111 16.0446L9.15208 5.89197C9.15208 5.47354 9.50187 5.12595 9.92295 5.12595C10.344 5.12595 10.6938 5.47354 10.6938 5.89197V16.0446C10.6938 16.7598 11.2797 17.342 11.9995 17.342C12.7193 17.342 13.3052 16.7598 13.3052 16.0446V5.89197C13.3052 4.03343 11.7837 2.53203 9.92394 2.53203C8.06324 2.53203 6.54271 4.04397 6.54271 5.89197V16.0446C6.54271 19.0368 8.98927 21.468 12.0005 21.468C15.0117 21.468 17.4583 19.0368 17.4583 16.0446V9.56885C17.4583 9.15042 17.808 8.80283 18.2291 8.80283C18.6502 8.80283 19 9.15042 19 9.56885V16.0446C19 19.8852 15.8539 23 11.9995 23Z",fill:"currentColor"}))},64329:function(e,a,l){"use strict";l.d(a,{Z:function(){return t}});var r=l(67294),t=e=>r.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"upload-cloud icon"},e),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.909 19.2855C22.3032 18.4812 23.2991 17.1742 23.797 15.6661C24.1953 14.1581 23.9961 12.4489 23.2991 11.1419C22.2036 9.23173 20.212 8.02528 18.0211 8.02528H17.4236C15.9298 3.70217 11.2494 1.0882 6.76812 2.29465C4.47769 2.89787 2.58559 4.3054 1.291 6.41668C-0.00358939 8.52797 -0.302341 10.9409 0.295162 13.2532C0.693498 14.6608 1.39059 15.8672 2.28684 16.9731C2.68518 17.3753 3.28268 17.4758 3.68102 17.0737C4.07935 16.6715 4.17894 16.0683 3.7806 15.6661C3.08351 14.8618 2.58559 13.8565 2.28684 12.7505C1.78892 10.8403 2.08767 9.03066 3.08351 7.32152C3.97977 5.71292 5.47353 4.60701 7.26604 4.20486C10.9506 3.19948 14.7348 5.51185 15.7307 9.23173C15.8303 9.63388 16.2286 9.9355 16.7265 9.9355H18.0211C19.5149 9.9355 20.8095 10.7398 21.5065 12.0468C22.0045 12.9516 22.1041 14.0575 21.8053 15.0629C21.5065 16.0683 20.8095 16.9731 19.9132 17.4758C19.4153 17.7774 19.2161 18.3806 19.5149 18.8833C19.714 19.1849 20.0128 19.386 20.4111 19.386C20.6103 19.386 20.7099 19.386 20.909 19.2855ZM12.4444 11.0414C12.544 11.0414 12.6436 11.1419 12.7432 11.2425L16.7265 15.264C17.1249 15.6661 17.1249 16.2694 16.7265 16.6715C16.5274 16.8726 16.2286 16.9731 16.0294 16.9731C15.8303 16.9731 15.5315 16.8726 15.3323 16.6715L13.0419 14.3591V20.9946C13.0419 21.5979 12.6436 22 12.0461 22C11.4486 22 11.0502 21.5979 11.0502 20.9946V14.3591L8.7598 16.6715C8.36146 17.0737 7.76396 17.0737 7.36562 16.6715C6.96729 16.2694 6.96729 15.6661 7.36562 15.264L11.349 11.2425C11.3988 11.1922 11.4486 11.1671 11.4984 11.1419C11.5482 11.1168 11.5979 11.0917 11.6477 11.0414C11.9465 10.9409 12.2452 10.9409 12.4444 11.0414Z",fill:"currentColor"}))},72175:function(e,a,l){"use strict";l.r(a);var r=l(44610),t=l(67462),s=l(85893),n=l(58019),i=l(48048),o=l(64490),c=l(38481),d=l(81929),m=l(64329),u=l(35408),x=l(13360),h=l(94184),p=l.n(h),g=l(67294),f=l(44012),C=l(9216),v=l(82475),w=l(6119);let b=[{label:"Photos of the damage (minimum 4, all angles)",requirement:"Required"},{label:"Repair estimate from a licensed shop",requirement:"Required"},{label:"Police or incident report",requirement:"If applicable"},{label:"Proof of ownership (title or registration)",requirement:"Required"}],j=e=>`${e.name}-${String(e.size)}-${String(e.lastModified)}`,N=e=>e<1024?`${String(e)} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`,y=({status:e,fileName:a,onRemove:l})=>"done"===e?(0,s.jsx)(n.Z,{className:"w-5 h-5 text-green-500 shrink-0"}):"error"===e?(0,s.jsx)(i.Z,{className:"w-5 h-5 text-red-600 shrink-0"}):"uploading"===e?(0,s.jsx)("span",{className:"w-4 h-4 border-2 rounded-full shrink-0 animate-spin border-canvas-200 border-t-canvas-300"}):(0,s.jsx)("button",{type:"button",onClick:l,"aria-label":`Remove ${a}`,className:"p-1 text-gray-500 rounded-full shrink-0 transition-colors hover:bg-gray-50 hover:text-gray-700",children:(0,s.jsx)(o.Z,{className:"w-4 h-4"})});a.default=({adjusterName:e,claimNumber:a,documents:l=b,acceptedFormats:n="PDF, JPG, PNG",accept:i="image/*,application/pdf",maxFileSizeMb:o=25,onComplete:h})=>{let L=(0,g.useRef)(null),k=(0,g.useRef)(null),[Z,R]=(0,g.useState)([]),[_,S]=(0,g.useState)(!1),[M,E]=(0,g.useState)([]),[B,V]=(0,g.useState)({}),[D,P]=(0,g.useState)(!1),{isMobile:$}=(0,C.G)(),q=1048576*o,H=e=>{if(!e||0===e.length)return;let a=[],l=Array.from(e).filter(e=>!(e.size>q)||(a.push(e.name),!1));E(a),R(e=>{let a=new Set(e.map(j));return[...e,...l.filter(e=>!a.has(j(e)))]})},z=e=>{R(a=>a.filter(a=>j(a)!==e)),V(a=>{let l=(0,r._)({},a);return delete l[e],l})},F=async e=>{let l=new FormData;l.append("file",e),l.append("claim_number",a);let r=await (0,v.Z)({url:`https://broker.production.roamly.com/claims/${a}/uploads`,method:"POST",data:l},!0);if(!(null==r?void 0:r.url))throw Error("Attachment upload response missing URL")},O=async()=>{let e=Z.filter(e=>"done"!==B[j(e)]);if(0===e.length||D)return;P(!0);let l=!1;for(let s of e){let e=j(s);V(a=>(0,t._)((0,r._)({},a),{[e]:"uploading"}));try{await F(s),V(a=>(0,t._)((0,r._)({},a),{[e]:"done"}))}catch(n){l=!0,V(a=>(0,t._)((0,r._)({},a),{[e]:"error"}
1)),w.k.captureExceptionWithDatadog(n instanceof Error?n:Error("error uploading claim document"),{claimNumber:a,fileName:s.name})}}P(!1),l||null==h||h()},T=Z.filter(e=>"done"!==B[j(e)]).length;return(0,s.jsxs)("div",{className:"mb-8 overflow-hidden border rounded-xl border-canvas-200 bg-canvas-100",children:[(0,s.jsxs)("div",{className:"flex items-start px-5 pt-5 gap-3",children:[(0,s.jsx)("span",{className:"flex items-center justify-center w-12 h-12 rounded-full shrink-0 bg-canvas-200",children:(0,s.jsx)(c.Z,{className:"w-5 h-5 text-yellow-800"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(d.x,{variant:d.L.MediumBold,className:"text-yellow-800",children:(0,s.jsx)(f.Z,{defaultMessage:"Action Required â Documents Needed",id:"ZEZwny"})}),(0,s.jsxs)(d.x,{variant:d.L.SmallRegular,className:"mt-1 text-gray-400",children:["Your claim is on hold. We need a few things from you before ",e," can continue the investigation. Upload them here â no need to email or call."]})]})]}),(0,s.jsx)("div",{className:"mt-4 border-b border-canvas-200"}),(0,s.jsxs)("div",{className:"px-5 pt-4",children:[(0,s.jsx)(d.x,{variant:d.L.LegalBold,className:"tracking-wide text-yellow-800 uppercase",children:"What we need from you"}),(0,s.jsx)("ul",{className:"flex flex-col mt-3",children:l.map(e=>(0,s.jsxs)("li",{className:"flex items-center justify-between py-3 border-b gap-3 border-canvas-200",children:[(0,s.jsxs)("span",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"w-5 h-5 border-2 rounded shrink-0 border-canvas-300"}),(0,s.jsx)(d.x,{variant:d.L.SmallRegular,className:"text-gray-700",children:e.label})]}),(0,s.jsx)(d.x,{variant:d.L.LegalBold,className:p()("shrink-0 uppercase tracking-wide","Required"===e.requirement?"text-yellow-800":"text-gray-400"),children:e.requirement})]},e.label))})]}),(0,s.jsxs)("div",{className:"px-5 pt-5",children:[(0,s.jsx)(d.x,{variant:d.L.LegalBold,className:"tracking-wide text-yellow-800 uppercase",children:"Upload your files"}),(0,s.jsx)("input",{ref:L,type:"file",multiple:!0,accept:i,className:"hidden",onChange:e=>{H(e.target.files),e.target.value=""}}),(0,s.jsx)("input",{ref:k,type:"file",accept:"image/*",capture:"environment",className:"hidden",onChange:e=>{H(e.target.files),e.target.value=""}}),(0,s.jsxs)("div",{onDragOver:e=>{e.preventDefault(),S(!0)},onDragLeave:()=>{S(!1)},onDrop:e=>{e.preventDefault(),S(!1),H(e.dataTransfer.files)},className:p()("mt-3 rounded-lg border-2 border-dashed px-4 py-6 text-center transition-colors",_?"border-yellow-800 bg-canvas-200":"border-canvas-300"),children:[(0,s.jsx)(m.Z,{className:"w-8 h-8 mx-auto text-yellow-800"}),(0,s.jsx)(d.x,{variant:d.L.SmallBold,className:"mt-2 text-gray-700",children:(0,s.jsx)(f.Z,{defaultMessage:"Drag files here or tap to browse",id:"f3FiVM"})}),(0,s.jsxs)(d.x,{variant:d.L.LegalRegular,className:"mt-1 text-gray-400",children:[n," \xb7 Max ",o," MB per file"]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center mt-4 gap-3",children:[(0,s.jsx)(u.zx,{variant:u.Fe.Primary,size:u.x4.Small,onClick:()=>{var e;return null===(e=L.current)||void 0===e?void 0:e.click()},label:"Browse Files"}),$&&(0,s.jsx)(u.zx,{variant:u.Fe.Secondary,size:u.x4.Small,onClick:()=>{var e;return null===(e=k.current)||void 0===e?void 0:e.click()},label:(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(x.Z,{className:"w-4 h-4"})," ",(0,s.jsx)(f.Z,{defaultMessage:"Take Photo",id:"bylW74"})]})})]})]}),M.length>0&&(0,s.jsxs)(d.x,{variant:d.L.LegalRegular,className:"mt-2 text-red-600",children:[M.join(", ")," exceeded the ",o," MB limit and"," ",1===M.length?"was":"were"," skipped."]}),Z.length>0&&(0,s.jsx)("ul",{className:"flex flex-col mt-3 gap-2",children:Z.map(e=>{let a=j(e),l=B[a];return(0,s.jsxs)("li",{className:"flex items-center justify-between px-3 py-2 bg-white border rounded-lg gap-3 border-canvas-200",children:[(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)(d.x,{variant:d.L.SmallBold,className:"text-gray-700 truncate",children:e.name}),(0,s.jsx)(d.x,{variant:d.L.LegalRegular,className:"text-gray-400",children:N(e.size)})]}),(0,s.jsx)(y,{status:l,fileName:e.name,onRemove:()=>{z(a)}})]},a)})})]}),(0,s.jsx)("div",{className:"p-5",children:(0,s.jsx)(u.zx,{variant:u.Fe.Primary,size:u.x4.Medium,fullWidth:!0,loading:D,disabled:!(T>0)||D,onClick:()=>{O()},label:D?"Uploadingâ¦":`Submit ${T>0?`${String(T)} `:""}Document${1===T?"":"s"} to ${e}`})})]})}}},function(e){e.O(0,[92888,49774,40179],function(){return e(e.s=58553)}),_N_E=e.O()}]); 2//# sourceMappingURL=DocumentsNeeded-fca06fce927ce44a.js.map
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.