import{d as S,j as o}from"./index-C8aoN8t4.js";import{c as T,g as M,R as z,r as j,h as W,b as L}from"./vendor-ChGFRQAq.js";import{c1 as O,c2 as U,c3 as b,y as P,C,ai as F,q as A,X as B}from"./ui-wfmc48pO.js";import{_ as I,a as q,b as $,c as H}from"./utils-CRoqAWlT.js";import"./pdf-DdgWE7Gk.js";function X(t,i){if(t==null)return{};var r,e,s=O(t,i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(e=0;e<a.length;e++)r=a[e],i.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(s[r]=t[r])}return s}/*!
 * Signature Pad v2.3.2
 * https://github.com/szimek/signature_pad
 *
 * Copyright 2017 Szymon Nowak
 * Released under the MIT license
 *
 * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:
 * http://corner.squareup.com/2012/07/smoother-signatures.html
 *
 * Implementation of interpolation using cubic Bézier curves is taken from:
 * http://benknowscode.wordpress.com/2012/09/14/path-interpolation-using-cubic-bezier-and-control-point-estimation-in-javascript
 *
 * Algorithm for approximated length of a Bézier curve is taken from:
 * http://www.lemoda.net/maths/bezier-length/index.html
 *
 */function w(t,i,r){this.x=t,this.y=i,this.time=r||new Date().getTime()}w.prototype.velocityFrom=function(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):1};w.prototype.distanceTo=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))};w.prototype.equals=function(t){return this.x===t.x&&this.y===t.y&&this.time===t.time};function R(t,i,r,e){this.startPoint=t,this.control1=i,this.control2=r,this.endPoint=e}R.prototype.length=function(){for(var t=10,i=0,r=void 0,e=void 0,s=0;s<=t;s+=1){var a=s/t,l=this._point(a,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),n=this._point(a,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(s>0){var u=l-r,d=n-e;i+=Math.sqrt(u*u+d*d)}r=l,e=n}return i};R.prototype._point=function(t,i,r,e,s){return i*(1-t)*(1-t)*(1-t)+3*r*(1-t)*(1-t)*t+3*e*(1-t)*t*t+s*t*t*t};function Y(t,i,r){var e,s,a,l=null,n=0;r||(r={});var u=function(){n=r.leading===!1?0:Date.now(),l=null,a=t.apply(e,s),l||(e=s=null)};return function(){var d=Date.now();!n&&r.leading===!1&&(n=d);var c=i-(d-n);return e=this,s=arguments,c<=0||c>i?(l&&(clearTimeout(l),l=null),n=d,a=t.apply(e,s),l||(e=s=null)):!l&&r.trailing!==!1&&(l=setTimeout(u,c)),a}}function f(t,i){var r=this,e=i||{};this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||.5,this.maxWidth=e.maxWidth||2.5,this.throttle="throttle"in e?e.throttle:16,this.minDistance="minDistance"in e?e.minDistance:5,this.throttle?this._strokeMoveUpdate=Y(f.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=f.prototype._strokeUpdate,this.dotSize=e.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.onBegin=e.onBegin,this.onEnd=e.onEnd,this._canvas=t,this._ctx=t.getContext("2d"),this.clear(),this._handleMouseDown=function(s){s.which===1&&(r._mouseButtonDown=!0,r._strokeBegin(s))},this._handleMouseMove=function(s){r._mouseButtonDown&&r._strokeMoveUpdate(s)},this._handleMouseUp=function(s){s.which===1&&r._mouseButtonDown&&(r._mouseButtonDown=!1,r._strokeEnd(s))},this._handleTouchStart=function(s){if(s.targetTouches.length===1){var a=s.changedTouches[0];r._strokeBegin(a)}},this._handleTouchMove=function(s){s.preventDefault();var a=s.targetTouches[0];r._strokeMoveUpdate(a)},this._handleTouchEnd=function(s){var a=s.target===r._canvas;a&&(s.preventDefault(),r._strokeEnd(s))},this.on()}f.prototype.clear=function(){var t=this._ctx,i=this._canvas;t.fillStyle=this.backgroundColor,t.clearRect(0,0,i.width,i.height),t.fillRect(0,0,i.width,i.height),this._data=[],this._reset(),this._isEmpty=!0};f.prototype.fromDataURL=function(t){var i=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=new Image,s=r.ratio||window.devicePixelRatio||1,a=r.width||this._canvas.width/s,l=r.height||this._canvas.height/s;this._reset(),e.src=t,e.onload=function(){i._ctx.drawImage(e,0,0,a,l)},this._isEmpty=!1};f.prototype.toDataURL=function(t){var i;switch(t){case"image/svg+xml":return this._toSVG();default:for(var r=arguments.length,e=Array(r>1?r-1:0),s=1;s<r;s++)e[s-1]=arguments[s];return(i=this._canvas).toDataURL.apply(i,[t].concat(e))}};f.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()};f.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)};f.prototype.isEmpty=function(){return this._isEmpty};f.prototype._strokeBegin=function(t){this._data.push([]),this._reset(),this._strokeUpdate(t),typeof this.onBegin=="function"&&this.onBegin(t)};f.prototype._strokeUpdate=function(t){var i=t.clientX,r=t.clientY,e=this._createPoint(i,r),s=this._data[this._data.length-1],a=s&&s[s.length-1],l=a&&e.distanceTo(a)<this.minDistance;if(!(a&&l)){var n=this._addPoint(e),u=n.curve,d=n.widths;u&&d&&this._drawCurve(u,d.start,d.end),this._data[this._data.length-1].push({x:e.x,y:e.y,time:e.time,color:this.penColor})}};f.prototype._strokeEnd=function(t){var i=this.points.length>2,r=this.points[0];if(!i&&r&&this._drawDot(r),r){var e=this._data[this._data.length-1],s=e[e.length-1];r.equals(s)||e.push({x:r.x,y:r.y,time:r.time,color:this.penColor})}typeof this.onEnd=="function"&&this.onEnd(t)};f.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)};f.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)};f.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor};f.prototype._createPoint=function(t,i,r){var e=this._canvas.getBoundingClientRect();return new w(t-e.left,i-e.top,r||new Date().getTime())};f.prototype._addPoint=function(t){var i=this.points,r=void 0;if(i.push(t),i.length>2){i.length===3&&i.unshift(i[0]),r=this._calculateCurveControlPoints(i[0],i[1],i[2]);var e=r.c2;r=this._calculateCurveControlPoints(i[1],i[2],i[3]);var s=r.c1,a=new R(i[1],e,s,i[2]),l=this._calculateCurveWidths(a);return i.shift(),{curve:a,widths:l}}return{}};f.prototype._calculateCurveControlPoints=function(t,i,r){var e=t.x-i.x,s=t.y-i.y,a=i.x-r.x,l=i.y-r.y,n={x:(t.x+i.x)/2,y:(t.y+i.y)/2},u={x:(i.x+r.x)/2,y:(i.y+r.y)/2},d=Math.sqrt(e*e+s*s),c=Math.sqrt(a*a+l*l),v=n.x-u.x,m=n.y-u.y,p=c/(d+c),h={x:u.x+v*p,y:u.y+m*p},x=i.x-h.x,N=i.y-h.y;return{c1:new w(n.x+x,n.y+N),c2:new w(u.x+x,u.y+N)}};f.prototype._calculateCurveWidths=function(t){var i=t.startPoint,r=t.endPoint,e={start:null,end:null},s=this.velocityFilterWeight*r.velocityFrom(i)+(1-this.velocityFilterWeight)*this._lastVelocity,a=this._strokeWidth(s);return e.start=this._lastWidth,e.end=a,this._lastVelocity=s,this._lastWidth=a,e};f.prototype._strokeWidth=function(t){return Math.max(this.maxWidth/(t+1),this.minWidth)};f.prototype._drawPoint=function(t,i,r){var e=this._ctx;e.moveTo(t,i),e.arc(t,i,r,0,2*Math.PI,!1),this._isEmpty=!1};f.prototype._drawCurve=function(t,i,r){var e=this._ctx,s=r-i,a=Math.floor(t.length());e.beginPath();for(var l=0;l<a;l+=1){var n=l/a,u=n*n,d=u*n,c=1-n,v=c*c,m=v*c,p=m*t.startPoint.x;p+=3*v*n*t.control1.x,p+=3*c*u*t.control2.x,p+=d*t.endPoint.x;var h=m*t.startPoint.y;h+=3*v*n*t.control1.y,h+=3*c*u*t.control2.y,h+=d*t.endPoint.y;var x=i+d*s;this._drawPoint(p,h,x)}e.closePath(),e.fill()};f.prototype._drawDot=function(t){var i=this._ctx,r=typeof this.dotSize=="function"?this.dotSize():this.dotSize;i.beginPath(),this._drawPoint(t.x,t.y,r),i.closePath(),i.fill()};f.prototype._fromData=function(t,i,r){for(var e=0;e<t.length;e+=1){var s=t[e];if(s.length>1)for(var a=0;a<s.length;a+=1){var l=s[a],n=new w(l.x,l.y,l.time),u=l.color;if(a===0)this.penColor=u,this._reset(),this._addPoint(n);else if(a!==s.length-1){var d=this._addPoint(n),c=d.curve,v=d.widths;c&&v&&i(c,v,u)}}else{this._reset();var m=s[0];r(m)}}};f.prototype._toSVG=function(){var t=this,i=this._data,r=this._canvas,e=Math.max(window.devicePixelRatio||1,1),s=0,a=0,l=r.width/e,n=r.height/e,u=document.createElementNS("http://www.w3.org/2000/svg","svg");u.setAttributeNS(null,"width",r.width),u.setAttributeNS(null,"height",r.height),this._fromData(i,function(g,y,D){var _=document.createElement("path");if(!isNaN(g.control1.x)&&!isNaN(g.control1.y)&&!isNaN(g.control2.x)&&!isNaN(g.control2.y)){var k="M "+g.startPoint.x.toFixed(3)+","+g.startPoint.y.toFixed(3)+" "+("C "+g.control1.x.toFixed(3)+","+g.control1.y.toFixed(3)+" ")+(g.control2.x.toFixed(3)+","+g.control2.y.toFixed(3)+" ")+(g.endPoint.x.toFixed(3)+","+g.endPoint.y.toFixed(3));_.setAttribute("d",k),_.setAttribute("stroke-width",(y.end*2.25).toFixed(3)),_.setAttribute("stroke",D),_.setAttribute("fill","none"),_.setAttribute("stroke-linecap","round"),u.appendChild(_)}},function(g){var y=document.createElement("circle"),D=typeof t.dotSize=="function"?t.dotSize():t.dotSize;y.setAttribute("r",D),y.setAttribute("cx",g.x),y.setAttribute("cy",g.y),y.setAttribute("fill",g.color),u.appendChild(y)});var d="data:image/svg+xml;base64,",c='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'+(' viewBox="'+s+" "+a+" "+l+" "+n+'"')+(' width="'+l+'"')+(' height="'+n+'"')+">",v=u.innerHTML;if(v===void 0){var m=document.createElement("dummy"),p=u.childNodes;m.innerHTML="";for(var h=0;h<p.length;h+=1)m.appendChild(p[h].cloneNode(!0));v=m.innerHTML}var x="</svg>",N=c+v+x;return d+btoa(N)};f.prototype.fromData=function(t){var i=this;this.clear(),this._fromData(t,function(r,e){return i._drawCurve(r,e.start,e.end)},function(r){return i._drawDot(r)}),this._data=t};f.prototype.toData=function(){return this._data};var V={exports:{}};(function(t,i){(function(r,e){t.exports=e()})(T,function(){return function(r){function e(a){if(s[a])return s[a].exports;var l=s[a]={exports:{},id:a,loaded:!1};return r[a].call(l.exports,l,l.exports,e),l.loaded=!0,l.exports}var s={};return e.m=r,e.c=s,e.p="",e(0)}([function(r,e){function s(d){var c=d.getContext("2d"),v=d.width,m=d.height,p=c.getImageData(0,0,v,m).data,h=n(!0,v,m,p),x=n(!1,v,m,p),N=u(!0,v,m,p),g=u(!1,v,m,p),y=g-N+1,D=x-h+1,_=c.getImageData(N,h,y,D);return d.width=y,d.height=D,c.clearRect(0,0,y,D),c.putImageData(_,0,0),d}function a(d,c,v,m){return{red:m[4*(v*c+d)],green:m[4*(v*c+d)+1],blue:m[4*(v*c+d)+2],alpha:m[4*(v*c+d)+3]}}function l(d,c,v,m){return a(d,c,v,m).alpha}function n(d,c,v,m){for(var p=d?1:-1,h=d?0:v-1,x=h;d?x<v:x>-1;x+=p)for(var N=0;N<c;N++)if(l(N,x,c,m))return x;return null}function u(d,c,v,m){for(var p=d?1:-1,h=d?0:c-1,x=h;d?x<c:x>-1;x+=p)for(var N=0;N<v;N++)if(l(x,N,c,m))return x;return null}Object.defineProperty(e,"__esModule",{value:!0}),e.default=s}])})})(V);var G=V.exports;const J=M(G);var K=["canvasProps","clearOnResize"],E=function(t){I(r,t);var i=q(r);function r(){var e;H(this,r);for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return e=i.call.apply(i,[this].concat(a)),e.staticThis=e.constructor,e._sigPad=null,e._canvas=null,e.setRef=function(n){e._canvas=n,e._canvas===null&&(e._sigPad=null)},e._excludeOurProps=function(){var n=e.props;n.canvasProps,n.clearOnResize;var u=X(n,K);return u},e.componentDidMount=function(){var n=e.getCanvas();e._sigPad=new f(n,e._excludeOurProps()),e._resizeCanvas(),e.on()},e.componentWillUnmount=function(){e.off()},e.componentDidUpdate=function(){Object.assign(e._sigPad,e._excludeOurProps())},e.getCanvas=function(){if(e._canvas===null)throw e.staticThis.refNullError;return e._canvas},e.getTrimmedCanvas=function(){var n=e.getCanvas(),u=document.createElement("canvas");return u.width=n.width,u.height=n.height,u.getContext("2d").drawImage(n,0,0),J(u)},e.getSignaturePad=function(){if(e._sigPad===null)throw e.staticThis.refNullError;return e._sigPad},e._checkClearOnResize=function(){e.props.clearOnResize&&e._resizeCanvas()},e._resizeCanvas=function(){var n,u,d=(n=e.props.canvasProps)!==null&&n!==void 0?n:{},c=d.width,v=d.height;if(!(typeof c<"u"&&typeof v<"u")){var m=e.getCanvas(),p=Math.max((u=window.devicePixelRatio)!==null&&u!==void 0?u:1,1);typeof c>"u"&&(m.width=m.offsetWidth*p),typeof v>"u"&&(m.height=m.offsetHeight*p),m.getContext("2d").scale(p,p),e.clear()}},e.render=function(){var n=e.props.canvasProps;return z.createElement("canvas",U({ref:e.setRef},n))},e.on=function(){return window.addEventListener("resize",e._checkClearOnResize),e.getSignaturePad().on()},e.off=function(){return window.removeEventListener("resize",e._checkClearOnResize),e.getSignaturePad().off()},e.clear=function(){return e.getSignaturePad().clear()},e.isEmpty=function(){return e.getSignaturePad().isEmpty()},e.fromDataURL=function(n,u){return e.getSignaturePad().fromDataURL(n,u)},e.toDataURL=function(n,u){return e.getSignaturePad().toDataURL(n,u)},e.fromData=function(n){return e.getSignaturePad().fromData(n)},e.toData=function(){return e.getSignaturePad().toData()},e}return $(r)}(j.Component);E.propTypes={velocityFilterWeight:b.number,minWidth:b.number,maxWidth:b.number,minDistance:b.number,dotSize:b.oneOfType([b.number,b.func]),penColor:b.string,throttle:b.number,onEnd:b.func,onBegin:b.func,canvasProps:b.object,clearOnResize:b.bool};E.defaultProps={clearOnResize:!0};E.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");const ie=()=>{var g;const{orderId:t}=W();L();const{orders:i,updateOrderStatus:r}=S(),e=j.useRef(null),[s,a]=j.useState(!1),[l,n]=j.useState(""),[u,d]=j.useState(null),[c,v]=j.useState(!1),[m,p]=j.useState(null),h=i.find(y=>y.id===t);if(!h)return o.jsxDEV("div",{className:"min-h-screen bg-slate-50 flex flex-col items-center justify-center p-6 text-center",children:[o.jsxDEV(P,{size:64,className:"text-slate-300 mb-4"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:24,columnNumber:17},void 0),o.jsxDEV("h1",{className:"text-2xl font-black text-slate-800 uppercase tracking-tight mb-2",children:"Delivery Not Found"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:25,columnNumber:17},void 0),o.jsxDEV("p",{className:"text-slate-500",children:"The requested delivery link is invalid or has expired."},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:26,columnNumber:17},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:23,columnNumber:13},void 0);if(h.status==="delivered"||h.status==="completed")return o.jsxDEV("div",{className:"min-h-screen bg-emerald-50 flex flex-col items-center justify-center p-6 text-center",children:[o.jsxDEV("div",{className:"w-20 h-20 rounded-full bg-emerald-500 text-white flex items-center justify-center mb-6 shadow-xl shadow-emerald-500/30",children:o.jsxDEV(C,{size:40},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:35,columnNumber:21},void 0)},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:34,columnNumber:17},void 0),o.jsxDEV("h1",{className:"text-3xl font-black text-emerald-900 uppercase tracking-tight mb-2",children:"Delivered!"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:37,columnNumber:17},void 0),o.jsxDEV("p",{className:"text-emerald-700 font-medium",children:"This order was successfully delivered."},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:38,columnNumber:17},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:33,columnNumber:13},void 0);const x=()=>{var y;(y=e.current)==null||y.clear(),d(null)},N=async()=>{var y;if(p(null),!l.trim()){p("Please enter the name of the person receiving the goods.");return}if((y=e.current)!=null&&y.isEmpty()){p("Please provide a signature to continue.");return}a(!0);try{await r(h.id,"delivered"),v(!0)}catch(D){console.error(D),p("Failed to submit delivery proof. Please check your connection and try again.")}finally{a(!1)}};return c?o.jsxDEV("div",{className:"min-h-screen bg-slate-900 flex flex-col items-center justify-center p-6 text-center",children:[o.jsxDEV("div",{className:"w-24 h-24 rounded-full bg-emerald-500 text-white flex items-center justify-center mb-6 shadow-2xl shadow-emerald-500/50 scale-in",children:o.jsxDEV(C,{size:48},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:74,columnNumber:21},void 0)},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:73,columnNumber:17},void 0),o.jsxDEV("h1",{className:"text-4xl font-black text-white uppercase tracking-tight mb-4",children:"Dropoff Complete"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:76,columnNumber:17},void 0),o.jsxDEV("p",{className:"text-slate-400 max-w-sm",children:"The ERP has been updated, invoice triggered, and revenues booked."},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:77,columnNumber:17},void 0),o.jsxDEV("div",{className:"mt-12 bg-slate-800 p-6 rounded-3xl border border-slate-700 w-full max-w-sm text-left",children:[o.jsxDEV("p",{className:"text-slate-500 text-xs font-bold uppercase tracking-widest mb-1",children:"Signed By"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:79,columnNumber:21},void 0),o.jsxDEV("p",{className:"text-white text-lg font-medium",children:l},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:80,columnNumber:21},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:78,columnNumber:17},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:72,columnNumber:13},void 0):o.jsxDEV("div",{className:"min-h-screen bg-slate-50 flex flex-col max-w-md mx-auto shadow-2xl relative",children:[o.jsxDEV("div",{className:"bg-slate-900 p-6 text-white shrink-0",children:[o.jsxDEV("div",{className:"flex items-center gap-3 mb-6",children:[o.jsxDEV("div",{className:"w-10 h-10 rounded-full bg-white/10 flex items-center justify-center backdrop-blur-md",children:o.jsxDEV(P,{size:20,className:"text-indigo-400"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:91,columnNumber:25},void 0)},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:90,columnNumber:21},void 0),o.jsxDEV("div",{children:[o.jsxDEV("p",{className:"text-indigo-300 text-xs font-bold uppercase tracking-widest",children:"Driver Portal"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:94,columnNumber:25},void 0),o.jsxDEV("h1",{className:"text-xl font-black tracking-tight leading-none",children:"Dropoff Task"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:95,columnNumber:25},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:93,columnNumber:21},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:89,columnNumber:17},void 0),o.jsxDEV("div",{className:"space-y-4",children:[o.jsxDEV("div",{children:[o.jsxDEV("p",{className:"text-slate-400 text-xs font-bold mb-1",children:"Customer"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:101,columnNumber:25},void 0),o.jsxDEV("p",{className:"text-lg font-bold truncate",children:h.customerName},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:102,columnNumber:25},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:100,columnNumber:21},void 0),o.jsxDEV("div",{children:[o.jsxDEV("p",{className:"text-slate-400 text-xs font-bold flex gap-1 items-center mb-1",children:[o.jsxDEV(F,{size:12},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:105,columnNumber:102},void 0)," Address"]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:105,columnNumber:25},void 0),o.jsxDEV("p",{className:"text-sm text-slate-300 leading-relaxed font-medium",children:h.customerAddress||"No address specified"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:106,columnNumber:25},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:104,columnNumber:21},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:99,columnNumber:17},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:88,columnNumber:13},void 0),o.jsxDEV("div",{className:"flex-1 p-6 space-y-6 overflow-y-auto bg-white rounded-t-[2rem] -mt-4 relative z-10",children:[o.jsxDEV("div",{className:"flex bg-slate-50 p-4 rounded-xl items-center justify-between border border-slate-100",children:[o.jsxDEV("div",{className:"flex items-center gap-3",children:[o.jsxDEV(A,{size:20,className:"text-slate-400"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:114,columnNumber:25},void 0),o.jsxDEV("div",{children:[o.jsxDEV("p",{className:"text-xs text-slate-500 font-bold uppercase",children:"Order No"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:116,columnNumber:29},void 0),o.jsxDEV("p",{className:"font-bold text-slate-900",children:h.invoiceNumber},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:117,columnNumber:29},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:115,columnNumber:25},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:113,columnNumber:21},void 0),o.jsxDEV("div",{className:"text-right",children:[o.jsxDEV("p",{className:"text-xs text-slate-500 font-bold uppercase",children:"Cartons"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:121,columnNumber:25},void 0),o.jsxDEV("p",{className:"font-bold text-slate-900",children:((g=h.shippingDetails)==null?void 0:g.numberOfBoxes)||"Not specific"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:122,columnNumber:25},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:120,columnNumber:21},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:112,columnNumber:17},void 0),o.jsxDEV("div",{children:[o.jsxDEV("label",{className:"block text-xs font-bold uppercase text-slate-500 mb-2 tracking-widest",children:"Receiver Name"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:127,columnNumber:21},void 0),o.jsxDEV("input",{type:"text",value:l,onChange:y=>n(y.target.value),placeholder:"John Doe",className:"w-full bg-slate-50 border border-slate-200 outline-none p-4 rounded-xl focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/20 transition-all font-medium text-lg placeholder:text-slate-300"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:128,columnNumber:21},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:126,columnNumber:17},void 0),o.jsxDEV("div",{children:[o.jsxDEV("div",{className:"flex justify-between items-center mb-2",children:[o.jsxDEV("label",{className:"block text-xs font-bold uppercase text-slate-500 tracking-widest",children:"Digital Signature"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:139,columnNumber:25},void 0),o.jsxDEV("button",{onClick:x,className:"text-xs text-slate-400 hover:text-red-500 font-bold tracking-widest flex items-center gap-1",children:[o.jsxDEV(B,{size:12},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:141,columnNumber:28},void 0)," CLEAR"]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:140,columnNumber:25},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:138,columnNumber:21},void 0),o.jsxDEV("div",{className:"border-2 border-dashed border-slate-200 rounded-2xl overflow-hidden bg-slate-50",children:o.jsxDEV(E,{ref:e,penColor:"black",canvasProps:{className:"signature-canvas w-full h-[200px] cursor-crosshair"}},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:145,columnNumber:25},void 0)},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:144,columnNumber:21},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:137,columnNumber:17},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:111,columnNumber:13},void 0),o.jsxDEV("div",{className:"p-6 bg-white border-t border-slate-100 space-y-3",children:[m&&o.jsxDEV("div",{className:"flex items-start gap-2 bg-rose-50 border border-rose-200 text-rose-700 text-xs font-semibold p-3 rounded-xl",children:[o.jsxDEV("span",{className:"shrink-0 mt-0.5",children:"⚠"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:159,columnNumber:25},void 0),o.jsxDEV("span",{children:m},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:160,columnNumber:25},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:158,columnNumber:21},void 0),o.jsxDEV("button",{onClick:N,disabled:s,className:"w-full py-4 rounded-xl bg-slate-900 hover:bg-slate-800 text-white font-black uppercase text-sm tracking-widest transition-all disabled:opacity-50",children:s?"Confirming...":"Confirm Delivery"},void 0,!1,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:163,columnNumber:17},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:156,columnNumber:13},void 0)]},void 0,!0,{fileName:"D:/devlop/projects/printing system/src/pages/driver/DeliveryRoute.tsx",lineNumber:87,columnNumber:9},void 0)};export{ie as default};
