1import{j as e,G as t,P as i,O as l,M as r}from"./vendor-maps-C15praqj.js";import{b as o,u as s,r as n}from"./vendor-router-DA6yNf3X.js";import{C as a,g as d,a as c}from"./Help_Support-BbNDyO6t.js";import{m as x}from"./mapStyles-C6w7xcC6.js";import{a as p}from"./index-CjCZp4kG.js";import{g as u}from"./index-D9YdxELM.js";import{M as h}from"./Group 15-BVU8jhjx.js";import{F as g}from"./ArrowLeftIcon-CS5TqK3f.js";import"./vendor-react-LjgIiSM1.js";import"./vendor-redux-CLO4XTwJ.js";import"./vendor-stripe-Dn1b00Ho.js";const m="data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.2511%208.80484C10.5444%207.27356%2011.2101%205.49208%2012.7362%204.81151C14.2623%204.13094%2016.0752%204.78148%2016.7819%206.31276L11.2511%208.80484Z'%20fill='%239B56FF'/%3e%3cpath%20d='M11.2511%208.80484C10.5444%207.27356%2011.2101%205.49208%2012.7362%204.81151C14.2623%204.13094%2016.0752%204.78148%2016.7819%206.31276L11.2511%208.80484Z'%20stroke='black'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M23.9528%2014.98V20.5046C23.9528%2022.166%2022.5803%2023.5071%2020.8801%2023.5071H18.9443'%20stroke='black'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.109%2023.5071H9.11173C7.41152%2023.5071%206.03906%2022.166%206.03906%2020.5046V14.98'%20stroke='black'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M17.7761%2020.6646C18.4316%2021.3352%2018.8311%2022.2459%2018.8311%2023.2468C18.8311%2025.3185%2017.1104%2026.9999%2014.9902%2026.9999C12.8701%2026.9999%2011.1494%2025.3185%2011.1494%2023.2468C11.1494%2021.1751%2012.8701%2019.4937%2014.9902%2019.4937C15.656%2019.4937%2016.2808%2019.6538%2016.8236%2019.944'%20stroke='black'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15%2020.6636V23.2457L16.7719%2024.3366'%20stroke='black'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4%2012.2377L24.0543%203'%20stroke='black'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.6472%2011.3672C9.78687%2011.3672%209.78687%2012.6683%2010.6472%2012.6683C11.5076%2012.6683%2011.5076%2011.3672%2010.6472%2011.3672Z'%20stroke='black'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.0938%2012.4279L15.4392%2010.126'%20stroke='black'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.5372%2012.1276C19.5372%2012.1276%2017.7653%2012.2177%2018.0214%2010.3061C18.0214%2010.3061%2018.2365%209.28525%2019.4451%208.81486C19.4451%208.81486%2019.6089%207.5438%2020.9712%207.47374C20.9712%207.47374%2022.1593%207.40368%2022.7123%208.78483C22.7123%208.78483%2024.177%209.05506%2023.9004%2010.7565C23.9004%2010.7565%2023.7058%2012.2277%2022.3846%2012.1176H19.5372V12.1276Z'%20stroke='black'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.08203%2014.98H6.0383H24.0441H26.0004'%20stroke='black'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",v="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzMiIGhlaWdodD0iMzMiIHZpZXdCb3g9IjAgMCAzMyAzMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGZvcmVpZ25PYmplY3QgeD0iLTMuNzQzNDkiIHk9Ii0zLjc0MzQ5IiB3aWR0aD0iNDAuMTYyOCIgaGVpZ2h0PSI0MC4xNjI4Ij48ZGl2IHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hodG1sIiBzdHlsZT0iYmFja2Ryb3AtZmlsdGVyOmJsdXIoMS44N3B4KTtjbGlwLXBhdGg6dXJsKCNiZ2JsdXJfMF8yNTAxXzU3MDBfY2xpcF9wYXRoKTtoZWlnaHQ6MTAwJTt3aWR0aDoxMDAlIj48L2Rpdj48L2ZvcmVpZ25PYmplY3Q+PGNpcmNsZSBkYXRhLWZpZ21hLWJnLWJsdXItcmFkaXVzPSIzLjc0MzQ5IiBjeD0iMTYuMzM3OSIgY3k9IjE2LjMzNzkiIHI9IjE2IiBmaWxsPSIjRTlGN0ZEIiBzdHJva2U9IiMwNDc4QTkiIHN0cm9rZS13aWR0aD0iMC42NzU5MDgiLz4KPHBhdGggZD0iTTIzLjQ1NzkgMTkuMzQyM0MyMi4zNjQ2IDE5LjM0MjMgMjEuMzA2OCAxOS4xNjQ2IDIwLjMyMDEgMTguODQ0NkMyMC4wMDkgMTguNzM3OSAxOS42NjIzIDE4LjgxNzkgMTkuNDIyMyAxOS4wNTc5TDE4LjAyNjggMjAuODA5QzE1LjUxMTIgMTkuNjA5IDEzLjE1NTcgMTcuMzQyMyAxMS45MDIzIDE0LjczNzlMMTMuNjM1NyAxMy4yNjIzQzEzLjg3NTcgMTMuMDEzNCAxMy45NDY4IDEyLjY2NjggMTMuODQ5IDEyLjM1NTdDMTMuNTIwMSAxMS4zNjkgMTMuMzUxMiAxMC4zMTEyIDEzLjM1MTIgOS4yMTc4OUMxMy4zNTEyIDguNzM3ODkgMTIuOTUxMiA4LjMzNzg5IDEyLjQ3MTIgOC4zMzc4OUg5LjM5NTY3QzguOTE1NjcgOC4zMzc4OSA4LjMzNzg5IDguNTUxMjIgOC4zMzc4OSA5LjIxNzg5QzguMzM3ODkgMTcuNDc1NyAxNS4yMDkgMjQuMzM3OSAyMy40NTc5IDI0LjMzNzlDMjQuMDg5IDI0LjMzNzkgMjQuMzM3OSAyMy43Nz
1c5IDI0LjMzNzkgMjMuMjg5VjIwLjIyMjNDMjQuMzM3OSAxOS43NDIzIDIzLjkzNzkgMTkuMzQyMyAyMy40NTc5IDE5LjM0MjNaIiBmaWxsPSIjMDQ3OEE5Ii8+CjxtYXNrIGlkPSJtYXNrMF8yNTAxXzU3MDAiIHN0eWxlPSJtYXNrLXR5cGU6bHVtaW5hbmNlIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSI4IiB5PSI4IiB3aWR0aD0iMTciIGhlaWdodD0iMTciPgo8cGF0aCBkPSJNMjMuNDU3OSAxOS4zNDIzQzIyLjM2NDYgMTkuMzQyMyAyMS4zMDY4IDE5LjE2NDYgMjAuMzIwMSAxOC44NDQ2QzIwLjAwOSAxOC43Mzc5IDE5LjY2MjMgMTguODE3OSAxOS40MjIzIDE5LjA1NzlMMTguMDI2OCAyMC44MDlDMTUuNTExMiAxOS42MDkgMTMuMTU1NyAxNy4zNDIzIDExLjkwMjMgMTQuNzM3OUwxMy42MzU3IDEzLjI2MjNDMTMuODc1NyAxMy4wMTM0IDEzLjk0NjggMTIuNjY2OCAxMy44NDkgMTIuMzU1N0MxMy41MjAxIDExLjM2OSAxMy4zNTEyIDEwLjMxMTIgMTMuMzUxMiA5LjIxNzg5QzEzLjM1MTIgOC43Mzc4OSAxMi45NTEyIDguMzM3ODkgMTIuNDcxMiA4LjMzNzg5SDkuMzk1NjdDOC45MTU2NyA4LjMzNzg5IDguMzM3ODkgOC41NTEyMiA4LjMzNzg5IDkuMjE3ODlDOC4zMzc4OSAxNy40NzU3IDE1LjIwOSAyNC4zMzc5IDIzLjQ1NzkgMjQuMzM3OUMyNC4wODkgMjQuMzM3OSAyNC4zMzc5IDIzLjc3NzkgMjQuMzM3OSAyMy4yODlWMjAuMjIyM0MyNC4zMzc5IDE5Ljc0MjMgMjMuOTM3OSAxOS4zNDIzIDIzLjQ1NzkgMTkuMzQyM1oiIGZpbGw9IndoaXRlIi8+CjwvbWFzaz4KPGcgbWFzaz0idXJsKCNtYXNrMF8yNTAxXzU3MDApIj4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJiZ2JsdXJfMF8yNTAxXzU3MDBfY2xpcF9wYXRoIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzLjc0MzQ5IDMuNzQzNDkpIj48Y2lyY2xlIGN4PSIxNi4zMzc5IiBjeT0iMTYuMzM3OSIgcj0iMTYiLz4KPC9jbGlwUGF0aD48L2RlZnM+Cjwvc3ZnPgo=",f=()=>{var f,j,M,y,k,w,N,z,b,C,I,D,_,S,T,F,A,E,L,O,B,H,P,W,G,V,Z,U,Q,R,Y,X,J,$,K,q,ee,te,ie,le,re,oe,se,ne,ae,de,ce,xe,pe,ue,he;const ge={width:"100%",height:window.innerWidth<768?"400px":"550px",borderRadius:"10px",border:"2px solid #d1d5db",marginTop:window.innerWidth<1024?"0px":"-10px"},me=o(),{orderDetails:ve,order_id:fe,vendor_id:je,order_number:Me}=me.state||{},ye=ve,ke=s(),[we,Ne]=n.useState({}),[ze,be]=n.useState("Accepted"),[Ce,Ie]=n.useState([]),[De,_e]=n.useState(null),[Se,Te]=n.useState(!1),[Fe,Ae]=n.useState(!1),[Ee,Le]=n.useState(null),[Oe,Be]=n.useState(!1),[He,Pe]=n.useState(null),[We,Ge]=n.useState(null),[Ve,Ze]=n.useState(!1),[Ue,Qe]=n.useState(null),Re={lat:28.5235,lng:77.2096},Ye={lat:28.6331,lng:77.2211},[Xe,Je]=n.useState(null),[$e,Ke]=n.useState(!1),[qe,et]=n.useState(null);n.useEffect(()=>{},[Xe]),n.useEffect(()=>{if(!fe)return;tt();const e=setInterval(()=>{tt()},15e3);return()=>clearInterval(e)},[fe,je]);const tt=async()=>{var e,t,i,l,r,o,s;if(fe)try{Ke(!0),et(null);const n=JSON.parse(localStorage.getItem("authToken"))||"",a=await u({data:{order_id:fe,vendor_id:je,new_dispatch_traking_url:(null==(t=null==(e=null==ve?void 0:ve.vendors)?void 0:e[0])?void 0:t.dispatch_traking_url)||"",source:"customer"},token:n}),d=null==a?void 0:a.data;Ne((null==(i=null==d?void 0:d.vendors)?void 0:i[0])||{}),Je(d),be((null==(s=null==(o=null==(r=null==(l=null==d?void 0:d.vendors)?void 0:l[0])?void 0:r.order_status)?void 0:o.current_status)?void 0:s.title)||"Placed")}catch(n){et("Failed to load order details")}finally{Ke(!1)}};n.useEffect(()=>{var e,t,i,l,r,o;"Delivered"===(null==(l=null==(i=null==(t=null==(e=null==Xe?void 0:Xe.vendors)?void 0:e[0])?void 0:t.order_status)?void 0:i.current_status)?void 0:l.title)&&ke("/order-delivered",{replace:!0,state:{order_number:null==Xe?void 0:Xe.order_number,agent_name:(null==(o=null==(r=null==Xe?void 0:Xe.order_data)?void 0:r.agent)?void 0:o.name)||"",order_id:null==Xe?void 0:Xe.id}})},[Xe,ke]),n.useEffect(()=>{(async()=>{try{Ze(!0),Qe(null);const e=await(async(e,t)=>{try{const i=`https://router.project-osrm.org/route/v1/driving/${e.lng},${e.lat};${t.lng},${t.lat}?overview=full&geometries=geojson`,l=await p.get(i);if("Ok"!==l.data.code)throw new Error("Route not found");const r=l.data.routes[0];return{path:r.geometry.coordinates.map(e=>({lat:e[1],lng:e[0]})),distance:(r.distance/1e3).toFixed(2)+" km",duration:Math.round(r.duration/60)+" mins",durationSeconds:r.duration}}catch(i){throw i}})(Re,Ye);Ie(e.path),Ge({distance:e.distance,duration:e.duration})}catch(e){Ie([Re,Ye]),Qe("Unable to load OSRM road route")}finally{Ze(!1)}})()},[]),n.useEffect(()=>{if(!Ee||Ce.length<2)return;const e=new window.google.maps.LatLngBounds;Ce.forEach(t=>e.extend(t));const t=window.innerWidth<768?{top:220,bottom:60,left:20,right:20}
1:{top:20,bottom:20,left:40,right:40};Ee.fitBounds(e,t)},[Ee,Ce]);const it={url:"data:image/svg+xml,%3csvg%20width='82'%20height='82'%20viewBox='0%200%2082%2082'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20filter='url(%23filter0_d_44_14260)'%3e%3ccircle%20cx='40.7998'%20cy='34.5'%20r='18'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M47.9091%2031.1016V41.5849C47.9091%2041.8059%2047.8213%2042.0179%2047.665%2042.1741C47.5087%2042.3304%2047.2967%2042.4182%2047.0757%2042.4182H34.5257C34.3047%2042.4182%2034.0927%2042.3304%2033.9365%2042.1741C33.7802%2042.0179%2033.6924%2041.8059%2033.6924%2041.5849V31.2099'%20stroke='%230D1D28'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M48.3001%2026.6172H33.3001C32.8399%2026.6172%2032.4668%2026.9903%2032.4668%2027.4505V29.8755C32.4668%2030.3358%2032.8399%2030.7089%2033.3001%2030.7089H48.3001C48.7604%2030.7089%2049.1335%2030.3358%2049.1335%2029.8755V27.4505C49.1335%2026.9903%2048.7604%2026.6172%2048.3001%2026.6172Z'%20stroke='%230D1D28'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M36.8174%2042.4177V37.8594'%20stroke='%230D1D28'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M44.6165%2033.2832H40.9248C40.3725%2033.2832%2039.9248%2033.7309%2039.9248%2034.2832V35.6082C39.9248%2036.1605%2040.3725%2036.6082%2040.9248%2036.6082H44.6165C45.1688%2036.6082%2045.6165%2036.1605%2045.6165%2035.6082V34.2832C45.6165%2033.7309%2045.1688%2033.2832%2044.6165%2033.2832Z'%20fill='%231DC291'/%3e%3cpath%20d='M38.0332%2026.584V30.6757'%20stroke='%230D1D28'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M43.708%2026.6094V30.3677'%20stroke='%230D1D28'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_44_14260'%20x='-0.00019455'%20y='4.76837e-07'%20width='81.6'%20height='81.6'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='6.3'/%3e%3cfeGaussianBlur%20stdDeviation='11.4'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.08%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_44_14260'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_44_14260'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",scaledSize:new window.google.maps.Size(70,70),anchor:new window.google.maps.Point(30,52)},lt={url:"data:image/svg+xml,%3csvg%20width='39'%20height='45'%20viewBox='0%200%2039%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20filter='url(%23filter0_d_44_14250)'%3e%3cg%20filter='url(%23filter1_d_44_14250)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M22.4001%2026.343C27.7562%2024.9883%2031.7197%2020.1369%2031.7197%2014.3599C31.7197%207.5337%2026.186%202%2019.3599%202C12.5337%202%207%207.5337%207%2014.3599C7%2020.1366%2010.963%2024.9877%2016.3186%2026.3428L19.3594%2032.4244L22.4001%2026.343Z'%20fill='%2304D08B'/%3e%3ccircle%20cx='19.3601'%20cy='14.3601'%20r='2.85227'%20fill='white'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_44_14250'%20x='0'%20y='0'%20width='38.7197'%20height='44.4243'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='5'/%3e%3cfeGaussianBlur%20stdDeviation='3.5'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.0156863%200%200%200%200%200.662745%200%200%200%200%200.443137%200%200%200%200.16%200'/%3e%3cfeBlend%20mode='normal'%20in2='Backgroun
1dImageFix'%20result='effect1_dropShadow_44_14250'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_44_14250'%20result='shape'/%3e%3c/filter%3e%3cfilter%20id='filter1_d_44_14250'%20x='3.19697'%20y='0.098484'%20width='32.3258'%20height='38.0304'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='1.90152'/%3e%3cfeGaussianBlur%20stdDeviation='1.90152'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.1625%200%200%200%200%200.1625%200%200%200%200%200.1625%200%200%200%200.1%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_44_14250'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_44_14250'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",scaledSize:new window.google.maps.Size(40,40),anchor:new window.google.maps.Point(20,40)},rt=(e,t)=>{var i,l,r,o,s;const n=(null==e?void 0:e.agent)||(null==(i=null==e?void 0:e.order_data)?void 0:i.agent)||(null==(l=null==t?void 0:t.order_data)?void 0:l.agent)||(null==(s=null==(o=null==(r=null==t?void 0:t.vendors)?void 0:r[0])?void 0:o.order_data)?void 0:s.agent);return(a=n)&&(Array.isArray(a)?a.length>0:a.id||a.name)?Array.isArray(n)?n[0]:n:null;var a},ot=rt(we,Xe),st=(null==ot?void 0:ot.name)||"",nt=null==(j=null==(f=null==Xe?void 0:Xe.order_data)?void 0:f.agent)?void 0:j.phone_number,at="https://ui-avatars.com/api/?name=Driver&background=ECEBEA&color=091223",dt=async()=>{const e=await d(ye.order_id);if(e.data.length>0){const t=await c(e.data[0].id),i=[];let l=null;t.data.forEach(e=>{"PREDEFINED"===e.sender_type?l=e.message:"USER"===e.sender_type&&(null==l?0==e.images.length?i.push({empty:{message:e.message,image:null}}):i.push({empty:{message:e.message,image:e.images[0].image_url}}):i.push({[l]:{message:e.message,image:null}}),l=null)}),_e(i)}};return Ce[0],Se?e.jsxs("div",{onClick:()=>Te(!1),className:"fixed inset-0 pt-40 flex items-center justify-center bg-[#00000060] bg-opacity-50 z-50 ",children:[" ",e.jsxs("div",{className:"absolute top-34 md:top-24 left-2",children:[" ",e.jsx(g,{className:"w-5 h-5"})," "]}),e.jsx("div",{className:"w-full bg-white sm:bg-[#00000000] relative max-w-240 flex flex-col justify-center items-center",children:ye.length>0?e.jsx(a,{onClose:()=>Te(!1),orderId:ye.order_id,data:De}):e.jsx(a,{onClose:()=>Te(!1),orderId:ye.order_id})})," "]}):e.jsxs("div",{className:"pt-[64px] pb-[63px] px-4 sm:px-[20px] lg:px-[40px]",children:[e.jsxs("div",{className:"flex items-center gap-1 -mt-[4px] ",children:[e.jsx("div",{onClick:()=>ke("/order-detail"),style:{width:"22px",height:"22px",color:"var(--text-heading)",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,cursor:"pointer"},children:"<"}),e.jsxs("h2",{style:{fontFamily:"Poppins",fontWeight:600,fontSize:"18px",color:"var(--text-heading)",margin:["16px"]},children:["(Order #",ye&&ye.order_number,")"]})]}),e.jsxs("div",{className:"flex flex-col lg:flex-row gap-[30px]",children:[e.jsxs("section",{className:"relative w-full lg:w-[980px] mx-auto",children:[e.jsx("div",{className:"absolute -top-12 right-[6px] z-10",children:e.jsx("button",{onClick:()=>{Be(!0),Ae(!0)},style:{color:"#9B56FF",fontFamily:"Poppins",fontWeight:600,fontSize:"14px",cursor:"pointer",background:"none",border:"none"},children:"Help?"})}),e.jsxs(t,{mapContainerStyle:ge,onLoad:e=>{Le(e)},options:{styles:x,gestureHandling:"greedy",disableDefaultUI:!0,zoomControl:!1,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1,draggable:!0,scrollwheel:!0},children:[e.jsx(i,{path:Ce,options:{strokeColor:"#000",strokeWeight:3,strokeOpacity:1,geodesic:!1}}),He&&e.jsx(l,{position:He,mapPaneName:l.OVERLAY_MOUSE_TARGET,children:e.jsxs("div",{className:"relative flex items-center justify-center",children:[e.jsx("div",{className:"h-12 w-12 rounded-full border-4 border-white shadow-lg flex items-center justify-center bg-[#9B56FF]",children:e.jsx("img",{src:"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%2
10www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20460.427%20460.427'%20xml:space='preserve'%3e%3cg%20id='XMLID_800_'%3e%3cg%3e%3cg%3e%3ccircle%20cx='225.108'%20cy='41.302'%20r='38.373'/%3e%3cpath%20d='M397.111,330.868c-7.377,0-14.458,1.281-21.047,3.611l-3.12-9.271c6.069-1.88,12.506-2.914,19.175-2.957%20c8.102-0.052,15.106-6.153,15.609-14.239c0.549-8.84-6.458-16.18-15.179-16.18c-10.213,0-20.059,1.595-29.309,4.541l-20.71-61.54%20h9.315c3.709,7.964,10.934,13.96,19.685,15.978c3.329,0.768,6.52-1.762,6.52-5.191v-45.936c0-3.406-3.164-5.96-6.484-5.199%20c-8.767,2.01-16.007,8.012-19.721,15.987h-4.463c-2.762,3.551-6.192,6.541-10.09,8.794c-9.936,5.744-18.371,4.656-24.252,4.314%20c1.41,4.189,9.775,29.046,11.571,34.383c-1.71,1.595,3.555-6.344-68.423,106.855h-0.684c-2.564,8.595-6.261,15.549-14.333,21.473%20c-1.468,1.077-3.017,2.038-4.623,2.888h19.837c8.186,0,15.805-4.183,20.2-11.09l57.851-90.93l6.585,19.567%20c-27.031,17.072-45.069,47.145-45.247,81.37c-0.043,8.292,6.381,15.424,14.668,15.71c8.646,0.299,15.749-6.621,15.749-15.2%20c0-20.938,9.758-39.629,24.953-51.8l3.515,10.444c-13.426,12.156-21.633,29.974-20.806,49.648%20c1.368,32.53,27.712,59.008,60.235,60.529c36.281,1.697,66.339-27.33,66.339-63.245%20C460.427,359.272,432.024,330.868,397.111,330.868z%20M397.111,416.942c-12.549,0-22.758-10.209-22.758-22.758%20s10.209-22.758,22.758-22.758s22.758,10.209,22.758,22.758C419.869,406.733,409.66,416.942,397.111,416.942z'/%3e%3cpath%20d='M269.437,259.727c3.117-10.448-2.336-21.534-12.515-25.441l-23.595-9.057l1.407-6.988%20c-7.085-2.401-12.47-8.33-14.186-15.588l-13.618-57.806l28.632,49.039c2.935,5.028,8.193,8.252,14.005,8.59l69.342,4.03%20c9.601,0.554,17.808-6.774,18.365-16.348c0.557-9.585-6.762-17.807-16.348-18.365l-60.037-3.489l-23.933-40.989l13.567,12.518%20l1.624-8.065c2.827-14.035-6.26-27.703-20.294-30.53l-45.317-9.127c-14.035-2.826-27.703,6.26-30.53,20.294l-14.561,72.305%20v-69.587c0-4.846-3.929-8.775-8.775-8.775H32.603c-4.846,0-8.775,3.929-8.775,8.775v127.689h-6.084%20c-9.8,0-17.744,7.944-17.744,17.744c0,9.8,7.944,17.744,17.744,17.744h73.004v27.041c-29.827,11.281-
152.235,37.663-57.884,69.823%20c-1.275,7.26,4.317,13.919,11.7,13.919h15.524c-0.135,1.684-0.223,3.381-0.223,5.099c0,34.912,28.403,63.316,63.316,63.316%20c34.912,0,63.316-28.403,63.316-63.316c0-1.686-0.086-3.351-0.216-5.004h15.02c-15.51-8.246-23.512-26.573-18.347-43.889%20l19.983-66.989h17.417l-21.406,71.76c-3.294,11.041,2.987,22.662,14.028,25.956c11.042,3.294,22.663-2.988,25.956-14.028%20L269.437,259.727z%20M123.18,416.942c-12.549,0-22.758-10.209-22.758-22.758c0-1.753,0.206-3.458,0.583-5.099h44.35%20c0.377,1.64,0.583,3.345,0.583,5.099C145.938,406.733,135.728,416.942,123.18,416.942z%20M141.446,242.814v-17.198%20c2.926,6.698,7.462,12.621,13.223,17.198H141.446z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",className:"h-6 w-6 object-contain"})}),e.jsx("div",{className:"absolute -bottom-3 left-1/2 -translate-x-1/2 h-4 w-4 rounded-md bg-white shadow-md border border-gray-200 flex items-center justify-center",children:e.jsx("span",{className:"text-[8px] font-semibold text-[var(--text-label)]",children:"ID"})})]})}),e.jsx(r,{position:Ce[0],icon:it}),e.jsx(r,{position:Ce[Ce.length-1],icon:lt})]}),e.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='52'%20height='52'%20viewBox='0%200%2052%2052'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20filter='url(%23filter0_d_44_14271)'%3e%3ccircle%20cx='26'%20cy='20'%20r='16'%20fill='white'/%3e%3c/g%3e%3ccircle%20cx='25.9995'%20cy='19.6616'%20r='6.09231'%20stroke='black'%20stroke-width='1.6'/%3e%3ccircle%20cx='25.9996'%20cy='19.6617'%20r='2.4'%20fill='black'/%3e%3cpath%20d='M17.8759%2019.6617H19.9067'%20stroke='black'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M32.0917%2019.6617H34.1225'%20stroke='black'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M25.9996%2027.7848V25.754'%20stroke='black'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M25.9996%2013.5694V11.5387'%20stroke='black'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_44_14271'%20x='0'%20y='0'%20width='52'%20height='52'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='6'/%3e%3cfeGaussianBlur%20stdDeviation='5'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.0631944%200%200%200%200%200.0788195%200%200%200%200%200.108333%200%200%200%200.08%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_44_14271'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_44_14271'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",alt:"Center map",onClick:()=>{if(Ee&&Ce.length>0){const e=new window.google.maps.LatLngBounds;Ce.forEach(t=>e.extend(t));const t=window.innerWidth<768?{top:220,bottom:60,left:20,right:20}:{top:20,bottom:20,left:40,right:40};Ee.fitBounds(e,t)}},className:"absolute bottom-4 right-4 cursor-pointer",style:{bottom:"150px",right:"20px",height:"48px",width:"48px",zIndex:10}}),"Accepted"===(null==(w=null==(k=null==(y=null==(M=null==Xe?void 0:Xe.vendors)?void 0:M[0])?void 0:y.order_status)?void 0:k.current_status)?void 0:w.title)&&!rt(we,Xe)&&e.jsx("div",{className:"absolute top-4 right-4 lg:top-10 lg:right-10",children:e.jsxs("div",{style:{width:"280px",maxWidth:"calc(100vw - 64px)",height:"146px",borderRadius:"16px",border:"1px solid #ECEBEA",boxShadow:"0px 20px 14px 0px rgba(0, 0, 0, 0.12)",backgroundColor:"#FFFFFF",padding:"16px",display:"flex",flexDirection:"column",justifyContent:"center"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"17px"},children:[e.jsx("img",{src:m,alt:"order processed",style:{width:"20px",height:"24px",flexShrink:0}}),e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx("span",{style:{fontFamily:"Poppins",fontWeight:600,fontSize:"16px",lineHeight:"22px",color:"var(--text-heading)"},children:"Order Processed"}),e.jsx("span",{style:{fontFamily:"Poppins",fontWeight:400,fontSize:"12px",lineHeight:"16px",color:"var(--text-label)",marginTop:"4px"},children:"We are preparing your order."})]})]}),e.jsx("div",{style:{borderTop:"1px dashed #CDD4DA",margin:"12px 0"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"17px"},children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cellipse%20cx='16'%20cy='16.4849'%20rx='16'%20ry='15.5152'%20fill='%23E7ECEF'/%3e%3cellipse%20cx='16'%20cy='13.5755'%20rx='5'%20ry='4.84848'%20fill='white'/%3e%3cmask%20id='mask0_44_14056'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='32'%20height='32'%3e%3cellipse%20cx='16'%20cy='15.5152'%20rx='16'%20ry='15.5152'%20fill='%23E7ECEF'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_44_14056)'%3e%3cellipse%20cx='16.5'%20cy='29.5759'%20rx='9.5'%20ry='9.21212'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",alt:"assigning driver",style:{width:"20px",height:"20px",flexShrink:0}}),e.jsx("span",{style:{fontFamily:"Poppins",fontWeight:500,fontSize:"14px",lineHeight:"20px",color:"var(--text-heading)"},children:"Weâre assigning the driver..."})]})]})}),"Accepted"===(null==(C=null==(b=null==(z=null==(N=null==Xe?void 0:Xe.vendors)?void 0:N[0])?void 0:z.order_status)?void 0:b.current_status)?void 0:C.title)&&rt(we,Xe)&&e.jsx("div",{className:"absolute top-4 right-4 lg:top-10 lg:right-10",children:e.jsxs("div",{style:{width:"280px",maxWidth:"calc(100vw - 64px)",borderRadius:"16px",border:"1px solid #ECEBEA",boxShadow:"0px 20px 14px 0px rgba(0, 0, 0, 0.12)",backgroundColor:"#FFFFFF",padding:"16px",display:"flex",flexDirection:"column"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",ga
1p:"17px"},children:[e.jsx("img",{src:m,alt:"order processed",style:{width:"20px",height:"24px",flexShrink:0}}),e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx("span",{style:{fontFamily:"Poppins",fontWeight:600,fontSize:"16px",lineHeight:"22px",color:"var(--text-heading)"},children:"Order Processed"}),e.jsx("span",{style:{fontFamily:"Poppins",fontWeight:400,fontSize:"12px",lineHeight:"16px",color:"var(--text-label)",marginTop:"4px"},children:"We are preparing your order."})]})]}),e.jsx("div",{style:{borderTop:"1px dashed #CDD4DA",margin:"12px 0"}}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("img",{src:(null==(I=null==Xe?void 0:Xe.order_data)?void 0:I.agent_image)||at,alt:"Driver",className:"h-10 w-10 rounded-full object-cover",onError:e=>{e.currentTarget.src=at}}),e.jsxs("div",{children:[e.jsx("h4",{style:{fontFamily:"Poppins",fontWeight:600,fontSize:"16px",lineHeight:"22px",letterSpacing:"0px",color:"var(--text-heading)"},children:st}),e.jsxs("p",{style:{fontFamily:"Poppins",fontWeight:400,fontSize:"12px",lineHeight:"16px",letterSpacing:"0px",color:"var(--text-label)"},children:[st," can speak English."]})]})]}),e.jsx("img",{src:v,alt:"Call driver",onClick:()=>{nt&&(window.location.href=`tel:${nt}`)},style:{width:"26px",height:"26px"}})]})]})}),"Processing"===(null==(T=null==(S=null==(_=null==(D=null==Xe?void 0:Xe.vendors)?void 0:D[0])?void 0:_.order_status)?void 0:S.current_status)?void 0:T.title)&&rt(we,Xe)&&e.jsx("div",{className:"absolute top-4 right-4 lg:top-10 lg:right-10 ",children:e.jsxs("div",{style:{width:"280px",maxWidth:"calc(100vw - 64px)",borderRadius:"16px",border:"1px solid #ECEBEA",boxShadow:"0px 20px 14px 0px rgba(0, 0, 0, 0.12)",backgroundColor:"#FFFFFF",padding:"16px",display:"flex",flexDirection:"column"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"17px"},children:[e.jsx("img",{src:m,alt:"order processed",style:{width:"20px",height:"24px",flexShrink:0}}),e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx("span",{style:{fontFamily:"Poppins",fontWeight:600,fontSize:"16px",lineHeight:"22px",color:"var(--text-heading)"},children:"Order Processed"}),e.jsx("span",{style:{fontFamily:"Poppins",fontWeight:400,fontSize:"12px",lineHeight:"16px",color:"var(--text-label)",marginTop:"4px"},children:"We are preparing your order."})]})]}),e.jsx("div",{style:{borderTop:"1px dashed #CDD4DA",margin:"12px 0"}}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("img",{src:(null==(F=null==Xe?void 0:Xe.order_data)?void 0:F.agent_image)||at,alt:"Driver",className:"h-10 w-10 rounded-full object-cover",onError:e=>{e.currentTarget.src=at}}),e.jsxs("div",{children:[e.jsx("h4",{style:{fontFamily:"Poppins",fontWeight:600,fontSize:"16px",lineHeight:"22px",letterSpacing:"0px",color:"var(--text-heading)"},children:st}),e.jsxs("p",{style:{fontFamily:"Poppins",fontWeight:400,fontSize:"12px",lineHeight:"16px",letterSpacing:"0px",color:"var(--text-label)"},children:[st," can speak English."]})]})]}),e.jsx("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:e.jsx("img",{src:v,alt:"Call driver",onClick:()=>{nt&&(window.location.href=`tel:${nt}`)},style:{width:"26px",height:"26px"}})})]})]})}),"Out For Delivery"===(null==(O=null==(L=null==(E=null==(A=null==Xe?void 0:Xe.vendors)?void 0:A[0])?void 0:E.order_status)?void 0:L.current_status)?void 0:O.title)&&rt(we,Xe)&&e.jsxs("div",{className:"absolute top-4 right-4 lg:top-10 lg:right-10 bg-white shadow-md rounded-lg p-4 flex flex-col space-y-3 w-[280px] max-w-[calc(100vw-64px)]",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='30'%20height='33'%20viewBox='0%200%2030%2033'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.9102%2032.4917C13.9102%2032.4917%2014.0481%2032.4817%2014.2945%2032.4517'%20stroke='black'%20stroke-width='0.5'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-dasharray='3.8%203.8'/%3e%3cpath%20d='M15.28%2032.2635C17.6748%2031.6983%2022.3361%2029.7746%2021.8138%2023.4084C21.8138%2023.4084%2021.8828%2019.6205%2016.4823%2017.6968C15.9699%2017.5183%2012.0913%2016.6701%2011.5%2016.4916C9.46005%2015.8867%206.12489%2015.5747%207.10052%2011.0133C7.10052%2011.0133%207.7608%208.7227%2010.057%208.49463'%20stroke='black'%20stroke-width='0.9'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-dasharray='3.8%203.8'/%3e%3cpath%20d='M20.2993%206.05026C20.3888%206.01422%2020.4604%205.94215%2020.4604%205.85206V5.72593C20.4604%205.59981%2020.353%205.50972%2020.2456%205.4917H17.8998C17.7923%205.4917%2017.7207%205.58179%2017.7207%205.67188V5.87008C17.7207%205.97819%2017.8103%206.05026%2017.8998%206.05026H17.9893H17.9714L17.6133%207.25746V9.49169H19.4577H19.9412L20.4784%209.32953C20.5679%209.31152%2020.6216%209.22142%2020.6216%209.14935V7.25746L20.2993%206.05026Z'%20fill='%239B56FF'/%3e%3cpath%20d='M20.2498%206.06828H17.8861C17.7966%206.06828%2017.707%205.9962%2017.707%205.8881V5.67188C1
17.707%205.58179%2017.7787%205.4917%2017.8861%205.4917H20.2498C20.3751%205.4917%2020.4647%205.58179%2020.4647%205.70792V5.85206C20.4647%205.97819%2020.3751%206.06828%2020.2498%206.06828Z'%20stroke='black'%20stroke-width='0.181705'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.2852%209.0955V7.38379'%20stroke='black'%20stroke-width='0.181705'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.2316%205.50977C20.2316%205.50977%2020.0167%205.78004%2020.2316%206.06832L19.9451%207.29355V8.28454V9.47373H19.4616H17.6172V7.25751L17.9395%206.08634'%20stroke='black'%20stroke-width='0.181705'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.0645%206.66309H19.7835'%20stroke='black'%20stroke-width='0.181705'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.9453%209.49173L20.4825%209.32957C20.572%209.31155%2020.6258%209.22146%2020.6258%209.14939V8.30254V7.2575L20.3034%206.05029'%20stroke='black'%20stroke-width='0.181705'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.61%203.6946C14.2249%202.50062%2015.2086%201.51511%2016.4383%200.984452C17.1059%200.700171%2017.8086%200.529603%2018.5288%200.491699C18.6869%200.491699%2018.845%200.491699%2019.0031%200.491699C19.1613%200.491699%2019.3194%200.491699%2019.4775%200.491699C20.1977%200.529603%2020.9004%200.700171%2021.568%200.984452C22.9031%201.57197%2023.9571%202.69014%2024.5368%204.01678C25.8895%207.10597%2024.449%2010.5742%2022.6923%2013.1706C22.1652%2013.9477%2021.5855%2014.6678%2021.0058%2015.407C20.4261%2016.1461%2019.8639%2016.8852%2019.0558%2017.4727C19.0558%2017.4917%2019.0207%2017.4917%2019.0031%2017.4917C18.9856%2017.4917%2018.968%2017.4917%2018.9329%2017.4727C18.1951%2016.8473%2017.5626%2016.1461%2016.9829%2015.407C16.4032%2014.6678%2015.8235%2013.9477%2015.2965%2013.1706C13.733%2010.8774%2012.4506%207.883%2013.1006%205.09705'%20stroke='black'%20stroke-width='0.983614'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19%2011.4917C21.2091%2011.4917%2023%209.70084%2023%207.4917C23%205.28256%2021.2091%203.4917%2019%203.4917C16.7909%203.4917%2015%205.28256%2015%207.4917C15%209.70084%2016.7909%2011.4917%2019%2011.4917Z'%20stroke='black'%20stroke-width='1.08005'%20stroke-miterlimit='10'/%3e%3c/svg%3e",alt:"Delivery Icon"}),e.jsx("h3",{className:"text-[var(--text-heading)] font-semibold",children:"Food enroute"})]}),e.jsx("div",{className:"bg-gray-900 text-white text-sm px-3 py-1 rounded-lg",children:(null==(H=null==(B=null==Xe?void 0:Xe.vendors)?void 0:B[0])?void 0:H.ETA)||"On the way"})]}),e.jsxs("div",{className:"flex items-center justify-between pt-3",style:{borderTop:"1px dashed #CDD4DA",margin:"12px 0"},children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("img",{src:(null==(P=null==Xe?void 0:Xe.order_data)?void 0:P.agent_image)||at,alt:"Driver",className:"h-10 w-10 rounded-full object-cover",onError:e=>{e.currentTarget.src=at}}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-[var(--text-heading)] font-medium",children:st}),e.jsxs("p",{className:"text-[var(--text-body)] text-sm",children:[st," can speak English."]})]})]}),e.jsx("img",{src:v,alt:"Call driver",onClick:()=>{nt&&(window.location.href=`tel:${nt}`)},style:{width:"26px",height:"26px"}})]})]})]}),e.jsx("section",{className:" w-full lg:w-[423px] border-[1px] border-[#E7ECEF] rounded-[12px] mt-0 lg:mt-[-10px] mb-0 lg:mb-[149px] mx-auto",children:e.jsxs("div",{className:"max-w-lg mx-auto bg-white rounded-2xl p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx("img",{src:(null==(Z=null==(V=null==(G=null==(W=null==ye?void 0:ye.vendors)?void 0:W[0])?void 0:G.vendor)?void 0:V.banner)?void 0:Z.proxy_url)+"200/200"+(null==(Y=null==(R=null==(Q=null==(U=null==ye?void 0:ye.vendors)?void 0:U[0])?void 0:Q.vendor)?void 0:R.banner)?void 0:Y.image_path),alt:"Restaurant",className:"w-16 h-16 rounded-lg object-cover"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h2",{className:"text-lg font-semibold text-[var(--text-heading)]",children:(null==($=null==(J=null==(X=null==ye?void 0:ye.vendors)?void 0:X[0])?void 0:J.vendor)?void 0:$.name)||"Restaurant"}),e.jsxs("p",{className:"text-[var(--text-body)] text-sm",children:[(null==(ee=null==(q=null==(K=null==ye?void 0:ye.vendors)?void 0:K[0])?void 0:q.products)?void 0:ee.length)??0," items",(null==(ie=null==(te=null==ye?void 0:ye.vendors)?void 0:te[0])?void 0:ie.ETA)&&e.jsxs(e.Fragment,{children:[" | ETA: ",ye.vendors[0].ETA]})]})]}),e.jsx("div",{onClick:()=>(async()=>{await dt(),Te(!0)})(),className:"cursor-pointer text-sm font-semibold text-[var(--text-color)]"})]}),e.jsx("div",{style:{borderTop:"1px dashed #CDD4DA",width:"100%",margin:"16px 0",opacity:1}}),e.jsxs("div",{className:"bg-[#EBFFF9] p-4 rounded-lg",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("img",{src:h,alt:"Map Icon",className:"h-5 w-5 object-contain"}),e.jsx("h4",{style:{fontFamily:"Poppins",fontWeight:600,fontStyle:"normal",fontSize:"14px",lineHeight:"20px",letterSpacing:"0px",marginBottom:"10px"},className:"text-[var(--text-heading)]",children:"Delivery Address"})]}),e.jsx("p",{className:"text-[#737B89] text-sm",style:{marginLeft:"28px"},children:(null==(le=null==ye?void 0:ye.address)?void 0:le.type_name)||"Address"}),e.jsx("p",{className:"text-[#737B89] text-sm",style:{marginLeft:"28px"},children:null==(re=null==ye?void 0:ye.address)?void 0:re.address})]}),e.jsx("div",{className:" pt-4 space-y-4",children:ye&&(null==(ne=null==(se=null==(oe=null==ye?void 0:ye.vendors)?void 0:oe[0])?void 0:se.products)?void 0:ne.map((t,i)=>{var l;const r=null==(l=null==Xe?void 0:Xe.product_details)?void 0:l.find(e=>e.id===t.product_id||e.product_id===t.product_id),o=Number((null==r?void 0:r.total_markup_price)||t.total_markup_price||0),s=Number(t.price)+o;return e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-[var(--text-heading)] font-medium",children:[t.quantity,"x ",t.product_name]}),e.jsx("p",{className:"text-[var(--text-body)] text-sm",children:t.category_type})]}),e.jsxs("p",{className:"text-[var(--text-label)] font-medium",children:["$",s.toFixed(2)]})]},i)}))}),e.jsx("div",{style:{width:"100%",height:"0px",borderWidth:"1px",borderStyle:"solid",borderColor:"#E7ECEF",o
1pacity:1,transform:"rotate(0deg)"}}),e.jsxs("div",{className:"pt-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-[var(--text-heading)]",children:"Billing Summary"}),e.jsxs("div",{className:"flex justify-between text-[#50616E] mt-2",children:[e.jsx("span",{children:"Item Total"}),e.jsxs("span",{children:["$",(parseFloat((null==(de=null==(ae=null==ye?void 0:ye.vendors)?void 0:ae[0])?void 0:de.subtotal_amount)??0)+((null==(pe=null==(xe=null==(ce=null==ye?void 0:ye.vendors)?void 0:ce[0])?void 0:xe.products)?void 0:pe.reduce((e,t)=>{var i;const l=null==(i=null==Xe?void 0:Xe.product_details)?void 0:i.find(e=>e.id===t.product_id||e.product_id===t.product_id);return e+Number((null==l?void 0:l.total_markup_price)||t.total_markup_price||0)*t.quantity},0))||0)).toFixed(2)]})]}),Number(null==ye?void 0:ye.total_discount)>0&&e.jsxs("div",{className:"flex justify-between text-[#04A971] mt-1",children:[e.jsx("span",{style:{fontFamily:"Poppins",fontWeight:600,fontSize:"13px",lineHeight:"30px",letterSpacing:"0px"},children:"Offer Discount"}),e.jsxs("span",{children:["- $",Number((null==ye?void 0:ye.discount_amount)??0).toFixed(2)]})]}),Number(null==ye?void 0:ye.total_delivery_fee)>0&&e.jsxs("div",{className:"flex justify-between text-[#50616E] mt-2",children:[e.jsx("span",{children:"Delivery Fee"}),e.jsxs("span",{children:["$",Number(ye.total_delivery_fee).toFixed(2)]})]}),Number(null==ye?void 0:ye.taxable_amount)>0&&e.jsxs("div",{className:"flex justify-between text-[var(--text-label)] mt-2",children:[e.jsx("span",{children:"Taxes"}),e.jsxs("span",{children:["$",Number(ye.taxable_amount).toFixed(2)]})]}),Number(null==ye?void 0:ye.total_service_fee)>0&&e.jsxs("div",{className:"flex justify-between text-[#50616E] mt-2",children:[e.jsx("span",{children:"Service Fee"}),e.jsxs("span",{children:["$",Number(ye.total_service_fee).toFixed(2)]})]}),e.jsxs("div",{className:"flex justify-between text-[var(--text-heading)] mt-3",children:[e.jsx("span",{style:{fontFamily:"Poppins",fontWeight:400,fontSize:"16px",lineHeight:"24px",letterSpacing:"-0.26px"},children:"Total Amount"}),e.jsxs("span",{style:{fontFamily:"Poppins",fontWeight:600,fontSize:"20px",lineHeight:"28px",color:"var(--text-heading)"},children:["$",parseFloat((null==(he=null==(ue=null==ye?void 0:ye.vendors)?void 0:ue[0])?void 0:he.payable_amount)??0).toFixed(2)]})]}),Number(null==ye?void 0:ye.wallet_amount_used)>0&&e.jsxs("div",{className:"flex justify-between text-[#50616E] mt-2",children:[e.jsx("span",{children:"Wallet Used"}),e.jsxs("span",{children:["- $",Number(ye.wallet_amount_used).toFixed(2)]})]}),e.jsx("div",{style:{width:"100%",height:"1px",backgroundColor:"#EFF1F4",marginTop:"12px",marginBottom:"12px"}}),e.jsxs("div",{className:"flex justify-between mt-3",children:[e.jsx("span",{style:{fontFamily:"Poppins",fontWeight:400,fontSize:"16px",lineHeight:"24px",letterSpacing:"-0.26px",color:"var(--text-heading)"},children:"Payable Amount"}),e.jsxs("span",{style:{fontFamily:"Poppins",fontWeight:600,fontSize:"20px",lineHeight:"28px",color:"var(--text-heading)"},children:["$",Number((null==ye?void 0:ye.payable_amount)??0).toFixed(2)]})]}),(null==ye?void 0:ye.payment_option_title)&&e.jsxs("div",{className:"mt-2 text-sm",style:{fontFamily:"Poppins",color:"var(--text-label)",marginTop:"12px"},children:["Paid with ",ye.payment_option_title]})]})]})})]}),Fe&&e.jsx("div",{className:"fixed inset-0 z-[9999] bg-black/40 backdrop-blur-sm flex items-center justify-center",children:e.jsx("div",{className:"relative",children:e.jsx(a,{orderId:fe,data:De,showSupportButton:Oe,onClose:()=>{Ae(!1),Be(!1)}})})})]})};export{f 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.