PageSourceSearch

https://app.salesroute.ai/static/js/2672.0d1b920d.chunk.js

js salesroute.ai collected 2026-10-05 13:57:23 UTC 29,906 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksalesrouteadmin=self.webpackChunksalesrouteadmin||[]).push([[2672],{84246:(e,t,n)=>{n.d(t,{A:()=>s});n(65043);var l=n(74117),a=n(70579);const s=e=>{let{text:t="Edit",color:n,backgroundColor:s,padding:i,onClick:o,animate:r=!1,...d}=e;const{t:c}=(0,l.Bd)();return(0,a.jsx)("div",{onClick:o,...d,className:`edit-button common-text ftw-4 ${i?"padding-cus":""} ${r?"edit-button-animate":""}`,style:{color:n||"#FFF",backgroundColor:s||"#094C80",cursor:"pointer"},children:c(t)})}},50227:(e,t,n)=>{function l(e){const t=document.createElement("div");t.innerHTML=`\n      <div style="display: flex; align-items: center; gap: 12px;">\n        <svg class="delete-alert-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">\n          <rect width="40" height="40" rx="4" fill="#FFEAEB"/>\n          <path d="M11 14H29" stroke="#FF0000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n          <path d="M18 19V25" stroke="#FF0000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n          <path d="M22 19V25" stroke="#FF0000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n          <path d="M27 14V28C27 28.5304 26.7893 29.0391 26.4142 29.4142C26.0391 29.7893 25.5304 30 25 30H15C14.4696 30 13.9609 29.7893 13.5858 29.4142C13.2107 29.0391 13 28.5304 13 28V14" stroke="#FF0000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n          <path d="M16 14V12C16 11.4696 16.2107 10.9609 16.5858 10.5858C16.9609 10.2107 17.4696 10 18 10H22C22.5304 10 23.0391 10.2107 23.4142 10.5858C23.7893 10.9609 24 11.4696 24 12V14" stroke="#FF0000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n        </svg>\n        <span class="alert-message ftw-4 common-text">${e}</span>\n      </div>\n    `,t.style.position="fixed",t.style.left="50%",t.style.top="100px",t.style.transform="translateX(-50%)",t.style.backgroundColor="#FFF",t.style.border="1px solid rgba(255, 0, 0, 0.20)",t.style.boxShadow="0px 8px 15px 0px rgba(255, 0, 0, 0.20)",t.style.borderRadius="13px",t.style.padding="12px 16px",t.style.boxSizing="border-box",t.style.zIndex="1000",t.style.animation="slideDown 0.3s ease-out forwards";const n=document.createElement("style");n.textContent="\n      .alert-message {\n        font-size: 0.875rem;\n      }\n      .delete-alert-icon {\n        width: 40px;\n        height: 40px;\n      }\n      \n      @media (max-width: 1599px) {\n        .delete-alert-icon { width: 36px; height: 36px; }\n      }\n      \n      @media (max-width: 1399px) {\n        .delete-alert-icon { width: 32px; height: 32px; }\n      }\n      \n      @media (max-width: 1199px) {\n        .delete-alert-icon { width: 28px; height: 28px; }\n      }\n      \n      @media (max-width: 991px) {\n        .delete-alert-icon { width: 24px; height: 24px; }\n      }\n      \n      @media (max-width: 767px) {\n        .delete-alert-icon { width: 20px; height: 20px; }\n      }\n      \n      @media (max-width: 575px) {\n        .delete-alert-icon { width: 18px; height: 18px; }\n      }\n      \n      @keyframes slideDown {\n        from {\n          opacity: 0;\n          transform: translate(-50%, -20px);\n        }\n        to {\n          opacity: 1;\n          transform: translate(-50%, 0);\n        }\n      }\n      @keyframes fadeOut {\n        from {\n          opacity: 1;\n          transform: translate(-50%, 0);\n        }\n        to {\n          opacity: 0;\n          transform: translate(-50%, -20px);\n        }\n      }\n    ",document.head.appendChild(n),document.body.appendChild(t),t.classList.add("alert-box"),setTimeout((()=>{t.style.animation="fadeOut 0.3s ease-out forwards",setTimeout((()=>{document.body.contains(t)&&document.body.removeChild(t),document.head.contains(n)&&document.head.removeChild(n)}),300)}),3e3)}n.d(t,{q:()=>l})},43501:(e,t,n)=>{n.d(t,{A:()=>o});var l=n(65043),a=n(64002),s=n(74117),i=n(70579);const o=e=>{let{onFileSelected:t,defaultImage:n,readOnly:o,isAdd:r,className:d="",maxSizeInMB:c=1,onDeleteRequest:u}=e;const[h,p]=(0,l.useState)(n||null),[m,v]=(0,l.useState)(!1),{t:x}=(0,s.Bd)();(0,l.useEffect)((()=>{p(n),v(!1)}),[n]);const g=m?null:h;return(0,i.jsx)("div",{className:`image-add-section ${d}`,children:(0,i.jsxs)("div",{className:"upload-image-box-outer",children:[(0,i.jsxs)("div",{className:"upload-image-box-inner",children:[(0,i.jsxs)("div",{className:"image-boxe",onClick:()=>document.getElementById("imageUpload").click(),children:[(0,i.jsx)("img",{src:g||(r?"/assets/Vector.jpg":"/assets/null-image.jpg"),className:"upload-button-img "+(g?"uploaded-image":"placeholder-image"),alt:"Upload"}),(0,i.jsx)("div",{className:"delete-icon-container-image",children:!o&&g&&!m&&(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 40",fill:"none",className:"delete-icon-container cr-pointer",onClick:e=>{e&&"function"===typeof e.stopPropagation&&e.stopPropagation(),h&&!m&&(v(!0),p(""),u&&u(),h.startsWith("blob:")&&URL.revokeObjectURL(h))},"data-tooltip-id":"global-tooltip","data-tooltip-content":x("Delete"),children:[(0,i.jsxs)("g",{clipPath:"url(#clip0_18823_16374)",children:[(0,i.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"black",fillOpacity:"0.12"}),(0,i.jsx)("path",{d:"M11 14H29",stroke:"#FF0000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M18 19V25",stroke:"#FF0000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M22 19V25",stroke:"#FF0000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M27 14V28C27 28.5304 26.7893 29.0391 26.4142 29.4142C26.0391 29.7893 25.5304 30 25 30H15C14.4696 30 13.9609 29.7893 13.5858 29.4142C13.2107 29.0391 13 28.5304 13 28V14",stroke:"#FF0000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M16 14V12C16 11.4696 16.2107 10.9609 16.5858 10.5858C16.9609 10.2107 17.4696 10 18 10H22C22.5304 10 23.0391 10.2107 23.4142 10.5858C23.7893 10.9609 24 11.4696 24 12V14",stroke:"#FF0000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_18823_16374",children:(0,i.jsx)("rect",{width:"40",height:"40",rx:"20",fill:"white"})})})]})})]}),(0,i.jsx)("input",{type:"file",onChange:e=>{const n=e.target.files[0];if(n){const l=1024*c*1024;if(n.size>l)return(0,a.showAlert)(`Image size exceeds ${c}MB. Please upload a smaller image.`),void(e.target.value="");if(!["image/jpeg","image/jpg","image/png","image/gif"].includes(n.t
1ype))return(0,a.showAlert)("Please upload a valid image file (JPEG, PNG, GIF)."),void(e.target.value="");v(!1),p(URL.createObjectURL(n)),t(n)}},className:"file-input",accept:"image/*",id:"imageUpload",style:{display:"none"},disabled:o||g&&!m,value:""})]}),(0,i.jsx)("div",{className:"edit-image-container",children:!o&&(0,i.jsx)("label",{htmlFor:"imageUpload",style:{cursor:o?"not-allowed":"pointer"},className:"change-img  blue "+(o?"disabled":""),children:g?"":x("Upload Image")})})]})})}},81413:(e,t,n)=>{n.d(t,{A:()=>o});var l=n(65043),a=n(74117),s=n(7714),i=n(70579);const o=e=>{let{label:t,options:n,defaultOption:o="",type:r="",defaultValue:d="",onChange:c,iconType:u,onSelectChange:h,className:p="",border:m="",error:v,important:x=!1,validators:g=[],readOnly:f=!1,disabled:C=!1}=e;const[w,y]=(0,l.useState)(d),[b,j]=(0,l.useState)(o),[k,N]=(0,l.useState)([]),[A,L]=(0,l.useState)(""),[D,V]=(0,l.useState)(!1),[S,$]=(0,l.useState)(n),[F,O]=(0,l.useState)(""),{t:E}=(0,a.Bd)(),M=(0,l.useRef)(null),_=(0,l.useRef)(null),H=(0,l.useRef)(null),I=(0,l.useRef)(null),R=Array.isArray(g)?g:g?[g]:[];(0,l.useEffect)((()=>{y(d)}),[d]),(0,l.useEffect)((()=>{if(j(o),null===o||void 0===o||""===o)return void O("");const e=(n||[]).find((e=>String(e.value)===String(o)));if(e){const t=e.label?e.label.match(/\(([^)]+)\)/):null,n=t?t[1]:e.dial_code||e.label;O(n)}else O("")}
1),[o,n]),(0,l.useEffect)((()=>{if(""===A)$(n);else{const e=n.filter((e=>e.label.toLowerCase().includes(A.toLowerCase())||String(e.value).toLowerCase().includes(A.toLowerCase())));$(e)}}),[A,n]),(0,l.useEffect)((()=>{const e=e=>{M.current&&!M.current.contains(e.target)&&(V(!1),L(""))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]);const B=e=>{j(e.value);const t=e.label.match(/\(([^)]+)\)/),n=t?t[1]:e.label;if(O(n),V(!1),L(""),h){const t={target:{value:e.value}};h(t)}},{highlightedIndex:T,handleTriggerKeyDown:q,handleSearchKeyDown:Z,handleItemMouseEnter:U}=(0,s.A)({isOpen:D,setIsOpen:V,options:S,onSelect:B,triggerRef:H,listRef:I,searchRef:_,selectedValue:b,valueKey:"value"}),P=v?[v]:k;return(0,i.jsxs)("div",{className:`small-input-box-container ${m} phone-input-container  posrel ${P.length>0?"input-error":""} ${p} `,children:["mobile"===u?(0,i.jsx)("svg",{className:"phone-input-svg",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{d:"M8.7 4C8.24913 4 7.81673 4.17911 7.49792 4.49792C7.17911 4.81673 7 5.24913 7 5.7V18.3C7 18.7509 7.17911 19.1833 7.49792 19.5021C7.81673 19.8209 8.24913 20 8.7 20H14.9C15.3509 20 15.7833 19.8209 16.1021 19.5021C16.4209 19.1833 16.6 18.7509 16.6 18.3V5.7C16.6 5.24913 16.4209 4.81673 16.1021 4.49792C15.7833 4.17911 15.3509 4 14.9 4H8.7ZM8 5.7C8 5.3136 8.3136 5 8.7 5H14.9C15.2868 5 15.6 5.3136 15.6 5.7V18.3C15.6 18.4857 15.5263 18.6637 15.395 18.795C15.2637 18.9263 15.0857 19 14.9 19H8.7C8.51435 19 8.3363 18.9263 8.20503 18.795C8.07375 18.6637 8 18.4857 8 18.3V5.7ZM10.7 16.6C10.5674 16.6 10.4402 16.6527 10.3464 16.7464C10.2527 16.8402 10.2 16.9674 10.2 17.1C10.2 17.2326 10.2527 17.3598 10.3464 17.4536C10.4402 17.5473 10.5674 17.6 10.7 17.6H12.9C13.0326 17.6 13.1598 17.5473 13.2536 17.4536C13.3473 17.3598 13.4 17.2326 13.4 17.1C13.4 16.9674 13.3473 16.8402 13.2536 16.7464C13.1598 16.6527 13.0326 16.6 12.9 16.6H10.7Z",fill:"#6D6D6D"})}):"phone"===u?(0,i.jsx)("svg",{className:"phone-input-svg",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{d:"M19.314 14.9631L15.4576 13.2348C15.2828 13.16 15.0922 13.1299 14.9029 13.1473C14.7136 13.1647 14.5316 13.229 14.3734 13.3344C14.3574 13.3448 14.3422 13.3562 14.3277 13.3687L12.3122 15.0831C12.2912 15.0945 12.268 15.1009 12.2442 15.1017C12.2203 15.1026 12.1967 15.0979 12.175 15.088C10.8794 14.4626 9.53735 13.1287 8.90958 11.8511C8.89912 11.8298 8.89369 11.8063 8.89369 11.7825C8.89369 11.7588 8.89912 11.7353 8.90958 11.714L10.6296 9.67308C10.642 9.658 10.6534 9.64219 10.6639 9.62574C10.7679 9.46696 10.8307 9.28478 10.8467 9.09565C10.8627 8.90652 10.8313 8.71639 10.7554 8.54243L9.03938 4.6925C8.94193 4.46523 8.7734 4.2757 8.55908 4.15235C8.34477 4.029 8.09623 3.97849 7.85076 4.00839C6.78397 4.14864 5.80474 4.67253 5.09607 5.48216C4.3874 6.29179 3.99777 7.33176 4.00001 8.40773C4.00001 14.7998 9.2002 20 15.5923 20C16.6682 20.0021 17.7081 19.6124 18.5177 18.9037C19.3273 18.1951 19.8512 17.216 19.9916 16.1492C20.0215 15.9049 19.9716 15.6575 19.8495 15.4438C19.7275 15.2301 19.5396 15.0615 19.314 14.9631ZM15.5923 19.0204C9.74063 19.0204 4.97964 14.2594 4.97964 8.40773C4.97691 7.57009 5.27924 6.76011 5.83015 6.12913C6.38107 5.49814 7.14286 5.08932 7.97322 4.97904H7.99199C8.02489 4.97965 8.05683 4.99019 8.08364 5.00927C8.11044 5.02836 8.13086 5.05509 8.1422 5.08598L9.86471 8.93183C9.87454 8.95322 9.87962 8.97647 9.87962 9C9.87962 9.02353 9.87454 9.04678 9.86471 9.06816L8.14139 11.114C8.12859 11.1286 8.11686 11.1442 8.10628 11.1605C7.99845 11.3251 7.93494 11.5148 7.92193 11.7112C7.90892 11.9075 7.94683 12.1039 8.03199 12.2813C8.7561 13.7638 10.25 15.2463 11.7489 15.9705C11.9273 16.0552 12.1247 16.0922 12.3217 16.0778C12.5187 16.0635 12.7086 15.9984 12.873 15.8888C12.8885 15.8782 12.904 15.8668 12.9187 15.8545L14.9335 14.1402C14.9534 14.1295 14.9753 14.1232 14.9979 14.1218C15.0204 14.1204 15.043 14.1239 15.0641 14.132L18.9214 15.8602C18.9529 15.8737 18.9794 15.8967 18.9971 15.926C19.0148 15.9553 19.0229 15.9894 19.0202 16.0235C18.9105 16.8543 18.502 17.6166 17.8712 18.1681C17.2403 18.7197 16.4302 19.0226 15.5923 19.0204Z",fill:"#6D6D6D"})}):null,(0,i.jsxs)("div",{className:"phone-input-select posrel",ref:M,children:[(0,i.jsxs)("div",{ref:H,tabIndex:C?-1:0,role:"button","aria-haspopup":"listbox","aria-expanded":D,className:`phone-select-box ftw-4 ${C?"phone-select-disabled":""} ${D?"phone-select-open":""}`,onClick:()=>{C||(V(!D),!D&&_.current&&setTimeout((()=>_.current.focus()),0))},onKeyDown:q,children:[(0,i.jsx)("span",{className:"",children:F||""}),(0,i.jsx)("svg",{className:"custom-arrow-phone "+(D?"phone-arrow-rotated":""),width:"8",he
1ight:"6",viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M4 6L0.535899 0L7.4641 0L4 6Z",fill:"#424242"})})]}),D&&(0,i.jsxs)("div",{className:"phone-search-dropdown",children:[(0,i.jsx)("input",{ref:_,type:"text",placeholder:E("Search..."),value:A,onChange:e=>{L(e.target.value)},onKeyDown:Z,className:"phone-search-input "}),(0,i.jsx)("div",{className:"phone-options-list",ref:I,children:S.length>0?S.map(((e,t)=>(0,i.jsxs)("div",{className:`phone-option-item ${b===e.value?"phone-option-selected":""} ${T===t?"highlighted":""}`,onClick:()=>B(e),onMouseEnter:()=>U(t),children:[e.flag&&(0,i.jsx)("img",{src:e.flag,alt:"",className:"phone-flag-icon"}),e.label]},t))):(0,i.jsx)("div",{className:"phone-no-options ",children:"No options found"})})]})]}),(0,i.jsxs)("div",{className:"phone-input-field-wrapper",children:[(0,i.jsx)("input",{className:"phone-input-box common-text  ",type:r,value:!f||""!==w&&null!==w&&void 0!==w?w:"-",onChange:e=>{let t=e.target.value;t=t.replace(/\D/g,""),t.length>11&&(t=t.slice(0,11));const n=[],l=(e=>{const t=R.map((t=>{if("function"===typeof t){const n=t(e);return!0===n?null:n}return null})).filter((e=>"string"===typeof e));return t})(t);if(n.push(...l),y(t),N(n),c){const n={...e,target:{...e.target,value:t}};c(n)}},placeholder:" ",readOnly:f}),(0,i.jsxs)("label",{className:"phone-input-label common-text ftw-4 "+(w||f&&(""===w||null===w||void 0===w)?"has-value":""),children:[E(t),x&&(0,i.jsx)("span",{className:"required-asterisk",children:"*"})]})]})]})}},561:(e,t,n)=>{n.d(t,{A:()=>r});var l=n(65043),a=(n(98455),n(74117)),s=n(71087),i=n(70579);const o={"common-safe":{pattern:/^[a-zA-Z0-9-]*$/,maxLength:15,minLength:8,error:"Must be 8-15 characters (letters, numbers, or hyphens)"},numeric:{pattern:/^[0-9]*$/,error:"Only numbers are allowed"},alpha:{pattern:/^[a-zA-Z]*$/,error:"Only letters are allowed"},"alpha-numeric":{pattern:/^[a-zA-Z0-9]*$/,error:"Only letters and numbers are allowed"},coordinate:{pattern:/^-?\d*\.?\d*$/,error:"Only valid coordinate numbers are allowed"}},r=e=>{let{label:t,defaultValue:n="",onChange:r,type:d="text",validators:c=[],name:u,isRequired:h=!1,important:p=!1,error:m,disablePastDates:v,disableFutureDates:x,className:g="",border:f="",readOnly:C=!1,isPrice:w=!1,maxChar:y=null,restrictionId:b=null,maxLength:j=null,redirection:k="disabled",onRedirectionClick:N,autoComplete:A="off",...L}=e;const[D,V]=(0,l.useState)(null!==n&&void 0!==n?n:""),[S,$]=(0,l.useState)([]),{t:F}=((0,l.useRef)(null),(0,a.Bd)()),O=Array.isArray(c)?c:c?[c]:[];let E=h?[..."function"===typeof O?[O]:O,e=>null!==e&&void 0!==e&&""!==e||"This field is required"]:O;if(b&&o[b]){const e=o[b];e.minLength&&(E=[...E,t=>!t||t.length>=e.minLength||e.error||`Minimum ${e.minLength} characters required`])}(0,l.useEffect)((()=>{V(null!==n&&void 0!==n?n:"")}),[n]);(0,s.q9)();const M=m?[m]:S;return(0,i.jsxs)("div",{className:`small-input-box-container posrel ${g}`,children:[(0,i.jsx)("input",{className:`input-box common-text ftw-4 ${"enabled"===k?"input-box-with-redirection":""} ${M.length>0?"input-error":""} ${f}`,type:d,value:!C||""!==D&&null!==D&&void 0!==D?null!==D&&void 0!==D?D:"":"-",onChange:e=>{let t=e.target.value;if(null!==j&&void 0!==j&&Number(j)>0&&t.length>Number(j)&&(t=t.slice(0,Number(j))),w){if(!/^(\d*\.?\d{0,2})$/.test(t))return}if(b&&o[b]){const e=o[b];if(e.pattern&&!e.pattern.test(t))return;if(e.maxLength&&t.length>e.maxLength)return}y&&(t=t.slice(0,y));const n=(e=>{const t=E.map((t=>{if("function"===typeof t){const n=t(e);return!0===n?null:n}return null})).filter((e=>"string"===typeof e));return t})(t);if(V(t),$(n),r){const n={...e,target:{...e.target,value:t}};r(n)}},placeholder:"",name:u,readOnly:C,maxLength:j,autoComplete:A}),(0,i.jsxs)("label",{className:"input-date-label input-label common-text ftw-4 "+(D||C&&(""===D||null===D||void 0===D)?"has-value":""),children:[F(t),p&&(0,i.jsx)("span",{className:"required-asterisk",children:"*"})]}),"enabled"===k&&(0,i.jsx)("div",{className:"redirection-icon",onClick:N,...L,children:(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",children:[(0,i.jsx)("path",{d:"M7 7H17V17",stroke:"#1A73E8","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,i.jsx)("path",{d:"M7 17L17 7",stroke:"#1A73E8","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]})})]})}},54992:(e,t,n)=>{n.d(t,{A:()=>i});var l=n(65043),a=n(74117),s=(n(98455),n(70579));const i=e=>{let{label:t,defaultValue:n="",value:i,onChange:o,validators:r=[],name:d,isRequired:c=!1,error:u,className:h="",border:p="",readOnly:m=!1,maxChar:v=null,size:x="large",height:g="",important:f=!1,useAddLabel:C=!1}=e;const{t:w}=(0,a.Bd)(),[y,b]=(0,l.useState)(void 0!==i?i:n),[j,k]=(0,l.useState)([]),[N,A]=(0,l.useState)(!1),L=(0,l.useRef)(null),D=Array.isArray(r)?r:r?[r]:[],V=c?[..."function"===typeof D?[D]:D,e=>null!==e&&void 0!==e&&""!==e||"This field is required"]:D;(0,l.useEffect)((()=>{b(void 0!==i?i:n)}),[n,i]);const S=()=>{A(!0),setTimeout((()=>{L.current&&L.current.focus()}),0)},$=u?[u]:j,F=void 0!==i?i:y,O=Boolean(null!==F&&void 0!==F&&""!==String(F).trim()&&"-"!==String(F).trim());if(C&&m&&!O)return null;const E=!C||c||f||N||O||$.length>0,M="small"===x?"small-notes-box-container":"large-notes-box-container",_=t||"Notes",H=_.toLowerCase().startsWith("add ")?_:`Add ${_}`;if(!E)return(0,s.jsx)("div",{className:`notes-box-container ${M} ${h}`,children:(0,s.jsxs)("div",{className:"add-notes-trigger",onClick:S,children:[(0,s.jsx)("span",{className:"add-notes-text-label common-text ",children:w(H)}),(0,s.jsxs)("svg",{className:"plus-icon",viewBox:"0 0 15 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{cx:"7.5",cy:"8.21436",r:"7.5",fill:"#DFA226"}),(0,s.jsx)("path",{d:"M10.1284 8.64655H7.96415V10.8644H6.82843V8.64655H4.66415V7.61798H6.82843V5.40012H7.96415V7.61798H10.1284V8.64655Z",fill:"white"})]}),f&&(0,s.jsx)("span",{className:"required-asterisk",children:"*"})]})});const I=null!==F&&void 0!==F?F:"";return(0,s.jsxs)("div",{className:`notes-box-container ${M} ${h}`,children:[(0,s.jsx)("textarea",{ref:L,className:`notes-textarea ftw-4 ${$.length>0?"input-error":""} ${p} ${g}`,value:I,onChange:e=>{let t=e.target.value;v&&(t=t.slice(0,v));const n=(e=>{const t=V.map((t=>{if("function"===typeof t){const n=t(e);return!0===n?null:n}return null})).filter((e=>"string"===typeof e));return t})(t);if(b(t),k(n),o){const n={...e,target:{...e.target,value:t}};o(n)}},placeholder:"",name:d,readOnly:m}),(0,s.jsxs)("label",{className:"notes-label "+(I?"has-value":""),children:[w(t),f&&(0,s.jsx)("span",{className:"required-asterisk",children:"*"})]})]})}}
1,96562:(e,t,n)=>{n.d(t,{A:()=>s});var l=n(74117),a=(n(9458),n(70579));const s=e=>{let{isOpen:t,onSave:n,onClose:s}=e;const{t:i}=(0,l.Bd)();return t?(0,a.jsx)("div",{className:"delete-dialog__overlay",children:(0,a.jsxs)("div",{className:"delete-dialog",children:[(0,a.jsxs)("div",{className:"delete-dialog__header",children:[(0,a.jsx)("svg",{width:"30",height:"27",viewBox:"0 0 30 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M19.2001 2.41931L29.2516 19.1609C30.6961 21.5655 29.9866 24.729 27.6661 26.226C26.8877 26.7313 25.9796 27.0002 25.0516 27H4.94701C2.21551 27 0 24.705 0 21.8715C0 20.913 0.259501 19.9754 0.747002 19.1609L10.8 2.41931C12.243 0.0147877 15.294 -0.721718 17.6145 0.775294C18.2566 1.1893 18.7996 1.7518 19.2001 2.41931ZM15 21C15.3979 21 15.7794 20.8419 16.0607 20.5606C16.342 20.2793 16.5 19.8978 16.5 19.4999C16.5 19.1021 16.342 18.7206 16.0607 18.4393C15.7794 18.158 15.3979 17.9999 15 17.9999C14.6022 17.9999 14.2207 18.158 13.9394 18.4393C13.6581 18.7206 13.5 19.1021 13.5 19.4999C13.5 19.8978 13.6581 20.2793 13.9394 20.5606C14.2207 20.8419 14.6022 21 15 21ZM15 7.49985C14.6022 7.49985 14.2207 7.65788 13.9394 7.93919C13.6581 8.2205 13.5 8.60203 13.5 8.99986V14.9999C13.5 15.3977 13.6581 15.7793 13.9394 16.0606C14.2207 16.3419 14.6022 16.4999 15 16.4999C15.3979 16.4999 15.7794 16.3419 16.0607 16.0606C16.342 15.7793 16.5 15.3977 16.5 14.9999V8.99986C16.5 8.60203 16.342 8.2205 16.0607 7.93919C15.7794 7.65788 15.3979 7.49985 15 7.49985Z",fill:"white"})}),(0,a.jsx)("h6",{className:"delete-dialog__title",children:i("Confirmation Required")})]}),(0,a.jsxs)("div",{className:"delete-content",children:[(0,a.jsx)("p",{className:"delete-heading-text",children:i("Are you sure you want to delete?")}),(0,a.jsx)("p",{className:"delete-description-text",children:i("Are you sure you want to delete this record? Once deleted, the data will be permanently removed and may impact ongoing customer interactions.")})]}),(0,a.jsxs)("div",{className:"delete-popup-buttons",children:[(0,a.jsx)("button",{className:"yes-button-red",onClick:n,"data-tooltip-id":"global-tooltip","data-tooltip-content":i("Delete"),children:i("Delete")}),(0,a.jsx)("button",{className:"no-button",onClick:s,"data-tooltip-id":"global-tooltip","data-tooltip-content":i("Cancel"),children:i("Cancel")})]})]})}):null}},7714:(e,t,n)=>{n.d(t,{A:()=>s,u:()=>a});var l=n(65043);function a(e){let{isOpen:t,setIsOpen:n,options:a=[],onSelect:s,triggerRef:i,listRef:o,selectedValue:r=null,valueKey:d="value",tabSelectsValue:c=!1,defaultHighlightFirst:u=!0}=e;const[h,p]=(0,l.useState)(-1),m=Array.isArray(a)?a.length:0,v=(0,l.useCallback)((()=>{if(!Array.isArray(a)||0===a.length)return-1;if(null!==r&&void 0!==r&&""!==r){const e=a.findIndex((e=>{if(!e)return!1;const t=void 0!==e[d]?e[d]:void 0!==e.id?e.id:e;return String(t)===String(r)}));if(e>=0)return e}return u?0:-1}),[a,r,d,u]);(0,l.useEffect)((()=>{p(t?v():-1)}),[t,v]),(0,l.useEffect)((()=>{t&&p(0===m?-1:e=>e<0||e>=m?u?0:-1:e)}),[m,t,u]);const x=(0,l.useCallback)((e=>{if(null===o||void 0===o||!o.current||e<0)return;const t=o.current.children[e];t&&"function"===typeof t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"nearest"})}),[o]),g=(0,l.useCallback)((e=>{"ArrowDown"===e.key?(e.preventDefault(),t?m>0&&p((e=>{const t=e<m-1?e+1:0;return x(t),t})):n(!0)):"ArrowUp"===e.key?(e.preventDefault(),t?m>0&&p((e=>{const t=e>0?e-1:m-1;return x(t),t})):n(!0)):"Enter"===e.key||" "===e.key?t?h>=0&&h<m&&s&&(e.preventDefault(),s(a[h]),n(!1)):(e.preventDefault(),n(!0)):"Escape"===e.key?t&&(e.preventDefault(),n(!1)):"Tab"===e.key&&t&&n(!1)}),[t,n,m,h,s,a,x]),f=(0,l.useCallback)((e=>{"ArrowDown"===e.key?(e.preventDefault(),m>0&&p((e=>{const t=e<m-1?e+1:0;return x(t),t}))):"ArrowUp"===e.key?(e.preventDefault(),m>0&&p((e=>{const t=e>0?e-1:m-1;return x(t),t}))):"Enter"===e.key?(e.preventDefault(),h>=0&&h<m&&s&&(s(a[h]),n(!1),null!==i&&void 0!==i&&i.current&&"function"===typeof i.current.focus&&setTimeout((()=>i.current.focus()),0))):"Escape"===e.key?(e.preventDefault(),n(!1),null!==i&&void 0!==i&&i.current&&"function"===typeof i.current.focus&&i.current.focus()):"Tab"===e.key&&(c&&h>=0&&h<m&&s&&s(a[h]),n(!1))}),[m,h,s,a,n,i,c,x]),C=(0,l.useCallback)((e=>{p(e)}),[]);return{highlightedIndex:h,setHighlightedIndex:p,handleTriggerKeyDown:g,handleSearchKeyDown:f,handleItemMouseEnter:C,scrollToHighlightedItem:x}}const s=a},81868:(e,t,n)=>{n.r(t),n.d(t,{default:()=>V});var l=n(65043),a=n(74117),s=n(73216),i=(n(52493),n(37355)),o=n(51291),r=n(561),d=n(63016),c=n(94505),u=n(84246),h=n(43501),p=n(23971),m=n(46838),v=n(71087),x=n(51264),g=n(81413),f=n(1503),C=n(54992),w=n(15940),y=n(11744),b=n(19165),j=n(96562),k=n(9950),N=n(50227),A=n(64002),L=n(50374),D=n(70579);const V=()=>{const{t:e}=(0,a.Bd)(),t=(0,s.Zp)(),[n,V]=(0,l.useState)([]),[S,$]=(0,l.useState)([]),{id:F}=(0,s.g)(),[O,E]=(0,l.useState)([]),[M,_]=(0,l.useState)(!1),[H,I]=(0,y.v)(),[R,B]=(0,l.useState)(!0),[T,q]=(0,l.useState)(!1),[Z,U]=(0,l.useState)(!1),P=null!==n&&void 0!==n&&n.profile_pic?`${c.VY.slice(0,-1)}/${n.profile_pic.replace(/^\//,"")}`:null;async function z(){try{const e=await(0,d.vZ)(F);V(e.data),$(e.data.driver_documents||[])}catch(e){console.error("Error fetching driver:",e)}}(0,l.useEffect)((()=>{(async()=>{I(!0);try{await Promise.all([z(),Y()])}catch(e){console.error("Failed to load driver details:",e)}finally{I(!1),B(!1)}})()}),[]);const K=()=>{q(!0)},W=()=>{U(!1),q(!1)};async function Y(){try{const e=(await(0,x.HH)()).data.data.map((e=>{const t="IN"===e.country_code?"+91":e.phone_code||e.country_code;return{label:`${e.name} (${t})`,value:e.id}}));E(e)}catch(e){console.error("Error fetching countries:",e)}}return R?null:(0,D.jsxs)("div",{className:"whole-container",onClickCapture:e=>{("INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||e.target.classList.contains("input-box")||e.target.classList.contains("text-box")||e.target.closest(".input-box")||e.target.closest(".text-box"))&&(_(!0),setTimeout((()=>_(!1)),800))},children:[(0,D.jsx)("div",{className:"path-header",children:(0,D.jsx)("div",{className:"path-name",children:(0,D.jsx)(i.A,{pageName:"Vehicle Management > Drivers > ",nestedpageName:"Details"})})}),(0,D.jsxs)("div",{className:"page-actions-bar",children:[(0,D.jsxs)("div",{className:"name-utility",children:[(0,D.jsx)("div",{className:"page-name-sub common-text ftw-5 dk-gray",children:null===n||void 0===n?void 0:n.uid}),(0,D.jsx)(w.A,{children:(0,D.jsx)(m.A,{onArchive:K,onDelete:()=>{U(!0)},isArchived:(null===n||void 0===n?void 0:n.is_archived)||!1,"data-tooltip-id":"global-tooltip","data-tooltip-content":e("Actions")})}),(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2",height:"17",viewBox:"0 0 2 17",fill:"none",children:(0,D.jsx)("path",{d:"M1 0V17",stroke:"#CDCDCD"})}),(0,D.jsx)(w.A,{children:(0,D.jsx)(p.A,{objectId:null===n||void 0===n?void 0:n.id,modelName:"Driver",name:"Driver","data-tooltip-id":"global-tooltip","data-tooltip-content":e("Activity L
1og")})})]}),(0,D.jsxs)("div",{className:"page-name-rightside-icons",children:[(0,D.jsx)(u.A,{onClick:()=>{t(`/vehicle/drivers/edit/${F}`)},animate:M,"data-tooltip-id":"global-tooltip","data-tooltip-content":e("Edit")}),(0,D.jsx)(o.A,{onClick:()=>{t("/vehicle/drivers")},"data-tooltip-id":"global-tooltip","data-tooltip-content":e("Close")})]})]}),(0,D.jsx)(L.A,{isArchived:null===n||void 0===n?void 0:n.is_archived,documentName:e("driver"),onRestore:K}),(0,D.jsx)("div",{className:"driver-add-section",style:{marginTop:"2rem"},children:(0,D.jsxs)("div",{className:"driver-cat-add-section",id:"vehicle-general-info",children:[(0,D.jsxs)("div",{className:"driver-fields-card box-pad",children:[(0,D.jsxs)("div",{className:"form-row",children:[(0,D.jsx)(r.A,{label:"Driver Name",defaultValue:n.name,readOnly:!0}),(0,D.jsx)(g.A,{label:"Mobile Number",options:O,defaultValue:null===n||void 0===n?void 0:n.mobile,defaultOption:null===n||void 0===n?void 0:n.mobile_code,readOnly:!0,disabled:!0})]}),(0,D.jsxs)("div",{className:"form-row",children:[(0,D.jsx)(r.A,{label:"Email",defaultValue:n.email,readOnly:!0}),(0,D.jsx)(r.A,{label:"License Number",defaultValue:n.license,readOnly:!0})]}),(0,D.jsxs)("div",{className:"form-row",children:[(0,D.jsx)(r.A,{label:"Joining Date",defaultValue:(0,v.Yq)(null===n||void 0===n?void 0:n.joining_date),readOnly:!0}),(0,D.jsx)(r.A,{label:"Relieving Date",defaultValue:(0,v.Yq)(null===n||void 0===n?void 0:n.relieving_date)||"-",readOnly:!0})]}),(0,D.jsx)("div",{className:"form-row",children:(0,D.jsx)(r.A,{label:"Associated User",defaultValue:null===n||void 0===n?void 0:n.associated_user_name,className:"w-100",readOnly:!0})}),(0,D.jsx)("div",{className:"form-row",children:(0,D.jsx)(C.A,{label:"Address",defaultValue:n.address,readOnly:!0})})]}),(0,D.jsxs)("div",{className:"right-side-container",style:{width:"20%"},children:[(0,D.jsx)(h.A,{readOnly:!0,defaultImage:P}),(0,D.jsx)(f.A,{fileDetails:S,onView:e=>(e=>{const t=e.startsWith("/")?e.substring(1):e,n=`${c.VY}${t}`;window.open(n,"_blank")})(e.file),onDownload:e=>(async e=>{await(0,d.QN)(e)})(e.file),showDownload:!0,showDelete:!1,enableScroll:!0,onFileChange:null})]})]})}),(0,D.jsx)(w.A,{children:(0,D.jsx)(b.A,{isOpen:T,archivename:(null===n||void 0===n?void 0:n.name)||"",onSave:async()=>{if(null!==n&&void 0!==n&&n.id){I(!0);try{const t=await(0,d.lB)(n.id,null);null!==t&&void 0!==t&&t.data&&(W(),await z(),(0,k.b)(null!==n&&void 0!==n&&n.is_archived?e("Driver unarchived successfully!"):e("Driver archived successfully!"),"success"))}catch(a){var t,l;(0,A.showAlert)((null===(t=a.response)||void 0===t||null===(l=t.data)||void 0===l?void 0:l.message)||e("Something went wrong"))}finally{I(!1)}}},onClose:W,isArchived:(null===n||void 0===n?void 0:n.is_archived)||!1})}),(0,D.jsx)(w.A,{children:(0,D.jsx)(j.A,{isOpen:Z,title:"",onSave:async()=>{if(null!==n&&void 0!==n&&n.uuid){I(!0);try{var l,a;const i=await(0,d.wL)(null===n||void 0===n?void 0:n.uuid);var s;if(1===(null===i||void 0===i||null===(l=i.data)||void 0===l?void 0:l.response_code)||null!==i&&void 0!==i&&null!==(a=i.data)&&void 0!==a&&a.success)W(),(0,N.q)((null===i||void 0===i||null===(s=i.data)||void 0===s?void 0:s.message)||e("Driver deleted successfully!")),t("/vehicle/drivers")}catch(r){var i,o;(0,A.showAlert)((null===(i=r.response)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.message)||e("Something went wrong"))}finally{I(!1)}}},onClose:W})})]})}},52493:()=>{}}]);
2//# sourceMappingURL=2672.0d1b920d.chunk.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.